> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# getLeaves

> Get all wallet leaves (UTXOs) as TreeNode objects.

Gets all available leaves (UTXOs) owned by the wallet.

## Method Signature

```typescript theme={null}
async getLeaves(isBalanceCheck: boolean = false): Promise<TreeNode[]>
```

## Parameters

<ResponseField name="isBalanceCheck" type="boolean">
  If `true`, only queries the coordinator for faster response (default: `false`)
</ResponseField>

## Returns

<ResponseField name="leaves" type="TreeNode[]" required>
  Array of tree nodes representing wallet leaves
</ResponseField>

## Example

```typescript theme={null}
const leaves = await wallet.getLeaves();
console.log("Leaves:", leaves.length);
console.log("Total value:", leaves.reduce((sum, l) => sum + l.value, 0));
```
