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

# Accounts and Funding

> Use numeric account IDs for custody and root-owner addresses for administration.

AccountCore holds assets and records balances by numeric account ID. Read [Accounts](/accounts/overview) for the user-facing model first. All snippets here use the [reviewed SDK release](/sdk/installation).

## Register and fund a root

```typescript theme={null}
const amount = parseUnits("100", tokenDecimals);
const approval = await kuru.account.approveErc20({ token, spender: accountCore, amount });
const approvalReceipt = await publicClient.waitForTransactionReceipt({ hash: approval });
if (approvalReceipt.status !== "success") throw new Error("Approval reverted");

const deposit = await kuru.account.depositToOwner({ rootOwner: owner.address, token, amount });
const depositReceipt = await publicClient.waitForTransactionReceipt({ hash: deposit });
if (depositReceipt.status !== "success") throw new Error("Deposit reverted");
const rootAccountId = await kuru.account.getRootAccountId({ rootOwner: owner.address });
```

`depositToOwner` can register an owner that has no root yet. `deposit({ rootAccountId, token, amount })` funds an existing root. Anyone can pay, but the payer receives no account authority. A child ID is rejected. Native MON uses `NATIVE_TOKEN_ADDRESS`; the request builder attaches the transaction value.

## Read balances

```typescript theme={null}
const free = await kuru.account.getBalance({ accountId, token });
const reserved = await kuru.account.getSpotReservedBalance({ accountId, token });
```

These methods accept root or child IDs. Passive inventory is accounted for separately. IDs are `bigint` at the SDK boundary; token amounts are raw token units.

## Transfer within a family

```typescript theme={null}
await kuru.account.transferBetweenAccounts({
  fromAccountId: rootAccountId,
  toAccountId: childAccountId,
  token,
  amount,
});
```

The same call handles child-to-root and sibling transfers. Both IDs must share a root. The caller must be the owner or have `INTERNAL_TRANSFER`, `WITHDRAW`, or `ADMIN` authority. Transfer only free balance.

## Withdraw to a wallet

```typescript theme={null}
await kuru.account.withdraw({ rootAccountId, token, amount, recipient: owner.address });
```

Withdrawals accept only a root ID and require an explicit external recipient. A successful return from the SDK is a transaction hash: await and check its receipt. Pricing, capacity, freezes, balance, and permission checks still apply. See [WithdrawalLimiter](/contracts/withdrawal-limiter).

## Signers and builders

Signer administration identifies the root by its owner address:

```typescript theme={null}
await kuru.account.authorizeAccountSigner({
  account: owner.address,
  signer,
  permissions: AccountPermission.TRADE,
  expiry: deadlineSeconds(86_400),
});
```

This grant covers every account in the family. See [Signer Reference](/sdk/signer-reference) for implied permissions and authorization epochs.

Builder approvals are root-wide. Positive builder fees credit the builder's ordinary root free balance, registering the root if needed. There is no separate claimable-fee ledger or claim method; builders use ordinary root withdrawals.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.