snaps_api
Learn how to connect ZetaLink to your custom frontend dApp
defaultSnapOrigin: npm:zetalink
Connect ZetaLink
Description: Connects the specified snap with the given parameters, enabling its functionalities within the MetaMask environment.
Example Usage:
derive-btc-wallet
Parameters:
isMainnet
(boolean): To derive Mainnet BTC wallet?
Description: Generates a Bitcoin testnet address from the BIP32 public key.
Usage:
get-btc-utxo
Parameters: None
Description: Fetches unspent transaction outputs (UTXOs) for the connected Bitcoin account.
Usage:
get-deposit-fees
Parameters: None
Description: Fetches unspent transaction outputs (UTXOs) for the connected Bitcoin account.
Usage:
get-btc-trxs
Parameters: None
Description: Fetches unspent transaction outputs (UTXOs) for the connected Bitcoin account.
Usage:
get-balance-and-rate
Parameters:
address
(string): The Zeta or Ethereum address for which the balance is to be retrieved.
Description: Retrieves the Zeta balance for the specified address.
Usage:
transact-btc
Parameters:
amount
(number): The amount of Bitcoin to swap.memo
(string): An optional memo to include with the transaction, encoded in hex.isCCTX
(boolean): A flag indicating whether to use Bitcoin TSS (Threshold Signature Scheme) for the transaction.
Description: Executes a cross-chain swap transaction for Bitcoin.
Usage:
defaultMemo
checks if ZRC20 address is passed and automatically considers it a CCTX
track-cctx
Parameters:
transactionHash
(string): The hash of the cross-chain transaction to track.
Description: Tracks a cross-chain transaction by its hash and retrieves the transaction data.
Usage:
Last updated