utxostack / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
53 stars 18 forks source link

When there are change sats to be returned, don't return them to RGB++ UTXO #76

Closed Flouse closed 7 months ago

Flouse commented 7 months ago

Discussed solution

For the situation where there are both RGB++ and BTC changes, it is recommended according to the following transaction structure:

# BTC_TX
inputs:
   btc_vin_1
   btc_vin_2
   ...
outputs:
   OP_RETURN: commitment
   btc_utxo_1 # for the receiver RGB++ assets (dust satoshi)
   btc_utxo_2 # for the sender RGB++ change (dust satoshi)
   btc_utxo_3 # for the sender BTC change 

Originally posted by @duanyytop in https://github.com/ckb-cell/rgbpp-sdk/issues/67#issuecomment-2027880226