dotbit-sdk-allin
Version:
A complete .bit SDK and utilities in TypeScript
41 lines • 2.7 kB
JavaScript
export 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 || (BitIndexerErrorCode = {}));
export 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 || (BitSubAccountErrorCode = {}));
export var BitRegisterApiError;
(function (BitRegisterApiError) {
BitRegisterApiError[BitRegisterApiError["OperationTooFrequent"] = 11013] = "OperationTooFrequent";
BitRegisterApiError[BitRegisterApiError["EditManagerPermissionDenied"] = 30011] = "EditManagerPermissionDenied";
BitRegisterApiError[BitRegisterApiError["SameAddress"] = 30023] = "SameAddress";
})(BitRegisterApiError || (BitRegisterApiError = {}));
export 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 || (BitErrorCode = {}));
export class DotbitError extends Error {
constructor(message, code) {
super(code ? `${code}: ${message}` : message);
this.code = code;
}
}
export const CodedError = DotbitError;
//# sourceMappingURL=DotbitError.js.map