Arcium LogoArcium TS SDK Docs

@arcium-hq/staking

TypeScript SDK for the Arcium staking program.

Interfaces

InterfaceDescription
BuildClaimDelegatedStakeRewardsIxParamsParameters for claim_delegated_stake_rewards.
BuildClaimPrimaryStakeRewardsIxParamsParameters for claim_primary_stake_rewards.
BuildCloseDelegatedStakeIxParamsParameters for close_delegated_stake.
BuildDeactivatePrimaryStakeIxParamsParameters for deactivate_primary_stake.
BuildDelegateStakeIxParamsParameters for delegate_stake.
BuildEpochPrimaryStakeIxParamsParameters for primary stake instructions that take a lockup epoch count.
BuildFinalizeEpochRewardsIxParamsParameters for finalize_epoch_rewards.
BuildFinalizeRecoveryEpochRewardsIxParamsParameters for finalize_recovery_epoch_rewards.
BuildInitClusterStakeStateIxParamsParameters for init_cluster_stake_state.
BuildInitDelegatedStakeAccIxParamsParameters for init_delegated_stake_acc.
BuildInitMxeRecoveryStakeStateIxParamsParameters for init_mxe_recovery_stake_state.
BuildInitPoolIxParamsParameters for init, which creates the staking pool account.
BuildInitPrimaryStakeIxParamsParameters for init_primary_stake, which creates and funds a primary stake account.
BuildInitStakeMasterAccIxParamsParameters for init_stake_master_acc.
BuildMergeDelegatedStakeAccountIxParamsParameters for merge_delegated_stake_account.
BuildModifyPrimaryStakeIxParamsParameters for modify_primary_stake, which changes primary self-stake.
BuildPrimaryStakeIxParamsParameters shared by single-signer primary stake instructions.
BuildSetAuthorityIxParamsParameters shared by delegated stake authority transfer instructions.
BuildSetDelegationAuthorityIxParamsParameters for set_delegation_authority.
BuildSetWithdrawalAuthorityIxParamsParameters for set_withdrawal_authority.
BuildSplitDelegatedStakeAccountIxParamsParameters for split_delegated_stake_account.
BuildUndelegateStakeIxParamsParameters for undelegate_stake.
GenerateStakeOffsetOptionsOptions for delegated stake offset generation.
UserStakePositionDelegated stake position owned or controlled by an authority.

Type Aliases

Type AliasDescription
ArciumStakingProgram IDL in camelCase format in order to be used in JS/TS.
ClusterStakeStateAccountDecoded cluster stake state account.
DelegatedStakeAccountDecoded delegated staking account.
DelegationMasterAccountDecoded delegation master account.
EpochStaking epoch tuple wrapper.
IntegerInputInteger input accepted by staking instruction builders.
MTProofMerkle proof type used by reward claim instructions.
MxeRecoveryStakeStateAccountDecoded MXE recovery stake state account.
PrimaryStakeAccountDecoded primary staking account.
RewardBatchReward claim batch type.
RewardClaimReward claim leaf type.
StakeBindingPrimary stake binding type.
StakingPoolAccountDecoded staking pool account.
StakingProgramAnchor program client for the Arcium staking program.

Variables

VariableDescription
ARCIUM_ADDRArcium program id, from the staking IDL's cross-program clock PDA metadata.
ARX_TOKEN_MINT_ADDRARX token mint, from the staking IDL's token instruction accounts.
ASSOCIATED_TOKEN_PROGRAM_ADDRAssociated token program id, from the staking IDL.
STAKING_ADDRStaking program id, from the bundled IDL.
STAKING_IDLAnchor-generated staking IDL JSON.
TOKEN_PROGRAM_ADDRSPL token program id, from the staking IDL.

Functions

FunctionDescription
assertValidStakeOffsetThrows if a delegated stake offset is reserved or outside the on-chain u128 range.
buildActivatePrimaryStakeIxBuilds a primary stake activation instruction.
buildClaimDelegatedStakeRewardsIxBuilds a delegated stake rewards claim instruction.
buildClaimPrimaryStakeRewardsIxBuilds a primary stake rewards claim instruction.
buildCloseDelegatedStakeIxBuilds a delegated stake close instruction.
buildDeactivatePrimaryStakeIxBuilds a primary stake deactivation instruction.
buildDelegateStakeIxBuilds a delegated stake activation/delegation instruction.
buildExtendPrimaryLockupIxBuilds a primary stake lockup extension instruction.
buildFinalizeEpochRewardsIxBuilds a cluster epoch reward finalization instruction.
buildFinalizeRecoveryEpochRewardsIxBuilds an MXE recovery epoch reward finalization instruction.
buildInitClusterStakeStateIxBuilds a cluster stake state initialization instruction.
buildInitDelegatedStakeAccIxBuilds a delegated stake account initialization instruction.
buildInitMxeRecoveryStakeStateIxBuilds an MXE recovery stake state initialization instruction.
buildInitPoolIxBuilds the staking pool initialization instruction.
buildInitPrimaryStakeIxBuilds a primary stake account initialization instruction.
buildInitStakeMasterAccIxBuilds a delegation master account initialization instruction.
buildMergeDelegatedStakeAccountIxBuilds a delegated stake account merge instruction.
buildModifyPrimaryStakeIxBuilds a primary stake modification instruction.
buildSetDelegationAuthorityIxBuilds a delegated stake delegation-authority transfer instruction.
buildSetWithdrawalAuthorityIxBuilds a delegated stake withdrawal-authority transfer instruction.
buildSplitDelegatedStakeAccountIxBuilds a delegated stake account split instruction.
buildUndelegateStakeIxBuilds a delegated stake undelegation instruction.
generateStakeOffsetGenerates an unused delegated stake offset by probing the derived PDA.
getArciumClockAccAddressDerives Arcium's clock account PDA (a cross-program PDA under the Arcium program).
getArxNodeAccAddressDerives Arcium's ARX node account PDA.
getArxTokenAtaAddressDerives an owner's associated token account for the ARX token mint.
getClusterAccAddressDerives Arcium's cluster account PDA.
getClusterStakeStateAccAddressDerives a cluster stake state PDA.
getClusterStakeStateAccInfoFetches a cluster stake state account by cluster offset.
getClusterStakeStateAccInfosLists all cluster stake state accounts.
getDelegatedStakeAccAddressDerives a delegated stake account PDA from its global stake offset.
getDelegatedStakeAccInfoFetches a delegated stake account by offset.
getDelegatedStakeAccInfosLists all delegated stake accounts.
getDelegationMasterAccInfoFetches a delegation master account by authority.
getDelegationMasterAccInfosLists all delegation master accounts.
getFeePoolAccAddressDerives Arcium's fee pool account PDA.
getMxeAccAddressDerives Arcium's MXE account PDA.
getMxeRecoveryStakeStateAccAddressDerives an MXE recovery stake state PDA.
getMxeRecoveryStakeStateAccInfoFetches an MXE recovery stake state account by MXE program id.
getMxeRecoveryStakeStateAccInfosLists all MXE recovery stake state accounts.
getPrimaryStakeAccAddressDerives a primary stake account PDA for an owner.
getPrimaryStakeAccInfoFetches a primary stake account by owner.
getPrimaryStakeAccInfosLists all primary stake accounts.
getRecoveryClusterAccAddressDerives Arcium's recovery cluster account PDA.
getRecoveryPeerAccAddressDerives Arcium's recovery peer account PDA.
getStakeMasterAccAddressDerives a delegation master account PDA for an authority.
getStakingPoolAccAddressDerives the staking pool account PDA.
getStakingPoolAccInfoFetches the staking pool account.
getStakingProgramConstructs an Anchor program client for the Arcium staking program.
getStakingProgramIdReturns the staking program id from the bundled IDL.
getUserStakePositionsReturns delegated stake positions discoverable from an authority's master account.

On this page