Hierarchy

  • StackingClient

Other

address: string
network: StacksNetwork
  • readonly can-stack-stx

    Check if account can lock stx

    Parameters

    Returns Promise<StackingEligibility>

    that resolves to a StackingEligibility object if the operation succeeds

  • delegate-stack-stx

    As a delegator, generate and broadcast transactions to stack for multiple delegatees. This will lock up tokens owned by the delegatees.

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • delegate-stx

    As a delegatee, generate and broadcast a transaction to create a delegation relationship

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • Get account balance

    Returns Promise<bigint>

    resolves to a bigint if the operation succeeds

  • Get account balance of locked tokens

    Returns Promise<bigint>

    resolves to a bigint if the operation succeeds

  • Get extended account balances

    Returns Promise<AccountExtendedBalances>

    resolves to an AccountExtendedBalances response if the operation succeeds

  • Returns Promise<any>

  • Get stacks node info

    Returns Promise<CoreInfo>

    that resolves to a CoreInfo response if the operation succeeds

  • Get reward cycle duration in seconds

    Returns Promise<number>

    resolves to a number if the operation succeeds

  • Parameters

    • __namedParameters: {
          amountMicroStx: IntegerType;
          contract: string;
          delegateTo: string;
          poxAddress?: string;
          untilBurnBlockHeight?: number;
      }
      • amountMicroStx: IntegerType
      • contract: string
      • delegateTo: string
      • Optional poxAddress?: string
      • Optional untilBurnBlockHeight?: number

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          contract: string;
          extendCount: number;
          poxAddress: string;
          signerKey?: string;
          stacker: string;
      }
      • contract: string
      • extendCount: number
      • poxAddress: string
      • Optional signerKey?: string
      • stacker: string

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          contract: string;
          increaseBy: IntegerType;
          poxAddress: string;
          stacker: string;
      }
      • contract: string
      • increaseBy: IntegerType
      • poxAddress: string
      • stacker: string

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          amountMicroStx: IntegerType;
          burnBlockHeight: number;
          contract: string;
          cycles: number;
          poxAddress: string;
          signerKey?: string;
          stacker: string;
      }
      • amountMicroStx: IntegerType
      • burnBlockHeight: number
      • contract: string
      • cycles: number
      • poxAddress: string
      • Optional signerKey?: string
      • stacker: string

    Returns ContractCallOptions

  • Check delegation status

    Returns Promise<DelegationInfo>

    that resolves to a DelegationInfo object if the operation succeeds

  • Get stacks node pox info

    Returns Promise<PoxInfo>

    that resolves to a PoxInfo response if the operation succeeds

  • Get information on current PoX operation

    Periods:

    • Period 1: This is before the 2.1 fork.
    • Period 2: This is after the 2.1 fork, but before cycle (N+1).
    • Period 3: This is after cycle (N+1) has begun. Original PoX contract state will no longer have any impact on reward sets, account lock status, etc.

    Parameters

    Returns Promise<PoxOperationInfo>

    that resolves to PoX operation info

  • Get burnchain rewards holders for the set address

    Parameters

    Returns Promise<RewardsError | BurnchainRewardSlotHolderListResponse>

    that resolves to RewardHoldersResponse or RewardsError

  • Get PoX address from reward set by index

    Parameters

    Returns Promise<undefined | RewardSetInfo>

    that resolves to RewardSetInfo if the entry exists

  • Get burnchain rewards for the set address

    Parameters

    Returns Promise<RewardsError | BurnchainRewardListResponse>

    that resolves to RewardsResponse or RewardsError

  • Get the total burnchain rewards total for the set address

    Returns Promise<RewardsError | BurnchainRewardsTotal>

    that resolves to TotalRewardsResponse or RewardsError

  • Get number of seconds until next reward cycle

    Returns Promise<number>

    resolves to a number if the operation succeeds

    See also:

  • Get number of seconds until the end of the stacking deadline. This is the estimated time stackers have to submit their stacking transactions to be included in the upcoming reward cycle.

    Returns Promise<number>

    resolves to a number of seconds if the operation succeeds. ⚠️ Attention: The returned number of seconds can be negative if the deadline has passed and the prepare phase has started.

    See also:

  • Parameters

    • __namedParameters: {
          contract: string;
          poxAddress: string;
          rewardCycle: number;
      }
      • contract: string
      • poxAddress: string
      • rewardCycle: number

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          contract: string;
          poxAddress: string;
          rewardCycle: number;
      }
      • contract: string
      • poxAddress: string
      • rewardCycle: number

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          contract: string;
          poxAddress: string;
          rewardCycle: number;
          rewardCycleIndex: number;
      }
      • contract: string
      • poxAddress: string
      • rewardCycle: number
      • rewardCycleIndex: number

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          contract: string;
          extendCycles: number;
          poxAddress: string;
          signerKey?: string;
      }
      • contract: string
      • extendCycles: number
      • poxAddress: string
      • Optional signerKey?: string

    Returns ContractCallOptions

  • Parameters

    • __namedParameters: {
          amountMicroStx: IntegerType;
          burnBlockHeight: number;
          contract: string;
          cycles: number;
          poxAddress: string;
          signerKey?: string;
      }
      • amountMicroStx: IntegerType
      • burnBlockHeight: number
      • contract: string
      • cycles: number
      • poxAddress: string
      • Optional signerKey?: string

    Returns ContractCallOptions

  • Parameters

    Returns Promise<string>

    that resolves to the contract id (address and name) to use for stacking

  • Check stacking status

    Returns Promise<StackerInfo>

    that resolves to a StackerInfo object if the operation succeeds

  • Get stacks node target block time

    Returns Promise<number>

    resolves to a number if the operation succeeds

  • Check if account has minimum require amount of Stacks for stacking

    Returns Promise<boolean>

    that resolves to a bool if the operation succeeds

  • Parses a contract identifier and ensures it is formatted correctly

    Parameters

    • contract: string

    Returns string[]

    a contract address and name

  • As a delegatee, generate and broadcast a transaction to terminate the delegation relationship

    Parameters

    • privateKey: string

      the private key to be used for the revoke call

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • As a delegatee, generate and broadcast a transaction to terminate the delegation relationship

    Parameters

    • txOptions: BaseTxOptions

      the private key, fee, and nonce to be used for the revoke call

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • stack-stx

    Generate and broadcast a stacking transaction to lock STX

    Parameters

    • options: LockStxOptions & BaseTxOptions

      a required lock STX options object

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • As a delegator, generate and broadcast a transaction to commit partially committed delegatee tokens

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

PoX-2

  • delegate-stack-extend

    As a delegator, generate and broadcast transactions to extend stack for multiple delegatees.

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • As a delegator, generate and broadcast transactions to stack increase for multiple delegatees.

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • As a delegator, generate and broadcast a transaction to commit partially committed delegatee tokens

    Commit partially stacked STX and allocate a new PoX reward address slot. This allows a stacker/delegate to lock fewer STX than the minimal threshold in multiple transactions, so long as: 1. The pox-addr is the same. 2. This "commit" transaction is called before the PoX anchor block. This ensures that each entry in the reward set returned to the stacks-node is greater than the threshold, but does not require it be all locked up within a single transaction

    stack-aggregation-commit-indexed returns (ok uint) on success, where the given uint is the reward address's index in the list of reward addresses allocated in this reward cycle. This index can then be passed to stack-aggregation-increase to later increment the STX this PoX address represents, in amounts less than the stacking minimum.

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • As a delegator, generate and broadcast a transaction to increase partial commitment committed delegatee tokens

    Parameters

    Returns Promise<TxBroadcastResult>

    that resolves to a broadcasted txid if the operation succeeds

  • stack-extend

    Generate and broadcast a stacking transaction to extend locked STX (pox-2.stack-extend)

    Parameters

    Returns Promise<TxBroadcastResult>

    a broadcasted txid if the operation succeeds

  • Generate and broadcast a stacking transaction to increase locked STX (pox-2.stack-increase)

    Parameters

    Returns Promise<TxBroadcastResult>

    a broadcasted txid if the operation succeeds

Generated using TypeDoc