💎SendAsset

Sending assets requires several rounds of communication between wallet and bittapd, because bittapd needs end users to sign twice.

Step1: TransferAsset

Wallet calls this to transfer an asset to a specific Taproot Assets address. Virtual psbts are returned for the end user's first sign.

Step 2: AnchorVirtualPsbt

Continuingly from Step1, the end user signs the virtual psbts locally, to provide witnesses for Taproot Assets spend. Wallet should NOT finalize or extract that transaction. Then make this call to send the signed virtual psbts back.

Bittapd will verify the signatures to make sure it meets the spending conditions of Taproot Assets Protocol. Then Bittapd will make anchored psbt to anchor this transfer to BTC. The result is another psbt to be returned for the end user's second sign.

Step 3: PublishTransfer

The end user will sign the psbt returned from Step 2, and before call this to broadcast to BTC blockchain, the signed psbt needs to be finalized. In the end, if the transaction get confirmed, that means the Taproot Assets transfer successfully. The receiver will find the new asset on chain, and verify the proof which sender made to it.

Last updated