Command name |
INS |
Description |
GET_VERSION |
0x03 |
Get application version as MAJOR , MINOR , PATCH |
GET_APP_NAME |
0x04 |
Get ASCII encoded application name |
GET_PUBLIC_KEY |
0x05 |
Get public key given BIP32 path |
SIGN_TX |
0x06 |
Sign transaction given BIP32 path and raw transaction |
CLA |
INS |
P1 |
P2 |
Lc |
CData |
0x5B |
0x03 |
0x00 |
0x00 |
0x00 |
- |
Response length (bytes) |
SW |
RData |
3 |
0x9000 |
MAJOR (1) || MINOR (1) || PATCH (1) |
CLA |
INS |
P1 |
P2 |
Lc |
CData |
0x5B |
0x04 |
0x00 |
0x00 |
0x00 |
- |
Response length (bytes) |
SW |
RData |
var |
0x9000 |
APPNAME (var) |
CLA |
INS |
P1 |
P2 |
Lc |
CData |
0x5B |
0x05 |
0x00 (no display) 0x01 (display) |
0x00 |
1 + 4n |
len(bip32_path) (1) || bip32_path{1} (4) ||
... ||
bip32_path{n} (4) |
Response length (bytes) |
SW |
RData |
var |
0x9000 |
len(public_key) (1) || public_key (var) || len(chain_code) (1) || chain_code (var) |
Note: The maximum number of chunks depends on the maximum available RAM on each device and is equal to N.
Device |
N |
Ledger Nano S |
0x07 |
Ledger Nano S+ |
0x6B |
Ledger Nano X |
0x69 |
CLA |
INS |
P1 |
P2 |
Lc |
CData |
0x5B |
0x06 |
0x00 |
0x80 (more) |
1 + 4n |
len(bip32_path) (1) || bip32_path{1} (4) ||
... ||
bip32_path{n} (4) |
CLA |
INS |
P1 |
P2 |
Lc |
CData |
0x5B |
0x06 |
0x01-N (chunk index) |
0x80 (more) 0x00 (last) |
var |
serialized_tx_chunk (var) |
Response length (bytes) |
SW |
RData |
var |
0x9000 |
len(signature) (1) || signature (var) |
SW |
SW name |
Description |
0x6985 |
SW_DENY |
Rejected by user |
0x6A86 |
SW_WRONG_P1P2 |
Either P1 or P2 is incorrect |
0x6A87 |
SW_WRONG_DATA_LENGTH |
Lc or minimum APDU length is incorrect |
0x6D00 |
SW_INS_NOT_SUPPORTED |
No command exists with INS |
0x6E00 |
SW_CLA_NOT_SUPPORTED |
Bad CLA used for this application |
0xB000 |
SW_WRONG_RESPONSE_LENGTH |
Wrong response length (buffer size problem) |
0xB001 |
SW_DISPLAY_BIP32_PATH_FAIL |
BIP32 path conversion to string failed |
0xB002 |
SW_DISPLAY_ADDRESS_FAIL |
Address conversion to string failed |
0xB003 |
SW_DISPLAY_AMOUNT_FAIL |
Amount conversion to string failed |
0xB004 |
SW_WRONG_TX_LENGTH |
Wrong raw transaction length |
0xB005 |
SW_TX_PARSING_FAIL |
Failed to parse raw transaction |
0xB006 |
SW_TX_HASH_FAIL |
Failed to get public key |
0xB007 |
SW_BAD_STATE |
Security issue with bad state |
0xB008 |
SW_SIGNATURE_FAIL |
Signature of raw transaction failed |
0xB009 |
SW_DISPLAY_GAS_FEE_FAIL |
Failed to display gas fee |
0x9000 |
OK |
Success |