Skip to main content
  1. Initialize the API client object via the StakingApiClient constructor.
  1. Retrieve the staking accounts from your P2P.ORG profile with getStakingAccounts().
  1. Create a new stake transaction with stake(). The result will contain a base64-encoded unsigned transaction which you can convert to a Solana Transaction object.
  1. Sign the transaction using the dedicated wallet software. P2P.ORG Staking SDK provides a simple method signWithKeypairs(), though it is intended for testing and development only. In production, replace it with the software or hardware wallet integration or a dedicated signing service integration.
  1. Verify the signed transaction with verifyTransaction(). This ensures that the transaction was not modified by external software before signing.
  1. Broadcast the transaction to the Solana network with sendTransaction().