You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/COMMANDS.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
|`GET_APP_NAME`| 0x04 | Get ASCII encoded application name |
9
9
|`GET_PUBLIC_KEY`| 0x05 | Get public key given BIP32 path |
10
10
|`SIGN_TX`| 0x06 | Sign transaction given transaction info, utxos and outputs |
11
+
|`SIGN_MESSAGE`| 0x07 | Sign the personal message |
11
12
12
13
## GET_VERSION
13
14
@@ -55,11 +56,11 @@ Keys for kaspa normally use the derivation path `m/44'/111111'/<account>'/<type>
55
56
56
57
| CData Part | Description |
57
58
| --- | --- |
58
-
|`purpose`| Must be `44'` or `80000002c`|
59
-
|`coin_type`| Must be `111111'` or `8001b207`|
60
-
|`account`| Current wallets all use `80000000` (aka. `0'`) for default account but any value from `00000000` to `11111111` is accepted if passed |
61
-
|`type`| Current wallets use either `00000000` for Receive Address or `00000001` for Change Address, but any value from `00000000` to `11111111` is accepted if passed |
62
-
|`index`| Any value from `00000000` to `11111111` if passed |
59
+
|`purpose`| Must be `44'` or `0x80000002c`|
60
+
|`coin_type`| Must be `111111'` or `0x8001b207`|
61
+
|`account`| Current wallets all use `0x80000000` (aka. `0'`) for default account but any value from `0x80000000` to `0xFFFFFFFF` is accepted if passed |
62
+
|`type`| Current wallets use either `0x00000000` for Receive Address or `0x00000001` for Change Address, but any value from `0x00000000` to `0xFFFFFFFF` is accepted if passed |
63
+
|`index`| Any value from `0x00000000` to `0xFFFFFFFF` if passed |
63
64
64
65
If you want to generate addresses using a root public key,
65
66
@@ -88,7 +89,7 @@ Transactions signed with ECDSA are currently not supported.
@@ -102,7 +103,7 @@ Transactions signed with ECDSA are currently not supported.
102
103
`P2` value is used only if `P1 in {0x00, 0x01, 0x02}`. If `P1 = 0x03`, `P2` is ignored.
103
104
104
105
#### Flow
105
-
1. Send the first APDU `P1 = 0x00` with the version, output length and input length
106
+
1. Send the first APDU `P1 = 0x00` with the version, output length and input length, change address type and index, and account (for UTXOs and change)
106
107
2. For each output (up to 2), send `P1 = 0x01` with the output CData
107
108
3. For each UTXO input send `P1 = 0x02` with the input CData. When sending the last UTXO input set `P2 = 0x00` to indicate that it is the last APDU. The signatures will later be sent back to you in the same order these inputs come in.
108
109
4.[Display] User will be able to view the transaction info and choose to `Approve` or `Reject`.
@@ -133,12 +134,13 @@ Transactions signed with ECDSA are currently not supported.
Copy file name to clipboardExpand all lines: doc/TRANSACTION.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,16 @@ For ECDSA-signed addresses (supported by this app only as a send address), it be
25
25
| `n_outputs` | 1 | The number of outputs. Exactly 1 or 2.
26
26
|`change_address_type`| 1 |`0` if `RECEIVE` or `1` if `CHANGE`*|
27
27
|`change_address_index`| 4 |`0x00000000` to `0xFFFFFFFF`**|
28
+
|`account`| 4 |`0x80000000` to `0xFFFFFFFF`, normally should use `0x80000000` (the default account)***|
28
29
29
30
\* While this will be used for the change, the path may be either `RECEIVE` or `CHANGE`.
30
31
This is necessary in case the user wants to send the change back to the same address.
31
32
In this case, the `change_address_type` has to be set to `RECEIVE`.
32
33
33
34
\*\*`change_address_type` and `change_address_index` are ignored if `n_outputs == 1`. If `n_outputs == 2` then the path defined here must resolve to the same `script_public_key` in `outputs[1]`.
35
+
36
+
\*\*\*`account` is the BIP44 account. A transaction can only come from a single account. Current Kaspa ecosystem only uses `0'` (or `0x80000000`) but support this is in anticipation of wider account-based support.
37
+
34
38
### Transaction Input
35
39
36
40
Total bytes: 46
@@ -54,7 +58,7 @@ Total bytes: 43 (max)
54
58
| Field | Size (bytes) | Description |
55
59
| --- | --- | --- |
56
60
|`value`| 8 | The amount of KAS in sompi that will go send to the address |
message(FATAL_ERROR"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt. ")
0 commit comments