The ID of the Stacks blockchain.
The specific token ID for which the contract address is to be retrieved.
A promise that resolves with the contract address associated with the specified token,
or undefined
if the chain is not a Stacks chain or if the contract address cannot be retrieved.
This function maps a given Stacks contract address to its corresponding known token ID.
The ID of the Stacks blockchain.
The contract address on the Stacks blockchain.
A promise that resolves with the known token ID corresponding to the provided
contract address, or undefined
if the chain is not a Stacks chain or if the token ID
cannot be found.
This function facilitates the transfer of tokens from the Bitcoin network to other supported blockchain networks. It checks the validity of the route and then calls the appropriate bridging function based on the destination chain.
An object containing the input parameters required for the bridging operation:
fromChain: ChainId
- The ID of the source blockchain.toChain: ChainId
- The ID of the destination blockchain (Stacks, EVM, etc.).fromToken: TokenId
- The token being transferred from the Bitcoin network.toToken: TokenId
- The token expected on the destination chain.fromAddress: string
- The source address on the Bitcoin network.fromAddressScriptPubKey: Uint8Array
- The script public key corresponding to the fromAddress
.toAddress: string
- The recipient's address on the destination blockchain.amount: SDKNumber
- The amount of tokens to transfer.networkFeeRate: bigint
- The network fee rate to be used for the transaction.reselectSpendableUTXOs: ReselectSpendableUTXOsFn
.signPsbt: BridgeFromBitcoinInput_signPsbtFn
.A promise that resolves with the transaction ID (tx
) of the bridging operation.
This function facilitates the transfer of tokens from an EVM-compatible blockchain to other supported blockchain networks, including Stacks, Bitcoin, and other EVM-compatible chains. It validates the route and calls the appropriate bridging function based on the destination chain and tokens involved.
An object containing the input parameters required for the bridging operation:
fromChain: ChainId
- The ID of the source blockchain (an EVM-compatible chain in this case).toChain: ChainId
- The ID of the destination blockchain (Stacks, Bitcoin, or another EVM-compatible chain).fromToken: TokenId
- The token being transferred from the EVM-compatible blockchain.toToken: TokenId
- The token expected on the destination chain.fromAddress: string
- The sender's address on the source chain.toAddress: string
- The recipient's address on the destination blockchain.toAddressScriptPubKey?: Uint8Array
- The script public key for the toAddress
, required when the destination is a Bitcoin chain.amount: SDKNumber
- The amount of tokens to transfer.sendTransaction
- // Implementation for sending transaction from EVM chain.A promise that resolves with the transaction hash (txHash
) of the bridging operation.
This function facilitates the transfer of tokens from the Stacks network to other supported blockchain networks, including Bitcoin and EVM-compatible chains. It validates the route and calls the appropriate bridging function based on the destination chain and tokens involved.
An object containing the input parameters required for the bridging operation:
fromChain: ChainId
- The ID of the source blockchain.toChain: ChainId
- The ID of the destination blockchain (Bitcoin, EVM, etc.).fromToken: TokenId
- The token being transferred from the source chain.toToken: TokenId
- The token expected on the destination chain.fromAddress: string
- The sender's address on the source chain.toAddress: string
- The recipient's address on the destination blockchain.amount: SDKNumber
- The amount of tokens to transfer.sendTransaction
- // Implementation for sending transaction from Stacks mainnet.A promise that resolves with the transaction ID (txid
) of the bridging operation.
This function provides detailed information about token transfers from the Bitcoin network to other supported blockchain networks, including Stacks and EVM-compatible chains. It verifies the validity of the transfer route and retrieves bridge information based on the destination chain.
A promise that resolves with an object containing detailed information about the token transfer, including:
fromChain: KnownChainId.KnownChain
- The source blockchain.fromToken: KnownTokenId.KnownToken
- The token being transferred from the Bitcoin network.toChain: KnownChainId.KnownChain
- The destination blockchain.toToken: KnownTokenId.KnownToken
- The token expected on the destination chain.fromAmount: SDKNumber
- The amount of tokens being transferred.toAmount: SDKNumber
- The amount of tokens expected on the destination chain after the transfer.feeAmount: SDKNumber
- The fee amount deducted during the transfer.This function provides detailed information about token transfers from an EVM-compatible blockchain to other supported blockchain networks, including Stacks, Bitcoin, and other EVM-compatible chains. It verifies the validity of the transfer route and retrieves bridge information based on the destination chain and tokens.
An object containing the input parameters required for retrieving bridge information:
fromChain: ChainId
- The ID of the source blockchain (Stacks in this case).toChain: ChainId
- The ID of the destination blockchain (Bitcoin, EVM-compatible chains, etc.).fromToken: TokenId
- The token being transferred from the Stacks network.toToken: TokenId
- The token expected on the destination chain.amount: SDKNumber
- The amount of tokens involved in the transfer.A promise that resolves with an object containing detailed information about the token transfer, including:
fromChain: KnownChainId.KnownChain
- The source blockchain.fromToken: KnownTokenId.KnownToken
- The token being transferred from the Stacks network.toChain: KnownChainId.KnownChain
- The destination blockchain.toToken: KnownTokenId.KnownToken
- The token expected on the destination chain.fromAmount: SDKNumber
- The amount of tokens being transferred.toAmount: SDKNumber
- The amount of tokens expected on the destination chain after the transfer.feeAmount: SDKNumber
- The fee amount deducted during the transfer.This function provides detailed information about token transfers from the Stacks network to other supported blockchain networks, including Bitcoin and EVM-compatible chains. It verifies the validity of the transfer route and retrieves bridge information based on the destination chain and tokens.
An object containing the input parameters required for retrieving bridge information:
fromChain: ChainId
- The ID of the source blockchain (Stacks in this case).toChain: ChainId
- The ID of the destination blockchain (Bitcoin, EVM-compatible chains, etc.).fromToken: TokenId
- The token being transferred from the Stacks network.toToken: TokenId
- The token expected on the destination chain.amount: SDKNumber
- The amount of tokens involved in the transfer.A promise that resolves with an object containing detailed information about the token transfer, including:
fromChain: KnownChainId.KnownChain
- The source blockchain.fromToken: KnownTokenId.KnownToken
- The token being transferred from the Stacks network.toChain: KnownChainId.KnownChain
- The destination blockchain.toToken: KnownTokenId.KnownToken
- The token expected on the destination chain.fromAmount: SDKNumber
- The amount of tokens being transferred.toAmount: SDKNumber
- The amount of tokens expected on the destination chain after the transfer.feeAmount: SDKNumber
- The fee amount deducted during the transfer.This function facilitates the claiming of time-locked assets on EVM-compatible chains. It uses smart contract functions to execute the release of locked assets based on predefined conditions.
An object containing the input parameters required for claiming time-locked assets:
chain: KnownChainId.EVMChain
- The ID of the EVM-compatible blockchain where the assets are locked.lockedAssetIds: string[]
- An array of IDs representing the locked assets to be claimed.sendTransaction
- // Implementation for sending transaction from EVM chain.A promise that resolves with the transaction hash (txHash
) of the claiming operation, or undefined
if the operation fails.
This function estimates the transaction fee and vSize for move or swap tokens from the Bitcoin network to other supported blockchain networks, including Stacks and EVM-compatible chains.
An object containing the input parameters required for estimating the transaction:
fromChain: ChainId
- The ID of the source blockchain (Bitcoin in this case).toChain: ChainId
- The ID of the destination blockchain (Stacks, EVM-compatible chains, etc.).fromToken: TokenId
- The token being transferred from the Bitcoin network.toToken: TokenId
- The token expected on the destination chain.fromAddress: string
- The source address on the Bitcoin network.fromAddressScriptPubKey: Uint8Array
- The script public key of the source address.toAddress: string
- The destination address on the target blockchain.amount: SDKNumber
- The amount of tokens to be transferred.networkFeeRate: bigint
- The fee rate for the Bitcoin network.reselectSpendableUTXOs
- // Implementation for reselect UTXOs.A promise that resolves with an object containing the estimated transaction details:
fee: SDKNumber
- The estimated transaction fee.estimatedVSize: SDKNumber
- The estimated vSize of the transaction.This function retrieves the contract address of a specific token on a given EVM-compatible blockchain.
The ID of the EVM-compatible blockchain where the token contract is deployed.
The specific token ID for which the contract address is to be retrieved.
A promise that resolves with the contract address of the token, or undefined
if the
chain is not EVM-compatible or if the contract address cannot be retrieved.
This function maps a given contract address on an EVM-compatible blockchain to its corresponding known token ID.
The ID of the EVM-compatible blockchain where the contract is deployed.
The contract address on the EVM-compatible blockchain.
A promise that resolves with the known token ID corresponding to the provided contract
address, or undefined
if the token ID cannot be found or if the chain is not EVM-compatible.
This function retrieves the contract address of a specific type of contract (e.g., a bridge endpoint) on a given EVM-compatible blockchain.
The ID of the EVM-compatible blockchain where the contract is deployed.
The type of contract (e.g., PublicEVMContractType.BridgeEndpoint
)
for which the address is to be retrieved.
A promise that resolves with the contract address of the specified type, or
undefined
if the chain is not EVM-compatible or if the address cannot be retrieved.
This function retrieves the list of supported routes for token transfers between blockchain networks, filtered based on optional conditions. It aggregates the results from different blockchain networks (Stacks, EVM, Bitcoin) to return a list of possible routes.
Optional
conditions: GetSupportedRoutesFn_ConditionsAn optional object containing the conditions for filtering the supported routes:
fromChain?: ChainId
- The ID of the source blockchain (optional).toChain?: ChainId
- The ID of the destination blockchain (optional).fromToken?: TokenId
- The ID of the token being transferred from the source blockchain (optional).toToken?: TokenId
- The ID of the token expected on the destination blockchain (optional).A promise that resolves with an array of KnownRoute
objects, each representing a
possible route for the token transfer.
This function retrieves a list of time-locked assets for a given wallet address across multiple EVM-compatible blockchain networks. It queries smart contracts to find and return information about the assets that are currently locked in time-based agreements.
An object containing the input parameters required for retrieving time-locked assets:
walletAddress: EVMAddress
- The address of the wallet for which to retrieve the time-locked assets.chains: KnownChainId.EVMChain[]
- An array of EVM-compatible blockchains to query for locked assets.A promise that resolves with an object containing a list of time-locked assets:
assets: TimeLockedAsset[]
- An array of objects, each representing a time-locked asset, including:
id: string
- The unique identifier of the time-locked agreement.chain: KnownChainId.EVMChain
- The blockchain where the asset is locked.token: KnownTokenId.EVMToken
- The token that is locked.amount: SDKNumber
- The amount of the token that is locked.releaseTime: Date
- The time when the asset is scheduled to be released.Static
default
This function retrieves the contract address associated with a specific token on the Stacks blockchain.