stacks-fireblocks-sdk
    Preparing search index...
    Index

    Constructors

    Methods

    • Allows the delegatee to call pox contract to lock delegated STX on the delegater's behalf.

      Parameters

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • poolAddress: string
      • poolContractName: string

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      • The unsigned delegate STX transaction.
    • Broadcasts a signed transaction to the Stacks network.

      Parameters

      • signedTransaction: StacksTransactionWire

        The signed Stacks transaction to broadcast.

      Returns Promise<any>

      • The result of the broadcast operation.
    • Builds an unsigned contract call transaction.

      Parameters

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • contractAddress: string

        The address of the contract.

      • contractName: string

        The name of the contract.

      • functionName: string

        The name of the function to call.

      • functionArgs: ClarityValue[]

        The arguments to pass to the function.

      Returns Promise<StacksTransactionWire>

      • The unsigned Stacks contract call transaction.
    • Builds an unsigned transaction for STX transfer or fungible token transfer.

      Parameters

      • sender: string

        The sender's Stacks address.

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • recipient: string

        The recipient's Stacks address.

      • amount: bigint

        The amount to transfer (in STX or token units).

      • type: TransactionType = TransactionType.STX

        The type of transaction (STX or FungibleToken).

      • Optionaltoken: TokenType

        The type of fungible token (required if type is FungibleToken).

      • OptionalcustomTokenContractAddress: string
      • OptionalcustomTokenContractName: string
      • OptionalcustomTokenAssetName: string

      Returns Promise<StacksTransactionWire>

      • The unsigned Stacks transaction.
    • Checks the delegation status of a given address.

      Parameters

      • address: string

      Returns Promise<any>

    • Delegates STX to a specified address for a given lock period.

      Parameters

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • delegateTo: string

        The address to delegate STX to.

      • amount: bigint

        The amount of STX to delegate (in microSTX).

      • lockPeriod: number

        Number of cycles to lock the delegation for.

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      • The unsigned delegate STX transaction.
    • Estimates the transaction fee for a contract call.

      Parameters

      • contractAddress: string

        The address of the contract.

      • contractName: string

        The name of the contract.

      • functionName: string

        The name of the function to call.

      • functionArgs: ClarityValue[]

        The arguments to pass to the function.

      Returns Promise<number>

      • The estimated transaction fee in microSTX (ustx).
    • Estimates the transaction fee for STX transfer.

      Parameters

      • recipientAddress: string

        The recipient's Stacks address.

      • amountUstx: bigint

        The amount to transfer in microSTX (ustx).

      Returns Promise<number>

      • The estimated transaction fee in microSTX (ustx).
    • Extends the stacking period of an existing solo stacking position.

      Parameters

      • senderPublicKey: string

        Public key of the transaction sender

      • signerKey: string

        Signer public key (33-byte compressed hex)

      • btcRewardAddress: string
      • extendCycles: number

        cycles to extend the stacking period by

      • maxAmountUstx: bigint

        Maximum total amount of microSTX to be stacked

      • signerSig65Hex: string

        65-byte signer signature (hex)

      • authId: bigint

        Random integer for replay protection (must match signature)

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      the unsigned stack-extend transaction.

    • Fetches the decimals for a given fungible token contract.

      Parameters

      • contractAddress: string

        The address of the fungible token contract.

      • contractName: string

        The name of the fungible token contract.

      Returns Promise<number>

      • The number of decimals for the fungible token.
    • Fetches PoX contract information from the Stacks network.

      Returns Promise<any>

      • The PoX contract information.
    • Formats a compressed secp256k1 public key hex into a Stacks address.

      Parameters

      • pubKey: string

        The compressed secp256k1 public key in hex format.

      Returns string

      • The corresponding Stacks address.
    • Retrieves the fungible token balances for a given address from makeBalanceCalls response.

      Parameters

      • address: string

        The Stacks address to query balances for.

      Returns Promise<any>

      • The fungible token balances.
    • Retrieves the native STX balance for a given address from makeBalanceCalls response.

      Parameters

      • address: string

        The Stacks address to query balance for.

      Returns Promise<number>

      • The native STX balance.
    • Retrieves the transaction history for a given address. Automatically paginates through multiple Stacks API requests when limit > stacks_api_page_size.

      Parameters

      • address: string

        The Stacks address to retrieve the transaction history for.

      • limit: number = pagination_defaults.limit

        The maximum number of transactions to retrieve.

      • offset: number = pagination_defaults.page

        The starting offset for pagination.

      Returns Promise<Transaction[]>

      An array of transactions associated with the address.

    • Retrieves the status of a transaction from the Stacks network.

      Parameters

      • txid: string

        The transaction ID to check the status for.

      Returns Promise<any>

      • Json object containing transaction details.
    • Increases the amount of STX in an existing solo stacking position.

      Parameters

      • senderPublicKey: string

        Public key of the transaction sender

      • signerKey: string

        Signer public key (33-byte compressed hex)

      • increaseBy: bigint

        Amount of microSTX to add to existing stack

      • maxAmountUstx: bigint

        Maximum total amount of microSTX to be stacked after increase

      • signerSig65Hex: string

        65-byte signer signature (hex)

      • authId: bigint

        Random integer for replay protection (must match signature)

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      the unsigned stack-increase transaction.

    • Makes a call to the Stacks balances endpoint for a given address.

      Parameters

      • address: string

        The Stacks address to query balances for.

      Returns Promise<any>

      • The response from the balances endpoint.
    • Revokes STX delegation.

      Parameters

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      • The unsigned revoke delegation transaction.
    • Serializes a contract call transaction.

      Parameters

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • contractAddress: string

        The address of the contract.

      • contractName: string

        The name of the contract.

      • functionName: string

        The name of the function to call.

      • functionArgs: ClarityValue[]

        The arguments to pass to the function.

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      • The serialized unsigned Stacks contract call transaction and pre-signature hash.
    • Serializes a transaction for STX transfer or fungible token transfer.

      Parameters

      • sender: string

        The sender's Stacks address.

      • senderPublicKey: string

        The sender's compressed secp256k1 public key in hex format.

      • recipient: string

        The recipient's Stacks address.

      • amount: bigint

        The amount to transfer.

      • type: TransactionType = TransactionType.STX

        The type of transaction (STX or FungibleToken).

      • Optionaltoken: TokenType

        The type of fungible token (required if type is FungibleToken).

      • OptionalcustomTokenContractAddress: string
      • OptionalcustomTokenContractName: string
      • OptionalcustomTokenAssetName: string

      Returns Promise<{ preSignSigHash: string; unsignedTx: StacksTransactionWire }>

      • The serialized unsigned Stacks transaction and pre-signature hash.
    • Solo stacks STX on Stacks PoX to earn rewards directly.

      Parameters

      • senderPublicKey: string
      • signerKey: string
      • amountUstx: bigint
      • btcRewardAddress: string
      • lockPeriod: number
      • maxAmountUstx: bigint
      • signerSig65Hex: string
      • startBurnHeight: number
      • authId: bigint

      Returns Promise<{ preSignSigHash: string; unsignedContractCall: StacksTransactionWire }>

      the unsigned solo stack transaction.