TRANSACTION_CREATE_REAL = 1
TRANSACTION_CREATE_FAKE = 2
TRANSACTION_PARSE = 3

INS_NONE = 0x00
INS_RESET = 0x02

INS_GET_KEY = 0x20
INS_PUT_KEY = 0x22
INS_GET_CHACHA8_PREKEY = 0x24
INS_VERIFY_KEY = 0x26
INS_MANAGE_SEEDWORDS = 0x28

INS_SECRET_KEY_TO_PUBLIC_KEY = 0x30
INS_GEN_KEY_DERIVATION = 0x32
INS_DERIVATION_TO_SCALAR = 0x34
INS_DERIVE_PUBLIC_KEY = 0x36
INS_DERIVE_SECRET_KEY = 0x38
INS_GEN_KEY_IMAGE = 0x3A
INS_SECRET_KEY_ADD = 0x3C
INS_SECRET_KEY_SUB = 0x3E
INS_GENERATE_KEYPAIR = 0x40
INS_SECRET_SCAL_MUL_KEY = 0x42
INS_SECRET_SCAL_MUL_BASE = 0x44

INS_DERIVE_SUBADDRESS_PUBLIC_KEY = 0x46
INS_GET_SUBADDRESS = 0x48
INS_GET_SUBADDRESS_SPEND_PUBLIC_KEY = 0x4A
INS_GET_SUBADDRESS_SECRET_KEY = 0x4C

INS_OPEN_TX = 0x70
INS_SET_SIGNATURE_MODE = 0x72
INS_GET_ADDITIONAL_KEY = 0x74
INS_STEALTH = 0x76
INS_BLIND = 0x78
INS_UNBLIND = 0x7A
INS_VALIDATE = 0x7C
INS_MLSAG = 0x7E
INS_CLOSE_TX = 0x80

INS_GET_RESPONSE = 0xC0
IN_OPTION_MASK = 0x000000FF
OUT_OPTION_MASK = 0x0000FF00
IN_OPTION_MORE_COMMAND = 0x00000080


SW_OK = 0x9000
SW_ALGORITHM_UNSUPPORTED = 0x9484
SW_BYTES_REMAINING_00 = 0x6100
SW_WARNING_STATE_UNCHANGED = 0x6200
SW_STATE_TERMINATED = 0x6285
SW_MORE_DATA_AVAILABLE = 0x6310
SW_WRONG_LENGTH = 0x6700
SW_LOGICAL_CHANNEL_NOT_SUPPORTED = 0x6881
SW_SECURE_MESSAGING_NOT_SUPPORTED = 0x6882
SW_LAST_COMMAND_EXPECTED = 0x6883
SW_COMMAND_CHAINING_NOT_SUPPORTED = 0x6884
SW_SECURITY_LOAD_KEY = 0x6900
SW_SECURITY_COMMITMENT_CONTROL = 0x6911
SW_SECURITY_AMOUNT_CHAIN_CONTROL = 0x6912
SW_SECURITY_COMMITMENT_CHAIN_CONTROL = 0x6913
SW_SECURITY_STATUS_NOT_SATISFIED = 0x6982
SW_FILE_INVALID = 0x6983
SW_PIN_BLOCKED = 0x6983
SW_DATA_INVALID = 0x6984
SW_CONDITIONS_NOT_SATISFIED = 0x6985
SW_COMMAND_NOT_ALLOWED = 0x6986
SW_APPLET_SELECT_FAILED = 0x6999
SW_WRONG_DATA = 0x6A80
SW_FUNC_NOT_SUPPORTED = 0x6A81
SW_FILE_NOT_FOUND = 0x6A82
SW_RECORD_NOT_FOUND = 0x6A83
SW_FILE_FULL = 0x6A84
SW_INCORRECT_P1P2 = 0x6A86
SW_REFERENCED_DATA_NOT_FOUND = 0x6A88
SW_WRONG_P1P2 = 0x6B00
SW_CORRECT_LENGTH_00 = 0x6C00
SW_INS_NOT_SUPPORTED = 0x6D00
SW_CLA_NOT_SUPPORTED = 0x6E00
SW_UNKNOWN = 0x6F00
