• Fetch and decode a Solana stake account.

    Parameters

    Returns Promise<DecodedAccountResult<DecodedStakeAccount> | null>

    Decoded stake account, or null if not found.

    const stake = await fetchStakeAccount(transport, stakeAccountPubkey);
    if (stake?.decoded.type === 'delegated') {
    console.log(`Delegated to: ${stake.decoded.stake!.voterPubkey}`);
    console.log(`Stake amount: ${stake.decoded.stake!.stake} lamports`);
    }

    1.1.0