UNPKG

dotbit

Version:

A complete .bit SDK and utilities in TypeScript

45 lines 3.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CodedError = exports.DotbitError = exports.BitErrorCode = exports.BitRegisterApiError = exports.BitSubAccountErrorCode = exports.BitIndexerErrorCode = void 0; var BitIndexerErrorCode; (function (BitIndexerErrorCode) { BitIndexerErrorCode[BitIndexerErrorCode["Error500"] = 500] = "Error500"; BitIndexerErrorCode[BitIndexerErrorCode["ParamsInvalid"] = 10000] = "ParamsInvalid"; BitIndexerErrorCode[BitIndexerErrorCode["MethodNotExist"] = 10001] = "MethodNotExist"; BitIndexerErrorCode[BitIndexerErrorCode["DbError"] = 10002] = "DbError"; BitIndexerErrorCode[BitIndexerErrorCode["AccountFormatInvalid"] = 20006] = "AccountFormatInvalid"; BitIndexerErrorCode[BitIndexerErrorCode["AccountNotExist"] = 20007] = "AccountNotExist"; })(BitIndexerErrorCode || (exports.BitIndexerErrorCode = BitIndexerErrorCode = {})); var BitSubAccountErrorCode; (function (BitSubAccountErrorCode) { BitSubAccountErrorCode[BitSubAccountErrorCode["AccountIsRegistered"] = 1001] = "AccountIsRegistered"; BitSubAccountErrorCode[BitSubAccountErrorCode["TooManySubAccountsCount"] = 10000] = "TooManySubAccountsCount"; BitSubAccountErrorCode[BitSubAccountErrorCode["PermissionDenied"] = 30011] = "PermissionDenied"; BitSubAccountErrorCode[BitSubAccountErrorCode["TaskInProgress"] = 40008] = "TaskInProgress"; })(BitSubAccountErrorCode || (exports.BitSubAccountErrorCode = BitSubAccountErrorCode = {})); var BitRegisterApiError; (function (BitRegisterApiError) { BitRegisterApiError[BitRegisterApiError["OperationTooFrequent"] = 11013] = "OperationTooFrequent"; BitRegisterApiError[BitRegisterApiError["EditManagerPermissionDenied"] = 30011] = "EditManagerPermissionDenied"; BitRegisterApiError[BitRegisterApiError["SameAddress"] = 30023] = "SameAddress"; })(BitRegisterApiError || (exports.BitRegisterApiError = BitRegisterApiError = {})); var BitErrorCode; (function (BitErrorCode) { BitErrorCode[BitErrorCode["UnsupportedEVMChainId"] = 1000] = "UnsupportedEVMChainId"; BitErrorCode[BitErrorCode["SubAccountStatusInvalid"] = 1001] = "SubAccountStatusInvalid"; BitErrorCode[BitErrorCode["SubAccountDoNotSupportSubAccount"] = 1002] = "SubAccountDoNotSupportSubAccount"; BitErrorCode[BitErrorCode["SignerRequired"] = 1003] = "SignerRequired"; BitErrorCode[BitErrorCode["BitBuilderRequired"] = 1004] = "BitBuilderRequired"; BitErrorCode[BitErrorCode["PluginRequired"] = 1005] = "PluginRequired"; BitErrorCode[BitErrorCode["InvalidAccountId"] = 1006] = "InvalidAccountId"; BitErrorCode[BitErrorCode["InvalidSubAccount"] = 1007] = "InvalidSubAccount"; })(BitErrorCode || (exports.BitErrorCode = BitErrorCode = {})); class DotbitError extends Error { constructor(message, code) { super(code ? `${code}: ${message}` : message); this.code = code; } } exports.DotbitError = DotbitError; exports.CodedError = DotbitError; //# sourceMappingURL=DotbitError.js.map