6.1 Bitcoin IBC Protocol

Deposit

Before you send Bitcoin to our multi-sig wallet, you have to do mapping of your BTC address and Orbit address to the Orbit network

For mapping your address, you have to send a mapping transaction to BtcPeggingContract

function setDepositDestinations(bytes32[] memory btcPubKeyX, bytes32[] memory btcPubKeyY, address[] memory toAddrs, address[] memory extraToAddrs, bytes32[] memory nonces, uint8[] memory v, bytes32[] memory r, bytes32[] memory s) public

If mapping succeeds,

event DepositDestinationsMapping(bytes32 btcPubKeyX, bytes32 btcPubKeyY, address toAddr, address extraToAddr);

DepositDestinationsMapping event occurs in BtcPeggingContract

After deposit destination is mapped, you can send Bitcoin to our multi-sig wallet

You have to use a p2sh wallet to send Bitcoin to our multi-sig wallet.

V[in] UTXO in your transaction have to solve by public key

After your transaction is confirmed, Orbit BTC Operator, validator will begin to proceed your deposit.

//BtcPeggingContract
event DepositValidated(bytes32 txid, uint vout, uint amount, bytes scriptPubKey, address toAddr, address extraToAddr, bytes32 depositPubKeyX, bytes32 depositPubKeyY)
//BalanceContract
event BalanceChange(address indexed user, bytes32 indexed tokenId, uint balance);

Withdrawal

Send a withdrawal transaction to Orbit Balancecontract

function withdrawBySignature(bytes32[] memory bytes32s, uint[] memory uints, address fromAddr, bytes memory destination, bytes memory comment, uint8 v) public
function withdraw(bytes32 tokenId, bytes memory destination, uint amount, bytes memory comment) public

Then, Bitcoin IBC operator and Validator begin to proceed this withdrawal.

Last updated