1

After call connection.getStakeActivation(newAccountPubkey); I receive something like this

{ active: 0, inactive: 27717120, state: 'activating' }

How convert active and inactive to delegated epoch and deactivated epoch?

1 Answer 1

1

If you're using getStakeActivation, you'll have to search through the epochs until you get activating and deactivating as the state. The active and inactive numbers tell you how many lamports were active or inactive stake.

As an easier option, you can get all of the transactions involving the stake account with getSignaturesForAddress https://docs.solana.com/developing/clients/jsonrpc-api#getsignaturesforaddress, and then look for the DelegateStake and DeactivateStake instructions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.