1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 19:38:15 +00:00

feat(common): introduce MultisigPubkeyOrder

This commit is contained in:
Ondřej Vejpustek 2024-11-07 13:51:43 +01:00
parent 6483cb4f72
commit 2f72a37bae

View File

@ -53,6 +53,11 @@ enum AmountUnit {
SATOSHI = 3; // sat SATOSHI = 3; // sat
} }
enum MultisigPubkeysOrder {
PRESERVED = 0; // order of pubkeys is preserved
LEXICOGRAPHIC = 1; // pubkeys are sorted lexicographically (BIP-67)
}
/** /**
* Type of redeem script used in input * Type of redeem script used in input
* @embed * @embed
@ -63,6 +68,7 @@ message MultisigRedeemScriptType {
required uint32 m = 3; // "m" from n, how many valid signatures is necessary for spending required uint32 m = 3; // "m" from n, how many valid signatures is necessary for spending
repeated common.HDNodeType nodes = 4; // simplified way how to specify pubkeys if they share the same address_n path repeated common.HDNodeType nodes = 4; // simplified way how to specify pubkeys if they share the same address_n path
repeated uint32 address_n = 5; // use only field 1 or fields 4+5, if fields 4+5 are used, field 1 is ignored repeated uint32 address_n = 5; // use only field 1 or fields 4+5, if fields 4+5 are used, field 1 is ignored
optional MultisigPubkeysOrder pubkeys_order = 6 [default=PRESERVED]; // order of pubkeys in script pubkey
/** /**
* Structure representing HDNode + Path * Structure representing HDNode + Path
*/ */
@ -625,4 +631,3 @@ message AuthorizeCoinJoin {
optional InputScriptType script_type = 7 [default=SPENDADDRESS]; // used to distinguish between various address formats (non-segwit, segwit, etc.) optional InputScriptType script_type = 7 [default=SPENDADDRESS]; // used to distinguish between various address formats (non-segwit, segwit, etc.)
optional AmountUnit amount_unit = 8 [default=BITCOIN]; // show amounts in optional AmountUnit amount_unit = 8 [default=BITCOIN]; // show amounts in
} }