@ledgerhq/hw-app-starknet
Version:
Ledger Hardware Wallet Starknet Application API
44 lines (43 loc) • 1.58 kB
JavaScript
const N = 90, _ = {
GET_VERSION: 0,
GET_PUB_KEY: 1,
SIGN_HASH: 2,
SIGN_TX: 3,
SIGN_TX_V1: 4,
DEPLOY_ACCOUNT: 5,
DEPLOY_ACCOUNT_V1: 6
}, a = 63;
var I = /* @__PURE__ */ ((n) => (n[n.NoError = 36864] = "NoError", n[n.BadCla = 28160] = "BadCla", n[n.BadIns = 28161] = "BadIns", n[n.InvalidP1P2 = 28162] = "InvalidP1P2", n[n.UserRejected = 28164] = "UserRejected", n[n.ExecutionError = 28416] = "ExecutionError", n))(I || {});
const t = {
36864: "No error",
28160: "Bad CLA",
28161: "Bad INS",
28162: "InvalidP1P2",
28164: "Rejected by User",
28416: "Execution Error"
/*[LedgerError.DeviceIsBusy]: "Device is busy",
[LedgerError.ErrorDerivingKeys]: "Error deriving keys",
[LedgerError.WrongLength]: "Wrong Length",
[LedgerError.EmptyBuffer]: "Empty Buffer",
[LedgerError.OutputBufferTooSmall]: "Output buffer too small",
[LedgerError.DataIsInvalid]: "Data is invalid",
[LedgerError.ConditionsNotSatisfied]: "Conditions not satisfied",
[LedgerError.TransactionRejected]: "Transaction rejected",
[LedgerError.BadKeyHandle]: "Bad key handle",
[LedgerError.InvalidP1P2]: "Invalid P1/P2",
[LedgerError.InstructionNotSupported]: "Instruction not supported",
[LedgerError.AppDoesNotSeemToBeOpen]: "App does not seem to be open",
[LedgerError.UnknownError]: "Unknown error",
[LedgerError.SignVerifyError]: "Sign/verify error",*/
};
function c(n) {
return n in t ? t[n] : `Unknown Status Code: ${n}`;
}
export {
N as CLA,
t as ERROR_DESCRIPTION,
a as HASH_MAX_LENGTH,
_ as INS,
I as LedgerError,
c as errorCodeToString
};