OrbitChain
Search…
Bitcoin IBC protocol

Deposit

Before you send Bitcoin to our multi-sig wallet, you have to do mapping your BTC address and Orbit address to the Orbit network
For mapping your address, you have to send mapping transaction to BtcPeggingContract
1
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
Copied!
If mapping succeed,
1
event DepositDestinationsMapping(bytes32 btcPubKeyX, bytes32 btcPubKeyY, address toAddr, address extraToAddr);
Copied!
DepositDestinationsMapping event occur in BtcPeggingContract
After deposit destination is mapped, you can send Bitcoin to our multi-sig wallet
You have to use p2sh wallet for sending bitcoin to our multi-sig wallet.
V[in] UTXO in your transaction have to solve by public key
After your transaction is 1 confirmed, Orbit btc operator, validator will begin to proceed your deposit
1
//BtcPeggingContract
2
event DepositValidated(bytes32 txid, uint vout, uint amount, bytes scriptPubKey, address toAddr, address extraToAddr, bytes32 depositPubKeyX, bytes32 depositPubKeyY)
3
//BalanceContract
4
event BalanceChange(address indexed user, bytes32 indexed tokenId, uint balance);
Copied!

Withdrawal

Send a withdrawal transaction to Orbit Balancecontract
1
function withdrawBySignature(bytes32[] memory bytes32s, uint[] memory uints, address fromAddr, bytes memory destination, bytes memory comment, uint8 v) public
2
function withdraw(bytes32 tokenId, bytes memory destination, uint amount, bytes memory comment) public
Copied!
Then, Bitcoin IBC operator and Validator begin to proceed this withdrawal
Copy link