- Initialize the API client object via the
StakingApiClientconstructor.
- Retrieve the staking accounts from your P2P.ORG profile with
getStakingAccounts().
- Create a new stake transaction with
stake(). The result will contain a base64-encoded unsigned transaction which you can convert to a SolanaTransactionobject.
- 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.
- Verify the signed transaction with
verifyTransaction(). This ensures that the transaction was not modified by external software before signing.
- Broadcast the transaction to the Solana network with
sendTransaction().