Hierarchy

  • StackingClient

Constructors

  • Parameters

    • address: string
    • network: StacksNetwork

    Returns StackingClient

Properties

address: string
network: StacksNetwork

Methods

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

    Returns

    that resolves to a broadcasted txid if the operation succeeds

    Parameters

    Returns Promise<TxBroadcastResult>

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

    Returns

    that resolves to a broadcasted txid if the operation succeeds

    Parameters

    Returns Promise<TxBroadcastResult>

  • Get account balance

    Returns

    promise resolves to a bigint if the operation succeeds

    Returns Promise<bigint>

  • Returns Promise<any>

  • Get stacks node info

    Returns

    that resolves to a CoreInfo response if the operation succeeds

    Returns Promise<CoreInfo>

  • Get reward cycle duration in seconds

    Returns

    that resolves to a number if the operation succeeds

    Returns Promise<number>

  • 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: {
          amountMicroStx: IntegerType;
          burnBlockHeight: number;
          contract: string;
          cycles: number;
          nonce?: IntegerType;
          poxAddress: string;
          stacker: string;
      }
      • amountMicroStx: IntegerType
      • burnBlockHeight: number
      • contract: string
      • cycles: number
      • Optional nonce?: IntegerType
      • poxAddress: string
      • stacker: string

    Returns ContractCallOptions

  • Get stacks node pox info

    Returns

    that resolves to a PoxInfo response if the operation succeeds

    Returns Promise<PoxInfo>

  • Parameters

    • contract: string

    Returns ContractCallOptions

  • Get burnchain rewards holders for the set address

    Returns

    that resolves to RewardHoldersResponse or RewardsError

    Parameters

    Returns Promise<RewardsError | BurnchainRewardSlotHolderListResponse>

  • Get burnchain rewards for the set address

    Returns

    that resolves to RewardsResponse or RewardsError

    Parameters

    Returns Promise<RewardsError | BurnchainRewardListResponse>

  • Get the total burnchain rewards total for the set address

    Returns

    that resolves to TotalRewardsResponse or RewardsError

    Returns Promise<RewardsError | BurnchainRewardsTotal>

  • Get number of seconds until next reward cycle

    Returns

    that resolves to a number if the operation succeeds

    Returns Promise<number>

  • Parameters

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

    Returns ContractCallOptions

  • Parameters

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

    Returns ContractCallOptions

  • Check stacking status

    Returns

    that resolves to a StackerInfo object if the operation succeeds

    Returns Promise<StackerInfo>

  • Get stacks node target block time

    Returns

    that resolves to a number if the operation succeeds

    Returns Promise<number>

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

    Returns

    that resolves to a bool if the operation succeeds

    Returns Promise<boolean>

  • Check if stacking is enabled for next reward cycle

    Returns

    that resolves to a bool if the operation succeeds

    Returns Promise<boolean>

  • Adjust microstacks amount for locking after taking into account transaction fees

    Returns

    that resolves to a transaction object if the operation succeeds

    Parameters

    • __namedParameters: {
          amountMicroStx: IntegerType;
          tx: StacksTransaction;
      }
      • amountMicroStx: IntegerType
      • tx: StacksTransaction

    Returns StacksTransaction

  • Parses a contract identifier and ensures it is formatted correctly

    Returns

    a contract address and name

    Parameters

    • contract: string

    Returns string[]

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

    Returns

    that resolves to a broadcasted txid if the operation succeeds

    Parameters

    • privateKey: string

      the private key to be used for the revoke call

    Returns Promise<TxBroadcastResult>

  • Generate and broadcast a stacking transaction to lock STX

    Returns

    that resolves to a broadcasted txid if the operation succeeds

    Parameters

    Returns Promise<TxBroadcastResult>

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

    Returns

    that resolves to a broadcasted txid if the operation succeeds

    Parameters

    Returns Promise<TxBroadcastResult>

Generated using TypeDoc