Derivation paths for generating bitcoin tx outputs containing RGB state #132
dr-orlovsky
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Outputs containing RGB state assignments must be created by a wallet software by using a distinct derivation paths than used for keeping bitcoins. This is required in order to prevent accidental fund/state loss if the output is being spent by a non-RGB-enabled wallet.
After multiple rounds of considerations I tend to simplify the proposal for RGB-related derivation path and introduce one simple way of doing it, interoperable with all existing wallet types.
Instead of using custom BIP43 purpose field or abusing other hardened segments of derivation path (coin etc) I propose to leverage the "change" segment (next to last), which is unhardened segment. This will enable to use RGB assets with any existing bitcoin descriptor and account-level extended public keys without their re-generation.
The proposal:
N mod 10
are equivalent of "normal" or "external" change index 0; it will contain RGB state sent to the wallet by the external parties via invoices (and to generate new invoices)N mod 10 + 1
is a "change" index, which will be used by a RGB wallet when the change output contains RGB asset by is not tweaked with Tapret (since Opret is used or a different output is tweaked)N mod 10 + 2
is a "tweaked change" index, which will be used to contain a tweak.N
index range (N
,N+1
,N+2
).Initially I propose the following velocity classes:
CC @fedsten @zoedberg @cryptoquick @crisdut
Beta Was this translation helpful? Give feedback.
All reactions