• Fetches the list of stake accounts associated with a given wallet address.

    Parameters

    • walletAddress: string

      The wallet address to query for stake accounts.

    • rpcUrl: string

      The Solana RPC endpoint URL.

    Returns Promise<{
        account: ParsedStakeAccount;
        publicKey: string;
    }[]>

    • A promise that resolves with an array of stake accounts.

    Example

    const run = async () => {
    const endpoint = 'https://api.mainnet-beta.solana.com';
    const walletAddress = '<your-authority-keypair>';
    const result = await getStakeAccounts(walletAddress, endpoint);
    console.log(inspect(result, { depth: null, colors: true }));
    };

    run();

Generated using TypeDoc