What changed, and why it matters
This commit removes all support for the NEM and EOS cryptocurrencies from Trezor firmware. It deletes the application code, protocol definitions, cryptographic helpers, translations, tests, and support entries for both coins. The change is a feature removal, not a security fix, and does not introduce any vulnerability.
No security action required. Treat as a normal feature-removal release note. Users relying on NEM or EOS should migrate to alternative wallets before upgrading firmware or client software.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit is a large-scale cleanup that drops NEM and EOS support across the Trezor firmware stack. It removes Python apps under core/src/apps/eos and core/src/apps/nem, deletes protobuf files messages-eos.proto and messages-nem.proto, reserves the corresponding MessageType IDs, marks Capability_EOS and Capability_NEM as deprecated, removes crypto helpers (nem.c/h, EOS canonical signature logic), drops feature flags, removes translation strings, and updates support.json and coin tooling. No new code paths or security-relevant behavior are added.
Changed components
Trezor Core firmwareTrezor legacy firmwaretrezorlib Python clienttrezor-client Rust clientcommon coin definitions and protobuf messagesNEM/EOS application code and testsInspect captured patch +5244 / −35002
### common/defs/README.md
@@ -50,13 +50,9 @@ network or token is included in the external definitions. A good place to start
to the [tokens](https://github.com/ethereum-lists/tokens) repository, or your EVM chain to the
[chains](https://github.com/ethereum-lists/chains) repository.
-#### `nem`
-
-The file [`nem/nem_mosaics.json`](nem/nem_mosaics.json) describes NEM mosaics.
-
#### `misc`
-Supported coins that are not derived from Bitcoin, Ethereum or NEM are currently grouped
+Supported coins that are not derived from Bitcoin or Ethereum are currently grouped
and listed in separate file [`misc/misc.json`](misc/misc.json). Each coin must also have
an icon in `misc/<short>.png`, where `short` is lowercased `shortcut` field from the JSON.
@@ -68,7 +64,6 @@ generated from the coin's type and shortcut:
* for Bitcoin-likes, key is `bitcoin:<shortcut>`
* for Ethereum networks, key is `eth:<shortcut>:<chain_id>`
* for ERC20 tokens, key is `erc20:<chain_symbol>:<token_shortcut>`
-* for NEM mosaic, key is `nem:<shortcut>`
* for others, key is `misc:<shortcut>`
If a token shortcut has a suffix, such as `CAT (BlockCat)`, the whole thing is part
### common/defs/misc/eos.png
[binary or diff unavailable]
### common/defs/misc/misc.json
@@ -55,13 +55,6 @@
"curve": "ed25519",
"decimals": 6
},
- {
- "name": "EOS",
- "shortcut": "EOS",
- "slip44": 194,
- "curve": "secp256k1",
- "decimals": 4
- },
{
"name": "MaidSafeCoin",
"shortcut": "MAID",
### common/defs/nem/nem_mosaics.json
@@ -1,85 +0,0 @@
-[
- {
- "name": "NEM",
- "ticker": "XEM",
- "namespace": "nem",
- "mosaic": "xem",
- "divisibility": 6,
- "links": {
- "Homepage": "https://nemplatform.com"
- }
- },
- {
- "name": "DIMCOIN",
- "ticker": "DIM",
- "namespace": "dim",
- "mosaic": "coin",
- "divisibility": 6,
- "levy": "MosaicLevy_Percentile",
- "fee": 10,
- "levy_namespace": "dim",
- "levy_mosaic": "coin",
- "networks": [
- 104
- ],
- "links": {
- "Homepage": "https://www.dimcoin.io"
- }
- },
- {
- "name": "DIM TOKEN",
- "ticker": "DIMTOK",
- "namespace": "dim",
- "mosaic": "token",
- "divisibility": 6,
- "networks": [
- 104
- ],
- "links": {
- "Homepage": "https://www.dimcoin.io"
- }
- },
- {
- "name": "Breeze Token",
- "ticker": "BREEZE",
- "namespace": "breeze",
- "mosaic": "breeze-token",
- "divisibility": 0,
- "networks": [
- 104
- ],
- "links": {
- "Homepage": "https://breeze.chat"
- }
- },
- {
- "name": "PacNEM Game Credits",
- "ticker": "PAC:HRT",
- "namespace": "pacnem",
- "mosaic": "heart",
- "divisibility": 0,
- "networks": [
- 104
- ],
- "links": {
- "Homepage": "https://pacnem.com"
- }
- },
- {
- "name": "PacNEM Score Tokens",
- "ticker": "PAC:CHS",
- "namespace": "pacnem",
- "mosaic": "cheese",
- "divisibility": 6,
- "levy": "MosaicLevy_Percentile",
- "fee": 100,
- "levy_namespace": "nem",
- "levy_mosaic": "xem",
- "networks": [
- 104
- ],
- "links": {
- "Homepage": "https://pacnem.com"
- }
- }
-]
### common/defs/support.json
@@ -92,13 +92,7 @@
"eth:tSEP:11155111": "1.11.3",
"misc:MAID": "1.7.2",
"misc:USDT": "1.7.2",
- "misc:XLM": "1.7.1",
- "nem:BREEZE": "1.6.2",
- "nem:DIM": "1.6.2",
- "nem:DIMTOK": "1.6.2",
- "nem:PAC:CHS": "1.6.2",
- "nem:PAC:HRT": "1.6.2",
- "nem:XEM": "1.6.2"
+ "misc:XLM": "1.7.1"
},
"unsupported": {
"bitcoin:PART": "incompatible fork",
@@ -107,7 +101,6 @@
"misc:ADA": "not implemented",
"misc:BNB": "not implemented",
"misc:DSOL": "not implemented for T1",
- "misc:EOS": "not implemented",
"misc:LSK": "Incompatible mainnet hard-fork",
"misc:SOL": "not implemented for T1",
"misc:XMR": "not implemented",
@@ -228,14 +221,7 @@
"bitcoin:VTC": "not for T2B1 (#2793)",
"bitcoin:tDASH": "not for T2B1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T2B1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T2B1 (#2793)",
- "nem:DIM": "not for T2B1 (#2793)",
- "nem:DIMTOK": "not for T2B1 (#2793)",
- "nem:PAC:CHS": "not for T2B1 (#2793)",
- "nem:PAC:HRT": "not for T2B1 (#2793)",
- "nem:XEM": "not for T2B1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
},
@@ -333,7 +319,6 @@
"misc:ADA": "2.0.8",
"misc:BNB": "2.1.5",
"misc:DSOL": "2.6.4",
- "misc:EOS": "2.1.1",
"misc:MAID": "2.0.10",
"misc:SOL": "2.6.4",
"misc:USDT": "2.0.10",
@@ -343,12 +328,6 @@
"misc:XTZ": "2.0.8",
"misc:tADA": "2.0.8",
"misc:tXRP": "2.0.8",
- "nem:BREEZE": "2.0.7",
- "nem:DIM": "2.0.7",
- "nem:DIMTOK": "2.0.7",
- "nem:PAC:CHS": "2.0.7",
- "nem:PAC:HRT": "2.0.7",
- "nem:XEM": "2.0.7",
"misc:TRX": "2.10.1"
},
"unsupported": {
@@ -468,14 +447,7 @@
"bitcoin:VTC": "not for T3B1 (#2793)",
"bitcoin:tDASH": "not for T3B1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T3B1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T3B1 (#2793)",
- "nem:DIM": "not for T3B1 (#2793)",
- "nem:DIMTOK": "not for T3B1 (#2793)",
- "nem:PAC:CHS": "not for T3B1 (#2793)",
- "nem:PAC:HRT": "not for T3B1 (#2793)",
- "nem:XEM": "not for T3B1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
},
@@ -588,14 +560,7 @@
"bitcoin:VTC": "not for T3T1 (#2793)",
"bitcoin:tDASH": "not for T3T1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T3T1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T3T1 (#2793)",
- "nem:DIM": "not for T3T1 (#2793)",
- "nem:DIMTOK": "not for T3T1 (#2793)",
- "nem:PAC:CHS": "not for T3T1 (#2793)",
- "nem:PAC:HRT": "not for T3T1 (#2793)",
- "nem:XEM": "not for T3T1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
},
@@ -708,14 +673,7 @@
"bitcoin:VTC": "not for T3W1 (#2793)",
"bitcoin:tDASH": "not for T3W1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T3W1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T3W1 (#2793)",
- "nem:DIM": "not for T3W1 (#2793)",
- "nem:DIMTOK": "not for T3W1 (#2793)",
- "nem:PAC:CHS": "not for T3W1 (#2793)",
- "nem:PAC:HRT": "not for T3W1 (#2793)",
- "nem:XEM": "not for T3W1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
},
@@ -829,14 +787,7 @@
"bitcoin:VTC": "not for T3W1 (#2793)",
"bitcoin:tDASH": "not for T3W1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T3W1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T3W1 (#2793)",
- "nem:DIM": "not for T3W1 (#2793)",
- "nem:DIMTOK": "not for T3W1 (#2793)",
- "nem:PAC:CHS": "not for T3W1 (#2793)",
- "nem:PAC:HRT": "not for T3W1 (#2793)",
- "nem:XEM": "not for T3W1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
},
@@ -950,14 +901,7 @@
"bitcoin:VTC": "not for T3W1 (#2793)",
"bitcoin:tDASH": "not for T3W1 (#2793)",
"bitcoin:tPART": "incompatible fork",
- "misc:EOS": "not for T3W1 (#2793)",
"misc:LSK": "Incompatible mainnet hard-fork",
- "nem:BREEZE": "not for T3W1 (#2793)",
- "nem:DIM": "not for T3W1 (#2793)",
- "nem:DIMTOK": "not for T3W1 (#2793)",
- "nem:PAC:CHS": "not for T3W1 (#2793)",
- "nem:PAC:HRT": "not for T3W1 (#2793)",
- "nem:XEM": "not for T3W1 (#2793)",
"eth:tHOL:17000": "Deprecated testnet"
}
}
### common/protob/Makefile
@@ -1,6 +1,6 @@
.PHONY: check combine clean
-check: messages.pb messages-bitcoin.pb messages-ble.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-tron.pb messages-eos.pb messages-solana.pb messages-definitions.pb messages-telemetry.pb
+check: messages.pb messages-bitcoin.pb messages-ble.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-management.pb messages-monero.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-tron.pb messages-solana.pb messages-definitions.pb messages-telemetry.pb
%.pb: %.proto
protoc -I/usr/include -I. $< -o $@
### common/protob/check.py
@@ -27,9 +27,7 @@
prefix = filename.group(1).capitalize()
if prefix in WITHOUT_PREFIX:
continue
- if prefix == "Nem":
- prefix = "NEM"
- elif prefix == "Webauthn":
+ if prefix == "Webauthn":
prefix = "WebAuthn"
elif prefix == "Extapp":
prefix = "ExtApp"
### common/protob/messages-eos.proto
@@ -1,285 +0,0 @@
-syntax = "proto2";
-package hw.trezor.messages.eos;
-
-// Sugar for easier handling in Java
-option java_outer_classname = "TrezorMessageEos";
-option java_package = "com.satoshilabs.trezor.lib.protobuf";
-
-/**
- * Request: Ask device for Eos public key corresponding to address_n path
- * @start
- * @next EosPublicKey
- * @next Failure
- */
-message EosGetPublicKey {
- repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node 44'/194'/0'
- optional bool show_display = 2; // optionally show on display before sending the result
- optional bool chunkify = 3; // display the address in chunks of 4 characters
-}
-
-/**
- * Response: Contains an Eos public key derived from device private seed
- * @end
- */
-message EosPublicKey {
- required string wif_public_key = 1; // EOS pub key in Base58 encoding
- required bytes raw_public_key = 2; // Raw public key
-}
-
-/**
- * Request: Ask device to sign transaction
- * @start
- * @next EosTxRequest
- * @next Failure
- */
-message EosSignTx {
- repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node 44'/194'/0'
- required bytes chain_id = 2; // 256-bit long chain id
- required EosTxHeader header = 3; // EOS transaction header
- required uint32 num_actions = 4; // number of actions
- optional bool chunkify = 5; // display the address in chunks of 4 characters
-
- /**
- * Structure representing EOS transaction header
- */
- message EosTxHeader {
- required uint32 expiration = 1; // time at which transaction expires
- required uint32 ref_block_num = 2; // 16-bit specifies a block num in the last 2^16 blocks.
- required uint32 ref_block_prefix = 3; // specifies the lower 32 bits of the blockid at get_ref_blocknum
- required uint32 max_net_usage_words = 4; // upper limit on total network bandwidth (in 8
- // byte words) billed for this transaction
- required uint32 max_cpu_usage_ms = 5; // 8-bit upper limit on the total CPU time billed for this transaction
- required uint32 delay_sec = 6; // number of seconds to delay this
- // transaction for during which it may be canceled.
- }
-}
-
-/**
- * Response: Device asks to upload next action
- * @next EosTxActionAck
- */
-message EosTxActionRequest {
- optional uint32 data_size = 1;
-}
-
-/**
- * Request: Next action data that needs to be uploaded
- * @next EosTxActionRequest
- * @next EosSignedTx
- * @next Failure
- */
-message EosTxActionAck {
- required EosActionCommon common = 1;
- optional EosActionTransfer transfer = 2;
- optional EosActionDelegate delegate = 3;
- optional EosActionUndelegate undelegate = 4;
- optional EosActionRefund refund = 5;
- optional EosActionBuyRam buy_ram = 6;
- optional EosActionBuyRamBytes buy_ram_bytes = 7;
- optional EosActionSellRam sell_ram = 8;
- optional EosActionVoteProducer vote_producer = 9;
- optional EosActionUpdateAuth update_auth = 10;
- optional EosActionDeleteAuth delete_auth = 11;
- optional EosActionLinkAuth link_auth = 12;
- optional EosActionUnlinkAuth unlink_auth = 13;
- optional EosActionNewAccount new_account = 14;
- optional EosActionUnknown unknown = 15;
-
- /**
- * Structure representing asset type
- */
- message EosAsset {
- required sint64 amount = 1;
- required uint64 symbol = 2; // Lowest 8 bits used for precision.
- }
-
- /**
- * Structure representing action permission level
- */
- message EosPermissionLevel {
- required uint64 actor = 1;
- required uint64 permission = 2;
- }
-
- /**
- * Structure representing auth key
- */
- message EosAuthorizationKey {
- required uint32 type = 1;
- optional bytes key = 2; // Explicit public key bytes; when present, address_n must be empty
- repeated uint32 address_n = 3; // BIP-32 path to derive key; when filled out, key must not be present
- required uint32 weight = 4;
- }
-
- /**
- * Structure representing auth account
- */
- message EosAuthorizationAccount {
- required EosPermissionLevel account = 1;
- required uint32 weight = 2;
- }
-
- /**
- * Structure representing auth delays
- */
- message EosAuthorizationWait {
- required uint32 wait_sec = 1;
- required uint32 weight = 2;
- }
-
- /**
- * Structure representing authorization settings
- */
- message EosAuthorization {
- required uint32 threshold = 1;
- repeated EosAuthorizationKey keys = 2;
- repeated EosAuthorizationAccount accounts = 3;
- repeated EosAuthorizationWait waits = 4;
- }
-
- /**
- * Structure representing the common part of every action
- */
- message EosActionCommon {
- required uint64 account = 1; // Contract name
- required uint64 name = 2; // Action name
- repeated EosPermissionLevel authorization = 3;
- }
-
- /**
- * Structure representing transfer data structure
- */
- message EosActionTransfer {
- required uint64 sender = 1; // Asset sender
- required uint64 receiver = 2;
- required EosAsset quantity = 3;
- required string memo = 4;
- }
-
- /**
- * Structure representing delegation data structure
- */
- message EosActionDelegate {
- required uint64 sender = 1;
- required uint64 receiver = 2;
- required EosAsset net_quantity = 3; // Asset format '1.0000 EOS'
- required EosAsset cpu_quantity = 4; // Asset format '1.0000 EOS'
- required bool transfer = 5; // Transfer delegated tokens or not.
- }
-
- /**
- * Structure representing the removal of delegated resources from `sender`
- */
- message EosActionUndelegate {
- required uint64 sender = 1;
- required uint64 receiver = 2;
- required EosAsset net_quantity = 3; // Asset format '1.0000 EOS'
- required EosAsset cpu_quantity = 4; // Asset format '1.0000 EOS'
- }
-
- /**
- * Structure representing fallback if undelegate wasnt executed automaticaly.
- */
- message EosActionRefund {
- required uint64 owner = 1;
- }
-
- /**
- * Structure representing buying RAM operation for EOS tokens
- */
- message EosActionBuyRam {
- required uint64 payer = 1;
- required uint64 receiver = 2;
- required EosAsset quantity = 3; // Asset format '1.0000 EOS'
- }
-
- /**
- * Structure representing buying bytes according to RAM market price.
- */
- message EosActionBuyRamBytes {
- required uint64 payer = 1;
- required uint64 receiver = 2;
- required uint32 bytes = 3; // Number of bytes
- }
-
- /**
- * Structure representing sell RAM
- */
- message EosActionSellRam {
- required uint64 account = 1;
- required uint64 bytes = 2; // Number of bytes
- }
-
- /**
- * Structure representing voting. Currently, there could be up to 30 producers.
- */
- message EosActionVoteProducer {
- required uint64 voter = 1; // Voter account
- required uint64 proxy = 2; // Proxy voter account
- repeated uint64 producers = 3; // List of producers
- }
-
- /**
- * Structure representing update authorization.
- */
- message EosActionUpdateAuth {
- required uint64 account = 1;
- required uint64 permission = 2;
- required uint64 parent = 3;
- required EosAuthorization auth = 4;
- }
-
- /**
- * Structure representing delete authorization.
- */
- message EosActionDeleteAuth {
- required uint64 account = 1;
- required uint64 permission = 2;
- }
-
- /**
- * Structure representing link authorization to action.
- */
- message EosActionLinkAuth {
- required uint64 account = 1;
- required uint64 code = 2;
- required uint64 type = 3;
- required uint64 requirement = 4;
- }
-
- /**
- * Structure representing unlink authorization from action.
- */
- message EosActionUnlinkAuth {
- required uint64 account = 1;
- required uint64 code = 2;
- required uint64 type = 3;
- }
-
- /**
- * Structure representing creation of a new account.
- */
- message EosActionNewAccount {
- required uint64 creator = 1;
- required uint64 name = 2;
- required EosAuthorization owner = 3;
- required EosAuthorization active = 4;
- }
-
- /**
- * Structure representing actions not implemented above.
- */
- message EosActionUnknown {
- required uint32 data_size = 1;
- required bytes data_chunk = 2;
- }
-}
-
-/**
- * Response: Device returns the signature.
- * The signature_* fields contain the computed transaction signature. All three fields will be present.
- * @end
- */
-message EosSignedTx {
- required string signature = 1; // Computed signature
-}
### common/protob/messages-management.proto
@@ -171,11 +171,11 @@ message Features {
Capability_Binance = 3; // BNB Smart Chain
Capability_Cardano = 4;
Capability_Crypto = 5 [(bitcoin_only) = true]; // generic crypto operations for GPG, SSH, etc.
- Capability_EOS = 6;
+ Capability_EOS = 6 [deprecated = true];
Capability_Ethereum = 7;
Capability_Lisk = 8 [deprecated = true];
Capability_Monero = 9;
- Capability_NEM = 10;
+ Capability_NEM = 10 [deprecated = true];
Capability_Ripple = 11;
Capability_Stellar = 12;
Capability_Tezos = 13;
### common/protob/messages-nem.proto
@@ -1,201 +0,0 @@
-syntax = "proto2";
-package hw.trezor.messages.nem;
-
-// Sugar for easier handling in Java
-option java_outer_classname = "TrezorMessageNem";
-option java_package = "com.satoshilabs.trezor.lib.protobuf";
-
-/**
- * Request: Ask device for NEM address corresponding to address_n path
- * @start
- * @next NEMAddress
- * @next Failure
- */
-message NEMGetAddress {
- repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
- optional uint32 network = 2 [default = 0x68]; // Network ID (0x68 = Mainnet, 0x98 = Testnet, 0x60 = Mijin)
- optional bool show_display = 3; // Optionally show on display before sending the result
- optional bool chunkify = 4; // display the address in chunks of 4 characters
-}
-
-/**
- * Response: Contains NEM address derived from device private seed
- * @end
- */
-message NEMAddress {
- required string address = 1; // NEM address in Base32 encoding
-}
-
-/**
- * Request: Ask device to sign transaction
- * @start
- * @next NEMSignedTx
- * @next Failure
- */
-message NEMSignTx {
- required NEMTransactionCommon transaction = 1; // Common part of transaction
- optional NEMTransactionCommon multisig = 2; // Common part of inner transaction for multisig transactions
- optional NEMTransfer transfer = 3; // Transfer transaction part
- optional bool cosigning = 4; // Whether cosigning or initiating the multisig transaction
- optional NEMProvisionNamespace provision_namespace = 5; // Provision namespace part
- optional NEMMosaicCreation mosaic_creation = 6; // Mosaic definition creation part
- optional NEMMosaicSupplyChange supply_change = 7; // Mosaic supply change part
- optional NEMAggregateModification aggregate_modification = 8; // Aggregate modification part
- optional NEMImportanceTransfer importance_transfer = 9; // Importance transfer part
- optional bool chunkify = 10; // display the address in chunks of 4 characters
-
- /**
- * Structure representing the common part for NEM transactions
- */
- message NEMTransactionCommon {
- repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
- optional uint32 network = 2 [default = 0x68]; // Network ID (0x68 = Mainnet, 0x98 = Testnet, 0x60 = Mijin)
- required uint32 timestamp = 3; // Number of seconds elapsed since the creation of the nemesis block
- required uint64 fee = 4; // Fee for the transaction
- required uint32 deadline = 5; // Deadline of the transaction
- optional bytes signer = 6; // Public key of the account (for multisig transactions)
- }
- /**
- * Structure representing the transfer transaction part for NEM transactions
- */
- message NEMTransfer {
- required string recipient = 1; // Address of the recipient
- required uint64 amount = 2; // Amount of micro NEM that is transferred
- optional bytes payload = 3; // Actual message data (unencrypted)
- optional bytes public_key = 4; // Public key of the recipient (for encrypted payloads)
- repeated NEMMosaic mosaics = 5; // Attached mosaics
- /**
- * Structure representing the mosaic attachment for NEM transfer transactions
- */
- message NEMMosaic {
- required string namespace = 1; // Fully qualified name of the namespace
- required string mosaic = 2; // Name of the mosaic definition
- required uint64 quantity = 3; // Mosaic quantity, always given in smallest units
- }
- }
- /**
- * Structure representing the provision namespace part for NEM transactions
- */
- message NEMProvisionNamespace {
- required string namespace = 1; // New part concatenated to the parent
- optional string parent = 2; // Parent namespace (for child namespaces)
- required string sink = 3; // Rental fee sink address
- required uint64 fee = 4; // Rental fee
- }
- /**
- * Structure representing the mosaic definition creation part for NEM transactions
- */
- message NEMMosaicCreation {
- required NEMMosaicDefinition definition = 1; // Mosaic definition
- required string sink = 2; // Creation fee sink address
- required uint64 fee = 3; // Creation fee
- /**
- * Structure representing a mosaic definition
- */
- message NEMMosaicDefinition {
- optional string name = 1; // User-friendly name of the mosaic (for whitelisted mosaics)
- optional string ticker = 2; // Ticker of the mosaic (for whitelisted mosaics)
- required string namespace = 3; // Fully qualified name of the namespace
- required string mosaic = 4; // Name of the mosaic definition
- optional uint32 divisibility = 5; // Number of decimal places that a mosaic can be divided into
- optional NEMMosaicLevy levy = 6; // Levy type
- optional uint64 fee = 7; // Levy fee (interpretation depends on levy type)
- optional string levy_address = 8; // Levy address
- optional string levy_namespace = 9; // Fully qualified name of the namespace of the levy mosaic
- optional string levy_mosaic = 10; // Name of the levy mosaic
- optional uint64 supply = 11; // Initial supply to create, always given in entire units
- optional bool mutable_supply = 12; // Mutable supply
- optional bool transferable = 13; // Mosaic allows transfers among accounts other than the creator
- required string description = 14; // Mosaic description
- repeated uint32 networks = 15; // Networks that the mosaic is valid on (for whitelisted mosaics)
- /**
- * Type of levy which will be used for mosaic
- */
- enum NEMMosaicLevy {
- MosaicLevy_Absolute = 1;
- MosaicLevy_Percentile = 2;
- }
- }
- }
- /**
- * Structure representing the mosaic supply change part for NEM transactions
- */
- message NEMMosaicSupplyChange {
- required string namespace = 1; // Fully qualified name of the namespace
- required string mosaic = 2; // Name of the mosaic definition
- required NEMSupplyChangeType type = 3; // Type of supply change
- required uint64 delta = 4; // Supply delta
- /**
- * Type of supply change which will be applied to mosaic
- */
- enum NEMSupplyChangeType {
- SupplyChange_Increase = 1;
- SupplyChange_Decrease = 2;
- }
- }
- /**
- * Structure representing the aggregate modification part for NEM transactions
- */
- message NEMAggregateModification {
- repeated NEMCosignatoryModification modifications = 1; // Cosignatory modifications
- optional sint32 relative_change = 2; // Relative change of the minimum cosignatories
- /**
- * Structure representing the cosignatory modification for aggregate modification transactions
- */
- message NEMCosignatoryModification {
- required NEMModificationType type = 1; // Type of cosignatory modification
- required bytes public_key = 2; // Public key of the cosignatory
- /**
- * Type of cosignatory modification
- */
- enum NEMModificationType {
- CosignatoryModification_Add = 1;
- CosignatoryModification_Delete = 2;
- }
- }
- }
- /**
- * Structure representing the importance transfer part for NEM transactions
- */
- message NEMImportanceTransfer {
- required NEMImportanceTransferMode mode = 1; // Mode of importance transfer
- required bytes public_key = 2; // Public key of the remote account
- /**
- * Mode of importance transfer
- */
- enum NEMImportanceTransferMode {
- ImportanceTransfer_Activate = 1;
- ImportanceTransfer_Deactivate = 2;
- }
- }
-}
-
-/**
- * Response: Contains NEM transaction data and signature
- * @end
- */
-message NEMSignedTx {
- required bytes data = 1; // Transaction data
- required bytes signature = 2; // Signature for the transaction
-}
-
-/**
- * Request: Ask device to decrypt NEM transaction payload
- * @start
- * @next NEMDecryptedMessage
- * @next Failure
- */
-message NEMDecryptMessage {
- repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
- optional uint32 network = 2; // Network ID (0x68 = Mainnet, 0x98 = Testnet, 0x60 = Mijin)
- optional bytes public_key = 3; // Public key of the other party
- optional bytes payload = 4; // Actual message data (encrypted)
-}
-
-/**
- * Response: Contains decrypted NEM transaction payload
- * @end
- */
-message NEMDecryptedMessage {
- required bytes payload = 1; // Actual message data (unencrypted)
-}
### common/protob/messages.proto
@@ -179,12 +179,16 @@ enum MessageType {
reserved 473 to 474;
// NEM
+ /*
MessageType_NEMGetAddress = 67 [(wire_in) = true];
MessageType_NEMAddress = 68 [(wire_out) = true];
MessageType_NEMSignTx = 69 [(wire_in) = true];
MessageType_NEMSignedTx = 70 [(wire_out) = true];
MessageType_NEMDecryptMessage = 75 [(wire_in) = true];
MessageType_NEMDecryptedMessage = 76 [(wire_out) = true];
+ */
+ reserved 67 to 70;
+ reserved 75 to 76;
// Lisk
/*
@@ -331,12 +335,15 @@ enum MessageType {
MessageType_MoneroLiveRefreshFinalAck = 557 [(wire_out) = true];
// EOS
+ /*
MessageType_EosGetPublicKey = 600 [(wire_in) = true];
MessageType_EosPublicKey = 601 [(wire_out) = true];
MessageType_EosSignTx = 602 [(wire_in) = true];
MessageType_EosTxActionRequest = 603 [(wire_out) = true];
MessageType_EosTxActionAck = 604 [(wire_in) = true];
MessageType_EosSignedTx = 605 [(wire_out) = true];
+ */
+ reserved 600 to 605;
// BNB Beacon Chain (deprecated)
reserved 700 to 709;
### common/tools/coin_info.py
@@ -86,9 +86,6 @@ class Coin(TypedDict):
address_bytes: bytes
dup_key_nontoken: bool
- # Special NEM fields
- ticker: str
-
# Fields that are being created
unsupported: bool
duplicate: bool
@@ -145,7 +142,6 @@ class CoinsInfo(dict[str, Coins]):
`bitcoin` for btc-like coins,
`eth` for ethereum networks,
`erc20` for ERC20 tokens,
- `nem` for NEM mosaics,
`misc` for other networks.
Accessible as a dict or by attribute: `info["misc"] == info.misc`
@@ -376,19 +372,6 @@ def _load_builtin_erc20_tokens() -> Coins:
return all_tokens
-def _load_nem_mosaics() -> Coins:
- """Loads NEM mosaics from `nem/nem_mosaics.json`"""
- mosaics: Coins = load_json("nem/nem_mosaics.json")
- for mosaic in mosaics:
- shortcut = mosaic["ticker"].strip()
- mosaic.update(
- shortcut=shortcut,
- key=f"nem:{shortcut}",
- is_testnet=False,
- )
- return mosaics
-
-
def _load_misc() -> Coins:
"""Loads miscellaneous networks from `misc/misc.json`"""
others: Coins = load_json("misc/misc.json")
@@ -595,14 +578,12 @@ def collect_coin_info() -> CoinsInfo:
`coins` for btc-like coins,
`eth` for ethereum networks,
`erc20` for ERC20 tokens,
- `nem` for NEM mosaics,
`misc` for other networks.
"""
all_coins = CoinsInfo(
bitcoin=_load_btc_coins(),
eth=_load_builtin_ethereum_networks(),
erc20=_load_builtin_erc20_tokens(),
- nem=_load_nem_mosaics(),
misc=_load_misc(),
)
@@ -618,9 +599,6 @@ def sort_coin_infos(all_coins: CoinsInfo) -> None:
for k, coins in all_coins.items():
if k == "bitcoin":
coins.sort(key=_btc_sort_key)
- elif k == "nem":
- # do not sort nem
- pass
elif k == "eth":
# sort ethereum networks by chain_id
coins.sort(key=lambda c: c["chain_id"])
### common/tools/cointool.py
@@ -147,11 +147,9 @@ def supported_on(device: str, coins: Coins) -> Iterator[Coin]:
ALTCOIN_PREFIXES = (
"cardano",
- "eos",
"ethereum",
"fido",
"monero",
- "nem",
"nostr",
"ripple",
"solana",
@@ -646,8 +644,7 @@ def check(backend: bool, icons: bool) -> None:
missing or invalid icons, backend responses, and uniform key information --
i.e., that all coins of the same type have the same fields in their JSON data.
- Uniformity check ignores NEM mosaics and ERC20 tokens, where non-uniformity is
- expected.
+ Uniformity check ignores ERC20 tokens, where non-uniformity is expected.
All shortcut collisions are shown, including colliding ERC20 tokens.
@@ -711,7 +708,7 @@ def check(backend: bool, icons: bool) -> None:
print("Checking key uniformity...")
for cointype, coinlist in defs.items():
- if cointype in ("erc20", "nem"):
+ if cointype == "erc20":
continue
if not check_key_uniformity(coinlist):
all_checks_passed = False
@@ -727,7 +724,7 @@ def check(backend: bool, icons: bool) -> None:
print("Everything is OK.")
-type_choice = click.Choice(["bitcoin", "eth", "erc20", "nem", "misc"])
+type_choice = click.Choice(["bitcoin", "eth", "erc20", "misc"])
device_choice = click.Choice(["connect", "suite", "T1B1", "T2T1", "T2B1"])
@@ -740,7 +737,7 @@ def check(backend: bool, icons: bool) -> None:
@click.option("-i", "--include", metavar="FIELD", multiple=True, help="Include only these fields (-i shortcut -i name)")
@click.option("-e", "--exclude", metavar="FIELD", multiple=True, help="Exclude these fields (-e blockchain_link)")
@click.option("-I", "--include-type", metavar="TYPE", multiple=True, type=type_choice, help="Include only these categories (-I bitcoin -I erc20)")
-@click.option("-E", "--exclude-type", metavar="TYPE", multiple=True, type=type_choice, help="Exclude these categories (-E nem -E misc)")
+@click.option("-E", "--exclude-type", metavar="TYPE", multiple=True, type=type_choice, help="Exclude these categories (-E erc20 -E misc)")
@click.option("-f", "--filter", metavar="FIELD=FILTER", multiple=True, help="Include only coins that match a filter (-f taproot=true -f maintainer='*stick*')")
@click.option("-F", "--filter-exclude", metavar="FIELD=FILTER", multiple=True, help="Exclude coins that match a filter (-F 'blockbook=[]' -F 'slip44=*')")
@click.option("-t", "--exclude-tokens", is_flag=True, help="Exclude ERC20 tokens. Equivalent to '-E erc20'")
@@ -767,7 +764,7 @@ def dump(
By default prints to stdout, specify an output file with '-o file.json'.
This file is structured the same as the internal data. That is, top-level object
- is a dict with keys: 'bitcoin', 'eth', 'erc20', 'nem' and 'misc'. Value for each
+ is a dict with keys: 'bitcoin', 'eth', 'erc20' and 'misc'. Value for each
key is a list of dicts, each describing a known coin.
If '--list' is specified, the top-level object is instead a flat list of coins.
### core/.changelog.d/7969.removed
@@ -0,0 +1 @@
+Remove NEM and EOS support.
### core/embed/crypto/Cargo.toml
@@ -34,9 +34,7 @@ emulator = ["models/emulator"]
aes_gcm = []
ed25519_no_precomp = []
-eos = []
mldsa = []
-nem = []
noise = ["aes_gcm"]
secp256k1_zkp = []
sphincsplus = []
### core/embed/crypto/build.rs
@@ -103,7 +103,6 @@ fn add_crypto_base(lib: &mut CLibrary, common_attrs: &CompileAttrs) -> Result<()
"hmac.c",
"hmac_drbg.c",
"memzero.c",
- "nem.c",
"nist256p1.c",
"pbkdf2.c",
"rand.c",
@@ -129,11 +128,6 @@ fn add_crypto_base(lib: &mut CLibrary, common_attrs: &CompileAttrs) -> Result<()
("USE_CARDANO", val),
]);
- let nem = cfg!(feature = "universal_fw") && cfg!(feature = "nem");
- lib.add_define("USE_NEM", Some(if nem { "1" } else { "0" }));
- let eos = cfg!(feature = "universal_fw") && cfg!(feature = "eos");
- lib.add_define("USE_EOS", Some(if eos { "1" } else { "0" }));
-
if cfg!(feature = "universal_fw") {
lib.add_sources_in_dir_with_attrs(
CRYPTO_PATH,
### core/embed/models/T2T1/model.toml
@@ -10,6 +10,4 @@ features = [
# Legacy coin support
"decred",
- "eos",
- "nem",
]
### core/embed/projects/firmware/Cargo.toml
@@ -149,8 +149,6 @@ tropic = ["sec/tropic", "upymod/tropic", "trezor_lib/tropic"]
# Legacy coin support (T2T1 only)
decred = ["upymod/decred"]
-eos = ["crypto/eos", "upymod/eos"]
-nem = ["crypto/nem", "upymod/nem"]
# --------------------------------------------------------------------------
# Automatically derived features (do not enable from outside)
### core/embed/projects/firmware/project.toml
@@ -42,8 +42,6 @@ uses = [
# Legacy coin support
"decred",
- "eos",
- "nem",
]
# ELF sections to be included in the final binary.
### core/embed/rust/librust_qstr.h
@@ -1249,42 +1249,6 @@ static void _librust_qstrs(void) {
MP_QSTR_cardano__warning;
MP_QSTR_cardano__withdrawal_for_address_template;
MP_QSTR_cardano__x_of_y_signatures_template;
- MP_QSTR_eos__about_to_sign_template;
- MP_QSTR_eos__action_name;
- MP_QSTR_eos__arbitrary_data;
- MP_QSTR_eos__buy_ram;
- MP_QSTR_eos__bytes;
- MP_QSTR_eos__cancel_vote;
- MP_QSTR_eos__checksum;
- MP_QSTR_eos__code;
- MP_QSTR_eos__contract;
- MP_QSTR_eos__cpu;
- MP_QSTR_eos__creator;
- MP_QSTR_eos__delete_auth;
- MP_QSTR_eos__link_auth;
- MP_QSTR_eos__memo;
- MP_QSTR_eos__name;
- MP_QSTR_eos__net;
- MP_QSTR_eos__new_account;
- MP_QSTR_eos__owner;
- MP_QSTR_eos__parent;
- MP_QSTR_eos__payer;
- MP_QSTR_eos__permission;
- MP_QSTR_eos__proxy;
- MP_QSTR_eos__receiver;
- MP_QSTR_eos__refund;
- MP_QSTR_eos__requirement;
- MP_QSTR_eos__sell_ram;
- MP_QSTR_eos__sender;
- MP_QSTR_eos__threshold;
- MP_QSTR_eos__to;
- MP_QSTR_eos__transfer;
- MP_QSTR_eos__type;
- MP_QSTR_eos__unlink_auth;
- MP_QSTR_eos__update_auth;
- MP_QSTR_eos__vote_for_producers;
- MP_QSTR_eos__vote_for_proxy;
- MP_QSTR_eos__voter;
MP_QSTR_ethereum__all_evms;
MP_QSTR_ethereum__approve;
MP_QSTR_ethereum__approve_amount_allowance;
@@ -1416,57 +1380,6 @@ static void _librust_qstrs(void) {
MP_QSTR_monero__wanna_export_watchkey;
MP_QSTR_monero__wanna_start_refresh;
MP_QSTR_monero__wanna_sync_key_images;
- MP_QSTR_nem__absolute;
- MP_QSTR_nem__activate;
- MP_QSTR_nem__add;
- MP_QSTR_nem__confirm_action;
- MP_QSTR_nem__confirm_address;
- MP_QSTR_nem__confirm_creation_fee;
- MP_QSTR_nem__confirm_mosaic;
- MP_QSTR_nem__confirm_multisig_fee;
- MP_QSTR_nem__confirm_namespace;
- MP_QSTR_nem__confirm_payload;
- MP_QSTR_nem__confirm_properties;
- MP_QSTR_nem__confirm_rental_fee;
- MP_QSTR_nem__confirm_transfer_of;
- MP_QSTR_nem__convert_account_to_multisig;
- MP_QSTR_nem__cosign_transaction_for;
- MP_QSTR_nem__cosignatory;
- MP_QSTR_nem__create_mosaic;
- MP_QSTR_nem__create_namespace;
- MP_QSTR_nem__deactivate;
- MP_QSTR_nem__decrease;
- MP_QSTR_nem__description;
- MP_QSTR_nem__divisibility_and_levy_cannot_be_shown;
- MP_QSTR_nem__encrypted;
- MP_QSTR_nem__final_confirm;
- MP_QSTR_nem__immutable;
- MP_QSTR_nem__increase;
- MP_QSTR_nem__initial_supply;
- MP_QSTR_nem__initiate_transaction_for;
- MP_QSTR_nem__levy_divisibility;
- MP_QSTR_nem__levy_fee;
- MP_QSTR_nem__levy_fee_of;
- MP_QSTR_nem__levy_mosaic;
- MP_QSTR_nem__levy_namespace;
- MP_QSTR_nem__levy_recipient;
- MP_QSTR_nem__levy_type;
- MP_QSTR_nem__modify_supply_for;
- MP_QSTR_nem__modify_the_number_of_cosignatories_by;
- MP_QSTR_nem__mutable;
- MP_QSTR_nem__of;
- MP_QSTR_nem__percentile;
- MP_QSTR_nem__raw_units_template;
- MP_QSTR_nem__remote_harvesting;
- MP_QSTR_nem__remove;
- MP_QSTR_nem__set_minimum_cosignatories_to;
- MP_QSTR_nem__sign_tx_fee_template;
- MP_QSTR_nem__supply_change;
- MP_QSTR_nem__supply_units_template;
- MP_QSTR_nem__transferable;
- MP_QSTR_nem__under_namespace;
- MP_QSTR_nem__unencrypted;
- MP_QSTR_nem__unknown_mosaic;
MP_QSTR_nostr__event_kind_template;
MP_QSTR_ripple__account_deletion_warning;
MP_QSTR_ripple__account_to_be_deleted;
### core/embed/rust/src/translations/generated/translated_string.rs
[binary or diff unavailable]
### core/embed/upymod/Cargo.toml
@@ -41,7 +41,6 @@ decred = []
disable_animation = []
emulator = ["io/emulator"]
enable_source_lines = []
-eos = []
frozen = []
haptic = ["io/haptic"]
layout_bolt = []
@@ -54,7 +53,6 @@ memperf = []
miniscript = []
k1n1 = ["nfc"]
nfc = ["io/nfc"]
-nem = []
optiga = ["sec/optiga"]
power_manager = ["io/power_manager"]
pyopt = []
### core/embed/upymod/build.rs
@@ -1121,10 +1121,8 @@ impl<'a> MpyBuilder<'a> {
files.remove(enums, "Cardano*.py");
files.remove(enums, "DebugMonero*.py");
files.remove(enums, "DefinitionType.py");
- files.remove(enums, "Eos*.py");
files.remove(enums, "Ethereum*.py");
files.remove(enums, "Monero*.py");
- files.remove(enums, "NEM*.py");
files.remove(enums, "Ripple*.py");
files.remove(enums, "Solana*.py");
files.remove(enums, "Stellar*.py");
@@ -1230,12 +1228,6 @@ impl<'a> MpyBuilder<'a> {
files.add(src, "apps/cardano/*/*.py")?;
files.add(src, "trezor/enums/Cardano*.py")?;
- if cfg!(feature = "eos") {
- files.add(src, "apps/eos/*.py")?;
- files.add(src, "apps/eos/*/*.py")?;
- files.add(src, "trezor/enums/Eos*.py")?;
- }
-
files.add(src, "apps/ethereum/*.py")?;
files.add(src, "trezor/enums/Ethereum*.py")?;
@@ -1245,12 +1237,6 @@ impl<'a> MpyBuilder<'a> {
files.add(src, "trezor/enums/DebugMonero*.py")?;
files.add(src, "trezor/enums/Monero*.py")?;
- if cfg!(feature = "nem") {
- files.add(src, "apps/nem/*.py")?;
- files.add(src, "apps/nem/*/*.py")?;
- files.add(src, "trezor/enums/NEM*.py")?;
- }
-
if cfg!(not(feature = "pyopt")) {
files.add(src, "apps/nostr/*.py")?;
files.add(src, "apps/nostr/*/*.py")?;
### core/embed/upymod/modtrezorcrypto/modtrezorcrypto-bip32.h
@@ -26,9 +26,6 @@
#include "bip39.h"
#include "curves.h"
#include "memzero.h"
-#if !BITCOIN_ONLY
-#include "nem.h"
-#endif
/// package: trezorcrypto.bip32
@@ -369,81 +366,6 @@ static MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_HDNode_address_obj,
#if !BITCOIN_ONLY
-#if USE_NEM
-/// def nem_address(self, network: int) -> str:
-/// """
-/// Compute a NEM address string from the HD node.
-/// """
-static mp_obj_t mod_trezorcrypto_HDNode_nem_address(mp_obj_t self,
- mp_obj_t network) {
- mp_obj_HDNode_t *o = MP_OBJ_TO_PTR(self);
-
- uint8_t n = trezor_obj_get_uint8(network);
-
- vstr_t address = {0};
- vstr_init_len(&address, NEM_ADDRESS_SIZE);
- if (!hdnode_get_nem_address(&o->hdnode, n, address.buf)) {
- vstr_clear(&address);
- mp_raise_ValueError(MP_ERROR_TEXT("Failed to compute a NEM address"));
- }
- address.len = strlen(address.buf);
- return mp_obj_new_str_from_vstr(&address);
-}
-static MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_HDNode_nem_address_obj,
- mod_trezorcrypto_HDNode_nem_address);
-
-/// def nem_encrypt(
-/// self,
-/// transfer_public_key: AnyBytes,
-/// iv: AnyBytes,
-/// salt: AnyBytes,
-/// payload: AnyBytes,
-/// ) -> bytes:
-/// """
-/// Encrypts payload using the transfer's public key
-/// """
-static mp_obj_t mod_trezorcrypto_HDNode_nem_encrypt(size_t n_args,
- const mp_obj_t *args) {
- mp_obj_HDNode_t *o = MP_OBJ_TO_PTR(args[0]);
-
- mp_buffer_info_t transfer_pk = {0};
- mp_get_buffer_raise(args[1], &transfer_pk, MP_BUFFER_READ);
- if (transfer_pk.len != 32) {
- mp_raise_ValueError(
- MP_ERROR_TEXT("transfer_public_key has invalid length"));
- }
-
- mp_buffer_info_t iv = {0};
- mp_get_buffer_raise(args[2], &iv, MP_BUFFER_READ);
- if (iv.len != 16) {
- mp_raise_ValueError(MP_ERROR_TEXT("iv has invalid length"));
- }
- mp_buffer_info_t salt = {0};
- mp_get_buffer_raise(args[3], &salt, MP_BUFFER_READ);
- if (salt.len != NEM_SALT_SIZE) {
- mp_raise_ValueError(MP_ERROR_TEXT("salt has invalid length"));
- }
- mp_buffer_info_t payload = {0};
- mp_get_buffer_raise(args[4], &payload, MP_BUFFER_READ);
- if (payload.len == 0) {
- mp_raise_ValueError(MP_ERROR_TEXT("payload is empty"));
- }
-
- vstr_t vstr = {0};
- vstr_init_len(&vstr, NEM_ENCRYPTED_SIZE(payload.len));
- if (!hdnode_nem_encrypt(
- &o->hdnode, *(const ed25519_public_key *)transfer_pk.buf, iv.buf,
- salt.buf, payload.buf, payload.len, (uint8_t *)vstr.buf)) {
- mp_raise_ValueError(MP_ERROR_TEXT("HDNode nem encrypt failed"));
- }
- return mp_obj_new_bytes_from_vstr(&vstr);
-}
-static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(
- mod_trezorcrypto_HDNode_nem_encrypt_obj, 5, 5,
- mod_trezorcrypto_HDNode_nem_encrypt);
-
-#endif
-
/// def ethereum_pubkeyhash(self) -> bytes:
/// """
/// Compute an Ethereum pubkeyhash (aka address) from the HD node.
@@ -503,12 +425,6 @@ static const mp_rom_map_elem_t mod_trezorcrypto_HDNode_locals_dict_table[] = {
{MP_ROM_QSTR(MP_QSTR_address),
MP_ROM_PTR(&mod_trezorcrypto_HDNode_address_obj)},
#if !BITCOIN_ONLY
-#if USE_NEM
- {MP_ROM_QSTR(MP_QSTR_nem_address),
- MP_ROM_PTR(&mod_trezorcrypto_HDNode_nem_address_obj)},
- {MP_ROM_QSTR(MP_QSTR_nem_encrypt),
- MP_ROM_PTR(&mod_trezorcrypto_HDNode_nem_encrypt_obj)},
-#endif
{MP_ROM_QSTR(MP_QSTR_ethereum_pubkeyhash),
MP_ROM_PTR(&mod_trezorcrypto_HDNode_ethereum_pubkeyhash_obj)},
#endif
### core/embed/upymod/modtrezorcrypto/modtrezorcrypto-nem.h
@@ -1,78 +0,0 @@
-/*
- * This file is part of the Trezor project, https://trezor.io/
- *
- * Copyright (c) SatoshiLabs
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "py/objstr.h"
-
-#include "../trezorobj.h"
-
-#include "nem.h"
-
-/// package: trezorcrypto.nem
-
-/// def validate_address(address: str, network: int) -> bool:
-/// """
-/// Validate a NEM address
-/// """
-static mp_obj_t mod_trezorcrypto_nem_validate_address(mp_obj_t address,
- mp_obj_t network) {
- mp_buffer_info_t addr = {0};
- mp_get_buffer_raise(address, &addr, MP_BUFFER_READ);
-
- uint32_t n = trezor_obj_get_uint(network);
- return mp_obj_new_bool(nem_validate_address(addr.buf, n));
-}
-static MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_nem_validate_address_obj,
- mod_trezorcrypto_nem_validate_address);
-
-/// def compute_address(public_key: AnyBytes, network: int) -> str:
-/// """
-/// Compute a NEM address from a public key
-/// """
-static mp_obj_t mod_trezorcrypto_nem_compute_address(mp_obj_t public_key,
- mp_obj_t network) {
- mp_buffer_info_t p = {0};
- mp_get_buffer_raise(public_key, &p, MP_BUFFER_READ);
-
- uint32_t n = trezor_obj_get_uint(network);
-
- char address[NEM_ADDRESS_SIZE + 1]; // + 1 for the 0 byte
- if (!nem_get_address(p.buf, n, address)) {
- mp_raise_ValueError(MP_ERROR_TEXT(
- "Failed to compute a NEM address from provided public key"));
- }
- return mp_obj_new_str_from_cstr(address);
-}
-static MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_nem_compute_address_obj,
- mod_trezorcrypto_nem_compute_address);
-
-// objects definition
-static const mp_rom_map_elem_t mod_trezorcrypto_nem_globals_table[] = {
- {MP_ROM_QSTR(MP_QSTR_validate_address),
- MP_ROM_PTR(&mod_trezorcrypto_nem_validate_address_obj)},
- {MP_ROM_QSTR(MP_QSTR_compute_address),
- MP_ROM_PTR(&mod_trezorcrypto_nem_compute_address_obj)},
-};
-static MP_DEFINE_CONST_DICT(mod_trezorcrypto_nem_globals,
- mod_trezorcrypto_nem_globals_table);
-
-// module definition
-static const mp_obj_module_t mod_trezorcrypto_nem_module = {
- .base = {&mp_type_module},
- .globals = (mp_obj_dict_t *)&mod_trezorcrypto_nem_globals,
-};
### core/embed/upymod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
@@ -97,21 +97,11 @@ static int ethereum_is_canonical(uint8_t v, uint8_t signature[64]) {
return (v & 2) == 0;
}
-static int eos_is_canonical(uint8_t v, uint8_t signature[64]) {
- (void)v;
- return !(signature[0] & 0x80) &&
- !(signature[0] == 0 && !(signature[1] & 0x80)) &&
- !(signature[32] & 0x80) &&
- !(signature[32] == 0 && !(signature[33] & 0x80));
-}
-
/// mock:global
/// CANONICAL_SIG_ETHEREUM: int = 1
-/// CANONICAL_SIG_EOS: int = 2
enum {
CANONICAL_SIG_ETHEREUM = 1,
- CANONICAL_SIG_EOS = 2,
};
#endif
@@ -139,9 +129,6 @@ static mp_obj_t mod_trezorcrypto_secp256k1_sign(size_t n_args,
case CANONICAL_SIG_ETHEREUM:
is_canonical = ethereum_is_canonical;
break;
- case CANONICAL_SIG_EOS:
- is_canonical = eos_is_canonical;
- break;
}
#endif
if (sk.len != 32) {
@@ -282,7 +269,6 @@ static const mp_rom_map_elem_t mod_trezorcrypto_secp256k1_globals_table[] = {
#if !BITCOIN_ONLY
{MP_ROM_QSTR(MP_QSTR_CANONICAL_SIG_ETHEREUM),
MP_ROM_INT(CANONICAL_SIG_ETHEREUM)},
- {MP_ROM_QSTR(MP_QSTR_CANONICAL_SIG_EOS), MP_ROM_INT(CANONICAL_SIG_EOS)},
#endif
};
static MP_DEFINE_CONST_DICT(mod_trezorcrypto_secp256k1_globals,
### core/embed/upymod/modtrezorcrypto/modtrezorcrypto.c
@@ -79,7 +79,6 @@ extern const mp_obj_type_t mp_type_AuthenticationError;
#if !BITCOIN_ONLY
#include "modtrezorcrypto-cardano.h"
#include "modtrezorcrypto-monero.h"
-#include "modtrezorcrypto-nem.h"
#endif
MP_DEFINE_EXCEPTION(AuthenticationError, Exception)
@@ -127,9 +126,6 @@ static const mp_rom_map_elem_t mp_module_trezorcrypto_globals_table[] = {
{MP_ROM_QSTR(MP_QSTR_groestl512),
MP_ROM_PTR(&mod_trezorcrypto_Groestl512_type)},
{MP_ROM_QSTR(MP_QSTR_hmac), MP_ROM_PTR(&mod_trezorcrypto_Hmac_type)},
-#if !BITCOIN_ONLY
- {MP_ROM_QSTR(MP_QSTR_nem), MP_ROM_PTR(&mod_trezorcrypto_nem_module)},
-#endif
{MP_ROM_QSTR(MP_QSTR_pbkdf2), MP_ROM_PTR(&mod_trezorcrypto_Pbkdf2_type)},
{MP_ROM_QSTR(MP_QSTR_random), MP_ROM_PTR(&mod_trezorcrypto_random_module)},
{MP_ROM_QSTR(MP_QSTR_ripemd160),
### core/embed/upymod/qstrdefsport.h
@@ -111,6 +111,7 @@ Q(apps.common.coins)
Q(apps.common.definitions)
Q(apps.common.keychain)
Q(apps.common.lock_manager)
+Q(apps.common.mnemonic)
Q(apps.common.passphrase)
Q(apps.common.paths)
Q(apps.common.payment_request)
@@ -267,6 +268,7 @@ Q(menu)
Q(message_handler)
Q(messages)
Q(misc)
+Q(mnemonic)
Q(multisig)
Q(nostr)
Q(ownership)
@@ -490,10 +492,6 @@ Q(EthereumDataType)
Q(EthereumERC7730ContainerPath)
Q(EthereumERC7730FieldFormatterType)
Q(MoneroNetworkType)
-Q(NEMImportanceTransferMode)
-Q(NEMModificationType)
-Q(NEMMosaicLevy)
-Q(NEMSupplyChangeType)
Q(StellarAssetType)
Q(StellarContractExecutableType)
Q(StellarContractIDPreimageType)
@@ -509,7 +507,6 @@ Q(TezosContractType)
Q(TronRawContractType)
Q(TronResourceCode)
Q(account_path_check)
-Q(actions)
Q(add_resident_credential)
Q(addresses)
Q(apps.bitcoin.sign_tx.zcash_v4)
@@ -541,15 +538,6 @@ Q(apps.cardano.sign_tx.ordinary_signer)
Q(apps.cardano.sign_tx.plutus_signer)
Q(apps.cardano.sign_tx.pool_owner_signer)
Q(apps.cardano.sign_tx.signer)
-Q(apps.common.mnemonic)
-Q(apps.eos)
-Q(apps.eos.actions)
-Q(apps.eos.actions.layout)
-Q(apps.eos.get_public_key)
-Q(apps.eos.helpers)
-Q(apps.eos.layout)
-Q(apps.eos.sign_tx)
-Q(apps.eos.writers)
Q(apps.ethereum)
Q(apps.ethereum.clear_signing)
Q(apps.ethereum.clear_signing_definitions)
@@ -615,27 +603,6 @@ Q(apps.monero.xmr.serialize_messages.tx_ct_key)
Q(apps.monero.xmr.serialize_messages.tx_ecdh)
Q(apps.monero.xmr.serialize_messages.tx_prefix)
Q(apps.monero.xmr.serialize_messages.tx_rsig_bulletproof)
-Q(apps.nem)
-Q(apps.nem.get_address)
-Q(apps.nem.helpers)
-Q(apps.nem.layout)
-Q(apps.nem.mosaic)
-Q(apps.nem.mosaic.helpers)
-Q(apps.nem.mosaic.layout)
-Q(apps.nem.mosaic.nem_mosaics)
-Q(apps.nem.mosaic.serialize)
-Q(apps.nem.multisig)
-Q(apps.nem.multisig.layout)
-Q(apps.nem.multisig.serialize)
-Q(apps.nem.namespace)
-Q(apps.nem.namespace.layout)
-Q(apps.nem.namespace.serialize)
-Q(apps.nem.sign_tx)
-Q(apps.nem.transfer)
-Q(apps.nem.transfer.layout)
-Q(apps.nem.transfer.serialize)
-Q(apps.nem.validators)
-Q(apps.nem.writers)
Q(apps.ripple)
Q(apps.ripple.base58_ripple)
Q(apps.ripple.get_address)
@@ -722,7 +689,6 @@ Q(credentials)
Q(crypto_helpers)
Q(definitions)
Q(diag)
-Q(eos)
Q(ethereum)
Q(f4jumble)
Q(fido2)
@@ -749,15 +715,9 @@ Q(live_refresh)
Q(message_types)
Q(misc)
Q(mlsag_hasher)
-Q(mnemonic)
Q(monero)
-Q(mosaic)
-Q(multisig)
Q(multisig_signer)
-Q(namespace)
Q(native_script)
-Q(nem)
-Q(nem_mosaics)
Q(network_ids)
Q(networks)
Q(offchain_message)
@@ -802,7 +762,6 @@ Q(tezos)
Q(token_account)
Q(tokens)
Q(transaction)
-Q(transfer)
Q(trezor.enums.CardanoAddressType)
Q(trezor.enums.CardanoCVoteRegistrationFormat)
Q(trezor.enums.CardanoCertificateType)
@@ -820,10 +779,6 @@ Q(trezor.enums.EthereumDataType)
Q(trezor.enums.EthereumERC7730ContainerPath)
Q(trezor.enums.EthereumERC7730FieldFormatterType)
Q(trezor.enums.MoneroNetworkType)
-Q(trezor.enums.NEMImportanceTransferMode)
-Q(trezor.enums.NEMModificationType)
-Q(trezor.enums.NEMMosaicLevy)
-Q(trezor.enums.NEMSupplyChangeType)
Q(trezor.enums.StellarAssetType)
Q(trezor.enums.StellarContractExecutableType)
Q(trezor.enums.StellarContractIDPreimageType)
@@ -846,7 +801,6 @@ Q(tx_rsig_bulletproof)
Q(types)
Q(unified_addresses)
Q(utils)
-Q(validators)
Q(verify_message)
Q(webauthn)
Q(writers)
### core/embed/upymod/qstrdefsport.h.mako
@@ -18,10 +18,8 @@ PATTERNS = (
ALTCOINS = (
"cardano",
- "eos",
"ethereum",
"monero",
- "nem",
"ripple",
"solana",
"stellar",
### core/mocks/generated/trezorcrypto/bip32.pyi
@@ -82,22 +82,6 @@ class HDNode:
Compute a base58-encoded address string from the HD node.
"""
- def nem_address(self, network: int) -> str:
- """
- Compute a NEM address string from the HD node.
- """
-
- def nem_encrypt(
- self,
- transfer_public_key: AnyBytes,
- iv: AnyBytes,
- salt: AnyBytes,
- payload: AnyBytes,
- ) -> bytes:
- """
- Encrypts payload using the transfer's public key
- """
-
def ethereum_pubkeyhash(self) -> bytes:
"""
Compute an Ethereum pubkeyhash (aka address) from the HD node.
### core/mocks/generated/trezorcrypto/nem.pyi
@@ -1,16 +0,0 @@
-from typing import *
-from buffer_types import *
-
-
-# upymod/modtrezorcrypto/modtrezorcrypto-nem.h
-def validate_address(address: str, network: int) -> bool:
- """
- Validate a NEM address
- """
-
-
-# upymod/modtrezorcrypto/modtrezorcrypto-nem.h
-def compute_address(public_key: AnyBytes, network: int) -> str:
- """
- Compute a NEM address from a public key
- """
### core/mocks/generated/trezorcrypto/secp256k1.pyi
@@ -15,7 +15,6 @@ def publickey(secret_key: AnyBytes, compressed: bool = True) -> bytes:
Computes public key from secret key.
"""
CANONICAL_SIG_ETHEREUM: int = 1
-CANONICAL_SIG_EOS: int = 2
# upymod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
### core/mocks/trezortranslate_keys.pyi
@@ -294,42 +294,6 @@ class TR:
device_name__title: str = "Device name"
entropy__send: str = "Do you really want to send entropy?"
entropy__title_confirm: str = "Confirm entropy"
- eos__about_to_sign_template: str = "You are about to sign {0}."
- eos__action_name: str = "Action Name"
- eos__arbitrary_data: str = "Arbitrary data"
- eos__buy_ram: str = "Buy RAM"
- eos__bytes: str = "Bytes"
- eos__cancel_vote: str = "Cancel vote"
- eos__checksum: str = "Checksum"
- eos__code: str = "Code"
- eos__contract: str = "Contract"
- eos__cpu: str = "CPU"
- eos__creator: str = "Creator"
- eos__delete_auth: str = "Delete Auth"
- eos__link_auth: str = "Link Auth"
- eos__memo: str = "Memo"
- eos__name: str = "Name"
- eos__net: str = "NET"
- eos__new_account: str = "New account"
- eos__owner: str = "Owner"
- eos__parent: str = "Parent"
- eos__payer: str = "Payer"
- eos__permission: str = "Permission"
- eos__proxy: str = "Proxy"
- eos__receiver: str = "Receiver"
- eos__refund: str = "Refund"
- eos__requirement: str = "Requirement"
- eos__sell_ram: str = "Sell RAM"
- eos__sender: str = "Sender"
- eos__threshold: str = "Threshold"
- eos__to: str = "To"
- eos__transfer: str = "Transfer"
- eos__type: str = "Type"
- eos__unlink_auth: str = "Unlink Auth"
- eos__update_auth: str = "Update Auth"
- eos__vote_for_producers: str = "Vote for producers"
- eos__vote_for_proxy: str = "Vote for proxy"
- eos__voter: str = "Voter"
ethereum__all_evms: str = "All EVMs"
ethereum__approve: str = "Approve"
ethereum__approve_amount_allowance: str = "Amount allowance"
@@ -554,57 +518,6 @@ class TR:
monero__wanna_export_watchkey: str = "Do you really want to export watch-only credentials?"
monero__wanna_start_refresh: str = "Do you really want to\nstart refresh?"
monero__wanna_sync_key_images: str = "Do you really want to\nsync key images?"
- nem__absolute: str = "absolute"
- nem__activate: str = "Activate"
- nem__add: str = "Add"
- nem__confirm_action: str = "Confirm action"
- nem__confirm_address: str = "Confirm address"
- nem__confirm_creation_fee: str = "Confirm creation fee"
- nem__confirm_mosaic: str = "Confirm mosaic"
- nem__confirm_multisig_fee: str = "Confirm multisig fee"
- nem__confirm_namespace: str = "Confirm namespace"
- nem__confirm_payload: str = "Confirm payload"
- nem__confirm_properties: str = "Confirm properties"
- nem__confirm_rental_fee: str = "Confirm rental fee"
- nem__confirm_transfer_of: str = "Confirm transfer of"
- nem__convert_account_to_multisig: str = "Convert account to multisig account?"
- nem__cosign_transaction_for: str = "Cosign transaction for"
- nem__cosignatory: str = " cosignatory"
- nem__create_mosaic: str = "Create mosaic"
- nem__create_namespace: str = "Create namespace"
- nem__deactivate: str = "Deactivate"
- nem__decrease: str = "Decrease"
- nem__description: str = "Description"
- nem__divisibility_and_levy_cannot_be_shown: str = "Divisibility and levy cannot be shown for unknown mosaics"
- nem__encrypted: str = "Encrypted"
- nem__final_confirm: str = "Final confirm"
- nem__immutable: str = "immutable"
- nem__increase: str = "Increase"
- nem__initial_supply: str = "Initial supply"
- nem__initiate_transaction_for: str = "Initiate transaction for"
- nem__levy_divisibility: str = "Levy divisibility"
- nem__levy_fee: str = "Levy fee"
- nem__levy_fee_of: str = "Confirm mosaic levy fee of"
- nem__levy_mosaic: str = "Levy mosaic"
- nem__levy_namespace: str = "Levy namespace"
- nem__levy_recipient: str = "Levy recipient"
- nem__levy_type: str = "Levy type"
- nem__modify_supply_for: str = "Modify supply for"
- nem__modify_the_number_of_cosignatories_by: str = "Modify the number of cosignatories by "
- nem__mutable: str = "mutable"
- nem__of: str = "of"
- nem__percentile: str = "percentile"
- nem__raw_units_template: str = "{0} raw units"
- nem__remote_harvesting: str = " remote harvesting?"
- nem__remove: str = "Remove"
- nem__set_minimum_cosignatories_to: str = "Set minimum cosignatories to "
- nem__sign_tx_fee_template: str = "Sign this transaction\nand pay {0}\nfor network fee?"
- nem__supply_change: str = "Supply change"
- nem__supply_units_template: str = "{0} supply by {1} whole units?"
- nem__transferable: str = "Transferable"
- nem__under_namespace: str = "under namespace"
- nem__unencrypted: str = "Unencrypted"
- nem__unknown_mosaic: str = "Unknown mosaic!"
nostr__event_kind_template: str = "Event kind: {0}"
passphrase__access_wallet: str = "Access Passphrase wallet?"
passphrase__always_on_device: str = "Always enter your passphrase on Trezor?"
### core/src/apps/base.py
@@ -143,15 +143,6 @@ def get_features() -> Features:
Capability.Translations,
]
- # We don't support some currencies on later models (see #2793)
- if utils.INTERNAL_MODEL == "T2T1":
- f.capabilities.extend(
- [
- Capability.NEM,
- Capability.EOS,
- ]
- )
-
if utils.USE_HAPTIC:
f.haptic_feedback = storage_device.get_haptic_feedback()
f.capabilities.append(Capability.Haptic)
### core/src/apps/eos/__init__.py
@@ -1,5 +0,0 @@
-from apps.common.paths import PATTERN_BIP44
-
-CURVE = "secp256k1"
-SLIP44_ID = 194
-PATTERN = PATTERN_BIP44
### core/src/apps/eos/actions/__init__.py
@@ -1,146 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from trezor.messages import EosTxActionAck
- from trezor.utils import HashWriter, Writer
-
-
-async def process_action(
- sha: HashWriter, action: EosTxActionAck, is_last: bool
-) -> None:
- from .. import helpers, writers
- from . import layout
-
- name = helpers.eos_name_to_string(action.common.name)
- account = helpers.eos_name_to_string(action.common.account)
-
- if not _check_action(action, name, account):
- raise ValueError("Invalid action")
-
- # Little cheat, not having to create "is_last" argument for every action layout
- # (not worth spending so many bytes in flash on this)
- layout.is_last = is_last
-
- w = bytearray()
- if account == "eosio":
- if name == "buyram":
- assert action.buy_ram is not None # _check_action
- await layout.confirm_action_buyram(action.buy_ram)
- writers.write_action_buyram(w, action.buy_ram)
- elif name == "buyrambytes":
- assert action.buy_ram_bytes is not None # _check_action
- await layout.confirm_action_buyrambytes(action.buy_ram_bytes)
- writers.write_action_buyrambytes(w, action.buy_ram_bytes)
- elif name == "sellram":
- assert action.sell_ram is not None # _check_action
- await layout.confirm_action_sellram(action.sell_ram)
- writers.write_action_sellram(w, action.sell_ram)
- elif name == "delegatebw":
- assert action.delegate is not None # _check_action
- await layout.confirm_action_delegate(action.delegate)
- writers.write_action_delegate(w, action.delegate)
- elif name == "undelegatebw":
- assert action.undelegate is not None # _check_action
- await layout.confirm_action_undelegate(action.undelegate)
- writers.write_action_undelegate(w, action.undelegate)
- elif name == "refund":
- assert action.refund is not None # _check_action
- await layout.confirm_action_refund(action.refund)
- writers.write_action_refund(w, action.refund)
- elif name == "voteproducer":
- assert action.vote_producer is not None # _check_action
- await layout.confirm_action_voteproducer(action.vote_producer)
- writers.write_action_voteproducer(w, action.vote_producer)
- elif name == "updateauth":
- assert action.update_auth is not None # _check_action
- await layout.confirm_action_updateauth(action.update_auth)
- writers.write_action_updateauth(w, action.update_auth)
- elif name == "deleteauth":
- assert action.delete_auth is not None # _check_action
- await layout.confirm_action_deleteauth(action.delete_auth)
- writers.write_action_deleteauth(w, action.delete_auth)
- elif name == "linkauth":
- assert action.link_auth is not None # _check_action
- await layout.confirm_action_linkauth(action.link_auth)
- writers.write_action_linkauth(w, action.link_auth)
- elif name == "unlinkauth":
- assert action.unlink_auth is not None # _check_action
- await layout.confirm_action_unlinkauth(action.unlink_auth)
- writers.write_action_unlinkauth(w, action.unlink_auth)
- elif name == "newaccount":
- assert action.new_account is not None # _check_action
- await layout.confirm_action_newaccount(action.new_account)
- writers.write_action_newaccount(w, action.new_account)
- else:
- raise ValueError("Unrecognized action type for eosio")
- elif name == "transfer":
- assert action.transfer is not None # _check_action
- await layout.confirm_action_transfer(action.transfer, account)
- writers.write_action_transfer(w, action.transfer)
- else:
- await _process_unknown_action(w, action)
-
- writers.write_action_common(sha, action.common)
- writers.write_bytes_prefixed(sha, w)
-
-
-async def _process_unknown_action(w: Writer, action: EosTxActionAck) -> None:
- from trezor.crypto.hashlib import sha256
- from trezor.messages import EosTxActionAck, EosTxActionRequest
- from trezor.utils import HashWriter
- from trezor.wire.context import call
-
- from .. import writers
- from . import layout
-
- unknown = action.unknown # local_cache_attribute
- assert unknown is not None
- data_chunk = unknown.data_chunk # local_cache_attribute
-
- checksum = HashWriter(sha256())
- writers.write_uvarint(checksum, unknown.data_size)
- checksum.extend(data_chunk)
-
- writers.write_bytes_unchecked(w, data_chunk)
- bytes_left = unknown.data_size - len(data_chunk)
-
- while bytes_left != 0:
- action = await call(EosTxActionRequest(data_size=bytes_left), EosTxActionAck)
-
- if unknown is None:
- raise ValueError("Bad response. Unknown struct expected.")
-
- checksum.extend(data_chunk)
- writers.write_bytes_unchecked(w, data_chunk)
-
- bytes_left -= len(data_chunk)
- if bytes_left < 0:
- raise ValueError("Bad response. Buffer overflow.")
-
- await layout.confirm_action_unknown(action.common, checksum.get_digest())
-
-
-def _check_action(action: EosTxActionAck, name: str, account: str) -> bool:
- if account == "eosio":
- return (
- (name == "buyram" and action.buy_ram is not None)
- or (name == "buyrambytes" and action.buy_ram_bytes is not None)
- or (name == "sellram" and action.sell_ram is not None)
- or (name == "delegatebw" and action.delegate is not None)
- or (name == "undelegatebw" and action.undelegate is not None)
- or (name == "refund" and action.refund is not None)
- or (name == "voteproducer" and action.vote_producer is not None)
- or (name == "updateauth" and action.update_auth is not None)
- or (name == "deleteauth" and action.delete_auth is not None)
- or (name == "linkauth" and action.link_auth is not None)
- or (name == "unlinkauth" and action.unlink_auth is not None)
- or (name == "newaccount" and action.new_account is not None)
- )
-
- elif name == "transfer":
- return action.transfer is not None
-
- elif action.unknown is not None:
- return True
-
- return False
### core/src/apps/eos/actions/layout.py
@@ -1,305 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor import TR
-from trezor.enums import ButtonRequestType
-from trezor.ui.layouts import confirm_properties
-
-from ..helpers import eos_asset_to_string, eos_name_to_string
-
-if TYPE_CHECKING:
- from collections.abc import Sequence
-
- from trezor.messages import (
- EosActionBuyRam,
- EosActionBuyRamBytes,
- EosActionCommon,
- EosActionDelegate,
- EosActionDeleteAuth,
- EosActionLinkAuth,
- EosActionNewAccount,
- EosActionRefund,
- EosActionSellRam,
- EosActionTransfer,
- EosActionUndelegate,
- EosActionUnlinkAuth,
- EosActionUpdateAuth,
- EosActionVoteProducer,
- EosAuthorization,
- )
- from trezor.ui.layouts import PropertyType
-
-
-# Whether action is last - and should be HoldToConfirm
-is_last = False
-
-
-# Because icon and br_code are almost always the same
-# (and also calling with positional arguments takes less space)
-async def _confirm_properties(
- br_name: str,
- title: str,
- props: Sequence[PropertyType],
-) -> None:
- await confirm_properties(
- br_name,
- title,
- props,
- hold=is_last,
- br_code=ButtonRequestType.ConfirmOutput,
- )
-
-
-async def confirm_action_buyram(msg: EosActionBuyRam) -> None:
- await _confirm_properties(
- "confirm_buyram",
- TR.eos__buy_ram,
- (
- (TR.eos__payer, eos_name_to_string(msg.payer), True),
- (TR.eos__receiver, eos_name_to_string(msg.receiver), True),
- (TR.words__amount, eos_asset_to_string(msg.quantity), True),
- ),
- )
-
-
-async def confirm_action_buyrambytes(msg: EosActionBuyRamBytes) -> None:
- await _confirm_properties(
- "confirm_buyrambytes",
- TR.eos__buy_ram,
- (
- (TR.eos__payer, eos_name_to_string(msg.payer), True),
- (TR.eos__receiver, eos_name_to_string(msg.receiver), True),
- (TR.eos__bytes, str(msg.bytes), True),
- ),
- )
-
-
-async def confirm_action_delegate(msg: EosActionDelegate) -> None:
- props: list[PropertyType] = [
- (TR.eos__sender, eos_name_to_string(msg.sender), True),
- (TR.eos__receiver, eos_name_to_string(msg.receiver), True),
- (TR.eos__cpu, eos_asset_to_string(msg.cpu_quantity), True),
- (TR.eos__net, eos_asset_to_string(msg.net_quantity), True),
- ]
- append = props.append # local_cache_attribute
- if msg.transfer:
- append((TR.eos__transfer, TR.words__yes, False))
- append((TR.eos__receiver, eos_name_to_string(msg.receiver), True))
- else:
- append((TR.eos__transfer, TR.words__no, False))
-
- await _confirm_properties(
- "confirm_delegate",
- TR.words__delegate,
- props,
- )
-
-
-async def confirm_action_sellram(msg: EosActionSellRam) -> None:
- await _confirm_properties(
- "confirm_sellram",
- TR.eos__sell_ram,
- (
- (TR.eos__receiver, eos_name_to_string(msg.account), True),
- (TR.eos__bytes, str(msg.bytes), True),
- ),
- )
-
-
-async def confirm_action_undelegate(msg: EosActionUndelegate) -> None:
- await _confirm_properties(
- "confirm_undelegate",
- TR.words__undelegate,
- (
- (TR.eos__sender, eos_name_to_string(msg.sender), True),
- (TR.eos__receiver, eos_name_to_string(msg.receiver), True),
- (TR.eos__cpu, eos_asset_to_string(msg.cpu_quantity), True),
- (TR.eos__net, eos_asset_to_string(msg.net_quantity), True),
- ),
- )
-
-
-async def confirm_action_refund(msg: EosActionRefund) -> None:
- await _confirm_properties(
- "confirm_refund",
- TR.eos__refund,
- ((TR.eos__owner, eos_name_to_string(msg.owner), True),),
- )
-
-
-async def confirm_action_voteproducer(msg: EosActionVoteProducer) -> None:
- producers = msg.producers # local_cache_attribute
-
- if msg.proxy and not producers:
- # PROXY
- await _confirm_properties(
- "confirm_voteproducer",
- TR.eos__vote_for_proxy,
- (
- (TR.eos__voter, eos_name_to_string(msg.voter), True),
- (TR.eos__proxy, eos_name_to_string(msg.proxy), True),
- ),
- )
-
- elif producers:
- # PRODUCERS
- await _confirm_properties(
- "confirm_voteproducer",
- TR.eos__vote_for_producers,
- [
- (None, f"{wi:2d}. {eos_name_to_string(producer)}", None)
- for wi, producer in enumerate(producers, 1)
- ],
- )
-
- else:
- # Cancel vote
- await _confirm_properties(
- "confirm_voteproducer",
- TR.eos__cancel_vote,
- ((TR.eos__voter, eos_name_to_string(msg.voter), True),),
- )
-
-
-async def confirm_action_transfer(msg: EosActionTransfer, account: str) -> None:
- props = [
- (TR.words__from_title, eos_name_to_string(msg.sender), True),
- (TR.eos__to, eos_name_to_string(msg.receiver), True),
- (TR.words__amount, eos_asset_to_string(msg.quantity), True),
- (TR.eos__contract, account, True),
- ]
- if msg.memo is not None:
- props.append((TR.eos__memo, msg.memo[:512], True))
- await _confirm_properties(
- "confirm_transfer",
- TR.eos__transfer,
- props,
- )
-
-
-async def confirm_action_updateauth(msg: EosActionUpdateAuth) -> None:
- props: list[PropertyType] = [
- (TR.words__account, eos_name_to_string(msg.account), True),
- (TR.eos__permission, eos_name_to_string(msg.permission), True),
- (TR.eos__parent, eos_name_to_string(msg.parent), True),
- ]
- props.extend(authorization_fields(msg.auth))
- await _confirm_properties(
- "confirm_updateauth",
- TR.eos__update_auth,
- props,
- )
-
-
-async def confirm_action_deleteauth(msg: EosActionDeleteAuth) -> None:
- await _confirm_properties(
- "confirm_deleteauth",
- TR.eos__delete_auth,
- (
- (TR.words__account, eos_name_to_string(msg.account), True),
- (TR.eos__permission, eos_name_to_string(msg.permission), True),
- ),
- )
-
-
-async def confirm_action_linkauth(msg: EosActionLinkAuth) -> None:
- await _confirm_properties(
- "confirm_linkauth",
- TR.eos__link_auth,
- (
- (TR.words__account, eos_name_to_string(msg.account), True),
- (TR.eos__code, eos_name_to_string(msg.code), True),
- (TR.eos__type, eos_name_to_string(msg.type), True),
- (TR.eos__requirement, eos_name_to_string(msg.requirement), True),
- ),
- )
-
-
-async def confirm_action_unlinkauth(msg: EosActionUnlinkAuth) -> None:
- await _confirm_properties(
- "confirm_unlinkauth",
- TR.eos__unlink_auth,
- (
- (TR.words__account, eos_name_to_string(msg.account), True),
- (TR.eos__code, eos_name_to_string(msg.code), True),
- (TR.eos__type, eos_name_to_string(msg.type), True),
- ),
- )
-
-
-async def confirm_action_newaccount(msg: EosActionNewAccount) -> None:
- props: list[PropertyType] = [
- (TR.eos__creator, eos_name_to_string(msg.creator), True),
- (TR.eos__name, eos_name_to_string(msg.name), True),
- ]
- props.extend(authorization_fields(msg.owner))
- props.extend(authorization_fields(msg.active))
- await _confirm_properties(
- "confirm_newaccount",
- TR.eos__new_account,
- props,
- )
-
-
-async def confirm_action_unknown(action: EosActionCommon, checksum: bytes) -> None:
- await confirm_properties(
- "confirm_unknown",
- TR.eos__arbitrary_data,
- (
- (TR.eos__contract, eos_name_to_string(action.account), False),
- (TR.eos__action_name, eos_name_to_string(action.name), False),
- (TR.eos__checksum, checksum, True),
- ),
- hold=is_last,
- br_code=ButtonRequestType.ConfirmOutput,
- )
-
-
-def authorization_fields(auth: EosAuthorization) -> list[PropertyType]:
- from trezor.wire import DataError
-
- from ..helpers import public_key_to_wif
-
- fields: list[PropertyType] = []
- append = fields.append # local_cache_attribute
-
- append((TR.eos__threshold, str(auth.threshold), False))
-
- # NOTE: getting rid of f-strings saved almost 100 bytes
-
- for i, key in enumerate(auth.keys, 1):
- if key.key is None:
- raise DataError("Key must be provided explicitly.")
-
- _key = public_key_to_wif(bytes(key.key))
- _weight = str(key.weight)
-
- header = f"Key #{i}"
- w_header = f"Key #{i} Weight"
-
- append((header, _key, True))
- append((w_header, _weight, True))
-
- for i, account in enumerate(auth.accounts, 1):
- _account = eos_name_to_string(account.account.actor)
- _permission = eos_name_to_string(account.account.permission)
-
- i = str(i)
- # TODO: handle translation
- a_header = f"Account #{i}"
- p_header = f"Acc Permission #{i}"
- w_header = f"Account #{i} weight"
-
- append((a_header, _account, True))
- append((p_header, _permission, True))
- append((w_header, str(account.weight), True))
-
- for i, wait in enumerate(auth.waits, 1):
- _wait = str(wait.wait_sec)
- _weight = str(wait.weight)
-
- header = f"Delay #{i}"
- w_header = f"{header} weight"
- append((header, _wait + " sec", False))
- append((w_header, _weight, False))
-
- return fields
### core/src/apps/eos/get_public_key.py
@@ -1,36 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.keychain import auto_keychain
-
-if TYPE_CHECKING:
- from trezor.messages import EosGetPublicKey, EosPublicKey
-
- from apps.common.keychain import Keychain
-
-
-@auto_keychain(__name__)
-async def get_public_key(msg: EosGetPublicKey, keychain: Keychain) -> EosPublicKey:
- from trezor.crypto.curve import secp256k1
- from trezor.messages import EosPublicKey
-
- from apps.common import lock_manager, paths
-
- from .helpers import public_key_to_wif
- from .layout import require_get_public_key
-
- lock_manager.touch_idle_timer_if_ble()
-
- await paths.validate_path(keychain, msg.address_n)
-
- node = keychain.derive(msg.address_n)
-
- public_key = secp256k1.publickey(node.private_key(), True)
- wif = public_key_to_wif(public_key)
-
- if msg.show_display:
- from . import PATTERN, SLIP44_ID
-
- path = paths.address_n_to_str(msg.address_n)
- account = paths.get_account_name("EOS", msg.address_n, PATTERN, SLIP44_ID)
- await require_get_public_key(wif, path, account)
- return EosPublicKey(wif_public_key=wif, raw_public_key=public_key)
### core/src/apps/eos/helpers.py
@@ -1,58 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from trezor.messages import EosAsset
-
-
-def base58_encode(prefix: str, sig_prefix: str, data: bytes) -> str:
- from trezor.crypto import base58
-
- b58 = base58.encode(data + base58.ripemd160_32(data + sig_prefix.encode()))
- if sig_prefix:
- return prefix + sig_prefix + "_" + b58
- else:
- return prefix + b58
-
-
-def eos_name_to_string(value: int) -> str:
- charmap = ".12345abcdefghijklmnopqrstuvwxyz"
- tmp = value
- string = ""
- for i in range(0, 13):
- c = charmap[tmp & (0x0F if i == 0 else 0x1F)]
- string = c + string
- tmp >>= 4 if i == 0 else 5
-
- return string.rstrip(".")
-
-
-def eos_asset_to_string(asset: EosAsset) -> str:
- from trezor.strings import format_amount_unit
-
- symbol_bytes = int.to_bytes(asset.symbol, 8, "big")
- precision = symbol_bytes[7]
- symbol = bytes(reversed(symbol_bytes[:7])).rstrip(b"\x00").decode("ascii")
-
- amount_digits = f"{asset.amount:0{precision}d}"
- if precision > 0:
- integer = amount_digits[:-precision]
- if integer == "":
- integer = "0"
- fraction = amount_digits[-precision:]
-
- return format_amount_unit(f"{integer}.{fraction}", symbol)
- else:
- return format_amount_unit(amount_digits, symbol)
-
-
-def public_key_to_wif(pub_key: bytes) -> str:
- from trezor.wire import DataError
-
- if pub_key[0] == 0x04 and len(pub_key) == 65:
- head = b"\x03" if pub_key[64] & 0x01 else b"\x02"
- compressed_pub_key = head + pub_key[1:33]
- elif pub_key[0] in [0x02, 0x03] and len(pub_key) == 33:
- compressed_pub_key = pub_key
- else:
- raise DataError("invalid public key")
- return base58_encode("EOS", "", compressed_pub_key)
### core/src/apps/eos/layout.py
@@ -1,22 +0,0 @@
-async def require_get_public_key(
- public_key: str, path: str, account: str | None
-) -> None:
- from trezor.ui.layouts import show_pubkey
-
- await show_pubkey(public_key, path=path, account=account)
-
-
-async def require_sign_tx(num_actions: int) -> None:
- from trezor import TR
- from trezor.enums import ButtonRequestType
- from trezor.strings import format_plural
- from trezor.ui.layouts import confirm_action
-
- await confirm_action(
- "confirm_tx",
- TR.send__sign_transaction,
- description=TR.eos__about_to_sign_template.format(
- format_plural("{count} {plural}", num_actions, TR.plurals__sign_x_actions)
- ),
- br_code=ButtonRequestType.SignTx,
- )
### core/src/apps/eos/sign_tx.py
@@ -1,67 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.keychain import auto_keychain
-
-if TYPE_CHECKING:
- from trezor.messages import EosSignedTx, EosSignTx
-
- from apps.common.keychain import Keychain
-
-
-@auto_keychain(__name__)
-async def sign_tx(msg: EosSignTx, keychain: Keychain) -> EosSignedTx:
- from trezor import TR
- from trezor.crypto.curve import secp256k1
- from trezor.crypto.hashlib import sha256
- from trezor.messages import EosSignedTx, EosTxActionAck, EosTxActionRequest
- from trezor.ui.layouts import show_continue_in_app
- from trezor.ui.layouts.progress import progress
- from trezor.utils import HashWriter
- from trezor.wire import DataError
- from trezor.wire.context import call
-
- from apps.common import paths
-
- from .actions import process_action
- from .helpers import base58_encode
- from .layout import require_sign_tx
- from .writers import write_bytes_fixed, write_header, write_uvarint
-
- num_actions = msg.num_actions # local_cache_attribute
-
- if not num_actions:
- raise DataError("No actions")
-
- await paths.validate_path(keychain, msg.address_n)
-
- node = keychain.derive(msg.address_n)
- sha = HashWriter(sha256())
-
- # init
- write_bytes_fixed(sha, msg.chain_id, 32)
- write_header(sha, msg.header)
- write_uvarint(sha, 0)
- write_uvarint(sha, num_actions)
- await require_sign_tx(num_actions)
-
- progress_obj = progress(indeterminate=True)
-
- # actions
- for index in range(num_actions):
- progress_obj.report(int(index / num_actions * 900))
- action = await call(EosTxActionRequest(), EosTxActionAck)
- is_last = index == num_actions - 1
- await process_action(sha, action, is_last)
-
- write_uvarint(sha, 0)
- write_bytes_fixed(sha, bytearray(32), 32)
-
- digest = sha.get_digest()
- signature = secp256k1.sign(
- node.private_key(), digest, True, secp256k1.CANONICAL_SIG_EOS
- )
-
- progress_obj.stop()
-
- show_continue_in_app(TR.send__transaction_signed)
- return EosSignedTx(signature=base58_encode("SIG_", "K1", signature))
### core/src/apps/eos/writers.py
@@ -1,170 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.writers import (
- write_bytes_fixed,
- write_bytes_unchecked,
- write_uint8,
- write_uint16_le,
- write_uint32_le,
- write_uint64_le,
- write_uvarint,
-)
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import (
- EosActionBuyRam,
- EosActionBuyRamBytes,
- EosActionCommon,
- EosActionDelegate,
- EosActionDeleteAuth,
- EosActionLinkAuth,
- EosActionNewAccount,
- EosActionRefund,
- EosActionSellRam,
- EosActionTransfer,
- EosActionUndelegate,
- EosActionUnlinkAuth,
- EosActionUpdateAuth,
- EosActionVoteProducer,
- EosAsset,
- EosAuthorization,
- EosTxHeader,
- )
- from trezor.utils import Writer
-
-
-def write_auth(w: Writer, auth: EosAuthorization) -> None:
- from trezor.wire import DataError
-
- write_uint32_le(w, auth.threshold)
- write_uvarint(w, len(auth.keys))
- for key in auth.keys:
- if key.key is None:
- raise DataError("Key must be provided explicitly.")
- write_uvarint(w, key.type)
- write_bytes_fixed(w, key.key, 33)
- write_uint16_le(w, key.weight)
-
- write_uvarint(w, len(auth.accounts))
- for account in auth.accounts:
- write_uint64_le(w, account.account.actor)
- write_uint64_le(w, account.account.permission)
- write_uint16_le(w, account.weight)
-
- write_uvarint(w, len(auth.waits))
- for wait in auth.waits:
- write_uint32_le(w, wait.wait_sec)
- write_uint16_le(w, wait.weight)
-
-
-def write_header(hasher: Writer, header: EosTxHeader) -> None:
- write_uint32_le(hasher, header.expiration)
- write_uint16_le(hasher, header.ref_block_num)
- write_uint32_le(hasher, header.ref_block_prefix)
- write_uvarint(hasher, header.max_net_usage_words)
- write_uint8(hasher, header.max_cpu_usage_ms)
- write_uvarint(hasher, header.delay_sec)
-
-
-def write_action_transfer(w: Writer, msg: EosActionTransfer) -> None:
- write_uint64_le(w, msg.sender)
- write_uint64_le(w, msg.receiver)
- write_asset(w, msg.quantity)
- write_bytes_prefixed(w, msg.memo.encode())
-
-
-def write_action_buyram(w: Writer, msg: EosActionBuyRam) -> None:
- write_uint64_le(w, msg.payer)
- write_uint64_le(w, msg.receiver)
- write_asset(w, msg.quantity)
-
-
-def write_action_buyrambytes(w: Writer, msg: EosActionBuyRamBytes) -> None:
- write_uint64_le(w, msg.payer)
- write_uint64_le(w, msg.receiver)
- write_uint32_le(w, msg.bytes)
-
-
-def write_action_sellram(w: Writer, msg: EosActionSellRam) -> None:
- write_uint64_le(w, msg.account)
- write_uint64_le(w, msg.bytes)
-
-
-def write_action_delegate(w: Writer, msg: EosActionDelegate) -> None:
- write_action_undelegate(w, msg)
- write_uint8(w, 1 if msg.transfer else 0)
-
-
-def write_action_undelegate(
- w: Writer, msg: EosActionUndelegate | EosActionDelegate
-) -> None:
- write_uint64_le(w, msg.sender)
- write_uint64_le(w, msg.receiver)
- write_asset(w, msg.net_quantity)
- write_asset(w, msg.cpu_quantity)
-
-
-def write_action_refund(w: Writer, msg: EosActionRefund) -> None:
- write_uint64_le(w, msg.owner)
-
-
-def write_action_voteproducer(w: Writer, msg: EosActionVoteProducer) -> None:
- write_uint64_le(w, msg.voter)
- write_uint64_le(w, msg.proxy)
- write_uvarint(w, len(msg.producers))
- for producer in msg.producers:
- write_uint64_le(w, producer)
-
-
-def write_action_updateauth(w: Writer, msg: EosActionUpdateAuth) -> None:
- write_action_deleteauth(w, msg)
- write_uint64_le(w, msg.parent)
- write_auth(w, msg.auth)
-
-
-def write_action_deleteauth(
- w: Writer, msg: EosActionDeleteAuth | EosActionUpdateAuth
-) -> None:
- write_uint64_le(w, msg.account)
- write_uint64_le(w, msg.permission)
-
-
-def write_action_linkauth(w: Writer, msg: EosActionLinkAuth) -> None:
- write_action_unlinkauth(w, msg)
- write_uint64_le(w, msg.requirement)
-
-
-def write_action_unlinkauth(
- w: Writer, msg: EosActionUnlinkAuth | EosActionLinkAuth
-) -> None:
- write_uint64_le(w, msg.account)
- write_uint64_le(w, msg.code)
- write_uint64_le(w, msg.type)
-
-
-def write_action_newaccount(w: Writer, msg: EosActionNewAccount) -> None:
- write_uint64_le(w, msg.creator)
- write_uint64_le(w, msg.name)
- write_auth(w, msg.owner)
- write_auth(w, msg.active)
-
-
-def write_action_common(w: Writer, msg: EosActionCommon) -> None:
- write_uint64_le(w, msg.account)
- write_uint64_le(w, msg.name)
- write_uvarint(w, len(msg.authorization))
- for authorization in msg.authorization:
- write_uint64_le(w, authorization.actor)
- write_uint64_le(w, authorization.permission)
-
-
-def write_asset(w: Writer, asset: EosAsset) -> None:
- write_uint64_le(w, asset.amount)
- write_uint64_le(w, asset.symbol)
-
-
-def write_bytes_prefixed(w: Writer, data: AnyBytes) -> None:
- write_uvarint(w, len(data))
- write_bytes_unchecked(w, data)
### core/src/apps/nem/README.md
@@ -1,64 +0,0 @@
-# NEM
-
-MAINTAINER = Tomas Susanka <tomas.susanka@satoshilabs.com>
-
-AUTHOR = Tomas Susanka <tomas.susanka@satoshilabs.com>
-
-REVIEWER = Jan Pochyla <jan.pochyla@satoshilabs.com>
-
-ADVISORS = Grégory Saive, Saleem Rashid
-
------
-
-This implementation of NEM for Trezor Core is mostly based on the trezor-mcu C implementation by Saleem Rashid. The protobuf messages are heavily inspired by the [NEM NSI API](https://nemproject.github.io/).
-
-You can read a lot about NEM in the [Technical Reference paper](https://nem.io/wp-content/themes/nem/files/NEM_techRef.pdf).
-
-This app supports number of NEM services (transfers, mosaics, namespaces and multisig), also called _transactions_ as the general term. Each of those services is divided into corresponding folders. In those folders we use `serialize.py` for the transaction serialization and `layout.py` to display data and to require user interactions.
-
-In this app we support the following:
-
-### Mosaics
-
-You can read more on mosaics [here](https://blog.nem.io/mosaics-and-namespaces-2/). Each mosaic has a name and lives under certain namespace, this identification _namespace.mosaic_ is unique in the network.
-
-Trezor Core supports mosaic creation and changing the mosaic's supply.
-
-### Namespaces
-
-You can read more on namespaces at the [same link](https://blog.nem.io/mosaics-and-namespaces-2/). Namespace creation is supported.
-
-### Transfers
-
-There is a number of things the term _transfer_ may refer to:
-
-##### Regular transfers
-
-The traditional transfer of the native NEM coins – XEM.
-
-##### Mosaic transfers
-
-Except XEM you can also transfer mosaics. Mosaics are _attached_ to a regular transfer.
-
-Each such attached mosaic has a `quantity` denoting the amount of such mosaic to be transferred. There is a catch though: the actual amount of the mosaic to be transferred isn't `quantity` but `mosaic.quantity * transfer.amount`. In other words, the quantity is multiplied by the `amount` field in transfer. This is most likely due to backwards compatibility where transfers with amount 0 where discarded.
-
-You can also transfer XEM and mosaics at the same time. In that case you need to attach the nem.xem mosaic. From the user point of view Trezor shows this as a regular XEM transfer.
-
-##### Importance transfer
-
-Importance transfer is a special kind of transaction, which enables (or disables) delegated harvesting.
-
-### Multisig
-
-NEM supports multisig accounts. First you convert an account into a multisig and add cosignatories. After that any cosignatory can initiate a multisig transaction.
-
-Multisig is a wrapper, so you can use any of the services mentioned above wrapped into a multisig transaction requiring n out of m signatures.
-
-A common scenario to test out multisig with NanoWallet might be:
-
-- Create a simple account without Trezor (account A)
-- Create another account with Trezor One (account B)
-- Convert A to a multisig with B as a cosigner
-- Create another account with Trezor T (account C)
-- Add C as a cosigner
-- Try to send a transaction where B and C cosigns
### core/src/apps/nem/__init__.py
@@ -1,9 +0,0 @@
-from apps.common.paths import PATTERN_SEP5
-
-CURVE = "ed25519-keccak"
-SLIP44_ID = 43
-
-PATTERNS = (
- PATTERN_SEP5,
- "m/44'/coin_type'/account'/0'/0'", # NanoWallet compatibility
-)
### core/src/apps/nem/get_address.py
@@ -1,47 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.keychain import with_slip44_keychain
-
-from . import CURVE, PATTERNS, SLIP44_ID
-
-if TYPE_CHECKING:
- from trezor.messages import NEMAddress, NEMGetAddress
-
- from apps.common.keychain import Keychain
-
-
-@with_slip44_keychain(*PATTERNS, slip44_id=SLIP44_ID, curve=CURVE)
-async def get_address(msg: NEMGetAddress, keychain: Keychain) -> NEMAddress:
- from trezor import TR
- from trezor.messages import NEMAddress
- from trezor.ui.layouts import show_address
-
- from apps.common import paths
-
- from .helpers import check_path, get_network_str
- from .validators import validate_network
-
- address_n = msg.address_n # local_cache_attribute
- network = msg.network # local_cache_attribute
-
- validate_network(network)
- await paths.validate_path(keychain, address_n, check_path(address_n, network))
-
- node = keychain.derive(address_n)
- address = node.nem_address(network)
-
- if msg.show_display:
- from . import PATTERNS, SLIP44_ID
-
- coin = "NEM"
- await show_address(
- address,
- subtitle=TR.address__coin_address_template.format(coin),
- case_sensitive=False,
- path=paths.address_n_to_str(address_n),
- account=paths.get_account_name(coin, msg.address_n, PATTERNS, SLIP44_ID),
- network=get_network_str(network),
- chunkify=bool(msg.chunkify),
- )
-
- return NEMAddress(address=address)
### core/src/apps/nem/helpers.py
@@ -1,64 +0,0 @@
-from micropython import const
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from apps.common import paths
-
-
-NEM_NETWORK_MAINNET = const(0x68)
-NEM_NETWORK_TESTNET = const(0x98)
-NEM_NETWORK_MIJIN = const(0x60)
-
-NEM_TRANSACTION_TYPE_TRANSFER = const(0x0101)
-NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER = const(0x0801)
-NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION = const(0x1001)
-NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE = const(0x1002)
-NEM_TRANSACTION_TYPE_MULTISIG = const(0x1004)
-NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE = const(0x2001)
-NEM_TRANSACTION_TYPE_MOSAIC_CREATION = const(0x4001)
-NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE = const(0x4002)
-
-NEM_MAX_DIVISIBILITY = const(6)
-NEM_MAX_SUPPLY = const(9_000_000_000)
-
-NEM_SALT_SIZE = const(32)
-AES_BLOCK_SIZE = const(16)
-NEM_HASH_ALG = "keccak"
-NEM_PUBLIC_KEY_SIZE = const(32) # ed25519 public key
-NEM_LEVY_PERCENTILE_DIVISOR_ABSOLUTE = const(10_000)
-NEM_MOSAIC_AMOUNT_DIVISOR = const(1_000_000)
-
-NEM_MAX_PLAIN_PAYLOAD_SIZE = const(1024)
-NEM_MAX_ENCRYPTED_PAYLOAD_SIZE = const(960)
-
-
-def get_network_str(network: int) -> str:
- if network == NEM_NETWORK_MAINNET:
- return "Mainnet"
- elif network == NEM_NETWORK_TESTNET:
- return "Testnet"
- elif network == NEM_NETWORK_MIJIN:
- return "Mijin"
-
- raise ValueError # no valid network
-
-
-def check_path(path: paths.Bip32Path, network: int) -> bool:
- """Validates that the appropriate coin_type is set for the given network."""
- from apps.common import paths
-
- from . import SLIP44_ID
-
- if len(path) < 2:
- return False
-
- coin_type = path[1] - paths.HARDENED
-
- if network == NEM_NETWORK_TESTNET:
- return coin_type == 1
-
- if network in (NEM_NETWORK_MAINNET, NEM_NETWORK_MIJIN):
- return coin_type == SLIP44_ID
-
- # unknown network
- return False
### core/src/apps/nem/layout.py
@@ -1,53 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor import TR
-from trezor.enums import ButtonRequestType
-from trezor.strings import format_amount, format_amount_unit
-from trezor.ui.layouts import confirm_metadata
-
-from .helpers import NEM_MAX_DIVISIBILITY
-
-if TYPE_CHECKING:
- from trezor.ui.layouts import PropertyType
-
-
-async def require_confirm_text(action: str) -> None:
- await confirm_metadata(
- "confirm_nem",
- TR.nem__confirm_action,
- action,
- br_code=ButtonRequestType.ConfirmOutput,
- )
-
-
-async def require_confirm_fee(action: str, fee: int) -> None:
- await confirm_metadata(
- "confirm_fee",
- TR.words__confirm_fee,
- action
- + "\n"
- + format_amount_unit(format_amount(fee, NEM_MAX_DIVISIBILITY), "XEM"),
- ButtonRequestType.ConfirmOutput,
- )
-
-
-async def require_confirm_content(headline: str, content: list[PropertyType]) -> None:
- from trezor.ui.layouts import confirm_properties
-
- await confirm_properties(
- "confirm_content",
- headline,
- content,
- )
-
-
-async def require_confirm_final(fee: int) -> None:
- # we use SignTx, not ConfirmOutput, for compatibility with T1
- await confirm_metadata(
- "confirm_final",
- TR.nem__final_confirm,
- TR.nem__sign_tx_fee_template.format(
- format_amount_unit(format_amount(fee, NEM_MAX_DIVISIBILITY), "XEM")
- ),
- hold=True,
- )
### core/src/apps/nem/mosaic/__init__.py
@@ -1,30 +0,0 @@
-from typing import TYPE_CHECKING
-
-from . import layout, serialize
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import (
- NEMMosaicCreation,
- NEMMosaicSupplyChange,
- NEMTransactionCommon,
- )
-
-
-async def mosaic_creation(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- creation: NEMMosaicCreation,
-) -> bytearray:
- await layout.ask_mosaic_creation(common, creation)
- return serialize.serialize_mosaic_creation(common, creation, public_key)
-
-
-async def supply_change(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- change: NEMMosaicSupplyChange,
-) -> bytearray:
- await layout.ask_supply_change(common, change)
- return serialize.serialize_mosaic_supply_change(common, change, public_key)
### core/src/apps/nem/mosaic/helpers.py
@@ -1,24 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from trezor.messages import NEMMosaic
-
- from .nem_mosaics import Mosaic
-
-
-def get_mosaic_definition(
- namespace_name: str, mosaic_name: str, network: int
-) -> Mosaic | None:
- from .nem_mosaics import mosaics_iterator
-
- for mosaic in mosaics_iterator():
- if namespace_name == mosaic.namespace and mosaic_name == mosaic.mosaic:
- if (mosaic.networks is None) or (network in mosaic.networks):
- return mosaic
- return None
-
-
-def is_nem_xem_mosaic(mosaic: Mosaic | NEMMosaic) -> bool:
- if mosaic.namespace == "nem" and mosaic.mosaic == "xem":
- return True
- return False
### core/src/apps/nem/mosaic/layout.py
@@ -1,106 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor import TR
-
-from ..layout import require_confirm_content, require_confirm_final
-
-if TYPE_CHECKING:
- from trezor.messages import (
- NEMMosaicCreation,
- NEMMosaicDefinition,
- NEMMosaicSupplyChange,
- NEMTransactionCommon,
- )
- from trezor.ui.layouts import PropertyType
-
-
-async def ask_mosaic_creation(
- common: NEMTransactionCommon, creation: NEMMosaicCreation
-) -> None:
- from ..layout import require_confirm_fee
-
- creation_message: list[PropertyType] = [
- (TR.nem__create_mosaic, creation.definition.mosaic, False),
- (TR.nem__under_namespace, creation.definition.namespace, False),
- ]
- await require_confirm_content(TR.nem__create_mosaic, creation_message)
- await _require_confirm_properties(creation.definition)
- await require_confirm_fee(TR.nem__confirm_creation_fee, creation.fee)
-
- await require_confirm_final(common.fee)
-
-
-async def ask_supply_change(
- common: NEMTransactionCommon, change: NEMMosaicSupplyChange
-) -> None:
- from trezor.enums import NEMSupplyChangeType
-
- from ..layout import require_confirm_text
-
- supply_message: list[PropertyType] = [
- (TR.nem__modify_supply_for, change.mosaic, False),
- (TR.nem__under_namespace, change.namespace, False),
- ]
- await require_confirm_content(TR.nem__supply_change, supply_message)
- if change.type == NEMSupplyChangeType.SupplyChange_Decrease:
- action = TR.nem__decrease
- elif change.type == NEMSupplyChangeType.SupplyChange_Increase:
- action = TR.nem__increase
- else:
- raise ValueError("Invalid supply change type")
- await require_confirm_text(
- TR.nem__supply_units_template.format(action, change.delta)
- )
-
- await require_confirm_final(common.fee)
-
-
-async def _require_confirm_properties(definition: NEMMosaicDefinition) -> None:
- from trezor.enums import NEMMosaicLevy
- from trezor.ui.layouts import confirm_properties
-
- properties: list[PropertyType] = []
- append = properties.append # local_cache_attribute
-
- # description
- if definition.description:
- append((TR.nem__description, definition.description, False))
-
- # transferable
- transferable = TR.words__yes if definition.transferable else TR.words__no
- append((TR.nem__transferable, transferable, False))
-
- # mutable_supply
- imm = TR.nem__mutable if definition.mutable_supply else TR.nem__immutable
- if definition.supply:
- append((TR.nem__initial_supply, str(definition.supply) + "\n" + imm, False))
- else:
- append((TR.nem__initial_supply, imm, False))
-
- # levy
- if definition.levy:
- # asserts below checked in nem.validators._validate_mosaic_creation
- assert definition.levy_address is not None
- assert definition.levy_namespace is not None
- assert definition.levy_mosaic is not None
-
- append((TR.nem__levy_recipient, definition.levy_address, True))
-
- append((TR.nem__levy_fee, str(definition.fee), False))
- append((TR.nem__levy_divisibility, str(definition.divisibility), False))
-
- append((TR.nem__levy_namespace, definition.levy_namespace, True))
- append((TR.nem__levy_mosaic, definition.levy_mosaic, False))
-
- levy_type = (
- TR.nem__absolute
- if definition.levy == NEMMosaicLevy.MosaicLevy_Absolute
- else TR.nem__percentile
- )
- append((TR.nem__levy_type, levy_type, False))
-
- await confirm_properties(
- "confirm_properties",
- TR.nem__confirm_properties,
- properties,
- )
### core/src/apps/nem/mosaic/nem_mosaics.py
@@ -1,113 +0,0 @@
-# generated from nem_mosaics.py.mako
-# (by running `make templates` in `core`)
-# do not edit manually!
-
-# NOTE: not supplying the kwargs saves 120 bytes of code size
-# `networks` needs kwarg as `levy` above is optional
-
-from typing import TYPE_CHECKING
-
-from trezor.enums import NEMMosaicLevy
-
-if TYPE_CHECKING:
- from collections.abc import Iterator
-
-
-class MosaicLevy:
- def __init__(
- self,
- type: NEMMosaicLevy,
- fee: int,
- namespace: str,
- mosaic: str,
- ) -> None:
- self.type = type
- self.fee = fee
- self.namespace = namespace
- self.mosaic = mosaic
-
-
-class Mosaic:
- def __init__(
- self,
- name: str,
- ticker: str,
- namespace: str,
- mosaic: str,
- divisibility: int,
- levy: MosaicLevy | None = None,
- networks: tuple[int, ...] | None = None,
- ) -> None:
- self.name = name
- self.ticker = ticker
- self.namespace = namespace
- self.mosaic = mosaic
- self.divisibility = divisibility
- self.levy = levy
- self.networks = networks
-
-
-def mosaics_iterator() -> Iterator[Mosaic]:
- yield Mosaic(
- "NEM", # name
- " XEM", # ticker
- "nem", # namespace
- "xem", # mosaic
- 6, # divisibility
- None, # levy
- )
- yield Mosaic(
- "DIMCOIN", # name
- " DIM", # ticker
- "dim", # namespace
- "coin", # mosaic
- 6, # divisibility
- MosaicLevy( # levy
- NEMMosaicLevy.MosaicLevy_Percentile, # type
- 10, # fee
- "dim", # namespace
- "coin", # mosaic
- ),
- (104,), # networks
- )
- yield Mosaic(
- "DIM TOKEN", # name
- " DIMTOK", # ticker
- "dim", # namespace
- "token", # mosaic
- 6, # divisibility
- None, # levy
- (104,), # networks
- )
- yield Mosaic(
- "Breeze Token", # name
- " BREEZE", # ticker
- "breeze", # namespace
- "breeze-token", # mosaic
- 0, # divisibility
- None, # levy
- (104,), # networks
- )
- yield Mosaic(
- "PacNEM Game Credits", # name
- " PAC:HRT", # ticker
- "pacnem", # namespace
- "heart", # mosaic
- 0, # divisibility
- None, # levy
- (104,), # networks
- )
- yield Mosaic(
- "PacNEM Score Tokens", # name
- " PAC:CHS", # ticker
- "pacnem", # namespace
- "cheese", # mosaic
- 6, # divisibility
- MosaicLevy( # levy
- NEMMosaicLevy.MosaicLevy_Percentile, # type
- 100, # fee
- "nem", # namespace
- "xem", # mosaic
- ),
- (104,), # networks
- )
### core/src/apps/nem/mosaic/nem_mosaics.py.mako
@@ -1,72 +0,0 @@
-# generated from nem_mosaics.py.mako
-# (by running `make templates` in `core`)
-# do not edit manually!
-
-# NOTE: not supplying the kwargs saves 120 bytes of code size
-# `networks` needs kwarg as `levy` above is optional
-
-from typing import TYPE_CHECKING
-
-from trezor.enums import NEMMosaicLevy
-
-if TYPE_CHECKING:
- from collections.abc import Iterator
-
-
-class MosaicLevy:
- def __init__(
- self,
- type: NEMMosaicLevy,
- fee: int,
- namespace: str,
- mosaic: str,
- ) -> None:
- self.type = type
- self.fee = fee
- self.namespace = namespace
- self.mosaic = mosaic
-
-
-class Mosaic:
- def __init__(
- self,
- name: str,
- ticker: str,
- namespace: str,
- mosaic: str,
- divisibility: int,
- levy: MosaicLevy | None = None,
- networks: tuple[int, ...] | None = None,
- ) -> None:
- self.name = name
- self.ticker = ticker
- self.namespace = namespace
- self.mosaic = mosaic
- self.divisibility = divisibility
- self.levy = levy
- self.networks = networks
-
-
-def mosaics_iterator() -> Iterator[Mosaic]:
-% for m in supported_on("T2T1", nem):
- yield Mosaic(
- "${m.name}", # name
- " ${m.ticker}", # ticker
- "${m.namespace}", # namespace
- "${m.mosaic}", # mosaic
- ${m.divisibility}, # divisibility
-% if "levy" in m:
- MosaicLevy( # levy
- NEMMosaicLevy.${m.levy}, # type
- ${m.fee}, # fee
- "${m.levy_namespace}", # namespace
- "${m.levy_mosaic}", # mosaic
- ),
-% else:
- None, # levy
-% endif
-% if "networks" in m:
- ${tuple(m.networks)}, # networks
-% endif
- )
-% endfor
### core/src/apps/nem/mosaic/serialize.py
@@ -1,113 +0,0 @@
-from typing import TYPE_CHECKING
-
-from ..writers import (
- serialize_tx_common,
- write_bytes_with_len,
- write_uint32_le,
- write_uint64_le,
-)
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import (
- NEMMosaicCreation,
- NEMMosaicSupplyChange,
- NEMTransactionCommon,
- )
- from trezor.utils import Writer
-
-
-def serialize_mosaic_creation(
- common: NEMTransactionCommon, creation: NEMMosaicCreation, public_key: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_MOSAIC_CREATION
-
- w = serialize_tx_common(common, public_key, NEM_TRANSACTION_TYPE_MOSAIC_CREATION)
-
- mosaics_w = bytearray()
- write_bytes_with_len(mosaics_w, public_key)
- definition = creation.definition # local_cache_attribute
-
- identifier_w = bytearray()
- write_bytes_with_len(identifier_w, definition.namespace.encode())
- write_bytes_with_len(identifier_w, definition.mosaic.encode())
-
- write_bytes_with_len(mosaics_w, identifier_w)
- write_bytes_with_len(mosaics_w, definition.description.encode())
- write_uint32_le(mosaics_w, 4) # number of properties
-
- _write_property(mosaics_w, "divisibility", definition.divisibility)
- _write_property(mosaics_w, "initialSupply", definition.supply)
- _write_property(mosaics_w, "supplyMutable", definition.mutable_supply)
- _write_property(mosaics_w, "transferable", definition.transferable)
-
- if definition.levy:
- # all below asserts checked by nem.validators._validate_mosaic_creation
- assert definition.levy_namespace is not None
- assert definition.levy_mosaic is not None
- assert definition.levy_address is not None
- assert definition.fee is not None
-
- levy_identifier_w = bytearray()
- write_bytes_with_len(levy_identifier_w, definition.levy_namespace.encode())
- write_bytes_with_len(levy_identifier_w, definition.levy_mosaic.encode())
-
- levy_w = bytearray()
- write_uint32_le(levy_w, definition.levy)
- write_bytes_with_len(levy_w, definition.levy_address.encode())
- write_bytes_with_len(levy_w, levy_identifier_w)
- write_uint64_le(levy_w, definition.fee)
-
- write_bytes_with_len(mosaics_w, levy_w)
- else:
- write_uint32_le(mosaics_w, 0) # no levy
-
- write_bytes_with_len(w, mosaics_w)
-
- write_bytes_with_len(w, creation.sink.encode())
- write_uint64_le(w, creation.fee)
-
- return w
-
-
-def serialize_mosaic_supply_change(
- common: NEMTransactionCommon, change: NEMMosaicSupplyChange, public_key: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE
-
- w = serialize_tx_common(
- common, public_key, NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE
- )
-
- identifier_w = bytearray()
- write_bytes_with_len(identifier_w, change.namespace.encode())
- write_bytes_with_len(identifier_w, change.mosaic.encode())
-
- write_bytes_with_len(w, identifier_w)
-
- write_uint32_le(w, change.type)
- write_uint64_le(w, change.delta)
- return w
-
-
-def _write_property(w: Writer, name: str, value: int | bool | str | None) -> None:
- if value is None:
- if name in ("divisibility", "initialSupply"):
- value = 0
- elif name in ("supplyMutable", "transferable"):
- value = False
- if isinstance(value, bool):
- if value:
- value = "true"
- else:
- value = "false"
- elif isinstance(value, int):
- value = str(value)
- if not isinstance(value, str):
- raise ValueError("Incompatible value type")
- byte_name = name.encode()
- byte_value = value.encode()
- write_uint32_le(w, 4 + len(byte_name) + 4 + len(byte_value))
- write_bytes_with_len(w, byte_name)
- write_bytes_with_len(w, byte_value)
### core/src/apps/nem/multisig/__init__.py
@@ -1,48 +0,0 @@
-from typing import TYPE_CHECKING
-
-from . import layout, serialize
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import (
- NEMAggregateModification,
- NEMSignTx,
- NEMTransactionCommon,
- )
-
-
-async def ask(msg: NEMSignTx) -> None:
- await layout.ask_multisig(msg)
-
-
-def initiate(
- public_key: AnyBytes, common: NEMTransactionCommon, inner_tx: AnyBytes
-) -> bytearray:
- return serialize.serialize_multisig(common, public_key, inner_tx)
-
-
-def cosign(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- inner_tx: AnyBytes,
- signer: AnyBytes,
-) -> bytearray:
- return serialize.serialize_multisig_signature(common, public_key, inner_tx, signer)
-
-
-async def aggregate_modification(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- aggr: NEMAggregateModification,
- multisig: bool,
-) -> bytearray:
- await layout.ask_aggregate_modification(common, aggr, multisig)
- w = serialize.serialize_aggregate_modification(common, aggr, public_key)
-
- for m in aggr.modifications:
- serialize.write_cosignatory_modification(w, m.type, m.public_key)
-
- if aggr.relative_change:
- serialize.write_minimum_cosignatories(w, aggr.relative_change)
- return w
### core/src/apps/nem/multisig/layout.py
@@ -1,67 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor import TR
-from trezor.crypto import nem
-
-if TYPE_CHECKING:
- from trezor.messages import (
- NEMAggregateModification,
- NEMSignTx,
- NEMTransactionCommon,
- )
-
-
-async def ask_multisig(msg: NEMSignTx) -> None:
- from ..layout import require_confirm_fee
-
- assert msg.multisig is not None # sign_tx
- assert msg.multisig.signer is not None # sign_tx
- address = nem.compute_address(msg.multisig.signer, msg.transaction.network)
- if msg.cosigning:
- await _require_confirm_address(TR.nem__cosign_transaction_for, address)
- else:
- await _require_confirm_address(TR.nem__initiate_transaction_for, address)
- await require_confirm_fee(TR.nem__confirm_multisig_fee, msg.transaction.fee)
-
-
-async def ask_aggregate_modification(
- common: NEMTransactionCommon,
- mod: NEMAggregateModification,
- multisig: bool,
-) -> None:
- from trezor.enums import NEMModificationType
-
- from ..layout import require_confirm_final, require_confirm_text
-
- if not multisig:
- await require_confirm_text(TR.nem__convert_account_to_multisig)
-
- for m in mod.modifications:
- if m.type == NEMModificationType.CosignatoryModification_Add:
- action = TR.nem__add
- else:
- action = TR.nem__remove
- address = nem.compute_address(m.public_key, common.network)
- await _require_confirm_address(action + TR.nem__cosignatory, address)
-
- if mod.relative_change:
- if multisig:
- action = TR.nem__modify_the_number_of_cosignatories_by
- else:
- action = TR.nem__set_minimum_cosignatories_to
- await require_confirm_text(action + str(mod.relative_change) + "?")
-
- await require_confirm_final(common.fee)
-
-
-async def _require_confirm_address(action: str, address: str) -> None:
- from trezor.enums import ButtonRequestType
- from trezor.ui.layouts import confirm_address
-
- await confirm_address(
- TR.nem__confirm_address,
- address,
- description=action,
- br_name="confirm_multisig",
- br_code=ButtonRequestType.ConfirmOutput,
- )
### core/src/apps/nem/multisig/serialize.py
@@ -1,68 +0,0 @@
-from typing import TYPE_CHECKING
-
-from ..writers import serialize_tx_common, write_bytes_with_len, write_uint32_le
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import NEMAggregateModification, NEMTransactionCommon
- from trezor.utils import Writer
-
-
-def serialize_multisig(
- common: NEMTransactionCommon, public_key: AnyBytes, inner: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_MULTISIG
-
- w = serialize_tx_common(common, public_key, NEM_TRANSACTION_TYPE_MULTISIG)
- write_bytes_with_len(w, inner)
- return w
-
-
-def serialize_multisig_signature(
- common: NEMTransactionCommon,
- public_key: AnyBytes,
- inner: AnyBytes,
- address_public_key: AnyBytes,
-) -> bytearray:
- from trezor.crypto import hashlib, nem
-
- from ..helpers import NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE
-
- w = serialize_tx_common(common, public_key, NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE)
- digest = hashlib.sha3_256(inner, keccak=True).digest()
- address = nem.compute_address(address_public_key, common.network)
-
- write_uint32_le(w, 4 + len(digest))
- write_bytes_with_len(w, digest)
- write_bytes_with_len(w, address.encode())
- return w
-
-
-def serialize_aggregate_modification(
- common: NEMTransactionCommon, mod: NEMAggregateModification, public_key: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION
-
- version = common.network << 24 | 1
- if mod.relative_change:
- version = common.network << 24 | 2
-
- w = serialize_tx_common(
- common, public_key, NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION, version
- )
- write_uint32_le(w, len(mod.modifications))
- return w
-
-
-def write_cosignatory_modification(
- w: Writer, cosignatory_type: int, cosignatory_pubkey: AnyBytes
-) -> None:
- write_uint32_le(w, 4 + 4 + len(cosignatory_pubkey))
- write_uint32_le(w, cosignatory_type)
- write_bytes_with_len(w, cosignatory_pubkey)
-
-
-def write_minimum_cosignatories(w: Writer, relative_change: int) -> None:
- write_uint32_le(w, 4)
- write_uint32_le(w, relative_change)
### core/src/apps/nem/namespace/__init__.py
@@ -1,17 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import NEMProvisionNamespace, NEMTransactionCommon
-
-
-async def namespace(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- namespace: NEMProvisionNamespace,
-) -> bytearray:
- from . import layout, serialize
-
- await layout.ask_provision_namespace(common, namespace)
- return serialize.serialize_provision_namespace(common, namespace, public_key)
### core/src/apps/nem/namespace/layout.py
@@ -1,31 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from trezor.messages import NEMProvisionNamespace, NEMTransactionCommon
- from trezor.ui.layouts import PropertyType
-
-
-async def ask_provision_namespace(
- common: NEMTransactionCommon, namespace: NEMProvisionNamespace
-) -> None:
- from trezor import TR
-
- from ..layout import (
- require_confirm_content,
- require_confirm_fee,
- require_confirm_final,
- )
-
- if namespace.parent:
- content: list[PropertyType] = [
- (TR.nem__create_namespace, namespace.namespace, False),
- (TR.nem__under_namespace, namespace.parent, False),
- ]
- await require_confirm_content(TR.nem__confirm_namespace, content)
- else:
- content = [(TR.nem__create_namespace, namespace.namespace, False)]
- await require_confirm_content(TR.nem__confirm_namespace, content)
-
- await require_confirm_fee(TR.nem__confirm_rental_fee, namespace.fee)
-
- await require_confirm_final(common.fee)
### core/src/apps/nem/namespace/serialize.py
@@ -1,32 +0,0 @@
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import NEMProvisionNamespace, NEMTransactionCommon
-
-
-def serialize_provision_namespace(
- common: NEMTransactionCommon, namespace: NEMProvisionNamespace, public_key: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE
- from ..writers import (
- serialize_tx_common,
- write_bytes_with_len,
- write_uint32_le,
- write_uint64_le,
- )
-
- tx = serialize_tx_common(
- common, public_key, NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE
- )
-
- write_bytes_with_len(tx, namespace.sink.encode())
- write_uint64_le(tx, namespace.fee)
- write_bytes_with_len(tx, namespace.namespace.encode())
- if namespace.parent:
- write_bytes_with_len(tx, namespace.parent.encode())
- else:
- write_uint32_le(tx, 0xFFFF_FFFF)
-
- return tx
### core/src/apps/nem/sign_tx.py
@@ -1,92 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.keychain import with_slip44_keychain
-
-from . import CURVE, PATTERNS, SLIP44_ID
-
-if TYPE_CHECKING:
- from trezor.messages import NEMSignedTx, NEMSignTx
-
- from apps.common.keychain import Keychain
-
-
-@with_slip44_keychain(*PATTERNS, slip44_id=SLIP44_ID, curve=CURVE)
-async def sign_tx(msg: NEMSignTx, keychain: Keychain) -> NEMSignedTx:
- from trezor.crypto.curve import ed25519
- from trezor.messages import NEMSignedTx
- from trezor.wire import DataError
-
- from apps.common import seed
- from apps.common.paths import validate_path
-
- from . import mosaic, multisig, namespace, transfer
- from .helpers import NEM_HASH_ALG, check_path
- from .validators import validate
-
- validate(msg)
- msg_multisig = msg.multisig # local_cache_attribute
- transaction = msg.transaction # local_cache_attribute
-
- await validate_path(
- keychain,
- transaction.address_n,
- check_path(transaction.address_n, transaction.network),
- )
-
- node = keychain.derive(transaction.address_n)
-
- if msg_multisig:
- if msg_multisig.signer is None:
- raise DataError("No signer provided")
- public_key = msg_multisig.signer
- common = msg_multisig
- await multisig.ask(msg)
- else:
- public_key = seed.remove_ed25519_prefix(node.public_key())
- common = transaction
-
- if msg.transfer:
- tx = await transfer.transfer(
- public_key, common, msg.transfer, node, chunkify=bool(msg.chunkify)
- )
- elif msg.provision_namespace:
- tx = await namespace.namespace(public_key, common, msg.provision_namespace)
- elif msg.mosaic_creation:
- tx = await mosaic.mosaic_creation(public_key, common, msg.mosaic_creation)
- elif msg.supply_change:
- tx = await mosaic.supply_change(public_key, common, msg.supply_change)
- elif msg.aggregate_modification:
- tx = await multisig.aggregate_modification(
- public_key,
- common,
- msg.aggregate_modification,
- msg_multisig is not None,
- )
- elif msg.importance_transfer:
- tx = await transfer.importance_transfer(
- public_key, common, msg.importance_transfer
- )
- else:
- raise DataError("No transaction provided")
-
- if msg_multisig:
- # wrap transaction in multisig wrapper
- if msg.cosigning:
- assert msg_multisig.signer is not None
- tx = multisig.cosign(
- seed.remove_ed25519_prefix(node.public_key()),
- transaction,
- tx,
- msg_multisig.signer,
- )
- else:
- tx = multisig.initiate(
- seed.remove_ed25519_prefix(node.public_key()), transaction, tx
- )
-
- signature = ed25519.sign(node.private_key(), tx, NEM_HASH_ALG)
-
- return NEMSignedTx(
- data=tx,
- signature=signature,
- )
### core/src/apps/nem/transfer/__init__.py
@@ -1,36 +0,0 @@
-from typing import TYPE_CHECKING
-
-from . import layout, serialize
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.crypto import bip32
- from trezor.messages import NEMImportanceTransfer, NEMTransactionCommon, NEMTransfer
-
-
-async def transfer(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- transfer: NEMTransfer,
- node: bip32.HDNode,
- chunkify: bool,
-) -> bytearray:
- transfer.mosaics = serialize.canonicalize_mosaics(transfer.mosaics)
- payload, encrypted = serialize.get_transfer_payload(transfer, node)
-
- await layout.ask_transfer(common, transfer, encrypted, chunkify)
-
- w = serialize.serialize_transfer(common, transfer, public_key, payload, encrypted)
- for mosaic in transfer.mosaics:
- serialize.serialize_mosaic(w, mosaic.namespace, mosaic.mosaic, mosaic.quantity)
- return w
-
-
-async def importance_transfer(
- public_key: AnyBytes,
- common: NEMTransactionCommon,
- imp: NEMImportanceTransfer,
-) -> bytearray:
- await layout.ask_importance_transfer(common, imp)
- return serialize.serialize_importance_transfer(common, imp, public_key)
### core/src/apps/nem/transfer/layout.py
@@ -1,151 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor import TR
-from trezor.enums import ButtonRequestType
-from trezor.strings import format_amount, format_amount_unit
-
-from ..helpers import NEM_MOSAIC_AMOUNT_DIVISOR
-from ..layout import require_confirm_final
-from ..mosaic.helpers import is_nem_xem_mosaic
-
-if TYPE_CHECKING:
- from trezor.messages import (
- NEMImportanceTransfer,
- NEMMosaic,
- NEMTransactionCommon,
- NEMTransfer,
- )
-
-
-async def ask_transfer(
- common: NEMTransactionCommon,
- transfer: NEMTransfer,
- encrypted: bool,
- chunkify: bool,
-) -> None:
- from trezor.ui.layouts import confirm_output, confirm_text
-
- from ..helpers import NEM_MAX_DIVISIBILITY
-
- if transfer.payload:
- # require_confirm_payload
- await confirm_text(
- "confirm_payload",
- TR.nem__confirm_payload,
- bytes(transfer.payload).decode(),
- TR.nem__encrypted if encrypted else TR.nem__unencrypted,
- ButtonRequestType.ConfirmOutput,
- )
-
- for mosaic in transfer.mosaics:
- await _ask_transfer_mosaic(common, transfer, mosaic)
-
- # require_confirm_transfer
- await confirm_output(
- transfer.recipient,
- format_amount_unit(
- format_amount(_get_xem_amount(transfer), NEM_MAX_DIVISIBILITY), "XEM"
- ),
- chunkify=chunkify,
- )
-
- await require_confirm_final(common.fee)
-
-
-async def _ask_transfer_mosaic(
- common: NEMTransactionCommon, transfer: NEMTransfer, mosaic: NEMMosaic
-) -> None:
- from trezor.enums import NEMMosaicLevy
- from trezor.ui.layouts import confirm_action, confirm_properties
-
- from ..helpers import NEM_LEVY_PERCENTILE_DIVISOR_ABSOLUTE
- from ..mosaic.helpers import get_mosaic_definition
-
- if is_nem_xem_mosaic(mosaic):
- return
-
- definition = get_mosaic_definition(mosaic.namespace, mosaic.mosaic, common.network)
- mosaic_quantity = mosaic.quantity * transfer.amount // NEM_MOSAIC_AMOUNT_DIVISOR
-
- if definition:
- await confirm_properties(
- "confirm_mosaic",
- TR.nem__confirm_mosaic,
- (
- (
- TR.nem__confirm_transfer_of,
- format_amount(mosaic_quantity, definition.divisibility)
- + definition.ticker,
- False,
- ),
- (TR.nem__of, definition.name, False),
- ),
- )
- levy = definition.levy # local_cache_attribute
-
- if levy is not None:
- if levy == NEMMosaicLevy.MosaicLevy_Absolute:
- levy_fee = levy.fee
- else:
- levy_fee = (
- mosaic_quantity * levy.fee // NEM_LEVY_PERCENTILE_DIVISOR_ABSOLUTE
- )
-
- levy_msg = (
- format_amount(levy_fee, definition.divisibility) + definition.ticker
- )
-
- await confirm_properties(
- "confirm_mosaic_levy",
- TR.nem__confirm_mosaic,
- ((TR.nem__levy_fee_of, levy_msg, False),),
- )
-
- else:
- await confirm_action(
- "confirm_mosaic_unknown",
- TR.nem__confirm_mosaic,
- TR.nem__unknown_mosaic,
- TR.nem__divisibility_and_levy_cannot_be_shown,
- br_code=ButtonRequestType.ConfirmOutput,
- )
-
- await confirm_properties(
- "confirm_mosaic_transfer",
- TR.nem__confirm_mosaic,
- (
- (
- TR.nem__confirm_transfer_of,
- TR.nem__raw_units_template.format(mosaic_quantity),
- False,
- ),
- (TR.nem__of, f"{mosaic.namespace}.{mosaic.mosaic}", False),
- ),
- )
-
-
-def _get_xem_amount(transfer: NEMTransfer) -> int:
- # if mosaics are empty the transfer.amount denotes the xem amount
- if not transfer.mosaics:
- return transfer.amount
- # otherwise xem amount is taken from the nem xem mosaic if present
- for mosaic in transfer.mosaics:
- if is_nem_xem_mosaic(mosaic):
- return mosaic.quantity * transfer.amount // NEM_MOSAIC_AMOUNT_DIVISOR
- # if there are mosaics but do not include xem, 0 xem is sent
- return 0
-
-
-async def ask_importance_transfer(
- common: NEMTransactionCommon, imp: NEMImportanceTransfer
-) -> None:
- from trezor.enums import NEMImportanceTransferMode
-
- from ..layout import require_confirm_text
-
- if imp.mode == NEMImportanceTransferMode.ImportanceTransfer_Activate:
- m = TR.nem__activate
- else:
- m = TR.nem__deactivate
- await require_confirm_text(m + TR.nem__remote_harvesting)
- await require_confirm_final(common.fee)
### core/src/apps/nem/transfer/serialize.py
@@ -1,129 +0,0 @@
-from typing import TYPE_CHECKING
-
-from ..writers import (
- serialize_tx_common,
- write_bytes_with_len,
- write_uint32_le,
- write_uint64_le,
-)
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.crypto import bip32
- from trezor.messages import (
- NEMImportanceTransfer,
- NEMMosaic,
- NEMTransactionCommon,
- NEMTransfer,
- )
- from trezor.utils import Writer
-
-
-def serialize_transfer(
- common: NEMTransactionCommon,
- transfer: NEMTransfer,
- public_key: AnyBytes,
- payload: AnyBytes,
- encrypted: bool,
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_TRANSFER
- from ..writers import write_uint32_le
-
- version = common.network << 24 | 2 if transfer.mosaics else common.network << 24 | 1
- tx = serialize_tx_common(
- common,
- public_key,
- NEM_TRANSACTION_TYPE_TRANSFER,
- version,
- )
-
- write_bytes_with_len(tx, transfer.recipient.encode())
- write_uint64_le(tx, transfer.amount)
-
- if payload:
- # payload + payload size (u32) + encryption flag (u32)
- write_uint32_le(tx, len(payload) + 2 * 4)
- if encrypted:
- write_uint32_le(tx, 0x02)
- else:
- write_uint32_le(tx, 0x01)
- write_bytes_with_len(tx, payload)
- else:
- write_uint32_le(tx, 0)
-
- if transfer.mosaics:
- write_uint32_le(tx, len(transfer.mosaics))
-
- return tx
-
-
-def serialize_mosaic(w: Writer, namespace: str, mosaic: str, quantity: int) -> None:
- identifier_w = bytearray()
- write_bytes_with_len(identifier_w, namespace.encode())
- write_bytes_with_len(identifier_w, mosaic.encode())
-
- mosaic_w = bytearray()
- write_bytes_with_len(mosaic_w, identifier_w)
- write_uint64_le(mosaic_w, quantity)
-
- write_bytes_with_len(w, mosaic_w)
-
-
-def serialize_importance_transfer(
- common: NEMTransactionCommon, imp: NEMImportanceTransfer, public_key: AnyBytes
-) -> bytearray:
- from ..helpers import NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER
-
- w = serialize_tx_common(
- common, public_key, NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER
- )
-
- write_uint32_le(w, imp.mode)
- write_bytes_with_len(w, imp.public_key)
- return w
-
-
-def get_transfer_payload(
- transfer: NEMTransfer, node: bip32.HDNode
-) -> tuple[AnyBytes, bool]:
- from trezor.crypto import random
-
- from ..helpers import AES_BLOCK_SIZE, NEM_SALT_SIZE
-
- if transfer.public_key is not None:
- if not transfer.payload:
- raise ValueError("Public key provided but no payload to encrypt")
-
- # encrypt payload
- salt = random.bytes(NEM_SALT_SIZE)
- iv = random.bytes(AES_BLOCK_SIZE)
- encrypted = node.nem_encrypt(transfer.public_key, iv, salt, transfer.payload)
- encrypted_payload = iv + salt + encrypted
-
- return encrypted_payload, True
- else:
- return transfer.payload or b"", False
-
-
-def canonicalize_mosaics(mosaics: list[NEMMosaic]) -> list[NEMMosaic]:
- if len(mosaics) <= 1:
- return mosaics
- mosaics = _merge_mosaics(mosaics)
- return sorted(mosaics, key=lambda m: (m.namespace, m.mosaic))
-
-
-def _merge_mosaics(mosaics: list[NEMMosaic]) -> list[NEMMosaic]:
- if not mosaics:
- return []
- ret: list[NEMMosaic] = []
- for i in mosaics:
- found = False
- for k, y in enumerate(ret):
- # are_mosaics_equal
- if i.namespace == y.namespace and i.mosaic == y.mosaic:
- ret[k].quantity += i.quantity
- found = True
- if not found:
- ret.append(i)
- return ret
### core/src/apps/nem/validators.py
@@ -1,198 +0,0 @@
-from typing import TYPE_CHECKING
-
-from trezor.wire import ProcessError
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import NEMSignTx, NEMTransactionCommon
-
-
-def validate(msg: NEMSignTx) -> None:
- from trezor.crypto import nem
- from trezor.enums import NEMModificationType
- from trezor.wire import ProcessError # local_cache_global
-
- from .helpers import (
- NEM_MAX_DIVISIBILITY,
- NEM_MAX_ENCRYPTED_PAYLOAD_SIZE,
- NEM_MAX_PLAIN_PAYLOAD_SIZE,
- NEM_MAX_SUPPLY,
- )
-
- validate_address = nem.validate_address # local_cache_attribute
- transfer = msg.transfer # local_cache_attribute
- aggregate_modification = msg.aggregate_modification # local_cache_attribute
- multisig = msg.multisig # local_cache_attribute
- mosaic_creation = msg.mosaic_creation # local_cache_attribute
- network = msg.transaction.network # local_cache_attribute
-
- # _validate_single_tx
- # ensure exactly one transaction is provided
- tx_count = (
- bool(transfer)
- + bool(msg.provision_namespace)
- + bool(mosaic_creation)
- + bool(msg.supply_change)
- + bool(aggregate_modification)
- + bool(msg.importance_transfer)
- )
- if tx_count == 0:
- raise ProcessError("No transaction provided")
- if tx_count > 1:
- raise ProcessError("More than one transaction provided")
-
- _validate_common(msg.transaction)
-
- if multisig:
- _validate_common(multisig, True)
- # _validate_multisig
- if multisig.network != network:
- raise ProcessError("Inner transaction network is different")
- _validate_public_key(
- multisig.signer, "Invalid multisig signer public key provided"
- )
- # END _validate_multisig
- if not multisig and msg.cosigning:
- raise ProcessError("No multisig transaction to cosign")
-
- if transfer:
- payload = transfer.payload # local_cache_attribute
-
- if transfer.public_key is not None:
- _validate_public_key(transfer.public_key, "Invalid recipient public key")
- if not payload:
- raise ProcessError("Public key provided but no payload to encrypt")
-
- if payload:
- if len(payload) > NEM_MAX_PLAIN_PAYLOAD_SIZE:
- raise ProcessError("Payload too large")
- if transfer.public_key and len(payload) > NEM_MAX_ENCRYPTED_PAYLOAD_SIZE:
- raise ProcessError("Payload too large")
-
- if not validate_address(transfer.recipient, network):
- raise ProcessError("Invalid recipient address")
- # END _validate_transfer
- if msg.provision_namespace:
- # _validate_provision_namespace
- if not validate_address(msg.provision_namespace.sink, network):
- raise ProcessError("Invalid rental sink address")
- # END _validate_provision_namespace
- if mosaic_creation:
- # _validate_mosaic_creation
- if not validate_address(mosaic_creation.sink, network):
- raise ProcessError("Invalid creation sink address")
- definition = mosaic_creation.definition # local_cache_attribute
- supply = definition.supply # local_cache_attribute
- divisibility = definition.divisibility # local_cache_attribute
-
- if definition.name is not None:
- raise ProcessError("Name not allowed in mosaic creation transactions")
- if definition.ticker is not None:
- raise ProcessError("Ticker not allowed in mosaic creation transactions")
- if definition.networks:
- raise ProcessError("Networks not allowed in mosaic creation transactions")
-
- if supply is not None and divisibility is None:
- raise ProcessError(
- "Definition divisibility needs to be provided when supply is"
- )
- if supply is None and divisibility is not None:
- raise ProcessError(
- "Definition supply needs to be provided when divisibility is"
- )
-
- if definition.levy is not None:
- if definition.fee is None:
- raise ProcessError("No levy fee provided")
- if definition.levy_address is None:
- raise ProcessError("No levy address provided")
- if definition.levy_namespace is None:
- raise ProcessError("No levy namespace provided")
- if definition.levy_mosaic is None:
- raise ProcessError("No levy mosaic name provided")
-
- if divisibility is None:
- raise ProcessError("No divisibility provided")
- if supply is None:
- raise ProcessError("No supply provided")
- if definition.mutable_supply is None:
- raise ProcessError("No supply mutability provided")
- if definition.transferable is None:
- raise ProcessError("No mosaic transferability provided")
- if definition.description is None:
- raise ProcessError("No description provided")
-
- if divisibility > NEM_MAX_DIVISIBILITY:
- raise ProcessError("Invalid divisibility provided")
- if supply > NEM_MAX_SUPPLY:
- raise ProcessError("Invalid supply provided")
-
- if not validate_address(definition.levy_address, network):
- raise ProcessError("Invalid levy address")
- # END _validate_mosaic_creation
- if msg.supply_change:
- # _validate_supply_change
- pass
- # END _validate_supply_change
- if aggregate_modification:
- # _validate_aggregate_modification
- creation = multisig is None
- if creation and not aggregate_modification.modifications:
- raise ProcessError("No modifications provided")
-
- for m in aggregate_modification.modifications:
- if (
- creation
- and m.type == NEMModificationType.CosignatoryModification_Delete
- ):
- raise ProcessError("Cannot remove cosignatory when converting account")
- _validate_public_key(
- m.public_key, "Invalid cosignatory public key provided"
- )
- # END _validate_aggregate_modification
- if msg.importance_transfer:
- # _validate_importance_transfer
- _validate_public_key(
- msg.importance_transfer.public_key,
- "Invalid remote account public key provided",
- )
- # END _validate_importance_transfer
-
-
-def validate_network(network: int) -> None:
- from .helpers import NEM_NETWORK_MAINNET, NEM_NETWORK_MIJIN, NEM_NETWORK_TESTNET
-
- if network not in (NEM_NETWORK_MAINNET, NEM_NETWORK_TESTNET, NEM_NETWORK_MIJIN):
- raise ProcessError("Invalid NEM network")
-
-
-def _validate_common(common: NEMTransactionCommon, inner: bool = False) -> None:
- validate_network(common.network)
- signer = common.signer # local_cache_attribute
-
- err = None
-
- if not inner and signer:
- raise ProcessError("Signer not allowed in outer transaction")
-
- if inner and signer is None:
- err = "signer"
-
- if err:
- if inner:
- raise ProcessError(f"No {err} provided in inner transaction")
- else:
- raise ProcessError(f"No {err} provided")
-
- if signer is not None:
- _validate_public_key(signer, "Invalid signer public key in inner transaction")
-
-
-def _validate_public_key(public_key: AnyBytes | None, err_msg: str) -> None:
- from .helpers import NEM_PUBLIC_KEY_SIZE
-
- if not public_key:
- raise ProcessError(f"{err_msg} (none provided)")
- if len(public_key) != NEM_PUBLIC_KEY_SIZE:
- raise ProcessError(f"{err_msg} (invalid length)")
### core/src/apps/nem/writers.py
@@ -1,35 +0,0 @@
-from typing import TYPE_CHECKING
-
-from apps.common.writers import write_bytes_unchecked, write_uint32_le, write_uint64_le
-
-if TYPE_CHECKING:
- from buffer_types import AnyBytes
-
- from trezor.messages import NEMTransactionCommon
- from trezor.utils import Writer
-
-
-def serialize_tx_common(
- common: NEMTransactionCommon,
- public_key: AnyBytes,
- transaction_type: int,
- version: int | None = None,
-) -> bytearray:
- w = bytearray()
-
- write_uint32_le(w, transaction_type)
- if version is None:
- version = common.network << 24 | 1
- write_uint32_le(w, version)
- write_uint32_le(w, common.timestamp)
-
- write_bytes_with_len(w, public_key)
- write_uint64_le(w, common.fee)
- write_uint32_le(w, common.deadline)
-
- return w
-
-
-def write_bytes_with_len(w: Writer, buf: AnyBytes) -> None:
- write_uint32_le(w, len(buf))
- write_bytes_unchecked(w, buf)
### core/src/apps/workflow_handlers.py
@@ -191,12 +191,6 @@ def _find_message_handler_module(msg_type: int) -> str:
if __debug__ and msg_type == MessageType.DebugMoneroDiagRequest:
return "apps.monero.diag"
- # nem
- if msg_type == MessageType.NEMGetAddress:
- return "apps.nem.get_address"
- if msg_type == MessageType.NEMSignTx:
- return "apps.nem.sign_tx"
-
# stellar
if msg_type == MessageType.StellarGetAddress:
return "apps.stellar.get_address"
@@ -231,12 +225,6 @@ def _find_message_handler_module(msg_type: int) -> str:
if msg_type == MessageType.TezosGetPublicKey:
return "apps.tezos.get_public_key"
- # eos
- if msg_type == MessageType.EosGetPublicKey:
- return "apps.eos.get_public_key"
- if msg_type == MessageType.EosSignTx:
- return "apps.eos.sign_tx"
-
# solana
if msg_type == MessageType.SolanaGetPublicKey:
return "apps.solana.get_public_key"
### core/src/trezor/crypto/__init__.py
@@ -19,7 +19,7 @@
from trezor import utils
if not utils.BITCOIN_ONLY:
- from trezorcrypto import cardano, monero, nem # noqa: F401
+ from trezorcrypto import cardano, monero # noqa: F401
if utils.USE_OPTIGA:
from trezorcrypto import optiga # noqa: F401
### core/src/trezor/enums/Capability.py
@@ -21,10 +21,8 @@
Bitcoin_like = 2
Binance = 3
Cardano = 4
- EOS = 6
Ethereum = 7
Monero = 9
- NEM = 10
Ripple = 11
Stellar = 12
Tezos = 13
### core/src/trezor/enums/MessageType.py
@@ -158,12 +158,6 @@
EthereumSignTypedHash = 470
EthereumDefinitionRequest = 471
EthereumDefinitionAck = 472
- NEMGetAddress = 67
- NEMAddress = 68
- NEMSignTx = 69
- NEMSignedTx = 70
- NEMDecryptMessage = 75
- NEMDecryptedMessage = 76
TezosGetAddress = 150
TezosAddress = 151
TezosSignTx = 152
@@ -267,12 +261,6 @@
MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557
- EosGetPublicKey = 600
- EosPublicKey = 601
- EosSignTx = 602
- EosTxActionRequest = 603
- EosTxActionAck = 604
- EosSignedTx = 605
WebAuthnListResidentCredentials = 800
WebAuthnCredentials = 801
WebAuthnAddResidentCredential = 802
### core/src/trezor/enums/NEMImportanceTransferMode.py
@@ -1,6 +0,0 @@
-# Automatically generated by pb2py
-# fmt: off
-# isort:skip_file
-
-ImportanceTransfer_Activate = 1
-ImportanceTransfer_Deactivate = 2
### core/src/trezor/enums/NEMModificationType.py
@@ -1,6 +0,0 @@
-# Automatically generated by pb2py
-# fmt: off
-# isort:skip_file
-
-CosignatoryModification_Add = 1
-CosignatoryModification_Delete = 2
### core/src/trezor/enums/NEMMosaicLevy.py
@@ -1,6 +0,0 @@
-# Automatically generated by pb2py
-# fmt: off
-# isort:skip_file
-
-MosaicLevy_Absolute = 1
-MosaicLevy_Percentile = 2
### core/src/trezor/enums/NEMSupplyChangeType.py
@@ -1,6 +0,0 @@
-# Automatically generated by pb2py
-# fmt: off
-# isort:skip_file
-
-SupplyChange_Increase = 1
-SupplyChange_Decrease = 2
### core/src/trezor/enums/__init__.py
@@ -358,22 +358,6 @@ class MoneroNetworkType(IntEnum):
STAGENET = 2
FAKECHAIN = 3
- class NEMMosaicLevy(IntEnum):
- MosaicLevy_Absolute = 1
- MosaicLevy_Percentile = 2
-
- class NEMSupplyChangeType(IntEnum):
- SupplyChange_Increase = 1
- SupplyChange_Decrease = 2
-
- class NEMModificationType(IntEnum):
- CosignatoryModification_Add = 1
- CosignatoryModification_Delete = 2
-
- class NEMImportanceTransferMode(IntEnum):
- ImportanceTransfer_Activate = 1
- ImportanceTransfer_Deactivate = 2
-
class StellarAssetType(IntEnum):
NATIVE = 0
ALPHANUM4 = 1
@@ -620,12 +604,6 @@ class MessageType(IntEnum):
EthereumSignTypedHash = 470
EthereumDefinitionRequest = 471
EthereumDefinitionAck = 472
- NEMGetAddress = 67
- NEMAddress = 68
- NEMSignTx = 69
- NEMSignedTx = 70
- NEMDecryptMessage = 75
- NEMDecryptedMessage = 76
TezosGetAddress = 150
TezosAddress = 151
TezosSignTx = 152
@@ -729,12 +707,6 @@ class MessageType(IntEnum):
MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557
- EosGetPublicKey = 600
- EosPublicKey = 601
- EosSignTx = 602
- EosTxActionRequest = 603
- EosTxActionAck = 604
- EosSignedTx = 605
WebAuthnListResidentCredentials = 800
WebAuthnCredentials = 801
WebAuthnAddResidentCredential = 802
### core/src/trezor/messages.py
@@ -55,10 +55,6 @@ def __getattr__(name: str) -> Any:
from trezor.enums import MessageType # noqa: F401
from trezor.enums import MoneroNetworkType # noqa: F401
from trezor.enums import MultisigPubkeysOrder # noqa: F401
- from trezor.enums import NEMImportanceTransferMode # noqa: F401
- from trezor.enums import NEMModificationType # noqa: F401
- from trezor.enums import NEMMosaicLevy # noqa: F401
- from trezor.enums import NEMSupplyChangeType # noqa: F401
from trezor.enums import OutputScriptType # noqa: F401
from trezor.enums import PinMatrixRequestType # noqa: F401
from trezor.enums import RecoveryDeviceInputMethod # noqa: F401
@@ -3501,534 +3497,6 @@ def __init__(
def is_type_of(cls, msg: Any) -> TypeGuard["EthereumDisplayFormatInfo"]:
return isinstance(msg, cls)
- class EosGetPublicKey(protobuf.MessageType):
- address_n: "list[int]"
- show_display: "bool | None"
- chunkify: "bool | None"
-
- def __init__(
- self,
- *,
- address_n: "list[int] | None" = None,
- show_display: "bool | None" = None,
- chunkify: "bool | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosGetPublicKey"]:
- return isinstance(msg, cls)
-
- class EosPublicKey(protobuf.MessageType):
- wif_public_key: "str"
- raw_public_key: "AnyBytes"
-
- def __init__(
- self,
- *,
- wif_public_key: "str",
- raw_public_key: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosPublicKey"]:
- return isinstance(msg, cls)
-
- class EosSignTx(protobuf.MessageType):
- address_n: "list[int]"
- chain_id: "AnyBytes"
- header: "EosTxHeader"
- num_actions: "int"
- chunkify: "bool | None"
-
- def __init__(
- self,
- *,
- chain_id: "AnyBytes",
- header: "EosTxHeader",
- num_actions: "int",
- address_n: "list[int] | None" = None,
- chunkify: "bool | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosSignTx"]:
- return isinstance(msg, cls)
-
- class EosTxActionRequest(protobuf.MessageType):
- data_size: "int | None"
-
- def __init__(
- self,
- *,
- data_size: "int | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosTxActionRequest"]:
- return isinstance(msg, cls)
-
- class EosTxActionAck(protobuf.MessageType):
- common: "EosActionCommon"
- transfer: "EosActionTransfer | None"
- delegate: "EosActionDelegate | None"
- undelegate: "EosActionUndelegate | None"
- refund: "EosActionRefund | None"
- buy_ram: "EosActionBuyRam | None"
- buy_ram_bytes: "EosActionBuyRamBytes | None"
- sell_ram: "EosActionSellRam | None"
- vote_producer: "EosActionVoteProducer | None"
- update_auth: "EosActionUpdateAuth | None"
- delete_auth: "EosActionDeleteAuth | None"
- link_auth: "EosActionLinkAuth | None"
- unlink_auth: "EosActionUnlinkAuth | None"
- new_account: "EosActionNewAccount | None"
- unknown: "EosActionUnknown | None"
-
- def __init__(
- self,
- *,
- common: "EosActionCommon",
- transfer: "EosActionTransfer | None" = None,
- delegate: "EosActionDelegate | None" = None,
- undelegate: "EosActionUndelegate | None" = None,
- refund: "EosActionRefund | None" = None,
- buy_ram: "EosActionBuyRam | None" = None,
- buy_ram_bytes: "EosActionBuyRamBytes | None" = None,
- sell_ram: "EosActionSellRam | None" = None,
- vote_producer: "EosActionVoteProducer | None" = None,
- update_auth: "EosActionUpdateAuth | None" = None,
- delete_auth: "EosActionDeleteAuth | None" = None,
- link_auth: "EosActionLinkAuth | None" = None,
- unlink_auth: "EosActionUnlinkAuth | None" = None,
- new_account: "EosActionNewAccount | None" = None,
- unknown: "EosActionUnknown | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosTxActionAck"]:
- return isinstance(msg, cls)
-
- class EosSignedTx(protobuf.MessageType):
- signature: "str"
-
- def __init__(
- self,
- *,
- signature: "str",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosSignedTx"]:
- return isinstance(msg, cls)
-
- class EosTxHeader(protobuf.MessageType):
- expiration: "int"
- ref_block_num: "int"
- ref_block_prefix: "int"
- max_net_usage_words: "int"
- max_cpu_usage_ms: "int"
- delay_sec: "int"
-
- def __init__(
- self,
- *,
- expiration: "int",
- ref_block_num: "int",
- ref_block_prefix: "int",
- max_net_usage_words: "int",
- max_cpu_usage_ms: "int",
- delay_sec: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosTxHeader"]:
- return isinstance(msg, cls)
-
- class EosAsset(protobuf.MessageType):
- amount: "int"
- symbol: "int"
-
- def __init__(
- self,
- *,
- amount: "int",
- symbol: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosAsset"]:
- return isinstance(msg, cls)
-
- class EosPermissionLevel(protobuf.MessageType):
- actor: "int"
- permission: "int"
-
- def __init__(
- self,
- *,
- actor: "int",
- permission: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosPermissionLevel"]:
- return isinstance(msg, cls)
-
- class EosAuthorizationKey(protobuf.MessageType):
- type: "int"
- key: "AnyBytes | None"
- address_n: "list[int]"
- weight: "int"
-
- def __init__(
- self,
- *,
- type: "int",
- weight: "int",
- address_n: "list[int] | None" = None,
- key: "AnyBytes | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosAuthorizationKey"]:
- return isinstance(msg, cls)
-
- class EosAuthorizationAccount(protobuf.MessageType):
- account: "EosPermissionLevel"
- weight: "int"
-
- def __init__(
- self,
- *,
- account: "EosPermissionLevel",
- weight: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosAuthorizationAccount"]:
- return isinstance(msg, cls)
-
- class EosAuthorizationWait(protobuf.MessageType):
- wait_sec: "int"
- weight: "int"
-
- def __init__(
- self,
- *,
- wait_sec: "int",
- weight: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosAuthorizationWait"]:
- return isinstance(msg, cls)
-
- class EosAuthorization(protobuf.MessageType):
- threshold: "int"
- keys: "list[EosAuthorizationKey]"
- accounts: "list[EosAuthorizationAccount]"
- waits: "list[EosAuthorizationWait]"
-
- def __init__(
- self,
- *,
- threshold: "int",
- keys: "list[EosAuthorizationKey] | None" = None,
- accounts: "list[EosAuthorizationAccount] | None" = None,
- waits: "list[EosAuthorizationWait] | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosAuthorization"]:
- return isinstance(msg, cls)
-
- class EosActionCommon(protobuf.MessageType):
- account: "int"
- name: "int"
- authorization: "list[EosPermissionLevel]"
-
- def __init__(
- self,
- *,
- account: "int",
- name: "int",
- authorization: "list[EosPermissionLevel] | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionCommon"]:
- return isinstance(msg, cls)
-
- class EosActionTransfer(protobuf.MessageType):
- sender: "int"
- receiver: "int"
- quantity: "EosAsset"
- memo: "str"
-
- def __init__(
- self,
- *,
- sender: "int",
- receiver: "int",
- quantity: "EosAsset",
- memo: "str",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionTransfer"]:
- return isinstance(msg, cls)
-
- class EosActionDelegate(protobuf.MessageType):
- sender: "int"
- receiver: "int"
- net_quantity: "EosAsset"
- cpu_quantity: "EosAsset"
- transfer: "bool"
-
- def __init__(
- self,
- *,
- sender: "int",
- receiver: "int",
- net_quantity: "EosAsset",
- cpu_quantity: "EosAsset",
- transfer: "bool",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionDelegate"]:
- return isinstance(msg, cls)
-
- class EosActionUndelegate(protobuf.MessageType):
- sender: "int"
- receiver: "int"
- net_quantity: "EosAsset"
- cpu_quantity: "EosAsset"
-
- def __init__(
- self,
- *,
- sender: "int",
- receiver: "int",
- net_quantity: "EosAsset",
- cpu_quantity: "EosAsset",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionUndelegate"]:
- return isinstance(msg, cls)
-
- class EosActionRefund(protobuf.MessageType):
- owner: "int"
-
- def __init__(
- self,
- *,
- owner: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionRefund"]:
- return isinstance(msg, cls)
-
- class EosActionBuyRam(protobuf.MessageType):
- payer: "int"
- receiver: "int"
- quantity: "EosAsset"
-
- def __init__(
- self,
- *,
- payer: "int",
- receiver: "int",
- quantity: "EosAsset",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionBuyRam"]:
- return isinstance(msg, cls)
-
- class EosActionBuyRamBytes(protobuf.MessageType):
- payer: "int"
- receiver: "int"
- bytes: "int"
-
- def __init__(
- self,
- *,
- payer: "int",
- receiver: "int",
- bytes: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionBuyRamBytes"]:
- return isinstance(msg, cls)
-
- class EosActionSellRam(protobuf.MessageType):
- account: "int"
- bytes: "int"
-
- def __init__(
- self,
- *,
- account: "int",
- bytes: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionSellRam"]:
- return isinstance(msg, cls)
-
- class EosActionVoteProducer(protobuf.MessageType):
- voter: "int"
- proxy: "int"
- producers: "list[int]"
-
- def __init__(
- self,
- *,
- voter: "int",
- proxy: "int",
- producers: "list[int] | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionVoteProducer"]:
- return isinstance(msg, cls)
-
- class EosActionUpdateAuth(protobuf.MessageType):
- account: "int"
- permission: "int"
- parent: "int"
- auth: "EosAuthorization"
-
- def __init__(
- self,
- *,
- account: "int",
- permission: "int",
- parent: "int",
- auth: "EosAuthorization",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionUpdateAuth"]:
- return isinstance(msg, cls)
-
- class EosActionDeleteAuth(protobuf.MessageType):
- account: "int"
- permission: "int"
-
- def __init__(
- self,
- *,
- account: "int",
- permission: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionDeleteAuth"]:
- return isinstance(msg, cls)
-
- class EosActionLinkAuth(protobuf.MessageType):
- account: "int"
- code: "int"
- type: "int"
- requirement: "int"
-
- def __init__(
- self,
- *,
- account: "int",
- code: "int",
- type: "int",
- requirement: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionLinkAuth"]:
- return isinstance(msg, cls)
-
- class EosActionUnlinkAuth(protobuf.MessageType):
- account: "int"
- code: "int"
- type: "int"
-
- def __init__(
- self,
- *,
- account: "int",
- code: "int",
- type: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionUnlinkAuth"]:
- return isinstance(msg, cls)
-
- class EosActionNewAccount(protobuf.MessageType):
- creator: "int"
- name: "int"
- owner: "EosAuthorization"
- active: "EosAuthorization"
-
- def __init__(
- self,
- *,
- creator: "int",
- name: "int",
- owner: "EosAuthorization",
- active: "EosAuthorization",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionNewAccount"]:
- return isinstance(msg, cls)
-
- class EosActionUnknown(protobuf.MessageType):
- data_size: "int"
- data_chunk: "AnyBytes"
-
- def __init__(
- self,
- *,
- data_size: "int",
- data_chunk: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["EosActionUnknown"]:
- return isinstance(msg, cls)
-
class EthereumGetPublicKey(protobuf.MessageType):
address_n: "list[int]"
show_display: "bool | None"
@@ -5649,334 +5117,6 @@ def __init__(
def is_type_of(cls, msg: Any) -> TypeGuard["MoneroExportedKeyImage"]:
return isinstance(msg, cls)
- class NEMGetAddress(protobuf.MessageType):
- address_n: "list[int]"
- network: "int"
- show_display: "bool | None"
- chunkify: "bool | None"
-
- def __init__(
- self,
- *,
- address_n: "list[int] | None" = None,
- network: "int | None" = None,
- show_display: "bool | None" = None,
- chunkify: "bool | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMGetAddress"]:
- return isinstance(msg, cls)
-
- class NEMAddress(protobuf.MessageType):
- address: "str"
-
- def __init__(
- self,
- *,
- address: "str",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMAddress"]:
- return isinstance(msg, cls)
-
- class NEMSignTx(protobuf.MessageType):
- transaction: "NEMTransactionCommon"
- multisig: "NEMTransactionCommon | None"
- transfer: "NEMTransfer | None"
- cosigning: "bool | None"
- provision_namespace: "NEMProvisionNamespace | None"
- mosaic_creation: "NEMMosaicCreation | None"
- supply_change: "NEMMosaicSupplyChange | None"
- aggregate_modification: "NEMAggregateModification | None"
- importance_transfer: "NEMImportanceTransfer | None"
- chunkify: "bool | None"
-
- def __init__(
- self,
- *,
- transaction: "NEMTransactionCommon",
- multisig: "NEMTransactionCommon | None" = None,
- transfer: "NEMTransfer | None" = None,
- cosigning: "bool | None" = None,
- provision_namespace: "NEMProvisionNamespace | None" = None,
- mosaic_creation: "NEMMosaicCreation | None" = None,
- supply_change: "NEMMosaicSupplyChange | None" = None,
- aggregate_modification: "NEMAggregateModification | None" = None,
- importance_transfer: "NEMImportanceTransfer | None" = None,
- chunkify: "bool | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMSignTx"]:
- return isinstance(msg, cls)
-
- class NEMSignedTx(protobuf.MessageType):
- data: "AnyBytes"
- signature: "AnyBytes"
-
- def __init__(
- self,
- *,
- data: "AnyBytes",
- signature: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMSignedTx"]:
- return isinstance(msg, cls)
-
- class NEMDecryptMessage(protobuf.MessageType):
- address_n: "list[int]"
- network: "int | None"
- public_key: "AnyBytes | None"
- payload: "AnyBytes | None"
-
- def __init__(
- self,
- *,
- address_n: "list[int] | None" = None,
- network: "int | None" = None,
- public_key: "AnyBytes | None" = None,
- payload: "AnyBytes | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMDecryptMessage"]:
- return isinstance(msg, cls)
-
- class NEMDecryptedMessage(protobuf.MessageType):
- payload: "AnyBytes"
-
- def __init__(
- self,
- *,
- payload: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMDecryptedMessage"]:
- return isinstance(msg, cls)
-
- class NEMTransactionCommon(protobuf.MessageType):
- address_n: "list[int]"
- network: "int"
- timestamp: "int"
- fee: "int"
- deadline: "int"
- signer: "AnyBytes | None"
-
- def __init__(
- self,
- *,
- timestamp: "int",
- fee: "int",
- deadline: "int",
- address_n: "list[int] | None" = None,
- network: "int | None" = None,
- signer: "AnyBytes | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMTransactionCommon"]:
- return isinstance(msg, cls)
-
- class NEMTransfer(protobuf.MessageType):
- recipient: "str"
- amount: "int"
- payload: "AnyBytes | None"
- public_key: "AnyBytes | None"
- mosaics: "list[NEMMosaic]"
-
- def __init__(
- self,
- *,
- recipient: "str",
- amount: "int",
- mosaics: "list[NEMMosaic] | None" = None,
- payload: "AnyBytes | None" = None,
- public_key: "AnyBytes | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMTransfer"]:
- return isinstance(msg, cls)
-
- class NEMProvisionNamespace(protobuf.MessageType):
- namespace: "str"
- parent: "str | None"
- sink: "str"
- fee: "int"
-
- def __init__(
- self,
- *,
- namespace: "str",
- sink: "str",
- fee: "int",
- parent: "str | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMProvisionNamespace"]:
- return isinstance(msg, cls)
-
- class NEMMosaicCreation(protobuf.MessageType):
- definition: "NEMMosaicDefinition"
- sink: "str"
- fee: "int"
-
- def __init__(
- self,
- *,
- definition: "NEMMosaicDefinition",
- sink: "str",
- fee: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMMosaicCreation"]:
- return isinstance(msg, cls)
-
- class NEMMosaicSupplyChange(protobuf.MessageType):
- namespace: "str"
- mosaic: "str"
- type: "NEMSupplyChangeType"
- delta: "int"
-
- def __init__(
- self,
- *,
- namespace: "str",
- mosaic: "str",
- type: "NEMSupplyChangeType",
- delta: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMMosaicSupplyChange"]:
- return isinstance(msg, cls)
-
- class NEMAggregateModification(protobuf.MessageType):
- modifications: "list[NEMCosignatoryModification]"
- relative_change: "int | None"
-
- def __init__(
- self,
- *,
- modifications: "list[NEMCosignatoryModification] | None" = None,
- relative_change: "int | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMAggregateModification"]:
- return isinstance(msg, cls)
-
- class NEMImportanceTransfer(protobuf.MessageType):
- mode: "NEMImportanceTransferMode"
- public_key: "AnyBytes"
-
- def __init__(
- self,
- *,
- mode: "NEMImportanceTransferMode",
- public_key: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMImportanceTransfer"]:
- return isinstance(msg, cls)
-
- class NEMMosaic(protobuf.MessageType):
- namespace: "str"
- mosaic: "str"
- quantity: "int"
-
- def __init__(
- self,
- *,
- namespace: "str",
- mosaic: "str",
- quantity: "int",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMMosaic"]:
- return isinstance(msg, cls)
-
- class NEMMosaicDefinition(protobuf.MessageType):
- name: "str | None"
- ticker: "str | None"
- namespace: "str"
- mosaic: "str"
- divisibility: "int | None"
- levy: "NEMMosaicLevy | None"
- fee: "int | None"
- levy_address: "str | None"
- levy_namespace: "str | None"
- levy_mosaic: "str | None"
- supply: "int | None"
- mutable_supply: "bool | None"
- transferable: "bool | None"
- description: "str"
- networks: "list[int]"
-
- def __init__(
- self,
- *,
- namespace: "str",
- mosaic: "str",
- description: "str",
- networks: "list[int] | None" = None,
- name: "str | None" = None,
- ticker: "str | None" = None,
- divisibility: "int | None" = None,
- levy: "NEMMosaicLevy | None" = None,
- fee: "int | None" = None,
- levy_address: "str | None" = None,
- levy_namespace: "str | None" = None,
- levy_mosaic: "str | None" = None,
- supply: "int | None" = None,
- mutable_supply: "bool | None" = None,
- transferable: "bool | None" = None,
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMMosaicDefinition"]:
- return isinstance(msg, cls)
-
- class NEMCosignatoryModification(protobuf.MessageType):
- type: "NEMModificationType"
- public_key: "AnyBytes"
-
- def __init__(
- self,
- *,
- type: "NEMModificationType",
- public_key: "AnyBytes",
- ) -> None:
- pass
-
- @classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["NEMCosignatoryModification"]:
- return isinstance(msg, cls)
-
class NostrGetPubkey(protobuf.MessageType):
address_n: "list[int]"
### core/tests/test_apps.eos.check_action.py
@@ -1,256 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import EosTxActionAck
-
- from apps.eos.actions import _check_action
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestEosActions(unittest.TestCase):
- def test_check_action(self):
- # return True
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), buy_ram=object()), "buyram", "eosio"
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), buy_ram_bytes=object()),
- "buyrambytes",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), sell_ram=object()), "sellram", "eosio"
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), delegate=object()),
- "delegatebw",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), undelegate=object()),
- "undelegatebw",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), refund=object()), "refund", "eosio"
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), vote_producer=object()),
- "voteproducer",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), update_auth=object()),
- "updateauth",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), delete_auth=object()),
- "deleteauth",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), link_auth=object()), "linkauth", "eosio"
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unlink_auth=object()),
- "unlinkauth",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), new_account=object()),
- "newaccount",
- "eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), transfer=object()),
- "transfer",
- "not_eosio",
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unknown=[]), "unknown", "not_eosio"
- ),
- True,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unknown=[]), "buyram", "buygoods"
- ),
- True,
- )
-
- # returns False
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), buy_ram=object()), "buyram", "not_eosio"
- ),
- False,
- )
- self.assertEqual(
- _check_action(EosTxActionAck(common=object()), "buyram", "eosio"), False
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), buy_ram_bytes=object()),
- "buyrambytes",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), sell_ram=object()),
- "sellram",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), delegate=object()),
- "delegatebw",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), undelegate=object()),
- "undelegatebw",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), refund=object()), "refund", "not_eosio"
- ),
- False,
- )
- self.assertEqual(
- _check_action(EosTxActionAck(common=object()), "refund", "eosio"), False
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), vote_producer=object()),
- "voteproducer",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), update_auth=object()),
- "updateauth",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), delete_auth=object()),
- "deleteauth",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), link_auth=object()),
- "linkauth",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unlink_auth=object()),
- "unlinkauth",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(EosTxActionAck(common=object()), "unlinkauth", "eosio"), False
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), new_account=object()),
- "newaccount",
- "not_eosio",
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), transfer=object()), "transfer", "eosio"
- ),
- False,
- )
- self.assertEqual(
- _check_action(EosTxActionAck(common=object()), "unknown", "not_eosio"),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), buy_ram=object()), "test", "eosio"
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unknown=[]), "buyram", "eosio"
- ),
- False,
- )
- self.assertEqual(
- _check_action(
- EosTxActionAck(common=object(), unknown=[]), "transfer", "loveme"
- ),
- False,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.eos.conversions.py
@@ -1,72 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import EosAsset
-
- from apps.eos import helpers
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestEosConversions(unittest.TestCase):
- def test_eos_name_to_string(self):
- names_in = [
- 10639447606881920736,
- 614251623682315968,
- 614251535012020768,
- 7754926748989239168,
- 14895601873759291472,
- 595056260442243600,
- ]
- names_out = [
- "miniminimini",
- "12345abcdefg",
- "123451234512",
- "hijklmnopqrs",
- "tuvwxyz12345",
- "111111111111",
- ]
- for i, o in zip(names_in, names_out):
- self.assertEqual(helpers.eos_name_to_string(i), o)
-
- def test_eos_asset_to_string(self):
- asset_in = [
- EosAsset(
- amount=10000,
- symbol=1397703940,
- ),
- EosAsset(
- amount=200000,
- symbol=1397703940,
- ),
- EosAsset(
- amount=255000,
- symbol=1397703940,
- ),
- EosAsset(
- amount=999999,
- symbol=1397703939,
- ),
- EosAsset(
- amount=1,
- symbol=1397703940,
- ),
- EosAsset(
- amount=999,
- symbol=1397703939,
- ),
- ]
- asset_out = [
- "1.0000 EOS",
- "20.0000 EOS",
- "25.5000 EOS",
- "999.999 EOS",
- "0.0001 EOS",
- "0.999 EOS",
- ]
- for i, o in zip(asset_in, asset_out):
- self.assertEqual(helpers.eos_asset_to_string(i), o)
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.eos.get_public_key.py
@@ -1,57 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import bip32, bip39
-from trezor.crypto.curve import secp256k1
-
-if not utils.BITCOIN_ONLY:
- from apps.eos.helpers import public_key_to_wif
-
-
-# NOTE: copy-pasted from apps.eos.get_public_key
-def _get_public_key(node: bip32.HDNode) -> tuple[str, bytes]:
- seckey = node.private_key()
- public_key = secp256k1.publickey(seckey, True)
- wif = public_key_to_wif(public_key)
- return wif, public_key
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestEosGetPublicKey(unittest.TestCase):
- def test_get_public_key_scheme(self):
- mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
- seed = bip39.seed(mnemonic, "")
-
- derivation_paths = [
- [0x80000000 | 44, 0x80000000 | 194, 0x80000000, 0, 0],
- [0x80000000 | 44, 0x80000000 | 194, 0x80000000, 0, 1],
- [0x80000000 | 44, 0x80000000 | 194],
- [0x80000000 | 44, 0x80000000 | 194, 0x80000000, 0, 0x80000000],
- ]
-
- public_keys = [
- "0315c358024ce46767102578947584c4342a6982b922d454f63588effa34597197",
- "029622eff7248c4d298fe28f2df19ee0d5f7674f678844e05c31d1a5632412869e",
- "02625f33c10399703e95e41bd5054beef3ab893dcc7df2bb9bdcee48359b29069d",
- "037c9b7d24d42589941cca3f4debc75b37c0e7b881e6eb00d2e674958debe3bbc3",
- ]
-
- wif_keys = [
- "EOS6zpSNY1YoLxNt2VsvJjoDfBueU6xC1M1ERJw1UoekL1NHn8KNA",
- "EOS62cPUiWnLqbUjiBMxbEU4pm4Hp5X3RGk4KMTadvZNygjX72yHW",
- "EOS5dp8aCFoFwrKo6KuUfos1hwMfZGkiZUbaF2CyuD4chyBEN2wQK",
- "EOS7n7TXwR4Y3DtPt2ji6akhQi5uw4SruuPArvoNJso84vhwPQt1G",
- ]
-
- for index, path in enumerate(derivation_paths):
- node = bip32.from_seed(seed, "secp256k1")
- node.derive_path(path)
- wif, public_key = _get_public_key(node)
-
- self.assertEqual(public_key.hex(), public_keys[index])
- self.assertEqual(wif, wif_keys[index])
- self.assertEqual(public_key_to_wif(public_key), wif_keys[index])
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.address.py
@@ -1,123 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from apps.common.paths import HARDENED
-
-if not utils.BITCOIN_ONLY:
- from trezor.crypto import nem
-
- from apps.nem.helpers import (
- NEM_NETWORK_MAINNET,
- NEM_NETWORK_MIJIN,
- NEM_NETWORK_TESTNET,
- check_path,
- )
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemAddress(unittest.TestCase):
- def test_addresses(self):
- pubkey = bytes.fromhex(
- "c5f54ba980fcbb657dbaaa42700539b207873e134d2375efeab5f1ab52f87844"
- )
- address = nem.compute_address(pubkey, NEM_NETWORK_MAINNET)
- self.assertEqual(address, "NDD2CT6LQLIYQ56KIXI3ENTM6EK3D44P5JFXJ4R4")
-
- pubkey = bytes.fromhex(
- "114171230ad6f8522a000cdc73fbc5c733b30bb71f2b146ccbdf34499f79a810"
- )
- address = nem.compute_address(pubkey, NEM_NETWORK_MAINNET)
- self.assertEqual(address, "NCUKWDY3J3THKQHAKOK5ALF6ANJQABZHCH7VN6DP")
-
- def test_validate_address(self):
- validity = nem.validate_address(
- "NDD2CT6LQLIYQ56KIXI3ENTM6EK3D44P5JFXJ4R4", NEM_NETWORK_MAINNET
- )
- self.assertTrue(validity)
-
- validity = nem.validate_address(
- "NCUKWDY3J3THKQHAKOK5ALF6ANJQABZHCH7VN6DP", NEM_NETWORK_MAINNET
- )
- self.assertTrue(validity)
-
- validity = nem.validate_address(
- "TAU5HO3DRQZNELFEMZZTUKQEZGQ7IUAHKPO7OOLK", NEM_NETWORK_TESTNET
- )
- self.assertTrue(validity)
-
- validity = nem.validate_address("nope", NEM_NETWORK_TESTNET)
- self.assertFalse(validity)
-
- # not valid on testnet
- validity = nem.validate_address(
- "NCUKWDY3J3THKQHAKOK5ALF6ANJQABZHCH7VN6DP", NEM_NETWORK_TESTNET
- )
- self.assertFalse(validity)
-
- def test_check_path(self):
- # mainnet path:
- self.assertTrue(
- check_path(
- [
- 44 | HARDENED,
- 43 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- ],
- NEM_NETWORK_MAINNET,
- )
- )
- # should be valid on mijin as well:
- self.assertTrue(
- check_path(
- [
- 44 | HARDENED,
- 43 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- ],
- NEM_NETWORK_MIJIN,
- )
- )
- # testnet path:
- self.assertTrue(
- check_path(
- [44 | HARDENED, 1 | HARDENED, 0 | HARDENED, 0 | HARDENED, 0 | HARDENED],
- NEM_NETWORK_TESTNET,
- )
- )
- # short path (check_path does not validate pattern match):
- self.assertTrue(check_path([44 | HARDENED, 43 | HARDENED], NEM_NETWORK_MAINNET))
-
- # testnet path on mainnet:
- self.assertFalse(
- check_path(
- [44 | HARDENED, 1 | HARDENED, 0 | HARDENED, 0 | HARDENED, 0 | HARDENED],
- NEM_NETWORK_MAINNET,
- )
- )
- # mainnet path on testnet:
- self.assertFalse(
- check_path(
- [
- 44 | HARDENED,
- 43 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- 0 | HARDENED,
- ],
- NEM_NETWORK_TESTNET,
- )
- )
- # path too short to extract SLIP44:
- self.assertFalse(check_path([44 | HARDENED], NEM_NETWORK_TESTNET))
- # unknown SLIP44:
- self.assertFalse(check_path([44 | HARDENED, 0 | HARDENED], NEM_NETWORK_MAINNET))
- # unhardened SLIP44:
- self.assertFalse(check_path([44 | HARDENED, 43, 0], NEM_NETWORK_MAINNET))
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.hdnode.py
@@ -1,324 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import bip32
-
-if not utils.BITCOIN_ONLY:
- from apps.nem import CURVE
- from apps.nem.helpers import NEM_NETWORK_MAINNET
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-@unittest.skipUnless(utils.INTERNAL_MODEL == "T2T1", "only for T2T1")
-class TestNemHDNode(unittest.TestCase):
- def test_addresses(self):
- # test vectors from https://raw.githubusercontent.com/NemProject/nem-test-vectors/master/1.test-keys.dat
- # private key, public key, address
- test_cases = [
- (
- "575dbb3062267eff57c970a336ebbc8fbcfe12c5bd3ed7bc11eb0481d7704ced",
- "c5f54ba980fcbb657dbaaa42700539b207873e134d2375efeab5f1ab52f87844",
- "NDD2CT6LQLIYQ56KIXI3ENTM6EK3D44P5JFXJ4R4",
- ),
- (
- "5b0e3fa5d3b49a79022d7c1e121ba1cbbf4db5821f47ab8c708ef88defc29bfe",
- "96eb2a145211b1b7ab5f0d4b14f8abc8d695c7aee31a3cfc2d4881313c68eea3",
- "NABHFGE5ORQD3LE4O6B7JUFN47ECOFBFASC3SCAC",
- ),
- (
- "738ba9bb9110aea8f15caa353aca5653b4bdfca1db9f34d0efed2ce1325aeeda",
- "2d8425e4ca2d8926346c7a7ca39826acd881a8639e81bd68820409c6e30d142a",
- "NAVOZX4HDVOAR4W6K4WJHWPD3MOFU27DFHC7KZOZ",
- ),
- (
- "e8bf9bc0f35c12d8c8bf94dd3a8b5b4034f1063948e3cc5304e55e31aa4b95a6",
- "4feed486777ed38e44c489c7c4e93a830e4c4a907fa19a174e630ef0f6ed0409",
- "NBZ6JK5YOCU6UPSSZ5D3G27UHAPHTY5HDQMGE6TT",
- ),
- (
- "c325ea529674396db5675939e7988883d59a5fc17a28ca977e3ba85370232a83",
- "83ee32e4e145024d29bca54f71fa335a98b3e68283f1a3099c4d4ae113b53e54",
- "NCQW2P5DNZ5BBXQVGS367DQ4AHC3RXOEVGRCLY6V",
- ),
- (
- "a811cb7a80a7227ae61f6da536534ee3c2744e3c7e4b85f3e0df3c6a9c5613df",
- "6d34c04f3a0e42f0c3c6f50e475ae018cfa2f56df58c481ad4300424a6270cbb",
- "NA5IG3XFXZHIPJ5QLKX2FBJPEZYPMBPPK2ZRC3EH",
- ),
- (
- "9c66de1ec77f4dfaaebdf9c8bc599ca7e8e6f0bc71390ffee2c9dd3f3619242a",
- "a8fefd72a3b833dc7c7ed7d57ed86906dac22f88f1f4331873eb2da3152a3e77",
- "NAABHVFJDBM74XMJJ52R7QN2MTTG2ZUXPQS62QZ7",
- ),
- (
- "c56bc16ecf727878c15e24f4ae68569600ac7b251218a44ef50ce54175776edc",
- "c92f761e6d83d20068fd46fe4bd5b97f4c6ba05d23180679b718d1f3e4fb066e",
- "NCLK3OLMHR3F2E3KSBUIZ4K5PNWUDN37MLSJBJZP",
- ),
- (
- "9dd73599283882fa1561ddfc9be5830b5dd453c90465d3fe5eeb646a3606374e",
- "eaf16a4833e59370a04ccd5c63395058de34877b48c17174c71db5ed37b537ed",
- "ND3AHW4VTI5R5QE5V44KIGPRU5FBJ5AFUCJXOY5H",
- ),
- (
- "d9639dc6f49dad02a42fd8c217f1b1b4f8ce31ccd770388b645e639c72ff24fa",
- "0f74a2f537cd9c986df018994dde75bdeee05e35eb9fe27adf506ca8475064f7",
- "NCTZ4YAP43ONK3UYTASQVNDMBO24ZHJE65F3QPYE",
- ),
- (
- "efc1992cd50b70ca55ac12c07aa5d026a8b78ffe28a7dbffc9228b26e02c38c1",
- "2ebff201255f6cf948c78f528658b99a7c13ac791942fa22d59af610558111f5",
- "NDQ2TMCMXBSFPZQPE2YKH6XLC24HD6LUMN6Z4GIC",
- ),
- (
- "143a815e92e43f3ed1a921ee48cd143931b88b7c3d8e1e981f743c2a5be3c5ba",
- "419ed11d48730e4ae2c93f0ea4df853b8d578713a36dab227517cf965861af4e",
- "NA32IDDW2C53BDSBJNFL3Z6UU3J5CJZJMCZDXCF4",
- ),
- (
- "bc1a082f5ac6fdd3a83ade211e5986ac0551bad6c7da96727ec744e5df963e2a",
- "a160e6f9112233a7ce94202ed7a4443e1dac444b5095f9fecbb965fba3f92cac",
- "NADUCEQLC3FTGB25GTA5HOUTB53CBVQNVOIP7NTJ",
- ),
- (
- "4e47b4c6f4c7886e49ec109c61f4af5cfbb1637283218941d55a7f9fe1053f72",
- "fbb91b16df828e21a9802980a44fc757c588bc1382a4cea429d6fa2ae0333f56",
- "NBAF3BFLLPWH33MYE6VUPP5T6DQBZBKIDEQKZQOE",
- ),
- (
- "efc4389da48ce49f85365cfa578c746530e9eac42db1b64ec346119b1becd347",
- "2232f24dda0f2ded3ecd831210d4e8521a096b50cadd5a34f3f7083374e1ec12",
- "NBOGTK2I2ATOGGD7ZFJHROG5MWL7XCKAUKSWIVSA",
- ),
- (
- "bdba57c78ca7da16a3360efd13f06276284db8c40351de7fcd38ba0c35ac754d",
- "c334c6c0dad5aaa2a0d0fb4c6032cb6a0edd96bf61125b5ea9062d5a00ee0eee",
- "NCLERTEFYXKLK7RA4MVACEFMXMK3P7QMWTM7FBW2",
- ),
- (
- "20694c1ec3c4a311bcdb29ed2edc428f6d4f9a4c429ad6a5bf3222084e35695f",
- "518c4de412efa93de06a55947d11f697639443916ec8fcf04ebc3e6d17d0bd93",
- "NB5V4BPIJHXVONO7UGMJDPFARMFA73BOBNOOYCOV",
- ),
- (
- "e0d4f3760ac107b33c22c2cac24ab2f520b282684f5f66a4212ff95d926323ce",
- "b3d16f4ead9de67c290144da535a0ed2504b03c05e5f1ceb8c7863762f786857",
- "NC4PBAO5TPCAVQKBVOC4F6DMZP3CFSQBU46PSKBD",
- ),
- (
- "efa9afc617412093c9c7a7c211a5332dd556f941e1a88c494ec860608610eea2",
- "7e7716e4cebceb731d6f1fd28676f34888e9a0000fcfa1471db1c616c2ddf559",
- "NCFW2LPXIWLBWAQN2QVIWEOD7IVDO3HQBD2OU56K",
- ),
- (
- "d98499b3db61944684ce06a91735af4e14105338473fcf6ebe2b0bcada3dfd21",
- "114171230ad6f8522a000cdc73fbc5c733b30bb71f2b146ccbdf34499f79a810",
- "NCUKWDY3J3THKQHAKOK5ALF6ANJQABZHCH7VN6DP",
- ),
- ]
-
- for test in test_cases:
- private_key = bytearray(reversed(bytes.fromhex(test[0])))
-
- node = bip32.HDNode(
- depth=0,
- fingerprint=0,
- child_num=0,
- chain_code=bytearray(32),
- private_key=private_key,
- curve_name=CURVE,
- )
-
- self.assertEqual(node.nem_address(NEM_NETWORK_MAINNET), test[2])
- # public key is prepended with 1, removing
- self.assertEqual(node.public_key()[1:], bytes.fromhex(test[1]))
-
- def test_encryption(self):
- # test vectors from https://raw.githubusercontent.com/NemProject/nem-test-vectors/master/4.test-cipher.dat
- # private key, transfer public key, salt, iv, plain text, cipher text
- test_cases = [
- {
- "private": "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "public": "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "salt": "83616c67f076d356fd1288a6e0fd7a60488ba312a3adf0088b1b33c7655c3e6a",
- "iv": "a73ff5c32f8fd055b09775817a6a3f95",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "70815da779b1b954d7a7f00c16940e9917a0412a06a444b539bf147603eef87f",
- },
- {
- "private": "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "public": "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "salt": "703ce0b1d276b10eef35672df03234385a903460db18ba9d4e05b3ad31abb284",
- "iv": "91246c2d5493867c4fa3e78f85963677",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "564b2f40d42c0efc1bd6f057115a5abd1564cae36d7ccacf5d825d38401aa894",
- },
- {
- "private": "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "public": "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "salt": "b22e8e8e7373ac31ca7f0f6eb8b93130aba5266772a658593f3a11792e7e8d92",
- "iv": "9f8e33d82374dad6aac0e3dbe7aea704",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "7cab88d00a3fc656002eccbbd966e1d5d14a3090d92cf502cdbf843515625dcf",
- },
- {
- "private": "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "public": "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "salt": "af646c54cd153dffe453b60efbceeb85c1e95a414ea0036c4da94afb3366f5d9",
- "iv": "6acdf8e01acc8074ddc807281b6af888",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "aa70543a485b63a4dd141bb7fd78019092ac6fad731e914280a287c7467bae1a",
- },
- {
- "private": "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "public": "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "salt": "d9c0d386636c8a024935c024589f9cd39e820a16485b14951e690a967830e269",
- "iv": "f2e9f18aeb374965f54d2f4e31189a8f",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "33d97c216ea6498dfddabf94c2e2403d73efc495e9b284d9d90aaff840217d25",
- },
- {
- "private": "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "public": "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "salt": "06c227baac1ae3b0b1dc583f4850f13f9ba5d53be4a98fa5c3ea16217847530d",
- "iv": "3735123e78c44895df6ea33fa57e9a72",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "d5b5d66ba8cee0eb7ecf95b143fa77a46d6de13749e12eff40f5a7e649167ccb",
- },
- {
- "private": "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "public": "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "salt": "92f55ba5bc6fc2f23e3eedc299357c71518e36ba2447a4da7a9dfe9dfeb107b5",
- "iv": "1cbc4982e53e370052af97ab088fa942",
- "input": "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "output": "d48ef1ef526d805656cfc932aff259eadb17aa3391dde1877a722cba31d935b2",
- },
- {
- "private": "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "public": "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "salt": "10f15a39ba49866292a43b7781bc71ca8bbd4889f1616461caf056bcb91b0158",
- "iv": "c40d531d92bfee969dce91417346c892",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "e6d75afdb542785669b42198577c5b358d95397d71ec6f5835dca46d332cc08dbf73ea790b7bcb169a65719c0d55054c",
- },
- {
- "private": "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "public": "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "salt": "9c01ed42b219b3bbe1a43ae9d7af5c1dd09363baacfdba8f4d03d1046915e26e",
- "iv": "059a35d5f83249e632790015ed6518b9",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "5ef11aadff2eccee8b712dab968fa842eb770818ec0e6663ed242ea8b6bbc1c66d6285ee5b5f03d55dfee382fb4fa25d",
- },
- {
- "private": "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "public": "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "salt": "bc1067e2a7415ea45ff1ca9894338c591ff15f2e57ae2789ae31b9d5bea0f11e",
- "iv": "8c73f0d6613898daeefa3cf8b0686d37",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "6d220213b1878cd40a458f2a1e6e3b48040455fdf504dcd857f4f2ca1ad642e3a44fc401d04e339d302f66a9fad3d919",
- },
- {
- "private": "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "public": "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "salt": "cf4a21cb790552165827b678ca9695fcaf77566d382325112ff79483455de667",
- "iv": "bfbf5482e06f55b88bdd9e053b7eee6e",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "1198a78c29c215d5c450f7b8513ead253160bc9fde80d9cc8e6bee2efe9713cf5a09d6293c41033271c9e8c22036a28b",
- },
- {
- "private": "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "public": "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "salt": "eba5eae8aef79114082c3e70baef95bb02edf13b3897e8be7a70272962ef8838",
- "iv": "af9a56da3da18e2fbd2948a16332532b",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "1062ab5fbbdee9042ad35bdadfd3047c0a2127fe0f001da1be1b0582185edfc9687be8d68f85795833bb04af9cedd3bb",
- },
- {
- "private": "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "public": "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "salt": "518f8dfd0c138f1ffb4ea8029db15441d70abd893c3d767dc668f23ba7770e27",
- "iv": "42d28307974a1b2a2d921d270cfce03b",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "005e49fb7c5da540a84b034c853fc9f78a6b901ea495aed0c2abd4f08f1a96f9ffefc6a57f1ac09e0aea95ca0f03ffd8",
- },
- {
- "private": "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "public": "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "salt": "582fdf58b53715c26e10ba809e8f2ab70502e5a3d4e9a81100b7227732ab0bbc",
- "iv": "91f2aad3189bb2edc93bc891e73911ba",
- "input": "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a4",
- "output": "821a69cb16c57f0cb866e590b38069e35faec3ae18f158bb067db83a11237d29ab1e6b868b3147236a0958f15c2e2167",
- },
- {
- "private": "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "public": "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "salt": "a415b4c006118fb72fc37b2746ef288e23ac45c8ff7ade5f368a31557b6ac93a",
- "iv": "2b7c5f75606c0b8106c6489ea5657a9e",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "2781d5ee8ef1cb1596f8902b33dfae5045f84a987ca58173af5830dbce386062",
- },
- {
- "private": "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "public": "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "salt": "47e73ec362ea82d3a7c5d55532ad51d2cdf5316b981b2b2bd542b0efa027e8ea",
- "iv": "b2193f59030c8d05a7d3577b7f64dd33",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "3f43912db8dd6672b9996e5272e18c4b88fec9d7e8372db9c5f4709a4af1d86f",
- },
- {
- "private": "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "public": "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "salt": "aaa006c57b6d1e402650577fe9787d8d285f4bacd7c01f998be49c766f8860c7",
- "iv": "130304ddb9adc8870cf56bcae9487b7f",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "878cc7d8c0ef8dac0182a78eedc8080a402f59d8062a6b4ca8f4a74f3c3b3de7",
- },
- {
- "private": "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "public": "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "salt": "28dc7ccd6c2a939eef64b8be7b9ae248295e7fcd8471c22fa2f98733fea97611",
- "iv": "cb13890d3a11bc0a7433738263006710",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "e74ded846bebfa912fa1720e4c1415e6e5df7e7a1a7fedb5665d68f1763209a4",
- },
- {
- "private": "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "public": "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "salt": "79974fa2cad95154d0873902c153ccc3e7d54b17f2eeb3f29b6344cad9365a9a",
- "iv": "22123357979d20f44cc8eb0263d84e0e",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "eb14dec7b8b64d81a2ee4db07b0adf144d4f79a519bbf332b823583fa2d45405",
- },
- {
- "private": "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "public": "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "salt": "3409a6f8c4dcd9bd04144eb67e55a98696b674735b01bf1196191f29871ef966",
- "iv": "a823a0965969380ea1f8659ea5fd8fdd",
- "input": "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "output": "00a7eb708eae745847173f8217efb05be13059710aee632e3f471ac3c6202b51",
- },
- ]
-
- for test in test_cases:
- private_key = bytearray(reversed(bytes.fromhex(test["private"])))
- node = bip32.HDNode(
- depth=0,
- fingerprint=0,
- child_num=0,
- chain_code=bytearray(32),
- private_key=private_key,
- curve_name=CURVE,
- )
-
- encrypted = node.nem_encrypt(
- bytes.fromhex(test["public"]),
- bytes.fromhex(test["iv"]),
- bytes.fromhex(test["salt"]),
- bytes.fromhex(test["input"]),
- )
-
- self.assertEqual(encrypted, bytes.fromhex(test["output"]))
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.mosaic.py
@@ -1,146 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import NEMMosaic
-
- from apps.nem.mosaic.helpers import get_mosaic_definition
- from apps.nem.transfer import *
- from apps.nem.transfer.serialize import *
- from apps.nem.transfer.serialize import _merge_mosaics
-
-
-def get_mosaic(namespace: str, quantity: int, mosaic: str) -> NEMMosaic:
- return NEMMosaic(
- namespace=namespace,
- quantity=quantity,
- mosaic=mosaic,
- )
-
-
-# NOTE: copy-pasted from apps.nem.transfer.serialize.py
-def sort_mosaics(mosaics: list[NEMMosaic]) -> list[NEMMosaic]:
- return sorted(mosaics, key=lambda m: (m.namespace, m.mosaic))
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemMosaic(unittest.TestCase):
- def test_get_mosaic_definition(self):
- m = get_mosaic_definition("nem", "xem", 104)
- self.assertEqual(m.name, "NEM")
- self.assertEqual(m.ticker, " XEM")
-
- m = get_mosaic_definition("nem", "xxx", 104)
- self.assertEqual(m, None)
-
- m = get_mosaic_definition("aaaa", "xxx", 104)
- self.assertEqual(m, None)
-
- m = get_mosaic_definition("pacnem", "cheese", 104)
- self.assertEqual(m.name, "PacNEM Score Tokens")
- self.assertEqual(m.ticker, " PAC:CHS")
- self.assertEqual(m.levy.fee, 100)
-
- def test_mosaic_canonicalization(self):
- a = get_mosaic("abc", 3, "mosaic")
- b = get_mosaic("abc", 4, "a")
- c = get_mosaic("zzz", 3, "mosaic")
- d = get_mosaic("abc", 8, "mosaic")
- e = get_mosaic("aaa", 1, "mosaic")
- f = get_mosaic("aaa", 1, "mosaicz")
- g = get_mosaic("zzz", 30, "mosaic")
-
- res = canonicalize_mosaics([a, b, c, d, e, f, g])
- self.assertEqual(res, [e, f, b, a, c])
- self.assertEqual(res[2].quantity, b.quantity)
- self.assertEqual(res[3].quantity, 3 + 8) # a + d
- self.assertEqual(res[4].quantity, 3 + 30) # c + g
-
- def test_mosaic_merge(self):
- a = get_mosaic("abc", 1, "mosaic")
- b = get_mosaic("abc", 1, "mosaic")
- c = get_mosaic("abc", 2, "xxx")
-
- merged = _merge_mosaics([a, b])
- self.assertEqual(merged[0].quantity, 2)
- self.assertEqual(len(merged), 1)
-
- a.quantity = 1
- b.quantity = 10
- merged = _merge_mosaics([a, b])
- self.assertEqual(merged[0].quantity, 11)
-
- a.namespace = "abcdef"
- merged = _merge_mosaics([a, b])
- self.assertEqual(len(merged), 2)
-
- merged = _merge_mosaics([a, b, c])
- self.assertEqual(len(merged), 3)
-
- a.namespace = "abcdef"
- a.quantity = 1
- a.mosaic = "mosaic"
- b.namespace = "abc"
- b.quantity = 2
- b.mosaic = "mosaic"
- c.namespace = "abc"
- c.mosaic = "mosaic"
- c.quantity = 3
- merged = _merge_mosaics([a, b, c])
- self.assertEqual(merged[0].quantity, 1)
- self.assertEqual(merged[1].quantity, 5)
- self.assertEqual(len(merged), 2)
-
- a.namespace = "abc"
- a.quantity = 1
- a.mosaic = "mosaic"
- b.namespace = "abc"
- b.quantity = 2
- b.mosaic = "mosaic"
- c.namespace = "abc"
- c.mosaic = "mosaic"
- c.quantity = 3
- merged = _merge_mosaics([a, b, c])
- self.assertEqual(merged[0].quantity, 6)
- self.assertEqual(len(merged), 1)
-
- def test_mosaic_sort(self):
- a = get_mosaic("abcz", 1, "mosaic")
- b = get_mosaic("abca", 1, "mosaic")
- c = get_mosaic("a", 0, "zzz")
-
- res = sort_mosaics([a, b])
- self.assertListEqual(res, [b, a])
-
- a.namespace = ""
- b.namespace = "a.b.c"
- res = sort_mosaics([a, b])
- self.assertListEqual(res, [a, b])
-
- a.namespace = "z.z.z"
- b.namespace = "a.b.c"
- res = sort_mosaics([a, b])
- self.assertListEqual(res, [b, a])
-
- a.namespace = "a"
- b.namespace = "a"
- a.mosaic = "mosaic"
- b.mosaic = "mosaic"
- res = sort_mosaics([a, b])
- self.assertListEqual(res, [a, b])
-
- a.mosaic = "www"
- b.mosaic = "aaa"
- res = sort_mosaics([a, b])
- self.assertListEqual(res, [b, a])
-
- res = sort_mosaics([a, b, c])
- self.assertListEqual(res, [b, a, c])
-
- c.mosaic = "bbb"
- res = sort_mosaics([a, b, c])
- self.assertListEqual(res, [b, c, a])
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.mosaic_creation.py
@@ -1,247 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import hashlib
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import (
- NEMMosaicCreation,
- NEMMosaicDefinition,
- NEMSignTx,
- NEMTransactionCommon,
- )
-
- from apps.nem.helpers import *
- from apps.nem.mosaic import *
- from apps.nem.mosaic.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemMosaicCreation(unittest.TestCase):
- def test_nem_transaction_mosaic_creation(self):
-
- # http://bob.nem.ninja:8765/#/mosaic/68364353c29105e6d361ad1a42abbccbf419cfc7adb8b74c8f35d8f8bdaca3fa/0
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 14070896,
- 108000000,
- 14074496,
- "gimre.games.pong",
- "paddles",
- "Paddles for the bong game.\n",
- 0,
- 10000,
- True,
- True,
- 0,
- 0,
- "",
- "",
- "",
- "TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC",
- 50000000000,
- )
-
- t = serialize_mosaic_creation(
- m.transaction,
- m.mosaic_creation,
- bytes.fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"
- ),
- )
-
- self.assertEqual(
- t,
- bytes.fromhex(
- "014000000100009870b4d60020000000994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd32400f36f060000000080c2d600de00000020000000994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd3241f0000001000000067696d72652e67616d65732e706f6e6707000000706164646c65731b000000506164646c657320666f722074686520626f6e672067616d652e0a04000000150000000c00000064697669736962696c69747901000000301a0000000d000000696e697469616c537570706c79050000003130303030190000000d000000737570706c794d757461626c650400000074727565180000000c0000007472616e7366657261626c650400000074727565000000002800000054424d4f534149434f443446353445453543444d523233434342474f414d3258534a4252354f4c4300743ba40b000000"
- ),
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "68364353c29105e6d361ad1a42abbccbf419cfc7adb8b74c8f35d8f8bdaca3fa"
- ),
- )
-
- def test_nem_transaction_mosaic_creation_with_levy(self):
- # http://bob.nem.ninja:8765/#/mosaic/b2f4a98113ff1f3a8f1e9d7197aa982545297fe0aa3fa6094af8031569953a55/0
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 21497248,
- 108000000,
- 21500848,
- "alice.misc",
- "bar",
- "Special offer: get one bar extra by bying one foo!",
- 0,
- 1000,
- False,
- True,
- 1,
- 1,
- "TALICE2GMA34CXHD7XLJQ536NM5UNKQHTORNNT2J",
- "nem",
- "xem",
- "TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC",
- 50000000000,
- )
-
- t = serialize_mosaic_creation(
- m.transaction,
- m.mosaic_creation,
- bytes.fromhex(
- "244fa194e2509ac0d2fbc18779c2618d8c2ebb61c16a3bcbebcf448c661ba8dc"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "b2f4a98113ff1f3a8f1e9d7197aa982545297fe0aa3fa6094af8031569953a55"
- ),
- )
-
- # http://chain.nem.ninja/#/mosaic/e8dc14821dbea4831d9051f86158ef348001447968fc22c01644fdaf2bda75c6/0
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 69251020,
- 20000000,
- 69337420,
- "dim",
- "coin",
- "DIM COIN",
- 6,
- 9000000000,
- False,
- True,
- 2,
- 10,
- "NCGGLVO2G3CUACVI5GNX2KRBJSQCN4RDL2ZWJ4DP",
- "dim",
- "coin",
- "NBMOSAICOD4F54EE5CDMR23CCBGOAM2XSIUX6TRS",
- 500000000,
- )
-
- t = serialize_mosaic_creation(
- m.transaction,
- m.mosaic_creation,
- bytes.fromhex(
- "a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a"
- ),
- )
- self.assertEqual(
- t,
- bytes.fromhex(
- "0140000001000068ccaf200420000000a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a002d3101000000004c0122040c01000020000000a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a0f0000000300000064696d04000000636f696e0800000044494d20434f494e04000000150000000c00000064697669736962696c69747901000000361f0000000d000000696e697469616c537570706c790a000000393030303030303030301a0000000d000000737570706c794d757461626c650500000066616c7365180000000c0000007472616e7366657261626c6504000000747275654b00000002000000280000004e4347474c564f32473343554143564935474e58324b52424a5351434e3452444c325a574a3444500f0000000300000064696d04000000636f696e0a00000000000000280000004e424d4f534149434f443446353445453543444d523233434342474f414d325853495558365452530065cd1d00000000"
- ),
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "e8dc14821dbea4831d9051f86158ef348001447968fc22c01644fdaf2bda75c6"
- ),
- )
-
- def test_nem_transaction_mosaic_creation_with_description(self):
- # http://chain.nem.ninja/#/mosaic/269c6fda657aba3053a0e5b138c075808cc20e244e1182d9b730798b60a1f77b/0
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 26729938,
- 108000000,
- 26733538,
- "jabo38",
- "red_token",
- "This token is to celebrate the release of Namespaces and Mosaics "
- "on the NEM system. This token was the fist ever mosaic created "
- "other than nem.xem. There are only 10,000 Red Tokens that will "
- "ever be created. It has no levy and can be traded freely among "
- "third parties.",
- 2,
- 10000,
- False,
- True,
- 0,
- 0,
- "",
- "",
- "",
- "NBMOSAICOD4F54EE5CDMR23CCBGOAM2XSIUX6TRS",
- 50000000000,
- )
- t = serialize_mosaic_creation(
- m.transaction,
- m.mosaic_creation,
- bytes.fromhex(
- "58956ac77951622dc5f1c938affbf017c458e30e6b21ddb5783d38b302531f23"
- ),
- )
-
- self.assertEqual(
- t,
- bytes.fromhex(
- "0140000001000068d2dd97012000000058956ac77951622dc5f1c938affbf017c458e30e6b21ddb5783d38b302531f2300f36f0600000000e2eb9701c80100002000000058956ac77951622dc5f1c938affbf017c458e30e6b21ddb5783d38b302531f2317000000060000006a61626f3338090000007265645f746f6b656e0c0100005468697320746f6b656e20697320746f2063656c656272617465207468652072656c65617365206f66204e616d6573706163657320616e64204d6f7361696373206f6e20746865204e454d2073797374656d2e205468697320746f6b656e207761732074686520666973742065766572206d6f736169632063726561746564206f74686572207468616e206e656d2e78656d2e20546865726520617265206f6e6c792031302c3030302052656420546f6b656e7320746861742077696c6c206576657220626520637265617465642e20497420686173206e6f206c65767920616e642063616e2062652074726164656420667265656c7920616d6f6e6720746869726420706172746965732e04000000150000000c00000064697669736962696c69747901000000321a0000000d000000696e697469616c537570706c790500000031303030301a0000000d000000737570706c794d757461626c650500000066616c7365180000000c0000007472616e7366657261626c65040000007472756500000000280000004e424d4f534149434f443446353445453543444d523233434342474f414d3258534955583654525300743ba40b000000"
- ),
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "269c6fda657aba3053a0e5b138c075808cc20e244e1182d9b730798b60a1f77b"
- ),
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- namespace: str,
- mosaic: str,
- description: str,
- divisibility: int,
- supply: int,
- mutable_supply: bool,
- transferable: bool,
- levy_type: int,
- levy_fee: int,
- levy_address: str,
- levy_namespace: str,
- levy_mosaic: str,
- creation_sink: str,
- creation_fee: int,
-):
- transaction = NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
- mosaic_creation = NEMMosaicCreation(
- sink=creation_sink,
- fee=creation_fee,
- definition=NEMMosaicDefinition(
- namespace=namespace,
- mosaic=mosaic,
- description=description,
- divisibility=divisibility,
- supply=supply,
- mutable_supply=mutable_supply,
- transferable=transferable,
- levy=levy_type,
- fee=levy_fee,
- levy_address=levy_address,
- levy_namespace=levy_namespace,
- levy_mosaic=levy_mosaic,
- ),
- )
-
- return NEMSignTx(
- transaction=transaction,
- mosaic_creation=mosaic_creation,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.mosaic_supply_change.py
@@ -1,147 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import hashlib
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import NEMMosaicSupplyChange, NEMSignTx, NEMTransactionCommon
-
- from apps.nem.helpers import *
- from apps.nem.mosaic import *
- from apps.nem.mosaic.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemMosaicSupplyChange(unittest.TestCase):
- def test_nem_transaction_create_mosaic_supply_change(self):
-
- # http://bigalice2.nem.ninja:7890/transaction/get?hash=33a50fdd4a54913643a580b2af08b9a5b51b7cee922bde380e84c573a7969c50
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 14071648,
- 108000000,
- 14075248,
- "gimre.games.pong",
- "paddles",
- 1,
- 1234,
- )
- t = serialize_mosaic_supply_change(
- m.transaction,
- m.supply_change,
- bytes.fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "33a50fdd4a54913643a580b2af08b9a5b51b7cee922bde380e84c573a7969c50"
- ),
- )
-
- # http://bigalice2.nem.ninja:7890/transaction/get?hash=1ce8e8894d077a66ff22294b000825d090a60742ec407efd80eb8b19657704f2
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 14126909,
- 108000000,
- 14130509,
- "jabo38_ltd.fuzzy_kittens_cafe",
- "coupons",
- 2,
- 1,
- )
- t = serialize_mosaic_supply_change(
- m.transaction,
- m.supply_change,
- bytes.fromhex(
- "84afa1bbc993b7f5536344914dde86141e61f8cbecaf8c9cefc07391f3287cf5"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "1ce8e8894d077a66ff22294b000825d090a60742ec407efd80eb8b19657704f2"
- ),
- )
-
- # http://bigalice3.nem.ninja:7890/transaction/get?hash=694e493e9576d2bcf60d85747e302ac2e1cc27783187947180d4275a713ff1ff
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 53377685,
- 20000000,
- 53464085,
- "abvapp",
- "abv",
- 1,
- 9000000,
- )
- t = serialize_mosaic_supply_change(
- m.transaction,
- m.supply_change,
- bytes.fromhex(
- "b7ccc27b21ba6cf5c699a8dc86ba6ba98950442597ff9fa30e0abe0f5f4dd05d"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "694e493e9576d2bcf60d85747e302ac2e1cc27783187947180d4275a713ff1ff"
- ),
- )
-
- # http://bigalice3.nem.ninja:7890/transaction/get?hash=09836334e123970e068d5b411e4d1df54a3ead10acf1ad5935a2cdd9f9680185
- m = _create_msg(
- NEM_NETWORK_MAINNET, 55176304, 20000000, 55262704, "sushi", "wasabi", 2, 20
- )
- t = serialize_mosaic_supply_change(
- m.transaction,
- m.supply_change,
- bytes.fromhex(
- "75f001a8641e2ce5c4386883dda561399ed346177411b492a677b73899502f13"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "09836334e123970e068d5b411e4d1df54a3ead10acf1ad5935a2cdd9f9680185"
- ),
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- namespace: str,
- mosaic: str,
- mod_type: int,
- delta: int,
-):
- transaction = NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
- supply_change = NEMMosaicSupplyChange(
- namespace=namespace,
- mosaic=mosaic,
- type=mod_type,
- delta=delta,
- )
-
- return NEMSignTx(
- transaction=transaction,
- supply_change=supply_change,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.multisig.aggregate_modification.py
@@ -1,186 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import hashlib
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import (
- NEMAggregateModification,
- NEMCosignatoryModification,
- NEMSignTx,
- NEMTransactionCommon,
- )
-
- from apps.nem.helpers import *
- from apps.nem.multisig import *
- from apps.nem.multisig.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemMultisigAggregateModification(unittest.TestCase):
- def test_nem_transaction_aggregate_modification(self):
- # http://bob.nem.ninja:8765/#/aggregate/6a55471b17159e5b6cd579c421e95a4e39d92e3f78b0a55ee337e785a601d3a2
- m = _create_msg(NEM_NETWORK_TESTNET, 0, 22000000, 0, 2, 0)
- t = serialize_aggregate_modification(
- m.transaction,
- m.aggregate_modification,
- bytes.fromhex(
- "462ee976890916e54fa825d26bdd0235f5eb5b6a143c199ab0ae5ee9328e08ce"
- ),
- )
-
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "c54d6e33ed1446eedd7f7a80a588dd01857f723687a09200c1917d5524752f8b"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "6a55471b17159e5b6cd579c421e95a4e39d92e3f78b0a55ee337e785a601d3a2"
- ),
- )
-
- # http://chain.nem.ninja/#/aggregate/cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c
- m = _create_msg(NEM_NETWORK_MAINNET, 0, 40000000, 0, 5, 0)
- t = serialize_aggregate_modification(
- m.transaction,
- m.aggregate_modification,
- bytes.fromhex(
- "f41b99320549741c5cce42d9e4bb836d98c50ed5415d0c3c2912d1bb50e6a0e5"
- ),
- )
-
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "1fbdbdde28daf828245e4533765726f0b7790e0b7146e2ce205df3e86366980b"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "f94e8702eb1943b23570b1b83be1b81536df35538978820e98bfce8f999e2d37"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "826cedee421ff66e708858c17815fcd831a4bb68e3d8956299334e9e24380ba8"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "719862cd7d0f4e875a6a0274c9a1738f38f40ad9944179006a54c34724c1274d"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "43aa69177018fc3e2bdbeb259c81cddf24be50eef9c5386db51d82386c41475a"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c"
- ),
- )
-
- def test_nem_transaction_aggregate_modification_relative_change(self):
- # http://bob.nem.ninja:8765/#/aggregate/1fbdae5ba753e68af270930413ae90f671eb8ab58988116684bac0abd5726584
- m = _create_msg(NEM_NETWORK_TESTNET, 6542254, 40000000, 6545854, 4, 2)
- t = serialize_aggregate_modification(
- m.transaction,
- m.aggregate_modification,
- bytes.fromhex(
- "6bf7849c1eec6a2002995cc457dc00c4e29bad5c88de63f51e42dfdcd7b2131d"
- ),
- )
-
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "5f53d076c8c3ec3110b98364bc423092c3ec2be2b1b3c40fd8ab68d54fa39295"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "9eb199c2b4d406f64cb7aa5b2b0815264b56ba8fe44d558a6cb423a31a33c4c2"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "94b2323dab23a3faba24fa6ddda0ece4fbb06acfedd74e76ad9fae38d006882b"
- ),
- )
- write_cosignatory_modification(
- t,
- 1,
- bytes.fromhex(
- "d88c6ee2a2cd3929d0d76b6b14ecb549d21296ab196a2b3a4cb2536bcce32e87"
- ),
- )
- write_minimum_cosignatories(t, 2)
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "1fbdae5ba753e68af270930413ae90f671eb8ab58988116684bac0abd5726584"
- ),
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- modifications: int,
- relative_change: int,
-):
- transaction = NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
- aggregate_modification = NEMAggregateModification(
- modifications=[
- NEMCosignatoryModification(type=5, public_key=b"abc")
- for _ in range(modifications)
- ],
- relative_change=relative_change,
- )
-
- return NEMSignTx(
- transaction=transaction,
- aggregate_modification=aggregate_modification,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.multisig.py
@@ -1,203 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import (
- NEMAggregateModification,
- NEMCosignatoryModification,
- NEMProvisionNamespace,
- NEMSignTx,
- NEMTransactionCommon,
- )
-
- from apps.nem.helpers import *
- from apps.nem.multisig import *
- from apps.nem.multisig.serialize import *
- from apps.nem.namespace import *
- from apps.nem.namespace.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemMultisig(unittest.TestCase):
- def test_nem_multisig(self):
- # http://bob.nem.ninja:8765/#/multisig/7d3a7087023ee29005262016706818579a2b5499eb9ca76bad98c1e6f4c46642
- m = _create_msg(NEM_NETWORK_TESTNET, 3939039, 16000000, 3960639, 1, 0)
- base_tx = serialize_aggregate_modification(
- m.transaction,
- m.aggregate_modification,
- bytes.fromhex(
- "abac2ee3d4aaa7a3bfb65261a00cc04c761521527dd3f2cf741e2815cbba83ac"
- ),
- )
-
- write_cosignatory_modification(
- base_tx,
- 2,
- bytes.fromhex(
- "e6cff9b3725a91f31089c3acca0fac3e341c00b1c8c6e9578f66c4514509c3b3"
- ),
- )
- m = _create_common_msg(NEM_NETWORK_TESTNET, 3939039, 6000000, 3960639)
- multisig = serialize_multisig(
- m,
- bytes.fromhex(
- "59d89076964742ef2a2089d26a5aa1d2c7a7bb052a46c1de159891e91ad3d76e"
- ),
- base_tx,
- )
-
- self.assertEqual(
- multisig,
- bytes.fromhex(
- "0410000001000098df1a3c002000000059d89076964742ef2a2089d26a5aa1d2c7a7bb052a46c1de159891e91ad3d76e808d5b00000000003f6f3c006c0000000110000001000098df1a3c0020000000abac2ee3d4aaa7a3bfb65261a00cc04c761521527dd3f2cf741e2815cbba83ac0024f400000000003f6f3c0001000000280000000200000020000000e6cff9b3725a91f31089c3acca0fac3e341c00b1c8c6e9578f66c4514509c3b3"
- ),
- )
-
- address_pubkey = bytes.fromhex(
- "abac2ee3d4aaa7a3bfb65261a00cc04c761521527dd3f2cf741e2815cbba83ac"
- )
- m = _create_common_msg(NEM_NETWORK_TESTNET, 3939891, 6000000, 3961491)
- multisig = serialize_multisig_signature(
- m,
- bytes.fromhex(
- "71cba4f2a28fd19f902ba40e9937994154d9eeaad0631d25d525ec37922567d4"
- ),
- base_tx,
- address_pubkey,
- )
-
- self.assertEqual(
- multisig,
- bytes.fromhex(
- "0210000001000098331e3c002000000071cba4f2a28fd19f902ba40e9937994154d9eeaad0631d25d525ec37922567d4808d5b000000000093723c0024000000200000008ec165580bdabfd31ce6007a1748ce5bdf30eab7a214743097de3bc822ac7e002800000054435258595551494d464137414f474c354c463359574c43375641424c59554d4a35414342554e4c"
- ),
- )
-
- def test_nem_multisig_2(self):
- # http://chain.nem.ninja/#/multisig/1016cf3bdd61bd57b9b2b07b6ff2dee390279d8d899265bdc23d42360abe2e6c
- m = _create_provision_msg(
- NEM_NETWORK_MAINNET,
- 59414272,
- 20000000,
- 59500672,
- "dim",
- "",
- "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA",
- 5000000000,
- )
- base_tx = serialize_provision_namespace(
- m.transaction,
- m.provision_namespace,
- bytes.fromhex(
- "a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a"
- ),
- )
-
- m = _create_common_msg(NEM_NETWORK_MAINNET, 59414272, 6000000, 59500672)
-
- multisig = serialize_multisig(
- m,
- bytes.fromhex(
- "cfe58463f0eaebceb5d00717f8aead49171a5d7c08f6b1299bd534f11715acc9"
- ),
- base_tx,
- )
- self.assertEqual(
- multisig,
- bytes.fromhex(
- "041000000100006800978a0320000000cfe58463f0eaebceb5d00717f8aead49171a5d7c08f6b1299bd534f11715acc9808d5b000000000080e88b037b000000012000000100006800978a0320000000a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a002d31010000000080e88b03280000004e414d4553504143455748344d4b464d42435646455244504f4f5034464b374d54425844505a5a4100f2052a010000000300000064696dffffffff"
- ),
- )
-
- m = _create_common_msg(NEM_NETWORK_MAINNET, 59414342, 6000000, 59500742)
- address_pubkey = bytes.fromhex(
- "a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a"
- )
- multisig = serialize_multisig_signature(
- m,
- bytes.fromhex(
- "1b49b80203007117d034e45234ffcdf402c044aeef6dbb06351f346ca892bce2"
- ),
- base_tx,
- address_pubkey,
- )
- self.assertEqual(
- multisig,
- bytes.fromhex(
- "021000000100006846978a03200000001b49b80203007117d034e45234ffcdf402c044aeef6dbb06351f346ca892bce2808d5b0000000000c6e88b032400000020000000bfa2088f7720f89dd4664d650e321dabd02fab61b7355bc88a391a848a49786a280000004e4444524733554542354c5a5a5a4d445742453452544b5a4b37334a424850414957424843464d56"
- ),
- )
-
- m = _create_common_msg(NEM_NETWORK_MAINNET, 59414381, 6000000, 59500781)
- multisig = serialize_multisig_signature(
- m,
- bytes.fromhex(
- "7ba4b39209f1b9846b098fe43f74381e43cb2882ccde780f558a63355840aa87"
- ),
- base_tx,
- address_pubkey,
- )
- self.assertEqual(
- multisig,
- bytes.fromhex(
- "02100000010000686d978a03200000007ba4b39209f1b9846b098fe43f74381e43cb2882ccde780f558a63355840aa87808d5b0000000000ede88b032400000020000000bfa2088f7720f89dd4664d650e321dabd02fab61b7355bc88a391a848a49786a280000004e4444524733554542354c5a5a5a4d445742453452544b5a4b37334a424850414957424843464d56"
- ),
- )
-
-
-def _create_common_msg(network: int, timestamp: int, fee: int, deadline: int):
- return NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- modifications: int,
- relative_change: int,
-):
- aggregate_modification = NEMAggregateModification(
- modifications=[
- NEMCosignatoryModification(type=5, public_key=b"abc")
- for _ in range(modifications)
- ],
- relative_change=relative_change,
- )
-
- return NEMSignTx(
- transaction=_create_common_msg(network, timestamp, fee, deadline),
- aggregate_modification=aggregate_modification,
- )
-
-
-def _create_provision_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- name: str,
- parent: str,
- sink: str,
- rental_fee: int,
-):
- provision_namespace = NEMProvisionNamespace(
- namespace=name,
- parent=parent,
- sink=sink,
- fee=rental_fee,
- )
-
- return NEMSignTx(
- transaction=_create_common_msg(network, timestamp, fee, deadline),
- provision_namespace=provision_namespace,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.namespace.py
@@ -1,127 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import hashlib
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import NEMProvisionNamespace, NEMSignTx, NEMTransactionCommon
-
- from apps.nem.helpers import *
- from apps.nem.namespace import *
- from apps.nem.namespace.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemNamespace(unittest.TestCase):
- def test_create_provision_namespace(self):
-
- # http://bob.nem.ninja:8765/#/transfer/0acbf8df91e6a65dc56c56c43d65f31ff2a6a48d06fc66e78c7f3436faf3e74f
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 56999445,
- 20000000,
- 57003045,
- "gimre",
- "",
- "TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35",
- 5000000000,
- )
- t = serialize_provision_namespace(
- m.transaction,
- m.provision_namespace,
- bytes.fromhex(
- "84afa1bbc993b7f5536344914dde86141e61f8cbecaf8c9cefc07391f3287cf5"
- ),
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "f7cab28da57204d01a907c697836577a4ae755e6c9bac60dcc318494a22debb3"
- ),
- )
-
- # http://bob.nem.ninja:8765/#/namespace/7ddd5fe607e1bfb5606e0ac576024c318c8300d237273117d4db32a60c49524d
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 21496797,
- 108000000,
- 21500397,
- "misc",
- "alice",
- "TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35",
- 5000000000,
- )
- t = serialize_provision_namespace(
- m.transaction,
- m.provision_namespace,
- bytes.fromhex(
- "244fa194e2509ac0d2fbc18779c2618d8c2ebb61c16a3bcbebcf448c661ba8dc"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "7ddd5fe607e1bfb5606e0ac576024c318c8300d237273117d4db32a60c49524d"
- ),
- )
-
- # http://chain.nem.ninja/#/namespace/57071aad93ca125dc231dc02c07ad8610cd243d35068f9b36a7d231383907569
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 26699717,
- 108000000,
- 26703317,
- "sex",
- "",
- "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA",
- 50000000000,
- )
- t = serialize_provision_namespace(
- m.transaction,
- m.provision_namespace,
- bytes.fromhex(
- "9f3c14f304309c8b72b2821339c4428793b1518bea72d58dd01f19d523518614"
- ),
- )
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "57071aad93ca125dc231dc02c07ad8610cd243d35068f9b36a7d231383907569"
- ),
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- name: str,
- parent: str,
- sink: str,
- rental_fee: int,
-):
- transaction = NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
- provision_namespace = NEMProvisionNamespace(
- namespace=name,
- parent=parent,
- sink=sink,
- fee=rental_fee,
- )
-
- return NEMSignTx(
- transaction=transaction,
- provision_namespace=provision_namespace,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tests/test_apps.nem.transfer.py
@@ -1,211 +0,0 @@
-# flake8: noqa: F403,F405
-from common import * # isort:skip
-
-from trezor.crypto import hashlib
-
-if not utils.BITCOIN_ONLY:
- from trezor.messages import NEMMosaic, NEMSignTx, NEMTransactionCommon, NEMTransfer
-
- from apps.nem.helpers import *
- from apps.nem.mosaic import *
- from apps.nem.transfer import *
- from apps.nem.transfer.serialize import *
-
-
-@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
-class TestNemTransfer(unittest.TestCase):
- def test_create_transfer(self):
-
- # http://bob.nem.ninja:8765/#/transfer/0acbf8df91e6a65dc56c56c43d65f31ff2a6a48d06fc66e78c7f3436faf3e74f
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 0,
- 0,
- 0,
- "TBGIMRE4SBFRUJXMH7DVF2IBY36L2EDWZ37GVSC4",
- 50000000000000,
- )
-
- t = serialize_transfer(
- m.transaction,
- m.transfer,
- bytes.fromhex(
- "e59ef184a612d4c3c4d89b5950eb57262c69862b2f96e59c5043bf41765c482f"
- ),
- None,
- False,
- )
- self.assertEqual(
- t,
- bytes.fromhex(
- "01010000010000980000000020000000e59ef184a612d4c3c4d89b5950eb57262c69862b2f96e59c5043bf41765c482f00000000000000000000000028000000544247494d52453453424652554a584d48374456463249425933364c324544575a3337475653433400203d88792d000000000000"
- ),
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "0acbf8df91e6a65dc56c56c43d65f31ff2a6a48d06fc66e78c7f3436faf3e74f"
- ),
- )
-
- def test_create_transfer_with_payload(self):
-
- # http://chain.nem.ninja/#/transfer/e90e98614c7598fbfa4db5411db1b331d157c2f86b558fb7c943d013ed9f71cb
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 0,
- 0,
- 0,
- "NBT3WHA2YXG2IR4PWKFFMO772JWOITTD2V4PECSB",
- 5175000000000,
- )
-
- t = serialize_transfer(
- m.transaction,
- m.transfer,
- bytes.fromhex(
- "8d07f90fb4bbe7715fa327c926770166a11be2e494a970605f2e12557f66c9b9"
- ),
- b"Good luck!",
- False,
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "e90e98614c7598fbfa4db5411db1b331d157c2f86b558fb7c943d013ed9f71cb"
- ),
- )
-
- def test_create_transfer_with_encrypted_payload(self):
-
- # http://chain.nem.ninja/#/transfer/40e89160e6f83d37f7c82defc0afe2c1605ae8c919134570a51dd27ea1bb516c
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 77229,
- 30000000,
- 80829,
- "NALICEPFLZQRZGPRIJTMJOCPWDNECXTNNG7QLSG3",
- 30000000,
- )
-
- t = serialize_transfer(
- m.transaction,
- m.transfer,
- bytes.fromhex(
- "f85ab43dad059b9d2331ddacc384ad925d3467f03207182e01296bacfb242d01"
- ),
- bytes.fromhex(
- "4d9dcf9186967d30be93d6d5404ded22812dbbae7c3f0de501bcd7228cba45bded13000eec7b4c6215fc4d3588168c9218167cec98e6977359153a4132e050f594548e61e0dc61c153f0f53c5e65c595239c9eb7c4e7d48e0f4bb8b1dd2f5ddc"
- ),
- True,
- )
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "40e89160e6f83d37f7c82defc0afe2c1605ae8c919134570a51dd27ea1bb516c"
- ),
- )
-
- def test_create_transfer_with_mosaic(self):
-
- # http://bob.nem.ninja:8765/#/transfer/3409d9ece28d6296d6d5e220a7e3cb8641a3fb235ffcbd20c95da64f003ace6c
- m = _create_msg(
- NEM_NETWORK_TESTNET,
- 14072100,
- 194000000,
- 14075700,
- "TBLOODPLWOWMZ2TARX4RFPOSOWLULHXMROBN2WXI",
- 3000000,
- 2,
- )
-
- t = serialize_transfer(
- m.transaction,
- m.transfer,
- bytes.fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"
- ),
- b"sending you 3 pairs of paddles\n",
- False,
- )
-
- self.assertEqual(
- t,
- bytes.fromhex(
- "010100000200009824b9d60020000000994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd3248034900b0000000034c7d6002800000054424c4f4f44504c574f574d5a3254415258345246504f534f574c554c48584d524f424e32575849c0c62d000000000027000000010000001f00000073656e64696e6720796f752033207061697273206f6620706164646c65730a02000000"
- ),
- )
-
- serialize_mosaic(t, "gimre.games.pong", "paddles", 2)
- serialize_mosaic(t, "nem", "xem", 44000000)
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "3409d9ece28d6296d6d5e220a7e3cb8641a3fb235ffcbd20c95da64f003ace6c"
- ),
- )
-
- # http://chain.nem.ninja/#/transfer/882dca18dcbe075e15e0ec5a1d7e6ccd69cc0f1309ffd3fde227bfbc107b3f6e
- m = _create_msg(
- NEM_NETWORK_MAINNET,
- 26730750,
- 179500000,
- 26734350,
- "NBE223WPKEBHQPCYUC4U4CDUQCRRFMPZLOQLB5OP",
- 1000000,
- 1,
- )
-
- t = serialize_transfer(
- m.transaction,
- m.transfer,
- bytes.fromhex(
- "f85ab43dad059b9d2331ddacc384ad925d3467f03207182e01296bacfb242d01"
- ),
- b"enjoy! :)",
- False,
- )
- serialize_mosaic(t, "imre.g", "tokens", 1)
-
- self.assertEqual(
- hashlib.sha3_256(t, keccak=True).digest(),
- bytes.fromhex(
- "882dca18dcbe075e15e0ec5a1d7e6ccd69cc0f1309ffd3fde227bfbc107b3f6e"
- ),
- )
-
-
-def _create_msg(
- network: int,
- timestamp: int,
- fee: int,
- deadline: int,
- recipient: str,
- amount: int,
- mosaics: int = 0,
-):
- transaction = NEMTransactionCommon(
- network=network,
- timestamp=timestamp,
- fee=fee,
- deadline=deadline,
- )
-
- transfer = NEMTransfer(
- recipient=recipient,
- amount=amount,
- mosaics=[
- NEMMosaic(namespace="abc", quantity=5, mosaic="mosaic")
- for _ in range(mosaics)
- ],
- )
-
- return NEMSignTx(
- transaction=transaction,
- transfer=transfer,
- )
-
-
-if __name__ == "__main__":
- unittest.main()
### core/tools/size/groups.py
@@ -63,9 +63,7 @@ def _categories_func(row: DataRow) -> str | None:
),
"Altcoin apps": lambda row: row.source_definition.startswith(
(
- "src/apps/nem/",
"src/apps/stellar/",
- "src/apps/eos/",
"src/apps/tezos/",
"src/apps/tron/",
"src/apps/ripple/",
### core/tools/upysize_ignore.json
@@ -29,15 +29,6 @@
"src/apps/cardano/helpers/utils.py": [
"derive_public_key"
],
- "src/apps/eos/helpers.py": [
- "base58_encode"
- ],
- "src/apps/eos/writers.py": [
- "write_action_undelegate",
- "write_action_deleteauth",
- "write_action_unlinkauth",
- "write_bytes_prefixed"
- ],
"src/apps/ethereum/helpers.py": [
"address_from_bytes",
"get_type_name"
@@ -101,12 +92,6 @@
"src/apps/monero/signing/offloading_keys.py": [
"hmac_key_txin"
],
- "src/apps/nem/validators.py": [
- "validate_network"
- ],
- "src/apps/nem/writers.py": [
- "write_bytes_with_len"
- ],
"src/apps/common/address_type.py": [
"tobytes",
"check"
### core/translations/blank_translations_rules.json
@@ -54,16 +54,6 @@
"allowedLayouts": [ "Delizia", "Eckhart" ],
"description": "Only Delizia and Eckhart have haptic feedback"
},
- {
- "prefix": "eos__",
- "allowedLayouts": [ "Bolt" ],
- "description": "Only Bolt has EOS support"
- },
- {
- "prefix": "nem__",
- "allowedLayouts": [ "Bolt" ],
- "description": "Only Bolt has NEM support"
- },
{
"prefix": "inputs__",
"allowedLayouts": [ "Caesar" ],
### core/translations/cs.json
@@ -627,222 +627,6 @@
"device_name__title": "Název zařízení",
"entropy__send": "Opravdu chcete odeslat entropii?",
"entropy__title_confirm": "Potvrdit entropii",
- "eos__about_to_sign_template": {
- "Bolt": "Chystáte se podepsat {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Název akce",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Libovolná data",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Koupit RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Bajty",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Zrušit hlas",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Kontrolní součet",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Kód",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Kontrakt",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "Procesor",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Tvůrce",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Odstranit ověření",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Spojit ověření",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Poznámka",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Název",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "SÍŤ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Nový účet",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Vlastník",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Nadřazený účet",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Plátce",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Oprávnění",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Příjemce",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Vrácení",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Požadavek",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Prodat RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Odesílatel",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Prahová hodnota",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "Komu",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Převod",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Typ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Odpojit ověření",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Aktualizovat ověření",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Hlasovat pro producenty bloků",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Hlasovat pro proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Hlasující",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Všechny EVM",
"ethereum__approve": {
"Bolt": "Schválení",
@@ -1431,312 +1215,6 @@
"monero__wanna_export_watchkey": "Opravdu chcete exportovat údaje pouze pro sledování?",
"monero__wanna_start_refresh": "Opravdu chcete zahájit\nobnovení?",
"monero__wanna_sync_key_images": "Opravdu chcete\nsynchronizovat obrazy klíče?",
- "nem__absolute": {
- "Bolt": "absolutní",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Aktivovat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Přidat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Potvrďte akci",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Potvrďte adresu",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Potvrďte poplatek za vytvoření",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Potvrďte mozaiku",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Potvrďte poplatek za multisig",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Potvrďte obor názvů",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Potvrďte datovou část",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Potvrďte vlastnosti",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Potvrďte poplatek za pronájem",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Potvrďte převod",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Převést účet na multisig?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Spolupodepsat transakci za",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " další podepisující osoba",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Vytvořit mozaiku",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Vytvořit namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Deaktivovat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Snížit",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Popis",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "Dělitelnost a daň nelze zobrazit pro neznámé mozaiky",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Zašifrováno",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Konečné potvrzení",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "neměnné",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Zvýšit",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Počáteční zdroj",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Zahájit transakci",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Dělitelnost daně",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Daň",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Potvrdit daň mosaiky pro",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Mozaika daně",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Obor názvů daně",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Příjemce daně",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Typ daně",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Upravit zdroj pro",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Upravit počet dalších podepisujících osob o ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "proměnlivé",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "z",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "percentil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} nezpracovaných jednotek",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " vzdálená sklizeň?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Odstranit",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Nastavit min. počet dalších podepisujících osob na ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Podepsat transakci\na zaplatit {0}\njako síťový poplatek?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Změna zdrojů",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} zdroj o {1} celých jednotek?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Přenosné",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "v rámci oboru názvů",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Nešifrováno",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Neznámá mozaika!",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Druh události: {0}",
"passphrase__access_wallet": {
"Bolt": "Otevřít Passphrase peněženku?",
### core/translations/de.json
@@ -772,222 +772,6 @@
"device_name__title": "Gerätename",
"entropy__send": "Entropie wirklich senden?",
"entropy__title_confirm": "Entropie bestätigen",
- "eos__about_to_sign_template": {
- "Bolt": "Du bist dabei, {0} zu signieren.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Aktionsname",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Beliebige Daten",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "RAM kaufen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Bytes",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Vote abbrechen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Prüfsumme",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Code",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Kontrakt",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Ersteller",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Auth löschen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Auth verknüpfen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Memo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Name",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NET",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Neues Konto",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Eigentümer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Elternteil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Zahlender",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Berechtigung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Empfänger",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Rückerstattung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Anforderung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "RAM verkaufen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Sender",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Schwelle",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "An",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Überweisung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Typ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Auth-Verknüpfung aufheben",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Auth aktualisieren",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Vote für Produzenten",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Vote für Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Voter",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Alle EVMs",
"ethereum__approve": {
"Bolt": "Zulassen",
@@ -1651,312 +1435,6 @@
"monero__wanna_export_watchkey": "Möchtest du wirklich Watch-Only-Daten exportieren?",
"monero__wanna_start_refresh": "Möchtest du wirklich\ndie Aktualisierung starten?",
"monero__wanna_sync_key_images": "Möchtest du wirklich\ndie Key-Images synchronisieren?",
- "nem__absolute": {
- "Bolt": "absolut",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Aktivieren",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Hinzufügen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Aktion bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Adresse bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Erstellungsgebühr bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Mosaik bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Multisig-Gebühr bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Namespace bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Nutzdaten bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Eigenschaften bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Leihgebühr bestätigen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Bestätigung der Überweisung von",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Konto in Multisig-Konto umwandeln?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Transaktion mitzeichnen für",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " Mitunterzeichner",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Mosaik erstellen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Namespace erstellen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Deaktivieren",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Verringern",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Beschreibung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "Teilbarkeit und Abgaben können bei unbekannten Mosaiken nicht angezeigt werden",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Verschlüsselt",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Letzte Bestätigung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "unveränderlich",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Erhöhen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Anfängliches Angebot",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Transaktion initiieren für",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Teilbarkeit der Abgaben",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Abgabengebühr",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Abgabenmosaikgebühr bestätigen von",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Abgabenmosaik",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Abgaben-Namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Abgabenempfänger",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Abgabentyp",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Ändern des Angebots für",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Ändern der Anzahl der Mitunterzeichner um ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "veränderlich",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "von",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "Perzentil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} Roheinheiten",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " Remote-Harvesting?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Entfernen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Mindestanzahl der Mitunterzeichner festlegen auf ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Diese Transaktion signieren\nund {0}\nNetzwerkgebühr zahlen?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Angebotsänderung",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} Angebot um {1} ganze Einheiten?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Übertragbar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "unter Namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Unverschlüsselt",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Unbekanntes Mosaik!",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Event-Art: {0}",
"passphrase__access_wallet": {
"Bolt": "Zugriff auf Passphrase-Wallet?",
### core/translations/en.json
@@ -606,222 +606,6 @@
"device_name__title": "Device name",
"entropy__send": "Do you really want to send entropy?",
"entropy__title_confirm": "Confirm entropy",
- "eos__about_to_sign_template": {
- "Bolt": "You are about to sign {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Action Name",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Arbitrary data",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Buy RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Bytes",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Cancel vote",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Checksum",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Code",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Contract",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Creator",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Delete Auth",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Link Auth",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Memo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Name",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NET",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "New account",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Owner",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Parent",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Payer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Permission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Receiver",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Refund",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Requirement",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Sell RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Sender",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Threshold",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "To",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Transfer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Type",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Unlink Auth",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Update Auth",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Vote for producers",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Vote for proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Voter",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "All EVMs",
"ethereum__approve": {
"Bolt": "Approve",
@@ -1456,312 +1240,6 @@
"monero__wanna_export_watchkey": "Do you really want to export watch-only credentials?",
"monero__wanna_start_refresh": "Do you really want to\nstart refresh?",
"monero__wanna_sync_key_images": "Do you really want to\nsync key images?",
- "nem__absolute": {
- "Bolt": "absolute",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Activate",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Add",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Confirm action",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Confirm address",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Confirm creation fee",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Confirm mosaic",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Confirm multisig fee",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Confirm namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Confirm payload",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Confirm properties",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Confirm rental fee",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Confirm transfer of",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Convert account to multisig account?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Cosign transaction for",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " cosignatory",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Create mosaic",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Create namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Deactivate",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Decrease",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Description",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "Divisibility and levy cannot be shown for unknown mosaics",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Encrypted",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Final confirm",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "immutable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Increase",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Initial supply",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Initiate transaction for",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Levy divisibility",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Levy fee",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Confirm mosaic levy fee of",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Levy mosaic",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Levy namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Levy recipient",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Levy type",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Modify supply for",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Modify the number of cosignatories by ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "mutable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "of",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "percentile",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} raw units",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " remote harvesting?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Remove",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Set minimum cosignatories to ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Sign this transaction\nand pay {0}\nfor network fee?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Supply change",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} supply by {1} whole units?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Transferable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "under namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Unencrypted",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Unknown mosaic!",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Event kind: {0}",
"passphrase__access_wallet": {
"Bolt": "Access Passphrase wallet?",
### core/translations/es.json
@@ -652,222 +652,6 @@
"device_name__title": "Nombre dispositivo",
"entropy__send": "¿Quieres enviar la entropía?",
"entropy__title_confirm": "Confirmar entropía",
- "eos__about_to_sign_template": {
- "Bolt": "Estás a punto de firmar {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Nombre de acción",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Datos arbitrarios",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Comprar RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Bytes",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Cancelar voto",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Checksum",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Código",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Contrato",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Creador",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Eliminar autorización",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Vincular autorización",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Memo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Nombre",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NETO",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Nueva cuenta",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Propietario",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Padre",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Pagador",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Permiso",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Destinatario",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Reembolso",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Requisito",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Vender RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Remitente",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Umbral",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "Para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Transferencia",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Tipo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Desvincular autorización",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Actualizar auth",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Votar por productores",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Votar por proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Votante",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Todas EVMs",
"ethereum__approve": {
"Bolt": "Aprobar",
@@ -1461,312 +1245,6 @@
"monero__wanna_export_watchkey": "¿Quieres exportar las credenciales de solo lectura?",
"monero__wanna_start_refresh": "¿Quieres iniciar \nla actualización?",
"monero__wanna_sync_key_images": "¿Quieres\nsincronizar imágenes clave?",
- "nem__absolute": {
- "Bolt": "absoluto",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Activar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Añadir",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Confirmar acción",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Confirmar dirección",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Confirmar comisión de creación",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Confirmar mosaico",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Confirmar comisión multi-firma",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Confirmar espacio de nombres",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Confirmar payload",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Confirmar propiedades",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Confirmar comisión de alquiler",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Confirmar transferencia de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "¿Convertir la cuenta en una cuenta multi-firma?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Co-firmar transacción para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " cofirmante",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Crear mosaico",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Crear espacio de nombres",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Desactivar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Disminuir",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Descripción",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "La divisibilidad y la comisión no se pueden mostrar para mosaicos desconocidos",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Cifrado",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Confirmación final",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "no modificable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Aumentar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Suministro inicial",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Iniciar transacción para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Divisibilidad de la comisión",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Comisión de tasa",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Confirmar comisión de tasa de mosaico de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Mosaico de comisión",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Espacio de nombre de la comisión",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Receptor de la comisión",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Tipo de comisión",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Modificar suministro para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Modificar número de cofirmantes en ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "modificable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "percentil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} unidades sin procesar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " cosecha remota?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Eliminar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Definir mínimo de cofirmantes en ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "¿Firmar esta transacción\ny pagar {0}\npor la comisión de red?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Cambio de suministro",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "¿{0} suministro en {1} unidades completas?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Transferible",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "bajo el espacio de nombres",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Sin cifrar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Mosaico desconocido.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Tipo de evento: {0}",
"passphrase__access_wallet": {
"Bolt": "¿Acceder a la Billetera con passphrase?",
### core/translations/fr.json
@@ -752,222 +752,6 @@
"Delizia": "Confirmer l'entropie",
"Eckhart": "Confirmer l'entropie"
},
- "eos__about_to_sign_template": {
- "Bolt": "Vous êtes sur le point de signer {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Nom de l'action",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Données arbitraires",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Acheter de la RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Octets",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Annuler le vote",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Checksum",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Code",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Contrat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Créateur",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Supprimer l'autorisation",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Lier auth.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Mémo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Nom",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NET",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Nouveau compte",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Propriétaire",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Parent",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Payeur",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Permissions",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Destinataire",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Rembourser",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Exigence",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Vendre de la RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Expéditeur",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Seuil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "À",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Transfert",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Type",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Dissocier l'autorisation",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Mettre à jour l'autorisation",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Voter pour les producteurs",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Voter pour le mandataire",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Votant",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Tous les EVM",
"ethereum__approve": {
"Bolt": "Approuver",
@@ -1611,312 +1395,6 @@
"monero__wanna_export_watchkey": "Voulez-vous vraiment exporter les identifiants en lecture seule ?",
"monero__wanna_start_refresh": "Voulez-vous vraiment\ndémarrer l'actualisation ?",
"monero__wanna_sync_key_images": "Voulez-vous vraiment\nsynchroniser les images clés ?",
- "nem__absolute": {
- "Bolt": "absolu(e)(s)",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Activer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Ajouter",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Confirmer action",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Confirmer adresse",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Confirmer les frais de création",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Confirmer la mosaïque",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Confirmer les frais de multi-signature",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Confirmer l'espace de noms",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Confirmer la payload",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Confirmer les propriétés",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Confirmer les frais de location",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Confirmer le transfert de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Convertir le compte en compte multisig ?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Cosigner la transaction pour",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " cosignataire",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Créer une mosaïque",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Créer un espace de noms",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Désactiver",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Diminuer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Description",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "La divisibilité et la commission ne peuvent pas être affichés pour les mosaïques inconnues.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Chiffré",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Confirmation finale",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "non modifiable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Augmenter",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Offre initiale",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Initier une transaction pour",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Divisibilité de la commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Confirmer la commission de la mosaïque de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Mosaïque de la commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Espace de noms de la commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Bénéficiaire de la commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Type de commission",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Modifier l'offre pour",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Modifier le nombre de cosignataires de ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "modifiable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "percentile",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} unités brutes",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " récolte à distance ?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Supprimer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Définir le nombre min de cosignataires à ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Signer cette transaction\net payer {0}\nde frais de réseau ?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Modification de l'offre",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} l'offre de {1} unités entières ?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Transférable",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "sous l'espace de noms",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Non chiffré(e)(s)",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Mosaïque inconnue !",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Type d'événement : {0}",
"passphrase__access_wallet": {
"Bolt": "Accéder à la Passphrase du portefeuille ?",
### core/translations/id.json
@@ -611,222 +611,6 @@
"device_name__title": "Nama perangkat",
"entropy__send": "Anda yakin ingin mengirim entropi?",
"entropy__title_confirm": "Konfirmasi entropi",
- "eos__about_to_sign_template": {
- "Bolt": "Anda akan menandatangani {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Nama Tindakan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Data arbitrer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Beli RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Byte",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Batalkan suara",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Checksum",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Kode",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Kontrak",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Pembuat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Hapus otorisasi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Tautkan otorisasi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Memo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Nama",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NET",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Akun baru",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Pemilik",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Induk",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Pembayar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Izin",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Penerima",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Refund",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Persyaratan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Jual RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Pengirim",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Ambang batas",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "Ke",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Transfer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Jenis",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Batalkan tautan otorisasi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Pebarui otorisasi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Pilih produsen",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Pilih proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Pemilih",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Semua EVM",
"ethereum__approve": {
"Bolt": "Setujui",
@@ -1410,312 +1194,6 @@
"monero__wanna_export_watchkey": "Anda yakin ingin mengekspor kredensial watch-only?",
"monero__wanna_start_refresh": "Anda yakin ingin memulai\npemuatan ulang?",
"monero__wanna_sync_key_images": "Anda yakin ingin sync\nkey image?",
- "nem__absolute": {
- "Bolt": "absolut",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Aktifkan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Tambahkan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Konfirmasi tindakan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Konfirmasi alamat",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Konfirmasi biaya pembuatan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Konfirmasi mosaic",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Konfirmasi biaya multisig",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Konfirmasi namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Konfirmasi payload",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Konfirmasi properti",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Konfirmasi biaya sewa",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Konfirmasi transfer",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Konversi akun ke akun multisig?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Tandatangani transaksi untuk",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " penjamin",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Buat mosaic",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Buat namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Nonaktifkan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Kurangi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Deskripsi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "Divisibilitas dan levy tidak dapat ditampilkan untuk mosaic yang tidak dikenal",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Terenkripsi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Konfirmasi akhir",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "imutabel",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Tingkatkan",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Persediaan awal",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Mulai transaksi untuk",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Divisibilitas levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Biaya levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Konfirmasi biaya levy mosaic sebesar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Mosaic levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Namespace levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Penerima levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Jenis levy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Atur suplai untuk",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Atur jumlah penjamin sebesar ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "mutabel",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "dari",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "persentil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} unit mentah",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " panen jarak jauh?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Hapus",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Atur jumlah minimum penjamin ke ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Tandatangani transaksi ini\ndan bayar {0}\nuntuk biaya jaringan?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Perubahan suplai",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} suplai sebesar {1} unit utuh?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Transferabel",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "di bawah namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Tidak terenkripsi",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Mosaic tidak dikenal!",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Jenis peristiwa: {0}",
"passphrase__access_wallet": {
"Bolt": "Akses Dompet passphrase?",
### core/translations/pt.json
@@ -662,222 +662,6 @@
"device_name__title": "Nome do dispositivo",
"entropy__send": "Deseja mesmo enviar entropia?",
"entropy__title_confirm": "Confirmar entropia",
- "eos__about_to_sign_template": {
- "Bolt": "Você está prestes a assinar {0}.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__action_name": {
- "Bolt": "Nome da ação",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__arbitrary_data": {
- "Bolt": "Dados arbitrários",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__buy_ram": {
- "Bolt": "Comprar RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__bytes": {
- "Bolt": "Bytes",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cancel_vote": {
- "Bolt": "Cancelar voto",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__checksum": {
- "Bolt": "Soma de verificação",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__code": {
- "Bolt": "Código",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__contract": {
- "Bolt": "Contrato",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__cpu": {
- "Bolt": "CPU",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__creator": {
- "Bolt": "Criador",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__delete_auth": {
- "Bolt": "Excluir autorização",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__link_auth": {
- "Bolt": "Vincular autorização",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__memo": {
- "Bolt": "Memo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__name": {
- "Bolt": "Nome",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__net": {
- "Bolt": "NET",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__new_account": {
- "Bolt": "Nova conta",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__owner": {
- "Bolt": "Proprietário",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__parent": {
- "Bolt": "Pai hierárquico",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__payer": {
- "Bolt": "Pagador",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__permission": {
- "Bolt": "Permissão",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__proxy": {
- "Bolt": "Proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__receiver": {
- "Bolt": "Destinatário",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__refund": {
- "Bolt": "Reembolso",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__requirement": {
- "Bolt": "Requisito",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sell_ram": {
- "Bolt": "Vender RAM",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__sender": {
- "Bolt": "Remetente",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__threshold": {
- "Bolt": "Limiar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__to": {
- "Bolt": "Para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__transfer": {
- "Bolt": "Transferência",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__type": {
- "Bolt": "Tipo",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__unlink_auth": {
- "Bolt": "Desvincular autorização",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__update_auth": {
- "Bolt": "Atualizar autorização",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_producers": {
- "Bolt": "Votar para produtores",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__vote_for_proxy": {
- "Bolt": "Votar para proxy",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "eos__voter": {
- "Bolt": "Eleitor",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"ethereum__all_evms": "Todas EVMs",
"ethereum__approve": {
"Bolt": "Aprovar",
@@ -1496,312 +1280,6 @@
"monero__wanna_export_watchkey": "Deseja mesmo exportar credenciais de somente exibição?",
"monero__wanna_start_refresh": "Deseja mesmo\niniciar atualização?",
"monero__wanna_sync_key_images": "Deseja mesmo\nsincronizar imagens de chave?",
- "nem__absolute": {
- "Bolt": "absoluto",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__activate": {
- "Bolt": "Ativar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__add": {
- "Bolt": "Adicionar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_action": {
- "Bolt": "Confirmar ação",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_address": {
- "Bolt": "Confirmar endereço",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_creation_fee": {
- "Bolt": "Confirmar taxa de criação",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_mosaic": {
- "Bolt": "Confirmar mosaico",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_multisig_fee": {
- "Bolt": "Confirmar taxa multiass.",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_namespace": {
- "Bolt": "Confirmar namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_payload": {
- "Bolt": "Confirmar payload",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_properties": {
- "Bolt": "Confirmar propriedades",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_rental_fee": {
- "Bolt": "Confirmar taxa de aluguel",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__confirm_transfer_of": {
- "Bolt": "Confirmar transferência de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__convert_account_to_multisig": {
- "Bolt": "Converter conta para conta multiassinatura?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosign_transaction_for": {
- "Bolt": "Coassinar transação para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__cosignatory": {
- "Bolt": " cossignatário",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_mosaic": {
- "Bolt": "Criar mosaico",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__create_namespace": {
- "Bolt": "Criar namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__deactivate": {
- "Bolt": "Desativar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__decrease": {
- "Bolt": "Diminuir",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__description": {
- "Bolt": "Descrição",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__divisibility_and_levy_cannot_be_shown": {
- "Bolt": "A divisibilidade e a cobrança não podem ser mostradas para mosaicos desconhecidos",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__encrypted": {
- "Bolt": "Encriptado",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__final_confirm": {
- "Bolt": "Confirmação final",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__immutable": {
- "Bolt": "imutável",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__increase": {
- "Bolt": "Aumentar",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initial_supply": {
- "Bolt": "Oferta inicial",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__initiate_transaction_for": {
- "Bolt": "Iniciar transação para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_divisibility": {
- "Bolt": "Divisibilidade da cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee": {
- "Bolt": "Taxa de cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_fee_of": {
- "Bolt": "Confirmar taxa de cobrança do mosaico de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_mosaic": {
- "Bolt": "Mosaico da cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_namespace": {
- "Bolt": "Namespace da cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_recipient": {
- "Bolt": "Destinatário da cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__levy_type": {
- "Bolt": "Tipo da cobrança",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_supply_for": {
- "Bolt": "Modificar a oferta para",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__modify_the_number_of_cosignatories_by": {
- "Bolt": "Modificar o número de cossignatários em ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__mutable": {
- "Bolt": "mutável",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__of": {
- "Bolt": "de",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__percentile": {
- "Bolt": "percentil",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__raw_units_template": {
- "Bolt": "{0} unidades brutas",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remote_harvesting": {
- "Bolt": " colheita remota?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__remove": {
- "Bolt": "Remover",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__set_minimum_cosignatories_to": {
- "Bolt": "Definir cossignatários mínimos em ",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__sign_tx_fee_template": {
- "Bolt": "Assinar esta transação\ne pagar {0}\npela taxa de rede?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_change": {
- "Bolt": "Mudança de oferta",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__supply_units_template": {
- "Bolt": "{0} a oferta em {1} unidades inteiras?",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__transferable": {
- "Bolt": "Transferível",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__under_namespace": {
- "Bolt": "sob o namespace",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unencrypted": {
- "Bolt": "Não encriptado",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
- "nem__unknown_mosaic": {
- "Bolt": "Mosaico desconhecido!",
- "Caesar": "",
- "Delizia": "",
- "Eckhart": ""
- },
"nostr__event_kind_template": "Tipo de evento: {0}",
"passphrase__access_wallet": {
"Bolt": "Acessar Carteira com frase secreta?",
### core/translations/signatures.json
@@ -1,8 +1,8 @@
{
"current": {
- "merkle_root": "2d478dda34a15e064100afd1b5b81cc22cb374e828cf7295a7cf8b87101756be",
- "datetime": "2026-11-12T08:11:32.624181+00:00",
- "commit": "6c4950dd6d099eb851a76a0f581394fbabf1b2e7"
+ "merkle_root": "449b99ca3a03588876ac1c90e00d7a0b24ea5637b04395c02297c9154dae2e0f",
+ "datetime": "2026-11-12T14:07:52.394269+00:00",
+ "commit": "034acf2b70fe9ecc6a494700b9ead5df7b30be08"
},
"history": [
{
### crypto/LICENSE
@@ -55,7 +55,7 @@ ranges as they appear in the individual file headers.
appears in the source.
Copyright (c) 2017 Saleem Rashid
- base32.c, base32.h, hasher.c, hasher.h, nem.c, nem.h, rc4.c, rc4.h
+ base32.c, base32.h, hasher.c, hasher.h, rc4.c, rc4.h
Dusan Klinec (2018)
monero/monero.h, monero/serialize.c, monero/serialize.h, monero/xmr.c,
### crypto/Makefile
@@ -85,7 +85,6 @@ CFLAGS += -I..
CFLAGS += -DUSE_ETHEREUM=1
CFLAGS += -DUSE_KECCAK=1
CFLAGS += -DUSE_MONERO=1
-CFLAGS += -DUSE_NEM=1
CFLAGS += -DUSE_CARDANO=1
CFLAGS += -DUSE_INSECURE_PRNG=1
CFLAGS += -DAES_128
@@ -120,7 +119,6 @@ SRCS += chacha_drbg.c
SRCS += groestl.c
SRCS += chacha20poly1305/chacha20poly1305.c chacha20poly1305/chacha_merged.c chacha20poly1305/poly1305-donna.c chacha20poly1305/rfc7539.c
SRCS += rc4.c
-SRCS += nem.c
SRCS += segwit_addr.c cash_addr.c
SRCS += memzero.c
SRCS += shamir.c
### crypto/bip32.c
@@ -43,9 +43,6 @@
#if USE_KECCAK
#include "ed25519-donna/ed25519-keccak.h"
#endif
-#if USE_NEM
-#include "nem.h"
-#endif
#include "memzero.h"
const curve_info ed25519_info = {
@@ -523,120 +520,6 @@ int hdnode_get_ethereum_pubkeyhash(const HDNode *node, uint8_t *pubkeyhash) {
}
#endif
-#if USE_NEM
-int hdnode_get_nem_address(HDNode *node, uint8_t version, char *address) {
- if (node->curve != &ed25519_keccak_info) {
- return 0;
- }
-
- if (hdnode_fill_public_key(node) != 0) {
- return 0;
- }
-
- return nem_get_address(&node->public_key[1], version, address);
-}
-
-int hdnode_get_nem_shared_key(const HDNode *node,
- const ed25519_public_key peer_public_key,
- const uint8_t *salt, ed25519_public_key mul,
- uint8_t *shared_key) {
- if (node->curve != &ed25519_keccak_info) {
- return 0;
- }
-
- // sizeof(ed25519_public_key) == SHA3_256_DIGEST_LENGTH
- if (mul == NULL) mul = shared_key;
-
- if (ed25519_scalarmult_keccak(mul, node->private_key, peer_public_key)) {
- return 0;
- }
-
- for (size_t i = 0; i < 32; i++) {
- shared_key[i] = mul[i] ^ salt[i];
- }
-
- keccak_256(shared_key, 32, shared_key);
- return 1;
-}
-
-int hdnode_nem_encrypt(const HDNode *node, const ed25519_public_key public_key,
- const uint8_t *iv_immut, const uint8_t *salt,
- const uint8_t *payload, size_t size, uint8_t *buffer) {
- uint8_t last_block[AES_BLOCK_SIZE] = {0};
- uint8_t remainder = size % AES_BLOCK_SIZE;
-
- // Round down to last whole block
- size -= remainder;
- // Copy old last block
- memcpy(last_block, &payload[size], remainder);
- // Pad new last block with number of missing bytes
- memset(&last_block[remainder], AES_BLOCK_SIZE - remainder,
- AES_BLOCK_SIZE - remainder);
-
- // the IV gets mutated, so we make a copy not to touch the original
- uint8_t iv[AES_BLOCK_SIZE] = {0};
- memcpy(iv, iv_immut, AES_BLOCK_SIZE);
-
- uint8_t shared_key[SHA3_256_DIGEST_LENGTH] = {0};
- if (!hdnode_get_nem_shared_key(node, public_key, salt, NULL, shared_key)) {
- return 0;
- }
-
- aes_encrypt_ctx ctx = {0};
-
- int succ = 0;
- int ret = aes_encrypt_key256(shared_key, &ctx);
- memzero(shared_key, sizeof(shared_key));
-
- if (ret != EXIT_SUCCESS) {
- goto cleanup;
- }
-
- if (aes_cbc_encrypt(payload, buffer, size, iv, &ctx) != EXIT_SUCCESS) {
- goto cleanup;
- }
-
- if (aes_cbc_encrypt(last_block, &buffer[size], sizeof(last_block), iv,
- &ctx) != EXIT_SUCCESS) {
- goto cleanup;
- }
-
- succ = 1;
-cleanup:
- memzero(&ctx, sizeof(ctx));
- return succ;
-}
-
-int hdnode_nem_decrypt(const HDNode *node, const ed25519_public_key public_key,
- uint8_t *iv, const uint8_t *salt, const uint8_t *payload,
- size_t size, uint8_t *buffer) {
- uint8_t shared_key[SHA3_256_DIGEST_LENGTH] = {0};
-
- if (!hdnode_get_nem_shared_key(node, public_key, salt, NULL, shared_key)) {
- return 0;
- }
-
- aes_decrypt_ctx ctx = {0};
-
- int succ = 0;
- int ret = aes_decrypt_key256(shared_key, &ctx);
- memzero(shared_key, sizeof(shared_key));
-
- if (ret != EXIT_SUCCESS) {
- goto cleanup;
- }
-
- if (aes_cbc_decrypt(payload, buffer, size, iv, &ctx) != EXIT_SUCCESS) {
- goto cleanup;
- }
-
- succ = 1;
-cleanup:
- memzero(&ctx, sizeof(ctx));
- return succ;
-}
-#endif
-
// msg is a data to be signed
// msg_len is the message length
int hdnode_sign(HDNode *node, const uint8_t *msg, uint32_t msg_len,
### crypto/bip32.h
@@ -98,20 +98,6 @@ int hdnode_fill_public_key(HDNode *node);
int hdnode_get_ethereum_pubkeyhash(const HDNode *node, uint8_t *pubkeyhash);
#endif
-#if USE_NEM
-int hdnode_get_nem_address(HDNode *node, uint8_t version, char *address);
-int hdnode_get_nem_shared_key(const HDNode *node,
- const ed25519_public_key peer_public_key,
- const uint8_t *salt, ed25519_public_key mul,
- uint8_t *shared_key);
-int hdnode_nem_encrypt(const HDNode *node, const ed25519_public_key public_key,
- const uint8_t *iv, const uint8_t *salt,
- const uint8_t *payload, size_t size, uint8_t *buffer);
-int hdnode_nem_decrypt(const HDNode *node, const ed25519_public_key public_key,
- uint8_t *iv, const uint8_t *salt, const uint8_t *payload,
- size_t size, uint8_t *buffer);
-#endif
-
int hdnode_sign(HDNode *node, const uint8_t *msg, uint32_t msg_len,
HasherType hasher_sign, uint8_t *sig, uint8_t *pby,
int (*is_canonical)(uint8_t by, uint8_t sig[64]));
### crypto/fuzzer/fuzzer.c
@@ -49,7 +49,6 @@
#include "hmac_drbg.h"
#include "memzero.h"
#include "monero/monero.h"
-#include "nem.h"
#include "nist256p1.h"
#include "pbkdf2.h"
#include "rand.h"
@@ -589,51 +588,6 @@ int fuzz_xmr_serialize_varint(void) {
return 0;
}
-// arbitrarily chosen maximum size
-#define NEM_VALIDATE_ADDRESS_MAX_INPUT_LEN 128
-
-int fuzz_nem_validate_address(void) {
- if (fuzzer_length < 1 || fuzzer_length > NEM_VALIDATE_ADDRESS_MAX_INPUT_LEN) {
- return FUZZ_MARK_UNINTERESTING;
- }
-
- uint8_t network = fuzzer_input(1)[0];
- size_t raw_inlen = fuzzer_length + 1;
- char *in_buffer = malloc(raw_inlen);
- RETURN_IF_NULL(in_buffer);
-
- // mutate the buffer
- memcpy(in_buffer, fuzzer_input(raw_inlen - 1), raw_inlen - 1);
- // force null-termination
- in_buffer[raw_inlen - 1] = 0;
-
- nem_validate_address(in_buffer, network);
-
- free(in_buffer);
- return 0;
-}
-
-int fuzz_nem_get_address(void) {
- unsigned char ed25519_public_key_fuzz[32] = {0};
- uint8_t version = 0;
-
- // TODO switch to < comparison?
- if (fuzzer_length != (sizeof(ed25519_public_key_fuzz) + sizeof(version))) {
- return FUZZ_MARK_UNINTERESTING;
- }
-
- char address[NEM_ADDRESS_SIZE + 1] = {0};
-
- memcpy(ed25519_public_key_fuzz, fuzzer_input(sizeof(ed25519_public_key_fuzz)),
- sizeof(ed25519_public_key_fuzz));
- memcpy(&version, fuzzer_input(sizeof(version)), sizeof(version));
-
- nem_get_address(ed25519_public_key_fuzz, version, address);
-
- check_msan(&address, sizeof(address));
- return 0;
-}
-
int fuzz_xmr_get_subaddress_secret_key(void) {
bignum256modm m = {0};
uint32_t major = 0;
@@ -1502,12 +1456,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case 7:
target_result = fuzz_xmr_serialize_varint();
break;
- case 8:
- target_result = fuzz_nem_validate_address();
- break;
- case 9:
- target_result = fuzz_nem_get_address();
- break;
case 10:
target_result = fuzz_xmr_get_subaddress_secret_key();
break;
### crypto/nem.c
@@ -1,508 +0,0 @@
-/**
- * Copyright (c) 2017 Saleem Rashid
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
- * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "nem.h"
-
-#include <string.h>
-
-#include "base32.h"
-#include "consteq.h"
-#include "ed25519-donna/ed25519-keccak.h"
-#include "memzero.h"
-#include "ripemd160.h"
-#include "sha3.h"
-
-#define CAN_WRITE(NEEDED) ((ctx->offset + (NEEDED)) <= ctx->size)
-
-#define SERIALIZE_U32(DATA) \
- do { \
- if (!nem_write_u32(ctx, (DATA))) return false; \
- } while (0)
-#define SERIALIZE_U64(DATA) \
- do { \
- if (!nem_write_u64(ctx, (DATA))) return false; \
- } while (0)
-#define SERIALIZE_TAGGED(DATA, LENGTH) \
- do { \
- if (!nem_write_tagged(ctx, (DATA), (LENGTH))) return false; \
- } while (0)
-
-const char *nem_network_name(uint8_t network) {
- switch (network) {
- case NEM_NETWORK_MAINNET:
- return "NEM Mainnet";
- case NEM_NETWORK_TESTNET:
- return "NEM Testnet";
- case NEM_NETWORK_MIJIN:
- return "Mijin";
- default:
- return NULL;
- }
-}
-
-static inline bool nem_write_checked(nem_transaction_ctx *ctx,
- const uint8_t *data, uint32_t length) {
- if (!CAN_WRITE(length)) {
- return false;
- }
-
- memcpy(&ctx->buffer[ctx->offset], data, length);
- ctx->offset += length;
- return true;
-}
-
-static inline bool nem_write_u32(nem_transaction_ctx *ctx, uint32_t data) {
- if (!CAN_WRITE(4)) {
- return false;
- }
-
- ctx->buffer[ctx->offset++] = (data >> 0) & 0xff;
- ctx->buffer[ctx->offset++] = (data >> 8) & 0xff;
- ctx->buffer[ctx->offset++] = (data >> 16) & 0xff;
- ctx->buffer[ctx->offset++] = (data >> 24) & 0xff;
-
- return true;
-}
-
-static inline bool nem_write_u64(nem_transaction_ctx *ctx, uint64_t data) {
- SERIALIZE_U32((data >> 0) & 0xffffffff);
- SERIALIZE_U32((data >> 32) & 0xffffffff);
-
- return true;
-}
-
-static inline bool nem_write_tagged(nem_transaction_ctx *ctx,
- const uint8_t *data, uint32_t length) {
- SERIALIZE_U32(length);
-
- return nem_write_checked(ctx, data, length);
-}
-
-static inline bool nem_write_mosaic_str(nem_transaction_ctx *ctx,
- const char *name, const char *value) {
- uint32_t name_length = strlen(name);
- uint32_t value_length = strlen(value);
-
- SERIALIZE_U32(sizeof(uint32_t) + name_length + sizeof(uint32_t) +
- value_length);
- SERIALIZE_TAGGED((const uint8_t *)name, name_length);
- SERIALIZE_TAGGED((const uint8_t *)value, value_length);
-
- return true;
-}
-
-static inline bool nem_write_mosaic_bool(nem_transaction_ctx *ctx,
- const char *name, bool value) {
- return nem_write_mosaic_str(ctx, name, value ? "true" : "false");
-}
-
-static inline bool nem_write_mosaic_u64(nem_transaction_ctx *ctx,
- const char *name, uint64_t value) {
- char buffer[21] = {0};
-
- if (bn_format_uint64(value, NULL, NULL, 0, 0, false, 0, buffer,
- sizeof(buffer)) == 0) {
- return false;
- }
-
- return nem_write_mosaic_str(ctx, name, buffer);
-}
-
-void nem_get_address_raw(const ed25519_public_key public_key, uint8_t version,
- uint8_t *address) {
- uint8_t hash[SHA3_256_DIGEST_LENGTH] = {0};
-
- /* 1. Perform 256-bit Sha3 on the public key */
- keccak_256(public_key, sizeof(ed25519_public_key), hash);
-
- /* 2. Perform 160-bit Ripemd of hash resulting from step 1. */
- ripemd160(hash, SHA3_256_DIGEST_LENGTH, &address[1]);
-
- /* 3. Prepend version byte to Ripemd hash (either 0x68 or 0x98) */
- address[0] = version;
-
- /* 4. Perform 256-bit Sha3 on the result, take the first four bytes as a
- * checksum */
- keccak_256(address, 1 + RIPEMD160_DIGEST_LENGTH, hash);
-
- /* 5. Concatenate output of step 3 and the checksum from step 4 */
- memcpy(&address[1 + RIPEMD160_DIGEST_LENGTH], hash, 4);
-
- memzero(hash, sizeof(hash));
-}
-
-bool nem_get_address(const ed25519_public_key public_key, uint8_t version,
- char *address) {
- uint8_t pubkeyhash[NEM_ADDRESS_SIZE_RAW] = {0};
-
- nem_get_address_raw(public_key, version, pubkeyhash);
-
- char *ret = base32_encode(pubkeyhash, sizeof(pubkeyhash), address,
- NEM_ADDRESS_SIZE + 1, BASE32_ALPHABET_RFC4648);
-
- memzero(pubkeyhash, sizeof(pubkeyhash));
- return (ret != NULL);
-}
-
-bool nem_validate_address_raw(const uint8_t *address, uint8_t network) {
- if (!nem_network_name(network) || address[0] != network) {
- return false;
- }
-
- uint8_t hash[SHA3_256_DIGEST_LENGTH] = {0};
-
- keccak_256(address, 1 + RIPEMD160_DIGEST_LENGTH, hash);
- bool valid = consteq(&address[1 + RIPEMD160_DIGEST_LENGTH], hash, 4);
-
- memzero(hash, sizeof(hash));
- return valid;
-}
-
-bool nem_validate_address(const char *address, uint8_t network) {
- uint8_t pubkeyhash[NEM_ADDRESS_SIZE_RAW] = {0};
-
- if (strlen(address) != NEM_ADDRESS_SIZE) {
- return false;
- }
-
- uint8_t *ret = base32_decode(address, NEM_ADDRESS_SIZE, pubkeyhash,
- sizeof(pubkeyhash), BASE32_ALPHABET_RFC4648);
- bool valid = (ret != NULL) && nem_validate_address_raw(pubkeyhash, network);
-
- memzero(pubkeyhash, sizeof(pubkeyhash));
- return valid;
-}
-
-void nem_transaction_start(nem_transaction_ctx *ctx,
- const ed25519_public_key public_key, uint8_t *buffer,
- size_t size) {
- memcpy(ctx->public_key, public_key, sizeof(ctx->public_key));
-
- ctx->buffer = buffer;
- ctx->offset = 0;
- ctx->size = size;
-}
-
-size_t nem_transaction_end(nem_transaction_ctx *ctx,
- const ed25519_secret_key private_key,
- ed25519_signature signature) {
- if (private_key != NULL && signature != NULL) {
- ed25519_sign_keccak(ctx->buffer, ctx->offset, private_key, signature);
- }
-
- return ctx->offset;
-}
-
-bool nem_transaction_write_common(nem_transaction_ctx *ctx, uint32_t type,
- uint32_t version, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee,
- uint32_t deadline) {
- SERIALIZE_U32(type);
- SERIALIZE_U32(version);
- SERIALIZE_U32(timestamp);
- SERIALIZE_TAGGED(signer, sizeof(ed25519_public_key));
- SERIALIZE_U64(fee);
- SERIALIZE_U32(deadline);
-
- return true;
-}
-
-bool nem_transaction_create_transfer(nem_transaction_ctx *ctx, uint8_t network,
- uint32_t timestamp,
- const ed25519_public_key signer,
- uint64_t fee, uint32_t deadline,
- const char *recipient, uint64_t amount,
- const uint8_t *payload, uint32_t length,
- bool encrypted, uint32_t mosaics) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- if (!payload) {
- length = 0;
- }
-
- bool ret =
- nem_transaction_write_common(ctx, NEM_TRANSACTION_TYPE_TRANSFER,
- (uint32_t)network << 24 | (mosaics ? 2 : 1),
- timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- SERIALIZE_TAGGED((const uint8_t *)recipient, NEM_ADDRESS_SIZE);
- SERIALIZE_U64(amount);
-
- if (length) {
- SERIALIZE_U32(sizeof(uint32_t) + sizeof(uint32_t) + length);
- SERIALIZE_U32(encrypted ? 0x02 : 0x01);
- SERIALIZE_TAGGED(payload, length);
- } else {
- SERIALIZE_U32(0);
- }
-
- if (mosaics) {
- SERIALIZE_U32(mosaics);
- }
-
- return true;
-}
-
-bool nem_transaction_write_mosaic(nem_transaction_ctx *ctx,
- const char *namespace, const char *mosaic,
- uint64_t quantity) {
- size_t namespace_length = strlen(namespace);
- size_t mosaic_length = strlen(mosaic);
- size_t identifier_length =
- sizeof(uint32_t) + namespace_length + sizeof(uint32_t) + mosaic_length;
-
- SERIALIZE_U32(sizeof(uint32_t) + sizeof(uint64_t) + identifier_length);
- SERIALIZE_U32(identifier_length);
- SERIALIZE_TAGGED((const uint8_t *)namespace, namespace_length);
- SERIALIZE_TAGGED((const uint8_t *)mosaic, mosaic_length);
- SERIALIZE_U64(quantity);
-
- return true;
-}
-
-bool nem_transaction_create_multisig(nem_transaction_ctx *ctx, uint8_t network,
- uint32_t timestamp,
- const ed25519_public_key signer,
- uint64_t fee, uint32_t deadline,
- const nem_transaction_ctx *inner) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(ctx, NEM_TRANSACTION_TYPE_MULTISIG,
- (uint32_t)network << 24 | 1,
- timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- SERIALIZE_TAGGED(inner->buffer, inner->offset);
-
- return true;
-}
-
-bool nem_transaction_create_multisig_signature(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const nem_transaction_ctx *inner) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE, (uint32_t)network << 24 | 1,
- timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- char address[NEM_ADDRESS_SIZE + 1] = {0};
- nem_get_address(inner->public_key, network, address);
-
- uint8_t hash[SHA3_256_DIGEST_LENGTH] = {0};
- keccak_256(inner->buffer, inner->offset, hash);
-
- SERIALIZE_U32(sizeof(uint32_t) + SHA3_256_DIGEST_LENGTH);
- SERIALIZE_TAGGED(hash, SHA3_256_DIGEST_LENGTH);
- SERIALIZE_TAGGED((const uint8_t *)address, NEM_ADDRESS_SIZE);
-
- return true;
-}
-
-bool nem_transaction_create_provision_namespace(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *parent, const char *rental_sink,
- uint64_t rental_fee) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE,
- (uint32_t)network << 24 | 1, timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- if (parent) {
- SERIALIZE_TAGGED((const uint8_t *)rental_sink, NEM_ADDRESS_SIZE);
- SERIALIZE_U64(rental_fee);
- SERIALIZE_TAGGED((const uint8_t *)namespace, strlen(namespace));
- SERIALIZE_TAGGED((const uint8_t *)parent, strlen(parent));
- } else {
- SERIALIZE_TAGGED((const uint8_t *)rental_sink, NEM_ADDRESS_SIZE);
- SERIALIZE_U64(rental_fee);
- SERIALIZE_TAGGED((const uint8_t *)namespace, strlen(namespace));
- SERIALIZE_U32(0xffffffff);
- }
-
- return true;
-}
-
-bool nem_transaction_create_mosaic_creation(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *mosaic, const char *description,
- uint32_t divisibility, uint64_t supply, bool mutable_supply,
- bool transferable, uint32_t levy_type, uint64_t levy_fee,
- const char *levy_address, const char *levy_namespace,
- const char *levy_mosaic, const char *creation_sink, uint64_t creation_fee) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_MOSAIC_CREATION, (uint32_t)network << 24 | 1,
- timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- size_t namespace_length = strlen(namespace);
- size_t mosaic_length = strlen(mosaic);
- size_t identifier_length =
- sizeof(uint32_t) + namespace_length + sizeof(uint32_t) + mosaic_length;
-
- // This length will be rewritten later on
- nem_transaction_ctx state = {0};
- memcpy(&state, ctx, sizeof(state));
-
- SERIALIZE_U32(0);
- SERIALIZE_TAGGED(signer, sizeof(ed25519_public_key));
- SERIALIZE_U32(identifier_length);
- SERIALIZE_TAGGED((const uint8_t *)namespace, namespace_length);
- SERIALIZE_TAGGED((const uint8_t *)mosaic, mosaic_length);
- SERIALIZE_TAGGED((const uint8_t *)description, strlen(description));
- SERIALIZE_U32(4); // Number of properties
-
- if (!nem_write_mosaic_u64(ctx, "divisibility", divisibility)) return false;
- if (!nem_write_mosaic_u64(ctx, "initialSupply", supply)) return false;
- if (!nem_write_mosaic_bool(ctx, "supplyMutable", mutable_supply))
- return false;
- if (!nem_write_mosaic_bool(ctx, "transferable", transferable)) return false;
-
- if (levy_type) {
- size_t levy_namespace_length = strlen(levy_namespace);
- size_t levy_mosaic_length = strlen(levy_mosaic);
- size_t levy_identifier_length = sizeof(uint32_t) + levy_namespace_length +
- sizeof(uint32_t) + levy_mosaic_length;
-
- SERIALIZE_U32(sizeof(uint32_t) + sizeof(uint32_t) + NEM_ADDRESS_SIZE +
- sizeof(uint32_t) + levy_identifier_length + sizeof(uint64_t));
- SERIALIZE_U32(levy_type);
- SERIALIZE_TAGGED((const uint8_t *)levy_address, NEM_ADDRESS_SIZE);
- SERIALIZE_U32(levy_identifier_length);
- SERIALIZE_TAGGED((const uint8_t *)levy_namespace, levy_namespace_length);
- SERIALIZE_TAGGED((const uint8_t *)levy_mosaic, levy_mosaic_length);
- SERIALIZE_U64(levy_fee);
- } else {
- SERIALIZE_U32(0);
- }
-
- // Rewrite length
- nem_write_u32(&state, ctx->offset - state.offset - sizeof(uint32_t));
-
- SERIALIZE_TAGGED((const uint8_t *)creation_sink, NEM_ADDRESS_SIZE);
- SERIALIZE_U64(creation_fee);
-
- return true;
-}
-
-bool nem_transaction_create_mosaic_supply_change(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *mosaic, uint32_t type, uint64_t delta) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE,
- (uint32_t)network << 24 | 1, timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- size_t namespace_length = strlen(namespace);
- size_t mosaic_length = strlen(mosaic);
- size_t identifier_length =
- sizeof(uint32_t) + namespace_length + sizeof(uint32_t) + mosaic_length;
-
- SERIALIZE_U32(identifier_length);
- SERIALIZE_TAGGED((const uint8_t *)namespace, namespace_length);
- SERIALIZE_TAGGED((const uint8_t *)mosaic, mosaic_length);
- SERIALIZE_U32(type);
- SERIALIZE_U64(delta);
-
- return true;
-}
-
-bool nem_transaction_create_aggregate_modification(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- uint32_t modifications, bool relative_change) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION,
- (uint32_t)network << 24 | (relative_change ? 2 : 1), timestamp, signer,
- fee, deadline);
- if (!ret) return false;
-
- SERIALIZE_U32(modifications);
-
- return true;
-}
-
-bool nem_transaction_write_cosignatory_modification(
- nem_transaction_ctx *ctx, uint32_t type,
- const ed25519_public_key cosignatory) {
- SERIALIZE_U32(sizeof(uint32_t) + sizeof(uint32_t) +
- sizeof(ed25519_public_key));
- SERIALIZE_U32(type);
- SERIALIZE_TAGGED(cosignatory, sizeof(ed25519_public_key));
-
- return true;
-}
-
-bool nem_transaction_write_minimum_cosignatories(nem_transaction_ctx *ctx,
- int32_t relative_change) {
- SERIALIZE_U32(sizeof(uint32_t));
- SERIALIZE_U32((uint32_t)relative_change);
-
- return true;
-}
-
-bool nem_transaction_create_importance_transfer(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- uint32_t mode, const ed25519_public_key remote) {
- if (!signer) {
- signer = ctx->public_key;
- }
-
- bool ret = nem_transaction_write_common(
- ctx, NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER,
- (uint32_t)network << 24 | 1, timestamp, signer, fee, deadline);
- if (!ret) return false;
-
- SERIALIZE_U32(mode);
- SERIALIZE_TAGGED(remote, sizeof(ed25519_public_key));
-
- return true;
-}
### crypto/nem.h
@@ -1,157 +0,0 @@
-/**
- * Copyright (c) 2017 Saleem Rashid
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
- * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __NEM_H__
-#define __NEM_H__
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include "bip32.h"
-#include "ed25519-donna/ed25519.h"
-
-#define NEM_LEVY_PERCENTILE_DIVISOR 4
-#define NEM_MAX_DIVISIBILITY 6
-#define NEM_MAX_SUPPLY 9000000000
-
-#define NEM_NETWORK_MAINNET 0x68
-#define NEM_NETWORK_TESTNET 0x98
-#define NEM_NETWORK_MIJIN 0x60
-
-#define NEM_ADDRESS_SIZE 40
-#define NEM_ADDRESS_SIZE_RAW 25
-
-#define NEM_TRANSACTION_TYPE_TRANSFER 0x0101
-#define NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER 0x0801
-#define NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION 0x1001
-#define NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE 0x1002
-#define NEM_TRANSACTION_TYPE_MULTISIG 0x1004
-#define NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE 0x2001
-#define NEM_TRANSACTION_TYPE_MOSAIC_CREATION 0x4001
-#define NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE 0x4002
-
-#define NEM_SALT_SIZE sizeof(ed25519_public_key)
-
-#define NEM_ENCRYPTED_SIZE(size) \
- (((size) + AES_BLOCK_SIZE) / AES_BLOCK_SIZE * AES_BLOCK_SIZE)
-#define NEM_ENCRYPTED_PAYLOAD_SIZE(size) \
- (AES_BLOCK_SIZE + NEM_SALT_SIZE + NEM_ENCRYPTED_SIZE(size))
-
-#define _NEM_PADDING_SIZE(buffer, size) ((buffer)[(size) - 1])
-#define NEM_PADDING_SIZE(buffer, size) \
- (_NEM_PADDING_SIZE(buffer, size) > (size) ? (size) \
- : _NEM_PADDING_SIZE(buffer, size))
-
-#define NEM_DECRYPTED_SIZE(buffer, size) \
- ((size) - NEM_PADDING_SIZE(buffer, size))
-
-typedef struct {
- ed25519_public_key public_key;
- uint8_t *buffer;
- size_t offset;
- size_t size;
-} nem_transaction_ctx;
-
-const char *nem_network_name(uint8_t network);
-
-void nem_get_address_raw(const ed25519_public_key public_key, uint8_t version,
- uint8_t *address);
-bool nem_get_address(const ed25519_public_key public_key, uint8_t version,
- char *address);
-
-bool nem_validate_address_raw(const uint8_t *address, uint8_t network);
-bool nem_validate_address(const char *address, uint8_t network);
-
-void nem_transaction_start(nem_transaction_ctx *ctx,
- const ed25519_public_key public_key, uint8_t *buffer,
- size_t size);
-size_t nem_transaction_end(nem_transaction_ctx *ctx,
- const ed25519_secret_key private_key,
- ed25519_signature signature);
-
-bool nem_transaction_write_common(nem_transaction_ctx *context, uint32_t type,
- uint32_t version, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee,
- uint32_t deadline);
-
-bool nem_transaction_create_transfer(nem_transaction_ctx *context,
- uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer,
- uint64_t fee, uint32_t deadline,
- const char *recipient, uint64_t amount,
- const uint8_t *payload, uint32_t length,
- bool encrypted, uint32_t mosaics);
-
-bool nem_transaction_write_mosaic(nem_transaction_ctx *ctx,
- const char *namespace, const char *mosaic,
- uint64_t quantity);
-
-bool nem_transaction_create_multisig(nem_transaction_ctx *ctx, uint8_t network,
- uint32_t timestamp,
- const ed25519_public_key signer,
- uint64_t fee, uint32_t deadline,
- const nem_transaction_ctx *inner);
-
-bool nem_transaction_create_multisig_signature(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const nem_transaction_ctx *inner);
-
-bool nem_transaction_create_provision_namespace(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *parent, const char *rental_sink,
- uint64_t rental_fee);
-
-bool nem_transaction_create_mosaic_creation(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *mosaic, const char *description,
- uint32_t divisibility, uint64_t supply, bool mutable_supply,
- bool transferable, uint32_t levy_type, uint64_t levy_fee,
- const char *levy_address, const char *levy_namespace,
- const char *levy_mosaic, const char *creation_sink, uint64_t creation_fee);
-
-bool nem_transaction_create_mosaic_supply_change(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- const char *namespace, const char *mosaic, uint32_t type, uint64_t delta);
-
-bool nem_transaction_create_aggregate_modification(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- uint32_t modifications, bool relative_change);
-
-bool nem_transaction_write_cosignatory_modification(
- nem_transaction_ctx *ctx, uint32_t type,
- const ed25519_public_key cosignatory);
-
-bool nem_transaction_write_minimum_cosignatories(nem_transaction_ctx *ctx,
- int32_t relative_change);
-
-bool nem_transaction_create_importance_transfer(
- nem_transaction_ctx *ctx, uint8_t network, uint32_t timestamp,
- const ed25519_public_key signer, uint64_t fee, uint32_t deadline,
- uint32_t mode, const ed25519_public_key remote);
-
-#endif
### crypto/options.h
@@ -82,11 +82,6 @@
#define USE_ETHEREUM 0
#endif
-// support NEM operations
-#ifndef USE_NEM
-#define USE_NEM 0
-#endif
-
// support MONERO operations
#ifndef USE_MONERO
#define USE_MONERO 0
### crypto/tests/test_check.c
@@ -68,7 +68,6 @@
#include "hmac_drbg.h"
#include "memzero.h"
#include "monero/monero.h"
-#include "nem.h"
#include "nist256p1.h"
#include "noise_kk1.h"
#include "noise_xxpsk3.h"
@@ -9094,1178 +9093,6 @@ START_TEST(test_rsk_address) {
}
END_TEST
-// test vectors from
-// https://raw.githubusercontent.com/NemProject/nem-test-vectors/master/1.test-keys.dat
-START_TEST(test_nem_address) {
- static const struct {
- const char *private_key;
- const char *public_key;
- const char *address;
- } tests[] = {
- {
- "575dbb3062267eff57c970a336ebbc8fbcfe12c5bd3ed7bc11eb0481d7704ced",
- "c5f54ba980fcbb657dbaaa42700539b207873e134d2375efeab5f1ab52f87844",
- "NDD2CT6LQLIYQ56KIXI3ENTM6EK3D44P5JFXJ4R4",
- },
- {
- "5b0e3fa5d3b49a79022d7c1e121ba1cbbf4db5821f47ab8c708ef88defc29bfe",
- "96eb2a145211b1b7ab5f0d4b14f8abc8d695c7aee31a3cfc2d4881313c68eea3",
- "NABHFGE5ORQD3LE4O6B7JUFN47ECOFBFASC3SCAC",
- },
- {
- "738ba9bb9110aea8f15caa353aca5653b4bdfca1db9f34d0efed2ce1325aeeda",
- "2d8425e4ca2d8926346c7a7ca39826acd881a8639e81bd68820409c6e30d142a",
- "NAVOZX4HDVOAR4W6K4WJHWPD3MOFU27DFHC7KZOZ",
- },
- {
- "e8bf9bc0f35c12d8c8bf94dd3a8b5b4034f1063948e3cc5304e55e31aa4b95a6",
- "4feed486777ed38e44c489c7c4e93a830e4c4a907fa19a174e630ef0f6ed0409",
- "NBZ6JK5YOCU6UPSSZ5D3G27UHAPHTY5HDQMGE6TT",
- },
- {
- "c325ea529674396db5675939e7988883d59a5fc17a28ca977e3ba85370232a83",
- "83ee32e4e145024d29bca54f71fa335a98b3e68283f1a3099c4d4ae113b53e54",
- "NCQW2P5DNZ5BBXQVGS367DQ4AHC3RXOEVGRCLY6V",
- },
- {
- "a811cb7a80a7227ae61f6da536534ee3c2744e3c7e4b85f3e0df3c6a9c5613df",
- "6d34c04f3a0e42f0c3c6f50e475ae018cfa2f56df58c481ad4300424a6270cbb",
- "NA5IG3XFXZHIPJ5QLKX2FBJPEZYPMBPPK2ZRC3EH",
- },
- {
- "9c66de1ec77f4dfaaebdf9c8bc599ca7e8e6f0bc71390ffee2c9dd3f3619242a",
- "a8fefd72a3b833dc7c7ed7d57ed86906dac22f88f1f4331873eb2da3152a3e77",
- "NAABHVFJDBM74XMJJ52R7QN2MTTG2ZUXPQS62QZ7",
- },
- {
- "c56bc16ecf727878c15e24f4ae68569600ac7b251218a44ef50ce54175776edc",
- "c92f761e6d83d20068fd46fe4bd5b97f4c6ba05d23180679b718d1f3e4fb066e",
- "NCLK3OLMHR3F2E3KSBUIZ4K5PNWUDN37MLSJBJZP",
- },
- {
- "9dd73599283882fa1561ddfc9be5830b5dd453c90465d3fe5eeb646a3606374e",
- "eaf16a4833e59370a04ccd5c63395058de34877b48c17174c71db5ed37b537ed",
- "ND3AHW4VTI5R5QE5V44KIGPRU5FBJ5AFUCJXOY5H",
- },
- {
- "d9639dc6f49dad02a42fd8c217f1b1b4f8ce31ccd770388b645e639c72ff24fa",
- "0f74a2f537cd9c986df018994dde75bdeee05e35eb9fe27adf506ca8475064f7",
- "NCTZ4YAP43ONK3UYTASQVNDMBO24ZHJE65F3QPYE",
- },
- {
- "efc1992cd50b70ca55ac12c07aa5d026a8b78ffe28a7dbffc9228b26e02c38c1",
- "2ebff201255f6cf948c78f528658b99a7c13ac791942fa22d59af610558111f5",
- "NDQ2TMCMXBSFPZQPE2YKH6XLC24HD6LUMN6Z4GIC",
- },
- {
- "143a815e92e43f3ed1a921ee48cd143931b88b7c3d8e1e981f743c2a5be3c5ba",
- "419ed11d48730e4ae2c93f0ea4df853b8d578713a36dab227517cf965861af4e",
- "NA32IDDW2C53BDSBJNFL3Z6UU3J5CJZJMCZDXCF4",
- },
- {
- "bc1a082f5ac6fdd3a83ade211e5986ac0551bad6c7da96727ec744e5df963e2a",
- "a160e6f9112233a7ce94202ed7a4443e1dac444b5095f9fecbb965fba3f92cac",
- "NADUCEQLC3FTGB25GTA5HOUTB53CBVQNVOIP7NTJ",
- },
- {
- "4e47b4c6f4c7886e49ec109c61f4af5cfbb1637283218941d55a7f9fe1053f72",
- "fbb91b16df828e21a9802980a44fc757c588bc1382a4cea429d6fa2ae0333f56",
- "NBAF3BFLLPWH33MYE6VUPP5T6DQBZBKIDEQKZQOE",
- },
- {
- "efc4389da48ce49f85365cfa578c746530e9eac42db1b64ec346119b1becd347",
- "2232f24dda0f2ded3ecd831210d4e8521a096b50cadd5a34f3f7083374e1ec12",
- "NBOGTK2I2ATOGGD7ZFJHROG5MWL7XCKAUKSWIVSA",
- },
- {
- "bdba57c78ca7da16a3360efd13f06276284db8c40351de7fcd38ba0c35ac754d",
- "c334c6c0dad5aaa2a0d0fb4c6032cb6a0edd96bf61125b5ea9062d5a00ee0eee",
- "NCLERTEFYXKLK7RA4MVACEFMXMK3P7QMWTM7FBW2",
- },
- {
- "20694c1ec3c4a311bcdb29ed2edc428f6d4f9a4c429ad6a5bf3222084e35695f",
- "518c4de412efa93de06a55947d11f697639443916ec8fcf04ebc3e6d17d0bd93",
- "NB5V4BPIJHXVONO7UGMJDPFARMFA73BOBNOOYCOV",
- },
- {
- "e0d4f3760ac107b33c22c2cac24ab2f520b282684f5f66a4212ff95d926323ce",
- "b3d16f4ead9de67c290144da535a0ed2504b03c05e5f1ceb8c7863762f786857",
- "NC4PBAO5TPCAVQKBVOC4F6DMZP3CFSQBU46PSKBD",
- },
- {
- "efa9afc617412093c9c7a7c211a5332dd556f941e1a88c494ec860608610eea2",
- "7e7716e4cebceb731d6f1fd28676f34888e9a0000fcfa1471db1c616c2ddf559",
- "NCFW2LPXIWLBWAQN2QVIWEOD7IVDO3HQBD2OU56K",
- },
- {
- "d98499b3db61944684ce06a91735af4e14105338473fcf6ebe2b0bcada3dfd21",
- "114171230ad6f8522a000cdc73fbc5c733b30bb71f2b146ccbdf34499f79a810",
- "NCUKWDY3J3THKQHAKOK5ALF6ANJQABZHCH7VN6DP",
- },
- };
-
- HDNode node;
- ed25519_secret_key private_key;
- uint8_t chain_code[32];
- char address[41];
-
- for (size_t i = 0; i < (sizeof(tests) / sizeof(*tests)); i++) {
- nem_private_key(tests[i].private_key, private_key);
-
- ck_assert(hdnode_from_xprv(0, 0, chain_code, private_key,
- ED25519_KECCAK_NAME, &node));
-
- ck_assert(hdnode_get_nem_address(&node, NEM_NETWORK_MAINNET, address));
- ck_assert_str_eq(address, tests[i].address);
-
- ck_assert_mem_eq(&node.public_key[1], fromhex(tests[i].public_key), 32);
- }
-}
-END_TEST
-
-// test vectors from
-// https://raw.githubusercontent.com/NemProject/nem-test-vectors/master/3.test-derive.dat
-START_TEST(test_nem_derive) {
- static const struct {
- const char *salt;
- const char *private_key;
- const char *public_key;
- const char *mul;
- const char *shared_key;
- } tests[] = {
- {
- "ad63ac08f9afc85eb0bf4f8881ca6eaa0215924c87aa2f137d56109bb76c6f98",
- "e8857f8e488d4e6d4b71bcd44bb4cff49208c32651e1f6500c3b58cafeb8def6",
- "9d8e5f200b05a2638fb084a375408cabd6d5989590d96e3eea5f2cb34668178e",
- "a8352060ba5718745ee4d78b9df564e0fbe13f50d50ab15a8dd524159d81d18b",
- "990a5f611c65fbcde735378bdec38e1039c5466503511e8c645bbe42795c752b",
- },
- {
- "96104f0a28f9cca40901c066cd435134662a3b053eb6c8df80ee0d05dc941963",
- "d7f67b5f52cbcd1a1367e0376a8eb1012b634acfcf35e8322bae8b22bb9e8dea",
- "9735c92d150dcee0ade5a8d1822f46a4db22c9cda25f33773ae856fe374a3e8a",
- "ea14d521d83328dba70982d42094300585818cc2da609fdb1f73bb32235576ff",
- "b498aa21d4ba4879ea9fd4225e93bacc760dcd9c119f8f38ab0716457d1a6f85",
- },
- {
- "d8f94a0bbb1de80aea17aab42e2ffb982e73fc49b649a318479e951e392d8728",
- "d026ddb445fb3bbf3020e4b55ed7b5f9b7fd1278c34978ca1a6ed6b358dadbae",
- "d19e6beca3b26b9d1abc127835ebeb7a6c19c33dec8ec472e1c4d458202f4ec8",
- "0d561f54728ad837ae108ec66c2ece2bb3b26041d3ee9b77fdc6d36d9ebfb2e3",
- "d012afe3d1d932304e613c91545bf571cf2c7281d6cafa8e81393a551f675540",
- },
- {
- "3f8c969678a8abdbfb76866a142c284a6f01636c1c1607947436e0d2c30d5245",
- "c522b38c391d1c3fa539cc58802bc66ac34bb3c73accd7f41b47f539bedcd016",
- "ea5b6a0053237f7712b1d2347c447d3e83e0f2191762d07e1f53f8eb7f2dfeaa",
- "23cccd3b63a9456e4425098b6df36f28c8999461a85e4b2b0c8d8f53c62c9ea9",
- "7e27efa50eed1c2ac51a12089cbab6a192624709c7330c016d5bc9af146584c1",
- },
- {
- "e66415c58b981c7f1f2b8f45a42149e9144616ff6de49ff83d97000ac6f6f992",
- "2f1b82be8e65d610a4e588f000a89a733a9de98ffc1ac9d55e138b3b0a855da0",
- "65aeda1b47f66c978a4a41d4dcdfbd8eab5cdeb135695c2b0c28f54417b1486d",
- "43e5b0a5cc8146c03ac63e6f8cf3d8825a9ca1ed53ea4a88304af4ddf5461b33",
- "bb4ab31c334e55d378937978c90bb33779b23cd5ef4c68342a394f4ec8fa1ada",
- },
- {
- "58487c9818c9d28ddf97cb09c13331941e05d0b62bf4c35ee368de80b552e4d1",
- "f3869b68183b2e4341307653e8f659bd7cd20e37ea5c00f5a9e203a8fa92359a",
- "c7e4153a18b4162f5c1f60e1ba483264aa5bb3f4889dca45b434fcd30b9cf56f",
- "5ae9408ab3156b8828c3e639730bd5e5db93d7afe2cee3fcda98079316c5bb3a",
- "0224d85ae8f17bfe127ec24b8960b7639a0dbde9c8c39a0575b939448687bb14",
- },
- {
- "ad66f3b654844e53d6fb3568134fae75672ba63868c113659d3ca58c2c39d24f",
- "d38f2ef8dfdc7224fef596130c3f4ff68ac83d3f932a56ee908061466ac28572",
- "d0c79d0340dc66f0a895ce5ad60a933cf6be659569096fb9d4b81e5d32292372",
- "1ea22db4708ed585ab541a4c70c3069f8e2c0c1faa188ddade3efaa53c8329f6",
- "886a7187246934aedf2794748deadfe038c9fd7e78d4b7be76c5a651440ac843",
- },
- {
- "eed48604eab279c6ad8128aa83483a3da0928271a4cae1a5745671284e1fb89d",
- "e2342a8450fc0adfa0ea2fbd0b1d28f100f0a3a905a3da29de34d1353afa7df7",
- "d2dbe07e0f2dbc3dbb01c70092e3c4247d12827ddcd8d76534fd740a65c30de2",
- "4c4b30eb6a2bfa17312f5729b4212cb51c2eee8fbfaea82a0e957ca68f4f6a30",
- "dcae613ac5641ff9d4c3ca58632245f93b0b8657fe4d48bac7b062cc53dd21ad",
- },
- {
- "f35b315287b268c0d0b386fb5b31810f65e1c4497cffae24527f69a3abac3884",
- "049016230dbef7a14a439e5ab2f6d12e78cb8df127db4e0c312673b3c361e350",
- "1b3b1925a8a535cd7d78725d25298f45bba8ca3dee2cdaabf14241c9b51b37c4",
- "04c9685dae1f8eb72a6438f24a87dc83a56d79c9024edf7e01aa1ae34656f29e",
- "b48469d0428c223b93cd1fe34bb2cafd3fb78a8fa15f98f89f1ac9c0ce7c9001",
- },
- {
- "d6cf082c5d9a96e756a94a2e27703138580a7c7c1af505c96c3abf7ab6802e1d",
- "67cd02b0b8b0adcf6fdd4d4d64a1f4193ced68bb8605d0ec941a62011326d140",
- "a842d5127c93a435e4672dcadd9fccbfd0e9208c79c5404848b298597eccdbdb",
- "d5c6bd6d81b99659d0bafe91025b6ecf73b16c6b07931cf44718b13f00fde3f7",
- "8aa160795b587f4be53aa35d26e9b618b4cd6ec765b523bc908e53c258ca8fd4",
- },
- {
- "dda32c91c95527a645b00dd05d13f0b98ed612a726ce5f5221431430b7660944",
- "eba026f92a8ffb5e95060a22e15d597fe838a99a0b2bbcb423c933b6bc718c50",
- "7dbaf9c313a1ff9128c54d6cd740c7d0cc46bca588e7910d438dd619ca4fd69a",
- "5bb20a145de83ba27a0c261e1f54bfd7dcea61888fc2eebbe6166876f7b000b8",
- "3a96f152ad8bf355cccb307e4a40108aa17f8e925522a2b5bb0b3f1e1a262914",
- },
- {
- "63c500acbd4ff747f7dadde7d3286482894ac4d7fe68f396712bca29879aa65c",
- "9663cd3c2030a5fe4a3ea3cc9a1d182b3a63ade68616aaeb4caf40b495f6f227",
- "b1e7d9070ac820d986d839b79f7aa594dcf708473529dad87af8682cc6197374",
- "1f7a97584d8db9f395b9ac4447de4b33c5c1f5020187cd4996286a49b07eb8a7",
- "4d2a974ec12dcf525b5654d31053460850c3092648b7e15598b7131d2930e9fb",
- },
- {
- "91f340961029398cc8bcd906388044a6801d24328efdf919d8ed0c609862a073",
- "45a588500d00142e2226231c01fd11ac6f842ab6a85872418f5b6a1999f8bd98",
- "397233c96069b6f4a57d6e93f759fa327222eaef71fc981afa673b248206df3f",
- "062123ef9782e3893f7b2e1d557b4ecce92b9f9aa8577e76380f228b75152f84",
- "235848cb04230a16d8978aa7c19fe7fbff3ebe29389ea6eb24fb8bc3cb50afc6",
- },
- {
- "46120b4da6ba4eb54fb65213cfef99b812c86f7c42a1de1107f8e8c12c0c3b6b",
- "cc19a97a99ad71ce348bcf831c0218e6a1f0a8d52186cabe6298b56f24e640f9",
- "c54631bb62f0f9d86b3301fcb2a671621e655e578c95504af5f78da83f7fec4f",
- "ab73cc20c75260ff3a7cefea8039291d4d15114a07a9250375628cca32225bb6",
- "70040a360b6a2dfa881272ef4fa6616e2e8fcc45194fa2a21a1eef1160271cd5",
- },
- {
- "f0a69ded09f1d731ab9561d0c3a40b7ef30bcb2bf60f92beccd8734e2441403d",
- "ea732822a381c46a7ac9999bf5ef85e16b7460b26aaf6c1a1c6ffa8c8c82c923",
- "110decbff79c382b1e60af4259564a3c473087792350b24fca98ae9a74ba9dd9",
- "81bdee95aecdcf821a9d682f79056f1abdcf1245d2f3b55244447881a283e0d4",
- "1bc29d4470ccf97d4e35e8d3cd4b12e3ebf2cb0a82425d35984aeedf7ad0f6f9",
- },
- {
- "e79cf4536fb1547e57626c0f1a87f71a396fdfb985b00731c0c2876a00645eda",
- "04213fc02b59c372e3e7f53faa71a2f73b31064102cb6fc8b68432ba7cdf7eb4",
- "ca1c750aaed53bc30dac07d0696ed86bcd7cdbbcbd3d15bb90d90cb5c6117bac",
- "c68cd0872a42a3a64e8a229ef7fcad3d722047d5af966f7dda4d4e32d0d57203",
- "bfdd3d07563d966d95afe4b8abea4b567265fceea8c4ecddb0946256c33e07b2",
- },
- {
- "81a40db4cddaf076e0206bd2b0fa7470a72cc456bad34aa3a0469a4859f286be",
- "52156799fd86cc63345cdbffd65ef4f5f8df0ffd9906a40af5f41d269bbcff5d",
- "54d61aa0b0b17a87f1376fe89cd8cd6b314827c1f1b9e5e7b20e7a7eee2a8335",
- "4553fb2cab8555068c32f86ceb692bbf1c2beeaf21627ef1b1be57344b52eea8",
- "55096b6710ade3bbe38702458ee13faa10c24413261bc076f17675dcbf2c4ee6",
- },
- {
- "d28e4a9e6832a3a4dad014a2bf1f666f01093cbba8b9ad4d1dcad3ea10cb42b9",
- "8ca134404c8fa199b0c72cb53cfa0adcf196dfa560fb521017cce5cbace3ba59",
- "3a6c39a1e5f9f550f1debedd9a0bc84210cce5f9834797db8f14122bf5817e45",
- "eb632ca818b4f659630226a339a3ce536b31c8e1e686fea8da3760e8abc20b8e",
- "9fbb3fbaf1cd54ee0cd90685f59b082545983f1f662ef701332379306a6ad546",
- },
- {
- "f9c4bfad9e2a3d98c44c12734881a6f217d6c9523cc210772fad1297993454b4",
- "b85960fcadda8d0a0960559b6b7818a0d8d4574b4e928b17c9b498fa9ffab4ef",
- "6a1d0ef23ce0b40a7077ecb7b7264945054e3bdb58ee25e1b0ee8b3e19dbfcdc",
- "bb145dddcb75074a6a03249fca1aa7d6fa9549e3ed965f138ca5e7071b7878f2",
- "87d3faea4a98e41009eb8625611ea0fc12094c295af540c126c14a0f55afa76e",
- },
- {
- "656df4789a369d220aceb7b318517787d27004ecccedea019d623bcb2d79f5ff",
- "acf83e30afb2a5066728ec5d93564c08abe5e68e3a2a2ff953bdcf4d44f9da06",
- "bdda65efe56d7890286aada1452f62f85ba157d0b4621ba641de15d8d1c9e331",
- "958beef5dc6babc6de383c32ad7dd3a6d6eb8bb3236ed5558eec0f9eb31e5458",
- "6f6d4ee36d9d76e462c9635adfbb6073134a276cfc7cb86762004ec47197afa0",
- },
- };
-
- HDNode node;
- ed25519_secret_key private_key;
- uint8_t chain_code[32];
- ed25519_public_key public_key, mul;
- uint8_t shared_key[SHA3_256_DIGEST_LENGTH];
-
- for (size_t i = 0; i < (sizeof(tests) / sizeof(*tests)); i++) {
- nem_private_key(tests[i].private_key, private_key);
-
- ck_assert(hdnode_from_xprv(0, 0, chain_code, private_key,
- ED25519_KECCAK_NAME, &node));
- memcpy(public_key, fromhex(tests[i].public_key), 32);
-
- ck_assert(hdnode_get_nem_shared_key(
- &node, public_key, fromhex(tests[i].salt), mul, shared_key));
- ck_assert_mem_eq(mul, fromhex(tests[i].mul), sizeof(mul));
- ck_assert_mem_eq(shared_key, fromhex(tests[i].shared_key),
- sizeof(shared_key));
- }
-}
-END_TEST
-
-// test vectors from
-// https://raw.githubusercontent.com/NemProject/nem-test-vectors/master/4.test-cipher.dat
-START_TEST(test_nem_cipher) {
- static const struct {
- const char *private_key;
- const char *public_key;
- const char *salt;
- const char *iv;
- const char *input;
- const char *output;
- } tests[] = {
- {
- "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "83616c67f076d356fd1288a6e0fd7a60488ba312a3adf0088b1b33c7655c3e6a",
- "a73ff5c32f8fd055b09775817a6a3f95",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "70815da779b1b954d7a7f00c16940e9917a0412a06a444b539bf147603eef87f",
- },
- {
- "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "703ce0b1d276b10eef35672df03234385a903460db18ba9d4e05b3ad31abb284",
- "91246c2d5493867c4fa3e78f85963677",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "564b2f40d42c0efc1bd6f057115a5abd1564cae36d7ccacf5d825d38401aa894",
- },
- {
- "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "b22e8e8e7373ac31ca7f0f6eb8b93130aba5266772a658593f3a11792e7e8d92",
- "9f8e33d82374dad6aac0e3dbe7aea704",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "7cab88d00a3fc656002eccbbd966e1d5d14a3090d92cf502cdbf843515625dcf",
- },
- {
- "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "af646c54cd153dffe453b60efbceeb85c1e95a414ea0036c4da94afb3366f5d9",
- "6acdf8e01acc8074ddc807281b6af888",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "aa70543a485b63a4dd141bb7fd78019092ac6fad731e914280a287c7467bae1a",
- },
- {
- "3140f94c79f249787d1ec75a97a885980eb8f0a7d9b7aa03e7200296e422b2b6",
- "57a70eb553a7b3fd621f0dba6abf51312ea2e2a2a1e19d0305516730f4bcbd21",
- "d9c0d386636c8a024935c024589f9cd39e820a16485b14951e690a967830e269",
- "f2e9f18aeb374965f54d2f4e31189a8f",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "33d97c216ea6498dfddabf94c2e2403d73efc495e9b284d9d90aaff840217d25",
- },
- {
- "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "06c227baac1ae3b0b1dc583f4850f13f9ba5d53be4a98fa5c3ea16217847530d",
- "3735123e78c44895df6ea33fa57e9a72",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "d5b5d66ba8cee0eb7ecf95b143fa77a46d6de13749e12eff40f5a7e649167ccb",
- },
- {
- "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "92f55ba5bc6fc2f23e3eedc299357c71518e36ba2447a4da7a9dfe9dfeb107b5",
- "1cbc4982e53e370052af97ab088fa942",
- "86ddb9e713a8ebf67a51830eff03b837e147c20d75e67b2a54aa29e98c",
- "d48ef1ef526d805656cfc932aff259eadb17aa3391dde1877a722cba31d935b2",
- },
- {
- "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "10f15a39ba49866292a43b7781bc71ca8bbd4889f1616461caf056bcb91b0158",
- "c40d531d92bfee969dce91417346c892",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "e6d75afdb542785669b42198577c5b358d95397d71ec6f5835dca46d332cc08dbf73"
- "ea790b7bcb169a65719c0d55054c",
- },
- {
- "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "9c01ed42b219b3bbe1a43ae9d7af5c1dd09363baacfdba8f4d03d1046915e26e",
- "059a35d5f83249e632790015ed6518b9",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "5ef11aadff2eccee8b712dab968fa842eb770818ec0e6663ed242ea8b6bbc1c66d62"
- "85ee5b5f03d55dfee382fb4fa25d",
- },
- {
- "d5c0762ecea2cd6b5c56751b58debcb32713aab348f4a59c493e38beb3244f3a",
- "66a35941d615b5644d19c2a602c363ada8b1a8a0dac3682623852dcab4afac04",
- "bc1067e2a7415ea45ff1ca9894338c591ff15f2e57ae2789ae31b9d5bea0f11e",
- "8c73f0d6613898daeefa3cf8b0686d37",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "6d220213b1878cd40a458f2a1e6e3b48040455fdf504dcd857f4f2ca1ad642e3a44f"
- "c401d04e339d302f66a9fad3d919",
- },
- {
- "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "cf4a21cb790552165827b678ca9695fcaf77566d382325112ff79483455de667",
- "bfbf5482e06f55b88bdd9e053b7eee6e",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "1198a78c29c215d5c450f7b8513ead253160bc9fde80d9cc8e6bee2efe9713cf5a09"
- "d6293c41033271c9e8c22036a28b",
- },
- {
- "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "eba5eae8aef79114082c3e70baef95bb02edf13b3897e8be7a70272962ef8838",
- "af9a56da3da18e2fbd2948a16332532b",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "1062ab5fbbdee9042ad35bdadfd3047c0a2127fe0f001da1be1b0582185edfc9687b"
- "e8d68f85795833bb04af9cedd3bb",
- },
- {
- "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "518f8dfd0c138f1ffb4ea8029db15441d70abd893c3d767dc668f23ba7770e27",
- "42d28307974a1b2a2d921d270cfce03b",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "005e49fb7c5da540a84b034c853fc9f78a6b901ea495aed0c2abd4f08f1a96f9ffef"
- "c6a57f1ac09e0aea95ca0f03ffd8",
- },
- {
- "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "582fdf58b53715c26e10ba809e8f2ab70502e5a3d4e9a81100b7227732ab0bbc",
- "91f2aad3189bb2edc93bc891e73911ba",
- "49de3cd5890e0cd0559f143807ff688ff62789b7236a332b7d7255ec0b4e73e6b3a"
- "4",
- "821a69cb16c57f0cb866e590b38069e35faec3ae18f158bb067db83a11237d29ab1e"
- "6b868b3147236a0958f15c2e2167",
- },
- {
- "9ef87ba8aa2e664bdfdb978b98bc30fb61773d9298e7b8c72911683eeff41921",
- "441e76d7e53be0a967181076a842f69c20fd8c0e3f0ce3aa421b490b059fe094",
- "a415b4c006118fb72fc37b2746ef288e23ac45c8ff7ade5f368a31557b6ac93a",
- "2b7c5f75606c0b8106c6489ea5657a9e",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "2781d5ee8ef1cb1596f8902b33dfae5045f84a987ca58173af5830dbce386062",
- },
- {
- "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "47e73ec362ea82d3a7c5d55532ad51d2cdf5316b981b2b2bd542b0efa027e8ea",
- "b2193f59030c8d05a7d3577b7f64dd33",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "3f43912db8dd6672b9996e5272e18c4b88fec9d7e8372db9c5f4709a4af1d86f",
- },
- {
- "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "aaa006c57b6d1e402650577fe9787d8d285f4bacd7c01f998be49c766f8860c7",
- "130304ddb9adc8870cf56bcae9487b7f",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "878cc7d8c0ef8dac0182a78eedc8080a402f59d8062a6b4ca8f4a74f3c3b3de7",
- },
- {
- "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "28dc7ccd6c2a939eef64b8be7b9ae248295e7fcd8471c22fa2f98733fea97611",
- "cb13890d3a11bc0a7433738263006710",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "e74ded846bebfa912fa1720e4c1415e6e5df7e7a1a7fedb5665d68f1763209a4",
- },
- {
- "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "79974fa2cad95154d0873902c153ccc3e7d54b17f2eeb3f29b6344cad9365a9a",
- "22123357979d20f44cc8eb0263d84e0e",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "eb14dec7b8b64d81a2ee4db07b0adf144d4f79a519bbf332b823583fa2d45405",
- },
- {
- "ed93c5a101ab53382ceee4f7e6b5aa112621d3bb9d18891509b1834ede235bcc",
- "5a5e14c633d7d269302849d739d80344ff14db51d7bcda86045723f05c4e4541",
- "3409a6f8c4dcd9bd04144eb67e55a98696b674735b01bf1196191f29871ef966",
- "a823a0965969380ea1f8659ea5fd8fdd",
- "24512b714aefd5cbc4bcc4ef44ce6c67ffc447c65460a6c6e4a92e85",
- "00a7eb708eae745847173f8217efb05be13059710aee632e3f471ac3c6202b51",
- },
- {
- "a73a0b2686f7d699c018b6b08a352856e556070caa329c26241aec889eefde10",
- "9b493403bee45ae6277430ef8d0c4163ffd81ace2db6c7821205da09a664a86c",
- "c25701b9b7328c4ac3d23223d10623bd527c0a98e38ae9c62fbc403c80ab20ae",
- "4b4ee0e4443779f3af429a749212f476",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "f39f7d66e0fde39ecdf58be2c0ef361a17cfd6843e310adbe0ec3118cd72800d",
- },
- {
- "a73a0b2686f7d699c018b6b08a352856e556070caa329c26241aec889eefde10",
- "9b493403bee45ae6277430ef8d0c4163ffd81ace2db6c7821205da09a664a86c",
- "31d18fdffc480310828778496ff817039df5d6f30bf6d9edd0b4396863d05f93",
- "418bcbdf52860a450bfacc96920d02cf",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "0e6ce9889fe7b3cd82794b0ae27c1f5985d2f2a1f398371a138f8db1df1f54de",
- },
- {
- "e2e4dee102fad0f47f60202269605589cd9cf70f816b34016796c74b766f3041",
- "c5ce283033a3255ae14d42dff1e4c18a224ac79d084b285123421b105ee654c9",
- "56b4c645f81dbfb6ba0c6d3f1626e1e5cd648eeb36562715f7cd7e9ea86a0d7f",
- "dc9bdce76d68d2e4d72267cf4e72b022",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "dc6f046c3008002041517a7c4f3ababe609cf02616fcccda39c075d1be4175f5",
- },
- {
- "e2e4dee102fad0f47f60202269605589cd9cf70f816b34016796c74b766f3041",
- "c5ce283033a3255ae14d42dff1e4c18a224ac79d084b285123421b105ee654c9",
- "df180b91986c8c7000792f96d1faa61e30138330430a402322be1855089b0e7f",
- "ccf9b77341c866465b474e2f4a3b1cf8",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "94e4ae89041437f39826704f02cb5d775226f34344635e592846417497a5020b",
- },
- {
- "e2e4dee102fad0f47f60202269605589cd9cf70f816b34016796c74b766f3041",
- "c5ce283033a3255ae14d42dff1e4c18a224ac79d084b285123421b105ee654c9",
- "a0eee7e84c76e63fdae6e938b43330775eaf17d260e40b98c9e6616b668102a7",
- "662c681cfec6f6d052ff0e2c1255f2c2",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "70bba3c48be9c75a144b1888ca3d21a6b21f52eec133981a024390a6a0ba36f9",
- },
- {
- "e2e4dee102fad0f47f60202269605589cd9cf70f816b34016796c74b766f3041",
- "c5ce283033a3255ae14d42dff1e4c18a224ac79d084b285123421b105ee654c9",
- "c6acd2d90eb782c3053b366680ffa0e148de81fea198c87bb643869fd97e5cb0",
- "908dc33ba80520f2f0f04e7890e3a3c0",
- "b6926d0ec82cec86c0d27ec9a33a0e0f",
- "f6efe1d76d270aac264aa35d03049d9ce63be1996d543aef00559219c8666f71",
- },
- };
-
- HDNode node;
- ed25519_secret_key private_key;
- uint8_t chain_code[32];
- ed25519_public_key public_key;
- uint8_t salt[sizeof(public_key)];
-
- uint8_t iv[AES_BLOCK_SIZE];
- uint8_t buffer[FROMHEX_MAXLEN];
-
- uint8_t input[FROMHEX_MAXLEN];
- uint8_t output[FROMHEX_MAXLEN];
-
- for (size_t i = 0; i < (sizeof(tests) / sizeof(*tests)); i++) {
- nem_private_key(tests[i].private_key, private_key);
-
- ck_assert(hdnode_from_xprv(0, 0, chain_code, private_key,
- ED25519_KECCAK_NAME, &node));
- memcpy(public_key, fromhex(tests[i].public_key), 32);
- memcpy(salt, fromhex(tests[i].salt), sizeof(salt));
-
- size_t input_size = strlen(tests[i].input) / 2;
- size_t output_size = strlen(tests[i].output) / 2;
-
- memcpy(input, fromhex(tests[i].input), input_size);
- memcpy(output, fromhex(tests[i].output), output_size);
-
- memcpy(iv, fromhex(tests[i].iv), sizeof(iv));
- ck_assert(hdnode_nem_encrypt(&node, public_key, iv, salt, input, input_size,
- buffer));
- ck_assert_uint_eq(output_size, NEM_ENCRYPTED_SIZE(input_size));
- ck_assert_mem_eq(buffer, output, output_size);
-
- memcpy(iv, fromhex(tests[i].iv), sizeof(iv));
- ck_assert(hdnode_nem_decrypt(&node, public_key, iv, salt, output,
- output_size, buffer));
- ck_assert_uint_eq(input_size, NEM_DECRYPTED_SIZE(buffer, output_size));
- ck_assert_mem_eq(buffer, input, input_size);
- }
-}
-END_TEST
-
-START_TEST(test_nem_transaction_transfer) {
- nem_transaction_ctx ctx;
-
- uint8_t buffer[1024], hash[SHA3_256_DIGEST_LENGTH];
-
- // http://bob.nem.ninja:8765/#/transfer/0acbf8df91e6a65dc56c56c43d65f31ff2a6a48d06fc66e78c7f3436faf3e74f
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "e59ef184a612d4c3c4d89b5950eb57262c69862b2f96e59c5043bf41765c482f"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_transfer(
- &ctx, NEM_NETWORK_TESTNET, 0, NULL, 0, 0,
- "TBGIMRE4SBFRUJXMH7DVF2IBY36L2EDWZ37GVSC4", 50000000000000, NULL, 0,
- false, 0));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "0acbf8df91e6a65dc56c56c43d65f31ff2a6a48d06fc66e78c7f3436faf3e74f"),
- sizeof(hash));
-
- // http://bob.nem.ninja:8765/#/transfer/3409d9ece28d6296d6d5e220a7e3cb8641a3fb235ffcbd20c95da64f003ace6c
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_transfer(
- &ctx, NEM_NETWORK_TESTNET, 14072100, NULL, 194000000, 14075700,
- "TBLOODPLWOWMZ2TARX4RFPOSOWLULHXMROBN2WXI", 3000000,
- (uint8_t *)"sending you 3 pairs of paddles\n", 31, false, 2));
-
- ck_assert(
- nem_transaction_write_mosaic(&ctx, "gimre.games.pong", "paddles", 2));
-
- ck_assert(nem_transaction_write_mosaic(&ctx, "nem", "xem", 44000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "3409d9ece28d6296d6d5e220a7e3cb8641a3fb235ffcbd20c95da64f003ace6c"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/transfer/e90e98614c7598fbfa4db5411db1b331d157c2f86b558fb7c943d013ed9f71cb
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "8d07f90fb4bbe7715fa327c926770166a11be2e494a970605f2e12557f66c9b9"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_transfer(
- &ctx, NEM_NETWORK_MAINNET, 0, NULL, 0, 0,
- "NBT3WHA2YXG2IR4PWKFFMO772JWOITTD2V4PECSB", 5175000000000,
- (uint8_t *)"Good luck!", 10, false, 0));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "e90e98614c7598fbfa4db5411db1b331d157c2f86b558fb7c943d013ed9f71cb"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/transfer/40e89160e6f83d37f7c82defc0afe2c1605ae8c919134570a51dd27ea1bb516c
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "f85ab43dad059b9d2331ddacc384ad925d3467f03207182e01296bacfb242d01"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_transfer(
- &ctx, NEM_NETWORK_MAINNET, 77229, NULL, 30000000, 80829,
- "NALICEPFLZQRZGPRIJTMJOCPWDNECXTNNG7QLSG3", 30000000,
- fromhex("4d9dcf9186967d30be93d6d5404ded22812dbbae7c3f0de5"
- "01bcd7228cba45bded13000eec7b4c6215fc4d3588168c92"
- "18167cec98e6977359153a4132e050f594548e61e0dc61c1"
- "53f0f53c5e65c595239c9eb7c4e7d48e0f4bb8b1dd2f5ddc"),
- 96, true, 0));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "40e89160e6f83d37f7c82defc0afe2c1605ae8c919134570a51dd27ea1bb516c"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/transfer/882dca18dcbe075e15e0ec5a1d7e6ccd69cc0f1309ffd3fde227bfbc107b3f6e
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "f85ab43dad059b9d2331ddacc384ad925d3467f03207182e01296bacfb242d01"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_transfer(
- &ctx, NEM_NETWORK_MAINNET, 26730750, NULL, 179500000, 26734350,
- "NBE223WPKEBHQPCYUC4U4CDUQCRRFMPZLOQLB5OP", 1000000,
- (uint8_t *)"enjoy! :)", 9, false, 1));
-
- ck_assert(nem_transaction_write_mosaic(&ctx, "imre.g", "tokens", 1));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "882dca18dcbe075e15e0ec5a1d7e6ccd69cc0f1309ffd3fde227bfbc107b3f6e"),
- sizeof(hash));
-}
-END_TEST
-
-START_TEST(test_nem_transaction_multisig) {
- nem_transaction_ctx ctx, other_trans;
-
- uint8_t buffer[1024], inner[1024];
- const uint8_t *signature;
-
- // http://bob.nem.ninja:8765/#/multisig/7d3a7087023ee29005262016706818579a2b5499eb9ca76bad98c1e6f4c46642
-
- nem_transaction_start(
- &other_trans,
- fromhex(
- "abac2ee3d4aaa7a3bfb65261a00cc04c761521527dd3f2cf741e2815cbba83ac"),
- inner, sizeof(inner));
-
- ck_assert(nem_transaction_create_aggregate_modification(
- &other_trans, NEM_NETWORK_TESTNET, 3939039, NULL, 16000000, 3960639, 1,
- false));
-
- ck_assert(nem_transaction_write_cosignatory_modification(
- &other_trans, 2,
- fromhex(
- "e6cff9b3725a91f31089c3acca0fac3e341c00b1c8c6e9578f66c4514509c3b3")));
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "59d89076964742ef2a2089d26a5aa1d2c7a7bb052a46c1de159891e91ad3d76e"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_multisig(&ctx, NEM_NETWORK_TESTNET, 3939039,
- NULL, 6000000, 3960639,
- &other_trans));
-
- signature = fromhex(
- "933930a8828b560168bddb3137df9252048678d829aa5135fa27bb306ff6562efb927554"
- "62988b852b0314bde058487d00e47816b6fb7df6bcfd7e1f150d1d00");
- ck_assert_int_eq(ed25519_sign_open_keccak(ctx.buffer, ctx.offset,
- ctx.public_key, signature),
- 0);
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "71cba4f2a28fd19f902ba40e9937994154d9eeaad0631d25d525ec37922567d4"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_multisig_signature(&ctx, NEM_NETWORK_TESTNET,
- 3939891, NULL, 6000000,
- 3961491, &other_trans));
-
- signature = fromhex(
- "a849f13bfeeba808a8a4a79d579febe584d831a3a6ad03da3b9d008530b3d7a79fcf7156"
- "121cd7ee847029d94af7ea7a683ca8e643dc5e5f489557c2054b830b");
- ck_assert_int_eq(ed25519_sign_open_keccak(ctx.buffer, ctx.offset,
- ctx.public_key, signature),
- 0);
-
- // http://chain.nem.ninja/#/multisig/1016cf3bdd61bd57b9b2b07b6ff2dee390279d8d899265bdc23d42360abe2e6c
-
- nem_transaction_start(
- &other_trans,
- fromhex(
- "a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a"),
- inner, sizeof(inner));
-
- ck_assert(nem_transaction_create_provision_namespace(
- &other_trans, NEM_NETWORK_MAINNET, 59414272, NULL, 20000000, 59500672,
- "dim", NULL, "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA", 5000000000));
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "cfe58463f0eaebceb5d00717f8aead49171a5d7c08f6b1299bd534f11715acc9"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_multisig(&ctx, NEM_NETWORK_MAINNET, 59414272,
- NULL, 6000000, 59500672,
- &other_trans));
-
- signature = fromhex(
- "52a876a37511068fe214bd710b2284823921ec7318c01e083419a062eae5369c9c11c3ab"
- "fdb590f65c717fab82873431d52be62e10338cb5656d1833bbdac70c");
- ck_assert_int_eq(ed25519_sign_open_keccak(ctx.buffer, ctx.offset,
- ctx.public_key, signature),
- 0);
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "1b49b80203007117d034e45234ffcdf402c044aeef6dbb06351f346ca892bce2"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_multisig_signature(&ctx, NEM_NETWORK_MAINNET,
- 59414342, NULL, 6000000,
- 59500742, &other_trans));
-
- signature = fromhex(
- "b9a59239e5d06992c28840034ff7a7f13da9c4e6f4a6f72c1b1806c3b602f83a7d727a34"
- "5371f5d15abf958208a32359c6dd77bde92273ada8ea6fda3dc76b00");
- ck_assert_int_eq(ed25519_sign_open_keccak(ctx.buffer, ctx.offset,
- ctx.public_key, signature),
- 0);
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "7ba4b39209f1b9846b098fe43f74381e43cb2882ccde780f558a63355840aa87"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_multisig_signature(&ctx, NEM_NETWORK_MAINNET,
- 59414381, NULL, 6000000,
- 59500781, &other_trans));
-
- signature = fromhex(
- "e874ae9f069f0538008631d2df9f2e8a59944ff182e8672f743d2700fb99224aafb7a0ab"
- "09c4e9ea39ee7c8ca04a8a3d6103ae1122d87772e871761d4f00ca01");
- ck_assert_int_eq(ed25519_sign_open_keccak(ctx.buffer, ctx.offset,
- ctx.public_key, signature),
- 0);
-}
-END_TEST
-
-START_TEST(test_nem_transaction_provision_namespace) {
- nem_transaction_ctx ctx;
-
- uint8_t buffer[1024], hash[SHA3_256_DIGEST_LENGTH];
-
- // http://bob.nem.ninja:8765/#/namespace/f7cab28da57204d01a907c697836577a4ae755e6c9bac60dcc318494a22debb3
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "84afa1bbc993b7f5536344914dde86141e61f8cbecaf8c9cefc07391f3287cf5"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_provision_namespace(
- &ctx, NEM_NETWORK_TESTNET, 56999445, NULL, 20000000, 57003045, "gimre",
- NULL, "TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35", 5000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "f7cab28da57204d01a907c697836577a4ae755e6c9bac60dcc318494a22debb3"),
- sizeof(hash));
-
- // http://bob.nem.ninja:8765/#/namespace/7ddd5fe607e1bfb5606e0ac576024c318c8300d237273117d4db32a60c49524d
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "244fa194e2509ac0d2fbc18779c2618d8c2ebb61c16a3bcbebcf448c661ba8dc"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_provision_namespace(
- &ctx, NEM_NETWORK_TESTNET, 21496797, NULL, 108000000, 21500397, "misc",
- "alice", "TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35", 5000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "7ddd5fe607e1bfb5606e0ac576024c318c8300d237273117d4db32a60c49524d"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/namespace/57071aad93ca125dc231dc02c07ad8610cd243d35068f9b36a7d231383907569
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "9f3c14f304309c8b72b2821339c4428793b1518bea72d58dd01f19d523518614"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_provision_namespace(
- &ctx, NEM_NETWORK_MAINNET, 26699717, NULL, 108000000, 26703317, "sex",
- NULL, "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA", 50000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "57071aad93ca125dc231dc02c07ad8610cd243d35068f9b36a7d231383907569"),
- sizeof(hash));
-}
-END_TEST
-
-START_TEST(test_nem_transaction_mosaic_creation) {
- nem_transaction_ctx ctx;
-
- uint8_t buffer[1024], hash[SHA3_256_DIGEST_LENGTH];
-
- // http://bob.nem.ninja:8765/#/mosaic/68364353c29105e6d361ad1a42abbccbf419cfc7adb8b74c8f35d8f8bdaca3fa/0
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_creation(
- &ctx, NEM_NETWORK_TESTNET, 14070896, NULL, 108000000, 14074496,
- "gimre.games.pong", "paddles", "Paddles for the bong game.\n", 0, 10000,
- true, true, 0, 0, NULL, NULL, NULL,
- "TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC", 50000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "68364353c29105e6d361ad1a42abbccbf419cfc7adb8b74c8f35d8f8bdaca3fa"),
- sizeof(hash));
-
- // http://bob.nem.ninja:8765/#/mosaic/b2f4a98113ff1f3a8f1e9d7197aa982545297fe0aa3fa6094af8031569953a55/0
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "244fa194e2509ac0d2fbc18779c2618d8c2ebb61c16a3bcbebcf448c661ba8dc"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_creation(
- &ctx, NEM_NETWORK_TESTNET, 21497248, NULL, 108000000, 21500848,
- "alice.misc", "bar", "Special offer: get one bar extra by bying one foo!",
- 0, 1000, false, true, 1, 1, "TALICE2GMA34CXHD7XLJQ536NM5UNKQHTORNNT2J",
- "nem", "xem", "TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC", 50000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "b2f4a98113ff1f3a8f1e9d7197aa982545297fe0aa3fa6094af8031569953a55"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/mosaic/269c6fda657aba3053a0e5b138c075808cc20e244e1182d9b730798b60a1f77b/0
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "58956ac77951622dc5f1c938affbf017c458e30e6b21ddb5783d38b302531f23"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_creation(
- &ctx, NEM_NETWORK_MAINNET, 26729938, NULL, 108000000, 26733538, "jabo38",
- "red_token",
- "This token is to celebrate the release of Namespaces and Mosaics on the "
- "NEM system. "
- "This token was the fist ever mosaic created other than nem.xem. "
- "There are only 10,000 Red Tokens that will ever be created. "
- "It has no levy and can be traded freely among third parties.",
- 2, 10000, false, true, 0, 0, NULL, NULL, NULL,
- "NBMOSAICOD4F54EE5CDMR23CCBGOAM2XSIUX6TRS", 50000000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "269c6fda657aba3053a0e5b138c075808cc20e244e1182d9b730798b60a1f77b"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/mosaic/e8dc14821dbea4831d9051f86158ef348001447968fc22c01644fdaf2bda75c6/0
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_creation(
- &ctx, NEM_NETWORK_MAINNET, 69251020, NULL, 20000000, 69337420, "dim",
- "coin", "DIM COIN", 6, 9000000000, false, true, 2, 10,
- "NCGGLVO2G3CUACVI5GNX2KRBJSQCN4RDL2ZWJ4DP", "dim", "coin",
- "NBMOSAICOD4F54EE5CDMR23CCBGOAM2XSIUX6TRS", 500000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "e8dc14821dbea4831d9051f86158ef348001447968fc22c01644fdaf2bda75c6"),
- sizeof(hash));
-}
-END_TEST
-
-START_TEST(test_nem_transaction_mosaic_supply_change) {
- nem_transaction_ctx ctx;
-
- uint8_t buffer[1024], hash[SHA3_256_DIGEST_LENGTH];
-
- // http://bigalice2.nem.ninja:7890/transaction/get?hash=33a50fdd4a54913643a580b2af08b9a5b51b7cee922bde380e84c573a7969c50
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_supply_change(
- &ctx, NEM_NETWORK_TESTNET, 14071648, NULL, 108000000, 14075248,
- "gimre.games.pong", "paddles", 1, 1234));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "33a50fdd4a54913643a580b2af08b9a5b51b7cee922bde380e84c573a7969c50"),
- sizeof(hash));
-
- // http://bigalice2.nem.ninja:7890/transaction/get?hash=1ce8e8894d077a66ff22294b000825d090a60742ec407efd80eb8b19657704f2
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "84afa1bbc993b7f5536344914dde86141e61f8cbecaf8c9cefc07391f3287cf5"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_supply_change(
- &ctx, NEM_NETWORK_TESTNET, 14126909, NULL, 108000000, 14130509,
- "jabo38_ltd.fuzzy_kittens_cafe", "coupons", 2, 1));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "1ce8e8894d077a66ff22294b000825d090a60742ec407efd80eb8b19657704f2"),
- sizeof(hash));
-
- // http://bigalice3.nem.ninja:7890/transaction/get?hash=694e493e9576d2bcf60d85747e302ac2e1cc27783187947180d4275a713ff1ff
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "b7ccc27b21ba6cf5c699a8dc86ba6ba98950442597ff9fa30e0abe0f5f4dd05d"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_supply_change(
- &ctx, NEM_NETWORK_MAINNET, 53377685, NULL, 20000000, 53464085, "abvapp",
- "abv", 1, 9000000));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "694e493e9576d2bcf60d85747e302ac2e1cc27783187947180d4275a713ff1ff"),
- sizeof(hash));
-
- // http://bigalice3.nem.ninja:7890/transaction/get?hash=09836334e123970e068d5b411e4d1df54a3ead10acf1ad5935a2cdd9f9680185
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "75f001a8641e2ce5c4386883dda561399ed346177411b492a677b73899502f13"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_mosaic_supply_change(
- &ctx, NEM_NETWORK_MAINNET, 55176304, NULL, 20000000, 55262704, "sushi",
- "wasabi", 2, 20));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "09836334e123970e068d5b411e4d1df54a3ead10acf1ad5935a2cdd9f9680185"),
- sizeof(hash));
-}
-END_TEST
-
-START_TEST(test_nem_transaction_aggregate_modification) {
- nem_transaction_ctx ctx;
-
- uint8_t buffer[1024], hash[SHA3_256_DIGEST_LENGTH];
-
- // http://bob.nem.ninja:8765/#/aggregate/6a55471b17159e5b6cd579c421e95a4e39d92e3f78b0a55ee337e785a601d3a2
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "462ee976890916e54fa825d26bdd0235f5eb5b6a143c199ab0ae5ee9328e08ce"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_aggregate_modification(
- &ctx, NEM_NETWORK_TESTNET, 0, NULL, 22000000, 0, 2, false));
-
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "994793ba1c789fa9bdea918afc9b06e2d0309beb1081ac5b6952991e4defd324")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "c54d6e33ed1446eedd7f7a80a588dd01857f723687a09200c1917d5524752f8b")));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "6a55471b17159e5b6cd579c421e95a4e39d92e3f78b0a55ee337e785a601d3a2"),
- sizeof(hash));
-
- // http://bob.nem.ninja:8765/#/aggregate/1fbdae5ba753e68af270930413ae90f671eb8ab58988116684bac0abd5726584
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "6bf7849c1eec6a2002995cc457dc00c4e29bad5c88de63f51e42dfdcd7b2131d"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_aggregate_modification(
- &ctx, NEM_NETWORK_TESTNET, 6542254, NULL, 40000000, 6545854, 4, true));
-
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "5f53d076c8c3ec3110b98364bc423092c3ec2be2b1b3c40fd8ab68d54fa39295")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "9eb199c2b4d406f64cb7aa5b2b0815264b56ba8fe44d558a6cb423a31a33c4c2")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "94b2323dab23a3faba24fa6ddda0ece4fbb06acfedd74e76ad9fae38d006882b")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "d88c6ee2a2cd3929d0d76b6b14ecb549d21296ab196a2b3a4cb2536bcce32e87")));
-
- ck_assert(nem_transaction_write_minimum_cosignatories(&ctx, 2));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "1fbdae5ba753e68af270930413ae90f671eb8ab58988116684bac0abd5726584"),
- sizeof(hash));
-
- // http://chain.nem.ninja/#/aggregate/cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c
-
- nem_transaction_start(
- &ctx,
- fromhex(
- "f41b99320549741c5cce42d9e4bb836d98c50ed5415d0c3c2912d1bb50e6a0e5"),
- buffer, sizeof(buffer));
-
- ck_assert(nem_transaction_create_aggregate_modification(
- &ctx, NEM_NETWORK_MAINNET, 0, NULL, 40000000, 0, 5, false));
-
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "1fbdbdde28daf828245e4533765726f0b7790e0b7146e2ce205df3e86366980b")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "f94e8702eb1943b23570b1b83be1b81536df35538978820e98bfce8f999e2d37")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "826cedee421ff66e708858c17815fcd831a4bb68e3d8956299334e9e24380ba8")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "719862cd7d0f4e875a6a0274c9a1738f38f40ad9944179006a54c34724c1274d")));
- ck_assert(nem_transaction_write_cosignatory_modification(
- &ctx, 1,
- fromhex(
- "43aa69177018fc3e2bdbeb259c81cddf24be50eef9c5386db51d82386c41475a")));
-
- keccak_256(ctx.buffer, ctx.offset, hash);
- ck_assert_mem_eq(
- hash,
- fromhex(
- "cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c"),
- sizeof(hash));
-}
-END_TEST
-
START_TEST(test_multibyte_address) {
uint8_t priv_key[32];
char wif[57];
@@ -12945,24 +11772,6 @@ Suite *test_suite(void) {
tcase_add_test(tc, test_ethereum_pubkeyhash);
suite_add_tcase(s, tc);
- tc = tcase_create("nem_address");
- tcase_add_test(tc, test_nem_address);
- suite_add_tcase(s, tc);
-
- tc = tcase_create("nem_encryption");
- tcase_add_test(tc, test_nem_derive);
- tcase_add_test(tc, test_nem_cipher);
- suite_add_tcase(s, tc);
-
- tc = tcase_create("nem_transaction");
- tcase_add_test(tc, test_nem_transaction_transfer);
- tcase_add_test(tc, test_nem_transaction_multisig);
- tcase_add_test(tc, test_nem_transaction_provision_namespace);
- tcase_add_test(tc, test_nem_transaction_mosaic_creation);
- tcase_add_test(tc, test_nem_transaction_mosaic_supply_change);
- tcase_add_test(tc, test_nem_transaction_aggregate_modification);
- suite_add_tcase(s, tc);
-
tc = tcase_create("multibyte_address");
tcase_add_test(tc, test_multibyte_address);
suite_add_tcase(s, tc);
### crypto/tools/nem_test_vectors.erb
@@ -1,18 +0,0 @@
-// test vectors from <%= source_url %>
-START_TEST(<%= test_name %>)
-{
- static const struct {
-<% fields.each do |(name, type)| -%>
- <%= if type.nil? then 'const char *' else "#{type} " end %><%= name %>;
-<% end -%>
- } tests[] = {
-<% data.each do |values| -%>
- { <% values.each do |value| %><%= value %>, <% end %>},
-<% end -%>
- };
-
- for (size_t i = 0; i < (sizeof(tests) / sizeof(*tests)); i++) {
- // TODO: Implement test
- }
-}
-END_TEST
### crypto/tools/nem_test_vectors.rb
@@ -1,126 +0,0 @@
-#!/usr/bin/env ruby
-require 'highline'
-require 'open-uri'
-
-TEMPLATE_NAME = (Pathname.new(__FILE__).sub_ext '.erb').to_s.freeze
-
-@terminal = HighLine.new($stdin, $stderr)
-
-def github_files
- require 'octokit'
-
- @github_files ||= Octokit.contents('NemProject/nem-test-vectors')
- .select do |file|
- file.name.end_with? '.dat'
- end
-end
-
-def choose_data_file
- @terminal.choose do |menu|
- github_files.each do |file|
- menu.choice(file.name) { file.download_url }
- end
-
- menu.prompt = 'Which file? '
-
- menu.index = :none
- menu.select_by = :name
- end
-end
-
-def load_header(line)
- line = line.dup
- abort 'Header is not a comment' unless line.slice!(0) == '#'
-
- header = line.split(':').each(&:strip!)
- header.shift if header.first.empty?
-
- header
-end
-
-def parse_field_answer(answer)
- if answer.empty?
- nil
- elsif /^(?:(?<type>\w+) )?(?<identifier>\w+)$/ =~ answer
- [identifier, type]
- else
- raise NotValidQuestionError
- end
-end
-
-def ask_fields(header)
- header.map do |name|
- @terminal.ask "Field for `#{name}'? " do |question|
- question.answer_type = lambda(&method(:parse_field_answer))
- end
- end
-end
-
-def load_data_line(line)
- abort 'Line does not begin with colon' unless line.slice!(0) == ':'
-
- line.strip!
- line.chomp!(',')
-
- values = line.split(':').each(&:strip!)
- values.pop if values.last.empty?
-
- values
-end
-
-def load_data(file, count)
- file.each_line.lazy.reject { |line| line.start_with? '#' }
- .take(count)
- .map(&method(:load_data_line))
- .to_a
-end
-
-def remove_skipped_fields(fields, data)
- data.each do |values|
- abort 'Line does not match header' unless values.size == fields.size
-
- values.reject!.each_with_index { |_, index| fields[index].nil? }
- end
-
- fields.compact!
-end
-
-def format_data_fields(fields, data)
- data.each do |values|
- fields.each_with_index do |(_, type), index|
- values[index] = values[index].dump if type.nil?
- end
- end
-end
-
-def template(source_url, fields, data)
- test_name = @terminal.ask('Name for test? ') do |question|
- question.validate = /./
- end
-
- erb = ERB.new(File.read(TEMPLATE_NAME), nil, '-')
- erb.filename = TEMPLATE_NAME
-
- erb.result(binding)
-end
-
-download_url = choose_data_file
-
-source_code = open download_url do |file|
- line = file.readline
-
- header = load_header(line)
- @terminal.say line
-
- count = @terminal.ask('How many vectors to import? ', Integer)
-
- fields = ask_fields(header)
- data = load_data(file, count)
-
- remove_skipped_fields(fields, data)
- format_data_fields(fields, data)
-
- template(download_url, fields, data)
-end
-
-puts source_code
### docs/misc/contributing.md
@@ -33,8 +33,6 @@ on the type of the asset to be added:
[ethereum-lists/chains][]
- **Ethereum tokens** should be added to the [ethereum-lists/tokens][]
repository
-- **NEM mosaics** should be added to the
- [common/defs/nem/nem_mosaics.json][] file
### Other
@@ -50,5 +48,4 @@ cryptocurrencies.**
[common/defs/bitcoin]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/bitcoin
[ethereum-lists/chains]: https://github.com/ethereum-lists/chains
[ethereum-lists/tokens]: https://github.com/ethereum-lists/tokens
- [common/defs/nem/nem_mosaics.json]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/nem/nem_mosaics.json
[common/defs/misc/misc.json]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/misc/misc.json
### docs/misc/generated-files.md
@@ -16,7 +16,7 @@ The following is a (possibly incomplete) list of files regenerated by `make gen`
* `core/mocks/generated`: mock Python stubs for C modules (`modtrezor*`). Generated from
special comments in `embed/upymod/modtrezor*`.
-* `networks.py`, `tokens.py`, `coininfo.py` and `nem_mosaics.py` in their respective
+* `networks.py`, `tokens.py` and `coininfo.py` in their respective
subdirectories of `core/src/apps`. In general, any file matching `*.py.mako` has a
corresponding `*.py` file generated from the Mako template. These files are based on
coin data from `common/defs`.
### docs/tests/device-tests.md
@@ -41,8 +41,8 @@ The tests are randomized using the [pytest-random-order] plugin. The random seed
If you only want to run a particular test, pick it with `-k <keyword>` or `-m <marker>`:
```sh
-pytest -k nem # only runs tests that have "nem" in the name
-pytest -k "nem or stellar" # only runs tests that have "nem" or "stellar" in the name
+pytest -k ripple # only runs tests that have "ripple" in the name
+pytest -k "ripple or stellar" # only runs tests that have "ripple" or "stellar" in the name
pytest -m stellar # only runs tests marked with @pytest.mark.stellar
```
### legacy/firmware/.changelog.d/7969.removed
@@ -0,0 +1 @@
+Remove NEM support.
### legacy/firmware/.gitignore
@@ -1,5 +1,4 @@
coin_info.[ch]
-nem_mosaics.[ch]
ethereum_definitions_constants.h
ethereum_networks.c
ethereum_tokens.c
### legacy/firmware/Makefile
@@ -64,8 +64,6 @@ OBJS += ethereum.o
OBJS += ethereum_definitions.o
OBJS += ethereum_networks.o
OBJS += ethereum_tokens.o
-OBJS += nem2.o
-OBJS += nem_mosaics.o
OBJS += stellar.o
endif
@@ -126,8 +124,6 @@ OBJS += ../vendor/trezor-crypto/chacha20poly1305/rfc7539.o
OBJS += ../vendor/trezor-crypto/consteq.o
-OBJS += ../vendor/trezor-crypto/nem.o
-
OBJS += ../vendor/QR-Code-generator/c/qrcodegen.o
OBJS += ../vendor/trezor-storage/storage.o
@@ -149,7 +145,6 @@ ifneq ($(BITCOIN_ONLY),1)
OBJS += ../vendor/trezor-crypto/cash_addr.o
OBJS += protob/messages-ethereum.pb.o
OBJS += protob/messages-definitions.pb.o
-OBJS += protob/messages-nem.pb.o
OBJS += protob/messages-stellar.pb.o
endif
@@ -172,11 +167,9 @@ CFLAGS += -DUSE_OPTIGA=0
CFLAGS += -DUSE_TROPIC=0
ifneq ($(BITCOIN_ONLY),1)
CFLAGS += -DUSE_ETHEREUM=1
-CFLAGS += -DUSE_NEM=1
MAKO_RENDER_FLAG =
else
CFLAGS += -DUSE_ETHEREUM=0
-CFLAGS += -DUSE_NEM=0
MAKO_RENDER_FLAG = --bitcoin-only
endif
### legacy/firmware/fsm.c
@@ -58,8 +58,6 @@
#include "ethereum.h"
#include "ethereum_definitions.h"
#include "ethereum_networks.h"
-#include "nem.h"
-#include "nem2.h"
#include "stellar.h"
#endif
@@ -537,7 +535,6 @@ bool fsm_layoutDifferentPathsWarning(void) {
#if !BITCOIN_ONLY
#include "fsm_msg_ethereum.h"
-#include "fsm_msg_nem.h"
#include "fsm_msg_stellar.h"
#endif
### legacy/firmware/fsm.h
@@ -26,7 +26,6 @@
#include "messages-debug.pb.h"
#include "messages-ethereum.pb.h"
#include "messages-management.pb.h"
-#include "messages-nem.pb.h"
#include "messages-stellar.pb.h"
#include "messages.pb.h"
@@ -116,14 +115,6 @@ void fsm_msgEthereumSignMessage(const EthereumSignMessage *msg);
void fsm_msgEthereumVerifyMessage(const EthereumVerifyMessage *msg);
void fsm_msgEthereumSignTypedHash(const EthereumSignTypedHash *msg);
-// nem
-void fsm_msgNEMGetAddress(
- NEMGetAddress *msg); // not const because we mutate msg->network
-void fsm_msgNEMSignTx(
- NEMSignTx *msg); // not const because we mutate msg->network
-void fsm_msgNEMDecryptMessage(
- NEMDecryptMessage *msg); // not const because we mutate msg->payload
-
// stellar
void fsm_msgStellarGetAddress(const StellarGetAddress *msg);
void fsm_msgStellarSignTx(const StellarSignTx *msg);
### legacy/firmware/fsm_msg_common.h
@@ -88,14 +88,13 @@ bool get_features(Features *resp) {
resp->capabilities[0] = Capability_Capability_Bitcoin;
resp->capabilities[1] = Capability_Capability_Crypto;
#else
- resp->capabilities_count = 7;
+ resp->capabilities_count = 6;
resp->capabilities[0] = Capability_Capability_Bitcoin;
resp->capabilities[1] = Capability_Capability_Bitcoin_like;
resp->capabilities[2] = Capability_Capability_Crypto;
resp->capabilities[3] = Capability_Capability_Ethereum;
- resp->capabilities[4] = Capability_Capability_NEM;
- resp->capabilities[5] = Capability_Capability_Stellar;
- resp->capabilities[6] = Capability_Capability_U2F;
+ resp->capabilities[4] = Capability_Capability_Stellar;
+ resp->capabilities[5] = Capability_Capability_U2F;
#endif
return resp;
}
### legacy/firmware/fsm_msg_nem.h
@@ -1,389 +0,0 @@
-/*
- * This file is part of the Trezor project, https://trezor.io/
- *
- * Copyright (C) 2017 Saleem Rashid <trezor@saleemrashid.com>
- *
- * This library is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-static bool fsm_nemCheckPath(uint32_t address_n_count,
- const uint32_t *address_n, uint8_t network) {
- if (nem_path_check(address_n_count, address_n, network, true)) {
- return true;
- }
-
- if (config_getSafetyCheckLevel() == SafetyCheckLevel_Strict &&
- !nem_path_check(address_n_count, address_n, network, false)) {
- fsm_sendFailure(FailureType_Failure_DataError, _("Forbidden key path"));
- return false;
- }
-
- return fsm_layoutPathWarning();
-}
-
-void fsm_msgNEMGetAddress(NEMGetAddress *msg) {
- if (!msg->has_network) {
- msg->network = NEM_NETWORK_MAINNET;
- }
-
- const char *network;
- CHECK_PARAM((network = nem_network_name(msg->network)),
- _("Invalid NEM network"));
-
- CHECK_INITIALIZED
- CHECK_PIN
-
- RESP_INIT(NEMAddress);
-
- if (!fsm_nemCheckPath(msg->address_n_count, msg->address_n, msg->network)) {
- layoutHome();
- return;
- }
-
- HDNode *node = fsm_getDerivedNode(ED25519_KECCAK_NAME, msg->address_n,
- msg->address_n_count, NULL);
- if (!node) return;
-
- if (!hdnode_get_nem_address(node, msg->network, resp->address)) {
- layoutHome();
- return;
- }
-
- if (msg->has_show_display && msg->show_display) {
- char desc[16];
- strlcpy(desc, network, sizeof(desc));
- strlcat(desc, ":", sizeof(desc));
-
- if (!fsm_layoutAddress(resp->address, desc, true, 0, msg->address_n,
- msg->address_n_count, false, NULL, 0, 0, NULL)) {
- return;
- }
- }
-
- msg_write(MessageType_MessageType_NEMAddress, resp);
- layoutHome();
-}
-
-void fsm_msgNEMSignTx(NEMSignTx *msg) {
- const char *reason;
-
-#define NEM_CHECK_PARAM(s) CHECK_PARAM((reason = (s)) == NULL, reason)
-#define NEM_CHECK_PARAM_WHEN(b, s) \
- CHECK_PARAM(!(b) || (reason = (s)) == NULL, reason)
-
- // Ensure exactly one transaction is provided
- unsigned int provided = msg->has_transfer + msg->has_provision_namespace +
- msg->has_mosaic_creation + msg->has_supply_change +
- msg->has_aggregate_modification +
- msg->has_importance_transfer;
- CHECK_PARAM(provided != 0, _("No transaction provided"));
- CHECK_PARAM(provided == 1, _("More than one transaction provided"));
-
- NEM_CHECK_PARAM(nem_validate_common(&msg->transaction, false));
- NEM_CHECK_PARAM_WHEN(
- msg->has_transfer,
- nem_validate_transfer(&msg->transfer, msg->transaction.network));
- NEM_CHECK_PARAM_WHEN(
- msg->has_provision_namespace,
- nem_validate_provision_namespace(&msg->provision_namespace,
- msg->transaction.network));
- NEM_CHECK_PARAM_WHEN(msg->has_mosaic_creation,
- nem_validate_mosaic_creation(&msg->mosaic_creation,
- msg->transaction.network));
- NEM_CHECK_PARAM_WHEN(msg->has_supply_change,
- nem_validate_supply_change(&msg->supply_change));
- NEM_CHECK_PARAM_WHEN(msg->has_aggregate_modification,
- nem_validate_aggregate_modification(
- &msg->aggregate_modification, !msg->has_multisig));
- NEM_CHECK_PARAM_WHEN(
- msg->has_importance_transfer,
- nem_validate_importance_transfer(&msg->importance_transfer));
-
- bool cosigning = msg->has_cosigning && msg->cosigning;
- if (msg->has_multisig) {
- NEM_CHECK_PARAM(nem_validate_common(&msg->multisig, true));
-
- CHECK_PARAM(msg->transaction.network == msg->multisig.network,
- _("Inner transaction network is different"));
- } else {
- CHECK_PARAM(!cosigning, _("No multisig transaction to cosign"));
- }
-
- CHECK_INITIALIZED
- CHECK_PIN
-
- const char *network = nem_network_name(msg->transaction.network);
-
- if (msg->has_multisig) {
- char address[NEM_ADDRESS_SIZE + 1];
- nem_get_address(msg->multisig.signer.bytes, msg->multisig.network, address);
-
- if (!nem_askMultisig(address, network, cosigning, msg->transaction.fee)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
- }
-
- RESP_INIT(NEMSignedTx);
-
- if (!fsm_nemCheckPath(msg->transaction.address_n_count,
- msg->transaction.address_n, msg->transaction.network)) {
- layoutHome();
- return;
- }
-
- HDNode *node =
- fsm_getDerivedNode(ED25519_KECCAK_NAME, msg->transaction.address_n,
- msg->transaction.address_n_count, NULL);
- if (!node) return;
-
- if (hdnode_fill_public_key(node) != 0) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to derive public key"));
- layoutHome();
- return;
- }
-
- const NEMTransactionCommon *common =
- msg->has_multisig ? &msg->multisig : &msg->transaction;
-
- char address[NEM_ADDRESS_SIZE + 1];
- hdnode_get_nem_address(node, common->network, address);
-
- if (msg->has_transfer) {
- if (!nem_canonicalizeMosaics(&msg->transfer)) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to canonicalize mosaics"));
- layoutHome();
- return;
- }
- }
-
- if (msg->has_transfer && !nem_askTransfer(common, &msg->transfer, network)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- if (msg->has_provision_namespace &&
- !nem_askProvisionNamespace(common, &msg->provision_namespace, network)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- if (msg->has_mosaic_creation &&
- !nem_askMosaicCreation(common, &msg->mosaic_creation, network, address)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- if (msg->has_supply_change &&
- !nem_askSupplyChange(common, &msg->supply_change, network)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- if (msg->has_aggregate_modification &&
- !nem_askAggregateModification(common, &msg->aggregate_modification,
- network, !msg->has_multisig)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- if (msg->has_importance_transfer &&
- !nem_askImportanceTransfer(common, &msg->importance_transfer, network)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled,
- _("Signing cancelled by user"));
- layoutHome();
- return;
- }
-
- nem_transaction_ctx context;
- nem_transaction_start(&context, &node->public_key[1], resp->data.bytes,
- sizeof(resp->data.bytes));
-
- if (msg->has_multisig) {
- uint8_t buffer[sizeof(resp->data.bytes)];
-
- nem_transaction_ctx inner;
- nem_transaction_start(&inner, msg->multisig.signer.bytes, buffer,
- sizeof(buffer));
-
- if (msg->has_transfer &&
- !nem_fsmTransfer(&inner, NULL, &msg->multisig, &msg->transfer)) {
- layoutHome();
- return;
- }
-
- if (msg->has_provision_namespace &&
- !nem_fsmProvisionNamespace(&inner, &msg->multisig,
- &msg->provision_namespace)) {
- layoutHome();
- return;
- }
-
- if (msg->has_mosaic_creation &&
- !nem_fsmMosaicCreation(&inner, &msg->multisig, &msg->mosaic_creation)) {
- layoutHome();
- return;
- }
-
- if (msg->has_supply_change &&
- !nem_fsmSupplyChange(&inner, &msg->multisig, &msg->supply_change)) {
- layoutHome();
- return;
- }
-
- if (msg->has_aggregate_modification &&
- !nem_fsmAggregateModification(&inner, &msg->multisig,
- &msg->aggregate_modification)) {
- layoutHome();
- return;
- }
-
- if (msg->has_importance_transfer &&
- !nem_fsmImportanceTransfer(&inner, &msg->multisig,
- &msg->importance_transfer)) {
- layoutHome();
- return;
- }
-
- if (!nem_fsmMultisig(&context, &msg->transaction, &inner, cosigning)) {
- layoutHome();
- return;
- }
- } else {
- if (msg->has_transfer &&
- !nem_fsmTransfer(&context, node, &msg->transaction, &msg->transfer)) {
- layoutHome();
- return;
- }
-
- if (msg->has_provision_namespace &&
- !nem_fsmProvisionNamespace(&context, &msg->transaction,
- &msg->provision_namespace)) {
- layoutHome();
- return;
- }
-
- if (msg->has_mosaic_creation &&
- !nem_fsmMosaicCreation(&context, &msg->transaction,
- &msg->mosaic_creation)) {
- layoutHome();
- return;
- }
-
- if (msg->has_supply_change &&
- !nem_fsmSupplyChange(&context, &msg->transaction,
- &msg->supply_change)) {
- layoutHome();
- return;
- }
-
- if (msg->has_aggregate_modification &&
- !nem_fsmAggregateModification(&context, &msg->transaction,
- &msg->aggregate_modification)) {
- layoutHome();
- return;
- }
-
- if (msg->has_importance_transfer &&
- !nem_fsmImportanceTransfer(&context, &msg->transaction,
- &msg->importance_transfer)) {
- layoutHome();
- return;
- }
- }
-
- resp->data.size =
- nem_transaction_end(&context, node->private_key, resp->signature.bytes);
-
- resp->signature.size = sizeof(ed25519_signature);
-
- msg_write(MessageType_MessageType_NEMSignedTx, resp);
- layoutHome();
-}
-
-void fsm_msgNEMDecryptMessage(NEMDecryptMessage *msg) {
- RESP_INIT(NEMDecryptedMessage);
-
- CHECK_INITIALIZED
-
- CHECK_PARAM(nem_network_name(msg->network), _("Invalid NEM network"));
- CHECK_PARAM(msg->has_payload, _("No payload provided"));
- CHECK_PARAM(msg->payload.size >= NEM_ENCRYPTED_PAYLOAD_SIZE(0),
- _("Invalid encrypted payload"));
- CHECK_PARAM(msg->has_public_key, _("No public key provided"));
- CHECK_PARAM(msg->public_key.size == 32, _("Invalid public key"));
-
- CHECK_PIN
-
- char address[NEM_ADDRESS_SIZE + 1];
- nem_get_address(msg->public_key.bytes, msg->network, address);
-
- layoutNEMDialog(&bmp_icon_question, _("Cancel"), _("Confirm"),
- _("Decrypt message"), _("Confirm address?"), address);
- if (!protectButton(ButtonRequestType_ButtonRequest_Other, false)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
- layoutHome();
- return;
- }
-
- if (!fsm_nemCheckPath(msg->address_n_count, msg->address_n, msg->network)) {
- layoutHome();
- return;
- }
- const HDNode *node = fsm_getDerivedNode(ED25519_KECCAK_NAME, msg->address_n,
- msg->address_n_count, NULL);
- if (!node) return;
-
- const uint8_t *salt = msg->payload.bytes;
- uint8_t *iv = &msg->payload.bytes[NEM_SALT_SIZE];
-
- const uint8_t *payload = &msg->payload.bytes[NEM_SALT_SIZE + AES_BLOCK_SIZE];
- size_t size = msg->payload.size - NEM_SALT_SIZE - AES_BLOCK_SIZE;
-
- // hdnode_nem_decrypt mutates the IV, so this will modify msg
- bool ret = hdnode_nem_decrypt(node, msg->public_key.bytes, iv, salt, payload,
- size, resp->payload.bytes);
- if (!ret) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to decrypt payload"));
- layoutHome();
- return;
- }
-
- resp->payload.size = NEM_DECRYPTED_SIZE(resp->payload.bytes, size);
-
- layoutNEMTransferPayload(resp->payload.bytes, resp->payload.size, true);
- if (!protectButton(ButtonRequestType_ButtonRequest_Other, false)) {
- fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
- layoutHome();
- return;
- }
-
- msg_write(MessageType_MessageType_NEMDecryptedMessage, resp);
- layoutHome();
-}
### legacy/firmware/layout2.c
@@ -31,7 +31,6 @@
#include "gettext.h"
#include "layout2.h"
#include "memzero.h"
-#include "nem2.h"
#include "oled.h"
#include "qrcodegen.h"
#include "secp256k1.h"
@@ -50,8 +49,6 @@ static const char *slip44_extras(uint32_t coin_type) {
switch (coin_type & PATH_UNHARDEN_MASK) {
case 40:
return "EXP"; // Expanse
- case 43:
- return "NEM"; // NEM
case 60:
return "ETH"; // Ethereum Mainnet
case 61:
@@ -1153,170 +1150,6 @@ void layoutShowPassphrase(const char *passphrase) {
oledRefresh();
}
-#if !BITCOIN_ONLY
-
-void layoutNEMDialog(const BITMAP *icon, const char *btnNo, const char *btnYes,
- const char *desc, const char *line1, const char *address) {
- static char first_third[NEM_ADDRESS_SIZE / 3 + 1];
- strlcpy(first_third, address, sizeof(first_third));
-
- static char second_third[NEM_ADDRESS_SIZE / 3 + 1];
- strlcpy(second_third, &address[NEM_ADDRESS_SIZE / 3], sizeof(second_third));
-
- const char *third_third = &address[NEM_ADDRESS_SIZE * 2 / 3];
-
- layoutDialogSwipe(icon, btnNo, btnYes, desc, line1, first_third, second_third,
- third_third, NULL, NULL);
-}
-
-void layoutNEMTransferXEM(const char *desc, uint64_t quantity,
- const bignum256 *multiplier, uint64_t fee) {
- char str_out[32] = {0}, str_fee[32] = {0};
-
- nem_mosaicFormatAmount(NEM_MOSAIC_DEFINITION_XEM, quantity, multiplier,
- str_out, sizeof(str_out));
- nem_mosaicFormatAmount(NEM_MOSAIC_DEFINITION_XEM, fee, NULL, str_fee,
- sizeof(str_fee));
-
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"), desc,
- _("Confirm transfer of"), str_out, _("and network fee of"),
- str_fee, NULL, NULL);
-}
-
-void layoutNEMNetworkFee(const char *desc, bool confirm, const char *fee1_desc,
- uint64_t fee1, const char *fee2_desc, uint64_t fee2) {
- char str_fee1[32] = {0}, str_fee2[32] = {0};
-
- nem_mosaicFormatAmount(NEM_MOSAIC_DEFINITION_XEM, fee1, NULL, str_fee1,
- sizeof(str_fee1));
-
- if (fee2_desc) {
- nem_mosaicFormatAmount(NEM_MOSAIC_DEFINITION_XEM, fee2, NULL, str_fee2,
- sizeof(str_fee2));
- }
-
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), confirm ? _("Confirm") : _("Next"), desc,
- fee1_desc, str_fee1, fee2_desc, fee2_desc ? str_fee2 : NULL, NULL, NULL);
-}
-
-void layoutNEMTransferMosaic(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- uint8_t network) {
- char str_out[32] = {0}, str_levy[32] = {0};
-
- nem_mosaicFormatAmount(definition, quantity, multiplier, str_out,
- sizeof(str_out));
-
- if (definition->has_levy) {
- nem_mosaicFormatLevy(definition, quantity, multiplier, network, str_levy,
- sizeof(str_levy));
- }
-
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"),
- definition->has_name ? definition->name : _("Mosaic"),
- _("Confirm transfer of"), str_out,
- definition->has_levy ? _("and levy of") : NULL,
- definition->has_levy ? str_levy : NULL, NULL, NULL);
-}
-
-void layoutNEMTransferUnknownMosaic(const char *namespace, const char *mosaic,
- uint64_t quantity,
- const bignum256 *multiplier) {
- char mosaic_name[32] = {0};
- nem_mosaicFormatName(namespace, mosaic, mosaic_name, sizeof(mosaic_name));
-
- char str_out[32] = {0};
- nem_mosaicFormatAmount(NULL, quantity, multiplier, str_out, sizeof(str_out));
-
- char *decimal = strchr(str_out, '.');
- if (decimal != NULL) {
- *decimal = '\0';
- }
-
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("I take the risk"),
- _("Unknown Mosaic"), _("Confirm transfer of"), str_out,
- _("raw units of"), mosaic_name, NULL, NULL);
-}
-
-void layoutNEMTransferPayload(const uint8_t *payload, size_t length,
- bool encrypted) {
- if (length >= 1 && payload[0] == 0xFE) {
- char encoded[(length - 1) * 2 + 1];
- memset(encoded, 0, sizeof(encoded));
-
- data2hex(&payload[1], length - 1, encoded);
-
- const char **str =
- split_message((uint8_t *)encoded, sizeof(encoded) - 1, 16);
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"),
- encrypted ? _("Encrypted hex data") : _("Unencrypted hex data"), str[0],
- str[1], str[2], str[3], NULL, NULL);
- } else {
- const char **str = split_message(payload, length, 16);
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"),
- encrypted ? _("Encrypted message") : _("Unencrypted message"), str[0],
- str[1], str[2], str[3], NULL, NULL);
- }
-}
-
-void layoutNEMMosaicDescription(const char *description) {
- const char **str =
- split_message((uint8_t *)description, strlen(description), 16);
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"),
- _("Mosaic Description"), str[0], str[1], str[2], str[3],
- NULL, NULL);
-}
-
-void layoutNEMLevy(const NEMMosaicDefinition *definition, uint8_t network) {
- const NEMMosaicDefinition *mosaic = NULL;
- if (nem_mosaicMatches(definition, definition->levy_namespace,
- definition->levy_mosaic, network)) {
- mosaic = definition;
- } else {
- mosaic = nem_mosaicByName(definition->levy_namespace,
- definition->levy_mosaic, network);
- }
-
- char mosaic_name[32] = {0};
- if (mosaic == NULL) {
- nem_mosaicFormatName(definition->levy_namespace, definition->levy_mosaic,
- mosaic_name, sizeof(mosaic_name));
- }
-
- char str_out[32] = {0};
-
- switch (definition->levy) {
- case NEMMosaicLevy_MosaicLevy_Percentile:
- bn_format_amount(definition->fee, NULL, NULL, 0, str_out,
- sizeof(str_out));
-
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), _("Percentile Levy"),
- _("Raw levy value is"), str_out, _("in"),
- mosaic ? (mosaic == definition ? _("the same mosaic") : mosaic->name)
- : mosaic_name,
- NULL, NULL);
- break;
-
- case NEMMosaicLevy_MosaicLevy_Absolute:
- default:
- nem_mosaicFormatAmount(mosaic, definition->fee, NULL, str_out,
- sizeof(str_out));
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), _("Absolute Levy"),
- _("Levy is"), str_out,
- mosaic ? (mosaic == definition ? _("in the same mosaic") : NULL)
- : _("in raw units of"),
- mosaic ? NULL : mosaic_name, NULL, NULL);
- break;
- }
-}
-
-#endif
-
void layoutConfirmAutoLockDelay(uint32_t delay_ms) {
char line[sizeof("after 4294967296 minutes?")] = {0};
### legacy/firmware/layout2.h
@@ -29,7 +29,6 @@
#include "messages-bitcoin.pb.h"
#include "messages-crypto.pb.h"
#include "messages-management.pb.h"
-#include "messages-nem.pb.h"
extern void *layoutLast;
@@ -99,23 +98,6 @@ void layoutDecryptIdentity(const IdentityType *identity);
void layoutU2FDialog(const char *verb, const char *appname);
void layoutShowPassphrase(const char *passphrase);
-void layoutNEMDialog(const BITMAP *icon, const char *btnNo, const char *btnYes,
- const char *desc, const char *line1, const char *address);
-void layoutNEMTransferXEM(const char *desc, uint64_t quantity,
- const bignum256 *multiplier, uint64_t fee);
-void layoutNEMNetworkFee(const char *desc, bool confirm, const char *fee1_desc,
- uint64_t fee1, const char *fee2_desc, uint64_t fee2);
-void layoutNEMTransferMosaic(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- uint8_t network);
-void layoutNEMTransferUnknownMosaic(const char *namespace, const char *mosaic,
- uint64_t quantity,
- const bignum256 *multiplier);
-void layoutNEMTransferPayload(const uint8_t *payload, size_t length,
- bool encrypted);
-void layoutNEMMosaicDescription(const char *description);
-void layoutNEMLevy(const NEMMosaicDefinition *definition, uint8_t network);
-
void layoutConfirmAutoLockDelay(uint32_t delay_ms);
void layoutConfirmSafetyChecks(SafetyCheckLevel safety_checks_level);
### legacy/firmware/nem2.c
@@ -1,790 +0,0 @@
-/*
- * This file is part of the Trezor project, https://trezor.io/
- *
- * Copyright (C) 2017 Saleem Rashid <trezor@saleemrashid.com>
- *
- * This library is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "nem2.h"
-
-#include "aes/aes.h"
-#include "crypto.h"
-#include "fsm.h"
-#include "gettext.h"
-#include "layout2.h"
-#include "memzero.h"
-#include "protect.h"
-#include "rng.h"
-#include "secp256k1.h"
-
-const char *nem_validate_common(NEMTransactionCommon *common, bool inner) {
- if (!common->has_network) {
- common->has_network = true;
- common->network = NEM_NETWORK_MAINNET;
- }
-
- if (common->network > 0xFF || nem_network_name(common->network) == NULL) {
- return inner ? _("Invalid NEM network in inner transaction")
- : _("Invalid NEM network");
- }
-
- if (inner != common->has_signer) {
- return inner ? _("No signer provided in inner transaction")
- : _("Signer not allowed in outer transaction");
- }
-
- if (common->has_signer && common->signer.size != sizeof(ed25519_public_key)) {
- return _("Invalid signer public key in inner transaction");
- }
-
- return NULL;
-}
-
-const char *nem_validate_transfer(const NEMTransfer *transfer,
- uint8_t network) {
- if (transfer->has_public_key &&
- transfer->public_key.size != sizeof(ed25519_public_key)) {
- return _("Invalid recipient public key");
- }
-
- if (!nem_validate_address(transfer->recipient, network))
- return _("Invalid recipient address");
-
- return NULL;
-}
-
-const char *nem_validate_provision_namespace(
- const NEMProvisionNamespace *provision_namespace, uint8_t network) {
- if (!nem_validate_address(provision_namespace->sink, network))
- return _("Invalid rental sink address");
-
- return NULL;
-}
-
-const char *nem_validate_mosaic_creation(
- const NEMMosaicCreation *mosaic_creation, uint8_t network) {
- if (!nem_validate_address(mosaic_creation->sink, network))
- return _("Invalid creation sink address");
-
- if (mosaic_creation->definition.has_name)
- return _("Name not allowed in mosaic creation transactions");
- if (mosaic_creation->definition.has_ticker)
- return _("Ticker not allowed in mosaic creation transactions");
- if (mosaic_creation->definition.networks_count)
- return _("Networks not allowed in mosaic creation transactions");
-
- if (mosaic_creation->definition.has_levy) {
- if (!mosaic_creation->definition.has_fee)
- return _("No levy address provided");
- if (!mosaic_creation->definition.has_levy_address)
- return _("No levy address provided");
- if (!mosaic_creation->definition.has_levy_namespace)
- return _("No levy namespace provided");
- if (!mosaic_creation->definition.has_levy_mosaic)
- return _("No levy mosaic name provided");
-
- if (!mosaic_creation->definition.has_divisibility)
- return _("No divisibility provided");
- if (!mosaic_creation->definition.has_supply) return _("No supply provided");
- if (!mosaic_creation->definition.has_mutable_supply)
- return _("No supply mutability provided");
- if (!mosaic_creation->definition.has_transferable)
- return _("No mosaic transferability provided");
-
- if (mosaic_creation->definition.divisibility > NEM_MAX_DIVISIBILITY)
- return _("Invalid divisibility provided");
- if (mosaic_creation->definition.supply > NEM_MAX_SUPPLY)
- return _("Invalid supply provided");
-
- if (!nem_validate_address(mosaic_creation->definition.levy_address,
- network))
- return _("Invalid levy address");
- }
-
- return NULL;
-}
-
-const char *nem_validate_supply_change(
- const NEMMosaicSupplyChange *supply_change) {
- (void)supply_change;
- return NULL;
-}
-
-const char *nem_validate_aggregate_modification(
- const NEMAggregateModification *aggregate_modification, bool creation) {
- if (creation && aggregate_modification->modifications_count == 0) {
- return _("No modifications provided");
- }
-
- for (size_t i = 0; i < aggregate_modification->modifications_count; i++) {
- const NEMCosignatoryModification *modification =
- &aggregate_modification->modifications[i];
-
- if (modification->public_key.size != 32)
- return _("Invalid cosignatory public key provided");
-
- if (creation && modification->type ==
- NEMModificationType_CosignatoryModification_Delete) {
- return _("Cannot remove cosignatory when converting account");
- }
- }
-
- return NULL;
-}
-
-const char *nem_validate_importance_transfer(
- const NEMImportanceTransfer *importance_transfer) {
- if (importance_transfer->public_key.size != 32)
- return _("Invalid remote account provided");
-
- return NULL;
-}
-
-bool nem_askTransfer(const NEMTransactionCommon *common,
- const NEMTransfer *transfer, const char *desc) {
- if (transfer->mosaics_count) {
- const NEMMosaic *xem = NULL;
- bool unknownMosaic = false;
-
- const NEMMosaicDefinition *definitions[transfer->mosaics_count];
- memset(definitions, 0, sizeof(definitions));
-
- for (size_t i = 0; i < transfer->mosaics_count; i++) {
- const NEMMosaic *mosaic = &transfer->mosaics[i];
-
- definitions[i] =
- nem_mosaicByName(mosaic->namespace, mosaic->mosaic, common->network);
-
- if (definitions[i] == NEM_MOSAIC_DEFINITION_XEM) {
- xem = mosaic;
- } else if (definitions[i] == NULL) {
- unknownMosaic = true;
- }
- }
-
- bignum256 multiplier = {0};
- bn_read_uint64(transfer->amount, &multiplier);
-
- if (unknownMosaic) {
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("I take the risk"),
- _("Unknown Mosaics"), _("Divisibility and levy"),
- _("cannot be shown for"), _("unknown mosaics!"), NULL,
- NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput,
- false)) {
- return false;
- }
- }
-
- layoutNEMTransferXEM(desc, xem ? xem->quantity : 0, &multiplier,
- common->fee);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- for (size_t i = 0; i < transfer->mosaics_count; i++) {
- const NEMMosaic *mosaic = &transfer->mosaics[i];
-
- if (mosaic == xem) {
- continue;
- }
-
- if (definitions[i]) {
- layoutNEMTransferMosaic(definitions[i], mosaic->quantity, &multiplier,
- common->network);
- } else {
- layoutNEMTransferUnknownMosaic(mosaic->namespace, mosaic->mosaic,
- mosaic->quantity, &multiplier);
- }
-
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput,
- false)) {
- return false;
- }
- }
- } else {
- layoutNEMTransferXEM(desc, transfer->amount, NULL, common->fee);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- if (transfer->has_payload) {
- layoutNEMTransferPayload(transfer->payload.bytes, transfer->payload.size,
- transfer->has_public_key);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- layoutNEMDialog(&bmp_icon_question, _("Cancel"), _("Confirm"), desc,
- _("Confirm transfer to"), transfer->recipient);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmTransfer(nem_transaction_ctx *context, const HDNode *node,
- const NEMTransactionCommon *common,
- const NEMTransfer *transfer) {
- static uint8_t
- encrypted[NEM_ENCRYPTED_PAYLOAD_SIZE(sizeof(transfer->payload.bytes))];
-
- const uint8_t *payload = transfer->payload.bytes;
- size_t size = transfer->payload.size;
-
- if (transfer->has_public_key) {
- if (node == NULL) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Private key unavailable for encrypted message"));
- return false;
- }
-
- random_buffer(encrypted, NEM_SALT_SIZE + AES_BLOCK_SIZE);
-
- const uint8_t *salt = encrypted;
- const uint8_t *iv = &encrypted[NEM_SALT_SIZE];
- uint8_t *buffer = &encrypted[NEM_SALT_SIZE + AES_BLOCK_SIZE];
-
- bool ret = hdnode_nem_encrypt(node, transfer->public_key.bytes, iv, salt,
- payload, size, buffer);
-
- if (!ret) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to encrypt payload"));
- return false;
- }
-
- payload = encrypted;
- size = NEM_ENCRYPTED_PAYLOAD_SIZE(size);
- }
-
- bool ret = nem_transaction_create_transfer(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, transfer->recipient, transfer->amount, payload, size,
- transfer->has_public_key, transfer->mosaics_count);
-
- if (!ret) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to create transfer transaction"));
- return false;
- }
-
- for (size_t i = 0; i < transfer->mosaics_count; i++) {
- const NEMMosaic *mosaic = &transfer->mosaics[i];
-
- ret = nem_transaction_write_mosaic(context, mosaic->namespace,
- mosaic->mosaic, mosaic->quantity);
-
- if (!ret) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to attach mosaics"));
- return false;
- }
- }
-
- return true;
-}
-
-bool nem_askProvisionNamespace(const NEMTransactionCommon *common,
- const NEMProvisionNamespace *provision_namespace,
- const char *desc) {
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), desc, _("Create namespace"),
- provision_namespace->namespace,
- provision_namespace->has_parent ? _("under namespace") : NULL,
- provision_namespace->has_parent ? provision_namespace->parent : NULL,
- NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- layoutNEMNetworkFee(desc, true, _("Confirm rental fee of"),
- provision_namespace->fee, _("and network fee of"),
- common->fee);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmProvisionNamespace(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMProvisionNamespace *provision_namespace) {
- return nem_transaction_create_provision_namespace(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, provision_namespace->namespace,
- provision_namespace->has_parent ? provision_namespace->parent : NULL,
- provision_namespace->sink, provision_namespace->fee);
-}
-
-bool nem_askMosaicCreation(const NEMTransactionCommon *common,
- const NEMMosaicCreation *mosaic_creation,
- const char *desc, const char *address) {
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"), desc,
- _("Create mosaic"), mosaic_creation->definition.mosaic,
- _("under namespace"), mosaic_creation->definition.namespace,
- NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- layoutNEMMosaicDescription(mosaic_creation->definition.description);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- char str_out[32] = {0};
-
- bn_format_uint64(mosaic_creation->definition.supply, NULL, NULL,
- mosaic_creation->definition.divisibility,
- mosaic_creation->definition.divisibility, true, ',', str_out,
- sizeof(str_out));
-
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), _("Properties"),
- mosaic_creation->definition.mutable_supply ? _("Mutable supply:")
- : _("Immutable supply:"),
- str_out, _("Mosaic will be"),
- mosaic_creation->definition.transferable ? _("transferable")
- : _("non-transferable"),
- NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- if (mosaic_creation->definition.has_levy) {
- layoutNEMLevy(&mosaic_creation->definition, common->network);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- if (strcmp(address, mosaic_creation->definition.levy_address) == 0) {
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"),
- _("Levy Recipient"), _("Levy will be paid to"),
- _("yourself"), NULL, NULL, NULL, NULL);
- } else {
- layoutNEMDialog(&bmp_icon_question, _("Cancel"), _("Next"),
- _("Levy Recipient"), _("Levy will be paid to"),
- mosaic_creation->definition.levy_address);
- }
-
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- layoutNEMNetworkFee(desc, true, _("Confirm creation fee"),
- mosaic_creation->fee, _("and network fee of"),
- common->fee);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmMosaicCreation(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const NEMMosaicCreation *mosaic_creation) {
- return nem_transaction_create_mosaic_creation(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, mosaic_creation->definition.namespace,
- mosaic_creation->definition.mosaic,
- mosaic_creation->definition.description,
- mosaic_creation->definition.divisibility,
- mosaic_creation->definition.supply,
- mosaic_creation->definition.mutable_supply,
- mosaic_creation->definition.transferable,
- mosaic_creation->definition.has_levy ? mosaic_creation->definition.levy
- : 0,
- mosaic_creation->definition.fee, mosaic_creation->definition.levy_address,
- mosaic_creation->definition.levy_namespace,
- mosaic_creation->definition.levy_mosaic, mosaic_creation->sink,
- mosaic_creation->fee);
-}
-
-bool nem_askSupplyChange(const NEMTransactionCommon *common,
- const NEMMosaicSupplyChange *supply_change,
- const char *desc) {
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"), desc,
- _("Modify supply for"), supply_change->mosaic,
- _("under namespace"), supply_change->namespace, NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- char str_out[32] = {0};
- bn_format_uint64(supply_change->delta, NULL, NULL, 0, 0, false, ',', str_out,
- sizeof(str_out));
-
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), desc,
- supply_change->type == NEMSupplyChangeType_SupplyChange_Increase
- ? _("Increase supply by")
- : _("Decrease supply by"),
- str_out, _("whole units"), NULL, NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- layoutNEMNetworkFee(desc, true, _("Confirm network fee"), common->fee, NULL,
- 0);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmSupplyChange(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const NEMMosaicSupplyChange *supply_change) {
- return nem_transaction_create_mosaic_supply_change(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, supply_change->namespace, supply_change->mosaic,
- supply_change->type, supply_change->delta);
-}
-
-bool nem_askAggregateModification(
- const NEMTransactionCommon *common,
- const NEMAggregateModification *aggregate_modification, const char *desc,
- bool creation) {
- if (creation) {
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"), desc,
- _("Convert account to"), _("multisig account?"), NULL,
- NULL, NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- char address[NEM_ADDRESS_SIZE + 1] = {0};
-
- for (size_t i = 0; i < aggregate_modification->modifications_count; i++) {
- const NEMCosignatoryModification *modification =
- &aggregate_modification->modifications[i];
- nem_get_address(modification->public_key.bytes, common->network, address);
-
- layoutNEMDialog(
- &bmp_icon_question, _("Cancel"), _("Next"), desc,
- modification->type == NEMModificationType_CosignatoryModification_Add
- ? _("Add cosignatory")
- : _("Remove cosignatory"),
- address);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- int32_t relative_change = aggregate_modification->relative_change;
- if (relative_change) {
- char str_out[32] = {0};
- bn_format_uint64(relative_change < 0 ? -relative_change : relative_change,
- NULL, NULL, 0, 0, false, ',', str_out, sizeof(str_out));
-
- layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Next"), desc,
- creation ? _("Set minimum")
- : (relative_change < 0 ? _("Decrease minimum")
- : _("Increase minimum")),
- creation ? _("cosignatories to") : _("cosignatories by"),
- str_out, NULL, NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
- }
-
- layoutNEMNetworkFee(desc, true, _("Confirm network fee"), common->fee, NULL,
- 0);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmAggregateModification(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMAggregateModification *aggregate_modification) {
- bool ret = nem_transaction_create_aggregate_modification(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, aggregate_modification->modifications_count,
- aggregate_modification->relative_change != 0);
- if (!ret) return false;
-
- for (size_t i = 0; i < aggregate_modification->modifications_count; i++) {
- const NEMCosignatoryModification *modification =
- &aggregate_modification->modifications[i];
-
- ret = nem_transaction_write_cosignatory_modification(
- context, modification->type, modification->public_key.bytes);
- if (!ret) return false;
- }
-
- if (aggregate_modification->relative_change) {
- ret = nem_transaction_write_minimum_cosignatories(
- context, aggregate_modification->relative_change);
- if (!ret) return false;
- }
-
- return true;
-}
-
-bool nem_askImportanceTransfer(const NEMTransactionCommon *common,
- const NEMImportanceTransfer *importance_transfer,
- const char *desc) {
- layoutDialogSwipe(
- &bmp_icon_question, _("Cancel"), _("Next"), desc,
- importance_transfer->mode ==
- NEMImportanceTransferMode_ImportanceTransfer_Activate
- ? _("Activate remote")
- : _("Deactivate remote"),
- _("harvesting?"), NULL, NULL, NULL, NULL);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- layoutNEMNetworkFee(desc, true, _("Confirm network fee"), common->fee, NULL,
- 0);
- if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmImportanceTransfer(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMImportanceTransfer *importance_transfer) {
- return nem_transaction_create_importance_transfer(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, importance_transfer->mode,
- importance_transfer->public_key.bytes);
-}
-
-bool nem_askMultisig(const char *address, const char *desc, bool cosigning,
- uint64_t fee) {
- layoutNEMDialog(
- &bmp_icon_question, _("Cancel"), _("Next"), desc,
- cosigning ? _("Cosign transaction for") : _("Initiate transaction for"),
- address);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- layoutNEMNetworkFee(desc, false, _("Confirm multisig fee"), fee, NULL, 0);
- if (!protectButton(ButtonRequestType_ButtonRequest_ConfirmOutput, false)) {
- return false;
- }
-
- return true;
-}
-
-bool nem_fsmMultisig(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const nem_transaction_ctx *inner, bool cosigning) {
- bool ret;
- if (cosigning) {
- ret = nem_transaction_create_multisig_signature(
- context, common->network, common->timestamp, NULL, common->fee,
- common->deadline, inner);
- } else {
- ret = nem_transaction_create_multisig(context, common->network,
- common->timestamp, NULL, common->fee,
- common->deadline, inner);
- }
-
- if (!ret) {
- fsm_sendFailure(FailureType_Failure_ProcessError,
- _("Failed to create multisig transaction"));
- return false;
- }
-
- return true;
-}
-
-const NEMMosaicDefinition *nem_mosaicByName(const char *namespace,
- const char *mosaic,
- uint8_t network) {
- for (size_t i = 0; i < NEM_MOSAIC_DEFINITIONS_COUNT; i++) {
- const NEMMosaicDefinition *definition = &NEM_MOSAIC_DEFINITIONS[i];
-
- if (nem_mosaicMatches(definition, namespace, mosaic, network)) {
- return definition;
- }
- }
-
- return NULL;
-}
-
-static inline size_t format_amount(const NEMMosaicDefinition *definition,
- const bignum256 *amnt,
- const bignum256 *multiplier, int divisor,
- char *str_out, size_t size) {
- bignum256 val = {0};
- memcpy(&val, amnt, sizeof(bignum256));
-
- if (multiplier) {
- bn_multiply(multiplier, &val, &secp256k1.prime);
- divisor += NEM_MOSAIC_DEFINITION_XEM->divisibility;
- }
-
- return bn_format(
- &val, NULL,
- definition && definition->has_ticker ? definition->ticker : NULL,
- definition && definition->has_divisibility ? definition->divisibility : 0,
- -divisor, false, ',', str_out, size);
-}
-
-bool nem_canonicalizeMosaics(NEMTransfer *transfer) {
- size_t old_count = transfer->mosaics_count;
-
- if (old_count <= 1) {
- return true;
- }
-
- NEMMosaic *const mosaics = transfer->mosaics;
-
- bool skip[old_count];
- memzero(skip, sizeof(skip));
-
- size_t new_count = 0;
-
- // Merge duplicates
- for (size_t i = 0; i < old_count; i++) {
- if (skip[i]) continue;
-
- NEMMosaic *mosaic = &mosaics[new_count];
-
- if (new_count++ != i) {
- memcpy(mosaic, &mosaics[i], sizeof(NEMMosaic));
- }
-
- for (size_t j = i + 1; j < old_count; j++) {
- if (skip[j]) continue;
-
- const NEMMosaic *new_mosaic = &mosaics[j];
-
- if (nem_mosaicCompare(mosaic, new_mosaic) == 0) {
- skip[j] = true;
- if (mosaic->quantity + new_mosaic->quantity < mosaic->quantity) {
- // quantity overflow
- return false;
- }
- mosaic->quantity += new_mosaic->quantity;
- }
- }
- }
-
- transfer->mosaics_count = new_count;
-
- // Sort mosaics
- for (size_t i = 0; i < new_count - 1; i++) {
- NEMMosaic *a = &mosaics[i];
-
- for (size_t j = i + 1; j < new_count; j++) {
- NEMMosaic *b = &mosaics[j];
-
- if (nem_mosaicCompare(a, b) > 0) {
- NEMMosaic temp = {0};
- memcpy(&temp, a, sizeof(NEMMosaic));
- memcpy(a, b, sizeof(NEMMosaic));
- memcpy(b, &temp, sizeof(NEMMosaic));
- }
- }
- }
- return true;
-}
-
-void nem_mosaicFormatAmount(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- char *str_out, size_t size) {
- bignum256 amnt = {0};
- bn_read_uint64(quantity, &amnt);
-
- format_amount(definition, &amnt, multiplier, 0, str_out, size);
-}
-
-bool nem_mosaicFormatLevy(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- uint8_t network, char *str_out, size_t size) {
- if (!definition->has_levy || !definition->has_fee) {
- return false;
- }
-
- bignum256 amnt = {0}, fee = {0};
- bn_read_uint64(quantity, &amnt);
- bn_read_uint64(definition->fee, &fee);
-
- const NEMMosaicDefinition *mosaic = nem_mosaicByName(
- definition->levy_namespace, definition->levy_mosaic, network);
-
- switch (definition->levy) {
- case NEMMosaicLevy_MosaicLevy_Absolute:
- return format_amount(mosaic, &fee, NULL, 0, str_out, size);
-
- case NEMMosaicLevy_MosaicLevy_Percentile:
- bn_multiply(&fee, &amnt, &secp256k1.prime);
- return format_amount(mosaic, &amnt, multiplier,
- NEM_LEVY_PERCENTILE_DIVISOR, str_out, size);
-
- default:
- return false;
- }
-}
-
-bool nem_path_check(uint32_t address_n_count, const uint32_t *address_n,
- uint8_t network, bool check_coin_type) {
- bool valid = (address_n_count >= 3);
- valid = valid && (address_n[0] == (PATH_HARDENED | 44));
- valid = valid && (address_n[1] == (PATH_HARDENED | 43) ||
- address_n[1] == (PATH_HARDENED | 1));
- valid = valid && (address_n[2] & PATH_HARDENED);
- valid = valid && ((address_n[2] & PATH_UNHARDEN_MASK) <= PATH_MAX_ACCOUNT);
-
- if (address_n_count == 3) {
- // SEP-0005 for non-UTXO-based currencies, defined by Stellar:
- // https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0005.md
- // m/44'/coin_type'/account'
- // No further checks required.
- } else if (address_n_count == 5) {
- // NanoWallet compatibility path
- // "m/44'/coin_type'/account'/0'/0'"
- valid = valid && (address_n[3] == (PATH_HARDENED | 0));
- valid = valid && (address_n[4] == (PATH_HARDENED | 0));
- } else {
- return false;
- }
-
- if (check_coin_type) {
- // Check that the appropriate coin_type is set for the given network.
- switch (network) {
- case NEM_NETWORK_MAINNET:
- case NEM_NETWORK_MIJIN:
- valid = valid && (address_n[1] == (PATH_HARDENED | 43));
- break;
- case NEM_NETWORK_TESTNET:
- valid = valid && (address_n[1] == (PATH_HARDENED | 1));
- break;
- default:
- return false;
- }
- }
-
- return valid;
-}
### legacy/firmware/nem2.h
@@ -1,156 +0,0 @@
-/*
- * This file is part of the Trezor project, https://trezor.io/
- *
- * Copyright (C) 2017 Saleem Rashid <trezor@saleemrashid.com>
- *
- * This library is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __NEM2_H__
-#define __NEM2_H__
-
-#include "nem.h"
-#include "nem_mosaics.h"
-
-#include "messages-nem.pb.h"
-
-#include <stdbool.h>
-
-const char *nem_validate_common(NEMTransactionCommon *common, bool inner);
-const char *nem_validate_transfer(const NEMTransfer *transfer, uint8_t network);
-const char *nem_validate_provision_namespace(
- const NEMProvisionNamespace *provision_namespace, uint8_t network);
-const char *nem_validate_mosaic_creation(
- const NEMMosaicCreation *mosaic_creation, uint8_t network);
-const char *nem_validate_supply_change(
- const NEMMosaicSupplyChange *supply_change);
-const char *nem_validate_aggregate_modification(
- const NEMAggregateModification *aggregate_modification, bool creation);
-const char *nem_validate_importance_transfer(
- const NEMImportanceTransfer *importance_transfer);
-
-bool nem_askTransfer(const NEMTransactionCommon *common,
- const NEMTransfer *transfer, const char *desc);
-bool nem_fsmTransfer(nem_transaction_ctx *context, const HDNode *node,
- const NEMTransactionCommon *common,
- const NEMTransfer *transfer);
-
-bool nem_askProvisionNamespace(const NEMTransactionCommon *common,
- const NEMProvisionNamespace *provision_namespace,
- const char *desc);
-bool nem_fsmProvisionNamespace(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMProvisionNamespace *provision_namespace);
-
-bool nem_askMosaicCreation(const NEMTransactionCommon *common,
- const NEMMosaicCreation *mosaic_creation,
- const char *desc, const char *address);
-bool nem_fsmMosaicCreation(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const NEMMosaicCreation *mosaic_creation);
-
-bool nem_askSupplyChange(const NEMTransactionCommon *common,
- const NEMMosaicSupplyChange *supply_change,
- const char *desc);
-bool nem_fsmSupplyChange(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const NEMMosaicSupplyChange *supply_change);
-
-bool nem_askAggregateModification(
- const NEMTransactionCommon *common,
- const NEMAggregateModification *aggregate_modification, const char *desc,
- bool creation);
-bool nem_fsmAggregateModification(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMAggregateModification *aggregate_modification);
-
-bool nem_askImportanceTransfer(const NEMTransactionCommon *common,
- const NEMImportanceTransfer *importance_transfer,
- const char *desc);
-bool nem_fsmImportanceTransfer(
- nem_transaction_ctx *context, const NEMTransactionCommon *common,
- const NEMImportanceTransfer *importance_transfer);
-
-bool nem_askMultisig(const char *address, const char *desc, bool cosigning,
- uint64_t fee);
-bool nem_fsmMultisig(nem_transaction_ctx *context,
- const NEMTransactionCommon *common,
- const nem_transaction_ctx *inner, bool cosigning);
-
-const NEMMosaicDefinition *nem_mosaicByName(const char *namespace,
- const char *mosaic,
- uint8_t network);
-
-bool nem_canonicalizeMosaics(NEMTransfer *transfer);
-void nem_mosaicFormatAmount(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- char *str_out, size_t size);
-bool nem_mosaicFormatLevy(const NEMMosaicDefinition *definition,
- uint64_t quantity, const bignum256 *multiplier,
- uint8_t network, char *str_out, size_t size);
-
-bool nem_path_check(uint32_t address_n_count, const uint32_t *address_n,
- uint8_t network, bool check_coin_type);
-
-static inline void nem_mosaicFormatName(const char *namespace,
- const char *mosaic, char *str_out,
- size_t size) {
- strlcpy(str_out, namespace, size);
- strlcat(str_out, ".", size);
- strlcat(str_out, mosaic, size);
-}
-
-static inline bool nem_mosaicMatches(const NEMMosaicDefinition *definition,
- const char *namespace, const char *mosaic,
- uint8_t network) {
- if (strcmp(namespace, definition->namespace) == 0 &&
- strcmp(mosaic, definition->mosaic) == 0) {
- if (definition->networks_count == 0) {
- return true;
- }
-
- for (size_t i = 0; i < definition->networks_count; i++) {
- if (definition->networks[i] == network) {
- return true;
- }
- }
- }
-
- return false;
-}
-
-static inline int nem_mosaicCompare(const NEMMosaic *a, const NEMMosaic *b) {
- size_t namespace_length = strlen(a->namespace);
-
- // Ensure that strlen(a->namespace) <= strlen(b->namespace)
- if (namespace_length > strlen(b->namespace)) {
- return -nem_mosaicCompare(b, a);
- }
-
- int r = strncmp(a->namespace, b->namespace, namespace_length);
-
- if (r == 0 && b->namespace[namespace_length] != '\0') {
- // The next character would be the separator
- r = (':' - b->namespace[namespace_length]);
- }
-
- if (r == 0) {
- // Finally compare the mosaic
- r = strcmp(a->mosaic, b->mosaic);
- }
-
- return r;
-}
-
-#endif
### legacy/firmware/nem_mosaics.c.mako
@@ -1,45 +0,0 @@
-<%
-ATTRIBUTES_REQUIRED = (
- ("namespace", c_str),
- ("mosaic", c_str),
-)
-
-ATTRIBUTES_OPTIONAL = (
- ("name", c_str),
- ("ticker", lambda s: c_str(" " + s) if s else "NULL"),
- ("divisibility", int),
- ("levy", lambda s: "NEMMosaicLevy_" + s),
- ("fee", int),
- ("levy_namespace", c_str),
- ("levy_mosaic", c_str),
-)
-%>\
-// This file is automatically generated from nem_mosaics.c.mako
-// DO NOT EDIT
-
-#include "nem_mosaics.h"
-
-const NEMMosaicDefinition NEM_MOSAIC_DEFINITIONS[NEM_MOSAIC_DEFINITIONS_COUNT] = {
-% for m in supported_on("T1B1", nem):
-{
- % for attr, func in ATTRIBUTES_REQUIRED:
- % if attr in m:
- .${attr} = ${func(m[attr])},
- % endif
- % endfor
- .description = "",
- % for attr, func in ATTRIBUTES_OPTIONAL:
- % if attr in m:
- .has_${attr} = true,
- .${attr} = ${func(m[attr])},
- % endif
- % endfor
- % if "networks" in m:
- .networks_count = ${len(m["networks"])},
- .networks = { ${", ".join(map(str, m["networks"]))} },
- % endif
-},
-% endfor
-};
-
-const NEMMosaicDefinition *NEM_MOSAIC_DEFINITION_XEM = NEM_MOSAIC_DEFINITIONS;
### legacy/firmware/nem_mosaics.h.mako
@@ -1,15 +0,0 @@
-// This file is automatically generated from nem_mosaics.h.mako
-// DO NOT EDIT
-
-#ifndef __NEM_MOSAICS_H__
-#define __NEM_MOSAICS_H__
-
-#include "messages-nem.pb.h"
-
-<% nem_list = list(supported_on("T1B1", nem)) %>\
-#define NEM_MOSAIC_DEFINITIONS_COUNT (${len(nem_list)})
-
-extern const NEMMosaicDefinition NEM_MOSAIC_DEFINITIONS[NEM_MOSAIC_DEFINITIONS_COUNT];
-extern const NEMMosaicDefinition *NEM_MOSAIC_DEFINITION_XEM;
-
-#endif
### legacy/firmware/protob/Makefile
@@ -4,7 +4,7 @@ ifneq ($(V),1)
Q := @
endif
-SKIPPED_MESSAGES := Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos Tron WebAuthn \
+SKIPPED_MESSAGES := Cardano DebugMonero Monero Ontology Ripple SdProtect Tezos Tron WebAuthn \
DebugLinkGetPairingInfo DebugLinkPairingInfo DebugLinkGetGcInfo DebugLinkGcInfoItem \
DebugLinkGcInfo DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \
DebugLinkLayout DebugLinkResetDebugEvents DebugLinkSetBatteryState \
@@ -30,11 +30,11 @@ SKIPPED_MESSAGES := Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tez
ExtAppMessage ExtAppResponse
ifeq ($(BITCOIN_ONLY), 1)
-SKIPPED_MESSAGES += Ethereum NEM Stellar
+SKIPPED_MESSAGES += Ethereum Stellar
endif
PROTO_NAMES = messages messages-bitcoin messages-common messages-crypto messages-debug \
- messages-ethereum messages-definitions messages-management messages-nem \
+ messages-ethereum messages-definitions messages-management \
messages-stellar options
PROTO_OPTIONS = $(PROTO_NAMES:=.options)
### legacy/firmware/protob/messages-nem.options
@@ -1,48 +0,0 @@
-NEMGetAddress.address_n max_count:8
-
-NEMAddress.address max_size:41
-
-NEMDecryptMessage.address_n max_count:8
-NEMDecryptMessage.public_key max_size:32
-NEMDecryptMessage.payload max_size:1072
-
-NEMDecryptedMessage.payload max_size:1024
-
-NEMTransactionCommon.address_n max_count:8
-NEMTransactionCommon.signer max_size:32
-
-NEMTransfer.recipient max_size:41
-NEMTransfer.public_key max_size:32
-NEMTransfer.payload max_size:1024
-NEMTransfer.mosaics max_count:16
-
-NEMMosaic.namespace max_size:145
-NEMMosaic.mosaic max_size:33
-
-NEMProvisionNamespace.namespace max_size:65
-NEMProvisionNamespace.parent max_size:81
-NEMProvisionNamespace.sink max_size:41
-
-NEMMosaicCreation.sink max_size:41
-
-NEMMosaicDefinition.name max_size:32
-NEMMosaicDefinition.ticker max_size:16
-NEMMosaicDefinition.namespace max_size:145
-NEMMosaicDefinition.mosaic max_size:33
-NEMMosaicDefinition.levy_address max_size:41
-NEMMosaicDefinition.levy_namespace max_size:145
-NEMMosaicDefinition.levy_mosaic max_size:33
-NEMMosaicDefinition.description max_size:513
-NEMMosaicDefinition.networks max_count:8
-
-NEMMosaicSupplyChange.namespace max_size:145
-NEMMosaicSupplyChange.mosaic max_size:33
-
-NEMAggregateModification.modifications max_count:16
-
-NEMCosignatoryModification.public_key max_size:32
-
-NEMImportanceTransfer.public_key max_size:32
-
-NEMSignedTx.data max_size:2048
-NEMSignedTx.signature max_size:64
### legacy/firmware/protob/messages-nem.proto
@@ -1 +0,0 @@
-../../vendor/trezor-common/protob/messages-nem.proto
\ No newline at end of file
### legacy/intermediate_fw/Makefile
@@ -34,11 +34,9 @@ CFLAGS += -DSCM_REVISION='"$(shell git rev-parse HEAD | sed 's:\(..\):\\x\1:g')"
CFLAGS += -DUSE_MONERO=0
ifneq ($(BITCOIN_ONLY),1)
CFLAGS += -DUSE_ETHEREUM=1
-CFLAGS += -DUSE_NEM=1
MAKO_RENDER_FLAG =
else
CFLAGS += -DUSE_ETHEREUM=0
-CFLAGS += -DUSE_NEM=0
MAKO_RENDER_FLAG = --bitcoin-only
endif
### python/.changelog.d/7969.incompatible
@@ -0,0 +1 @@
+Removed NEM and EOS support from trezorlib and trezorctl.
### python/docs/OPTIONS.rst
@@ -46,7 +46,6 @@ on one page here.
crypto Miscellaneous cryptography features.
debug Miscellaneous debug features.
device Device management commands - setup, recover seed, wipe, etc.
- eos EOS commands.
ethereum Ethereum commands.
evolu Evolu commands.
fido FIDO2, U2F and WebAuthN management commands.
@@ -55,7 +54,6 @@ on one page here.
get-session Get a session ID for subsequent commands.
list List connected Trezor devices.
monero Monero commands.
- nem NEM commands.
nostr Nostr commands.
ping Send ping message.
ripple Ripple commands.
@@ -231,26 +229,6 @@ Device management commands - setup, recover seed, wipe, etc.
unlock-bootloader Unlocks bootloader.
wipe Reset device to factory defaults and remove all private data.
-EOS commands.
-~~~~~~~~~~~~~
-
-.. code::
-
- trezorctl eos --help
-
-.. code::
-
- Usage: trezorctl eos [OPTIONS] COMMAND [ARGS]...
-
- EOS commands.
-
- Options:
- --help Show this message and exit.
-
- Commands:
- get-public-key Get Eos public key in base58 encoding.
- sign-transaction Sign EOS transaction.
-
Ethereum commands.
~~~~~~~~~~~~~~~~~~
@@ -378,26 +356,6 @@ Monero commands.
get-address Get Monero address for specified path.
get-watch-key Get Monero watch key for specified path.
-NEM commands.
-~~~~~~~~~~~~~
-
-.. code::
-
- trezorctl nem --help
-
-.. code::
-
- Usage: trezorctl nem [OPTIONS] COMMAND [ARGS]...
-
- NEM commands.
-
- Options:
- --help Show this message and exit.
-
- Commands:
- get-address Get NEM address for specified path.
- sign-tx Sign (and optionally broadcast) NEM transaction.
-
Nostr commands.
~~~~~~~~~~~~~~~
### python/src/trezorlib/cli/eos.py
@@ -1,67 +0,0 @@
-# This file is part of the Trezor project.
-#
-# Copyright (C) SatoshiLabs and contributors
-#
-# This library is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the License along with this library.
-# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
-
-import json
-from typing import TYPE_CHECKING, TextIO
-
-import click
-
-from .. import eos, tools
-from . import with_session
-
-if TYPE_CHECKING:
- from .. import messages
- from ..client import Session
-
-PATH_HELP = "BIP-32 path, e.g. m/44h/194h/0h/0/0"
-
-
-@click.group(name="eos")
-def cli() -> None:
- """EOS commands."""
-
-
-@cli.command()
-@click.option("-n", "--address", required=True, help=PATH_HELP)
-@click.option("-d", "--show-display", is_flag=True)
-@with_session
-def get_public_key(session: "Session", address: str, show_display: bool) -> str:
- """Get Eos public key in base58 encoding."""
- address_n = tools.parse_path(address)
- res = eos.get_public_key(session, address_n, show_display)
- return f"WIF: {res.wif_public_key}\nRaw: {res.raw_public_key.hex()}"
-
-
-@cli.command()
-@click.argument("file", type=click.File("r"))
-@click.option("-n", "--address", required=True, help=PATH_HELP)
-@click.option("-f", "--file", "_ignore", is_flag=True, hidden=True, expose_value=False)
-@click.option("-C", "--chunkify", is_flag=True)
-@with_session
-def sign_transaction(
- session: "Session", address: str, file: TextIO, chunkify: bool
-) -> "messages.EosSignedTx":
- """Sign EOS transaction."""
- tx_json = json.load(file)
-
- address_n = tools.parse_path(address)
- return eos.sign_tx(
- session,
- address_n,
- tx_json["transaction"],
- tx_json["chain_id"],
- chunkify=chunkify,
- )
### python/src/trezorlib/cli/nem.py
@@ -1,83 +0,0 @@
-# This file is part of the Trezor project.
-#
-# Copyright (C) SatoshiLabs and contributors
-#
-# This library is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the License along with this library.
-# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
-
-from __future__ import annotations
-
-import json
-from typing import TYPE_CHECKING, TextIO
-
-import click
-import requests
-
-from .. import nem, tools
-from . import with_session
-
-if TYPE_CHECKING:
- from ..client import Session
-
-PATH_HELP = "BIP-32 path, e.g. m/44h/134h/0h/0h"
-
-
-@click.group(name="nem")
-def cli() -> None:
- """NEM commands."""
-
-
-@cli.command()
-@click.option("-n", "--address", required=True, help=PATH_HELP)
-@click.option("-N", "--network", type=int, default=0x68)
-@click.option("-d", "--show-display", is_flag=True)
-@click.option("-C", "--chunkify", is_flag=True)
-@with_session
-def get_address(
- session: Session,
- address: str,
- network: int,
- show_display: bool,
- chunkify: bool,
-) -> str:
- """Get NEM address for specified path."""
- address_n = tools.parse_path(address)
- return nem.get_address(session, address_n, network, show_display, chunkify)
-
-
-@cli.command()
-@click.argument("file", type=click.File("r"))
-@click.option("-n", "--address", required=True, help=PATH_HELP)
-@click.option("-f", "--file", "_ignore", is_flag=True, hidden=True, expose_value=False)
-@click.option("-b", "--broadcast", help="NIS to announce transaction to")
-@click.option("-C", "--chunkify", is_flag=True)
-@with_session
-def sign_tx(
- session: Session,
- address: str,
- file: TextIO,
- broadcast: str | None,
- chunkify: bool,
-) -> dict:
- """Sign (and optionally broadcast) NEM transaction.
-
- Transaction file is expected in the NIS (RequestPrepareAnnounce) format.
- """
- address_n = tools.parse_path(address)
- transaction = nem.sign_tx(session, address_n, json.load(file), chunkify=chunkify)
-
- payload = {"data": transaction.data.hex(), "signature": transaction.signature.hex()}
-
- if broadcast:
- return requests.post(f"{broadcast}/transaction/announce", json=payload).json()
- else:
- return payload
### python/src/trezorlib/cli/trezorctl.py
@@ -46,13 +46,11 @@
crypto,
debug,
device,
- eos,
ethereum,
evolu,
fido,
firmware,
monero,
- nem,
nostr,
ripple,
settings,
@@ -433,12 +431,10 @@ def wait_for_emulator(obj: TrezorConnection, timeout: float) -> None:
cli.add_command(cardano.cli)
cli.add_command(crypto.cli)
cli.add_command(device.cli)
-cli.add_command(eos.cli)
cli.add_command(ethereum.cli)
cli.add_command(evolu.cli)
cli.add_command(fido.cli)
cli.add_command(monero.cli)
-cli.add_command(nem.cli)
cli.add_command(nostr.cli)
cli.add_command(ripple.cli)
cli.add_command(settings.cli)
### python/src/trezorlib/eos.py
@@ -1,365 +0,0 @@
-# This file is part of the Trezor project.
-#
-# Copyright (C) SatoshiLabs and contributors
-#
-# This library is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the License along with this library.
-# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
-
-from datetime import datetime
-from typing import TYPE_CHECKING
-
-from . import exceptions, messages
-from .tools import b58decode, workflow
-
-if TYPE_CHECKING:
- from .client import Session
- from .tools import Address
-
-
-def name_to_number(name: str) -> int:
- length = len(name)
- value = 0
-
- for i in range(0, 13):
- c = 0
- if i < length and i < 13:
- c = char_to_symbol(name[i])
-
- if i < 12:
- c &= 0x1F
- c <<= 64 - 5 * (i + 1)
- else:
- c &= 0x0F
-
- value |= c
-
- return value
-
-
-def char_to_symbol(c: str) -> int:
- if c >= "a" and c <= "z":
- return ord(c) - ord("a") + 6
- elif c >= "1" and c <= "5":
- return ord(c) - ord("1") + 1
- else:
- return 0
-
-
-def parse_asset(asset: str) -> messages.EosAsset:
- amount_str, symbol_str = asset.split(" ")
-
- # "-1.0000" => ["-1", "0000"] => -10000
- amount_parts = amount_str.split(".", maxsplit=1)
- amount = int("".join(amount_parts))
-
- precision = 0
- if len(amount_parts) > 1:
- precision = len(amount_parts[1])
-
- # 4, "EOS" => b"\x04EOS" => little-endian uint32
- symbol_bytes = bytes([precision]) + symbol_str.encode()
- symbol = int.from_bytes(symbol_bytes, "little")
-
- return messages.EosAsset(amount=amount, symbol=symbol)
-
-
-def public_key_to_buffer(pub_key: str) -> tuple[int, bytes]:
- _t = 0
- if pub_key[:3] == "EOS":
- pub_key = pub_key[3:]
- _t = 0
- elif pub_key[:7] == "PUB_K1_":
- pub_key = pub_key[7:]
- _t = 0
- elif pub_key[:7] == "PUB_R1_":
- pub_key = pub_key[7:]
- _t = 1
-
- return _t, b58decode(pub_key, None)[:-4]
-
-
-def parse_common(action: dict) -> messages.EosActionCommon:
- authorization = []
- for auth in action["authorization"]:
- authorization.append(
- messages.EosPermissionLevel(
- actor=name_to_number(auth["actor"]),
- permission=name_to_number(auth["permission"]),
- )
- )
-
- return messages.EosActionCommon(
- account=name_to_number(action["account"]),
- name=name_to_number(action["name"]),
- authorization=authorization,
- )
-
-
-def parse_transfer(data: dict) -> messages.EosActionTransfer:
- return messages.EosActionTransfer(
- sender=name_to_number(data["from"]),
- receiver=name_to_number(data["to"]),
- memo=data["memo"],
- quantity=parse_asset(data["quantity"]),
- )
-
-
-def parse_vote_producer(data: dict) -> messages.EosActionVoteProducer:
- producers = []
- for producer in data["producers"]:
- producers.append(name_to_number(producer))
-
- return messages.EosActionVoteProducer(
- voter=name_to_number(data["account"]),
- proxy=name_to_number(data["proxy"]),
- producers=producers,
- )
-
-
-def parse_buy_ram(data: dict) -> messages.EosActionBuyRam:
- return messages.EosActionBuyRam(
- payer=name_to_number(data["payer"]),
- receiver=name_to_number(data["receiver"]),
- quantity=parse_asset(data["quant"]),
- )
-
-
-def parse_buy_rambytes(data: dict) -> messages.EosActionBuyRamBytes:
- return messages.EosActionBuyRamBytes(
- payer=name_to_number(data["payer"]),
- receiver=name_to_number(data["receiver"]),
- bytes=int(data["bytes"]),
- )
-
-
-def parse_sell_ram(data: dict) -> messages.EosActionSellRam:
- return messages.EosActionSellRam(
- account=name_to_number(data["account"]), bytes=int(data["bytes"])
- )
-
-
-def parse_delegate(data: dict) -> messages.EosActionDelegate:
- return messages.EosActionDelegate(
- sender=name_to_number(data["from"]),
- receiver=name_to_number(data["receiver"]),
- net_quantity=parse_asset(data["stake_net_quantity"]),
- cpu_quantity=parse_asset(data["stake_cpu_quantity"]),
- transfer=bool(data["transfer"]),
- )
-
-
-def parse_undelegate(data: dict) -> messages.EosActionUndelegate:
- return messages.EosActionUndelegate(
- sender=name_to_number(data["from"]),
- receiver=name_to_number(data["receiver"]),
- net_quantity=parse_asset(data["unstake_net_quantity"]),
- cpu_quantity=parse_asset(data["unstake_cpu_quantity"]),
- )
-
-
-def parse_refund(data: dict) -> messages.EosActionRefund:
- return messages.EosActionRefund(owner=name_to_number(data["owner"]))
-
-
-def parse_updateauth(data: dict) -> messages.EosActionUpdateAuth:
- auth = parse_authorization(data["auth"])
-
- return messages.EosActionUpdateAuth(
- account=name_to_number(data["account"]),
- permission=name_to_number(data["permission"]),
- parent=name_to_number(data["parent"]),
- auth=auth,
- )
-
-
-def parse_deleteauth(data: dict) -> messages.EosActionDeleteAuth:
- return messages.EosActionDeleteAuth(
- account=name_to_number(data["account"]),
- permission=name_to_number(data["permission"]),
- )
-
-
-def parse_linkauth(data: dict) -> messages.EosActionLinkAuth:
- return messages.EosActionLinkAuth(
- account=name_to_number(data["account"]),
- code=name_to_number(data["code"]),
- type=name_to_number(data["type"]),
- requirement=name_to_number(data["requirement"]),
- )
-
-
-def parse_unlinkauth(data: dict) -> messages.EosActionUnlinkAuth:
- return messages.EosActionUnlinkAuth(
- account=name_to_number(data["account"]),
- code=name_to_number(data["code"]),
- type=name_to_number(data["type"]),
- )
-
-
-def parse_authorization(data: dict) -> messages.EosAuthorization:
- keys = []
- for key in data["keys"]:
- _t, _k = public_key_to_buffer(key["key"])
-
- keys.append(
- messages.EosAuthorizationKey(type=_t, key=_k, weight=int(key["weight"]))
- )
-
- accounts = []
- for account in data["accounts"]:
- accounts.append(
- messages.EosAuthorizationAccount(
- account=messages.EosPermissionLevel(
- actor=name_to_number(account["permission"]["actor"]),
- permission=name_to_number(account["permission"]["permission"]),
- ),
- weight=int(account["weight"]),
- )
- )
-
- waits = []
- for wait in data["waits"]:
- waits.append(
- messages.EosAuthorizationWait(
- wait_sec=int(wait["wait_sec"]), weight=int(wait["weight"])
- )
- )
-
- return messages.EosAuthorization(
- threshold=int(data["threshold"]), keys=keys, accounts=accounts, waits=waits
- )
-
-
-def parse_new_account(data: dict) -> messages.EosActionNewAccount:
- owner = parse_authorization(data["owner"])
- active = parse_authorization(data["active"])
-
- return messages.EosActionNewAccount(
- creator=name_to_number(data["creator"]),
- name=name_to_number(data["name"]),
- owner=owner,
- active=active,
- )
-
-
-def parse_unknown(data: str) -> messages.EosActionUnknown:
- data_bytes = bytes.fromhex(data)
- return messages.EosActionUnknown(data_size=len(data_bytes), data_chunk=data_bytes)
-
-
-def parse_action(action: dict) -> messages.EosTxActionAck:
- tx_action = messages.EosTxActionAck(common=parse_common(action))
-
- data = action["data"]
- if action["account"] == "eosio":
- if action["name"] == "voteproducer":
- tx_action.vote_producer = parse_vote_producer(data)
- elif action["name"] == "buyram":
- tx_action.buy_ram = parse_buy_ram(data)
- elif action["name"] == "buyrambytes":
- tx_action.buy_ram_bytes = parse_buy_rambytes(data)
- elif action["name"] == "sellram":
- tx_action.sell_ram = parse_sell_ram(data)
- elif action["name"] == "delegatebw":
- tx_action.delegate = parse_delegate(data)
- elif action["name"] == "undelegatebw":
- tx_action.undelegate = parse_undelegate(data)
- elif action["name"] == "refund":
- tx_action.refund = parse_refund(data)
- elif action["name"] == "updateauth":
- tx_action.update_auth = parse_updateauth(data)
- elif action["name"] == "deleteauth":
- tx_action.delete_auth = parse_deleteauth(data)
- elif action["name"] == "linkauth":
- tx_action.link_auth = parse_linkauth(data)
- elif action["name"] == "unlinkauth":
- tx_action.unlink_auth = parse_unlinkauth(data)
- elif action["name"] == "newaccount":
- tx_action.new_account = parse_new_account(data)
- elif action["name"] == "transfer":
- tx_action.transfer = parse_transfer(data)
- else:
- tx_action.unknown = parse_unknown(data)
-
- return tx_action
-
-
-def parse_transaction_json(
- transaction: dict,
-) -> tuple[messages.EosTxHeader, list[messages.EosTxActionAck]]:
- header = messages.EosTxHeader(
- expiration=int(
- (
- datetime.strptime(transaction["expiration"], "%Y-%m-%dT%H:%M:%S")
- - datetime(1970, 1, 1)
- ).total_seconds()
- ),
- ref_block_num=int(transaction["ref_block_num"]),
- ref_block_prefix=int(transaction["ref_block_prefix"]),
- max_net_usage_words=int(transaction["max_net_usage_words"]),
- max_cpu_usage_ms=int(transaction["max_cpu_usage_ms"]),
- delay_sec=int(transaction["delay_sec"]),
- )
-
- actions = [parse_action(a) for a in transaction["actions"]]
-
- return header, actions
-
-
-# ====== Client functions ====== #
-
-
-@workflow(capability=messages.Capability.EOS)
-def get_public_key(
- session: "Session", n: "Address", show_display: bool = False
-) -> messages.EosPublicKey:
- return session.call(
- messages.EosGetPublicKey(address_n=n, show_display=show_display),
- expect=messages.EosPublicKey,
- )
-
-
-@workflow(capability=messages.Capability.EOS)
-def sign_tx(
- session: "Session",
- address: "Address",
- transaction: dict,
- chain_id: str,
- chunkify: bool = False,
-) -> messages.EosSignedTx:
- header, actions = parse_transaction_json(transaction)
-
- msg = messages.EosSignTx(
- address_n=address,
- chain_id=bytes.fromhex(chain_id),
- header=header,
- num_actions=len(actions),
- chunkify=chunkify,
- )
-
- response = session.call(msg)
-
- try:
- while isinstance(response, messages.EosTxActionRequest):
- response = session.call(actions.pop(0))
- except IndexError:
- # pop from empty list
- raise exceptions.TrezorException(
- "Reached end of operations without a signature."
- ) from None
-
- if not isinstance(response, messages.EosSignedTx):
- raise exceptions.TrezorException(
- f"Unexpected message: {response.__class__.__name__}"
- )
-
- return response
### python/src/trezorlib/messages.py
@@ -407,26 +407,6 @@ class MoneroNetworkType(IntEnum):
FAKECHAIN = 3
-class NEMMosaicLevy(IntEnum):
- MosaicLevy_Absolute = 1
- MosaicLevy_Percentile = 2
-
-
-class NEMSupplyChangeType(IntEnum):
- SupplyChange_Increase = 1
- SupplyChange_Decrease = 2
-
-
-class NEMModificationType(IntEnum):
- CosignatoryModification_Add = 1
- CosignatoryModification_Delete = 2
-
-
-class NEMImportanceTransferMode(IntEnum):
- ImportanceTransfer_Activate = 1
- ImportanceTransfer_Deactivate = 2
-
-
class StellarAssetType(IntEnum):
NATIVE = 0
ALPHANUM4 = 1
@@ -689,12 +669,6 @@ class MessageType(IntEnum):
EthereumSignTypedHash = 470
EthereumDefinitionRequest = 471
EthereumDefinitionAck = 472
- NEMGetAddress = 67
- NEMAddress = 68
- NEMSignTx = 69
- NEMSignedTx = 70
- NEMDecryptMessage = 75
- NEMDecryptedMessage = 76
TezosGetAddress = 150
TezosAddress = 151
TezosSignTx = 152
@@ -798,12 +772,6 @@ class MessageType(IntEnum):
MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557
- EosGetPublicKey = 600
- EosPublicKey = 601
- EosSignTx = 602
- EosTxActionRequest = 603
- EosTxActionAck = 604
- EosSignedTx = 605
WebAuthnListResidentCredentials = 800
WebAuthnCredentials = 801
WebAuthnAddResidentCredential = 802
@@ -5014,935 +4982,339 @@ def __init__(
self.provider_name = provider_name
-class EosGetPublicKey(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 600
+class EthereumGetPublicKey(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 450
FIELDS = {
1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None),
- 3: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
address_n: Sequence[int] | None = None,
show_display: bool | None = None,
- chunkify: bool | None = None,
) -> None:
self.address_n: Sequence[int] = address_n if address_n is not None else []
self.show_display = show_display
- self.chunkify = chunkify
-class EosPublicKey(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 601
+class EthereumPublicKey(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 451
FIELDS = {
- 1: protobuf.Field("wif_public_key", "string", repeated=False, required=True),
- 2: protobuf.Field("raw_public_key", "bytes", repeated=False, required=True),
+ 1: protobuf.Field("node", "HDNodeType", repeated=False, required=True),
+ 2: protobuf.Field("xpub", "string", repeated=False, required=True),
}
def __init__(
self,
*,
- wif_public_key: str,
- raw_public_key: bytes,
+ node: HDNodeType,
+ xpub: str,
) -> None:
- self.wif_public_key = wif_public_key
- self.raw_public_key = raw_public_key
+ self.node = node
+ self.xpub = xpub
-class EosSignTx(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 602
+class EthereumGetAddress(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 56
FIELDS = {
1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("chain_id", "bytes", repeated=False, required=True),
- 3: protobuf.Field("header", "EosTxHeader", repeated=False, required=True),
- 4: protobuf.Field("num_actions", "uint32", repeated=False, required=True),
- 5: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
+ 2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None),
+ 3: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
+ 4: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- chain_id: bytes,
- header: EosTxHeader,
- num_actions: int,
address_n: Sequence[int] | None = None,
+ show_display: bool | None = None,
+ encoded_network: bytes | None = None,
chunkify: bool | None = None,
) -> None:
self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.chain_id = chain_id
- self.header = header
- self.num_actions = num_actions
+ self.show_display = show_display
+ self.encoded_network = encoded_network
self.chunkify = chunkify
-class EosTxActionRequest(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 603
+class EthereumAddress(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 57
FIELDS = {
- 1: protobuf.Field("data_size", "uint32", repeated=False, required=False, default=None),
+ 1: protobuf.Field("_old_address", "bytes", repeated=False, required=False, default=None),
+ 2: protobuf.Field("address", "string", repeated=False, required=False, default=None),
+ 3: protobuf.Field("mac", "bytes", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- data_size: int | None = None,
+ _old_address: bytes | None = None,
+ address: str | None = None,
+ mac: bytes | None = None,
) -> None:
- self.data_size = data_size
+ self._old_address = _old_address
+ self.address = address
+ self.mac = mac
-class EosTxActionAck(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 604
+class EthereumSignTx(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 58
FIELDS = {
- 1: protobuf.Field("common", "EosActionCommon", repeated=False, required=True),
- 2: protobuf.Field("transfer", "EosActionTransfer", repeated=False, required=False, default=None),
- 3: protobuf.Field("delegate", "EosActionDelegate", repeated=False, required=False, default=None),
- 4: protobuf.Field("undelegate", "EosActionUndelegate", repeated=False, required=False, default=None),
- 5: protobuf.Field("refund", "EosActionRefund", repeated=False, required=False, default=None),
- 6: protobuf.Field("buy_ram", "EosActionBuyRam", repeated=False, required=False, default=None),
- 7: protobuf.Field("buy_ram_bytes", "EosActionBuyRamBytes", repeated=False, required=False, default=None),
- 8: protobuf.Field("sell_ram", "EosActionSellRam", repeated=False, required=False, default=None),
- 9: protobuf.Field("vote_producer", "EosActionVoteProducer", repeated=False, required=False, default=None),
- 10: protobuf.Field("update_auth", "EosActionUpdateAuth", repeated=False, required=False, default=None),
- 11: protobuf.Field("delete_auth", "EosActionDeleteAuth", repeated=False, required=False, default=None),
- 12: protobuf.Field("link_auth", "EosActionLinkAuth", repeated=False, required=False, default=None),
- 13: protobuf.Field("unlink_auth", "EosActionUnlinkAuth", repeated=False, required=False, default=None),
- 14: protobuf.Field("new_account", "EosActionNewAccount", repeated=False, required=False, default=None),
- 15: protobuf.Field("unknown", "EosActionUnknown", repeated=False, required=False, default=None),
+ 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
+ 2: protobuf.Field("nonce", "bytes", repeated=False, required=False, default=b''),
+ 3: protobuf.Field("gas_price", "bytes", repeated=False, required=True),
+ 4: protobuf.Field("gas_limit", "bytes", repeated=False, required=True),
+ 11: protobuf.Field("to", "string", repeated=False, required=False, default=''),
+ 6: protobuf.Field("value", "bytes", repeated=False, required=False, default=b''),
+ 7: protobuf.Field("data_initial_chunk", "bytes", repeated=False, required=False, default=b''),
+ 8: protobuf.Field("data_length", "uint32", repeated=False, required=False, default=0),
+ 9: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
+ 10: protobuf.Field("tx_type", "uint32", repeated=False, required=False, default=None),
+ 12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
+ 13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
+ 14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
+ 15: protobuf.Field("supports_definition_request", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- common: EosActionCommon,
- transfer: EosActionTransfer | None = None,
- delegate: EosActionDelegate | None = None,
- undelegate: EosActionUndelegate | None = None,
- refund: EosActionRefund | None = None,
- buy_ram: EosActionBuyRam | None = None,
- buy_ram_bytes: EosActionBuyRamBytes | None = None,
- sell_ram: EosActionSellRam | None = None,
- vote_producer: EosActionVoteProducer | None = None,
- update_auth: EosActionUpdateAuth | None = None,
- delete_auth: EosActionDeleteAuth | None = None,
- link_auth: EosActionLinkAuth | None = None,
- unlink_auth: EosActionUnlinkAuth | None = None,
- new_account: EosActionNewAccount | None = None,
- unknown: EosActionUnknown | None = None,
+ gas_price: bytes,
+ gas_limit: bytes,
+ chain_id: int,
+ address_n: Sequence[int] | None = None,
+ nonce: bytes | None = b'',
+ to: str | None = '',
+ value: bytes | None = b'',
+ data_initial_chunk: bytes | None = b'',
+ data_length: int | None = 0,
+ tx_type: int | None = None,
+ definitions: EthereumDefinitions | None = None,
+ chunkify: bool | None = None,
+ payment_req: PaymentRequest | None = None,
+ supports_definition_request: bool | None = None,
) -> None:
- self.common = common
- self.transfer = transfer
- self.delegate = delegate
- self.undelegate = undelegate
- self.refund = refund
- self.buy_ram = buy_ram
- self.buy_ram_bytes = buy_ram_bytes
- self.sell_ram = sell_ram
- self.vote_producer = vote_producer
- self.update_auth = update_auth
- self.delete_auth = delete_auth
- self.link_auth = link_auth
- self.unlink_auth = unlink_auth
- self.new_account = new_account
- self.unknown = unknown
+ self.address_n: Sequence[int] = address_n if address_n is not None else []
+ self.gas_price = gas_price
+ self.gas_limit = gas_limit
+ self.chain_id = chain_id
+ self.nonce = nonce
+ self.to = to
+ self.value = value
+ self.data_initial_chunk = data_initial_chunk
+ self.data_length = data_length
+ self.tx_type = tx_type
+ self.definitions = definitions
+ self.chunkify = chunkify
+ self.payment_req = payment_req
+ self.supports_definition_request = supports_definition_request
-class EosSignedTx(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 605
+class EthereumSignTxEIP1559(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 452
FIELDS = {
- 1: protobuf.Field("signature", "string", repeated=False, required=True),
+ 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
+ 2: protobuf.Field("nonce", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("max_gas_fee", "bytes", repeated=False, required=True),
+ 4: protobuf.Field("max_priority_fee", "bytes", repeated=False, required=True),
+ 5: protobuf.Field("gas_limit", "bytes", repeated=False, required=True),
+ 6: protobuf.Field("to", "string", repeated=False, required=False, default=''),
+ 7: protobuf.Field("value", "bytes", repeated=False, required=True),
+ 8: protobuf.Field("data_initial_chunk", "bytes", repeated=False, required=False, default=b''),
+ 9: protobuf.Field("data_length", "uint32", repeated=False, required=True),
+ 10: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
+ 11: protobuf.Field("access_list", "EthereumAccessList", repeated=True, required=False, default=None),
+ 12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
+ 13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
+ 14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
+ 15: protobuf.Field("supports_definition_request", "bool", repeated=False, required=False, default=None),
+ 16: protobuf.Field("auth7702", "EthereumAuth7702", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- signature: str,
+ nonce: bytes,
+ max_gas_fee: bytes,
+ max_priority_fee: bytes,
+ gas_limit: bytes,
+ value: bytes,
+ data_length: int,
+ chain_id: int,
+ address_n: Sequence[int] | None = None,
+ access_list: Sequence[EthereumAccessList] | None = None,
+ to: str | None = '',
+ data_initial_chunk: bytes | None = b'',
+ definitions: EthereumDefinitions | None = None,
+ chunkify: bool | None = None,
+ payment_req: PaymentRequest | None = None,
+ supports_definition_request: bool | None = None,
+ auth7702: EthereumAuth7702 | None = None,
) -> None:
- self.signature = signature
+ self.address_n: Sequence[int] = address_n if address_n is not None else []
+ self.access_list: Sequence[EthereumAccessList] = access_list if access_list is not None else []
+ self.nonce = nonce
+ self.max_gas_fee = max_gas_fee
+ self.max_priority_fee = max_priority_fee
+ self.gas_limit = gas_limit
+ self.value = value
+ self.data_length = data_length
+ self.chain_id = chain_id
+ self.to = to
+ self.data_initial_chunk = data_initial_chunk
+ self.definitions = definitions
+ self.chunkify = chunkify
+ self.payment_req = payment_req
+ self.supports_definition_request = supports_definition_request
+ self.auth7702 = auth7702
-class EosTxHeader(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumTxRequest(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 59
FIELDS = {
- 1: protobuf.Field("expiration", "uint32", repeated=False, required=True),
- 2: protobuf.Field("ref_block_num", "uint32", repeated=False, required=True),
- 3: protobuf.Field("ref_block_prefix", "uint32", repeated=False, required=True),
- 4: protobuf.Field("max_net_usage_words", "uint32", repeated=False, required=True),
- 5: protobuf.Field("max_cpu_usage_ms", "uint32", repeated=False, required=True),
- 6: protobuf.Field("delay_sec", "uint32", repeated=False, required=True),
+ 1: protobuf.Field("data_length", "uint32", repeated=False, required=False, default=None),
+ 2: protobuf.Field("signature_v", "uint32", repeated=False, required=False, default=None),
+ 3: protobuf.Field("signature_r", "bytes", repeated=False, required=False, default=None),
+ 4: protobuf.Field("signature_s", "bytes", repeated=False, required=False, default=None),
+ 5: protobuf.Field("auth7702_list", "EthereumAuth7702Tuple", repeated=True, required=False, default=None),
}
def __init__(
self,
*,
- expiration: int,
- ref_block_num: int,
- ref_block_prefix: int,
- max_net_usage_words: int,
- max_cpu_usage_ms: int,
- delay_sec: int,
+ auth7702_list: Sequence[EthereumAuth7702Tuple] | None = None,
+ data_length: int | None = None,
+ signature_v: int | None = None,
+ signature_r: bytes | None = None,
+ signature_s: bytes | None = None,
) -> None:
- self.expiration = expiration
- self.ref_block_num = ref_block_num
- self.ref_block_prefix = ref_block_prefix
- self.max_net_usage_words = max_net_usage_words
- self.max_cpu_usage_ms = max_cpu_usage_ms
- self.delay_sec = delay_sec
+ self.auth7702_list: Sequence[EthereumAuth7702Tuple] = auth7702_list if auth7702_list is not None else []
+ self.data_length = data_length
+ self.signature_v = signature_v
+ self.signature_r = signature_r
+ self.signature_s = signature_s
-class EosAsset(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumTxAck(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 60
FIELDS = {
- 1: protobuf.Field("amount", "sint64", repeated=False, required=True),
- 2: protobuf.Field("symbol", "uint64", repeated=False, required=True),
+ 1: protobuf.Field("data_chunk", "bytes", repeated=False, required=True),
}
def __init__(
self,
*,
- amount: int,
- symbol: int,
+ data_chunk: bytes,
) -> None:
- self.amount = amount
- self.symbol = symbol
+ self.data_chunk = data_chunk
-class EosPermissionLevel(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumDefinitionRequest(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 471
FIELDS = {
- 1: protobuf.Field("actor", "uint64", repeated=False, required=True),
- 2: protobuf.Field("permission", "uint64", repeated=False, required=True),
+ 1: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
+ 2: protobuf.Field("token_address", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("func_sig", "bytes", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- actor: int,
- permission: int,
+ chain_id: int,
+ token_address: bytes,
+ func_sig: bytes | None = None,
) -> None:
- self.actor = actor
- self.permission = permission
+ self.chain_id = chain_id
+ self.token_address = token_address
+ self.func_sig = func_sig
-class EosAuthorizationKey(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumDefinitionAck(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 472
FIELDS = {
- 1: protobuf.Field("type", "uint32", repeated=False, required=True),
- 2: protobuf.Field("key", "bytes", repeated=False, required=False, default=None),
- 3: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 4: protobuf.Field("weight", "uint32", repeated=False, required=True),
+ 1: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- type: int,
- weight: int,
- address_n: Sequence[int] | None = None,
- key: bytes | None = None,
+ definitions: EthereumDefinitions | None = None,
) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.type = type
- self.weight = weight
- self.key = key
+ self.definitions = definitions
-class EosAuthorizationAccount(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumSignMessage(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 64
FIELDS = {
- 1: protobuf.Field("account", "EosPermissionLevel", repeated=False, required=True),
- 2: protobuf.Field("weight", "uint32", repeated=False, required=True),
+ 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
+ 2: protobuf.Field("message", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
+ 4: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- account: EosPermissionLevel,
- weight: int,
+ message: bytes,
+ address_n: Sequence[int] | None = None,
+ encoded_network: bytes | None = None,
+ chunkify: bool | None = None,
) -> None:
- self.account = account
- self.weight = weight
+ self.address_n: Sequence[int] = address_n if address_n is not None else []
+ self.message = message
+ self.encoded_network = encoded_network
+ self.chunkify = chunkify
-class EosAuthorizationWait(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumMessageSignature(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 66
FIELDS = {
- 1: protobuf.Field("wait_sec", "uint32", repeated=False, required=True),
- 2: protobuf.Field("weight", "uint32", repeated=False, required=True),
+ 2: protobuf.Field("signature", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("address", "string", repeated=False, required=True),
}
def __init__(
self,
*,
- wait_sec: int,
- weight: int,
+ signature: bytes,
+ address: str,
) -> None:
- self.wait_sec = wait_sec
- self.weight = weight
+ self.signature = signature
+ self.address = address
-class EosAuthorization(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumVerifyMessage(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 65
FIELDS = {
- 1: protobuf.Field("threshold", "uint32", repeated=False, required=True),
- 2: protobuf.Field("keys", "EosAuthorizationKey", repeated=True, required=False, default=None),
- 3: protobuf.Field("accounts", "EosAuthorizationAccount", repeated=True, required=False, default=None),
- 4: protobuf.Field("waits", "EosAuthorizationWait", repeated=True, required=False, default=None),
+ 2: protobuf.Field("signature", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("message", "bytes", repeated=False, required=True),
+ 4: protobuf.Field("address", "string", repeated=False, required=True),
+ 5: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
- threshold: int,
- keys: Sequence[EosAuthorizationKey] | None = None,
- accounts: Sequence[EosAuthorizationAccount] | None = None,
- waits: Sequence[EosAuthorizationWait] | None = None,
+ signature: bytes,
+ message: bytes,
+ address: str,
+ chunkify: bool | None = None,
) -> None:
- self.keys: Sequence[EosAuthorizationKey] = keys if keys is not None else []
- self.accounts: Sequence[EosAuthorizationAccount] = accounts if accounts is not None else []
- self.waits: Sequence[EosAuthorizationWait] = waits if waits is not None else []
- self.threshold = threshold
+ self.signature = signature
+ self.message = message
+ self.address = address
+ self.chunkify = chunkify
-class EosActionCommon(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
+class EthereumSignTypedHash(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 470
FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("name", "uint64", repeated=False, required=True),
- 3: protobuf.Field("authorization", "EosPermissionLevel", repeated=True, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- account: int,
- name: int,
- authorization: Sequence[EosPermissionLevel] | None = None,
- ) -> None:
- self.authorization: Sequence[EosPermissionLevel] = authorization if authorization is not None else []
- self.account = account
- self.name = name
-
-
-class EosActionTransfer(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("sender", "uint64", repeated=False, required=True),
- 2: protobuf.Field("receiver", "uint64", repeated=False, required=True),
- 3: protobuf.Field("quantity", "EosAsset", repeated=False, required=True),
- 4: protobuf.Field("memo", "string", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- sender: int,
- receiver: int,
- quantity: EosAsset,
- memo: str,
- ) -> None:
- self.sender = sender
- self.receiver = receiver
- self.quantity = quantity
- self.memo = memo
-
-
-class EosActionDelegate(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("sender", "uint64", repeated=False, required=True),
- 2: protobuf.Field("receiver", "uint64", repeated=False, required=True),
- 3: protobuf.Field("net_quantity", "EosAsset", repeated=False, required=True),
- 4: protobuf.Field("cpu_quantity", "EosAsset", repeated=False, required=True),
- 5: protobuf.Field("transfer", "bool", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- sender: int,
- receiver: int,
- net_quantity: EosAsset,
- cpu_quantity: EosAsset,
- transfer: bool,
- ) -> None:
- self.sender = sender
- self.receiver = receiver
- self.net_quantity = net_quantity
- self.cpu_quantity = cpu_quantity
- self.transfer = transfer
-
-
-class EosActionUndelegate(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("sender", "uint64", repeated=False, required=True),
- 2: protobuf.Field("receiver", "uint64", repeated=False, required=True),
- 3: protobuf.Field("net_quantity", "EosAsset", repeated=False, required=True),
- 4: protobuf.Field("cpu_quantity", "EosAsset", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- sender: int,
- receiver: int,
- net_quantity: EosAsset,
- cpu_quantity: EosAsset,
- ) -> None:
- self.sender = sender
- self.receiver = receiver
- self.net_quantity = net_quantity
- self.cpu_quantity = cpu_quantity
-
-
-class EosActionRefund(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("owner", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- owner: int,
- ) -> None:
- self.owner = owner
-
-
-class EosActionBuyRam(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("payer", "uint64", repeated=False, required=True),
- 2: protobuf.Field("receiver", "uint64", repeated=False, required=True),
- 3: protobuf.Field("quantity", "EosAsset", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- payer: int,
- receiver: int,
- quantity: EosAsset,
- ) -> None:
- self.payer = payer
- self.receiver = receiver
- self.quantity = quantity
-
-
-class EosActionBuyRamBytes(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("payer", "uint64", repeated=False, required=True),
- 2: protobuf.Field("receiver", "uint64", repeated=False, required=True),
- 3: protobuf.Field("bytes", "uint32", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- payer: int,
- receiver: int,
- bytes: int,
- ) -> None:
- self.payer = payer
- self.receiver = receiver
- self.bytes = bytes
-
-
-class EosActionSellRam(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("bytes", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- account: int,
- bytes: int,
- ) -> None:
- self.account = account
- self.bytes = bytes
-
-
-class EosActionVoteProducer(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("voter", "uint64", repeated=False, required=True),
- 2: protobuf.Field("proxy", "uint64", repeated=False, required=True),
- 3: protobuf.Field("producers", "uint64", repeated=True, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- voter: int,
- proxy: int,
- producers: Sequence[int] | None = None,
- ) -> None:
- self.producers: Sequence[int] = producers if producers is not None else []
- self.voter = voter
- self.proxy = proxy
-
-
-class EosActionUpdateAuth(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("permission", "uint64", repeated=False, required=True),
- 3: protobuf.Field("parent", "uint64", repeated=False, required=True),
- 4: protobuf.Field("auth", "EosAuthorization", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- account: int,
- permission: int,
- parent: int,
- auth: EosAuthorization,
- ) -> None:
- self.account = account
- self.permission = permission
- self.parent = parent
- self.auth = auth
-
-
-class EosActionDeleteAuth(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("permission", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- account: int,
- permission: int,
- ) -> None:
- self.account = account
- self.permission = permission
-
-
-class EosActionLinkAuth(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("code", "uint64", repeated=False, required=True),
- 3: protobuf.Field("type", "uint64", repeated=False, required=True),
- 4: protobuf.Field("requirement", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- account: int,
- code: int,
- type: int,
- requirement: int,
- ) -> None:
- self.account = account
- self.code = code
- self.type = type
- self.requirement = requirement
-
-
-class EosActionUnlinkAuth(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("account", "uint64", repeated=False, required=True),
- 2: protobuf.Field("code", "uint64", repeated=False, required=True),
- 3: protobuf.Field("type", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- account: int,
- code: int,
- type: int,
- ) -> None:
- self.account = account
- self.code = code
- self.type = type
-
-
-class EosActionNewAccount(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("creator", "uint64", repeated=False, required=True),
- 2: protobuf.Field("name", "uint64", repeated=False, required=True),
- 3: protobuf.Field("owner", "EosAuthorization", repeated=False, required=True),
- 4: protobuf.Field("active", "EosAuthorization", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- creator: int,
- name: int,
- owner: EosAuthorization,
- active: EosAuthorization,
- ) -> None:
- self.creator = creator
- self.name = name
- self.owner = owner
- self.active = active
-
-
-class EosActionUnknown(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("data_size", "uint32", repeated=False, required=True),
- 2: protobuf.Field("data_chunk", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- data_size: int,
- data_chunk: bytes,
- ) -> None:
- self.data_size = data_size
- self.data_chunk = data_chunk
-
-
-class EthereumGetPublicKey(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 450
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- address_n: Sequence[int] | None = None,
- show_display: bool | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.show_display = show_display
-
-
-class EthereumPublicKey(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 451
- FIELDS = {
- 1: protobuf.Field("node", "HDNodeType", repeated=False, required=True),
- 2: protobuf.Field("xpub", "string", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- node: HDNodeType,
- xpub: str,
- ) -> None:
- self.node = node
- self.xpub = xpub
-
-
-class EthereumGetAddress(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 56
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None),
- 3: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- address_n: Sequence[int] | None = None,
- show_display: bool | None = None,
- encoded_network: bytes | None = None,
- chunkify: bool | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.show_display = show_display
- self.encoded_network = encoded_network
- self.chunkify = chunkify
-
-
-class EthereumAddress(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 57
- FIELDS = {
- 1: protobuf.Field("_old_address", "bytes", repeated=False, required=False, default=None),
- 2: protobuf.Field("address", "string", repeated=False, required=False, default=None),
- 3: protobuf.Field("mac", "bytes", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- _old_address: bytes | None = None,
- address: str | None = None,
- mac: bytes | None = None,
- ) -> None:
- self._old_address = _old_address
- self.address = address
- self.mac = mac
-
-
-class EthereumSignTx(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 58
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("nonce", "bytes", repeated=False, required=False, default=b''),
- 3: protobuf.Field("gas_price", "bytes", repeated=False, required=True),
- 4: protobuf.Field("gas_limit", "bytes", repeated=False, required=True),
- 11: protobuf.Field("to", "string", repeated=False, required=False, default=''),
- 6: protobuf.Field("value", "bytes", repeated=False, required=False, default=b''),
- 7: protobuf.Field("data_initial_chunk", "bytes", repeated=False, required=False, default=b''),
- 8: protobuf.Field("data_length", "uint32", repeated=False, required=False, default=0),
- 9: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
- 10: protobuf.Field("tx_type", "uint32", repeated=False, required=False, default=None),
- 12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
- 13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- 14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
- 15: protobuf.Field("supports_definition_request", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- gas_price: bytes,
- gas_limit: bytes,
- chain_id: int,
- address_n: Sequence[int] | None = None,
- nonce: bytes | None = b'',
- to: str | None = '',
- value: bytes | None = b'',
- data_initial_chunk: bytes | None = b'',
- data_length: int | None = 0,
- tx_type: int | None = None,
- definitions: EthereumDefinitions | None = None,
- chunkify: bool | None = None,
- payment_req: PaymentRequest | None = None,
- supports_definition_request: bool | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.gas_price = gas_price
- self.gas_limit = gas_limit
- self.chain_id = chain_id
- self.nonce = nonce
- self.to = to
- self.value = value
- self.data_initial_chunk = data_initial_chunk
- self.data_length = data_length
- self.tx_type = tx_type
- self.definitions = definitions
- self.chunkify = chunkify
- self.payment_req = payment_req
- self.supports_definition_request = supports_definition_request
-
-
-class EthereumSignTxEIP1559(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 452
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("nonce", "bytes", repeated=False, required=True),
- 3: protobuf.Field("max_gas_fee", "bytes", repeated=False, required=True),
- 4: protobuf.Field("max_priority_fee", "bytes", repeated=False, required=True),
- 5: protobuf.Field("gas_limit", "bytes", repeated=False, required=True),
- 6: protobuf.Field("to", "string", repeated=False, required=False, default=''),
- 7: protobuf.Field("value", "bytes", repeated=False, required=True),
- 8: protobuf.Field("data_initial_chunk", "bytes", repeated=False, required=False, default=b''),
- 9: protobuf.Field("data_length", "uint32", repeated=False, required=True),
- 10: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
- 11: protobuf.Field("access_list", "EthereumAccessList", repeated=True, required=False, default=None),
- 12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
- 13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- 14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
- 15: protobuf.Field("supports_definition_request", "bool", repeated=False, required=False, default=None),
- 16: protobuf.Field("auth7702", "EthereumAuth7702", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- nonce: bytes,
- max_gas_fee: bytes,
- max_priority_fee: bytes,
- gas_limit: bytes,
- value: bytes,
- data_length: int,
- chain_id: int,
- address_n: Sequence[int] | None = None,
- access_list: Sequence[EthereumAccessList] | None = None,
- to: str | None = '',
- data_initial_chunk: bytes | None = b'',
- definitions: EthereumDefinitions | None = None,
- chunkify: bool | None = None,
- payment_req: PaymentRequest | None = None,
- supports_definition_request: bool | None = None,
- auth7702: EthereumAuth7702 | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.access_list: Sequence[EthereumAccessList] = access_list if access_list is not None else []
- self.nonce = nonce
- self.max_gas_fee = max_gas_fee
- self.max_priority_fee = max_priority_fee
- self.gas_limit = gas_limit
- self.value = value
- self.data_length = data_length
- self.chain_id = chain_id
- self.to = to
- self.data_initial_chunk = data_initial_chunk
- self.definitions = definitions
- self.chunkify = chunkify
- self.payment_req = payment_req
- self.supports_definition_request = supports_definition_request
- self.auth7702 = auth7702
-
-
-class EthereumTxRequest(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 59
- FIELDS = {
- 1: protobuf.Field("data_length", "uint32", repeated=False, required=False, default=None),
- 2: protobuf.Field("signature_v", "uint32", repeated=False, required=False, default=None),
- 3: protobuf.Field("signature_r", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("signature_s", "bytes", repeated=False, required=False, default=None),
- 5: protobuf.Field("auth7702_list", "EthereumAuth7702Tuple", repeated=True, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- auth7702_list: Sequence[EthereumAuth7702Tuple] | None = None,
- data_length: int | None = None,
- signature_v: int | None = None,
- signature_r: bytes | None = None,
- signature_s: bytes | None = None,
- ) -> None:
- self.auth7702_list: Sequence[EthereumAuth7702Tuple] = auth7702_list if auth7702_list is not None else []
- self.data_length = data_length
- self.signature_v = signature_v
- self.signature_r = signature_r
- self.signature_s = signature_s
-
-
-class EthereumTxAck(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 60
- FIELDS = {
- 1: protobuf.Field("data_chunk", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- data_chunk: bytes,
- ) -> None:
- self.data_chunk = data_chunk
-
-
-class EthereumDefinitionRequest(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 471
- FIELDS = {
- 1: protobuf.Field("chain_id", "uint64", repeated=False, required=True),
- 2: protobuf.Field("token_address", "bytes", repeated=False, required=True),
- 3: protobuf.Field("func_sig", "bytes", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- chain_id: int,
- token_address: bytes,
- func_sig: bytes | None = None,
- ) -> None:
- self.chain_id = chain_id
- self.token_address = token_address
- self.func_sig = func_sig
-
-
-class EthereumDefinitionAck(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 472
- FIELDS = {
- 1: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- definitions: EthereumDefinitions | None = None,
- ) -> None:
- self.definitions = definitions
-
-
-class EthereumSignMessage(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 64
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("message", "bytes", repeated=False, required=True),
- 3: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- message: bytes,
- address_n: Sequence[int] | None = None,
- encoded_network: bytes | None = None,
- chunkify: bool | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.message = message
- self.encoded_network = encoded_network
- self.chunkify = chunkify
-
-
-class EthereumMessageSignature(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 66
- FIELDS = {
- 2: protobuf.Field("signature", "bytes", repeated=False, required=True),
- 3: protobuf.Field("address", "string", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- signature: bytes,
- address: str,
- ) -> None:
- self.signature = signature
- self.address = address
-
-
-class EthereumVerifyMessage(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 65
- FIELDS = {
- 2: protobuf.Field("signature", "bytes", repeated=False, required=True),
- 3: protobuf.Field("message", "bytes", repeated=False, required=True),
- 4: protobuf.Field("address", "string", repeated=False, required=True),
- 5: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- signature: bytes,
- message: bytes,
- address: str,
- chunkify: bool | None = None,
- ) -> None:
- self.signature = signature
- self.message = message
- self.address = address
- self.chunkify = chunkify
-
-
-class EthereumSignTypedHash(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 470
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("domain_separator_hash", "bytes", repeated=False, required=True),
- 3: protobuf.Field("message_hash", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
+ 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
+ 2: protobuf.Field("domain_separator_hash", "bytes", repeated=False, required=True),
+ 3: protobuf.Field("message_hash", "bytes", repeated=False, required=False, default=None),
+ 4: protobuf.Field("encoded_network", "bytes", repeated=False, required=False, default=None),
}
def __init__(
@@ -7417,386 +6789,6 @@ def __init__(
self.blob = blob
-class NEMGetAddress(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 67
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("network", "uint32", repeated=False, required=False, default=104),
- 3: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None),
- 4: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- address_n: Sequence[int] | None = None,
- network: int | None = 104,
- show_display: bool | None = None,
- chunkify: bool | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.network = network
- self.show_display = show_display
- self.chunkify = chunkify
-
-
-class NEMAddress(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 68
- FIELDS = {
- 1: protobuf.Field("address", "string", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- address: str,
- ) -> None:
- self.address = address
-
-
-class NEMSignTx(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 69
- FIELDS = {
- 1: protobuf.Field("transaction", "NEMTransactionCommon", repeated=False, required=True),
- 2: protobuf.Field("multisig", "NEMTransactionCommon", repeated=False, required=False, default=None),
- 3: protobuf.Field("transfer", "NEMTransfer", repeated=False, required=False, default=None),
- 4: protobuf.Field("cosigning", "bool", repeated=False, required=False, default=None),
- 5: protobuf.Field("provision_namespace", "NEMProvisionNamespace", repeated=False, required=False, default=None),
- 6: protobuf.Field("mosaic_creation", "NEMMosaicCreation", repeated=False, required=False, default=None),
- 7: protobuf.Field("supply_change", "NEMMosaicSupplyChange", repeated=False, required=False, default=None),
- 8: protobuf.Field("aggregate_modification", "NEMAggregateModification", repeated=False, required=False, default=None),
- 9: protobuf.Field("importance_transfer", "NEMImportanceTransfer", repeated=False, required=False, default=None),
- 10: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- transaction: NEMTransactionCommon,
- multisig: NEMTransactionCommon | None = None,
- transfer: NEMTransfer | None = None,
- cosigning: bool | None = None,
- provision_namespace: NEMProvisionNamespace | None = None,
- mosaic_creation: NEMMosaicCreation | None = None,
- supply_change: NEMMosaicSupplyChange | None = None,
- aggregate_modification: NEMAggregateModification | None = None,
- importance_transfer: NEMImportanceTransfer | None = None,
- chunkify: bool | None = None,
- ) -> None:
- self.transaction = transaction
- self.multisig = multisig
- self.transfer = transfer
- self.cosigning = cosigning
- self.provision_namespace = provision_namespace
- self.mosaic_creation = mosaic_creation
- self.supply_change = supply_change
- self.aggregate_modification = aggregate_modification
- self.importance_transfer = importance_transfer
- self.chunkify = chunkify
-
-
-class NEMSignedTx(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 70
- FIELDS = {
- 1: protobuf.Field("data", "bytes", repeated=False, required=True),
- 2: protobuf.Field("signature", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- data: bytes,
- signature: bytes,
- ) -> None:
- self.data = data
- self.signature = signature
-
-
-class NEMDecryptMessage(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 75
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("network", "uint32", repeated=False, required=False, default=None),
- 3: protobuf.Field("public_key", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("payload", "bytes", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- address_n: Sequence[int] | None = None,
- network: int | None = None,
- public_key: bytes | None = None,
- payload: bytes | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.network = network
- self.public_key = public_key
- self.payload = payload
-
-
-class NEMDecryptedMessage(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = 76
- FIELDS = {
- 1: protobuf.Field("payload", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- payload: bytes,
- ) -> None:
- self.payload = payload
-
-
-class NEMTransactionCommon(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None),
- 2: protobuf.Field("network", "uint32", repeated=False, required=False, default=104),
- 3: protobuf.Field("timestamp", "uint32", repeated=False, required=True),
- 4: protobuf.Field("fee", "uint64", repeated=False, required=True),
- 5: protobuf.Field("deadline", "uint32", repeated=False, required=True),
- 6: protobuf.Field("signer", "bytes", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- timestamp: int,
- fee: int,
- deadline: int,
- address_n: Sequence[int] | None = None,
- network: int | None = 104,
- signer: bytes | None = None,
- ) -> None:
- self.address_n: Sequence[int] = address_n if address_n is not None else []
- self.timestamp = timestamp
- self.fee = fee
- self.deadline = deadline
- self.network = network
- self.signer = signer
-
-
-class NEMTransfer(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("recipient", "string", repeated=False, required=True),
- 2: protobuf.Field("amount", "uint64", repeated=False, required=True),
- 3: protobuf.Field("payload", "bytes", repeated=False, required=False, default=None),
- 4: protobuf.Field("public_key", "bytes", repeated=False, required=False, default=None),
- 5: protobuf.Field("mosaics", "NEMMosaic", repeated=True, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- recipient: str,
- amount: int,
- mosaics: Sequence[NEMMosaic] | None = None,
- payload: bytes | None = None,
- public_key: bytes | None = None,
- ) -> None:
- self.mosaics: Sequence[NEMMosaic] = mosaics if mosaics is not None else []
- self.recipient = recipient
- self.amount = amount
- self.payload = payload
- self.public_key = public_key
-
-
-class NEMProvisionNamespace(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("namespace", "string", repeated=False, required=True),
- 2: protobuf.Field("parent", "string", repeated=False, required=False, default=None),
- 3: protobuf.Field("sink", "string", repeated=False, required=True),
- 4: protobuf.Field("fee", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- namespace: str,
- sink: str,
- fee: int,
- parent: str | None = None,
- ) -> None:
- self.namespace = namespace
- self.sink = sink
- self.fee = fee
- self.parent = parent
-
-
-class NEMMosaicCreation(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("definition", "NEMMosaicDefinition", repeated=False, required=True),
- 2: protobuf.Field("sink", "string", repeated=False, required=True),
- 3: protobuf.Field("fee", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- definition: NEMMosaicDefinition,
- sink: str,
- fee: int,
- ) -> None:
- self.definition = definition
- self.sink = sink
- self.fee = fee
-
-
-class NEMMosaicSupplyChange(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("namespace", "string", repeated=False, required=True),
- 2: protobuf.Field("mosaic", "string", repeated=False, required=True),
- 3: protobuf.Field("type", "NEMSupplyChangeType", repeated=False, required=True),
- 4: protobuf.Field("delta", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- namespace: str,
- mosaic: str,
- type: NEMSupplyChangeType,
- delta: int,
- ) -> None:
- self.namespace = namespace
- self.mosaic = mosaic
- self.type = type
- self.delta = delta
-
-
-class NEMAggregateModification(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("modifications", "NEMCosignatoryModification", repeated=True, required=False, default=None),
- 2: protobuf.Field("relative_change", "sint32", repeated=False, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- modifications: Sequence[NEMCosignatoryModification] | None = None,
- relative_change: int | None = None,
- ) -> None:
- self.modifications: Sequence[NEMCosignatoryModification] = modifications if modifications is not None else []
- self.relative_change = relative_change
-
-
-class NEMImportanceTransfer(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("mode", "NEMImportanceTransferMode", repeated=False, required=True),
- 2: protobuf.Field("public_key", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- mode: NEMImportanceTransferMode,
- public_key: bytes,
- ) -> None:
- self.mode = mode
- self.public_key = public_key
-
-
-class NEMMosaic(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("namespace", "string", repeated=False, required=True),
- 2: protobuf.Field("mosaic", "string", repeated=False, required=True),
- 3: protobuf.Field("quantity", "uint64", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- namespace: str,
- mosaic: str,
- quantity: int,
- ) -> None:
- self.namespace = namespace
- self.mosaic = mosaic
- self.quantity = quantity
-
-
-class NEMMosaicDefinition(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("name", "string", repeated=False, required=False, default=None),
- 2: protobuf.Field("ticker", "string", repeated=False, required=False, default=None),
- 3: protobuf.Field("namespace", "string", repeated=False, required=True),
- 4: protobuf.Field("mosaic", "string", repeated=False, required=True),
- 5: protobuf.Field("divisibility", "uint32", repeated=False, required=False, default=None),
- 6: protobuf.Field("levy", "NEMMosaicLevy", repeated=False, required=False, default=None),
- 7: protobuf.Field("fee", "uint64", repeated=False, required=False, default=None),
- 8: protobuf.Field("levy_address", "string", repeated=False, required=False, default=None),
- 9: protobuf.Field("levy_namespace", "string", repeated=False, required=False, default=None),
- 10: protobuf.Field("levy_mosaic", "string", repeated=False, required=False, default=None),
- 11: protobuf.Field("supply", "uint64", repeated=False, required=False, default=None),
- 12: protobuf.Field("mutable_supply", "bool", repeated=False, required=False, default=None),
- 13: protobuf.Field("transferable", "bool", repeated=False, required=False, default=None),
- 14: protobuf.Field("description", "string", repeated=False, required=True),
- 15: protobuf.Field("networks", "uint32", repeated=True, required=False, default=None),
- }
-
- def __init__(
- self,
- *,
- namespace: str,
- mosaic: str,
- description: str,
- networks: Sequence[int] | None = None,
- name: str | None = None,
- ticker: str | None = None,
- divisibility: int | None = None,
- levy: NEMMosaicLevy | None = None,
- fee: int | None = None,
- levy_address: str | None = None,
- levy_namespace: str | None = None,
- levy_mosaic: str | None = None,
- supply: int | None = None,
- mutable_supply: bool | None = None,
- transferable: bool | None = None,
- ) -> None:
- self.networks: Sequence[int] = networks if networks is not None else []
- self.namespace = namespace
- self.mosaic = mosaic
- self.description = description
- self.name = name
- self.ticker = ticker
- self.divisibility = divisibility
- self.levy = levy
- self.fee = fee
- self.levy_address = levy_address
- self.levy_namespace = levy_namespace
- self.levy_mosaic = levy_mosaic
- self.supply = supply
- self.mutable_supply = mutable_supply
- self.transferable = transferable
-
-
-class NEMCosignatoryModification(protobuf.MessageType):
- MESSAGE_WIRE_TYPE = None
- FIELDS = {
- 1: protobuf.Field("type", "NEMModificationType", repeated=False, required=True),
- 2: protobuf.Field("public_key", "bytes", repeated=False, required=True),
- }
-
- def __init__(
- self,
- *,
- type: NEMModificationType,
- public_key: bytes,
- ) -> None:
- self.type = type
- self.public_key = public_key
-
-
class NostrGetPubkey(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 2001
FIELDS = {
### python/src/trezorlib/nem.py
@@ -1,225 +0,0 @@
-# This file is part of the Trezor project.
-#
-# Copyright (C) SatoshiLabs and contributors
-#
-# This library is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the License along with this library.
-# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
-
-import json
-from typing import TYPE_CHECKING
-
-from . import exceptions, messages
-from .tools import workflow
-
-if TYPE_CHECKING:
- from .client import Session
- from .tools import Address
-
-TYPE_TRANSACTION_TRANSFER = 0x0101
-TYPE_IMPORTANCE_TRANSFER = 0x0801
-TYPE_AGGREGATE_MODIFICATION = 0x1001
-TYPE_MULTISIG_SIGNATURE = 0x1002
-TYPE_MULTISIG = 0x1004
-TYPE_PROVISION_NAMESPACE = 0x2001
-TYPE_MOSAIC_CREATION = 0x4001
-TYPE_MOSAIC_SUPPLY_CHANGE = 0x4002
-
-
-def create_transaction_common(transaction: dict) -> messages.NEMTransactionCommon:
- msg = messages.NEMTransactionCommon(
- network=(transaction["version"] >> 24) & 0xFF,
- timestamp=transaction["timeStamp"],
- fee=transaction["fee"],
- deadline=transaction["deadline"],
- )
-
- if "signer" in transaction:
- msg.signer = bytes.fromhex(transaction["signer"])
-
- return msg
-
-
-def create_transfer(transaction: dict) -> messages.NEMTransfer:
- msg = messages.NEMTransfer(
- recipient=transaction["recipient"], amount=transaction["amount"]
- )
-
- if "payload" in transaction["message"]:
- msg.payload = bytes.fromhex(transaction["message"]["payload"])
-
- if transaction["message"]["type"] == 0x02:
- msg.public_key = bytes.fromhex(transaction["message"]["publicKey"])
-
- if "mosaics" in transaction:
- msg.mosaics = [
- messages.NEMMosaic(
- namespace=mosaic["mosaicId"]["namespaceId"],
- mosaic=mosaic["mosaicId"]["name"],
- quantity=mosaic["quantity"],
- )
- for mosaic in transaction["mosaics"]
- ]
-
- return msg
-
-
-def create_aggregate_modification(
- transaction: dict,
-) -> messages.NEMAggregateModification:
- msg = messages.NEMAggregateModification(
- modifications=[
- messages.NEMCosignatoryModification(
- type=modification["modificationType"],
- public_key=bytes.fromhex(modification["cosignatoryAccount"]),
- )
- for modification in transaction["modifications"]
- ]
- )
-
- if "minCosignatories" in transaction:
- msg.relative_change = transaction["minCosignatories"]["relativeChange"]
-
- return msg
-
-
-def create_provision_namespace(transaction: dict) -> messages.NEMProvisionNamespace:
- msg = messages.NEMProvisionNamespace(
- sink=transaction["rentalFeeSink"],
- fee=transaction["rentalFee"],
- namespace=transaction["newPart"],
- )
-
- if transaction["parent"]:
- msg.parent = transaction["parent"]
-
- return msg
-
-
-def create_mosaic_creation(transaction: dict) -> messages.NEMMosaicCreation:
- definition_dict = transaction["mosaicDefinition"]
-
- definition = messages.NEMMosaicDefinition(
- namespace=definition_dict["id"]["namespaceId"],
- mosaic=definition_dict["id"]["name"],
- description=definition_dict["description"],
- )
-
- if definition_dict["levy"]:
- definition.levy = definition_dict["levy"]["type"]
- definition.fee = definition_dict["levy"]["fee"]
- definition.levy_address = definition_dict["levy"]["recipient"]
- definition.levy_namespace = definition_dict["levy"]["mosaicId"]["namespaceId"]
- definition.levy_mosaic = definition_dict["levy"]["mosaicId"]["name"]
-
- for property in definition_dict["properties"]:
- name = property["name"]
- value = json.loads(property["value"])
-
- if name == "divisibility":
- definition.divisibility = value
- elif name == "initialSupply":
- definition.supply = value
- elif name == "supplyMutable":
- definition.mutable_supply = value
- elif name == "transferable":
- definition.transferable = value
-
- return messages.NEMMosaicCreation(
- definition=definition,
- sink=transaction["creationFeeSink"],
- fee=transaction["creationFee"],
- )
-
-
-def create_supply_change(transaction: dict) -> messages.NEMMosaicSupplyChange:
- return messages.NEMMosaicSupplyChange(
- namespace=transaction["mosaicId"]["namespaceId"],
- mosaic=transaction["mosaicId"]["name"],
- type=transaction["supplyType"],
- delta=transaction["delta"],
- )
-
-
-def create_importance_transfer(transaction: dict) -> messages.NEMImportanceTransfer:
- return messages.NEMImportanceTransfer(
- mode=transaction["importanceTransfer"]["mode"],
- public_key=bytes.fromhex(transaction["importanceTransfer"]["publicKey"]),
- )
-
-
-def fill_transaction_by_type(msg: messages.NEMSignTx, transaction: dict) -> None:
- if transaction["type"] == TYPE_TRANSACTION_TRANSFER:
- msg.transfer = create_transfer(transaction)
- elif transaction["type"] == TYPE_AGGREGATE_MODIFICATION:
- msg.aggregate_modification = create_aggregate_modification(transaction)
- elif transaction["type"] == TYPE_PROVISION_NAMESPACE:
- msg.provision_namespace = create_provision_namespace(transaction)
- elif transaction["type"] == TYPE_MOSAIC_CREATION:
- msg.mosaic_creation = create_mosaic_creation(transaction)
- elif transaction["type"] == TYPE_MOSAIC_SUPPLY_CHANGE:
- msg.supply_change = create_supply_change(transaction)
- elif transaction["type"] == TYPE_IMPORTANCE_TRANSFER:
- msg.importance_transfer = create_importance_transfer(transaction)
- else:
- raise ValueError("Unknown transaction type")
-
-
-def create_sign_tx(transaction: dict, chunkify: bool = False) -> messages.NEMSignTx:
- msg = messages.NEMSignTx(
- transaction=create_transaction_common(transaction),
- cosigning=transaction["type"] == TYPE_MULTISIG_SIGNATURE,
- chunkify=chunkify,
- )
-
- if transaction["type"] in (TYPE_MULTISIG_SIGNATURE, TYPE_MULTISIG):
- other_trans = transaction["otherTrans"]
- msg.multisig = create_transaction_common(other_trans)
- fill_transaction_by_type(msg, other_trans)
- elif "otherTrans" in transaction:
- raise ValueError("Transaction does not support inner transaction")
- else:
- fill_transaction_by_type(msg, transaction)
-
- return msg
-
-
-# ====== Client functions ====== #
-
-
-@workflow(capability=messages.Capability.NEM)
-def get_address(
- session: "Session",
- n: "Address",
- network: int,
- show_display: bool = False,
- chunkify: bool = False,
-) -> str:
- return session.call(
- messages.NEMGetAddress(
- address_n=n, network=network, show_display=show_display, chunkify=chunkify
- ),
- expect=messages.NEMAddress,
- ).address
-
-
-@workflow(capability=messages.Capability.NEM)
-def sign_tx(
- session: "Session", n: "Address", transaction: dict, chunkify: bool = False
-) -> messages.NEMSignedTx:
- try:
- msg = create_sign_tx(transaction, chunkify=chunkify)
- except ValueError as e:
- raise exceptions.TrezorException("Failed to encode transaction") from e
-
- assert msg.transaction is not None
- msg.transaction.address_n = n
- return session.call(msg, expect=messages.NEMSignedTx)
### python/tests/test_nem.py
@@ -1,44 +0,0 @@
-# This file is part of the Trezor project.
-#
-# Copyright (C) SatoshiLabs and contributors
-#
-# This library is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the License along with this library.
-# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
-
-from trezorlib import nem
-
-
-def test_nem_basic():
- transaction = {
- "timeStamp": 76809215,
- "amount": 1000000,
- "fee": 1000000,
- "recipient": "TALICE2GMA34CXHD7XLJQ536NM5UNKQHTORNNT2J",
- "type": nem.TYPE_TRANSACTION_TRANSFER,
- "deadline": 76895615,
- "version": (0x98 << 24),
- "message": {"payload": b"hello world".hex(), "type": 1},
- "mosaics": [
- {"mosaicId": {"namespaceId": "nem", "name": "xem"}, "quantity": 1000000}
- ],
- }
-
- msg = nem.create_sign_tx(transaction)
-
- # this is basically just a random sampling of expected properties
- assert msg.transaction is not None
- assert msg.transfer is not None
- assert len(msg.transfer.mosaics) == 1
- assert msg.transfer.mosaics[0].namespace == "nem"
-
- assert msg.aggregate_modification is None
- assert msg.provision_namespace is None
### rust/trezor-client/Cargo.toml
@@ -57,10 +57,8 @@ ethereum = []
# Just bindings to the Trezor protobufs
cardano = []
-eos = []
evolu = []
monero = []
-nem = []
nostr = []
ripple = []
solana = []
### rust/trezor-client/README.md
@@ -22,7 +22,7 @@ Last tested with firmware v2.4.2.
## Features
- `bitcoin` and `ethereum`: client implementation and full support;
-- `cardano`, `monero`, `nem`, `ripple`, `stellar`, `tezos` and `tron`: only protobuf bindings.
+- `cardano`, `monero`, `ripple`, `stellar`, `tezos` and `tron`: only protobuf bindings.
## Credits
### rust/trezor-client/scripts/build_messages
@@ -20,10 +20,8 @@ FEATURES = {
"Ethereum": "ethereum",
#
"Cardano": "cardano",
- "EOS": "eos",
"Evolu": "evolu",
"Monero": "monero",
- "NEM": "nem",
"Nostr": "nostr",
"Ripple": "ripple",
"Solana": "solana",
### rust/trezor-client/src/messages/generated.rs
@@ -175,16 +175,6 @@ trezor_message_impl! {
CardanoMessageSignature => MessageType_CardanoMessageSignature,
}
-#[cfg(feature = "eos")]
-trezor_message_impl! {
- EosGetPublicKey => MessageType_EosGetPublicKey,
- EosPublicKey => MessageType_EosPublicKey,
- EosSignTx => MessageType_EosSignTx,
- EosTxActionRequest => MessageType_EosTxActionRequest,
- EosTxActionAck => MessageType_EosTxActionAck,
- EosSignedTx => MessageType_EosSignedTx,
-}
-
#[cfg(feature = "ethereum")]
trezor_message_impl! {
EthereumGetPublicKey => MessageType_EthereumGetPublicKey,
@@ -261,16 +251,6 @@ trezor_message_impl! {
MoneroLiveRefreshFinalAck => MessageType_MoneroLiveRefreshFinalAck,
}
-#[cfg(feature = "nem")]
-trezor_message_impl! {
- NEMGetAddress => MessageType_NEMGetAddress,
- NEMAddress => MessageType_NEMAddress,
- NEMSignTx => MessageType_NEMSignTx,
- NEMSignedTx => MessageType_NEMSignedTx,
- NEMDecryptMessage => MessageType_NEMDecryptMessage,
- NEMDecryptedMessage => MessageType_NEMDecryptedMessage,
-}
-
#[cfg(feature = "nostr")]
trezor_message_impl! {
NostrGetPubkey => MessageType_NostrGetPubkey,
### rust/trezor-client/src/protos/generated/messages.rs
@@ -295,18 +295,6 @@ pub enum MessageType {
MessageType_EthereumDefinitionRequest = 471,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EthereumDefinitionAck)
MessageType_EthereumDefinitionAck = 472,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMGetAddress)
- MessageType_NEMGetAddress = 67,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMAddress)
- MessageType_NEMAddress = 68,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMSignTx)
- MessageType_NEMSignTx = 69,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMSignedTx)
- MessageType_NEMSignedTx = 70,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMDecryptMessage)
- MessageType_NEMDecryptMessage = 75,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NEMDecryptedMessage)
- MessageType_NEMDecryptedMessage = 76,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_TezosGetAddress)
MessageType_TezosGetAddress = 150,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_TezosAddress)
@@ -513,18 +501,6 @@ pub enum MessageType {
MessageType_MoneroLiveRefreshFinalRequest = 556,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MoneroLiveRefreshFinalAck)
MessageType_MoneroLiveRefreshFinalAck = 557,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosGetPublicKey)
- MessageType_EosGetPublicKey = 600,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosPublicKey)
- MessageType_EosPublicKey = 601,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosSignTx)
- MessageType_EosSignTx = 602,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosTxActionRequest)
- MessageType_EosTxActionRequest = 603,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosTxActionAck)
- MessageType_EosTxActionAck = 604,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosSignedTx)
- MessageType_EosSignedTx = 605,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_WebAuthnListResidentCredentials)
MessageType_WebAuthnListResidentCredentials = 800,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_WebAuthnCredentials)
@@ -788,12 +764,6 @@ impl ::protobuf::Enum for MessageType {
470 => ::std::option::Option::Some(MessageType::MessageType_EthereumSignTypedHash),
471 => ::std::option::Option::Some(MessageType::MessageType_EthereumDefinitionRequest),
472 => ::std::option::Option::Some(MessageType::MessageType_EthereumDefinitionAck),
- 67 => ::std::option::Option::Some(MessageType::MessageType_NEMGetAddress),
- 68 => ::std::option::Option::Some(MessageType::MessageType_NEMAddress),
- 69 => ::std::option::Option::Some(MessageType::MessageType_NEMSignTx),
- 70 => ::std::option::Option::Some(MessageType::MessageType_NEMSignedTx),
- 75 => ::std::option::Option::Some(MessageType::MessageType_NEMDecryptMessage),
- 76 => ::std::option::Option::Some(MessageType::MessageType_NEMDecryptedMessage),
150 => ::std::option::Option::Some(MessageType::MessageType_TezosGetAddress),
151 => ::std::option::Option::Some(MessageType::MessageType_TezosAddress),
152 => ::std::option::Option::Some(MessageType::MessageType_TezosSignTx),
@@ -897,12 +867,6 @@ impl ::protobuf::Enum for MessageType {
555 => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshStepAck),
556 => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshFinalRequest),
557 => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshFinalAck),
- 600 => ::std::option::Option::Some(MessageType::MessageType_EosGetPublicKey),
- 601 => ::std::option::Option::Some(MessageType::MessageType_EosPublicKey),
- 602 => ::std::option::Option::Some(MessageType::MessageType_EosSignTx),
- 603 => ::std::option::Option::Some(MessageType::MessageType_EosTxActionRequest),
- 604 => ::std::option::Option::Some(MessageType::MessageType_EosTxActionAck),
- 605 => ::std::option::Option::Some(MessageType::MessageType_EosSignedTx),
800 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnListResidentCredentials),
801 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnCredentials),
802 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnAddResidentCredential),
@@ -1102,12 +1066,6 @@ impl ::protobuf::Enum for MessageType {
"MessageType_EthereumSignTypedHash" => ::std::option::Option::Some(MessageType::MessageType_EthereumSignTypedHash),
"MessageType_EthereumDefinitionRequest" => ::std::option::Option::Some(MessageType::MessageType_EthereumDefinitionRequest),
"MessageType_EthereumDefinitionAck" => ::std::option::Option::Some(MessageType::MessageType_EthereumDefinitionAck),
- "MessageType_NEMGetAddress" => ::std::option::Option::Some(MessageType::MessageType_NEMGetAddress),
- "MessageType_NEMAddress" => ::std::option::Option::Some(MessageType::MessageType_NEMAddress),
- "MessageType_NEMSignTx" => ::std::option::Option::Some(MessageType::MessageType_NEMSignTx),
- "MessageType_NEMSignedTx" => ::std::option::Option::Some(MessageType::MessageType_NEMSignedTx),
- "MessageType_NEMDecryptMessage" => ::std::option::Option::Some(MessageType::MessageType_NEMDecryptMessage),
- "MessageType_NEMDecryptedMessage" => ::std::option::Option::Some(MessageType::MessageType_NEMDecryptedMessage),
"MessageType_TezosGetAddress" => ::std::option::Option::Some(MessageType::MessageType_TezosGetAddress),
"MessageType_TezosAddress" => ::std::option::Option::Some(MessageType::MessageType_TezosAddress),
"MessageType_TezosSignTx" => ::std::option::Option::Some(MessageType::MessageType_TezosSignTx),
@@ -1211,12 +1169,6 @@ impl ::protobuf::Enum for MessageType {
"MessageType_MoneroLiveRefreshStepAck" => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshStepAck),
"MessageType_MoneroLiveRefreshFinalRequest" => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshFinalRequest),
"MessageType_MoneroLiveRefreshFinalAck" => ::std::option::Option::Some(MessageType::MessageType_MoneroLiveRefreshFinalAck),
- "MessageType_EosGetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EosGetPublicKey),
- "MessageType_EosPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EosPublicKey),
- "MessageType_EosSignTx" => ::std::option::Option::Some(MessageType::MessageType_EosSignTx),
- "MessageType_EosTxActionRequest" => ::std::option::Option::Some(MessageType::MessageType_EosTxActionRequest),
- "MessageType_EosTxActionAck" => ::std::option::Option::Some(MessageType::MessageType_EosTxActionAck),
- "MessageType_EosSignedTx" => ::std::option::Option::Some(MessageType::MessageType_EosSignedTx),
"MessageType_WebAuthnListResidentCredentials" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnListResidentCredentials),
"MessageType_WebAuthnCredentials" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnCredentials),
"MessageType_WebAuthnAddResidentCredential" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnAddResidentCredential),
@@ -1415,12 +1367,6 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_EthereumSignTypedHash,
MessageType::MessageType_EthereumDefinitionRequest,
MessageType::MessageType_EthereumDefinitionAck,
- MessageType::MessageType_NEMGetAddress,
- MessageType::MessageType_NEMAddress,
- MessageType::MessageType_NEMSignTx,
- MessageType::MessageType_NEMSignedTx,
- MessageType::MessageType_NEMDecryptMessage,
- MessageType::MessageType_NEMDecryptedMessage,
MessageType::MessageType_TezosGetAddress,
MessageType::MessageType_TezosAddress,
MessageType::MessageType_TezosSignTx,
@@ -1524,12 +1470,6 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_MoneroLiveRefreshStepAck,
MessageType::MessageType_MoneroLiveRefreshFinalRequest,
MessageType::MessageType_MoneroLiveRefreshFinalAck,
- MessageType::MessageType_EosGetPublicKey,
- MessageType::MessageType_EosPublicKey,
- MessageType::MessageType_EosSignTx,
- MessageType::MessageType_EosTxActionRequest,
- MessageType::MessageType_EosTxActionAck,
- MessageType::MessageType_EosSignedTx,
MessageType::MessageType_WebAuthnListResidentCredentials,
MessageType::MessageType_WebAuthnCredentials,
MessageType::MessageType_WebAuthnAddResidentCredential,
@@ -1734,180 +1674,168 @@ impl ::protobuf::EnumFull for MessageType {
MessageType::MessageType_EthereumSignTypedHash => 131,
MessageType::MessageType_EthereumDefinitionRequest => 132,
MessageType::MessageType_EthereumDefinitionAck => 133,
- MessageType::MessageType_NEMGetAddress => 134,
- MessageType::MessageType_NEMAddress => 135,
- MessageType::MessageType_NEMSignTx => 136,
- MessageType::MessageType_NEMSignedTx => 137,
- MessageType::MessageType_NEMDecryptMessage => 138,
- MessageType::MessageType_NEMDecryptedMessage => 139,
- MessageType::MessageType_TezosGetAddress => 140,
- MessageType::MessageType_TezosAddress => 141,
- MessageType::MessageType_TezosSignTx => 142,
- MessageType::MessageType_TezosSignedTx => 143,
- MessageType::MessageType_TezosGetPublicKey => 144,
- MessageType::MessageType_TezosPublicKey => 145,
- MessageType::MessageType_StellarSignTx => 146,
- MessageType::MessageType_StellarTxOpRequest => 147,
- MessageType::MessageType_StellarGetAddress => 148,
- MessageType::MessageType_StellarAddress => 149,
- MessageType::MessageType_StellarCreateAccountOp => 150,
- MessageType::MessageType_StellarPaymentOp => 151,
- MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 152,
- MessageType::MessageType_StellarManageSellOfferOp => 153,
- MessageType::MessageType_StellarCreatePassiveSellOfferOp => 154,
- MessageType::MessageType_StellarSetOptionsOp => 155,
- MessageType::MessageType_StellarChangeTrustOp => 156,
- MessageType::MessageType_StellarAllowTrustOp => 157,
- MessageType::MessageType_StellarAccountMergeOp => 158,
- MessageType::MessageType_StellarManageDataOp => 159,
- MessageType::MessageType_StellarBumpSequenceOp => 160,
- MessageType::MessageType_StellarManageBuyOfferOp => 161,
- MessageType::MessageType_StellarPathPaymentStrictSendOp => 162,
- MessageType::MessageType_StellarClaimClaimableBalanceOp => 163,
- MessageType::MessageType_StellarSignedTx => 164,
- MessageType::MessageType_StellarInvokeHostFunctionOp => 165,
- MessageType::MessageType_StellarTxExtRequest => 166,
- MessageType::MessageType_StellarTxExt => 167,
- MessageType::MessageType_StellarSignSorobanAuthorization => 168,
- MessageType::MessageType_StellarSorobanAuthorizationSignature => 169,
- MessageType::MessageType_CardanoGetPublicKey => 170,
- MessageType::MessageType_CardanoPublicKey => 171,
- MessageType::MessageType_CardanoGetAddress => 172,
- MessageType::MessageType_CardanoAddress => 173,
- MessageType::MessageType_CardanoTxItemAck => 174,
- MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 175,
- MessageType::MessageType_CardanoTxWitnessRequest => 176,
- MessageType::MessageType_CardanoTxWitnessResponse => 177,
- MessageType::MessageType_CardanoTxHostAck => 178,
- MessageType::MessageType_CardanoTxBodyHash => 179,
- MessageType::MessageType_CardanoSignTxFinished => 180,
- MessageType::MessageType_CardanoSignTxInit => 181,
- MessageType::MessageType_CardanoTxInput => 182,
- MessageType::MessageType_CardanoTxOutput => 183,
- MessageType::MessageType_CardanoAssetGroup => 184,
- MessageType::MessageType_CardanoToken => 185,
- MessageType::MessageType_CardanoTxCertificate => 186,
- MessageType::MessageType_CardanoTxWithdrawal => 187,
- MessageType::MessageType_CardanoTxAuxiliaryData => 188,
- MessageType::MessageType_CardanoPoolOwner => 189,
- MessageType::MessageType_CardanoPoolRelayParameters => 190,
- MessageType::MessageType_CardanoGetNativeScriptHash => 191,
- MessageType::MessageType_CardanoNativeScriptHash => 192,
- MessageType::MessageType_CardanoTxMint => 193,
- MessageType::MessageType_CardanoTxCollateralInput => 194,
- MessageType::MessageType_CardanoTxRequiredSigner => 195,
- MessageType::MessageType_CardanoTxInlineDatumChunk => 196,
- MessageType::MessageType_CardanoTxReferenceScriptChunk => 197,
- MessageType::MessageType_CardanoTxReferenceInput => 198,
- MessageType::MessageType_CardanoSignMessageInit => 199,
- MessageType::MessageType_CardanoMessageDataRequest => 200,
- MessageType::MessageType_CardanoMessageDataResponse => 201,
- MessageType::MessageType_CardanoMessageSignature => 202,
- MessageType::MessageType_RippleGetAddress => 203,
- MessageType::MessageType_RippleAddress => 204,
- MessageType::MessageType_RippleSignTx => 205,
- MessageType::MessageType_RippleSignedTx => 206,
- MessageType::MessageType_MoneroTransactionInitRequest => 207,
- MessageType::MessageType_MoneroTransactionInitAck => 208,
- MessageType::MessageType_MoneroTransactionSetInputRequest => 209,
- MessageType::MessageType_MoneroTransactionSetInputAck => 210,
- MessageType::MessageType_MoneroTransactionInputViniRequest => 211,
- MessageType::MessageType_MoneroTransactionInputViniAck => 212,
- MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 213,
- MessageType::MessageType_MoneroTransactionAllInputsSetAck => 214,
- MessageType::MessageType_MoneroTransactionSetOutputRequest => 215,
- MessageType::MessageType_MoneroTransactionSetOutputAck => 216,
- MessageType::MessageType_MoneroTransactionAllOutSetRequest => 217,
- MessageType::MessageType_MoneroTransactionAllOutSetAck => 218,
- MessageType::MessageType_MoneroTransactionSignInputRequest => 219,
- MessageType::MessageType_MoneroTransactionSignInputAck => 220,
- MessageType::MessageType_MoneroTransactionFinalRequest => 221,
- MessageType::MessageType_MoneroTransactionFinalAck => 222,
- MessageType::MessageType_MoneroKeyImageExportInitRequest => 223,
- MessageType::MessageType_MoneroKeyImageExportInitAck => 224,
- MessageType::MessageType_MoneroKeyImageSyncStepRequest => 225,
- MessageType::MessageType_MoneroKeyImageSyncStepAck => 226,
- MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 227,
- MessageType::MessageType_MoneroKeyImageSyncFinalAck => 228,
- MessageType::MessageType_MoneroGetAddress => 229,
- MessageType::MessageType_MoneroAddress => 230,
- MessageType::MessageType_MoneroGetWatchKey => 231,
- MessageType::MessageType_MoneroWatchKey => 232,
- MessageType::MessageType_DebugMoneroDiagRequest => 233,
- MessageType::MessageType_DebugMoneroDiagAck => 234,
- MessageType::MessageType_MoneroGetTxKeyRequest => 235,
- MessageType::MessageType_MoneroGetTxKeyAck => 236,
- MessageType::MessageType_MoneroLiveRefreshStartRequest => 237,
- MessageType::MessageType_MoneroLiveRefreshStartAck => 238,
- MessageType::MessageType_MoneroLiveRefreshStepRequest => 239,
- MessageType::MessageType_MoneroLiveRefreshStepAck => 240,
- MessageType::MessageType_MoneroLiveRefreshFinalRequest => 241,
- MessageType::MessageType_MoneroLiveRefreshFinalAck => 242,
- MessageType::MessageType_EosGetPublicKey => 243,
- MessageType::MessageType_EosPublicKey => 244,
- MessageType::MessageType_EosSignTx => 245,
- MessageType::MessageType_EosTxActionRequest => 246,
- MessageType::MessageType_EosTxActionAck => 247,
- MessageType::MessageType_EosSignedTx => 248,
- MessageType::MessageType_WebAuthnListResidentCredentials => 249,
- MessageType::MessageType_WebAuthnCredentials => 250,
- MessageType::MessageType_WebAuthnAddResidentCredential => 251,
- MessageType::MessageType_WebAuthnRemoveResidentCredential => 252,
- MessageType::MessageType_WebAuthnCredentialsAck => 253,
- MessageType::MessageType_SolanaGetPublicKey => 254,
- MessageType::MessageType_SolanaPublicKey => 255,
- MessageType::MessageType_SolanaGetAddress => 256,
- MessageType::MessageType_SolanaAddress => 257,
- MessageType::MessageType_SolanaSignTx => 258,
- MessageType::MessageType_SolanaTxSignature => 259,
- MessageType::MessageType_SolanaSignMessage => 260,
- MessageType::MessageType_SolanaMessageSignature => 261,
- MessageType::MessageType_SolanaVerifyMessage => 262,
- MessageType::MessageType_ThpCreateNewSession => 263,
- MessageType::MessageType_ThpCredentialRequest => 264,
- MessageType::MessageType_ThpCredentialResponse => 265,
- MessageType::MessageType_NostrGetPubkey => 266,
- MessageType::MessageType_NostrPubkey => 267,
- MessageType::MessageType_NostrSignEvent => 268,
- MessageType::MessageType_NostrEventSignature => 269,
- MessageType::MessageType_EvoluGetNode => 270,
- MessageType::MessageType_EvoluNode => 271,
- MessageType::MessageType_EvoluSignRegistrationRequest => 272,
- MessageType::MessageType_EvoluRegistrationRequest => 273,
- MessageType::MessageType_EvoluGetDelegatedIdentityKey => 274,
- MessageType::MessageType_EvoluDelegatedIdentityKey => 275,
- MessageType::MessageType_EvoluIndexManagement => 276,
- MessageType::MessageType_EvoluIndexManagementResponse => 277,
- MessageType::MessageType_TronGetAddress => 278,
- MessageType::MessageType_TronAddress => 279,
- MessageType::MessageType_TronSignTx => 280,
- MessageType::MessageType_TronSignature => 281,
- MessageType::MessageType_TronContractRequest => 282,
- MessageType::MessageType_TronTransferContract => 283,
- MessageType::MessageType_TronTriggerSmartContract => 284,
- MessageType::MessageType_TronFreezeBalanceV2Contract => 285,
- MessageType::MessageType_TronUnfreezeBalanceV2Contract => 286,
- MessageType::MessageType_TronWithdrawUnfreeze => 287,
- MessageType::MessageType_TronVoteWitnessContract => 288,
- MessageType::MessageType_TronDelegateResourceContract => 289,
- MessageType::MessageType_TronUnDelegateResourceContract => 290,
- MessageType::MessageType_TronWithdrawBalance => 291,
- MessageType::MessageType_BenchmarkListNames => 292,
- MessageType::MessageType_BenchmarkNames => 293,
- MessageType::MessageType_BenchmarkRun => 294,
- MessageType::MessageType_BenchmarkResult => 295,
- MessageType::MessageType_TelemetryGet => 296,
- MessageType::MessageType_Telemetry => 297,
- MessageType::MessageType_ExtAppLoad => 298,
- MessageType::MessageType_ExtAppLoaded => 299,
- MessageType::MessageType_ExtAppHeaderRequest => 300,
- MessageType::MessageType_ExtAppHeaderAck => 301,
- MessageType::MessageType_ExtAppRootPacketRequest => 302,
- MessageType::MessageType_ExtAppRootPacketAck => 303,
- MessageType::MessageType_ExtAppDataChunkRequest => 304,
- MessageType::MessageType_ExtAppDataChunkAck => 305,
- MessageType::MessageType_ExtAppMessage => 306,
- MessageType::MessageType_ExtAppResponse => 307,
+ MessageType::MessageType_TezosGetAddress => 134,
+ MessageType::MessageType_TezosAddress => 135,
+ MessageType::MessageType_TezosSignTx => 136,
+ MessageType::MessageType_TezosSignedTx => 137,
+ MessageType::MessageType_TezosGetPublicKey => 138,
+ MessageType::MessageType_TezosPublicKey => 139,
+ MessageType::MessageType_StellarSignTx => 140,
+ MessageType::MessageType_StellarTxOpRequest => 141,
+ MessageType::MessageType_StellarGetAddress => 142,
+ MessageType::MessageType_StellarAddress => 143,
+ MessageType::MessageType_StellarCreateAccountOp => 144,
+ MessageType::MessageType_StellarPaymentOp => 145,
+ MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 146,
+ MessageType::MessageType_StellarManageSellOfferOp => 147,
+ MessageType::MessageType_StellarCreatePassiveSellOfferOp => 148,
+ MessageType::MessageType_StellarSetOptionsOp => 149,
+ MessageType::MessageType_StellarChangeTrustOp => 150,
+ MessageType::MessageType_StellarAllowTrustOp => 151,
+ MessageType::MessageType_StellarAccountMergeOp => 152,
+ MessageType::MessageType_StellarManageDataOp => 153,
+ MessageType::MessageType_StellarBumpSequenceOp => 154,
+ MessageType::MessageType_StellarManageBuyOfferOp => 155,
+ MessageType::MessageType_StellarPathPaymentStrictSendOp => 156,
+ MessageType::MessageType_StellarClaimClaimableBalanceOp => 157,
+ MessageType::MessageType_StellarSignedTx => 158,
+ MessageType::MessageType_StellarInvokeHostFunctionOp => 159,
+ MessageType::MessageType_StellarTxExtRequest => 160,
+ MessageType::MessageType_StellarTxExt => 161,
+ MessageType::MessageType_StellarSignSorobanAuthorization => 162,
+ MessageType::MessageType_StellarSorobanAuthorizationSignature => 163,
+ MessageType::MessageType_CardanoGetPublicKey => 164,
+ MessageType::MessageType_CardanoPublicKey => 165,
+ MessageType::MessageType_CardanoGetAddress => 166,
+ MessageType::MessageType_CardanoAddress => 167,
+ MessageType::MessageType_CardanoTxItemAck => 168,
+ MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 169,
+ MessageType::MessageType_CardanoTxWitnessRequest => 170,
+ MessageType::MessageType_CardanoTxWitnessResponse => 171,
+ MessageType::MessageType_CardanoTxHostAck => 172,
+ MessageType::MessageType_CardanoTxBodyHash => 173,
+ MessageType::MessageType_CardanoSignTxFinished => 174,
+ MessageType::MessageType_CardanoSignTxInit => 175,
+ MessageType::MessageType_CardanoTxInput => 176,
+ MessageType::MessageType_CardanoTxOutput => 177,
+ MessageType::MessageType_CardanoAssetGroup => 178,
+ MessageType::MessageType_CardanoToken => 179,
+ MessageType::MessageType_CardanoTxCertificate => 180,
+ MessageType::MessageType_CardanoTxWithdrawal => 181,
+ MessageType::MessageType_CardanoTxAuxiliaryData => 182,
+ MessageType::MessageType_CardanoPoolOwner => 183,
+ MessageType::MessageType_CardanoPoolRelayParameters => 184,
+ MessageType::MessageType_CardanoGetNativeScriptHash => 185,
+ MessageType::MessageType_CardanoNativeScriptHash => 186,
+ MessageType::MessageType_CardanoTxMint => 187,
+ MessageType::MessageType_CardanoTxCollateralInput => 188,
+ MessageType::MessageType_CardanoTxRequiredSigner => 189,
+ MessageType::MessageType_CardanoTxInlineDatumChunk => 190,
+ MessageType::MessageType_CardanoTxReferenceScriptChunk => 191,
+ MessageType::MessageType_CardanoTxReferenceInput => 192,
+ MessageType::MessageType_CardanoSignMessageInit => 193,
+ MessageType::MessageType_CardanoMessageDataRequest => 194,
+ MessageType::MessageType_CardanoMessageDataResponse => 195,
+ MessageType::MessageType_CardanoMessageSignature => 196,
+ MessageType::MessageType_RippleGetAddress => 197,
+ MessageType::MessageType_RippleAddress => 198,
+ MessageType::MessageType_RippleSignTx => 199,
+ MessageType::MessageType_RippleSignedTx => 200,
+ MessageType::MessageType_MoneroTransactionInitRequest => 201,
+ MessageType::MessageType_MoneroTransactionInitAck => 202,
+ MessageType::MessageType_MoneroTransactionSetInputRequest => 203,
+ MessageType::MessageType_MoneroTransactionSetInputAck => 204,
+ MessageType::MessageType_MoneroTransactionInputViniRequest => 205,
+ MessageType::MessageType_MoneroTransactionInputViniAck => 206,
+ MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 207,
+ MessageType::MessageType_MoneroTransactionAllInputsSetAck => 208,
+ MessageType::MessageType_MoneroTransactionSetOutputRequest => 209,
+ MessageType::MessageType_MoneroTransactionSetOutputAck => 210,
+ MessageType::MessageType_MoneroTransactionAllOutSetRequest => 211,
+ MessageType::MessageType_MoneroTransactionAllOutSetAck => 212,
+ MessageType::MessageType_MoneroTransactionSignInputRequest => 213,
+ MessageType::MessageType_MoneroTransactionSignInputAck => 214,
+ MessageType::MessageType_MoneroTransactionFinalRequest => 215,
+ MessageType::MessageType_MoneroTransactionFinalAck => 216,
+ MessageType::MessageType_MoneroKeyImageExportInitRequest => 217,
+ MessageType::MessageType_MoneroKeyImageExportInitAck => 218,
+ MessageType::MessageType_MoneroKeyImageSyncStepRequest => 219,
+ MessageType::MessageType_MoneroKeyImageSyncStepAck => 220,
+ MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 221,
+ MessageType::MessageType_MoneroKeyImageSyncFinalAck => 222,
+ MessageType::MessageType_MoneroGetAddress => 223,
+ MessageType::MessageType_MoneroAddress => 224,
+ MessageType::MessageType_MoneroGetWatchKey => 225,
+ MessageType::MessageType_MoneroWatchKey => 226,
+ MessageType::MessageType_DebugMoneroDiagRequest => 227,
+ MessageType::MessageType_DebugMoneroDiagAck => 228,
+ MessageType::MessageType_MoneroGetTxKeyRequest => 229,
+ MessageType::MessageType_MoneroGetTxKeyAck => 230,
+ MessageType::MessageType_MoneroLiveRefreshStartRequest => 231,
+ MessageType::MessageType_MoneroLiveRefreshStartAck => 232,
+ MessageType::MessageType_MoneroLiveRefreshStepRequest => 233,
+ MessageType::MessageType_MoneroLiveRefreshStepAck => 234,
+ MessageType::MessageType_MoneroLiveRefreshFinalRequest => 235,
+ MessageType::MessageType_MoneroLiveRefreshFinalAck => 236,
+ MessageType::MessageType_WebAuthnListResidentCredentials => 237,
+ MessageType::MessageType_WebAuthnCredentials => 238,
+ MessageType::MessageType_WebAuthnAddResidentCredential => 239,
+ MessageType::MessageType_WebAuthnRemoveResidentCredential => 240,
+ MessageType::MessageType_WebAuthnCredentialsAck => 241,
+ MessageType::MessageType_SolanaGetPublicKey => 242,
+ MessageType::MessageType_SolanaPublicKey => 243,
+ MessageType::MessageType_SolanaGetAddress => 244,
+ MessageType::MessageType_SolanaAddress => 245,
+ MessageType::MessageType_SolanaSignTx => 246,
+ MessageType::MessageType_SolanaTxSignature => 247,
+ MessageType::MessageType_SolanaSignMessage => 248,
+ MessageType::MessageType_SolanaMessageSignature => 249,
+ MessageType::MessageType_SolanaVerifyMessage => 250,
+ MessageType::MessageType_ThpCreateNewSession => 251,
+ MessageType::MessageType_ThpCredentialRequest => 252,
+ MessageType::MessageType_ThpCredentialResponse => 253,
+ MessageType::MessageType_NostrGetPubkey => 254,
+ MessageType::MessageType_NostrPubkey => 255,
+ MessageType::MessageType_NostrSignEvent => 256,
+ MessageType::MessageType_NostrEventSignature => 257,
+ MessageType::MessageType_EvoluGetNode => 258,
+ MessageType::MessageType_EvoluNode => 259,
+ MessageType::MessageType_EvoluSignRegistrationRequest => 260,
+ MessageType::MessageType_EvoluRegistrationRequest => 261,
+ MessageType::MessageType_EvoluGetDelegatedIdentityKey => 262,
+ MessageType::MessageType_EvoluDelegatedIdentityKey => 263,
+ MessageType::MessageType_EvoluIndexManagement => 264,
+ MessageType::MessageType_EvoluIndexManagementResponse => 265,
+ MessageType::MessageType_TronGetAddress => 266,
+ MessageType::MessageType_TronAddress => 267,
+ MessageType::MessageType_TronSignTx => 268,
+ MessageType::MessageType_TronSignature => 269,
+ MessageType::MessageType_TronContractRequest => 270,
+ MessageType::MessageType_TronTransferContract => 271,
+ MessageType::MessageType_TronTriggerSmartContract => 272,
+ MessageType::MessageType_TronFreezeBalanceV2Contract => 273,
+ MessageType::MessageType_TronUnfreezeBalanceV2Contract => 274,
+ MessageType::MessageType_TronWithdrawUnfreeze => 275,
+ MessageType::MessageType_TronVoteWitnessContract => 276,
+ MessageType::MessageType_TronDelegateResourceContract => 277,
+ MessageType::MessageType_TronUnDelegateResourceContract => 278,
+ MessageType::MessageType_TronWithdrawBalance => 279,
+ MessageType::MessageType_BenchmarkListNames => 280,
+ MessageType::MessageType_BenchmarkNames => 281,
+ MessageType::MessageType_BenchmarkRun => 282,
+ MessageType::MessageType_BenchmarkResult => 283,
+ MessageType::MessageType_TelemetryGet => 284,
+ MessageType::MessageType_Telemetry => 285,
+ MessageType::MessageType_ExtAppLoad => 286,
+ MessageType::MessageType_ExtAppLoaded => 287,
+ MessageType::MessageType_ExtAppHeaderRequest => 288,
+ MessageType::MessageType_ExtAppHeaderAck => 289,
+ MessageType::MessageType_ExtAppRootPacketRequest => 290,
+ MessageType::MessageType_ExtAppRootPacketAck => 291,
+ MessageType::MessageType_ExtAppDataChunkRequest => 292,
+ MessageType::MessageType_ExtAppDataChunkAck => 293,
+ MessageType::MessageType_ExtAppMessage => 294,
+ MessageType::MessageType_ExtAppResponse => 295,
};
Self::enum_descriptor().value_by_index(index)
}
@@ -1926,7 +1854,7 @@ impl MessageType {
}
static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\x83m\
+ \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xd3i\
\n\x0bMessageType\x12(\n\x16MessageType_Initialize\x10\0\x1a\x0c\xb0\xb5\
\x18\x01\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12\x1e\n\x10MessageType_Ping\
\x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\x13MessageType_S\
@@ -2086,137 +2014,125 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x03\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_EthereumSignTypedHash\
\x10\xd6\x03\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_EthereumDefiniti\
onRequest\x10\xd7\x03\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_Ethereu\
- mDefinitionAck\x10\xd8\x03\x1a\x04\x90\xb5\x18\x01\x12#\n\x19MessageType\
- _NEMGetAddress\x10C\x1a\x04\x90\xb5\x18\x01\x12\x20\n\x16MessageType_NEM\
- Address\x10D\x1a\x04\x98\xb5\x18\x01\x12\x1f\n\x15MessageType_NEMSignTx\
- \x10E\x1a\x04\x90\xb5\x18\x01\x12!\n\x17MessageType_NEMSignedTx\x10F\x1a\
- \x04\x98\xb5\x18\x01\x12'\n\x1dMessageType_NEMDecryptMessage\x10K\x1a\
- \x04\x90\xb5\x18\x01\x12)\n\x1fMessageType_NEMDecryptedMessage\x10L\x1a\
- \x04\x98\xb5\x18\x01\x12&\n\x1bMessageType_TezosGetAddress\x10\x96\x01\
- \x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_TezosAddress\x10\x97\x01\
- \x1a\x04\x98\xb5\x18\x01\x12\"\n\x17MessageType_TezosSignTx\x10\x98\x01\
- \x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType_TezosSignedTx\x10\x99\x01\
- \x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_TezosGetPublicKey\x10\x9a\
- \x01\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_TezosPublicKey\x10\
- \x9b\x01\x1a\x04\x98\xb5\x18\x01\x12$\n\x19MessageType_StellarSignTx\x10\
- \xca\x01\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_StellarTxOpReques\
- t\x10\xcb\x01\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_StellarGetAd\
- dress\x10\xcf\x01\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_StellarA\
- ddress\x10\xd0\x01\x1a\x04\x98\xb5\x18\x01\x12-\n\"MessageType_StellarCr\
- eateAccountOp\x10\xd2\x01\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_\
- StellarPaymentOp\x10\xd3\x01\x1a\x04\x90\xb5\x18\x01\x128\n-MessageType_\
- StellarPathPaymentStrictReceiveOp\x10\xd4\x01\x1a\x04\x90\xb5\x18\x01\
- \x12/\n$MessageType_StellarManageSellOfferOp\x10\xd5\x01\x1a\x04\x90\xb5\
- \x18\x01\x126\n+MessageType_StellarCreatePassiveSellOfferOp\x10\xd6\x01\
- \x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarSetOptionsOp\x10\
- \xd7\x01\x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageType_StellarChangeTrus\
- tOp\x10\xd8\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarAll\
- owTrustOp\x10\xd9\x01\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_Stellar\
- AccountMergeOp\x10\xda\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType\
- _StellarManageDataOp\x10\xdc\x01\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageT\
- ype_StellarBumpSequenceOp\x10\xdd\x01\x1a\x04\x90\xb5\x18\x01\x12.\n#Mes\
- sageType_StellarManageBuyOfferOp\x10\xde\x01\x1a\x04\x90\xb5\x18\x01\x12\
- 5\n*MessageType_StellarPathPaymentStrictSendOp\x10\xdf\x01\x1a\x04\x90\
- \xb5\x18\x01\x125\n*MessageType_StellarClaimClaimableBalanceOp\x10\xe1\
- \x01\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_StellarSignedTx\x10\
- \xe6\x01\x1a\x04\x98\xb5\x18\x01\x122\n'MessageType_StellarInvokeHostFun\
- ctionOp\x10\xeb\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_Stella\
- rTxExtRequest\x10\xee\x01\x1a\x04\x98\xb5\x18\x01\x12#\n\x18MessageType_\
- StellarTxExt\x10\xef\x01\x1a\x04\x90\xb5\x18\x01\x126\n+MessageType_Stel\
- larSignSorobanAuthorization\x10\xf0\x01\x1a\x04\x90\xb5\x18\x01\x12;\n0M\
- essageType_StellarSorobanAuthorizationSignature\x10\xf1\x01\x1a\x04\x98\
- \xb5\x18\x01\x12*\n\x1fMessageType_CardanoGetPublicKey\x10\xb1\x02\x1a\
- \x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_CardanoPublicKey\x10\xb2\x02\
- \x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_CardanoGetAddress\x10\xb3\
- \x02\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoAddress\x10\
- \xb4\x02\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_CardanoTxItemAck\
- \x10\xb9\x02\x1a\x04\x98\xb5\x18\x01\x127\n,MessageType_CardanoTxAuxilia\
- ryDataSupplement\x10\xba\x02\x1a\x04\x98\xb5\x18\x01\x12.\n#MessageType_\
- CardanoTxWitnessRequest\x10\xbb\x02\x1a\x04\x90\xb5\x18\x01\x12/\n$Messa\
- geType_CardanoTxWitnessResponse\x10\xbc\x02\x1a\x04\x98\xb5\x18\x01\x12'\
- \n\x1cMessageType_CardanoTxHostAck\x10\xbd\x02\x1a\x04\x90\xb5\x18\x01\
- \x12(\n\x1dMessageType_CardanoTxBodyHash\x10\xbe\x02\x1a\x04\x98\xb5\x18\
- \x01\x12,\n!MessageType_CardanoSignTxFinished\x10\xbf\x02\x1a\x04\x98\
- \xb5\x18\x01\x12(\n\x1dMessageType_CardanoSignTxInit\x10\xc0\x02\x1a\x04\
- \x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoTxInput\x10\xc1\x02\x1a\
- \x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_CardanoTxOutput\x10\xc2\x02\
- \x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_CardanoAssetGroup\x10\xc3\
- \x02\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_CardanoToken\x10\xc4\
- \x02\x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageType_CardanoTxCertificate\
- \x10\xc5\x02\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_CardanoTxWith\
- drawal\x10\xc6\x02\x1a\x04\x90\xb5\x18\x01\x12-\n\"MessageType_CardanoTx\
- AuxiliaryData\x10\xc7\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_\
- CardanoPoolOwner\x10\xc8\x02\x1a\x04\x90\xb5\x18\x01\x121\n&MessageType_\
- CardanoPoolRelayParameters\x10\xc9\x02\x1a\x04\x90\xb5\x18\x01\x121\n&Me\
- ssageType_CardanoGetNativeScriptHash\x10\xca\x02\x1a\x04\x90\xb5\x18\x01\
- \x12.\n#MessageType_CardanoNativeScriptHash\x10\xcb\x02\x1a\x04\x98\xb5\
- \x18\x01\x12$\n\x19MessageType_CardanoTxMint\x10\xcc\x02\x1a\x04\x90\xb5\
- \x18\x01\x12/\n$MessageType_CardanoTxCollateralInput\x10\xcd\x02\x1a\x04\
- \x90\xb5\x18\x01\x12.\n#MessageType_CardanoTxRequiredSigner\x10\xce\x02\
- \x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_CardanoTxInlineDatumChunk\
- \x10\xcf\x02\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_CardanoTxReferen\
- ceScriptChunk\x10\xd0\x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_Car\
- danoTxReferenceInput\x10\xd1\x02\x1a\x04\x90\xb5\x18\x01\x12-\n\"Message\
- Type_CardanoSignMessageInit\x10\xd2\x02\x1a\x04\x90\xb5\x18\x01\x120\n%M\
- essageType_CardanoMessageDataRequest\x10\xd3\x02\x1a\x04\x98\xb5\x18\x01\
- \x121\n&MessageType_CardanoMessageDataResponse\x10\xd4\x02\x1a\x04\x90\
- \xb5\x18\x01\x12.\n#MessageType_CardanoMessageSignature\x10\xd5\x02\x1a\
- \x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_RippleGetAddress\x10\x90\x03\
- \x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType_RippleAddress\x10\x91\x03\
- \x1a\x04\x98\xb5\x18\x01\x12#\n\x18MessageType_RippleSignTx\x10\x92\x03\
- \x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_RippleSignedTx\x10\x93\
- \x03\x1a\x04\x98\xb5\x18\x01\x123\n(MessageType_MoneroTransactionInitReq\
- uest\x10\xf5\x03\x1a\x04\x90\xb5\x18\x01\x12/\n$MessageType_MoneroTransa\
- ctionInitAck\x10\xf6\x03\x1a\x04\x98\xb5\x18\x01\x127\n,MessageType_Mone\
- roTransactionSetInputRequest\x10\xf7\x03\x1a\x04\x90\xb5\x18\x01\x123\n(\
- MessageType_MoneroTransactionSetInputAck\x10\xf8\x03\x1a\x04\x98\xb5\x18\
- \x01\x128\n-MessageType_MoneroTransactionInputViniRequest\x10\xfb\x03\
- \x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_MoneroTransactionInputViniAc\
- k\x10\xfc\x03\x1a\x04\x98\xb5\x18\x01\x12;\n0MessageType_MoneroTransacti\
- onAllInputsSetRequest\x10\xfd\x03\x1a\x04\x90\xb5\x18\x01\x127\n,Message\
- Type_MoneroTransactionAllInputsSetAck\x10\xfe\x03\x1a\x04\x98\xb5\x18\
- \x01\x128\n-MessageType_MoneroTransactionSetOutputRequest\x10\xff\x03\
- \x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_MoneroTransactionSetOutputAc\
- k\x10\x80\x04\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransacti\
- onAllOutSetRequest\x10\x81\x04\x1a\x04\x90\xb5\x18\x01\x124\n)MessageTyp\
- e_MoneroTransactionAllOutSetAck\x10\x82\x04\x1a\x04\x98\xb5\x18\x01\x128\
- \n-MessageType_MoneroTransactionSignInputRequest\x10\x83\x04\x1a\x04\x90\
- \xb5\x18\x01\x124\n)MessageType_MoneroTransactionSignInputAck\x10\x84\
- \x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroTransactionFinalRe\
- quest\x10\x85\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroTrans\
- actionFinalAck\x10\x86\x04\x1a\x04\x98\xb5\x18\x01\x126\n+MessageType_Mo\
- neroKeyImageExportInitRequest\x10\x92\x04\x1a\x04\x90\xb5\x18\x01\x122\n\
- 'MessageType_MoneroKeyImageExportInitAck\x10\x93\x04\x1a\x04\x98\xb5\x18\
- \x01\x124\n)MessageType_MoneroKeyImageSyncStepRequest\x10\x94\x04\x1a\
- \x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroKeyImageSyncStepAck\x10\
- \x95\x04\x1a\x04\x98\xb5\x18\x01\x125\n*MessageType_MoneroKeyImageSyncFi\
- nalRequest\x10\x96\x04\x1a\x04\x90\xb5\x18\x01\x121\n&MessageType_Monero\
- KeyImageSyncFinalAck\x10\x97\x04\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessa\
- geType_MoneroGetAddress\x10\x9c\x04\x1a\x04\x90\xb5\x18\x01\x12$\n\x19Me\
- ssageType_MoneroAddress\x10\x9d\x04\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMe\
- ssageType_MoneroGetWatchKey\x10\x9e\x04\x1a\x04\x90\xb5\x18\x01\x12%\n\
- \x1aMessageType_MoneroWatchKey\x10\x9f\x04\x1a\x04\x98\xb5\x18\x01\x12-\
- \n\"MessageType_DebugMoneroDiagRequest\x10\xa2\x04\x1a\x04\x90\xb5\x18\
- \x01\x12)\n\x1eMessageType_DebugMoneroDiagAck\x10\xa3\x04\x1a\x04\x98\
- \xb5\x18\x01\x12,\n!MessageType_MoneroGetTxKeyRequest\x10\xa6\x04\x1a\
- \x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_MoneroGetTxKeyAck\x10\xa7\x04\
- \x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroLiveRefreshStartReques\
- t\x10\xa8\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroLiveRefre\
- shStartAck\x10\xa9\x04\x1a\x04\x98\xb5\x18\x01\x123\n(MessageType_Monero\
- LiveRefreshStepRequest\x10\xaa\x04\x1a\x04\x90\xb5\x18\x01\x12/\n$Messag\
- eType_MoneroLiveRefreshStepAck\x10\xab\x04\x1a\x04\x98\xb5\x18\x01\x124\
- \n)MessageType_MoneroLiveRefreshFinalRequest\x10\xac\x04\x1a\x04\x90\xb5\
- \x18\x01\x120\n%MessageType_MoneroLiveRefreshFinalAck\x10\xad\x04\x1a\
- \x04\x98\xb5\x18\x01\x12&\n\x1bMessageType_EosGetPublicKey\x10\xd8\x04\
- \x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_EosPublicKey\x10\xd9\x04\
- \x1a\x04\x98\xb5\x18\x01\x12\x20\n\x15MessageType_EosSignTx\x10\xda\x04\
- \x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_EosTxActionRequest\x10\
- \xdb\x04\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_EosTxActionAck\
- \x10\xdc\x04\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17MessageType_EosSignedTx\
- \x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x126\n+MessageType_WebAuthnListResi\
- dentCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageTyp\
- e_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\n)Message\
- Type_WebAuthnAddResidentCredential\x10\xa2\x06\x1a\x04\x90\xb5\x18\x01\
+ mDefinitionAck\x10\xd8\x03\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType\
+ _TezosGetAddress\x10\x96\x01\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageTy\
+ pe_TezosAddress\x10\x97\x01\x1a\x04\x98\xb5\x18\x01\x12\"\n\x17MessageTy\
+ pe_TezosSignTx\x10\x98\x01\x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType\
+ _TezosSignedTx\x10\x99\x01\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType\
+ _TezosGetPublicKey\x10\x9a\x01\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessage\
+ Type_TezosPublicKey\x10\x9b\x01\x1a\x04\x98\xb5\x18\x01\x12$\n\x19Messag\
+ eType_StellarSignTx\x10\xca\x01\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessag\
+ eType_StellarTxOpRequest\x10\xcb\x01\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dM\
+ essageType_StellarGetAddress\x10\xcf\x01\x1a\x04\x90\xb5\x18\x01\x12%\n\
+ \x1aMessageType_StellarAddress\x10\xd0\x01\x1a\x04\x98\xb5\x18\x01\x12-\
+ \n\"MessageType_StellarCreateAccountOp\x10\xd2\x01\x1a\x04\x90\xb5\x18\
+ \x01\x12'\n\x1cMessageType_StellarPaymentOp\x10\xd3\x01\x1a\x04\x90\xb5\
+ \x18\x01\x128\n-MessageType_StellarPathPaymentStrictReceiveOp\x10\xd4\
+ \x01\x1a\x04\x90\xb5\x18\x01\x12/\n$MessageType_StellarManageSellOfferOp\
+ \x10\xd5\x01\x1a\x04\x90\xb5\x18\x01\x126\n+MessageType_StellarCreatePas\
+ siveSellOfferOp\x10\xd6\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageTyp\
+ e_StellarSetOptionsOp\x10\xd7\x01\x1a\x04\x90\xb5\x18\x01\x12+\n\x20Mess\
+ ageType_StellarChangeTrustOp\x10\xd8\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\
+ \x1fMessageType_StellarAllowTrustOp\x10\xd9\x01\x1a\x04\x90\xb5\x18\x01\
+ \x12,\n!MessageType_StellarAccountMergeOp\x10\xda\x01\x1a\x04\x90\xb5\
+ \x18\x01\x12*\n\x1fMessageType_StellarManageDataOp\x10\xdc\x01\x1a\x04\
+ \x90\xb5\x18\x01\x12,\n!MessageType_StellarBumpSequenceOp\x10\xdd\x01\
+ \x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_StellarManageBuyOfferOp\x10\
+ \xde\x01\x1a\x04\x90\xb5\x18\x01\x125\n*MessageType_StellarPathPaymentSt\
+ rictSendOp\x10\xdf\x01\x1a\x04\x90\xb5\x18\x01\x125\n*MessageType_Stella\
+ rClaimClaimableBalanceOp\x10\xe1\x01\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bM\
+ essageType_StellarSignedTx\x10\xe6\x01\x1a\x04\x98\xb5\x18\x01\x122\n'Me\
+ ssageType_StellarInvokeHostFunctionOp\x10\xeb\x01\x1a\x04\x90\xb5\x18\
+ \x01\x12*\n\x1fMessageType_StellarTxExtRequest\x10\xee\x01\x1a\x04\x98\
+ \xb5\x18\x01\x12#\n\x18MessageType_StellarTxExt\x10\xef\x01\x1a\x04\x90\
+ \xb5\x18\x01\x126\n+MessageType_StellarSignSorobanAuthorization\x10\xf0\
+ \x01\x1a\x04\x90\xb5\x18\x01\x12;\n0MessageType_StellarSorobanAuthorizat\
+ ionSignature\x10\xf1\x01\x1a\x04\x98\xb5\x18\x01\x12*\n\x1fMessageType_C\
+ ardanoGetPublicKey\x10\xb1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessage\
+ Type_CardanoPublicKey\x10\xb2\x02\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMess\
+ ageType_CardanoGetAddress\x10\xb3\x02\x1a\x04\x90\xb5\x18\x01\x12%\n\x1a\
+ MessageType_CardanoAddress\x10\xb4\x02\x1a\x04\x98\xb5\x18\x01\x12'\n\
+ \x1cMessageType_CardanoTxItemAck\x10\xb9\x02\x1a\x04\x98\xb5\x18\x01\x12\
+ 7\n,MessageType_CardanoTxAuxiliaryDataSupplement\x10\xba\x02\x1a\x04\x98\
+ \xb5\x18\x01\x12.\n#MessageType_CardanoTxWitnessRequest\x10\xbb\x02\x1a\
+ \x04\x90\xb5\x18\x01\x12/\n$MessageType_CardanoTxWitnessResponse\x10\xbc\
+ \x02\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_CardanoTxHostAck\x10\
+ \xbd\x02\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_CardanoTxBodyHash\
+ \x10\xbe\x02\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_CardanoSignTxFin\
+ ished\x10\xbf\x02\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_CardanoS\
+ ignTxInit\x10\xc0\x02\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_Card\
+ anoTxInput\x10\xc1\x02\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_Car\
+ danoTxOutput\x10\xc2\x02\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_C\
+ ardanoAssetGroup\x10\xc3\x02\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageTy\
+ pe_CardanoToken\x10\xc4\x02\x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageTyp\
+ e_CardanoTxCertificate\x10\xc5\x02\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMes\
+ sageType_CardanoTxWithdrawal\x10\xc6\x02\x1a\x04\x90\xb5\x18\x01\x12-\n\
+ \"MessageType_CardanoTxAuxiliaryData\x10\xc7\x02\x1a\x04\x90\xb5\x18\x01\
+ \x12'\n\x1cMessageType_CardanoPoolOwner\x10\xc8\x02\x1a\x04\x90\xb5\x18\
+ \x01\x121\n&MessageType_CardanoPoolRelayParameters\x10\xc9\x02\x1a\x04\
+ \x90\xb5\x18\x01\x121\n&MessageType_CardanoGetNativeScriptHash\x10\xca\
+ \x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_CardanoNativeScriptHash\
+ \x10\xcb\x02\x1a\x04\x98\xb5\x18\x01\x12$\n\x19MessageType_CardanoTxMint\
+ \x10\xcc\x02\x1a\x04\x90\xb5\x18\x01\x12/\n$MessageType_CardanoTxCollate\
+ ralInput\x10\xcd\x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_CardanoT\
+ xRequiredSigner\x10\xce\x02\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_C\
+ ardanoTxInlineDatumChunk\x10\xcf\x02\x1a\x04\x90\xb5\x18\x01\x124\n)Mess\
+ ageType_CardanoTxReferenceScriptChunk\x10\xd0\x02\x1a\x04\x90\xb5\x18\
+ \x01\x12.\n#MessageType_CardanoTxReferenceInput\x10\xd1\x02\x1a\x04\x90\
+ \xb5\x18\x01\x12-\n\"MessageType_CardanoSignMessageInit\x10\xd2\x02\x1a\
+ \x04\x90\xb5\x18\x01\x120\n%MessageType_CardanoMessageDataRequest\x10\
+ \xd3\x02\x1a\x04\x98\xb5\x18\x01\x121\n&MessageType_CardanoMessageDataRe\
+ sponse\x10\xd4\x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_CardanoMes\
+ sageSignature\x10\xd5\x02\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_\
+ RippleGetAddress\x10\x90\x03\x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageTy\
+ pe_RippleAddress\x10\x91\x03\x1a\x04\x98\xb5\x18\x01\x12#\n\x18MessageTy\
+ pe_RippleSignTx\x10\x92\x03\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageTyp\
+ e_RippleSignedTx\x10\x93\x03\x1a\x04\x98\xb5\x18\x01\x123\n(MessageType_\
+ MoneroTransactionInitRequest\x10\xf5\x03\x1a\x04\x90\xb5\x18\x01\x12/\n$\
+ MessageType_MoneroTransactionInitAck\x10\xf6\x03\x1a\x04\x98\xb5\x18\x01\
+ \x127\n,MessageType_MoneroTransactionSetInputRequest\x10\xf7\x03\x1a\x04\
+ \x90\xb5\x18\x01\x123\n(MessageType_MoneroTransactionSetInputAck\x10\xf8\
+ \x03\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactionInputVi\
+ niRequest\x10\xfb\x03\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_MoneroT\
+ ransactionInputViniAck\x10\xfc\x03\x1a\x04\x98\xb5\x18\x01\x12;\n0Messag\
+ eType_MoneroTransactionAllInputsSetRequest\x10\xfd\x03\x1a\x04\x90\xb5\
+ \x18\x01\x127\n,MessageType_MoneroTransactionAllInputsSetAck\x10\xfe\x03\
+ \x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactionSetOutputRe\
+ quest\x10\xff\x03\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_MoneroTrans\
+ actionSetOutputAck\x10\x80\x04\x1a\x04\x98\xb5\x18\x01\x128\n-MessageTyp\
+ e_MoneroTransactionAllOutSetRequest\x10\x81\x04\x1a\x04\x90\xb5\x18\x01\
+ \x124\n)MessageType_MoneroTransactionAllOutSetAck\x10\x82\x04\x1a\x04\
+ \x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactionSignInputRequest\
+ \x10\x83\x04\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_MoneroTransactio\
+ nSignInputAck\x10\x84\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_Mon\
+ eroTransactionFinalRequest\x10\x85\x04\x1a\x04\x90\xb5\x18\x01\x120\n%Me\
+ ssageType_MoneroTransactionFinalAck\x10\x86\x04\x1a\x04\x98\xb5\x18\x01\
+ \x126\n+MessageType_MoneroKeyImageExportInitRequest\x10\x92\x04\x1a\x04\
+ \x90\xb5\x18\x01\x122\n'MessageType_MoneroKeyImageExportInitAck\x10\x93\
+ \x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroKeyImageSyncStepRe\
+ quest\x10\x94\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroKeyIm\
+ ageSyncStepAck\x10\x95\x04\x1a\x04\x98\xb5\x18\x01\x125\n*MessageType_Mo\
+ neroKeyImageSyncFinalRequest\x10\x96\x04\x1a\x04\x90\xb5\x18\x01\x121\n&\
+ MessageType_MoneroKeyImageSyncFinalAck\x10\x97\x04\x1a\x04\x98\xb5\x18\
+ \x01\x12'\n\x1cMessageType_MoneroGetAddress\x10\x9c\x04\x1a\x04\x90\xb5\
+ \x18\x01\x12$\n\x19MessageType_MoneroAddress\x10\x9d\x04\x1a\x04\x98\xb5\
+ \x18\x01\x12(\n\x1dMessageType_MoneroGetWatchKey\x10\x9e\x04\x1a\x04\x90\
+ \xb5\x18\x01\x12%\n\x1aMessageType_MoneroWatchKey\x10\x9f\x04\x1a\x04\
+ \x98\xb5\x18\x01\x12-\n\"MessageType_DebugMoneroDiagRequest\x10\xa2\x04\
+ \x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_DebugMoneroDiagAck\x10\
+ \xa3\x04\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_MoneroGetTxKeyReques\
+ t\x10\xa6\x04\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_MoneroGetTxK\
+ eyAck\x10\xa7\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroLiveR\
+ efreshStartRequest\x10\xa8\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageTyp\
+ e_MoneroLiveRefreshStartAck\x10\xa9\x04\x1a\x04\x98\xb5\x18\x01\x123\n(M\
+ essageType_MoneroLiveRefreshStepRequest\x10\xaa\x04\x1a\x04\x90\xb5\x18\
+ \x01\x12/\n$MessageType_MoneroLiveRefreshStepAck\x10\xab\x04\x1a\x04\x98\
+ \xb5\x18\x01\x124\n)MessageType_MoneroLiveRefreshFinalRequest\x10\xac\
+ \x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroLiveRefreshFinalAc\
+ k\x10\xad\x04\x1a\x04\x98\xb5\x18\x01\x126\n+MessageType_WebAuthnListRes\
+ identCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageTy\
+ pe_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\n)Messag\
+ eType_WebAuthnAddResidentCredential\x10\xa2\x06\x1a\x04\x90\xb5\x18\x01\
\x127\n,MessageType_WebAuthnRemoveResidentCredential\x10\xa3\x06\x1a\x04\
\x90\xb5\x18\x01\x12-\n\"MessageType_WebAuthnCredentialsAck\x10\xa4\x06\
\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_SolanaGetPublicKey\x10\
@@ -2281,15 +2197,16 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\xf8G\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_ExtAppResponse\x10\
\xf9G\x1a\x04\x98\xb5\x18\x01\x1a\x08\xc8\xf3\x18\x01\xd0\xf3\x18\x01\"\
\x04\x08Z\x10\\\"\x04\x08M\x10N\"\x04\x08G\x10J\"\x06\x08\xd9\x03\x10\
- \xda\x03\"\x04\x08r\x10z\"\x05\x08{\x10\x95\x01\"\x06\x08\xdb\x01\x10\
- \xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\x06\x08\xe2\x01\x10\xe2\x01\"\
- \x06\x08\xe3\x01\x10\xe3\x01\"\x06\x08\xe4\x01\x10\xe4\x01\"\x06\x08\xe5\
- \x01\x10\xe5\x01\"\x06\x08\xe7\x01\x10\xe7\x01\"\x06\x08\xe8\x01\x10\xe8\
- \x01\"\x06\x08\xe9\x01\x10\xe9\x01\"\x06\x08\xea\x01\x10\xea\x01\"\x06\
- \x08\xec\x01\x10\xec\x01\"\x06\x08\xed\x01\x10\xed\x01\"\x06\x08\xac\x02\
- \x10\xb0\x02\"\x06\x08\xb5\x02\x10\xb8\x02\"\x06\x08\xbc\x05\x10\xc5\x05\
- \"\x06\x08\xe9\x07\x10\xf7\x07\"\x06\x08\xfa\x07\x10\xcb\x08B8\n#com.sat\
- oshilabs.trezor.lib.protobufB\rTrezorMessage\x80\xa6\x1d\x01\
+ \xda\x03\"\x04\x08C\x10F\"\x04\x08K\x10L\"\x04\x08r\x10z\"\x05\x08{\x10\
+ \x95\x01\"\x06\x08\xdb\x01\x10\xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\
+ \x06\x08\xe2\x01\x10\xe2\x01\"\x06\x08\xe3\x01\x10\xe3\x01\"\x06\x08\xe4\
+ \x01\x10\xe4\x01\"\x06\x08\xe5\x01\x10\xe5\x01\"\x06\x08\xe7\x01\x10\xe7\
+ \x01\"\x06\x08\xe8\x01\x10\xe8\x01\"\x06\x08\xe9\x01\x10\xe9\x01\"\x06\
+ \x08\xea\x01\x10\xea\x01\"\x06\x08\xec\x01\x10\xec\x01\"\x06\x08\xed\x01\
+ \x10\xed\x01\"\x06\x08\xac\x02\x10\xb0\x02\"\x06\x08\xb5\x02\x10\xb8\x02\
+ \"\x06\x08\xd8\x04\x10\xdd\x04\"\x06\x08\xbc\x05\x10\xc5\x05\"\x06\x08\
+ \xe9\x07\x10\xf7\x07\"\x06\x08\xfa\x07\x10\xcb\x08B8\n#com.satoshilabs.t\
+ rezor.lib.protobufB\rTrezorMessage\x80\xa6\x1d\x01\
";
/// `FileDescriptorProto` object which was a source for this generated file
### rust/trezor-client/src/protos/generated/messages_eos.rs
[binary or diff unavailable]
### rust/trezor-client/src/protos/generated/messages_management.rs
[binary or diff unavailable]
### rust/trezor-client/src/protos/generated/messages_nem.rs
[binary or diff unavailable]
### rust/trezor-client/src/protos/mod.rs
[binary or diff unavailable]
### tests/REGISTERED_MARKERS
[binary or diff unavailable]
### tests/click_tests/record_layout.py
[binary or diff unavailable]
### tests/device_tests/eos/__init__.py
[binary or diff unavailable]
### tests/device_tests/eos/test_get_public_key.py
[binary or diff unavailable]
### tests/device_tests/eos/test_signtx.py
[binary or diff unavailable]
### tests/device_tests/nem/__init__.py
[binary or diff unavailable]
### tests/device_tests/nem/test_getaddress.py
[binary or diff unavailable]
### tests/device_tests/nem/test_signtx_mosaics.py
[binary or diff unavailable]
### tests/device_tests/nem/test_signtx_multisig.py
[binary or diff unavailable]
### tests/device_tests/nem/test_signtx_others.py
[binary or diff unavailable]
### tests/device_tests/nem/test_signtx_transfers.py
[binary or diff unavailable]
### tests/ui_tests/fixtures.json
[binary or diff unavailable]
### tools/style.py.exclude
[binary or diff unavailable]Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.