Skip to main content

Staking Service

The Staking service provides helpers to build signed staking-related actions.

presaleStaking

Creates and signs a presaleStaking action.

  • Parameters:
    • isStaking (boolean): Whether the user is staking or unstaking.
    • nonce (bigint): The stake nonce.
    • originExecutor (HexString, optional): Optional executor address included in the signed message (defaults to zero address).
    • evvmSignedAction (SignedAction<IPayData>, optional): An optional EVVM pay signed action.
  • Returns: Promise<SignedAction<IPresaleStakingData>>

publicStaking

Creates and signs a publicStaking action.

  • Parameters:
    • isStaking (boolean): Whether the user is staking or unstaking.
    • amountOfStaking (bigint): The amount to stake.
    • nonce (bigint): The stake nonce.
    • originExecutor (HexString, optional): Optional executor address included in the signed message (defaults to zero address).
    • evvmSignedAction (SignedAction<IPayData>, optional): An optional EVVM pay signed action.
  • Returns: Promise<SignedAction<IPublicStakingData>>

goldenStaking

Creates a goldenStaking action, typically used by a golden fisher. This action packages the staking amount and an optional EVVM signature. The on-chain verification is expected to use the EVVM signature provided in evvmSignedAction.

  • Parameters:
    • isStaking (boolean): Whether the action is for staking or unstaking.
    • amountOfStaking (bigint): The amount to stake.
    • evvmSignedAction (SignedAction<IPayData>, optional): An optional EVVM pay signed action containing the user's signature.
  • Returns: Promise<SignedAction<IGoldenStakingData>>