@injectivelabs/exceptions 1.0.14 → 1.0.16
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/exception.d.ts +53 -0
- package/dist/exception.d.ts.map +1 -0
- package/dist/exception.js +96 -0
- package/dist/exception.js.map +1 -0
- package/dist/exceptions/CosmosWalletException.d.ts +6 -0
- package/dist/exceptions/CosmosWalletException.d.ts.map +1 -0
- package/dist/exceptions/CosmosWalletException.js +13 -0
- package/dist/exceptions/CosmosWalletException.js.map +1 -0
- package/dist/exceptions/GeneralException.d.ts +4 -0
- package/dist/exceptions/GeneralException.d.ts.map +1 -0
- package/dist/exceptions/GeneralException.js +8 -0
- package/dist/exceptions/GeneralException.js.map +1 -0
- package/dist/exceptions/GrpcUnaryRequestException.d.ts +6 -0
- package/dist/exceptions/GrpcUnaryRequestException.d.ts.map +1 -0
- package/dist/exceptions/GrpcUnaryRequestException.js +13 -0
- package/dist/exceptions/GrpcUnaryRequestException.js.map +1 -0
- package/dist/exceptions/HttpRequestException.d.ts +9 -0
- package/dist/exceptions/HttpRequestException.d.ts.map +1 -0
- package/dist/exceptions/HttpRequestException.js +17 -0
- package/dist/exceptions/HttpRequestException.js.map +1 -0
- package/dist/exceptions/LedgerException.d.ts +7 -0
- package/dist/exceptions/LedgerException.d.ts.map +1 -0
- package/dist/exceptions/LedgerException.js +26 -0
- package/dist/exceptions/LedgerException.js.map +1 -0
- package/dist/exceptions/MetamaskException.d.ts +7 -0
- package/dist/exceptions/MetamaskException.d.ts.map +1 -0
- package/dist/exceptions/MetamaskException.js +21 -0
- package/dist/exceptions/MetamaskException.js.map +1 -0
- package/dist/exceptions/TransactionException.d.ts +7 -0
- package/dist/exceptions/TransactionException.d.ts.map +1 -0
- package/dist/exceptions/TransactionException.js +20 -0
- package/dist/exceptions/TransactionException.js.map +1 -0
- package/dist/exceptions/TrezorException.d.ts +6 -0
- package/dist/exceptions/TrezorException.d.ts.map +1 -0
- package/dist/exceptions/TrezorException.js +13 -0
- package/dist/exceptions/TrezorException.js.map +1 -0
- package/dist/exceptions/WalletException.d.ts +4 -0
- package/dist/exceptions/WalletException.d.ts.map +1 -0
- package/dist/exceptions/WalletException.js +8 -0
- package/dist/exceptions/WalletException.js.map +1 -0
- package/dist/exceptions/Web3Exception.d.ts +6 -0
- package/dist/exceptions/Web3Exception.d.ts.map +1 -0
- package/dist/exceptions/Web3Exception.js +13 -0
- package/dist/exceptions/Web3Exception.js.map +1 -0
- package/dist/exceptions/Web3GatewayTransactionException.d.ts +4 -0
- package/dist/exceptions/Web3GatewayTransactionException.d.ts.map +1 -0
- package/dist/exceptions/Web3GatewayTransactionException.js +8 -0
- package/dist/exceptions/Web3GatewayTransactionException.js.map +1 -0
- package/dist/exceptions/index.d.ts +16 -0
- package/dist/exceptions/index.d.ts.map +1 -0
- package/dist/exceptions/index.js +49 -0
- package/dist/exceptions/index.js.map +1 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +352 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +356 -0
- package/dist/messages.js.map +1 -0
- package/dist/types/codes.d.ts +135 -0
- package/dist/types/codes.d.ts.map +1 -0
- package/dist/types/codes.js +259 -0
- package/dist/types/codes.js.map +1 -0
- package/dist/types/index.d.ts +80 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +39 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/modules.d.ts +47 -0
- package/dist/types/modules.d.ts.map +1 -0
- package/dist/types/modules.js +54 -0
- package/dist/types/modules.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/maps.d.ts +7 -0
- package/dist/utils/maps.d.ts.map +1 -0
- package/dist/utils/maps.js +28 -0
- package/dist/utils/maps.js.map +1 -0
- package/package.json +4 -2
- package/dist/block-not-found.d.ts +0 -3
- package/dist/block-not-found.d.ts.map +0 -1
- package/dist/block-not-found.js +0 -7
- package/dist/block-not-found.js.map +0 -1
- package/dist/contract.d.ts +0 -3
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -7
- package/dist/contract.js.map +0 -1
- package/dist/exchange.d.ts +0 -3
- package/dist/exchange.d.ts.map +0 -1
- package/dist/exchange.js +0 -7
- package/dist/exchange.js.map +0 -1
- package/dist/grpc.d.ts +0 -3
- package/dist/grpc.d.ts.map +0 -1
- package/dist/grpc.js +0 -7
- package/dist/grpc.js.map +0 -1
- package/dist/http.d.ts +0 -3
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -7
- package/dist/http.js.map +0 -1
- package/dist/tx-not-found.d.ts +0 -3
- package/dist/tx-not-found.d.ts.map +0 -1
- package/dist/tx-not-found.js +0 -7
- package/dist/tx-not-found.js.map +0 -1
- package/dist/web3.d.ts +0 -3
- package/dist/web3.d.ts.map +0 -1
- package/dist/web3.js +0 -7
- package/dist/web3.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Exception, ErrorType, ErrorContext, ErrorCode, ErrorContextCode } from './types';
|
|
2
|
+
export declare abstract class ConcreteException extends Error implements Exception {
|
|
3
|
+
/**
|
|
4
|
+
* The type of the Error
|
|
5
|
+
*/
|
|
6
|
+
type: ErrorType;
|
|
7
|
+
/**
|
|
8
|
+
* Error specific code (HttpStatus, GrpcStatus, etc)
|
|
9
|
+
*/
|
|
10
|
+
code: ErrorCode;
|
|
11
|
+
/**
|
|
12
|
+
* The name of the error (the name of the instance of the Exception)
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Providing more context as to where the exception was thrown
|
|
17
|
+
* (ex: on-chain module, etc)
|
|
18
|
+
*/
|
|
19
|
+
contextModule?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Providing more context as to why the exception was thrown
|
|
22
|
+
* (ex: on-chain error code, etc)
|
|
23
|
+
*/
|
|
24
|
+
contextCode?: ErrorContextCode;
|
|
25
|
+
/**
|
|
26
|
+
* Parsed message of the exception
|
|
27
|
+
*/
|
|
28
|
+
message: string;
|
|
29
|
+
/**
|
|
30
|
+
* The original stack of the error
|
|
31
|
+
*/
|
|
32
|
+
stack?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The original message of the error
|
|
35
|
+
*/
|
|
36
|
+
errorMessage: string;
|
|
37
|
+
constructor(error: Error, context?: ErrorContext);
|
|
38
|
+
parse(): void;
|
|
39
|
+
parseError(error: Error): void;
|
|
40
|
+
parseContext(context?: ErrorContext): void;
|
|
41
|
+
setType(type: ErrorType): void;
|
|
42
|
+
setCode(code: ErrorCode): void;
|
|
43
|
+
setStack(stack: string): void;
|
|
44
|
+
setName(name: string): void;
|
|
45
|
+
setMessage(message: string): void;
|
|
46
|
+
setContextModule(contextModule: string): void;
|
|
47
|
+
setContextCode(code: ErrorContextCode): void;
|
|
48
|
+
toOriginalError(): Error;
|
|
49
|
+
toError(): Error;
|
|
50
|
+
toJson(): string;
|
|
51
|
+
toString(): string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=exception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,SAAS,EAET,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,8BAAsB,iBAAkB,SAAQ,KAAM,YAAW,SAAS;IACxE;;OAEG;IACI,IAAI,EAAE,SAAS,CAAwB;IAE9C;;OAEG;IACI,IAAI,EAAE,SAAS,CAAuB;IAE7C;;OAEG;IACI,IAAI,EAAG,MAAM,CAAA;IAEpB;;;OAGG;IACI,aAAa,CAAC,EAAE,MAAM,CAAA;IAE7B;;;OAGG;IACI,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAErC;;OAEG;IACI,OAAO,EAAE,MAAM,CAAK;IAE3B;;OAEG;IACI,KAAK,CAAC,EAAE,MAAM,CAAK;IAE1B;;OAEG;IACI,YAAY,EAAE,MAAM,CAAK;gBAEpB,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;IAOzC,KAAK,IAAI,IAAI;IAIb,UAAU,CAAC,KAAK,EAAE,KAAK;IAOvB,YAAY,CAAC,OAAO,CAAC,EAAE,YAAY;IAYnC,OAAO,CAAC,IAAI,EAAE,SAAS;IAIvB,OAAO,CAAC,IAAI,EAAE,SAAS;IAIvB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAKtB,OAAO,CAAC,IAAI,EAAE,MAAM;IAKpB,UAAU,CAAC,OAAO,EAAE,MAAM;IAK1B,gBAAgB,CAAC,aAAa,EAAE,MAAM;IAItC,cAAc,CAAC,IAAI,EAAE,gBAAgB;IAIrC,eAAe,IAAI,KAAK;IAQxB,OAAO,IAAI,KAAK;IAQhB,MAAM,IAAI,MAAM;IAIhB,QAAQ;CAGhB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConcreteException = void 0;
|
|
4
|
+
/* eslint-disable class-methods-use-this */
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
class ConcreteException extends Error {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error.message);
|
|
9
|
+
/**
|
|
10
|
+
* The type of the Error
|
|
11
|
+
*/
|
|
12
|
+
this.type = types_1.ErrorType.Unspecified;
|
|
13
|
+
/**
|
|
14
|
+
* Error specific code (HttpStatus, GrpcStatus, etc)
|
|
15
|
+
*/
|
|
16
|
+
this.code = types_1.UnspecifiedErrorCode;
|
|
17
|
+
/**
|
|
18
|
+
* Parsed message of the exception
|
|
19
|
+
*/
|
|
20
|
+
this.message = '';
|
|
21
|
+
/**
|
|
22
|
+
* The original stack of the error
|
|
23
|
+
*/
|
|
24
|
+
this.stack = '';
|
|
25
|
+
/**
|
|
26
|
+
* The original message of the error
|
|
27
|
+
*/
|
|
28
|
+
this.errorMessage = '';
|
|
29
|
+
this.parseError(error);
|
|
30
|
+
this.parseContext(context);
|
|
31
|
+
this.parse();
|
|
32
|
+
}
|
|
33
|
+
parse() {
|
|
34
|
+
//
|
|
35
|
+
}
|
|
36
|
+
parseError(error) {
|
|
37
|
+
this.setName(this.constructor.name);
|
|
38
|
+
this.setStack(error.stack || '');
|
|
39
|
+
this.setMessage(error.message);
|
|
40
|
+
this.errorMessage = error.message;
|
|
41
|
+
}
|
|
42
|
+
parseContext(context) {
|
|
43
|
+
const { contextModule, type, code } = context || {
|
|
44
|
+
contextModule: '',
|
|
45
|
+
code: types_1.UnspecifiedErrorCode,
|
|
46
|
+
type: types_1.ErrorType.Unspecified,
|
|
47
|
+
};
|
|
48
|
+
this.contextModule = contextModule;
|
|
49
|
+
this.type = type || types_1.ErrorType.Unspecified;
|
|
50
|
+
this.code = code || types_1.UnspecifiedErrorCode;
|
|
51
|
+
}
|
|
52
|
+
setType(type) {
|
|
53
|
+
this.type = type;
|
|
54
|
+
}
|
|
55
|
+
setCode(code) {
|
|
56
|
+
this.code = code;
|
|
57
|
+
}
|
|
58
|
+
setStack(stack) {
|
|
59
|
+
super.stack = stack;
|
|
60
|
+
this.stack = stack;
|
|
61
|
+
}
|
|
62
|
+
setName(name) {
|
|
63
|
+
super.name = name;
|
|
64
|
+
this.name = name;
|
|
65
|
+
}
|
|
66
|
+
setMessage(message) {
|
|
67
|
+
super.message = message;
|
|
68
|
+
this.message = message;
|
|
69
|
+
}
|
|
70
|
+
setContextModule(contextModule) {
|
|
71
|
+
this.contextModule = contextModule;
|
|
72
|
+
}
|
|
73
|
+
setContextCode(code) {
|
|
74
|
+
this.contextCode = code;
|
|
75
|
+
}
|
|
76
|
+
toOriginalError() {
|
|
77
|
+
const error = new Error(this.errorMessage);
|
|
78
|
+
error.stack = this.stack;
|
|
79
|
+
error.name = this.name || '';
|
|
80
|
+
return error;
|
|
81
|
+
}
|
|
82
|
+
toError() {
|
|
83
|
+
const error = new Error(this.message);
|
|
84
|
+
error.stack = this.stack;
|
|
85
|
+
error.name = this.name || '';
|
|
86
|
+
return error;
|
|
87
|
+
}
|
|
88
|
+
toJson() {
|
|
89
|
+
return JSON.stringify({ error: this.message, stack: this.stack });
|
|
90
|
+
}
|
|
91
|
+
toString() {
|
|
92
|
+
return this.message;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.ConcreteException = ConcreteException;
|
|
96
|
+
//# sourceMappingURL=exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext } from '../types';
|
|
3
|
+
export declare class CosmosWalletException extends ConcreteException {
|
|
4
|
+
constructor(error: Error, context?: ErrorContext);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=CosmosWalletException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CosmosWalletException.d.ts","sourceRoot":"","sources":["../../src/exceptions/CosmosWalletException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAElD,qBAAa,qBAAsB,SAAQ,iBAAiB;gBAC9C,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;CAKjD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CosmosWalletException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
class CosmosWalletException extends exception_1.ConcreteException {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error, context);
|
|
9
|
+
this.type = types_1.ErrorType.WalletError;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CosmosWalletException = CosmosWalletException;
|
|
13
|
+
//# sourceMappingURL=CosmosWalletException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CosmosWalletException.js","sourceRoot":"","sources":["../../src/exceptions/CosmosWalletException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAa,qBAAsB,SAAQ,6BAAiB;IAC1D,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;CACF;AAND,sDAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneralException.d.ts","sourceRoot":"","sources":["../../src/exceptions/GeneralException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,iBAAiB;CAEtD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeneralException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
class GeneralException extends exception_1.ConcreteException {
|
|
6
|
+
}
|
|
7
|
+
exports.GeneralException = GeneralException;
|
|
8
|
+
//# sourceMappingURL=GeneralException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneralException.js","sourceRoot":"","sources":["../../src/exceptions/GeneralException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAEhD,MAAa,gBAAiB,SAAQ,6BAAiB;CAEtD;AAFD,4CAEC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext } from '../types';
|
|
3
|
+
export declare class GrpcUnaryRequestException extends ConcreteException {
|
|
4
|
+
constructor(error: Error, context?: ErrorContext);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=GrpcUnaryRequestException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrpcUnaryRequestException.d.ts","sourceRoot":"","sources":["../../src/exceptions/GrpcUnaryRequestException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAElD,qBAAa,yBAA0B,SAAQ,iBAAiB;gBAClD,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;CAKjD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GrpcUnaryRequestException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
class GrpcUnaryRequestException extends exception_1.ConcreteException {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error, context);
|
|
9
|
+
this.type = types_1.ErrorType.GrpcUnaryRequest;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.GrpcUnaryRequestException = GrpcUnaryRequestException;
|
|
13
|
+
//# sourceMappingURL=GrpcUnaryRequestException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrpcUnaryRequestException.js","sourceRoot":"","sources":["../../src/exceptions/GrpcUnaryRequestException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAa,yBAA0B,SAAQ,6BAAiB;IAC9D,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,gBAAgB,CAAA;IACxC,CAAC;CACF;AAND,8DAMC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext, HttpRequestMethod } from '../types';
|
|
3
|
+
export declare class HttpRequestException extends ConcreteException {
|
|
4
|
+
method: HttpRequestMethod;
|
|
5
|
+
constructor(error: Error, context?: ErrorContext & {
|
|
6
|
+
method?: HttpRequestMethod;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=HttpRequestException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpRequestException.d.ts","sourceRoot":"","sources":["../../src/exceptions/HttpRequestException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAErE,qBAAa,oBAAqB,SAAQ,iBAAiB;IAClD,MAAM,EAAE,iBAAiB,CAAwB;gBAGtD,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,YAAY,GAAG;QAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;KAAE;CAS1D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpRequestException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
class HttpRequestException extends exception_1.ConcreteException {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error, context);
|
|
9
|
+
this.method = types_1.HttpRequestMethod.Get;
|
|
10
|
+
this.type = types_1.ErrorType.HttpRequest;
|
|
11
|
+
this.method = context
|
|
12
|
+
? context.method || types_1.HttpRequestMethod.Get
|
|
13
|
+
: types_1.HttpRequestMethod.Get;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.HttpRequestException = HttpRequestException;
|
|
17
|
+
//# sourceMappingURL=HttpRequestException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpRequestException.js","sourceRoot":"","sources":["../../src/exceptions/HttpRequestException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAqE;AAErE,MAAa,oBAAqB,SAAQ,6BAAiB;IAGzD,YACE,KAAY,EACZ,OAAuD;QAEvD,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QANhB,WAAM,GAAsB,yBAAiB,CAAC,GAAG,CAAA;QAQtD,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,WAAW,CAAA;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO;YACnB,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,yBAAiB,CAAC,GAAG;YACzC,CAAC,CAAC,yBAAiB,CAAC,GAAG,CAAA;IAC3B,CAAC;CACF;AAdD,oDAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext } from '../types';
|
|
3
|
+
export declare class LedgerException extends ConcreteException {
|
|
4
|
+
constructor(error: Error, context?: ErrorContext);
|
|
5
|
+
parseMessage(): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=LedgerException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LedgerException.d.ts","sourceRoot":"","sources":["../../src/exceptions/LedgerException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAalD,qBAAa,eAAgB,SAAQ,iBAAiB;gBACxC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;IAMzC,YAAY,IAAI,IAAI;CAS5B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LedgerException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const isCommonLockedError = (error) => !!(error.includes('Ledger device: Incorrect length') ||
|
|
7
|
+
error.includes('Ledger device: INS_NOT_SUPPORTED') ||
|
|
8
|
+
error.includes('Ledger device: CLA_NOT_SUPPORTED') ||
|
|
9
|
+
error.includes('Failed to open the device') ||
|
|
10
|
+
error.includes('Failed to open the device') ||
|
|
11
|
+
error.includes('Ledger Device is busy') ||
|
|
12
|
+
error.includes('UNKNOWN_ERROR'));
|
|
13
|
+
class LedgerException extends exception_1.ConcreteException {
|
|
14
|
+
constructor(error, context) {
|
|
15
|
+
super(error, context);
|
|
16
|
+
this.type = types_1.ErrorType.WalletError;
|
|
17
|
+
}
|
|
18
|
+
parseMessage() {
|
|
19
|
+
const { message } = this;
|
|
20
|
+
if (isCommonLockedError(message)) {
|
|
21
|
+
this.setMessage('Please ensure your Ledger is connected, unlocked and your Ethereum app is open.');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.LedgerException = LedgerException;
|
|
26
|
+
//# sourceMappingURL=LedgerException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LedgerException.js","sourceRoot":"","sources":["../../src/exceptions/LedgerException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE,CAC5C,CAAC,CAAC,CACA,KAAK,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACjD,KAAK,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAClD,KAAK,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAClD,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC3C,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC3C,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACvC,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAChC,CAAA;AAEH,MAAa,eAAgB,SAAQ,6BAAiB;IACpD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;IAEM,YAAY;QACjB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;QAExB,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;YAChC,IAAI,CAAC,UAAU,CACb,iFAAiF,CAClF,CAAA;SACF;IACH,CAAC;CACF;AAhBD,0CAgBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext } from '../types';
|
|
3
|
+
export declare class MetamaskException extends ConcreteException {
|
|
4
|
+
constructor(error: Error, context?: ErrorContext);
|
|
5
|
+
parseMessage(): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=MetamaskException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetamaskException.d.ts","sourceRoot":"","sources":["../../src/exceptions/MetamaskException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAQlD,qBAAa,iBAAkB,SAAQ,iBAAiB;gBAC1C,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;IAMzC,YAAY,IAAI,IAAI;CAK5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetamaskException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const removeMetamaskFromErrorString = (message) => message
|
|
7
|
+
.replaceAll('Metamask', '')
|
|
8
|
+
.replaceAll('MetaMask', '')
|
|
9
|
+
.replaceAll('Metamask:', '');
|
|
10
|
+
class MetamaskException extends exception_1.ConcreteException {
|
|
11
|
+
constructor(error, context) {
|
|
12
|
+
super(error, context);
|
|
13
|
+
this.type = types_1.ErrorType.WalletError;
|
|
14
|
+
}
|
|
15
|
+
parseMessage() {
|
|
16
|
+
const { message } = this;
|
|
17
|
+
this.setMessage(removeMetamaskFromErrorString(message));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.MetamaskException = MetamaskException;
|
|
21
|
+
//# sourceMappingURL=MetamaskException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetamaskException.js","sourceRoot":"","sources":["../../src/exceptions/MetamaskException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAM,6BAA6B,GAAG,CAAC,OAAe,EAAU,EAAE,CAChE,OAAO;KACJ,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC;KAC1B,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC;KAC1B,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAEhC,MAAa,iBAAkB,SAAQ,6BAAiB;IACtD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;IAEM,YAAY;QACjB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;QAExB,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAAA;IACzD,CAAC;CACF;AAZD,8CAYC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../exception';
|
|
2
|
+
import { ErrorContext } from '../types';
|
|
3
|
+
export declare class TransactionException extends ConcreteException {
|
|
4
|
+
constructor(error: Error, context?: ErrorContext);
|
|
5
|
+
parse(): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=TransactionException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionException.d.ts","sourceRoot":"","sources":["../../src/exceptions/TransactionException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAGlD,qBAAa,oBAAqB,SAAQ,iBAAiB;gBAC7C,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;IAMzC,KAAK,IAAI,IAAI;CASrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const maps_1 = require("../utils/maps");
|
|
7
|
+
class TransactionException extends exception_1.ConcreteException {
|
|
8
|
+
constructor(error, context) {
|
|
9
|
+
super(error, context);
|
|
10
|
+
this.type = types_1.ErrorType.ChainError;
|
|
11
|
+
}
|
|
12
|
+
parse() {
|
|
13
|
+
const { message } = this;
|
|
14
|
+
const { message: parsedMessage, code } = (0, maps_1.mapFailedTransactionMessage)(message);
|
|
15
|
+
this.setMessage(parsedMessage);
|
|
16
|
+
this.setContextCode(code);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.TransactionException = TransactionException;
|
|
20
|
+
//# sourceMappingURL=TransactionException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionException.js","sourceRoot":"","sources":["../../src/exceptions/TransactionException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAClD,wCAA2D;AAE3D,MAAa,oBAAqB,SAAQ,6BAAiB;IACzD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,UAAU,CAAA;IAClC,CAAC;IAEM,KAAK;QACV,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;QAExB,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,GACpC,IAAA,kCAA2B,EAAC,OAAO,CAAC,CAAA;QAEtC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QAC9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;CACF;AAhBD,oDAgBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrezorException.d.ts","sourceRoot":"","sources":["../../src/exceptions/TrezorException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAElD,qBAAa,eAAgB,SAAQ,iBAAiB;gBACxC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;CAKjD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrezorException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
class TrezorException extends exception_1.ConcreteException {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error, context);
|
|
9
|
+
this.type = types_1.ErrorType.WalletError;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.TrezorException = TrezorException;
|
|
13
|
+
//# sourceMappingURL=TrezorException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrezorException.js","sourceRoot":"","sources":["../../src/exceptions/TrezorException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAa,eAAgB,SAAQ,6BAAiB;IACpD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,WAAW,CAAA;IACnC,CAAC;CACF;AAND,0CAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletException.d.ts","sourceRoot":"","sources":["../../src/exceptions/WalletException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD,qBAAa,eAAgB,SAAQ,iBAAiB;CAErD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletException = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
class WalletException extends exception_1.ConcreteException {
|
|
6
|
+
}
|
|
7
|
+
exports.WalletException = WalletException;
|
|
8
|
+
//# sourceMappingURL=WalletException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletException.js","sourceRoot":"","sources":["../../src/exceptions/WalletException.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAEhD,MAAa,eAAgB,SAAQ,6BAAiB;CAErD;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Web3Exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/Web3Exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,YAAY,EAAa,MAAM,UAAU,CAAA;AAElD,qBAAa,aAAc,SAAQ,iBAAiB;gBACtC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,YAAY;CAKjD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Web3Exception = void 0;
|
|
4
|
+
const exception_1 = require("../exception");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
class Web3Exception extends exception_1.ConcreteException {
|
|
7
|
+
constructor(error, context) {
|
|
8
|
+
super(error, context);
|
|
9
|
+
this.type = types_1.ErrorType.Web3;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Web3Exception = Web3Exception;
|
|
13
|
+
//# sourceMappingURL=Web3Exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Web3Exception.js","sourceRoot":"","sources":["../../src/exceptions/Web3Exception.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,oCAAkD;AAElD,MAAa,aAAc,SAAQ,6BAAiB;IAClD,YAAY,KAAY,EAAE,OAAsB;QAC9C,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAErB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,IAAI,CAAA;IAC5B,CAAC;CACF;AAND,sCAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Web3GatewayTransactionException.d.ts","sourceRoot":"","sources":["../../src/exceptions/Web3GatewayTransactionException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,+BAAgC,SAAQ,oBAAoB;CAExE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Web3GatewayTransactionException = void 0;
|
|
4
|
+
const TransactionException_1 = require("./TransactionException");
|
|
5
|
+
class Web3GatewayTransactionException extends TransactionException_1.TransactionException {
|
|
6
|
+
}
|
|
7
|
+
exports.Web3GatewayTransactionException = Web3GatewayTransactionException;
|
|
8
|
+
//# sourceMappingURL=Web3GatewayTransactionException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Web3GatewayTransactionException.js","sourceRoot":"","sources":["../../src/exceptions/Web3GatewayTransactionException.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D,MAAa,+BAAgC,SAAQ,2CAAoB;CAExE;AAFD,0EAEC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException';
|
|
2
|
+
import { HttpRequestException } from './HttpRequestException';
|
|
3
|
+
import { Web3Exception } from './Web3Exception';
|
|
4
|
+
import { GeneralException } from './GeneralException';
|
|
5
|
+
import { LedgerException } from './LedgerException';
|
|
6
|
+
import { MetamaskException } from './MetamaskException';
|
|
7
|
+
import { TrezorException } from './TrezorException';
|
|
8
|
+
import { CosmosWalletException } from './CosmosWalletException';
|
|
9
|
+
import { TransactionException } from './TransactionException';
|
|
10
|
+
import { Web3GatewayTransactionException } from './Web3GatewayTransactionException';
|
|
11
|
+
import { WalletException } from './WalletException';
|
|
12
|
+
import { Exception } from '../types';
|
|
13
|
+
export declare type ThrownException = GrpcUnaryRequestException | HttpRequestException | Web3Exception | GeneralException | LedgerException | MetamaskException | TrezorException | CosmosWalletException | TransactionException | WalletException | Web3GatewayTransactionException;
|
|
14
|
+
export declare const isThrownException: (exception: Error | Exception) => boolean;
|
|
15
|
+
export { GrpcUnaryRequestException, HttpRequestException, Web3Exception, GeneralException, LedgerException, MetamaskException, TrezorException, CosmosWalletException, TransactionException, WalletException, Web3GatewayTransactionException, };
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,oBAAY,eAAe,GACvB,yBAAyB,GACzB,oBAAoB,GACpB,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,+BAA+B,CAAA;AAEnC,eAAO,MAAM,iBAAiB,cAAe,KAAK,GAAG,SAAS,KAAG,OAwBhE,CAAA;AAED,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,+BAA+B,GAChC,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Web3GatewayTransactionException = exports.WalletException = exports.TransactionException = exports.CosmosWalletException = exports.TrezorException = exports.MetamaskException = exports.LedgerException = exports.GeneralException = exports.Web3Exception = exports.HttpRequestException = exports.GrpcUnaryRequestException = exports.isThrownException = void 0;
|
|
4
|
+
const GrpcUnaryRequestException_1 = require("./GrpcUnaryRequestException");
|
|
5
|
+
Object.defineProperty(exports, "GrpcUnaryRequestException", { enumerable: true, get: function () { return GrpcUnaryRequestException_1.GrpcUnaryRequestException; } });
|
|
6
|
+
const HttpRequestException_1 = require("./HttpRequestException");
|
|
7
|
+
Object.defineProperty(exports, "HttpRequestException", { enumerable: true, get: function () { return HttpRequestException_1.HttpRequestException; } });
|
|
8
|
+
const Web3Exception_1 = require("./Web3Exception");
|
|
9
|
+
Object.defineProperty(exports, "Web3Exception", { enumerable: true, get: function () { return Web3Exception_1.Web3Exception; } });
|
|
10
|
+
const GeneralException_1 = require("./GeneralException");
|
|
11
|
+
Object.defineProperty(exports, "GeneralException", { enumerable: true, get: function () { return GeneralException_1.GeneralException; } });
|
|
12
|
+
const LedgerException_1 = require("./LedgerException");
|
|
13
|
+
Object.defineProperty(exports, "LedgerException", { enumerable: true, get: function () { return LedgerException_1.LedgerException; } });
|
|
14
|
+
const MetamaskException_1 = require("./MetamaskException");
|
|
15
|
+
Object.defineProperty(exports, "MetamaskException", { enumerable: true, get: function () { return MetamaskException_1.MetamaskException; } });
|
|
16
|
+
const TrezorException_1 = require("./TrezorException");
|
|
17
|
+
Object.defineProperty(exports, "TrezorException", { enumerable: true, get: function () { return TrezorException_1.TrezorException; } });
|
|
18
|
+
const CosmosWalletException_1 = require("./CosmosWalletException");
|
|
19
|
+
Object.defineProperty(exports, "CosmosWalletException", { enumerable: true, get: function () { return CosmosWalletException_1.CosmosWalletException; } });
|
|
20
|
+
const TransactionException_1 = require("./TransactionException");
|
|
21
|
+
Object.defineProperty(exports, "TransactionException", { enumerable: true, get: function () { return TransactionException_1.TransactionException; } });
|
|
22
|
+
const Web3GatewayTransactionException_1 = require("./Web3GatewayTransactionException");
|
|
23
|
+
Object.defineProperty(exports, "Web3GatewayTransactionException", { enumerable: true, get: function () { return Web3GatewayTransactionException_1.Web3GatewayTransactionException; } });
|
|
24
|
+
const WalletException_1 = require("./WalletException");
|
|
25
|
+
Object.defineProperty(exports, "WalletException", { enumerable: true, get: function () { return WalletException_1.WalletException; } });
|
|
26
|
+
const exception_1 = require("../exception");
|
|
27
|
+
const isThrownException = (exception) => {
|
|
28
|
+
if (exception instanceof exception_1.ConcreteException) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
if ([
|
|
32
|
+
'GrpcUnaryRequestException',
|
|
33
|
+
'HttpRequestException',
|
|
34
|
+
'Web3Exception',
|
|
35
|
+
'GeneralException',
|
|
36
|
+
'LedgerException',
|
|
37
|
+
'MetamaskException',
|
|
38
|
+
'TrezorException',
|
|
39
|
+
'CosmosWalletException',
|
|
40
|
+
'TransactionException',
|
|
41
|
+
'WalletException',
|
|
42
|
+
'Web3GatewayTransactionException',
|
|
43
|
+
].includes(exception.constructor.name)) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
};
|
|
48
|
+
exports.isThrownException = isThrownException;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":";;;AAAA,2EAAuE;AAsDrE,0GAtDO,qDAAyB,OAsDP;AArD3B,iEAA6D;AAsD3D,qGAtDO,2CAAoB,OAsDP;AArDtB,mDAA+C;AAsD7C,8FAtDO,6BAAa,OAsDP;AArDf,yDAAqD;AAsDnD,iGAtDO,mCAAgB,OAsDP;AArDlB,uDAAmD;AAsDjD,gGAtDO,iCAAe,OAsDP;AArDjB,2DAAuD;AAsDrD,kGAtDO,qCAAiB,OAsDP;AArDnB,uDAAmD;AAsDjD,gGAtDO,iCAAe,OAsDP;AArDjB,mEAA+D;AAsD7D,sGAtDO,6CAAqB,OAsDP;AArDvB,iEAA6D;AAsD3D,qGAtDO,2CAAoB,OAsDP;AArDtB,uFAAmF;AAuDjF,gHAvDO,iEAA+B,OAuDP;AAtDjC,uDAAmD;AAqDjD,gGArDO,iCAAe,OAqDP;AAnDjB,4CAAgD;AAezC,MAAM,iBAAiB,GAAG,CAAC,SAA4B,EAAW,EAAE;IACzE,IAAI,SAAS,YAAY,6BAAiB,EAAE;QAC1C,OAAO,IAAI,CAAA;KACZ;IAED,IACE;QACE,2BAA2B;QAC3B,sBAAsB;QACtB,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,mBAAmB;QACnB,iBAAiB;QACjB,uBAAuB;QACvB,sBAAsB;QACtB,iBAAiB;QACjB,iCAAiC;KAClC,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EACtC;QACA,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAxBY,QAAA,iBAAiB,qBAwB7B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './grpc';
|
|
5
|
-
export * from './exchange';
|
|
6
|
-
export * from './block-not-found';
|
|
7
|
-
export * from './tx-not-found';
|
|
1
|
+
export * from './exceptions';
|
|
2
|
+
export * from './exception';
|
|
3
|
+
export * from './types';
|
|
8
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|