• Generates a Program Derived Address for a staker in a specific pool based on the pool's public key and the staker's wallet public key.

    Parameters

    • pool: PublicKey

      The pool's public key.

    • wallet: PublicKey

      The staker's wallet public key.

    • Optional programId: PublicKey

      The program ID for the staking pool program. Default is PROGRAM_ID.

    Returns [PublicKey, number]

    The generated Program Derived Address.

    Example

    const poolPublicKey = new web3.PublicKey("..."); // Replace with actual pool public key
    const walletPublicKey = new web3.PublicKey("..."); // Replace with actual wallet public key
    const stakerPda = getStakerPda(poolPublicKey, walletPublicKey);

Generated using TypeDoc