@avalanche-sdk/client
Version:
A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa
38 lines • 1.2 kB
TypeScript
import { Utxo } from "@avalabs/avalanchejs";
import { AvalancheWalletCoreClient } from "../clients/createAvalancheWalletCoreClient.js";
export type GetUtxosForAddressParams = {
address: string;
chainAlias: "P" | "X" | "C";
sourceChain?: string;
};
/**
* Get the UTXOs for an address.
*
* @param client - The client to use. {@link AvalancheWalletCoreClient}
* @param params - The parameters. {@link GetUtxosForAddressParams}
* @returns The array of UTXOs. May contain duplicates. {@link Utxo[]}
*
* @example
* ```ts
* import { createAvalancheWalletCoreClient } from "@avalanche-sdk/client";
* import { avalanche } from "@avalanche-sdk/client/chains";
*
* const client = createAvalancheWalletCoreClient({
* chain: avalanche,
* transport: {
* type: "http",
* },
* });
*
* const utxos = await getUtxosForAddress(client, {
* address: "0x1234567890123456789012345678901234567890",
* chainAlias: "P",
* });
* ```
*/
export declare function getUtxosForAddress(client: AvalancheWalletCoreClient, params: {
address: string;
chainAlias: "P" | "X" | "C";
sourceChain?: string;
}): Promise<Utxo[]>;
//# sourceMappingURL=getUtxosForAddress.d.ts.map