diff --git a/README.md b/README.md index 18cd71da..6ceb5e7e 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Please: | Set balance deprecated | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`who
`CompactBalance`new_free
`CompactBalance`old_reserved
| | Force transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`source
`AccountIdLookupOfT`dest
`CompactBalance`amount
| | Transfer keep alive | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| -| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest
`bool`keep_alive
| +| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`bool`keep_alive
| | Force unreserve | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`who
`Balance`amount
| | Upgrade accounts | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountId`who
| | Transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| @@ -109,7 +109,7 @@ Please: | Bond extra | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Unbond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Withdraw Unbonded | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `u32`num_slashing_spans
| -| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `ValidatorPrefs`prefs
| +| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `ValidatorPrefs`prefs
| | Nominate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `VecAccountIdLookupOfT`targets
| | Chill | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | Set payee | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `RewardDestination`payee
| @@ -123,7 +123,7 @@ Please: | Force unstake | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Force new era always | | :heavy_check_mark: | :heavy_check_mark: | | | | Cancel deferred slash | | :heavy_check_mark: | :heavy_check_mark: | | `EraIndex`era
`Vecu32`slash_indices
| -| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`validator_stash
`EraIndex`era
| +| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountId`validator_stash
`EraIndex`era
| | Rebond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Reap stash | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Kick | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountIdLookupOfT`who
| @@ -134,10 +134,10 @@ Please: ## Session -| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | -| ---------- | ------------------ | ------------------ | ------------------ | ------- | -------------------------------- | -| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `Keys`keys
`Bytes`proof
| -| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | +| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | +| ---------- | ------------------ | ------------------ | ------------------ | ------------------ | -------------------------------- | +| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Keys`keys
`Bytes`proof
| +| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | ## Grandpa diff --git a/docs/APDUSPEC.md b/docs/APDUSPEC.md index 365d0712..b0e0dec0 100644 --- a/docs/APDUSPEC.md +++ b/docs/APDUSPEC.md @@ -27,18 +27,49 @@ The general structure of commands and responses is as follows: | Return code | Description | | ----------- | ----------------------- | | 0x6400 | Execution Error | +| 0x6700 | Wrong buffer length | | 0x6982 | Empty buffer | | 0x6983 | Output buffer too small | +| 0x6984 | Data is invalid | | 0x6986 | Command not allowed | +| 0x6987 | Tx is not initialized | +| 0x6B00 | P1/P2 are invalid | | 0x6D00 | INS not supported | | 0x6E00 | CLA not supported | | 0x6F00 | Unknown | +| 0x6F01 | Sign / verify error | | 0x9000 | Success | --- ## Command definition +### GET_DEVICE_INFO + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0xE0 | +| INS | byte (1) | Instruction ID | 0x01 | +| P1 | byte (1) | Parameter 1 | 0x00 | +| P2 | byte (1) | Parameter 2 | 0x00 | +| L | byte (1) | Bytes in payload | 0x00 | + +#### Response + +| Field | Type | Content | Note | +| --------- | -------- | ------------------ | ------------------------ | +| TARGET_ID | byte (4) | Target Id | | +| OS_LEN | byte (1) | OS version length | 0..64 | +| OS | byte (?) | OS version | Non terminated string | +| FLAGS_LEN | byte (1) | Flags length | 0 | +| MCU_LEN | byte (1) | MCU version length | 0..64 | +| MCU | byte (?) | MCU version | Non terminated string | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + ### GET_VERSION #### Command @@ -53,14 +84,15 @@ The general structure of commands and responses is as follows: #### Response -| Field | Type | Content | Note | -| ------- | -------- | ---------------- | ------------------------------- | -| TEST | byte (1) | Test Mode | 0xFF means test mode is enabled | -| MAJOR | byte (2) | Version Major | 0..65535 | -| MINOR | byte (2) | Version Minor | 0..65535 | -| PATCH | byte (2) | Version Patch | 0..65535 | -| LOCKED | byte (1) | Device is locked | | -| SW1-SW2 | byte (2) | Return code | see list of return codes | +| Field | Type | Content | Note | +| --------- | -------- | ---------------- | ------------------------------- | +| TEST | byte (1) | Test Mode | 0x01 means test mode is enabled | +| MAJOR | byte (2) | Version Major | 0..65535 | +| MINOR | byte (2) | Version Minor | 0..65535 | +| PATCH | byte (2) | Version Patch | 0..65535 | +| LOCKED | byte (1) | Device is locked | It'll always be 0 | +| TARGET_ID | byte (4) | Target Id | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | --- @@ -68,19 +100,19 @@ The general structure of commands and responses is as follows: #### Command -| Field | Type | Content | Expected | | -| ------- | -------- | ------------------------- | ----------- | --- | -| CLA | byte (1) | Application Identifier | 0x90 | | -| INS | byte (1) | Instruction ID | 0x01 | | -| P1 | byte (1) | Request User confirmation | No = 0 | | -| P2 | byte (1) | Signature scheme | Ed25519 = 0 | | -| | | | Sr25519 = 1 | | -| L | byte (1) | Bytes in payload | (depends) | | -| Path[0] | byte (4) | Derivation Path Data | 0x80000000 | 44 | -| Path[1] | byte (4) | Derivation Path Data | 0x80000000 | 354 | -| Path[2] | byte (4) | Derivation Path Data | ? | | -| Path[3] | byte (4) | Derivation Path Data | ? | | -| Path[4] | byte (4) | Derivation Path Data | ? | | +| Field | Type | Content | Expected | +| ------- | -------- | ------------------------- | ----------------- | +| CLA | byte (1) | Application Identifier | 0x90 | +| INS | byte (1) | Instruction ID | 0x01 | +| P1 | byte (1) | Request User confirmation | No = 0 | +| P2 | byte (1) | Signature scheme | Ed25519 = 0 | +| | | | Sr25519 = 1 | +| L | byte (1) | Bytes in payload | (depends) | +| Path[0] | byte (4) | Derivation Path Data | 0x80000000 \| 44 | +| Path[1] | byte (4) | Derivation Path Data | 0x80000000 \| 354 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | #### Response @@ -113,13 +145,13 @@ All other packets/chunks contain data chunks that are described below ##### First Packet -| Field | Type | Content | Expected | -| ------- | -------- | -------------------- | -------- | -| Path[0] | byte (4) | Derivation Path Data | 44 | -| Path[1] | byte (4) | Derivation Path Data | 354 | -| Path[2] | byte (4) | Derivation Path Data | ? | -| Path[3] | byte (4) | Derivation Path Data | ? | -| Path[4] | byte (4) | Derivation Path Data | ? | +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | ----------------- | +| Path[0] | byte (4) | Derivation Path Data | 0x80000000 \| 44 | +| Path[1] | byte (4) | Derivation Path Data | 0x80000000 \| 354 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | ##### Other Chunks/Packets @@ -157,13 +189,13 @@ All other packets/chunks contain data chunks that are described below ##### First Packet -| Field | Type | Content | Expected | -| ------- | -------- | -------------------- | -------- | -| Path[0] | byte (4) | Derivation Path Data | 44 | -| Path[1] | byte (4) | Derivation Path Data | 354 | -| Path[2] | byte (4) | Derivation Path Data | ? | -| Path[3] | byte (4) | Derivation Path Data | ? | -| Path[4] | byte (4) | Derivation Path Data | ? | +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | ----------------- | +| Path[0] | byte (4) | Derivation Path Data | 0x80000000 \| 44 | +| Path[1] | byte (4) | Derivation Path Data | 0x80000000 \| 354 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | ##### Other Chunks/Packets diff --git a/docs/supported_24.9430.x.md b/docs/supported_24.9430.x.md index a49ebb81..c78b9634 100644 --- a/docs/supported_24.9430.x.md +++ b/docs/supported_24.9430.x.md @@ -65,7 +65,7 @@ | Set balance deprecated | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`who
`CompactBalance`new_free
`CompactBalance`old_reserved
| | Force transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`source
`AccountIdLookupOfT`dest
`CompactBalance`amount
| | Transfer keep alive | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| -| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest
`bool`keep_alive
| +| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`bool`keep_alive
| | Force unreserve | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`who
`Balance`amount
| | Upgrade accounts | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountId`who
| | Transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| @@ -79,7 +79,7 @@ | Bond extra | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Unbond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Withdraw Unbonded | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `u32`num_slashing_spans
| -| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `ValidatorPrefs`prefs
| +| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `ValidatorPrefs`prefs
| | Nominate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `VecAccountIdLookupOfT`targets
| | Chill | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | Set payee | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `RewardDestination`payee
| @@ -93,7 +93,7 @@ | Force unstake | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Force new era always | | :heavy_check_mark: | :heavy_check_mark: | | | | Cancel deferred slash | | :heavy_check_mark: | :heavy_check_mark: | | `EraIndex`era
`Vecu32`slash_indices
| -| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`validator_stash
`EraIndex`era
| +| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountId`validator_stash
`EraIndex`era
| | Rebond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Reap stash | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Kick | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountIdLookupOfT`who
| @@ -104,10 +104,10 @@ ## Session -| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | -| ---------- | ------------------ | ------------------ | ------------------ | ------- | -------------------------------- | -| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `Keys`keys
`Bytes`proof
| -| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | +| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | +| ---------- | ------------------ | ------------------ | ------------------ | ------------------ | -------------------------------- | +| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Keys`keys
`Bytes`proof
| +| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | ## Grandpa diff --git a/docs/supported_latest.md b/docs/supported_latest.md index a49ebb81..c78b9634 100644 --- a/docs/supported_latest.md +++ b/docs/supported_latest.md @@ -65,7 +65,7 @@ | Set balance deprecated | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`who
`CompactBalance`new_free
`CompactBalance`old_reserved
| | Force transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`source
`AccountIdLookupOfT`dest
`CompactBalance`amount
| | Transfer keep alive | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| -| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest
`bool`keep_alive
| +| Transfer all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`bool`keep_alive
| | Force unreserve | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`who
`Balance`amount
| | Upgrade accounts | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountId`who
| | Transfer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountIdLookupOfT`dest
`CompactBalance`amount
| @@ -79,7 +79,7 @@ | Bond extra | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Unbond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Withdraw Unbonded | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `u32`num_slashing_spans
| -| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `ValidatorPrefs`prefs
| +| Validate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `ValidatorPrefs`prefs
| | Nominate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `VecAccountIdLookupOfT`targets
| | Chill | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | Set payee | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `RewardDestination`payee
| @@ -93,7 +93,7 @@ | Force unstake | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Force new era always | | :heavy_check_mark: | :heavy_check_mark: | | | | Cancel deferred slash | | :heavy_check_mark: | :heavy_check_mark: | | `EraIndex`era
`Vecu32`slash_indices
| -| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`validator_stash
`EraIndex`era
| +| Payout stakers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `AccountId`validator_stash
`EraIndex`era
| | Rebond | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `CompactBalance`amount
| | Reap stash | | :heavy_check_mark: | :heavy_check_mark: | | `AccountId`stash
`u32`num_slashing_spans
| | Kick | | :heavy_check_mark: | :heavy_check_mark: | | `VecAccountIdLookupOfT`who
| @@ -104,10 +104,10 @@ ## Session -| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | -| ---------- | ------------------ | ------------------ | ------------------ | ------- | -------------------------------- | -| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `Keys`keys
`Bytes`proof
| -| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | +| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments | +| ---------- | ------------------ | ------------------ | ------------------ | ------------------ | -------------------------------- | +| Set keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Keys`keys
`Bytes`proof
| +| Purge keys | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | ## Grandpa