@injectivelabs/exceptions 1.0.47 → 1.0.49
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/exceptions/TransactionException.d.ts.map +1 -1
- package/dist/exceptions/TransactionException.js +5 -2
- package/dist/exceptions/TransactionException.js.map +1 -1
- package/dist/exceptions/index.d.ts +2 -3
- package/dist/exceptions/index.d.ts.map +1 -1
- package/dist/exceptions/index.js +1 -4
- package/dist/exceptions/index.js.map +1 -1
- package/dist/messages.d.ts +12 -544
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +410 -144
- package/dist/messages.js.map +1 -1
- package/dist/types/codes.d.ts +122 -2
- package/dist/types/codes.d.ts.map +1 -1
- package/dist/types/codes.js +225 -1
- package/dist/types/codes.js.map +1 -1
- package/dist/utils/maps.d.ts +9 -3
- package/dist/utils/maps.d.ts.map +1 -1
- package/dist/utils/maps.js +49 -41
- package/dist/utils/maps.js.map +1 -1
- package/package.json +2 -2
- package/dist/exceptions/Web3GatewayTransactionException.d.ts +0 -4
- package/dist/exceptions/Web3GatewayTransactionException.d.ts.map +0 -1
- package/dist/exceptions/Web3GatewayTransactionException.js +0 -8
- package/dist/exceptions/Web3GatewayTransactionException.js.map +0 -1
|
@@ -1 +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;
|
|
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;CAgBrB"}
|
|
@@ -10,10 +10,13 @@ class TransactionException extends exception_1.ConcreteException {
|
|
|
10
10
|
this.type = types_1.ErrorType.ChainError;
|
|
11
11
|
}
|
|
12
12
|
parse() {
|
|
13
|
-
const { message } = this;
|
|
14
|
-
const { message: parsedMessage,
|
|
13
|
+
const { message, contextModule, contextCode } = this;
|
|
14
|
+
const { code, contextModule: parsedContextModule, message: parsedMessage, } = (0, maps_1.mapFailedTransactionMessage)(message, { contextCode, contextModule });
|
|
15
15
|
this.setMessage(parsedMessage);
|
|
16
16
|
this.setContextCode(code);
|
|
17
|
+
if (parsedContextModule) {
|
|
18
|
+
this.setContextModule(parsedContextModule);
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.TransactionException = TransactionException;
|
|
@@ -1 +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;
|
|
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,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;QAEpD,MAAM,EACJ,IAAI,EACJ,aAAa,EAAE,mBAAmB,EAClC,OAAO,EAAE,aAAa,GACvB,GAAG,IAAA,kCAA2B,EAAC,OAAO,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAA;QAExE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QAC9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QAEzB,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;SAC3C;IACH,CAAC;CACF;AAvBD,oDAuBC"}
|
|
@@ -7,10 +7,9 @@ import { MetamaskException } from './MetamaskException';
|
|
|
7
7
|
import { TrezorException } from './TrezorException';
|
|
8
8
|
import { CosmosWalletException } from './CosmosWalletException';
|
|
9
9
|
import { TransactionException } from './TransactionException';
|
|
10
|
-
import { Web3GatewayTransactionException } from './Web3GatewayTransactionException';
|
|
11
10
|
import { WalletException } from './WalletException';
|
|
12
11
|
import { Exception } from '../types';
|
|
13
|
-
export type ThrownException = GrpcUnaryRequestException | HttpRequestException | Web3Exception | GeneralException | LedgerException | MetamaskException | TrezorException | CosmosWalletException | TransactionException | WalletException
|
|
12
|
+
export type ThrownException = GrpcUnaryRequestException | HttpRequestException | Web3Exception | GeneralException | LedgerException | MetamaskException | TrezorException | CosmosWalletException | TransactionException | WalletException;
|
|
14
13
|
export declare const isThrownException: (exception: Error | Exception) => boolean;
|
|
15
|
-
export { GrpcUnaryRequestException, HttpRequestException, Web3Exception, GeneralException, LedgerException, MetamaskException, TrezorException, CosmosWalletException, TransactionException, WalletException,
|
|
14
|
+
export { GrpcUnaryRequestException, HttpRequestException, Web3Exception, GeneralException, LedgerException, MetamaskException, TrezorException, CosmosWalletException, TransactionException, WalletException, };
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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
|
|
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,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,MAAM,MAAM,eAAe,GACvB,yBAAyB,GACzB,oBAAoB,GACpB,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,CAAA;AAEnB,eAAO,MAAM,iBAAiB,cAAe,KAAK,GAAG,SAAS,KAAG,OAuBhE,CAAA;AAED,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GAChB,CAAA"}
|
package/dist/exceptions/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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
4
|
const GrpcUnaryRequestException_1 = require("./GrpcUnaryRequestException");
|
|
5
5
|
Object.defineProperty(exports, "GrpcUnaryRequestException", { enumerable: true, get: function () { return GrpcUnaryRequestException_1.GrpcUnaryRequestException; } });
|
|
6
6
|
const HttpRequestException_1 = require("./HttpRequestException");
|
|
@@ -19,8 +19,6 @@ const CosmosWalletException_1 = require("./CosmosWalletException");
|
|
|
19
19
|
Object.defineProperty(exports, "CosmosWalletException", { enumerable: true, get: function () { return CosmosWalletException_1.CosmosWalletException; } });
|
|
20
20
|
const TransactionException_1 = require("./TransactionException");
|
|
21
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
22
|
const WalletException_1 = require("./WalletException");
|
|
25
23
|
Object.defineProperty(exports, "WalletException", { enumerable: true, get: function () { return WalletException_1.WalletException; } });
|
|
26
24
|
const exception_1 = require("../exception");
|
|
@@ -39,7 +37,6 @@ const isThrownException = (exception) => {
|
|
|
39
37
|
'CosmosWalletException',
|
|
40
38
|
'TransactionException',
|
|
41
39
|
'WalletException',
|
|
42
|
-
'Web3GatewayTransactionException',
|
|
43
40
|
].includes(exception.constructor.name)) {
|
|
44
41
|
return true;
|
|
45
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":";;;AAAA,2EAAuE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":";;;AAAA,2EAAuE;AAmDrE,0GAnDO,qDAAyB,OAmDP;AAlD3B,iEAA6D;AAmD3D,qGAnDO,2CAAoB,OAmDP;AAlDtB,mDAA+C;AAmD7C,8FAnDO,6BAAa,OAmDP;AAlDf,yDAAqD;AAmDnD,iGAnDO,mCAAgB,OAmDP;AAlDlB,uDAAmD;AAmDjD,gGAnDO,iCAAe,OAmDP;AAlDjB,2DAAuD;AAmDrD,kGAnDO,qCAAiB,OAmDP;AAlDnB,uDAAmD;AAmDjD,gGAnDO,iCAAe,OAmDP;AAlDjB,mEAA+D;AAmD7D,sGAnDO,6CAAqB,OAmDP;AAlDvB,iEAA6D;AAmD3D,qGAnDO,2CAAoB,OAmDP;AAlDtB,uDAAmD;AAmDjD,gGAnDO,iCAAe,OAmDP;AAjDjB,4CAAgD;AAczC,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;KAClB,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EACtC;QACA,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAvBY,QAAA,iBAAiB,qBAuB7B"}
|
package/dist/messages.d.ts
CHANGED
|
@@ -1,545 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
code: ChainCosmosErrorCode;
|
|
14
|
-
};
|
|
15
|
-
'tx parse error': {
|
|
16
|
-
message: string;
|
|
17
|
-
code: ChainCosmosErrorCode;
|
|
18
|
-
};
|
|
19
|
-
'invalid sequence': {
|
|
20
|
-
message: string;
|
|
21
|
-
code: ChainCosmosErrorCode;
|
|
22
|
-
};
|
|
23
|
-
unauthorized: {
|
|
24
|
-
message: string;
|
|
25
|
-
code: ChainCosmosErrorCode;
|
|
26
|
-
};
|
|
27
|
-
'unknown request': {
|
|
28
|
-
message: string;
|
|
29
|
-
code: ChainCosmosErrorCode;
|
|
30
|
-
};
|
|
31
|
-
'invalid address': {
|
|
32
|
-
message: string;
|
|
33
|
-
code: ChainCosmosErrorCode;
|
|
34
|
-
};
|
|
35
|
-
'invalid pubkey': {
|
|
36
|
-
message: string;
|
|
37
|
-
code: ChainCosmosErrorCode;
|
|
38
|
-
};
|
|
39
|
-
'unknown address': {
|
|
40
|
-
message: string;
|
|
41
|
-
code: ChainCosmosErrorCode;
|
|
42
|
-
};
|
|
43
|
-
'invalid coins': {
|
|
44
|
-
message: string;
|
|
45
|
-
code: ChainCosmosErrorCode;
|
|
46
|
-
};
|
|
47
|
-
'out of gas': {
|
|
48
|
-
message: string;
|
|
49
|
-
code: ChainCosmosErrorCode;
|
|
50
|
-
};
|
|
51
|
-
'memo too large': {
|
|
52
|
-
message: string;
|
|
53
|
-
code: ChainCosmosErrorCode;
|
|
54
|
-
};
|
|
55
|
-
'maximum number of signatures exceeded': {
|
|
56
|
-
message: string;
|
|
57
|
-
code: ChainCosmosErrorCode;
|
|
58
|
-
};
|
|
59
|
-
'no signatures supplied': {
|
|
60
|
-
message: string;
|
|
61
|
-
code: ChainCosmosErrorCode;
|
|
62
|
-
};
|
|
63
|
-
'failed to marshal JSON bytes': {
|
|
64
|
-
message: string;
|
|
65
|
-
code: ChainCosmosErrorCode;
|
|
66
|
-
};
|
|
67
|
-
'failed to unmarshal JSON bytes': {
|
|
68
|
-
message: string;
|
|
69
|
-
code: ChainCosmosErrorCode;
|
|
70
|
-
};
|
|
71
|
-
'invalid request': {
|
|
72
|
-
message: string;
|
|
73
|
-
code: ChainCosmosErrorCode;
|
|
74
|
-
};
|
|
75
|
-
'tx already in mempool': {
|
|
76
|
-
message: string;
|
|
77
|
-
code: ChainCosmosErrorCode;
|
|
78
|
-
};
|
|
79
|
-
'mempool is full': {
|
|
80
|
-
message: string;
|
|
81
|
-
code: ChainCosmosErrorCode;
|
|
82
|
-
};
|
|
83
|
-
'tx too large': {
|
|
84
|
-
message: string;
|
|
85
|
-
code: ChainCosmosErrorCode;
|
|
86
|
-
};
|
|
87
|
-
'key not found': {
|
|
88
|
-
message: string;
|
|
89
|
-
code: ChainCosmosErrorCode;
|
|
90
|
-
};
|
|
91
|
-
'invalid account password': {
|
|
92
|
-
message: string;
|
|
93
|
-
code: ChainCosmosErrorCode;
|
|
94
|
-
};
|
|
95
|
-
'tx intended signer does not match the given signer': {
|
|
96
|
-
message: string;
|
|
97
|
-
code: ChainCosmosErrorCode;
|
|
98
|
-
};
|
|
99
|
-
'invalid gas adjustment': {
|
|
100
|
-
message: string;
|
|
101
|
-
code: ChainCosmosErrorCode;
|
|
102
|
-
};
|
|
103
|
-
'invalid height': {
|
|
104
|
-
message: string;
|
|
105
|
-
code: ChainCosmosErrorCode;
|
|
106
|
-
};
|
|
107
|
-
'invalid version': {
|
|
108
|
-
message: string;
|
|
109
|
-
code: ChainCosmosErrorCode;
|
|
110
|
-
};
|
|
111
|
-
'invalid chain-id': {
|
|
112
|
-
message: string;
|
|
113
|
-
code: ChainCosmosErrorCode;
|
|
114
|
-
};
|
|
115
|
-
'invalid type': {
|
|
116
|
-
message: string;
|
|
117
|
-
code: ChainCosmosErrorCode;
|
|
118
|
-
};
|
|
119
|
-
'unknown extension options': {
|
|
120
|
-
message: string;
|
|
121
|
-
code: ChainCosmosErrorCode;
|
|
122
|
-
};
|
|
123
|
-
'incorrect account sequence': {
|
|
124
|
-
message: string;
|
|
125
|
-
code: ChainCosmosErrorCode;
|
|
126
|
-
};
|
|
127
|
-
'failed packing protobuf message to Any': {
|
|
128
|
-
message: string;
|
|
129
|
-
code: ChainCosmosErrorCode;
|
|
130
|
-
};
|
|
131
|
-
'failed unpacking protobuf message from Any': {
|
|
132
|
-
message: string;
|
|
133
|
-
code: ChainCosmosErrorCode;
|
|
134
|
-
};
|
|
135
|
-
'internal logic error': {
|
|
136
|
-
message: string;
|
|
137
|
-
code: ChainCosmosErrorCode;
|
|
138
|
-
};
|
|
139
|
-
conflict: {
|
|
140
|
-
message: string;
|
|
141
|
-
code: ChainCosmosErrorCode;
|
|
142
|
-
};
|
|
143
|
-
'feature not supported': {
|
|
144
|
-
message: string;
|
|
145
|
-
code: ChainCosmosErrorCode;
|
|
146
|
-
};
|
|
147
|
-
'not found': {
|
|
148
|
-
message: string;
|
|
149
|
-
code: ChainCosmosErrorCode;
|
|
150
|
-
};
|
|
151
|
-
'Internal IO error': {
|
|
152
|
-
message: string;
|
|
153
|
-
code: ChainCosmosErrorCode;
|
|
154
|
-
};
|
|
155
|
-
'error in app.toml': {
|
|
156
|
-
message: string;
|
|
157
|
-
code: ChainCosmosErrorCode;
|
|
158
|
-
};
|
|
159
|
-
'invalid gas limit': {
|
|
160
|
-
message: string;
|
|
161
|
-
code: ChainCosmosErrorCode;
|
|
162
|
-
};
|
|
163
|
-
'invalid bid denom': {
|
|
164
|
-
message: string;
|
|
165
|
-
code: ChainAuctionErrorCodes;
|
|
166
|
-
};
|
|
167
|
-
'invalid bid round': {
|
|
168
|
-
message: string;
|
|
169
|
-
code: ChainAuctionErrorCodes;
|
|
170
|
-
};
|
|
171
|
-
'insurance fund already exists': {
|
|
172
|
-
message: string;
|
|
173
|
-
code: ChainInsuranceErrorCodes;
|
|
174
|
-
};
|
|
175
|
-
'insurance fund not found': {
|
|
176
|
-
message: string;
|
|
177
|
-
code: ChainInsuranceErrorCodes;
|
|
178
|
-
};
|
|
179
|
-
'redemption already exists': {
|
|
180
|
-
message: string;
|
|
181
|
-
code: ChainInsuranceErrorCodes;
|
|
182
|
-
};
|
|
183
|
-
'invalid deposit amount': {
|
|
184
|
-
message: string;
|
|
185
|
-
code: ChainInsuranceErrorCodes;
|
|
186
|
-
};
|
|
187
|
-
'invalid deposit denom': {
|
|
188
|
-
message: string;
|
|
189
|
-
code: ChainInsuranceErrorCodes;
|
|
190
|
-
};
|
|
191
|
-
'insurance payout exceeds deposits': {
|
|
192
|
-
message: string;
|
|
193
|
-
code: ChainInsuranceErrorCodes;
|
|
194
|
-
};
|
|
195
|
-
'invalid ticker': {
|
|
196
|
-
message: string;
|
|
197
|
-
code: ChainInsuranceErrorCodes;
|
|
198
|
-
};
|
|
199
|
-
'invalid quote denom': {
|
|
200
|
-
message: string;
|
|
201
|
-
code: ChainInsuranceErrorCodes;
|
|
202
|
-
};
|
|
203
|
-
'invalid oracle': {
|
|
204
|
-
message: string;
|
|
205
|
-
code: ChainInsuranceErrorCodes;
|
|
206
|
-
};
|
|
207
|
-
'invalid expiration time': {
|
|
208
|
-
message: string;
|
|
209
|
-
code: ChainInsuranceErrorCodes;
|
|
210
|
-
};
|
|
211
|
-
'invalid marketID': {
|
|
212
|
-
message: string;
|
|
213
|
-
code: ChainInsuranceErrorCodes;
|
|
214
|
-
};
|
|
215
|
-
'invalid share denom': {
|
|
216
|
-
message: string;
|
|
217
|
-
code: ChainInsuranceErrorCodes;
|
|
218
|
-
};
|
|
219
|
-
'failed to validate order': {
|
|
220
|
-
message: string;
|
|
221
|
-
code: ChainExchangeModuleErrorCode;
|
|
222
|
-
};
|
|
223
|
-
'spot market not found': {
|
|
224
|
-
message: string;
|
|
225
|
-
code: ChainExchangeModuleErrorCode;
|
|
226
|
-
};
|
|
227
|
-
'spot market exists': {
|
|
228
|
-
message: string;
|
|
229
|
-
code: ChainExchangeModuleErrorCode;
|
|
230
|
-
};
|
|
231
|
-
'struct field error': {
|
|
232
|
-
message: string;
|
|
233
|
-
code: ChainExchangeModuleErrorCode;
|
|
234
|
-
};
|
|
235
|
-
'failed to validate market': {
|
|
236
|
-
message: string;
|
|
237
|
-
code: ChainExchangeModuleErrorCode;
|
|
238
|
-
};
|
|
239
|
-
'subaccount has insufficient deposits': {
|
|
240
|
-
message: string;
|
|
241
|
-
code: ChainExchangeModuleErrorCode;
|
|
242
|
-
};
|
|
243
|
-
'unrecognized order type': {
|
|
244
|
-
message: string;
|
|
245
|
-
code: ChainExchangeModuleErrorCode;
|
|
246
|
-
};
|
|
247
|
-
'position quantity insufficient for order': {
|
|
248
|
-
message: string;
|
|
249
|
-
code: ChainExchangeModuleErrorCode;
|
|
250
|
-
};
|
|
251
|
-
'order hash is not valid': {
|
|
252
|
-
message: string;
|
|
253
|
-
code: ChainExchangeModuleErrorCode;
|
|
254
|
-
};
|
|
255
|
-
'subaccount id is not valid': {
|
|
256
|
-
message: string;
|
|
257
|
-
code: ChainExchangeModuleErrorCode;
|
|
258
|
-
};
|
|
259
|
-
'invalid base denom': {
|
|
260
|
-
message: string;
|
|
261
|
-
code: ChainExchangeModuleErrorCode;
|
|
262
|
-
};
|
|
263
|
-
'invalid expiry': {
|
|
264
|
-
message: string;
|
|
265
|
-
code: ChainExchangeModuleErrorCode;
|
|
266
|
-
};
|
|
267
|
-
'invalid price': {
|
|
268
|
-
message: string;
|
|
269
|
-
code: ChainExchangeModuleErrorCode;
|
|
270
|
-
};
|
|
271
|
-
'invalid quantity': {
|
|
272
|
-
message: string;
|
|
273
|
-
code: ChainExchangeModuleErrorCode;
|
|
274
|
-
};
|
|
275
|
-
'unsupported oracle type': {
|
|
276
|
-
message: string;
|
|
277
|
-
code: ChainExchangeModuleErrorCode;
|
|
278
|
-
};
|
|
279
|
-
'order doesnt exist': {
|
|
280
|
-
message: string;
|
|
281
|
-
code: ChainExchangeModuleErrorCode;
|
|
282
|
-
};
|
|
283
|
-
'spot limit orderbook fill invalid': {
|
|
284
|
-
message: string;
|
|
285
|
-
code: ChainExchangeModuleErrorCode;
|
|
286
|
-
};
|
|
287
|
-
'perpetual market exists': {
|
|
288
|
-
message: string;
|
|
289
|
-
code: ChainExchangeModuleErrorCode;
|
|
290
|
-
};
|
|
291
|
-
'expiry futures market exists': {
|
|
292
|
-
message: string;
|
|
293
|
-
code: ChainExchangeModuleErrorCode;
|
|
294
|
-
};
|
|
295
|
-
'expiry futures market expired': {
|
|
296
|
-
message: string;
|
|
297
|
-
code: ChainExchangeModuleErrorCode;
|
|
298
|
-
};
|
|
299
|
-
'no liquidity on the orderbook': {
|
|
300
|
-
message: string;
|
|
301
|
-
code: ChainExchangeModuleErrorCode;
|
|
302
|
-
};
|
|
303
|
-
'orderbook liquidity cannot satisfy current worst price': {
|
|
304
|
-
message: string;
|
|
305
|
-
code: ChainExchangeModuleErrorCode;
|
|
306
|
-
};
|
|
307
|
-
'order has insufficient margin': {
|
|
308
|
-
message: string;
|
|
309
|
-
code: ChainExchangeModuleErrorCode;
|
|
310
|
-
};
|
|
311
|
-
'derivative market not found': {
|
|
312
|
-
message: string;
|
|
313
|
-
code: ChainExchangeModuleErrorCode;
|
|
314
|
-
};
|
|
315
|
-
'position not found': {
|
|
316
|
-
message: string;
|
|
317
|
-
code: ChainExchangeModuleErrorCode;
|
|
318
|
-
};
|
|
319
|
-
'position direction does not oppose the reduce-only order': {
|
|
320
|
-
message: string;
|
|
321
|
-
code: ChainExchangeModuleErrorCode;
|
|
322
|
-
};
|
|
323
|
-
'price surpasses bankruptcy price': {
|
|
324
|
-
message: string;
|
|
325
|
-
code: ChainExchangeModuleErrorCode;
|
|
326
|
-
};
|
|
327
|
-
'position not liquidable': {
|
|
328
|
-
message: string;
|
|
329
|
-
code: ChainExchangeModuleErrorCode;
|
|
330
|
-
};
|
|
331
|
-
'invalid trigger price': {
|
|
332
|
-
message: string;
|
|
333
|
-
code: ChainExchangeModuleErrorCode;
|
|
334
|
-
};
|
|
335
|
-
'invalid oracle type': {
|
|
336
|
-
message: string;
|
|
337
|
-
code: ChainExchangeModuleErrorCode;
|
|
338
|
-
};
|
|
339
|
-
'invalid minimum price tick size': {
|
|
340
|
-
message: string;
|
|
341
|
-
code: ChainExchangeModuleErrorCode;
|
|
342
|
-
};
|
|
343
|
-
'invalid minimum quantity tick size': {
|
|
344
|
-
message: string;
|
|
345
|
-
code: ChainExchangeModuleErrorCode;
|
|
346
|
-
};
|
|
347
|
-
'invalid minimum order margin': {
|
|
348
|
-
message: string;
|
|
349
|
-
code: ChainExchangeModuleErrorCode;
|
|
350
|
-
};
|
|
351
|
-
'exceeds order side count': {
|
|
352
|
-
message: string;
|
|
353
|
-
code: ChainExchangeModuleErrorCode;
|
|
354
|
-
};
|
|
355
|
-
'subaccount cannot place a market order when a market order in the same market was already placed in same block': {
|
|
356
|
-
message: string;
|
|
357
|
-
code: ChainExchangeModuleErrorCode;
|
|
358
|
-
};
|
|
359
|
-
'cannot place a conditional market order when a conditional market order in same relative direction already exists': {
|
|
360
|
-
message: string;
|
|
361
|
-
code: ChainExchangeModuleErrorCode;
|
|
362
|
-
};
|
|
363
|
-
'an equivalent market launch proposal already exists.': {
|
|
364
|
-
message: string;
|
|
365
|
-
code: ChainExchangeModuleErrorCode;
|
|
366
|
-
};
|
|
367
|
-
'invalid market status': {
|
|
368
|
-
message: string;
|
|
369
|
-
code: ChainExchangeModuleErrorCode;
|
|
370
|
-
};
|
|
371
|
-
'base denom cannot be same with quote denom': {
|
|
372
|
-
message: string;
|
|
373
|
-
code: ChainExchangeModuleErrorCode;
|
|
374
|
-
};
|
|
375
|
-
'oracle base cannot be same with oracle quote': {
|
|
376
|
-
message: string;
|
|
377
|
-
code: ChainExchangeModuleErrorCode;
|
|
378
|
-
};
|
|
379
|
-
'makerfeerate does not match takerfeeeate requirements': {
|
|
380
|
-
message: string;
|
|
381
|
-
code: ChainExchangeModuleErrorCode;
|
|
382
|
-
};
|
|
383
|
-
'maintenancemarginratio cannot be greater than initialmarginratio': {
|
|
384
|
-
message: string;
|
|
385
|
-
code: ChainExchangeModuleErrorCode;
|
|
386
|
-
};
|
|
387
|
-
'oraclescalefactor cannot be greater than maxoraclescalefactor': {
|
|
388
|
-
message: string;
|
|
389
|
-
code: ChainExchangeModuleErrorCode;
|
|
390
|
-
};
|
|
391
|
-
'spot exchange is not enabled yet': {
|
|
392
|
-
message: string;
|
|
393
|
-
code: ChainExchangeModuleErrorCode;
|
|
394
|
-
};
|
|
395
|
-
'derivatives exchange is not enabled yet': {
|
|
396
|
-
message: string;
|
|
397
|
-
code: ChainExchangeModuleErrorCode;
|
|
398
|
-
};
|
|
399
|
-
'oracle price delta exceeds threshold': {
|
|
400
|
-
message: string;
|
|
401
|
-
code: ChainExchangeModuleErrorCode;
|
|
402
|
-
};
|
|
403
|
-
'invalid hourly interest rate': {
|
|
404
|
-
message: string;
|
|
405
|
-
code: ChainExchangeModuleErrorCode;
|
|
406
|
-
};
|
|
407
|
-
'invalid hourly funding rate cap': {
|
|
408
|
-
message: string;
|
|
409
|
-
code: ChainExchangeModuleErrorCode;
|
|
410
|
-
};
|
|
411
|
-
'only perpetual markets can update funding parameters': {
|
|
412
|
-
message: string;
|
|
413
|
-
code: ChainExchangeModuleErrorCode;
|
|
414
|
-
};
|
|
415
|
-
'invalid trading reward campaign': {
|
|
416
|
-
message: string;
|
|
417
|
-
code: ChainExchangeModuleErrorCode;
|
|
418
|
-
};
|
|
419
|
-
'invalid fee discount schedule': {
|
|
420
|
-
message: string;
|
|
421
|
-
code: ChainExchangeModuleErrorCode;
|
|
422
|
-
};
|
|
423
|
-
'invalid liquidation order': {
|
|
424
|
-
message: string;
|
|
425
|
-
code: ChainExchangeModuleErrorCode;
|
|
426
|
-
};
|
|
427
|
-
'unknown error happened for campaign distributions': {
|
|
428
|
-
message: string;
|
|
429
|
-
code: ChainExchangeModuleErrorCode;
|
|
430
|
-
};
|
|
431
|
-
'invalid trading reward points update': {
|
|
432
|
-
message: string;
|
|
433
|
-
code: ChainExchangeModuleErrorCode;
|
|
434
|
-
};
|
|
435
|
-
'invalid batch msg update': {
|
|
436
|
-
message: string;
|
|
437
|
-
code: ChainExchangeModuleErrorCode;
|
|
438
|
-
};
|
|
439
|
-
'post-only order exceeds top of book price': {
|
|
440
|
-
message: string;
|
|
441
|
-
code: ChainExchangeModuleErrorCode;
|
|
442
|
-
};
|
|
443
|
-
'order type not supported for given message': {
|
|
444
|
-
message: string;
|
|
445
|
-
code: ChainExchangeModuleErrorCode;
|
|
446
|
-
};
|
|
447
|
-
'sender must match dmm account': {
|
|
448
|
-
message: string;
|
|
449
|
-
code: ChainExchangeModuleErrorCode;
|
|
450
|
-
};
|
|
451
|
-
'already opted out of rewards': {
|
|
452
|
-
message: string;
|
|
453
|
-
code: ChainExchangeModuleErrorCode;
|
|
454
|
-
};
|
|
455
|
-
'invalid margin ratio': {
|
|
456
|
-
message: string;
|
|
457
|
-
code: ChainExchangeModuleErrorCode;
|
|
458
|
-
};
|
|
459
|
-
'provided funds are below minimum': {
|
|
460
|
-
message: string;
|
|
461
|
-
code: ChainExchangeModuleErrorCode;
|
|
462
|
-
};
|
|
463
|
-
'position is below initial margin requirement': {
|
|
464
|
-
message: string;
|
|
465
|
-
code: ChainExchangeModuleErrorCode;
|
|
466
|
-
};
|
|
467
|
-
'pool has non-positive total lp token supply': {
|
|
468
|
-
message: string;
|
|
469
|
-
code: ChainExchangeModuleErrorCode;
|
|
470
|
-
};
|
|
471
|
-
'passed lp token burn amount is greater than total lp token supply': {
|
|
472
|
-
message: string;
|
|
473
|
-
code: ChainExchangeModuleErrorCode;
|
|
474
|
-
};
|
|
475
|
-
'unsupported action': {
|
|
476
|
-
message: string;
|
|
477
|
-
code: ChainExchangeModuleErrorCode;
|
|
478
|
-
};
|
|
479
|
-
'position quantity cannot be negative': {
|
|
480
|
-
message: string;
|
|
481
|
-
code: ChainExchangeModuleErrorCode;
|
|
482
|
-
};
|
|
483
|
-
'binary options market exists': {
|
|
484
|
-
message: string;
|
|
485
|
-
code: ChainExchangeModuleErrorCode;
|
|
486
|
-
};
|
|
487
|
-
'binary options market not found': {
|
|
488
|
-
message: string;
|
|
489
|
-
code: ChainExchangeModuleErrorCode;
|
|
490
|
-
};
|
|
491
|
-
'invalid settlement': {
|
|
492
|
-
message: string;
|
|
493
|
-
code: ChainExchangeModuleErrorCode;
|
|
494
|
-
};
|
|
495
|
-
'account doesnt exist': {
|
|
496
|
-
message: string;
|
|
497
|
-
code: ChainExchangeModuleErrorCode;
|
|
498
|
-
};
|
|
499
|
-
'sender should be a market admin': {
|
|
500
|
-
message: string;
|
|
501
|
-
code: ChainExchangeModuleErrorCode;
|
|
502
|
-
};
|
|
503
|
-
'market is already scheduled to settle': {
|
|
504
|
-
message: string;
|
|
505
|
-
code: ChainExchangeModuleErrorCode;
|
|
506
|
-
};
|
|
507
|
-
'market not found': {
|
|
508
|
-
message: string;
|
|
509
|
-
code: ChainExchangeModuleErrorCode;
|
|
510
|
-
};
|
|
511
|
-
'denom decimal cannot be below 1 or above max scale factor': {
|
|
512
|
-
message: string;
|
|
513
|
-
code: ChainExchangeModuleErrorCode;
|
|
514
|
-
};
|
|
515
|
-
'state is invalid': {
|
|
516
|
-
message: string;
|
|
517
|
-
code: ChainExchangeModuleErrorCode;
|
|
518
|
-
};
|
|
519
|
-
'transient orders up to cancellation not supported': {
|
|
520
|
-
message: string;
|
|
521
|
-
code: ChainExchangeModuleErrorCode;
|
|
522
|
-
};
|
|
523
|
-
'invalid trade': {
|
|
524
|
-
message: string;
|
|
525
|
-
code: ChainExchangeModuleErrorCode;
|
|
526
|
-
};
|
|
527
|
-
'no margin locked in subaccount': {
|
|
528
|
-
message: string;
|
|
529
|
-
code: ChainExchangeModuleErrorCode;
|
|
530
|
-
};
|
|
531
|
-
'Invalid access level to perform action': {
|
|
532
|
-
message: string;
|
|
533
|
-
code: ChainExchangeModuleErrorCode;
|
|
534
|
-
};
|
|
535
|
-
'Invalid address': {
|
|
536
|
-
message: string;
|
|
537
|
-
code: ChainExchangeModuleErrorCode;
|
|
538
|
-
};
|
|
539
|
-
'Invalid argument': {
|
|
540
|
-
message: string;
|
|
541
|
-
code: ChainExchangeModuleErrorCode;
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
export declare const chainCodeErrorMessagesMap: Record<number, string>;
|
|
1
|
+
import { ErrorContextCode, TransactionChainErrorModule } from './types';
|
|
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
|
+
}>;
|
|
545
13
|
//# sourceMappingURL=messages.d.ts.map
|
package/dist/messages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAUhB,2BAA2B,EAC5B,MAAM,SAAS,CAAA;AAmYhB,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWvB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,MAAM,EACN;IACE,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,EAAE,2BAA2B,CAAA;CACpC,CA8yBF,CAAA"}
|