@injectivelabs/exceptions 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/exceptions/base.d.ts +76 -0
- package/dist/cjs/exceptions/base.js +176 -0
- package/dist/cjs/exceptions/base.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/BitGetException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/BitGetException.js +24 -0
- package/dist/cjs/exceptions/exceptions/BitGetException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/CosmosWalletException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/CosmosWalletException.js +17 -0
- package/dist/cjs/exceptions/exceptions/CosmosWalletException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/GeneralException.d.ts +5 -0
- package/dist/cjs/exceptions/exceptions/GeneralException.js +12 -0
- package/dist/cjs/exceptions/exceptions/GeneralException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.js +22 -0
- package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/HttpRequestException.d.ts +10 -0
- package/dist/cjs/exceptions/exceptions/HttpRequestException.js +22 -0
- package/dist/cjs/exceptions/exceptions/HttpRequestException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/LedgerCosmosException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/LedgerCosmosException.js +41 -0
- package/dist/cjs/exceptions/exceptions/LedgerCosmosException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/LedgerException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/LedgerException.js +41 -0
- package/dist/cjs/exceptions/exceptions/LedgerException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/MetamaskException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/MetamaskException.js +24 -0
- package/dist/cjs/exceptions/exceptions/MetamaskException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/OkxWalletException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/OkxWalletException.js +24 -0
- package/dist/cjs/exceptions/exceptions/OkxWalletException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/TransactionException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/TransactionException.js +27 -0
- package/dist/cjs/exceptions/exceptions/TransactionException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/TrezorException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/TrezorException.js +17 -0
- package/dist/cjs/exceptions/exceptions/TrezorException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/TrustWalletException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/TrustWalletException.js +26 -0
- package/dist/cjs/exceptions/exceptions/TrustWalletException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/WalletException.d.ts +5 -0
- package/dist/cjs/exceptions/exceptions/WalletException.js +12 -0
- package/dist/cjs/exceptions/exceptions/WalletException.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/Web3Exception.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/Web3Exception.js +17 -0
- package/dist/cjs/exceptions/exceptions/Web3Exception.js.map +1 -0
- package/dist/cjs/exceptions/exceptions/index.d.ts +15 -0
- package/dist/cjs/exceptions/exceptions/index.js +32 -0
- package/dist/cjs/exceptions/exceptions/index.js.map +1 -0
- package/dist/cjs/exceptions/index.d.ts +2 -0
- package/dist/cjs/exceptions/index.js +19 -0
- package/dist/cjs/exceptions/index.js.map +1 -0
- package/dist/cjs/exceptions/messages.d.ts +12 -0
- package/dist/cjs/exceptions/messages.js +1601 -0
- package/dist/cjs/exceptions/messages.js.map +1 -0
- package/dist/cjs/exceptions/types/codes.d.ts +424 -0
- package/dist/cjs/exceptions/types/codes.js +792 -0
- package/dist/cjs/exceptions/types/codes.js.map +1 -0
- package/dist/cjs/exceptions/types/context.d.ts +85 -0
- package/dist/cjs/exceptions/types/context.js +24 -0
- package/dist/cjs/exceptions/types/context.js.map +1 -0
- package/dist/cjs/exceptions/types/index.d.ts +3 -0
- package/dist/cjs/exceptions/types/index.js +20 -0
- package/dist/cjs/exceptions/types/index.js.map +1 -0
- package/dist/cjs/exceptions/types/modules.d.ts +59 -0
- package/dist/cjs/exceptions/types/modules.js +67 -0
- package/dist/cjs/exceptions/types/modules.js.map +1 -0
- package/dist/cjs/exceptions/utils/grpc.d.ts +3 -0
- package/dist/cjs/exceptions/utils/grpc.js +41 -0
- package/dist/cjs/exceptions/utils/grpc.js.map +1 -0
- package/dist/cjs/exceptions/utils/helpers.d.ts +1 -0
- package/dist/cjs/exceptions/utils/helpers.js +25 -0
- package/dist/cjs/exceptions/utils/helpers.js.map +1 -0
- package/dist/cjs/exceptions/utils/maps.d.ts +13 -0
- package/dist/cjs/exceptions/utils/maps.js +133 -0
- package/dist/cjs/exceptions/utils/maps.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types.d.ts +2 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils.d.ts +8 -0
- package/dist/cjs/utils.js +48 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/exceptions/base.d.ts +76 -0
- package/dist/esm/exceptions/base.js +172 -0
- package/dist/esm/exceptions/base.js.map +1 -0
- package/dist/esm/exceptions/exceptions/BitGetException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/BitGetException.js +20 -0
- package/dist/esm/exceptions/exceptions/BitGetException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/CosmosWalletException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/CosmosWalletException.js +13 -0
- package/dist/esm/exceptions/exceptions/CosmosWalletException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/GeneralException.d.ts +5 -0
- package/dist/esm/exceptions/exceptions/GeneralException.js +8 -0
- package/dist/esm/exceptions/exceptions/GeneralException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.js +18 -0
- package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/HttpRequestException.d.ts +10 -0
- package/dist/esm/exceptions/exceptions/HttpRequestException.js +18 -0
- package/dist/esm/exceptions/exceptions/HttpRequestException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/LedgerCosmosException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/LedgerCosmosException.js +37 -0
- package/dist/esm/exceptions/exceptions/LedgerCosmosException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/LedgerException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/LedgerException.js +37 -0
- package/dist/esm/exceptions/exceptions/LedgerException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/MetamaskException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/MetamaskException.js +20 -0
- package/dist/esm/exceptions/exceptions/MetamaskException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/OkxWalletException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/OkxWalletException.js +20 -0
- package/dist/esm/exceptions/exceptions/OkxWalletException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/TransactionException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/TransactionException.js +23 -0
- package/dist/esm/exceptions/exceptions/TransactionException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/TrezorException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/TrezorException.js +13 -0
- package/dist/esm/exceptions/exceptions/TrezorException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/TrustWalletException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/TrustWalletException.js +22 -0
- package/dist/esm/exceptions/exceptions/TrustWalletException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/WalletException.d.ts +5 -0
- package/dist/esm/exceptions/exceptions/WalletException.js +8 -0
- package/dist/esm/exceptions/exceptions/WalletException.js.map +1 -0
- package/dist/esm/exceptions/exceptions/Web3Exception.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/Web3Exception.js +13 -0
- package/dist/esm/exceptions/exceptions/Web3Exception.js.map +1 -0
- package/dist/esm/exceptions/exceptions/index.d.ts +15 -0
- package/dist/esm/exceptions/exceptions/index.js +16 -0
- package/dist/esm/exceptions/exceptions/index.js.map +1 -0
- package/dist/esm/exceptions/index.d.ts +2 -0
- package/dist/esm/exceptions/index.js +3 -0
- package/dist/esm/exceptions/index.js.map +1 -0
- package/dist/esm/exceptions/messages.d.ts +12 -0
- package/dist/esm/exceptions/messages.js +1598 -0
- package/dist/esm/exceptions/messages.js.map +1 -0
- package/dist/esm/exceptions/types/codes.d.ts +424 -0
- package/dist/esm/exceptions/types/codes.js +788 -0
- package/dist/esm/exceptions/types/codes.js.map +1 -0
- package/dist/esm/exceptions/types/context.d.ts +85 -0
- package/dist/esm/exceptions/types/context.js +21 -0
- package/dist/esm/exceptions/types/context.js.map +1 -0
- package/dist/esm/exceptions/types/index.d.ts +3 -0
- package/dist/esm/exceptions/types/index.js +4 -0
- package/dist/esm/exceptions/types/index.js.map +1 -0
- package/dist/esm/exceptions/types/modules.d.ts +59 -0
- package/dist/esm/exceptions/types/modules.js +64 -0
- package/dist/esm/exceptions/types/modules.js.map +1 -0
- package/dist/esm/exceptions/utils/grpc.d.ts +3 -0
- package/dist/esm/exceptions/utils/grpc.js +4 -0
- package/dist/esm/exceptions/utils/grpc.js.map +1 -0
- package/dist/esm/exceptions/utils/helpers.d.ts +1 -0
- package/dist/esm/exceptions/utils/helpers.js +21 -0
- package/dist/esm/exceptions/utils/helpers.js.map +1 -0
- package/dist/esm/exceptions/utils/maps.d.ts +13 -0
- package/dist/esm/exceptions/utils/maps.js +126 -0
- package/dist/esm/exceptions/utils/maps.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/types.d.ts +2 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.d.ts +8 -0
- package/dist/esm/utils.js +43 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionException = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
const index_js_1 = require("../types/index.js");
|
|
6
|
+
const maps_js_1 = require("../utils/maps.js");
|
|
7
|
+
class TransactionException extends base_js_1.ConcreteException {
|
|
8
|
+
static errorClass = 'TransactionException';
|
|
9
|
+
constructor(error, context) {
|
|
10
|
+
super(error, context);
|
|
11
|
+
this.type = index_js_1.ErrorType.ChainError;
|
|
12
|
+
}
|
|
13
|
+
parse() {
|
|
14
|
+
const { message, context, contextModule, contextCode } = this;
|
|
15
|
+
const { code, message: parsedMessage, contextModule: parsedContextModule, } = (0, maps_js_1.mapFailedTransactionMessage)(message, { contextCode, contextModule });
|
|
16
|
+
this.setContext(context || 'Unknown');
|
|
17
|
+
this.setMessage(parsedMessage);
|
|
18
|
+
this.setContextCode(code);
|
|
19
|
+
this.setOriginalMessage((0, maps_js_1.parseErrorMessage)(message));
|
|
20
|
+
if (parsedContextModule) {
|
|
21
|
+
this.setContextModule(parsedContextModule);
|
|
22
|
+
}
|
|
23
|
+
this.setName(TransactionException.errorClass);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.TransactionException = TransactionException;
|
|
27
|
+
//# sourceMappingURL=TransactionException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionException.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/TransactionException.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAC9C,gDAA2D;AAC3D,8CAAiF;AAEjF,MAAa,oBAAqB,SAAQ,2BAAiB;IAClD,MAAM,CAAC,UAAU,GAAW,sBAAsB,CAAA;IAEzD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,oBAAS,CAAC,UAAU,CAAA;IAClC,CAAC;IAEM,KAAK;QACV,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;QAE7D,MAAM,EACJ,IAAI,EACJ,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,mBAAmB,GACnC,GAAG,IAAA,qCAA2B,EAAC,OAAO,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAA;QAExE,IAAI,CAAC,UAAU,CAAC,OAAO,IAAI,SAAS,CAAC,CAAA;QACrC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QAC9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAA,2BAAiB,EAAC,OAAO,CAAC,CAAC,CAAA;QAEnD,IAAI,mBAAmB,EAAE,CAAC;YACxB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;QAC5C,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAA;IAC/C,CAAC;;AA5BH,oDA6BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../base.js';
|
|
2
|
+
import { ErrorContext } from '../types/index.js';
|
|
3
|
+
export declare class TrezorException extends ConcreteException {
|
|
4
|
+
static errorClass: string;
|
|
5
|
+
constructor(error: Error, context?: ErrorContext);
|
|
6
|
+
parse(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrezorException = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
const index_js_1 = require("../types/index.js");
|
|
6
|
+
class TrezorException extends base_js_1.ConcreteException {
|
|
7
|
+
static errorClass = 'TrezorException';
|
|
8
|
+
constructor(error, context) {
|
|
9
|
+
super(error, context);
|
|
10
|
+
this.type = index_js_1.ErrorType.WalletError;
|
|
11
|
+
}
|
|
12
|
+
parse() {
|
|
13
|
+
this.setName(TrezorException.errorClass);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.TrezorException = TrezorException;
|
|
17
|
+
//# sourceMappingURL=TrezorException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrezorException.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/TrezorException.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAC9C,gDAA2D;AAE3D,MAAa,eAAgB,SAAQ,2BAAiB;IAC7C,MAAM,CAAC,UAAU,GAAW,iBAAiB,CAAA;IAEpD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,oBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;IAC1C,CAAC;;AAXH,0CAYC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../base.js';
|
|
2
|
+
import { ErrorContext } from '../types/index.js';
|
|
3
|
+
export declare class TrustWalletException extends ConcreteException {
|
|
4
|
+
static errorClass: string;
|
|
5
|
+
constructor(error: Error, context?: ErrorContext);
|
|
6
|
+
parse(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrustWalletException = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
const index_js_1 = require("../types/index.js");
|
|
6
|
+
const maps_js_1 = require("../utils/maps.js");
|
|
7
|
+
const removeTrustWalletFromErrorString = (message) => message
|
|
8
|
+
.replaceAll('TrustWallet', '')
|
|
9
|
+
.replaceAll('Trust Wallet', '')
|
|
10
|
+
.replaceAll('Trustwallet', '')
|
|
11
|
+
.replaceAll('TrustWallet:', '')
|
|
12
|
+
.replaceAll('Trust Wallet:', '');
|
|
13
|
+
class TrustWalletException extends base_js_1.ConcreteException {
|
|
14
|
+
static errorClass = 'TrustWalletException';
|
|
15
|
+
constructor(error, context) {
|
|
16
|
+
super(error, context);
|
|
17
|
+
this.type = index_js_1.ErrorType.WalletError;
|
|
18
|
+
}
|
|
19
|
+
parse() {
|
|
20
|
+
const { message } = this;
|
|
21
|
+
this.setMessage((0, maps_js_1.mapMetamaskMessage)(removeTrustWalletFromErrorString(message)));
|
|
22
|
+
this.setName(TrustWalletException.errorClass);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.TrustWalletException = TrustWalletException;
|
|
26
|
+
//# sourceMappingURL=TrustWalletException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrustWalletException.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/TrustWalletException.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAC9C,gDAA2D;AAC3D,8CAAqD;AAErD,MAAM,gCAAgC,GAAG,CAAC,OAAe,EAAU,EAAE,CACnE,OAAO;KACJ,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC;KAC7B,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;KAC9B,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC;KAC7B,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;KAC9B,UAAU,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;AAEpC,MAAa,oBAAqB,SAAQ,2BAAiB;IAClD,MAAM,CAAC,UAAU,GAAW,sBAAsB,CAAA;IAEzD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,oBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;IAEM,KAAK;QACV,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;QAExB,IAAI,CAAC,UAAU,CACb,IAAA,4BAAkB,EAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC,CAC9D,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAA;IAC/C,CAAC;;AAjBH,oDAkBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletException = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
class WalletException extends base_js_1.ConcreteException {
|
|
6
|
+
static errorClass = 'WalletException';
|
|
7
|
+
parse() {
|
|
8
|
+
this.setName(WalletException.errorClass);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.WalletException = WalletException;
|
|
12
|
+
//# sourceMappingURL=WalletException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletException.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/WalletException.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAE9C,MAAa,eAAgB,SAAQ,2BAAiB;IAC7C,MAAM,CAAC,UAAU,GAAW,iBAAiB,CAAA;IAE7C,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;IAC1C,CAAC;;AALH,0CAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Web3Exception = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
const index_js_1 = require("../types/index.js");
|
|
6
|
+
class Web3Exception extends base_js_1.ConcreteException {
|
|
7
|
+
static errorClass = 'Web3Exception';
|
|
8
|
+
constructor(error, context) {
|
|
9
|
+
super(error, context);
|
|
10
|
+
this.type = index_js_1.ErrorType.Web3;
|
|
11
|
+
}
|
|
12
|
+
parse() {
|
|
13
|
+
this.setName(Web3Exception.errorClass);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Web3Exception = Web3Exception;
|
|
17
|
+
//# sourceMappingURL=Web3Exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Web3Exception.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/Web3Exception.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAC9C,gDAA2D;AAE3D,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,CAAC,UAAU,GAAW,eAAe,CAAA;IAElD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,oBAAS,CAAC,IAAI,CAAA;IAC5B,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IACxC,CAAC;;AAXH,sCAYC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
2
|
+
import { HttpRequestException } from './HttpRequestException.js';
|
|
3
|
+
import { Web3Exception } from './Web3Exception.js';
|
|
4
|
+
import { GeneralException } from './GeneralException.js';
|
|
5
|
+
import { LedgerException } from './LedgerException.js';
|
|
6
|
+
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
7
|
+
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
+
import { TrustWalletException } from './TrustWalletException.js';
|
|
9
|
+
import { OkxWalletException } from './OkxWalletException.js';
|
|
10
|
+
import { TrezorException } from './TrezorException.js';
|
|
11
|
+
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
12
|
+
import { TransactionException } from './TransactionException.js';
|
|
13
|
+
import { WalletException } from './WalletException.js';
|
|
14
|
+
import { BitGetException } from './BitGetException.js';
|
|
15
|
+
export { Web3Exception, LedgerException, TrezorException, WalletException, GeneralException, BitGetException, MetamaskException, TransactionException, TrustWalletException, OkxWalletException, HttpRequestException, LedgerCosmosException, CosmosWalletException, GrpcUnaryRequestException, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GrpcUnaryRequestException = exports.CosmosWalletException = exports.LedgerCosmosException = exports.HttpRequestException = exports.OkxWalletException = exports.TrustWalletException = exports.TransactionException = exports.MetamaskException = exports.BitGetException = exports.GeneralException = exports.WalletException = exports.TrezorException = exports.LedgerException = exports.Web3Exception = void 0;
|
|
4
|
+
const GrpcUnaryRequestException_js_1 = require("./GrpcUnaryRequestException.js");
|
|
5
|
+
Object.defineProperty(exports, "GrpcUnaryRequestException", { enumerable: true, get: function () { return GrpcUnaryRequestException_js_1.GrpcUnaryRequestException; } });
|
|
6
|
+
const HttpRequestException_js_1 = require("./HttpRequestException.js");
|
|
7
|
+
Object.defineProperty(exports, "HttpRequestException", { enumerable: true, get: function () { return HttpRequestException_js_1.HttpRequestException; } });
|
|
8
|
+
const Web3Exception_js_1 = require("./Web3Exception.js");
|
|
9
|
+
Object.defineProperty(exports, "Web3Exception", { enumerable: true, get: function () { return Web3Exception_js_1.Web3Exception; } });
|
|
10
|
+
const GeneralException_js_1 = require("./GeneralException.js");
|
|
11
|
+
Object.defineProperty(exports, "GeneralException", { enumerable: true, get: function () { return GeneralException_js_1.GeneralException; } });
|
|
12
|
+
const LedgerException_js_1 = require("./LedgerException.js");
|
|
13
|
+
Object.defineProperty(exports, "LedgerException", { enumerable: true, get: function () { return LedgerException_js_1.LedgerException; } });
|
|
14
|
+
const LedgerCosmosException_js_1 = require("./LedgerCosmosException.js");
|
|
15
|
+
Object.defineProperty(exports, "LedgerCosmosException", { enumerable: true, get: function () { return LedgerCosmosException_js_1.LedgerCosmosException; } });
|
|
16
|
+
const MetamaskException_js_1 = require("./MetamaskException.js");
|
|
17
|
+
Object.defineProperty(exports, "MetamaskException", { enumerable: true, get: function () { return MetamaskException_js_1.MetamaskException; } });
|
|
18
|
+
const TrustWalletException_js_1 = require("./TrustWalletException.js");
|
|
19
|
+
Object.defineProperty(exports, "TrustWalletException", { enumerable: true, get: function () { return TrustWalletException_js_1.TrustWalletException; } });
|
|
20
|
+
const OkxWalletException_js_1 = require("./OkxWalletException.js");
|
|
21
|
+
Object.defineProperty(exports, "OkxWalletException", { enumerable: true, get: function () { return OkxWalletException_js_1.OkxWalletException; } });
|
|
22
|
+
const TrezorException_js_1 = require("./TrezorException.js");
|
|
23
|
+
Object.defineProperty(exports, "TrezorException", { enumerable: true, get: function () { return TrezorException_js_1.TrezorException; } });
|
|
24
|
+
const CosmosWalletException_js_1 = require("./CosmosWalletException.js");
|
|
25
|
+
Object.defineProperty(exports, "CosmosWalletException", { enumerable: true, get: function () { return CosmosWalletException_js_1.CosmosWalletException; } });
|
|
26
|
+
const TransactionException_js_1 = require("./TransactionException.js");
|
|
27
|
+
Object.defineProperty(exports, "TransactionException", { enumerable: true, get: function () { return TransactionException_js_1.TransactionException; } });
|
|
28
|
+
const WalletException_js_1 = require("./WalletException.js");
|
|
29
|
+
Object.defineProperty(exports, "WalletException", { enumerable: true, get: function () { return WalletException_js_1.WalletException; } });
|
|
30
|
+
const BitGetException_js_1 = require("./BitGetException.js");
|
|
31
|
+
Object.defineProperty(exports, "BitGetException", { enumerable: true, get: function () { return BitGetException_js_1.BitGetException; } });
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/exceptions/exceptions/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AA6BxE,0GA7BO,wDAAyB,OA6BP;AA5B3B,uEAAgE;AAyB9D,qGAzBO,8CAAoB,OAyBP;AAxBtB,yDAAkD;AAchD,8FAdO,gCAAa,OAcP;AAbf,+DAAwD;AAiBtD,iGAjBO,sCAAgB,OAiBP;AAhBlB,6DAAsD;AAapD,gGAbO,oCAAe,OAaP;AAZjB,yEAAkE;AAsBhE,sGAtBO,gDAAqB,OAsBP;AArBvB,iEAA0D;AAgBxD,kGAhBO,wCAAiB,OAgBP;AAfnB,uEAAgE;AAiB9D,qGAjBO,8CAAoB,OAiBP;AAhBtB,mEAA4D;AAiB1D,mGAjBO,0CAAkB,OAiBP;AAhBpB,6DAAsD;AASpD,gGATO,oCAAe,OASP;AARjB,yEAAkE;AAkBhE,sGAlBO,gDAAqB,OAkBP;AAjBvB,uEAAgE;AAY9D,qGAZO,8CAAoB,OAYP;AAXtB,6DAAsD;AAOpD,gGAPO,oCAAe,OAOP;AANjB,6DAAsD;AAQpD,gGARO,oCAAe,OAQP"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./exceptions/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,mDAAgC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ErrorContextCode, TransactionChainErrorModule } from './types/index.js';
|
|
2
|
+
export declare const chainModuleCodeErrorMessagesMap: Record<string, Record<number, string>>;
|
|
3
|
+
/**
|
|
4
|
+
* **Legacy** but needed for error messages from broadcasting transactions
|
|
5
|
+
* where we don't control the response and only have the message
|
|
6
|
+
* i.e Keplr, Leap, etc
|
|
7
|
+
*/
|
|
8
|
+
export declare const chainErrorMessagesMap: Record<string, {
|
|
9
|
+
message: string;
|
|
10
|
+
code: ErrorContextCode;
|
|
11
|
+
module: TransactionChainErrorModule;
|
|
12
|
+
}>;
|