stacks-fireblocks-sdk
    Preparing search index...

    Class StacksSDK

    Index

    Methods

    • Allows a stacking pool to lock delegated STX on behalf of the delegator.

      Parameters

      • poolsAddress: string

        The address of the stacking pool.

      • poolContractName: string

        The contract name of the stacking pool.

      Returns Promise<CreateTransactionResponse>

      A promise that resolves to a {CreateTransactionResponse}.

      If the address, public key, or vault ID are not set, or if the process fails.

    • Check eligibility for solo stacking.

      Parameters

      • pox: any
      • amount: number

      Returns Promise<{ eligible: boolean; reason?: string }>

      A promise that resolves to an object indicating eligibility and reason if not eligible.

    • Creates a fungible token transaction to transfer funds to a recipient address.

      Parameters

      • recipientAddress: string

        The address of the recipient.

      • amount: number

        The amount to transfer in native coin.

      • token: TokenType

        The type of fungible token to transfer.

      • Optionalnote: string

        Optional note to be attached to the transaction in raw signing.

      Returns Promise<CreateTransactionResponse>

      A promise that resolves to a {CreateTransactionResponse}.

      If the address, public key, or vault ID are not set, or if the transaction creation fails.

    • Creates a native coin transaction to transfer funds to a recipient address.

      Parameters

      • recipientAddress: string

        The address of the recipient.

      • amount: number

        The amount to transfer in native coin.

      • grossTransaction: boolean = false

        Optional flag indicating if the transaction is gross, if so fee will be deducted from recipient (default is false).

      • Optionalnote: string

        Optional note to be attached to the transaction in raw signing.

      Returns Promise<CreateTransactionResponse>

      A promise that resolves to a {CreateTransactionResponse}.

      If the address, public key, or vault ID are not set, or if the transaction creation fails.

    • Creates a signerSig65Hex from the provided parameters.

      Parameters

      • rewardCycleId: number
      • lockPeriod: number
      • maxAmountUstx: bigint
      • OptionalauthId: bigint

      Returns Promise<string>

      the signerSig65Hex.

      If vault ID is not set, or if the process fails.

    • Delegate STX to a stacking pool.

      Parameters

      • poolsAddress: string

        The address of the stacking pool.

      • poolContractName: string

        The contract name of the stacking pool.

      • amount: number

        The amount of STX to stack.

      • lockPeriod: number

        The lock period in cycles.

      Returns Promise<CreateTransactionResponse>

      A promise that resolves to a {CreateTransactionResponse}.

      If the address, public key, or vault ID are not set, or if the delegate process fails.

    • Retrieves the Stacks account address associated with the Fireblocks vault account.

      Returns string

      The Stacks account address or empty string if not set.

    • Retrieves the native coin balance for the current address.

      Returns Promise<GetNativeBalanceResponse>

      A promise that resolves to a {GetNativeBalanceResponse} containing the native balance information.

      If the address is not set or if the balance retrieval fails.

    • Retrieves the BTC rewards address associated with the Fireblocks vault account (derived from the same public key).

      Returns string

      The BTC rewards address or empty string if not set.

    • Retrieves the fungible tokens balances for the current address.

      Returns Promise<GetFtBalancesResponse>

      A promise that resolves to a {GetFtBalancesResponse} containing the fungible tokens balances.

      If the address is not set or if the balance retrieval fails.

    • Retrieves the Stacks account public key associated with the Fireblocks vault account.

      Returns string

      The Stacks account public key or empty string if not set.

    • Retrieves the transaction history for the current address.

      Parameters

      • getCachedTransactions: boolean = true

        Whether to return cached transactions (default is true).

      • limit: number = pagination_defaults.limit

        The maximum number of transactions to return (default is 50).

      • offset: number = pagination_defaults.page

        The offset for pagination (default is 0).

      Returns Promise<Transaction[]>

      A promise that resolves to an array of {Transaction} containing transaction history.

      If the address is not set or if the transaction history retrieval fails.

    • Solo stacks a specified amount of STX for a given lock period.

      Parameters

      • amount: number

        The amount of STX to stack.

      • lockPeriod: number

        The number of cycles to lock the STX.

      • OptionalauthId: bigint

        Optional authorization ID for the transaction.

      Returns Promise<CreateTransactionResponse>

      A response indicating success or failure of the transaction.

    • Creates an instance of StacksSDK.

      Parameters

      • vaultAccountId: string | number

        The Fireblocks vault account ID.

      • OptionalfireblocksConfig: FireblocksConfig

        Optional Fireblocks configuration.

      Returns Promise<StacksSDK>

      A Promise that resolves to an instance of StacksSDK.

      Will throw an error if the instance creation fails.