mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-19 09:36:06 +00:00
Merge branch 'release/2020-04'
This commit is contained in:
commit
5885978c83
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": 0,
|
||||
"force_bip143": true,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -47,5 +46,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": 0,
|
||||
"force_bip143": true,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 20
|
||||
},
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": 79,
|
||||
"force_bip143": true,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -47,5 +46,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": 79,
|
||||
"force_bip143": true,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -47,5 +46,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 20
|
||||
},
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": 42,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
{
|
||||
"coin_name": "Capricoin",
|
||||
"coin_shortcut": "CPC",
|
||||
"coin_label": "Capricoin",
|
||||
"website": "https://capricoin.org",
|
||||
"github": "https://github.com/Capricoinofficial/Capricoin",
|
||||
"maintainer": "Jozef Knaperek <jknaperek@gmail.com>",
|
||||
"curve_name": "secp256k1",
|
||||
"decimals": 8,
|
||||
"address_type": 28,
|
||||
"address_type_p2sh": 35,
|
||||
"maxfee_kb": 2000000,
|
||||
"minfee_kb": 1000,
|
||||
"signed_message_header": "Capricoin Signed Message:\n",
|
||||
"hash_genesis_block": "00000d23fa0fc52c90893adb1181c9ddffb6c797a3e41864b9a23aa2f2981fe3",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": null,
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 289,
|
||||
"segwit": false,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1,
|
||||
"Economy": 7,
|
||||
"Normal": 14,
|
||||
"High": 20
|
||||
},
|
||||
"dust_limit": 546,
|
||||
"blocktime_seconds": 60,
|
||||
"uri_prefix": "capricoin",
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [],
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"confidential_assets": null
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 20
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -42,5 +41,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": true,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": true,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": true,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": true,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 100000
|
||||
},
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,6 +37,8 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": {
|
||||
"address_prefix": 4,
|
||||
"blech32_prefix": "el"
|
||||
|
@ -9,12 +9,12 @@
|
||||
"decimals": 8,
|
||||
"address_type": 50,
|
||||
"address_type_p2sh": 5,
|
||||
"maxfee_kb": 2000000,
|
||||
"maxfee_kb": 2000000,
|
||||
"minfee_kb": 100,
|
||||
"signed_message_header": "Metaverse Signed Message:\n",
|
||||
"hash_genesis_block": "b81848ef9ae86e84c3da26564bc6ab3a79efc628239d11471ab5cd25c0684c2d",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": null,
|
||||
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -37,10 +36,11 @@
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [
|
||||
],
|
||||
"blockbook": [],
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10000,
|
||||
"Economy": 20000,
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -42,5 +41,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"coin_name": "Horizen",
|
||||
"coin_shortcut": "ZEN",
|
||||
"coin_label": "Horizen",
|
||||
"website": "https://www.horizen.global",
|
||||
"github": "https://github.com/ZencashOfficial/zen",
|
||||
"maintainer": "Power_VANO <vano@horizen.global>",
|
||||
"curve_name": "secp256k1",
|
||||
"decimals": 8,
|
||||
"address_type": 8329,
|
||||
"address_type_p2sh": 8342,
|
||||
"maxfee_kb": 2000000,
|
||||
"minfee_kb": 1000,
|
||||
"signed_message_header": "Zcash Signed Message:\n",
|
||||
"hash_genesis_block": "0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": null,
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 121,
|
||||
"segwit": false,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": true,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
"dust_limit": 546,
|
||||
"blocktime_seconds": 150,
|
||||
"uri_prefix": "horizen",
|
||||
"min_address_length": 35,
|
||||
"max_address_length": 95,
|
||||
"bitcore": [
|
||||
"https://explorer.horizen.global"
|
||||
],
|
||||
"blockbook": [],
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"confidential_assets": null
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 7.7 KiB |
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -45,5 +44,7 @@
|
||||
"3": 1537743641,
|
||||
"4": 1991772603
|
||||
},
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": true,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": true,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -38,5 +37,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 410,
|
||||
"Economy": 500,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 410,
|
||||
"Economy": 500,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10
|
||||
},
|
||||
@ -42,5 +41,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10
|
||||
},
|
||||
@ -42,5 +41,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1,
|
||||
"Economy": 10,
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1,
|
||||
"Economy": 10,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 10,
|
||||
"Economy": 70,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 100,
|
||||
"Economy": 700,
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -40,9 +40,10 @@
|
||||
"https://blockbook.flurbo.xyz",
|
||||
"https://blockbook.unobtanium.uno"
|
||||
],
|
||||
"bip115": false,
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
@ -44,5 +43,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1000,
|
||||
"Economy": 7000,
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 410,
|
||||
"Economy": 500,
|
||||
@ -45,5 +44,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -49,5 +48,7 @@
|
||||
"3": 1537743641,
|
||||
"4": 733220448
|
||||
},
|
||||
"extra_data": true,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -45,5 +44,7 @@
|
||||
"3": 1537743641,
|
||||
"4": 733220448
|
||||
},
|
||||
"extra_data": true,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1,
|
||||
"Economy": 10,
|
||||
@ -43,5 +42,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Low": 1,
|
||||
"Economy": 10,
|
||||
@ -41,5 +40,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
@ -40,5 +39,7 @@
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"extra_data": false,
|
||||
"timestamp": false,
|
||||
"confidential_assets": null
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,6 @@
|
||||
"bitcoin:BTCP": true,
|
||||
"bitcoin:BTG": true,
|
||||
"bitcoin:BTX": true,
|
||||
"bitcoin:CPC": true,
|
||||
"bitcoin:DASH": true,
|
||||
"bitcoin:DGB": true,
|
||||
"bitcoin:DOGE": true,
|
||||
@ -43,7 +42,6 @@
|
||||
"bitcoin:XZC": true,
|
||||
"bitcoin:ZCR": true,
|
||||
"bitcoin:ZEC": true,
|
||||
"bitcoin:ZEN": true,
|
||||
"bitcoin:ZNY": true,
|
||||
"bitcoin:tDASH": true,
|
||||
"bitcoin:tLTC": true,
|
||||
@ -1691,9 +1689,7 @@
|
||||
"nem:XEM": "1.6.2"
|
||||
},
|
||||
"unsupported": {
|
||||
"bitcoin:CPC": "not implemented",
|
||||
"bitcoin:TRC": "address_type collides with Bitcoin",
|
||||
"bitcoin:ZEN": "not implemented",
|
||||
"erc20:etc:PLAY": "(AUTO) duplicate key",
|
||||
"erc20:eth:A18:ba7d": "(AUTO) duplicate key",
|
||||
"erc20:eth:A18:bde8": "(AUTO) duplicate key",
|
||||
@ -1735,7 +1731,6 @@
|
||||
"erc20:eth:COIN:eb54": "(AUTO) duplicate key",
|
||||
"erc20:eth:COSS:6529": "(AUTO) duplicate key",
|
||||
"erc20:eth:COSS:9e96": "(AUTO) duplicate key",
|
||||
"erc20:eth:CPC": "duplicate key with bitcoin:CPC",
|
||||
"erc20:eth:CPT:88d5": "(AUTO) duplicate key",
|
||||
"erc20:eth:CPT:9b62": "(AUTO) duplicate key",
|
||||
"erc20:eth:CTT:1a47": "(AUTO) duplicate key",
|
||||
@ -1924,7 +1919,6 @@
|
||||
"bitcoin:BTCP": "2.0.7",
|
||||
"bitcoin:BTG": "2.0.7",
|
||||
"bitcoin:BTX": "2.0.8",
|
||||
"bitcoin:CPC": "2.0.10",
|
||||
"bitcoin:CPU": "2.1.4",
|
||||
"bitcoin:CRW": "2.1.7",
|
||||
"bitcoin:DASH": "2.0.5",
|
||||
@ -1974,7 +1968,6 @@
|
||||
"bitcoin:ZCR": "2.1.7",
|
||||
"bitcoin:ZEC": "2.0.8",
|
||||
"bitcoin:ZEL": "2.1.4",
|
||||
"bitcoin:ZEN": "2.0.8",
|
||||
"bitcoin:ZNY": "2.1.1",
|
||||
"bitcoin:tDASH": "2.0.8",
|
||||
"bitcoin:tGRS": "2.0.8",
|
||||
@ -3564,7 +3557,6 @@
|
||||
"erc20:eth:COIN:eb54": "(AUTO) duplicate key",
|
||||
"erc20:eth:COSS:6529": "(AUTO) duplicate key",
|
||||
"erc20:eth:COSS:9e96": "(AUTO) duplicate key",
|
||||
"erc20:eth:CPC": "duplicate key with bitcoin:CPC",
|
||||
"erc20:eth:CPT:88d5": "(AUTO) duplicate key",
|
||||
"erc20:eth:CPT:9b62": "(AUTO) duplicate key",
|
||||
"erc20:eth:CTT:1a47": "(AUTO) duplicate key",
|
||||
|
@ -28,9 +28,6 @@
|
||||
"Electrum-BTX": "https://github.com/LIMXTEC/electrum-btx",
|
||||
"Magnum": "https://magnumwallet.co"
|
||||
},
|
||||
"bitcoin:CPC": {
|
||||
"Capricoin Mobile Wallet": "https://wallet.capricoin.org"
|
||||
},
|
||||
"bitcoin:CPU": {
|
||||
"Electrum-CPU": "https://cpuchain.org/download-page.html"
|
||||
},
|
||||
|
@ -130,10 +130,10 @@ message SignTx {
|
||||
optional uint32 version = 4 [default=1]; // transaction version
|
||||
optional uint32 lock_time = 5 [default=0]; // transaction lock_time
|
||||
optional uint32 expiry = 6; // only for Decred and Zcash
|
||||
optional bool overwintered = 7; // only for Zcash
|
||||
optional uint32 version_group_id = 8; // only for Zcash, nVersionGroupId when overwintered is set
|
||||
optional uint32 timestamp = 9; // only for Peercoin, Capricoin
|
||||
optional uint32 branch_id = 10; // only for Zcash, BRANCH_ID when overwintered is set
|
||||
// optional bool overwintered = 7; // deprecated - only for Zcash
|
||||
optional uint32 version_group_id = 8; // only for Zcash, nVersionGroupId
|
||||
optional uint32 timestamp = 9; // only for Peercoin
|
||||
optional uint32 branch_id = 10; // only for Zcash, BRANCH_ID
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,10 +196,10 @@ message TxAck {
|
||||
optional bytes extra_data = 8; // only for Dash, Zcash
|
||||
optional uint32 extra_data_len = 9; // only for Dash, Zcash
|
||||
optional uint32 expiry = 10; // only for Decred and Zcash
|
||||
optional bool overwintered = 11; // only for Zcash
|
||||
optional uint32 version_group_id = 12; // only for Zcash, nVersionGroupId when overwintered is set
|
||||
optional uint32 timestamp = 13; // only for Peercoin, Capricoin
|
||||
optional uint32 branch_id = 14; // only for Zcash, BRANCH_ID when overwintered is set
|
||||
// optional bool overwintered = 11; // deprecated - only for Zcash
|
||||
optional uint32 version_group_id = 12; // only for Zcash, nVersionGroupId
|
||||
optional uint32 timestamp = 13; // only for Peercoin
|
||||
optional uint32 branch_id = 14; // only for Zcash, BRANCH_ID
|
||||
/**
|
||||
* Structure representing transaction input
|
||||
*/
|
||||
@ -214,8 +214,8 @@ message TxAck {
|
||||
optional uint64 amount = 8; // amount of previous transaction output (for segwit only)
|
||||
optional uint32 decred_tree = 9; // only for Decred
|
||||
optional uint32 decred_script_version = 10; // only for Decred
|
||||
optional bytes prev_block_hash_bip115 = 11; // block hash of previous transaction output (for bip115 implementation)
|
||||
optional uint32 prev_block_height_bip115 = 12; // block height of previous transaction output (for bip115 implementation)
|
||||
// optional bytes prev_block_hash_bip115 = 11; // BIP-115 support dropped
|
||||
// optional uint32 prev_block_height_bip115 = 12; // BIP-115 support dropped
|
||||
}
|
||||
/**
|
||||
* Structure representing compiled transaction output
|
||||
@ -236,8 +236,8 @@ message TxAck {
|
||||
optional MultisigRedeemScriptType multisig = 5; // defines multisig address; script_type must be PAYTOMULTISIG
|
||||
optional bytes op_return_data = 6; // defines op_return data; script_type must be PAYTOOPRETURN, amount must be 0
|
||||
optional uint32 decred_script_version = 7; // only for Decred
|
||||
optional bytes block_hash_bip115 = 8; // block hash of existing block (recommended current_block - 300) (for bip115 implementation)
|
||||
optional uint32 block_height_bip115 = 9; // block height of existing block (recommended current_block - 300) (for bip115 implementation)
|
||||
// optional bytes block_hash_bip115 = 8; // BIP-115 support dropped
|
||||
// optional uint32 block_height_bip115 = 9; // BIP-115 support dropped
|
||||
enum OutputScriptType {
|
||||
PAYTOADDRESS = 0; // used for all addresses (bitcoin, p2sh, witness)
|
||||
PAYTOSCRIPTHASH = 1; // p2sh address (deprecated; use PAYTOADDRESS)
|
||||
|
@ -136,7 +136,6 @@ BTC_CHECKS = [
|
||||
check_key("decred", bool),
|
||||
check_key("fork_id", int, nullable=True),
|
||||
check_key("force_bip143", bool),
|
||||
check_key("bip115", bool),
|
||||
check_key("default_fee_b", dict),
|
||||
check_key("dust_limit", int),
|
||||
check_key("blocktime_seconds", int),
|
||||
|
@ -33,7 +33,6 @@ class CoinDef(p.MessageType):
|
||||
29: ("github", p.UnicodeType, 0),
|
||||
30: ("maintainer", p.UnicodeType, 0),
|
||||
31: ("blocktime_seconds", p.UVarintType, 0),
|
||||
32: ("bip115", p.BoolType, 0),
|
||||
33: ("cooldown", p.UVarintType, 0),
|
||||
}
|
||||
|
||||
@ -60,7 +59,6 @@ class CoinDef(p.MessageType):
|
||||
decred: bool = None,
|
||||
fork_id: int = None,
|
||||
force_bip143: bool = None,
|
||||
bip115: bool = None,
|
||||
dust_limit: int = None,
|
||||
uri_prefix: str = None,
|
||||
min_address_length: int = None,
|
||||
@ -96,7 +94,6 @@ class CoinDef(p.MessageType):
|
||||
self.decred = decred
|
||||
self.fork_id = fork_id
|
||||
self.force_bip143 = force_bip143
|
||||
self.bip115 = bip115
|
||||
self.dust_limit = dust_limit
|
||||
self.uri_prefix = uri_prefix
|
||||
self.min_address_length = min_address_length
|
||||
|
@ -13,7 +13,7 @@ from trezor.ui.text import Text
|
||||
|
||||
from . import helpers
|
||||
|
||||
from apps.common.confirm import hold_to_confirm
|
||||
from apps.common.confirm import require_hold_to_confirm
|
||||
from apps.common.layout import split_address
|
||||
|
||||
|
||||
@ -38,7 +38,9 @@ async def require_confirm_transfer(ctx, msg: BinanceTransferMsg):
|
||||
for txoutput in msg.outputs:
|
||||
pages.extend(make_input_output_pages(txoutput, "output"))
|
||||
|
||||
return await hold_to_confirm(ctx, Paginated(pages), ButtonRequestType.ConfirmOutput)
|
||||
return await require_hold_to_confirm(
|
||||
ctx, Paginated(pages), ButtonRequestType.ConfirmOutput
|
||||
)
|
||||
|
||||
|
||||
async def require_confirm_cancel(ctx, msg: BinanceCancelMsg):
|
||||
@ -52,7 +54,7 @@ async def require_confirm_cancel(ctx, msg: BinanceCancelMsg):
|
||||
page2.normal("Order ID:")
|
||||
page2.bold(msg.refid)
|
||||
|
||||
return await hold_to_confirm(
|
||||
return await require_hold_to_confirm(
|
||||
ctx, Paginated([page1, page2]), ButtonRequestType.SignTx
|
||||
)
|
||||
|
||||
@ -77,6 +79,6 @@ async def require_confirm_order(ctx, msg: BinanceOrderMsg):
|
||||
page3.normal("Price:")
|
||||
page3.bold(format_amount(msg.price, helpers.DECIMALS))
|
||||
|
||||
return await hold_to_confirm(
|
||||
return await require_hold_to_confirm(
|
||||
ctx, Paginated([page1, page2, page3]), ButtonRequestType.SignTx
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ from trezor.ui.scroll import Paginated
|
||||
from trezor.ui.text import Text
|
||||
from trezor.utils import chunks
|
||||
|
||||
from apps.common.confirm import confirm, hold_to_confirm
|
||||
from apps.common.confirm import require_confirm, require_hold_to_confirm
|
||||
|
||||
|
||||
def format_coin_amount(amount):
|
||||
@ -32,7 +32,7 @@ async def confirm_sending(ctx, amount, to):
|
||||
t.bold(line)
|
||||
pages.append(t)
|
||||
|
||||
return await confirm(ctx, Paginated(pages))
|
||||
await require_confirm(ctx, Paginated(pages))
|
||||
|
||||
|
||||
async def confirm_transaction(ctx, amount, fee, network_name):
|
||||
@ -46,4 +46,4 @@ async def confirm_transaction(ctx, amount, fee, network_name):
|
||||
t2.normal("Network:")
|
||||
t2.bold(network_name)
|
||||
|
||||
return await hold_to_confirm(ctx, Paginated([t1, t2]))
|
||||
await require_hold_to_confirm(ctx, Paginated([t1, t2]))
|
||||
|
@ -47,19 +47,15 @@ async def show_tx(
|
||||
network_name: str,
|
||||
raw_inputs: list,
|
||||
raw_outputs: list,
|
||||
) -> bool:
|
||||
) -> None:
|
||||
for index, output in enumerate(outputs):
|
||||
if is_change(raw_outputs[index].address_n, raw_inputs):
|
||||
continue
|
||||
|
||||
if not await confirm_sending(ctx, outcoins[index], output):
|
||||
return False
|
||||
await confirm_sending(ctx, outcoins[index], output)
|
||||
|
||||
total_amount = sum(outcoins)
|
||||
if not await confirm_transaction(ctx, total_amount, fee, network_name):
|
||||
return False
|
||||
|
||||
return True
|
||||
await confirm_transaction(ctx, total_amount, fee, network_name)
|
||||
|
||||
|
||||
async def request_transaction(ctx, tx_req: CardanoTxRequest, index: int):
|
||||
@ -114,7 +110,7 @@ async def sign_tx(ctx, msg):
|
||||
raise wire.ProcessError("Signing failed")
|
||||
|
||||
# display the transaction in UI
|
||||
if not await show_tx(
|
||||
await show_tx(
|
||||
ctx,
|
||||
transaction.output_addresses,
|
||||
transaction.outgoing_coins,
|
||||
@ -122,8 +118,7 @@ async def sign_tx(ctx, msg):
|
||||
transaction.network_name,
|
||||
transaction.inputs,
|
||||
transaction.outputs,
|
||||
):
|
||||
raise wire.ActionCancelled("Signing cancelled")
|
||||
)
|
||||
|
||||
return tx
|
||||
|
||||
|
@ -26,10 +26,12 @@ class CoinInfo:
|
||||
segwit: bool,
|
||||
fork_id: int,
|
||||
force_bip143: bool,
|
||||
bip115: bool,
|
||||
decred: bool,
|
||||
negative_fee: bool,
|
||||
curve_name: str,
|
||||
extra_data: bool,
|
||||
timestamp: bool,
|
||||
overwintered: bool,
|
||||
confidential_assets: dict,
|
||||
):
|
||||
self.coin_name = coin_name
|
||||
@ -48,10 +50,12 @@ class CoinInfo:
|
||||
self.segwit = segwit
|
||||
self.fork_id = fork_id
|
||||
self.force_bip143 = force_bip143
|
||||
self.bip115 = bip115
|
||||
self.decred = decred
|
||||
self.negative_fee = negative_fee
|
||||
self.curve_name = curve_name
|
||||
self.extra_data = extra_data
|
||||
self.timestamp = timestamp
|
||||
self.overwintered = overwintered
|
||||
self.confidential_assets = confidential_assets
|
||||
if curve_name == "secp256k1-groestl":
|
||||
self.b58_hash = groestl512d_32
|
||||
@ -98,10 +102,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Regtest":
|
||||
@ -122,10 +128,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Testnet":
|
||||
@ -146,10 +154,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
if not utils.BITCOIN_ONLY:
|
||||
@ -173,10 +183,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Axe":
|
||||
@ -197,10 +209,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bellcoin":
|
||||
@ -221,10 +235,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "BitZeny":
|
||||
@ -245,10 +261,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bcash":
|
||||
@ -269,10 +287,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=0,
|
||||
force_bip143=True,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bcash Testnet":
|
||||
@ -293,10 +313,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=0,
|
||||
force_bip143=True,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bgold":
|
||||
@ -317,10 +339,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=79,
|
||||
force_bip143=True,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bgold Testnet":
|
||||
@ -341,10 +365,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=79,
|
||||
force_bip143=True,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bprivate":
|
||||
@ -365,10 +391,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=42,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Brhodium":
|
||||
@ -389,10 +417,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Bitcore":
|
||||
@ -413,10 +443,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "CPUchain":
|
||||
@ -437,34 +469,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Capricoin":
|
||||
return CoinInfo(
|
||||
coin_name=name,
|
||||
coin_shortcut="CPC",
|
||||
decimals=8,
|
||||
address_type=28,
|
||||
address_type_p2sh=35,
|
||||
maxfee_kb=2000000,
|
||||
signed_message_header="Capricoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=289,
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Crown":
|
||||
@ -485,10 +495,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Dash":
|
||||
@ -509,10 +521,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=True,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Dash Testnet":
|
||||
@ -533,10 +547,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=True,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Decred":
|
||||
@ -557,10 +573,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=True,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-decred',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Decred Testnet":
|
||||
@ -581,10 +599,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=True,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-decred',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "DigiByte":
|
||||
@ -605,10 +625,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Dogecoin":
|
||||
@ -629,10 +651,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Elements":
|
||||
@ -653,10 +677,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets={'address_prefix': 4, 'blech32_prefix': 'el'},
|
||||
)
|
||||
elif name == "Feathercoin":
|
||||
@ -677,10 +703,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Florincoin":
|
||||
@ -701,10 +729,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Fujicoin":
|
||||
@ -725,10 +755,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Gincoin":
|
||||
@ -749,10 +781,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "GameCredits":
|
||||
@ -773,10 +807,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Groestlcoin":
|
||||
@ -797,10 +833,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-groestl',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Groestlcoin Testnet":
|
||||
@ -821,10 +859,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-groestl',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Hatch":
|
||||
@ -845,10 +885,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Hatch Testnet":
|
||||
@ -869,34 +911,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Horizen":
|
||||
return CoinInfo(
|
||||
coin_name=name,
|
||||
coin_shortcut="ZEN",
|
||||
decimals=8,
|
||||
address_type=8329,
|
||||
address_type_p2sh=8342,
|
||||
maxfee_kb=2000000,
|
||||
signed_message_header="Zcash Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=121,
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=True,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Komodo":
|
||||
@ -917,10 +937,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=True,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=True,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Koto":
|
||||
@ -941,10 +963,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Litecoin":
|
||||
@ -965,10 +989,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Litecoin Testnet":
|
||||
@ -989,10 +1015,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "MetaverseETP":
|
||||
@ -1013,10 +1041,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Monacoin":
|
||||
@ -1037,10 +1067,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "MonetaryUnit":
|
||||
@ -1061,10 +1093,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "NIX":
|
||||
@ -1085,10 +1119,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Namecoin":
|
||||
@ -1109,10 +1145,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "PIVX":
|
||||
@ -1133,10 +1171,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "PIVX Testnet":
|
||||
@ -1157,10 +1197,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Particl":
|
||||
@ -1181,10 +1223,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Particl Testnet":
|
||||
@ -1205,10 +1249,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Peercoin":
|
||||
@ -1229,10 +1275,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=True,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Peercoin Testnet":
|
||||
@ -1253,10 +1301,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=True,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Pesetacoin":
|
||||
@ -1277,10 +1327,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Polis":
|
||||
@ -1301,10 +1353,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Primecoin":
|
||||
@ -1325,10 +1379,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Qtum":
|
||||
@ -1349,10 +1405,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Qtum Testnet":
|
||||
@ -1373,10 +1431,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Ravencoin":
|
||||
@ -1397,10 +1457,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Ritocoin":
|
||||
@ -1421,10 +1483,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "SmartCash":
|
||||
@ -1445,10 +1509,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-smart',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "SmartCash Testnet":
|
||||
@ -1469,10 +1535,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1-smart',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Stakenet":
|
||||
@ -1493,10 +1561,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Syscoin":
|
||||
@ -1517,10 +1587,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Unobtanium":
|
||||
@ -1541,10 +1613,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "VIPSTARCOIN":
|
||||
@ -1565,10 +1639,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Vertcoin":
|
||||
@ -1589,10 +1665,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Viacoin":
|
||||
@ -1613,10 +1691,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=True,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "ZCore":
|
||||
@ -1637,10 +1717,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Zcash":
|
||||
@ -1661,10 +1743,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=True,
|
||||
timestamp=False,
|
||||
overwintered=True,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Zcash Testnet":
|
||||
@ -1685,10 +1769,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=True,
|
||||
timestamp=False,
|
||||
overwintered=True,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Zcoin":
|
||||
@ -1709,10 +1795,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "Zcoin Testnet":
|
||||
@ -1733,10 +1821,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
elif name == "ZelCash":
|
||||
@ -1757,10 +1847,12 @@ def by_name(name: str) -> CoinInfo:
|
||||
segwit=False,
|
||||
fork_id=None,
|
||||
force_bip143=False,
|
||||
bip115=False,
|
||||
decred=False,
|
||||
negative_fee=False,
|
||||
curve_name='secp256k1',
|
||||
extra_data=False,
|
||||
timestamp=False,
|
||||
overwintered=False,
|
||||
confidential_assets=None,
|
||||
)
|
||||
raise ValueError('Unknown coin name "%s"' % name)
|
||||
|
@ -26,10 +26,12 @@ class CoinInfo:
|
||||
segwit: bool,
|
||||
fork_id: int,
|
||||
force_bip143: bool,
|
||||
bip115: bool,
|
||||
decred: bool,
|
||||
negative_fee: bool,
|
||||
curve_name: str,
|
||||
extra_data: bool,
|
||||
timestamp: bool,
|
||||
overwintered: bool,
|
||||
confidential_assets: dict,
|
||||
):
|
||||
self.coin_name = coin_name
|
||||
@ -48,10 +50,12 @@ class CoinInfo:
|
||||
self.segwit = segwit
|
||||
self.fork_id = fork_id
|
||||
self.force_bip143 = force_bip143
|
||||
self.bip115 = bip115
|
||||
self.decred = decred
|
||||
self.negative_fee = negative_fee
|
||||
self.curve_name = curve_name
|
||||
self.extra_data = extra_data
|
||||
self.timestamp = timestamp
|
||||
self.overwintered = overwintered
|
||||
self.confidential_assets = confidential_assets
|
||||
if curve_name == "secp256k1-groestl":
|
||||
self.b58_hash = groestl512d_32
|
||||
@ -106,10 +110,12 @@ ATTRIBUTES = (
|
||||
("segwit", bool),
|
||||
("fork_id", black_repr),
|
||||
("force_bip143", bool),
|
||||
("bip115", bool),
|
||||
("decred", bool),
|
||||
("negative_fee", bool),
|
||||
("curve_name", lambda r: repr(r.replace("_", "-"))),
|
||||
("extra_data", bool),
|
||||
("timestamp", bool),
|
||||
("overwintered", bool),
|
||||
("confidential_assets", optional_dict),
|
||||
)
|
||||
|
||||
@ -118,6 +124,9 @@ btc_names = ["Bitcoin", "Testnet", "Regtest"]
|
||||
coins_btc = [c for c in supported_on("trezor2", bitcoin) if c.name in btc_names]
|
||||
coins_alt = [c for c in supported_on("trezor2", bitcoin) if c.name not in btc_names]
|
||||
|
||||
for c in coins_btc + coins_alt:
|
||||
c.overwintered = bool(c.consensus_branch_id)
|
||||
|
||||
%>\
|
||||
def by_name(name: str) -> CoinInfo:
|
||||
if False:
|
||||
|
@ -84,6 +84,7 @@ async def hold_to_confirm(
|
||||
confirm: str = HoldToConfirm.DEFAULT_CONFIRM,
|
||||
confirm_style: ButtonStyleType = HoldToConfirm.DEFAULT_CONFIRM_STYLE,
|
||||
loader_style: LoaderStyleType = HoldToConfirm.DEFAULT_LOADER_STYLE,
|
||||
cancel: bool = True,
|
||||
) -> bool:
|
||||
await ctx.call(ButtonRequest(code=code), ButtonAck)
|
||||
|
||||
@ -93,11 +94,11 @@ async def hold_to_confirm(
|
||||
assert isinstance(content, Paginated)
|
||||
|
||||
content.pages[-1] = HoldToConfirm(
|
||||
content.pages[-1], confirm, confirm_style, loader_style
|
||||
content.pages[-1], confirm, confirm_style, loader_style, cancel
|
||||
)
|
||||
dialog = content # type: ui.Layout
|
||||
else:
|
||||
dialog = HoldToConfirm(content, confirm, confirm_style, loader_style)
|
||||
dialog = HoldToConfirm(content, confirm, confirm_style, loader_style, cancel)
|
||||
|
||||
return await ctx.wait(dialog) is CONFIRMED
|
||||
|
||||
|
@ -78,11 +78,18 @@ def write_uint64_be(w: Writer, n: int) -> int:
|
||||
return 8
|
||||
|
||||
|
||||
def write_bytes(w: Writer, b: bytes) -> int:
|
||||
def write_bytes_unchecked(w: Writer, b: bytes) -> int:
|
||||
w.extend(b)
|
||||
return len(b)
|
||||
|
||||
|
||||
def write_bytes_reversed(w: Writer, b: bytes) -> int:
|
||||
def write_bytes_fixed(w: Writer, b: bytes, length: int) -> int:
|
||||
ensure(len(b) == length)
|
||||
w.extend(b)
|
||||
return length
|
||||
|
||||
|
||||
def write_bytes_reversed(w: Writer, b: bytes, length: int) -> int:
|
||||
ensure(len(b) == length)
|
||||
w.extend(bytes(reversed(b)))
|
||||
return len(b)
|
||||
return length
|
||||
|
@ -68,7 +68,7 @@ async def process_action(
|
||||
|
||||
writers.write_action_common(sha, action.common)
|
||||
writers.write_variant32(sha, len(w))
|
||||
writers.write_bytes(sha, w)
|
||||
writers.write_bytes_unchecked(sha, w)
|
||||
|
||||
|
||||
async def process_unknown_action(
|
||||
@ -78,7 +78,7 @@ async def process_unknown_action(
|
||||
writers.write_variant32(checksum, action.unknown.data_size)
|
||||
checksum.extend(action.unknown.data_chunk)
|
||||
|
||||
writers.write_bytes(w, action.unknown.data_chunk)
|
||||
writers.write_bytes_unchecked(w, action.unknown.data_chunk)
|
||||
bytes_left = action.unknown.data_size - len(action.unknown.data_chunk)
|
||||
|
||||
while bytes_left != 0:
|
||||
@ -90,7 +90,7 @@ async def process_unknown_action(
|
||||
raise ValueError("Bad response. Unknown struct expected.")
|
||||
|
||||
checksum.extend(action.unknown.data_chunk)
|
||||
writers.write_bytes(w, action.unknown.data_chunk)
|
||||
writers.write_bytes_unchecked(w, action.unknown.data_chunk)
|
||||
|
||||
bytes_left -= len(action.unknown.data_chunk)
|
||||
if bytes_left < 0:
|
||||
|
@ -34,7 +34,7 @@ async def sign_tx(
|
||||
await _init(ctx, sha, msg)
|
||||
await _actions(ctx, sha, msg.num_actions)
|
||||
writers.write_variant32(sha, 0)
|
||||
writers.write_bytes(sha, bytearray(32))
|
||||
writers.write_bytes_unchecked(sha, bytearray(32))
|
||||
|
||||
digest = sha.get_digest()
|
||||
signature = secp256k1.sign(
|
||||
@ -45,7 +45,7 @@ async def sign_tx(
|
||||
|
||||
|
||||
async def _init(ctx: wire.Context, sha: HashWriter, msg: EosSignTx) -> None:
|
||||
writers.write_bytes(sha, msg.chain_id)
|
||||
writers.write_bytes_unchecked(sha, msg.chain_id)
|
||||
writers.write_header(sha, msg.header)
|
||||
writers.write_variant32(sha, 0)
|
||||
writers.write_variant32(sha, msg.num_actions)
|
||||
|
@ -1,5 +1,5 @@
|
||||
from apps.common.writers import (
|
||||
write_bytes,
|
||||
write_bytes_unchecked,
|
||||
write_uint8,
|
||||
write_uint16_le,
|
||||
write_uint32_le,
|
||||
@ -31,7 +31,7 @@ def write_auth(w: Writer, auth: EosAuthorization) -> None:
|
||||
write_variant32(w, len(auth.keys))
|
||||
for key in auth.keys:
|
||||
write_variant32(w, key.type)
|
||||
write_bytes(w, key.key)
|
||||
write_bytes_unchecked(w, key.key)
|
||||
write_uint16_le(w, key.weight)
|
||||
|
||||
write_variant32(w, len(auth.accounts))
|
||||
@ -60,7 +60,7 @@ def write_action_transfer(w: Writer, msg: EosActionTransfer) -> None:
|
||||
write_uint64_le(w, msg.receiver)
|
||||
write_asset(w, msg.quantity)
|
||||
write_variant32(w, len(msg.memo))
|
||||
write_bytes(w, msg.memo)
|
||||
write_bytes_unchecked(w, msg.memo)
|
||||
|
||||
|
||||
def write_action_buyram(w: Writer, msg: EosActionBuyRam) -> None:
|
||||
@ -162,4 +162,4 @@ def write_variant32(w: Writer, value: int) -> None:
|
||||
variant.append(b)
|
||||
if value == 0:
|
||||
break
|
||||
write_bytes(w, bytes(variant))
|
||||
write_bytes_unchecked(w, bytes(variant))
|
||||
|
@ -542,6 +542,8 @@ def token_by_chain_address(chain_id, address):
|
||||
return (chain_id, address, "CPAL", 8) # eth / CreatorPAL
|
||||
elif address == b"\x0e\xbb\x61\x42\x04\xe4\x7c\x09\xb6\xc3\xfe\xb9\xaa\xec\xad\x8e\xe0\x60\xe2\x3e":
|
||||
return (chain_id, address, "CPAY", 0) # eth / Cryptopay
|
||||
elif address == b"\xfa\xe4\xee\x59\xcd\xd8\x6e\x3b\xe9\xe8\xb9\x0b\x53\xaa\x86\x63\x27\xd7\xc0\x90":
|
||||
return (chain_id, address, "CPC", 18) # eth / CPChain
|
||||
elif address == b"\xb7\x87\xd4\xea\xc8\x89\x97\x30\xbb\x8c\x57\xfc\x3c\x99\x8c\x49\xc5\x24\x4e\xc0":
|
||||
return (chain_id, address, "CPEX", 8) # eth / CoinPulseToken
|
||||
elif address == b"\x70\x64\xaa\xb3\x9a\x0f\xcf\x72\x21\xc3\x39\x67\x19\xd0\x91\x7a\x65\xe3\x55\x15":
|
||||
|
@ -11,7 +11,7 @@ from trezor.ui.num_input import NumInput
|
||||
from trezor.ui.scroll import Paginated
|
||||
from trezor.ui.text import Text
|
||||
|
||||
from apps.common.confirm import confirm, hold_to_confirm, require_confirm
|
||||
from apps.common.confirm import confirm, require_confirm, require_hold_to_confirm
|
||||
from apps.common.layout import show_success
|
||||
|
||||
if __debug__:
|
||||
@ -127,7 +127,9 @@ async def _show_share_words(ctx, share_words, share_index=None, group_index=None
|
||||
utils.ensure(share_words == shares_words_check)
|
||||
|
||||
# confirm the share
|
||||
await hold_to_confirm(ctx, paginated, ButtonRequestType.ResetDevice)
|
||||
await require_hold_to_confirm(
|
||||
ctx, paginated, ButtonRequestType.ResetDevice, cancel=False
|
||||
)
|
||||
|
||||
|
||||
def _split_share_into_pages(share_words):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from trezor.messages.NEMTransactionCommon import NEMTransactionCommon
|
||||
|
||||
from apps.common.writers import write_bytes, write_uint32_le, write_uint64_le
|
||||
from apps.common.writers import write_bytes_unchecked, write_uint32_le, write_uint64_le
|
||||
|
||||
|
||||
def serialize_tx_common(
|
||||
@ -26,4 +26,4 @@ def serialize_tx_common(
|
||||
|
||||
def write_bytes_with_len(w, buf: bytes):
|
||||
write_uint32_le(w, len(buf))
|
||||
write_bytes(w, buf)
|
||||
write_bytes_unchecked(w, buf)
|
||||
|
@ -63,9 +63,9 @@ def write(w: bytearray, field: dict, value):
|
||||
elif field["type"] == FIELD_TYPE_AMOUNT:
|
||||
w.extend(serialize_amount(value))
|
||||
elif field["type"] == FIELD_TYPE_ACCOUNT:
|
||||
write_bytes(w, helpers.decode_address(value))
|
||||
write_bytes_varint(w, helpers.decode_address(value))
|
||||
elif field["type"] == FIELD_TYPE_VL:
|
||||
write_bytes(w, value)
|
||||
write_bytes_varint(w, value)
|
||||
else:
|
||||
raise ValueError("Unknown field type")
|
||||
|
||||
@ -91,7 +91,7 @@ def serialize_amount(value: int) -> bytearray:
|
||||
return b
|
||||
|
||||
|
||||
def write_bytes(w: bytearray, value: bytes):
|
||||
def write_bytes_varint(w: bytearray, value: bytes):
|
||||
"""Serialize a variable length bytes."""
|
||||
write_varint(w, len(value))
|
||||
w.extend(value)
|
||||
|
@ -119,7 +119,7 @@ def write_set_options_op(w, msg: StellarSetOptionsOp):
|
||||
elif msg.signer_type in consts.SIGN_TYPES:
|
||||
writers.write_bool(w, True)
|
||||
writers.write_uint32(w, msg.signer_type)
|
||||
writers.write_bytes(w, msg.signer_key)
|
||||
writers.write_bytes_unchecked(w, msg.signer_key)
|
||||
writers.write_uint32(w, msg.signer_weight)
|
||||
else:
|
||||
raise ProcessError("Stellar: unknown signer type")
|
||||
@ -146,10 +146,10 @@ def _write_asset_code(w, asset_type: int, asset_code: str):
|
||||
return # nothing is needed
|
||||
elif asset_type == consts.ASSET_TYPE_ALPHANUM4:
|
||||
# pad with zeros to 4 chars
|
||||
writers.write_bytes(w, code + bytearray([0] * (4 - len(code))))
|
||||
writers.write_bytes_unchecked(w, code + bytearray([0] * (4 - len(code))))
|
||||
elif asset_type == consts.ASSET_TYPE_ALPHANUM12:
|
||||
# pad with zeros to 12 chars
|
||||
writers.write_bytes(w, code + bytearray([0] * (12 - len(code))))
|
||||
writers.write_bytes_unchecked(w, code + bytearray([0] * (12 - len(code))))
|
||||
else:
|
||||
raise ProcessError("Stellar: invalid asset type")
|
||||
|
||||
|
@ -47,8 +47,8 @@ async def _final(ctx, w: bytearray, msg: StellarSignTx):
|
||||
|
||||
async def _init(ctx, w: bytearray, pubkey: bytes, msg: StellarSignTx):
|
||||
network_passphrase_hash = sha256(msg.network_passphrase).digest()
|
||||
writers.write_bytes(w, network_passphrase_hash)
|
||||
writers.write_bytes(w, consts.TX_TYPE)
|
||||
writers.write_bytes_unchecked(w, network_passphrase_hash)
|
||||
writers.write_bytes_unchecked(w, consts.TX_TYPE)
|
||||
|
||||
address = helpers.address_from_public_key(pubkey)
|
||||
accounts_match = msg.source_account == address
|
||||
@ -103,7 +103,7 @@ async def _memo(ctx, w: bytearray, msg: StellarSignTx):
|
||||
memo_confirm_text = str(msg.memo_id)
|
||||
elif msg.memo_type in (consts.MEMO_TYPE_HASH, consts.MEMO_TYPE_RETURN):
|
||||
# Hash/Return: 32 byte hash
|
||||
writers.write_bytes(w, bytearray(msg.memo_hash))
|
||||
writers.write_bytes_unchecked(w, bytearray(msg.memo_hash))
|
||||
memo_confirm_text = hexlify(msg.memo_hash).decode()
|
||||
else:
|
||||
raise ProcessError("Stellar invalid memo type")
|
||||
|
@ -1,6 +1,6 @@
|
||||
from .helpers import public_key_from_address
|
||||
|
||||
from apps.common.writers import write_bytes, write_uint32_be, write_uint64_be
|
||||
from apps.common.writers import write_bytes_unchecked, write_uint32_be, write_uint64_be
|
||||
|
||||
write_uint32 = write_uint32_be
|
||||
write_uint64 = write_uint64_be
|
||||
@ -16,11 +16,11 @@ def write_string(w, s: AnyStr) -> None:
|
||||
else:
|
||||
buf = s
|
||||
write_uint32(w, len(buf))
|
||||
write_bytes(w, buf)
|
||||
write_bytes_unchecked(w, buf)
|
||||
# if len isn't a multiple of 4, add padding bytes
|
||||
reminder = len(buf) % 4
|
||||
if reminder:
|
||||
write_bytes(w, bytes([0] * (4 - reminder)))
|
||||
write_bytes_unchecked(w, bytes([0] * (4 - reminder)))
|
||||
|
||||
|
||||
def write_bool(w, val: bool):
|
||||
@ -33,4 +33,4 @@ def write_bool(w, val: bool):
|
||||
def write_pubkey(w, address: str):
|
||||
# first 4 bytes of an address are the type, there's only one type (0)
|
||||
write_uint32(w, 0)
|
||||
write_bytes(w, public_key_from_address(address))
|
||||
write_bytes_unchecked(w, public_key_from_address(address))
|
||||
|
@ -3,7 +3,7 @@ from micropython import const
|
||||
from trezor.crypto import base58
|
||||
|
||||
from apps.common import HARDENED
|
||||
from apps.common.writers import write_uint8
|
||||
from apps.common.writers import write_bytes_unchecked, write_uint8
|
||||
|
||||
TEZOS_AMOUNT_DECIMALS = const(6)
|
||||
TEZOS_ED25519_ADDRESS_PREFIX = "tz1"
|
||||
@ -96,3 +96,7 @@ def write_bool(w: bytearray, boolean: bool):
|
||||
write_uint8(w, 255)
|
||||
else:
|
||||
write_uint8(w, 0)
|
||||
|
||||
|
||||
def write_instruction(w: bytearray, instruction: str) -> int:
|
||||
write_bytes_unchecked(w, MICHELSON_INSTRUCTION_BYTES[instruction])
|
||||
|
@ -7,7 +7,7 @@ from trezor.messages import TezosBallotType, TezosContractType
|
||||
from trezor.messages.TezosSignedTx import TezosSignedTx
|
||||
|
||||
from apps.common import paths
|
||||
from apps.common.writers import write_bytes, write_uint8, write_uint32_be
|
||||
from apps.common.writers import write_bytes_unchecked, write_uint8, write_uint32_be
|
||||
from apps.tezos import CURVE, helpers, layout
|
||||
|
||||
PROPOSAL_LENGTH = const(32)
|
||||
@ -157,13 +157,13 @@ def _get_ballot(ballot):
|
||||
|
||||
|
||||
def _get_operation_bytes(w: bytearray, msg):
|
||||
write_bytes(w, msg.branch)
|
||||
write_bytes_unchecked(w, msg.branch)
|
||||
|
||||
# when the account sends first operation in lifetime,
|
||||
# we need to reveal its public key
|
||||
if msg.reveal is not None:
|
||||
_encode_common(w, msg.reveal, "reveal")
|
||||
write_bytes(w, msg.reveal.public_key)
|
||||
write_bytes_unchecked(w, msg.reveal.public_key)
|
||||
|
||||
# transaction operation
|
||||
if msg.transaction is not None:
|
||||
@ -194,7 +194,7 @@ def _get_operation_bytes(w: bytearray, msg):
|
||||
_encode_common(w, msg.origination, "origination")
|
||||
_encode_zarith(w, msg.origination.balance)
|
||||
_encode_data_with_bool_prefix(w, msg.origination.delegate)
|
||||
write_bytes(w, msg.origination.script)
|
||||
write_bytes_unchecked(w, msg.origination.script)
|
||||
|
||||
# delegation operation
|
||||
elif msg.delegation is not None:
|
||||
@ -214,7 +214,7 @@ def _encode_common(w: bytearray, operation, str_operation):
|
||||
"delegation": 110,
|
||||
}
|
||||
write_uint8(w, operation_tags[str_operation])
|
||||
write_bytes(w, operation.source)
|
||||
write_bytes_unchecked(w, operation.source)
|
||||
_encode_zarith(w, operation.fee)
|
||||
_encode_zarith(w, operation.counter)
|
||||
_encode_zarith(w, operation.gas_limit)
|
||||
@ -223,13 +223,13 @@ def _encode_common(w: bytearray, operation, str_operation):
|
||||
|
||||
def _encode_contract_id(w: bytearray, contract_id):
|
||||
write_uint8(w, contract_id.tag)
|
||||
write_bytes(w, contract_id.hash)
|
||||
write_bytes_unchecked(w, contract_id.hash)
|
||||
|
||||
|
||||
def _encode_data_with_bool_prefix(w: bytearray, data):
|
||||
if data:
|
||||
helpers.write_bool(w, True)
|
||||
write_bytes(w, data)
|
||||
write_bytes_unchecked(w, data)
|
||||
else:
|
||||
helpers.write_bool(w, False)
|
||||
|
||||
@ -250,20 +250,20 @@ def _encode_proposal(w: bytearray, proposal):
|
||||
proposal_tag = 5
|
||||
|
||||
write_uint8(w, proposal_tag)
|
||||
write_bytes(w, proposal.source)
|
||||
write_bytes_unchecked(w, proposal.source)
|
||||
write_uint32_be(w, proposal.period)
|
||||
write_uint32_be(w, len(proposal.proposals) * PROPOSAL_LENGTH)
|
||||
for proposal_hash in proposal.proposals:
|
||||
write_bytes(w, proposal_hash)
|
||||
write_bytes_unchecked(w, proposal_hash)
|
||||
|
||||
|
||||
def _encode_ballot(w: bytearray, ballot):
|
||||
ballot_tag = 6
|
||||
|
||||
write_uint8(w, ballot_tag)
|
||||
write_bytes(w, ballot.source)
|
||||
write_bytes_unchecked(w, ballot.source)
|
||||
write_uint32_be(w, ballot.period)
|
||||
write_bytes(w, ballot.proposal)
|
||||
write_bytes_unchecked(w, ballot.proposal)
|
||||
write_uint8(w, ballot.ballot)
|
||||
|
||||
|
||||
@ -295,16 +295,16 @@ def _encode_manager_common(w: bytearray, sequence_length, operation, to_contract
|
||||
write_uint32_be(w, argument_length)
|
||||
write_uint8(w, helpers.MICHELSON_SEQUENCE_TAG)
|
||||
write_uint32_be(w, sequence_length)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["DROP"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["NIL"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["operation"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES[operation])
|
||||
helpers.write_instruction(w, "DROP")
|
||||
helpers.write_instruction(w, "NIL")
|
||||
helpers.write_instruction(w, "operation")
|
||||
helpers.write_instruction(w, operation)
|
||||
if to_contract is True:
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["address"])
|
||||
helpers.write_instruction(w, "address")
|
||||
else:
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["key_hash"])
|
||||
helpers.write_instruction(w, "key_hash")
|
||||
if operation == "PUSH":
|
||||
write_bytes(w, bytes([10])) # byte sequence
|
||||
write_bytes_unchecked(w, bytes([10])) # byte sequence
|
||||
if to_contract is True:
|
||||
write_uint32_be(w, SMART_CONTRACT_ADDRESS_LENGTH)
|
||||
else:
|
||||
@ -319,14 +319,14 @@ def _encode_manager_to_implicit_transfer(w: bytearray, manager_transfer):
|
||||
sequence_length = MICHELSON_LENGTH + len(value_natural)
|
||||
|
||||
_encode_manager_common(w, sequence_length, "PUSH")
|
||||
write_bytes(w, manager_transfer.destination.hash)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["IMPLICIT_ACCOUNT"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["PUSH"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["mutez"])
|
||||
write_bytes_unchecked(w, manager_transfer.destination.hash)
|
||||
helpers.write_instruction(w, "IMPLICIT_ACCOUNT")
|
||||
helpers.write_instruction(w, "PUSH")
|
||||
helpers.write_instruction(w, "mutez")
|
||||
_encode_natural(w, manager_transfer.amount)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["UNIT"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["TRANSFER_TOKENS"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["CONS"])
|
||||
helpers.write_instruction(w, "UNIT")
|
||||
helpers.write_instruction(w, "TRANSFER_TOKENS")
|
||||
helpers.write_instruction(w, "CONS")
|
||||
|
||||
|
||||
# smart_contract_delegation
|
||||
@ -334,17 +334,17 @@ def _encode_manager_delegation(w: bytearray, delegate):
|
||||
MICHELSON_LENGTH = 42 # length is fixed this time(no variable length fields)
|
||||
|
||||
_encode_manager_common(w, MICHELSON_LENGTH, "PUSH")
|
||||
write_bytes(w, delegate)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["SOME"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["SET_DELEGATE"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["CONS"])
|
||||
write_bytes_unchecked(w, delegate)
|
||||
helpers.write_instruction(w, "SOME")
|
||||
helpers.write_instruction(w, "SET_DELEGATE")
|
||||
helpers.write_instruction(w, "CONS")
|
||||
|
||||
|
||||
def _encode_manager_delegation_remove(w: bytearray):
|
||||
MICHELSON_LENGTH = 14 # length is fixed this time(no variable length fields)
|
||||
_encode_manager_common(w, MICHELSON_LENGTH, "NONE")
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["SET_DELEGATE"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["CONS"])
|
||||
helpers.write_instruction(w, "SET_DELEGATE")
|
||||
helpers.write_instruction(w, "CONS")
|
||||
|
||||
|
||||
def _encode_manager_to_manager_transfer(w: bytearray, manager_transfer):
|
||||
@ -356,12 +356,12 @@ def _encode_manager_to_manager_transfer(w: bytearray, manager_transfer):
|
||||
|
||||
_encode_manager_common(w, sequence_length, "PUSH", to_contract=True)
|
||||
_encode_contract_id(w, manager_transfer.destination)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["CONTRACT"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["unit"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["ASSERT_SOME"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["PUSH"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["mutez"])
|
||||
helpers.write_instruction(w, "CONTRACT")
|
||||
helpers.write_instruction(w, "unit")
|
||||
helpers.write_instruction(w, "ASSERT_SOME")
|
||||
helpers.write_instruction(w, "PUSH")
|
||||
helpers.write_instruction(w, "mutez")
|
||||
_encode_natural(w, manager_transfer.amount)
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["UNIT"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["TRANSFER_TOKENS"])
|
||||
write_bytes(w, helpers.MICHELSON_INSTRUCTION_BYTES["CONS"])
|
||||
helpers.write_instruction(w, "UNIT")
|
||||
helpers.write_instruction(w, "TRANSFER_TOKENS")
|
||||
helpers.write_instruction(w, "CONS")
|
||||
|
@ -1,6 +1,7 @@
|
||||
import gc
|
||||
|
||||
from trezor.messages import InputScriptType
|
||||
from trezor import utils
|
||||
from trezor.messages import FailureType, InputScriptType, OutputScriptType
|
||||
from trezor.messages.RequestType import (
|
||||
TXEXTRADATA,
|
||||
TXFINISHED,
|
||||
@ -14,10 +15,40 @@ from trezor.messages.TxInputType import TxInputType
|
||||
from trezor.messages.TxOutputBinType import TxOutputBinType
|
||||
from trezor.messages.TxOutputType import TxOutputType
|
||||
from trezor.messages.TxRequest import TxRequest
|
||||
from trezor.utils import obj_eq
|
||||
|
||||
from .signing import SigningError
|
||||
from .writers import TX_HASH_SIZE
|
||||
|
||||
from apps.common.coininfo import CoinInfo
|
||||
|
||||
if False:
|
||||
from typing import Union
|
||||
|
||||
MULTISIG_INPUT_SCRIPT_TYPES = (
|
||||
InputScriptType.SPENDMULTISIG,
|
||||
InputScriptType.SPENDP2SHWITNESS,
|
||||
InputScriptType.SPENDWITNESS,
|
||||
)
|
||||
MULTISIG_OUTPUT_SCRIPT_TYPES = (
|
||||
OutputScriptType.PAYTOMULTISIG,
|
||||
OutputScriptType.PAYTOP2SHWITNESS,
|
||||
OutputScriptType.PAYTOWITNESS,
|
||||
)
|
||||
|
||||
CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES = {
|
||||
OutputScriptType.PAYTOADDRESS: InputScriptType.SPENDADDRESS,
|
||||
OutputScriptType.PAYTOMULTISIG: InputScriptType.SPENDMULTISIG,
|
||||
OutputScriptType.PAYTOP2SHWITNESS: InputScriptType.SPENDP2SHWITNESS,
|
||||
OutputScriptType.PAYTOWITNESS: InputScriptType.SPENDWITNESS,
|
||||
}
|
||||
INTERNAL_INPUT_SCRIPT_TYPES = tuple(CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES.values())
|
||||
CHANGE_OUTPUT_SCRIPT_TYPES = tuple(CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES.keys())
|
||||
|
||||
SEGWIT_INPUT_SCRIPT_TYPES = {
|
||||
InputScriptType.SPENDP2SHWITNESS,
|
||||
InputScriptType.SPENDWITNESS,
|
||||
}
|
||||
|
||||
# Machine instructions
|
||||
# ===
|
||||
|
||||
@ -27,7 +58,7 @@ class UiConfirmOutput:
|
||||
self.output = output
|
||||
self.coin = coin
|
||||
|
||||
__eq__ = obj_eq
|
||||
__eq__ = utils.obj_eq
|
||||
|
||||
|
||||
class UiConfirmTotal:
|
||||
@ -36,7 +67,7 @@ class UiConfirmTotal:
|
||||
self.fee = fee
|
||||
self.coin = coin
|
||||
|
||||
__eq__ = obj_eq
|
||||
__eq__ = utils.obj_eq
|
||||
|
||||
|
||||
class UiConfirmFeeOverThreshold:
|
||||
@ -44,21 +75,21 @@ class UiConfirmFeeOverThreshold:
|
||||
self.fee = fee
|
||||
self.coin = coin
|
||||
|
||||
__eq__ = obj_eq
|
||||
__eq__ = utils.obj_eq
|
||||
|
||||
|
||||
class UiConfirmForeignAddress:
|
||||
def __init__(self, address_n: list):
|
||||
self.address_n = address_n
|
||||
|
||||
__eq__ = obj_eq
|
||||
__eq__ = utils.obj_eq
|
||||
|
||||
|
||||
class UiConfirmNonDefaultLocktime:
|
||||
def __init__(self, lock_time: int):
|
||||
self.lock_time = lock_time
|
||||
|
||||
__eq__ = obj_eq
|
||||
__eq__ = utils.obj_eq
|
||||
|
||||
|
||||
def confirm_output(output: TxOutputType, coin: CoinInfo):
|
||||
@ -81,14 +112,14 @@ def confirm_nondefault_locktime(lock_time: int):
|
||||
return (yield UiConfirmNonDefaultLocktime(lock_time))
|
||||
|
||||
|
||||
def request_tx_meta(tx_req: TxRequest, tx_hash: bytes = None):
|
||||
def request_tx_meta(tx_req: TxRequest, coin: CoinInfo, tx_hash: bytes = None):
|
||||
tx_req.request_type = TXMETA
|
||||
tx_req.details.tx_hash = tx_hash
|
||||
tx_req.details.request_index = None
|
||||
ack = yield tx_req
|
||||
tx_req.serialized = None
|
||||
gc.collect()
|
||||
return sanitize_tx_meta(ack.tx)
|
||||
return sanitize_tx_meta(ack.tx, coin)
|
||||
|
||||
|
||||
def request_tx_extra_data(
|
||||
@ -107,17 +138,17 @@ def request_tx_extra_data(
|
||||
return ack.tx.extra_data
|
||||
|
||||
|
||||
def request_tx_input(tx_req: TxRequest, i: int, tx_hash: bytes = None):
|
||||
def request_tx_input(tx_req: TxRequest, i: int, coin: CoinInfo, tx_hash: bytes = None):
|
||||
tx_req.request_type = TXINPUT
|
||||
tx_req.details.request_index = i
|
||||
tx_req.details.tx_hash = tx_hash
|
||||
ack = yield tx_req
|
||||
tx_req.serialized = None
|
||||
gc.collect()
|
||||
return sanitize_tx_input(ack.tx)
|
||||
return sanitize_tx_input(ack.tx, coin)
|
||||
|
||||
|
||||
def request_tx_output(tx_req: TxRequest, i: int, tx_hash: bytes = None):
|
||||
def request_tx_output(tx_req: TxRequest, i: int, coin: CoinInfo, tx_hash: bytes = None):
|
||||
tx_req.request_type = TXOUTPUT
|
||||
tx_req.details.request_index = i
|
||||
tx_req.details.tx_hash = tx_hash
|
||||
@ -125,9 +156,9 @@ def request_tx_output(tx_req: TxRequest, i: int, tx_hash: bytes = None):
|
||||
tx_req.serialized = None
|
||||
gc.collect()
|
||||
if tx_hash is None:
|
||||
return sanitize_tx_output(ack.tx)
|
||||
return sanitize_tx_output(ack.tx, coin)
|
||||
else:
|
||||
return sanitize_tx_binoutput(ack.tx)
|
||||
return sanitize_tx_binoutput(ack.tx, coin)
|
||||
|
||||
|
||||
def request_tx_finish(tx_req: TxRequest):
|
||||
@ -142,42 +173,129 @@ def request_tx_finish(tx_req: TxRequest):
|
||||
# ===
|
||||
|
||||
|
||||
def sanitize_sign_tx(tx: SignTx) -> SignTx:
|
||||
def sanitize_sign_tx(tx: SignTx, coin: CoinInfo) -> SignTx:
|
||||
tx.version = tx.version if tx.version is not None else 1
|
||||
tx.lock_time = tx.lock_time if tx.lock_time is not None else 0
|
||||
tx.inputs_count = tx.inputs_count if tx.inputs_count is not None else 0
|
||||
tx.outputs_count = tx.outputs_count if tx.outputs_count is not None else 0
|
||||
tx.coin_name = tx.coin_name if tx.coin_name is not None else "Bitcoin"
|
||||
tx.expiry = tx.expiry if tx.expiry is not None else 0
|
||||
tx.overwintered = tx.overwintered if tx.overwintered is not None else False
|
||||
tx.timestamp = tx.timestamp if tx.timestamp is not None else 0
|
||||
if coin.decred or coin.overwintered:
|
||||
tx.expiry = tx.expiry if tx.expiry is not None else 0
|
||||
elif tx.expiry:
|
||||
raise SigningError(FailureType.DataError, "Expiry not enabled on this coin.")
|
||||
if coin.timestamp and not tx.timestamp:
|
||||
raise SigningError(FailureType.DataError, "Timestamp must be set.")
|
||||
elif not coin.timestamp and tx.timestamp:
|
||||
raise SigningError(FailureType.DataError, "Timestamp not enabled on this coin.")
|
||||
return tx
|
||||
|
||||
|
||||
def sanitize_tx_meta(tx: TransactionType) -> TransactionType:
|
||||
def sanitize_tx_meta(tx: TransactionType, coin: CoinInfo) -> TransactionType:
|
||||
tx.version = tx.version if tx.version is not None else 1
|
||||
tx.lock_time = tx.lock_time if tx.lock_time is not None else 0
|
||||
tx.inputs_cnt = tx.inputs_cnt if tx.inputs_cnt is not None else 0
|
||||
tx.outputs_cnt = tx.outputs_cnt if tx.outputs_cnt is not None else 0
|
||||
tx.extra_data_len = tx.extra_data_len if tx.extra_data_len is not None else 0
|
||||
tx.expiry = tx.expiry if tx.expiry is not None else 0
|
||||
tx.overwintered = tx.overwintered if tx.overwintered is not None else False
|
||||
tx.timestamp = tx.timestamp if tx.timestamp is not None else 0
|
||||
if coin.extra_data:
|
||||
tx.extra_data_len = tx.extra_data_len if tx.extra_data_len is not None else 0
|
||||
elif tx.extra_data_len:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Extra data not enabled on this coin."
|
||||
)
|
||||
if coin.decred or coin.overwintered:
|
||||
tx.expiry = tx.expiry if tx.expiry is not None else 0
|
||||
elif tx.expiry:
|
||||
raise SigningError(FailureType.DataError, "Expiry not enabled on this coin.")
|
||||
if coin.timestamp and not tx.timestamp:
|
||||
raise SigningError(FailureType.DataError, "Timestamp must be set.")
|
||||
elif not coin.timestamp and tx.timestamp:
|
||||
raise SigningError(FailureType.DataError, "Timestamp not enabled on this coin.")
|
||||
return tx
|
||||
|
||||
|
||||
def sanitize_tx_input(tx: TransactionType) -> TxInputType:
|
||||
def sanitize_tx_input(tx: TransactionType, coin: CoinInfo) -> TxInputType:
|
||||
txi = tx.inputs[0]
|
||||
if txi.script_type is None:
|
||||
txi.script_type = InputScriptType.SPENDADDRESS
|
||||
if txi.sequence is None:
|
||||
txi.sequence = 0xFFFFFFFF
|
||||
if txi.prev_hash is None or len(txi.prev_hash) != TX_HASH_SIZE:
|
||||
raise SigningError(FailureType.DataError, "Provided prev_hash is invalid.")
|
||||
if txi.multisig and txi.script_type not in MULTISIG_INPUT_SCRIPT_TYPES:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Multisig field provided but not expected.",
|
||||
)
|
||||
if txi.address_n and txi.script_type not in INTERNAL_INPUT_SCRIPT_TYPES:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Input's address_n provided but not expected.",
|
||||
)
|
||||
if not coin.decred and txi.decred_tree is not None:
|
||||
raise SigningError(
|
||||
FailureType.DataError,
|
||||
"Decred details provided but Decred coin not specified.",
|
||||
)
|
||||
if txi.script_type in SEGWIT_INPUT_SCRIPT_TYPES:
|
||||
if not coin.segwit:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Segwit not enabled on this coin",
|
||||
)
|
||||
if txi.amount is None:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Segwit input without amount",
|
||||
)
|
||||
|
||||
_sanitize_decred(txi, coin)
|
||||
return txi
|
||||
|
||||
|
||||
def sanitize_tx_output(tx: TransactionType) -> TxOutputType:
|
||||
return tx.outputs[0]
|
||||
def sanitize_tx_output(tx: TransactionType, coin: CoinInfo) -> TxOutputType:
|
||||
txo = tx.outputs[0]
|
||||
if txo.multisig and txo.script_type not in MULTISIG_OUTPUT_SCRIPT_TYPES:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Multisig field provided but not expected.",
|
||||
)
|
||||
if txo.address_n and txo.script_type not in CHANGE_OUTPUT_SCRIPT_TYPES:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Output's address_n provided but not expected.",
|
||||
)
|
||||
if txo.script_type == OutputScriptType.PAYTOOPRETURN:
|
||||
# op_return output
|
||||
if txo.amount != 0:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "OP_RETURN output with non-zero amount"
|
||||
)
|
||||
if txo.address or txo.address_n or txo.multisig:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "OP_RETURN output with address or multisig"
|
||||
)
|
||||
else:
|
||||
if txo.op_return_data:
|
||||
raise SigningError(
|
||||
FailureType.DataError,
|
||||
"OP RETURN data provided but not OP RETURN script type.",
|
||||
)
|
||||
if txo.address_n and txo.address:
|
||||
raise SigningError(
|
||||
FailureType.DataError, "Both address and address_n provided."
|
||||
)
|
||||
if not txo.address_n and not txo.address:
|
||||
raise SigningError(FailureType.DataError, "Missing address")
|
||||
|
||||
_sanitize_decred(txo, coin)
|
||||
|
||||
return txo
|
||||
|
||||
|
||||
def sanitize_tx_binoutput(tx: TransactionType) -> TxOutputBinType:
|
||||
return tx.bin_outputs[0]
|
||||
def sanitize_tx_binoutput(tx: TransactionType, coin: CoinInfo) -> TxOutputBinType:
|
||||
txo_bin = tx.bin_outputs[0]
|
||||
_sanitize_decred(txo_bin, coin)
|
||||
return txo_bin
|
||||
|
||||
|
||||
def _sanitize_decred(
|
||||
tx: Union[TxInputType, TxOutputType, TxOutputBinType], coin: CoinInfo
|
||||
):
|
||||
if not coin.decred and tx.decred_script_version is not None:
|
||||
raise SigningError(
|
||||
FailureType.DataError,
|
||||
"Decred details provided but Decred coin not specified.",
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ from trezor.messages.HDNodeType import HDNodeType
|
||||
from trezor.messages.MultisigRedeemScriptType import MultisigRedeemScriptType
|
||||
from trezor.utils import HashWriter, ensure
|
||||
|
||||
from apps.wallet.sign_tx.writers import write_bytes, write_uint32
|
||||
from apps.wallet.sign_tx.writers import write_bytes_fixed, write_uint32
|
||||
|
||||
|
||||
class MultisigError(ValueError):
|
||||
@ -59,8 +59,8 @@ def multisig_fingerprint(multisig: MultisigRedeemScriptType) -> bytes:
|
||||
write_uint32(h, d.depth)
|
||||
write_uint32(h, d.fingerprint)
|
||||
write_uint32(h, d.child_num)
|
||||
write_bytes(h, d.chain_code)
|
||||
write_bytes(h, d.public_key)
|
||||
write_bytes_fixed(h, d.chain_code, 32)
|
||||
write_bytes_fixed(h, d.public_key, 33)
|
||||
|
||||
return h.get_digest()
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user