API Documentation
This section outlines the mint and redeem request transaction structures for each network we support.
EVM Networks
Mint Request
This function takes in an approved deposit token on the source chain from the user, which is then stored in a Bound smart contract vault, and results in a mint request for bUSD on the destination chain.
token
contract address
the deposit token address (USDT, USDC, ...)
amount
int
amount of tokens to deposit in vault
destChainId
int
the destination chain ID to mint bUSD (BTC, OPNet, ...)
recipientAddr
string
the address to receive bUSD on the destination chain
Redeem Request (event)
This event is emitted when an operator makes a withdrawal to process the bUSD redemption request that was submitted on Bitcoin.
to
address
the recipient's address
token
contract address
the address of the token being redeemed (USDT, USDC, ...)
amount
int
the amount of tokens the recipient will receive
sourceTxId
string
the transaction hash of the redemption request that was submitted on the source chain
Bitcoin
Redeem request
This transaction structure allows users to make a bUSD redemption request for a supported stablecoin on a destination chain by transferring their bUSD Rune to the Bound Hot Wallet.
0
user's bUSD Rune UTXOs
0
bUSD Rune change UTXO sent to the user's address
1
user's BTC UTXOs
1
bUSD Rune UTXO sent to Bound's Hot Wallet address
2
Bound Redeem Script
3
Runestone OP_RETURN Script: send the amount of the redeemed bUSD Rune to Output 2
4
BTC change UTXO sent to the user's address
Bound Redeem Script (output #2)
[OP_15 0x01 StableCoinId ReceiverBytes]
OP_15: Bound Identity OP
0x01 (1 byte): the flag for redeem request
StableCoinId (uint8 = 1 byte): the ID of the stablecoin the user wants to withdraw
you can get the StableCoinId of every supported stablecoin with this API:
ReceiverBytes (the remain bytes): contains the user's EVM address, which is decoded from string to bytes (without prefix 0x)
[explanation]
Input
Input 0: user's bUSD Rune UTXO
used to redeem an equivalent amount of a stablecoin on the destination chain
Input 1: user's BTC UTXO
used to pay transaction fee
Output
Output 0: Rune change output
+ Value: dust amount (546)
+ PkScript: user's PkScript
Output 1: bUSD Rune sent to Bound Hot Wallet
+ Value: dust amount (546)
+ PkScript: hotWallet's PkScript
Output 2: Bound Redeem Script
+ Value: dust amount (546)
+ PkScript: OP_15 01 01 d21968dae95717c723e5c129db9eacc268e9ca44
*meaning the StableCoinId is 1 and the receiver address on the EVM chain is 0xd21968dae95717c723e5c129db9eacc268e9ca44
Output 3: Runestone OP_RETURN with 1 edict:
{"Edicts":[{"ID":"BusdRuneId","Amount":"BusdAmount","Output":1}],"Pointer":0}
Output 4: BTC change output
+ Value: change amount (53978)
+ PkScript: user's PkScript
Last updated