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

# Wallets

> WalletsAPI — Register and manage wallets

## WalletsAPI

Access via `client.wallets`.

### register

Register a wallet (idempotent — re-registering returns the existing wallet).

```typescript theme={null}
async register(request: RegisterWalletRequest): Promise<WalletResponse>
```

```typescript theme={null}
interface RegisterWalletRequest {
  /** Wallet address on the blockchain */
  walletAddress: string;
  /** Blockchain network */
  blockchain: 'solana' | 'polygon' | 'ethereum' | 'base';
  /** External user or account ID for multi-wallet management */
  userId?: string;
  /** Organization-specific metadata */
  orgMetadata?: Record<string, unknown>;
}
```

### list

List wallets for the organization.

```typescript theme={null}
async list(query?: WalletListQuery): Promise<WalletListResponse>
```

```typescript theme={null}
interface WalletListQuery {
  /** Filter by external user ID */
  userId?: string;
  /** Filter by blockchain */
  blockchain?: 'solana' | 'polygon' | 'ethereum' | 'base';
  /** Page number (default: 1) */
  page?: number;
  /** Items per page (default: 50, max: 100) */
  limit?: number;
}

interface WalletListResponse {
  wallets: WalletResponse[];
  total: number;
  page: number;
  limit: number;
}
```

### get

Get a wallet by ID.

```typescript theme={null}
async get(walletId: number): Promise<WalletResponse>
```

### update

Update wallet metadata.

```typescript theme={null}
async update(walletId: number, request: UpdateWalletRequest): Promise<WalletResponse>
```

```typescript theme={null}
interface UpdateWalletRequest {
  /** External user ID */
  userId?: string;
  /** Organization-specific metadata */
  orgMetadata?: Record<string, unknown>;
}
```

### WalletResponse Type

```typescript theme={null}
interface WalletResponse {
  /** Wallet identifier */
  walletId: number;
  /** Wallet address on the blockchain */
  walletAddress: string;
  /** Blockchain network */
  blockchain: 'solana' | 'polygon' | 'ethereum' | 'base';
  /** External user ID */
  userId?: string;
  /** Organization-specific metadata */
  orgMetadata?: Record<string, unknown>;
  /** Creation timestamp (ISO 8601) */
  createdAt: string;
}
```
