The Solana network endpoint to connect to.
The secret string of the authority's keypair.
The public key of the stake account.
The amount in SOL to be staked.
const endpoint = 'https://api.mainnet-beta.solana.com';
const authoritySecretString = '[1,2,3,...]'; // Replace with actual secret key array
const stakeAccountAddress = 'YourStakeAccountPublicKeyHere';
const amount = 1; // Amount in SOL to be staked
createStakeAccount(endpoint, authoritySecretString, stakeAccountAddress, amount)
.then(signature => console.log('Transaction Signature:', signature))
.catch(error => console.error('Error:', error));
Generated using TypeDoc
Creates a stake account on the Solana blockchain.