@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
package/dist/messages.js
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messagesMap = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
exports.messagesMap = {
|
|
6
|
+
'insufficient fee': {
|
|
7
|
+
message: 'You do not have enough funds to cover transaction fees.',
|
|
8
|
+
code: types_1.ChainCosmosErrorCode.ErrInsufficientFee,
|
|
9
|
+
},
|
|
10
|
+
'insufficient funds': {
|
|
11
|
+
message: 'You do not have enough funds to cover transaction fees.',
|
|
12
|
+
code: types_1.ChainCosmosErrorCode.ErrInsufficientFunds,
|
|
13
|
+
},
|
|
14
|
+
'tx timeout height': {
|
|
15
|
+
message: 'The transaction failed to be included within a block on time.',
|
|
16
|
+
code: types_1.ChainCosmosErrorCode.ErrTxTimeoutHeight,
|
|
17
|
+
},
|
|
18
|
+
// Exchange Module Messages
|
|
19
|
+
'failed to validate order': {
|
|
20
|
+
message: 'Your order failed to validate',
|
|
21
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrOrderInvalid,
|
|
22
|
+
},
|
|
23
|
+
'spot market not found': {
|
|
24
|
+
message: 'The spot market has not been found',
|
|
25
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSpotMarketNotFound,
|
|
26
|
+
},
|
|
27
|
+
'spot market exists': {
|
|
28
|
+
message: 'The spot market already exists',
|
|
29
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSpotMarketExists,
|
|
30
|
+
},
|
|
31
|
+
'struct field error': {
|
|
32
|
+
message: 'There is an issue with your order',
|
|
33
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrBadField,
|
|
34
|
+
},
|
|
35
|
+
'failed to validate market': {
|
|
36
|
+
message: 'The market failed to validate',
|
|
37
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrMarketInvalid,
|
|
38
|
+
},
|
|
39
|
+
'subaccount has insufficient deposits': {
|
|
40
|
+
message: 'Your trading account has insufficient funds',
|
|
41
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInsufficientDeposit,
|
|
42
|
+
},
|
|
43
|
+
'unrecognized order type': {
|
|
44
|
+
message: 'The order type is not recognized',
|
|
45
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrUnrecognizedOrderType,
|
|
46
|
+
},
|
|
47
|
+
'position quantity insufficient for order': {
|
|
48
|
+
message: 'The position quantity is insufficient for the order',
|
|
49
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInsufficientPositionQuantity,
|
|
50
|
+
},
|
|
51
|
+
'order hash is not valid': {
|
|
52
|
+
message: 'The order hash is not valid',
|
|
53
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrOrderHashInvalid,
|
|
54
|
+
},
|
|
55
|
+
'subaccount id is not valid': {
|
|
56
|
+
message: 'The subaccount id is not valid',
|
|
57
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrBadSubaccountID,
|
|
58
|
+
},
|
|
59
|
+
'invalid ticker': {
|
|
60
|
+
message: "The market's ticker is not valid",
|
|
61
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTicker,
|
|
62
|
+
},
|
|
63
|
+
'invalid base denom': {
|
|
64
|
+
message: '',
|
|
65
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidBaseDenom,
|
|
66
|
+
},
|
|
67
|
+
'invalid quote denom': {
|
|
68
|
+
message: '',
|
|
69
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidQuoteDenom,
|
|
70
|
+
},
|
|
71
|
+
'invalid oracle': {
|
|
72
|
+
message: 'The oracle is invalid',
|
|
73
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidOracle,
|
|
74
|
+
},
|
|
75
|
+
'invalid expiry': {
|
|
76
|
+
message: 'The expiry date is invalid',
|
|
77
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidExpiry,
|
|
78
|
+
},
|
|
79
|
+
'invalid price': {
|
|
80
|
+
message: 'The price is invalid',
|
|
81
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidPrice,
|
|
82
|
+
},
|
|
83
|
+
'invalid quantity': {
|
|
84
|
+
message: 'The quantity is invalid',
|
|
85
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidQuantity,
|
|
86
|
+
},
|
|
87
|
+
'unsupported oracle type': {
|
|
88
|
+
message: 'The oracle type is not supported',
|
|
89
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrUnsupportedOracleType,
|
|
90
|
+
},
|
|
91
|
+
'order doesnt exist': {
|
|
92
|
+
message: 'The order does not exist',
|
|
93
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrOrderDoesntExist,
|
|
94
|
+
},
|
|
95
|
+
'spot limit orderbook fill invalid': {
|
|
96
|
+
message: '',
|
|
97
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrOrderbookFillInvalid,
|
|
98
|
+
},
|
|
99
|
+
'perpetual market exists': {
|
|
100
|
+
message: 'The perpetual market already exists',
|
|
101
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrPerpetualMarketExists,
|
|
102
|
+
},
|
|
103
|
+
'expiry futures market exists': {
|
|
104
|
+
message: 'The expiry futures market market already exists',
|
|
105
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrExpiryFuturesMarketExists,
|
|
106
|
+
},
|
|
107
|
+
'expiry futures market expired': {
|
|
108
|
+
message: 'The expiry futures market has expired',
|
|
109
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrExpiryFuturesMarketExpired,
|
|
110
|
+
},
|
|
111
|
+
'no liquidity on the orderbook': {
|
|
112
|
+
message: 'There is not enough liquidity',
|
|
113
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrNoLiquidity,
|
|
114
|
+
},
|
|
115
|
+
'orderbook liquidity cannot satisfy current worst price': {
|
|
116
|
+
message: 'There is not enough liquidity',
|
|
117
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSlippageExceedsWorstPrice,
|
|
118
|
+
},
|
|
119
|
+
'order has insufficient margin': {
|
|
120
|
+
message: 'The order has insufficient margin',
|
|
121
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInsufficientOrderMargin,
|
|
122
|
+
},
|
|
123
|
+
'derivative market not found': {
|
|
124
|
+
message: 'The derivative market cannot be found',
|
|
125
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrDerivativeMarketNotFound,
|
|
126
|
+
},
|
|
127
|
+
'position not found': {
|
|
128
|
+
message: 'The position cannot be found',
|
|
129
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrPositionNotFound,
|
|
130
|
+
},
|
|
131
|
+
'position direction does not oppose the reduce-only order': {
|
|
132
|
+
message: 'Position direction does not oppose the reduce-only order',
|
|
133
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidReduceOnlyPositionDirection,
|
|
134
|
+
},
|
|
135
|
+
'price surpasses bankruptcy price': {
|
|
136
|
+
message: 'Your order price surpasses bankruptcy price',
|
|
137
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrPriceSurpassesBankruptcyPrice,
|
|
138
|
+
},
|
|
139
|
+
'position not liquidable': {
|
|
140
|
+
message: 'The position is not liquidable',
|
|
141
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrPositionNotLiquidable,
|
|
142
|
+
},
|
|
143
|
+
'invalid trigger price': {
|
|
144
|
+
message: 'Your order trigger price is not valid',
|
|
145
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTriggerPrice,
|
|
146
|
+
},
|
|
147
|
+
'invalid oracle type': {
|
|
148
|
+
message: 'The oracle type is not valid',
|
|
149
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidOracleType,
|
|
150
|
+
},
|
|
151
|
+
'invalid minimum price tick size': {
|
|
152
|
+
message: 'The minimum price tick size is not valid',
|
|
153
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidPriceTickSize,
|
|
154
|
+
},
|
|
155
|
+
'invalid minimum quantity tick size': {
|
|
156
|
+
message: 'The minimum quantity tick size is not valid',
|
|
157
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidQuantityTickSize,
|
|
158
|
+
},
|
|
159
|
+
'invalid minimum order margin': {
|
|
160
|
+
message: "Your order's minimum margin is not valid ",
|
|
161
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidMargin,
|
|
162
|
+
},
|
|
163
|
+
'exceeds order side count': {
|
|
164
|
+
message: 'You cannot have more orders for this market for this direction',
|
|
165
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrExceedsOrderSideCount,
|
|
166
|
+
},
|
|
167
|
+
'subaccount cannot place a market order when a market order in the same market was already placed in same block': {
|
|
168
|
+
message: 'You cannot place another market order within this block',
|
|
169
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrMarketOrderAlreadyExists,
|
|
170
|
+
},
|
|
171
|
+
'cannot place a conditional market order when a conditional market order in same relative direction already exists': {
|
|
172
|
+
message: 'You cannot place another conditional market order',
|
|
173
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrConditionalMarketOrderAlreadyExists,
|
|
174
|
+
},
|
|
175
|
+
'an equivalent market launch proposal already exists.': {
|
|
176
|
+
message: 'There is an existing equivalent market launch proposal.',
|
|
177
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrMarketLaunchProposalAlreadyExists,
|
|
178
|
+
},
|
|
179
|
+
'invalid market status': {
|
|
180
|
+
message: 'The market status is not valid',
|
|
181
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidMarketStatus,
|
|
182
|
+
},
|
|
183
|
+
'base denom cannot be same with quote denom': {
|
|
184
|
+
message: 'The base denom and quote denom cannot be same',
|
|
185
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSameDenoms,
|
|
186
|
+
},
|
|
187
|
+
'oracle base cannot be same with oracle quote': {
|
|
188
|
+
message: 'The oracle base and the oracle quote cannot be the same',
|
|
189
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSameOracles,
|
|
190
|
+
},
|
|
191
|
+
'makerfeerate does not match takerfeeeate requirements': {
|
|
192
|
+
message: 'The MakerFeeRate does not match TakerFeeRate requirements',
|
|
193
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrFeeRatesRelation,
|
|
194
|
+
},
|
|
195
|
+
'maintenancemarginratio cannot be greater than initialmarginratio': {
|
|
196
|
+
message: 'The MaintenanceMarginRatio cannot be greater than InitialMarginRatio',
|
|
197
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrMarginsRelation,
|
|
198
|
+
},
|
|
199
|
+
'oraclescalefactor cannot be greater than maxoraclescalefactor': {
|
|
200
|
+
message: 'The OracleScaleFactor cannot be greater than MaxOracleScaleFactor',
|
|
201
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrExceedsMaxOracleScaleFactor,
|
|
202
|
+
},
|
|
203
|
+
'spot exchange is not enabled yet': {
|
|
204
|
+
message: 'Spot exchange is not enabled yet',
|
|
205
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSpotExchangeNotEnabled,
|
|
206
|
+
},
|
|
207
|
+
'derivatives exchange is not enabled yet': {
|
|
208
|
+
message: 'Derivatives exchange is not enabled yet',
|
|
209
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrDerivativesExchangeNotEnabled,
|
|
210
|
+
},
|
|
211
|
+
'oracle price delta exceeds threshold': {
|
|
212
|
+
message: 'The oracle price delta exceeds threshold',
|
|
213
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrOraclePriceDeltaExceedsThreshold,
|
|
214
|
+
},
|
|
215
|
+
'invalid hourly interest rate': {
|
|
216
|
+
message: 'The hourly interest rate is not valid',
|
|
217
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidHourlyInterestRate,
|
|
218
|
+
},
|
|
219
|
+
'invalid hourly funding rate cap': {
|
|
220
|
+
message: 'The hourly funding rate cap is not valid',
|
|
221
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidHourlyFundingRateCap,
|
|
222
|
+
},
|
|
223
|
+
'only perpetual markets can update funding parameters': {
|
|
224
|
+
message: 'You can only update funding parameters on perpetual markets.',
|
|
225
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidMarketFundingParamUpdate,
|
|
226
|
+
},
|
|
227
|
+
'invalid trading reward campaign': {
|
|
228
|
+
message: 'The trading reward campaign is not valid',
|
|
229
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTradingRewardCampaign,
|
|
230
|
+
},
|
|
231
|
+
'invalid fee discount schedule': {
|
|
232
|
+
message: 'The fee discount schedule is not valid',
|
|
233
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidFeeDiscountSchedule,
|
|
234
|
+
},
|
|
235
|
+
'invalid liquidation order': {
|
|
236
|
+
message: 'The liquidation order is not valid',
|
|
237
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidLiquidationOrder,
|
|
238
|
+
},
|
|
239
|
+
'unknown error happened for campaign distributions': {
|
|
240
|
+
message: 'Unknown error happened for campaign distributions',
|
|
241
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrTradingRewardCampaignDistributionError,
|
|
242
|
+
},
|
|
243
|
+
'invalid trading reward points update': {
|
|
244
|
+
message: 'The updated trading reward points is not valid',
|
|
245
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTradingRewardsPendingPointsUpdate,
|
|
246
|
+
},
|
|
247
|
+
'invalid batch msg update': {
|
|
248
|
+
message: 'The MsgBatchUpdate is not valid',
|
|
249
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidBatchMsgUpdate,
|
|
250
|
+
},
|
|
251
|
+
'post-only order exceeds top of book price': {
|
|
252
|
+
message: 'The post-only order price exceeds top of the orderbook price',
|
|
253
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrExceedsTopOfBookPrice,
|
|
254
|
+
},
|
|
255
|
+
'order type not supported for given message': {
|
|
256
|
+
message: 'The order type is not supported for this message',
|
|
257
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidOrderTypeForMessage,
|
|
258
|
+
},
|
|
259
|
+
'sender must match dmm account': {
|
|
260
|
+
message: 'The sender must match the DMM address',
|
|
261
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidDMMSender,
|
|
262
|
+
},
|
|
263
|
+
'already opted out of rewards': {
|
|
264
|
+
message: 'The DMM address already opted out of rewards',
|
|
265
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrAlreadyOptedOutOfRewards,
|
|
266
|
+
},
|
|
267
|
+
'invalid margin ratio': {
|
|
268
|
+
message: 'The margin ratio is invalid',
|
|
269
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidMarginRatio,
|
|
270
|
+
},
|
|
271
|
+
'provided funds are below minimum': {
|
|
272
|
+
message: 'The provided funds are below minimum',
|
|
273
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrBelowMinimalContribution,
|
|
274
|
+
},
|
|
275
|
+
'position is below initial margin requirement': {
|
|
276
|
+
message: 'The position is below initial margin requirement',
|
|
277
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrLowPositionMargin,
|
|
278
|
+
},
|
|
279
|
+
'pool has non-positive total lp token supply': {
|
|
280
|
+
message: 'The pool has non-positive total LP token supply',
|
|
281
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTotalSupply,
|
|
282
|
+
},
|
|
283
|
+
'passed lp token burn amount is greater than total lp token supply': {
|
|
284
|
+
message: 'The passed LP token burn amount is greater than total LP token supply',
|
|
285
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidLpTokenBurnAmount,
|
|
286
|
+
},
|
|
287
|
+
'unsupported action': {
|
|
288
|
+
message: 'This action is not supported',
|
|
289
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrUnsupportedAction,
|
|
290
|
+
},
|
|
291
|
+
'position quantity cannot be negative': {
|
|
292
|
+
message: 'The position quantity cannot be negative',
|
|
293
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrNegativePositionQuantity,
|
|
294
|
+
},
|
|
295
|
+
'binary options market exists': {
|
|
296
|
+
message: 'The BinaryOptions market already exists',
|
|
297
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrBinaryOptionsMarketExists,
|
|
298
|
+
},
|
|
299
|
+
'binary options market not found': {
|
|
300
|
+
message: 'The BinaryOptions market cannot be found',
|
|
301
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrBinaryOptionsMarketNotFound,
|
|
302
|
+
},
|
|
303
|
+
'invalid settlement': {
|
|
304
|
+
message: 'The settlement price is not valid',
|
|
305
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidSettlement,
|
|
306
|
+
},
|
|
307
|
+
'account doesnt exist': {
|
|
308
|
+
message: 'The trading account does not exist',
|
|
309
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrAccountDoesntExist,
|
|
310
|
+
},
|
|
311
|
+
'sender should be a market admin': {
|
|
312
|
+
message: 'The sender should be the admin of the market',
|
|
313
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrSenderIsNotAnAdmin,
|
|
314
|
+
},
|
|
315
|
+
'market is already scheduled to settle': {
|
|
316
|
+
message: 'The market is already scheduled to settle ',
|
|
317
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrMarketAlreadyScheduledToSettle,
|
|
318
|
+
},
|
|
319
|
+
'market not found': {
|
|
320
|
+
message: 'The market cannot be found',
|
|
321
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrGenericMarketNotFound,
|
|
322
|
+
},
|
|
323
|
+
'denom decimal cannot be below 1 or above max scale factor': {
|
|
324
|
+
message: 'The denom decimal cannot be below 1 or above max scale factor',
|
|
325
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidDenomDecimal,
|
|
326
|
+
},
|
|
327
|
+
'state is invalid': {
|
|
328
|
+
message: 'The state is invalid',
|
|
329
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidState,
|
|
330
|
+
},
|
|
331
|
+
'transient orders up to cancellation not supported': {
|
|
332
|
+
message: 'The transient orders up to cancellation not supported',
|
|
333
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrTransientOrdersUpToCancelNotSupported,
|
|
334
|
+
},
|
|
335
|
+
'invalid trade': {
|
|
336
|
+
message: 'The trade is not valid',
|
|
337
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidTrade,
|
|
338
|
+
},
|
|
339
|
+
'no margin locked in subaccount': {
|
|
340
|
+
message: 'There is no margin locked in the trading account',
|
|
341
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrNoMarginLocked,
|
|
342
|
+
},
|
|
343
|
+
'Invalid access level to perform action': {
|
|
344
|
+
message: 'There is no access to perform action',
|
|
345
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidAccessLevel,
|
|
346
|
+
},
|
|
347
|
+
'Invalid address': {
|
|
348
|
+
message: 'The address is not valid',
|
|
349
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidAddress,
|
|
350
|
+
},
|
|
351
|
+
'Invalid argument': {
|
|
352
|
+
message: 'The argument is not valid',
|
|
353
|
+
code: types_1.ChainExchangeModuleErrorCode.ErrInvalidArgument,
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":";;;AAAA,mCAA4E;AAE/D,QAAA,WAAW,GAAG;IACzB,kBAAkB,EAAE;QAClB,OAAO,EAAE,yDAAyD;QAClE,IAAI,EAAE,4BAAoB,CAAC,kBAAkB;KAC9C;IAED,oBAAoB,EAAE;QACpB,OAAO,EAAE,yDAAyD;QAClE,IAAI,EAAE,4BAAoB,CAAC,oBAAoB;KAChD;IAED,mBAAmB,EAAE;QACnB,OAAO,EAAE,+DAA+D;QACxE,IAAI,EAAE,4BAAoB,CAAC,kBAAkB;KAC9C;IAED,2BAA2B;IAC3B,0BAA0B,EAAE;QAC1B,OAAO,EAAE,+BAA+B;QACxC,IAAI,EAAE,oCAA4B,CAAC,eAAe;KACnD;IAED,uBAAuB,EAAE;QACvB,OAAO,EAAE,oCAAoC;QAC7C,IAAI,EAAE,oCAA4B,CAAC,qBAAqB;KACzD;IAED,oBAAoB,EAAE;QACpB,OAAO,EAAE,gCAAgC;QACzC,IAAI,EAAE,oCAA4B,CAAC,mBAAmB;KACvD;IAED,oBAAoB,EAAE;QACpB,OAAO,EAAE,mCAAmC;QAC5C,IAAI,EAAE,oCAA4B,CAAC,WAAW;KAC/C;IAED,2BAA2B,EAAE;QAC3B,OAAO,EAAE,+BAA+B;QACxC,IAAI,EAAE,oCAA4B,CAAC,gBAAgB;KACpD;IAED,sCAAsC,EAAE;QACtC,OAAO,EAAE,6CAA6C;QACtD,IAAI,EAAE,oCAA4B,CAAC,sBAAsB;KAC1D;IAED,yBAAyB,EAA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B,EAAE;QACtB,OAAO,EAAE,oCAAoC;QAC7C,IAAI,EAAE,oCAA4B,CAAC,qBAAqB;KACzD;IAED,iCAAiC,EAAE;QACjC,OAAO,EAAE,8CAA8C;QACvD,IAAI,EAAE,oCAA4B,CAAC,qBAAqB;KACzD;IAED,uCAAuC,EAAE;QACvC,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,oCAA4B,CAAC,iCAAiC;KACrE;IAED,kBAAkB,EAAE;QAClB,OAAO,EAAE,4BAA4B;QACrC,IAAI,EAAE,oCAA4B,CAAC,wBAAwB;KAC5D;IAED,2DAA2D,EAAE;QAC3D,OAAO,EAAE,+DAA+D;QACxE,IAAI,EAAE,oCAA4B,CAAC,sBAAsB;KAC1D;IAED,kBAAkB,EAAE;QAClB,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,oCAA4B,CAAC,eAAe;KACnD;IAED,mDAAmD,EAAE;QACnD,OAAO,EAAE,uDAAuD;QAChE,IAAI,EAAE,oCAA4B,CAAC,wCAAwC;KAC5E;IAED,eAAe,EAAE;QACf,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,oCAA4B,CAAC,eAAe;KACnD;IAED,gCAAgC,EAAE;QAChC,OAAO,EAAE,kDAAkD;QAC3D,IAAI,EAAE,oCAA4B,CAAC,iBAAiB;KACrD;IAED,wCAAwC,EAAE;QACxC,OAAO,EAAE,sCAAsC;QAC/C,IAAI,EAAE,oCAA4B,CAAC,qBAAqB;KACzD;IAED,iBAAiB,EAAE;QACjB,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,oCAA4B,CAAC,iBAAiB;KACrD;IAED,kBAAkB,EAAE;QAClB,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,oCAA4B,CAAC,kBAAkB;KACtD;CACF,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { grpc } from '@improbable-eng/grpc-web';
|
|
2
|
+
import { StatusCodes } from 'http-status-codes';
|
|
3
|
+
export declare enum ChainCosmosErrorCode {
|
|
4
|
+
ErrTxDecode = 2,
|
|
5
|
+
ErrInvalidSequence = 3,
|
|
6
|
+
ErrUnauthorized = 4,
|
|
7
|
+
ErrInsufficientFunds = 5,
|
|
8
|
+
ErrUnknownRequest = 6,
|
|
9
|
+
ErrInvalidAddress = 7,
|
|
10
|
+
ErrInvalidPubKey = 8,
|
|
11
|
+
ErrUnknownAddress = 9,
|
|
12
|
+
ErrInvalidCoins = 10,
|
|
13
|
+
ErrOutOfGas = 11,
|
|
14
|
+
ErrMemoTooLarge = 12,
|
|
15
|
+
ErrInsufficientFee = 13,
|
|
16
|
+
ErrTooManySignatures = 14,
|
|
17
|
+
ErrNoSignatures = 15,
|
|
18
|
+
ErrJSONMarshal = 16,
|
|
19
|
+
ErrJSONUnmarshal = 17,
|
|
20
|
+
ErrInvalidRequest = 18,
|
|
21
|
+
ErrTxInMempoolCache = 19,
|
|
22
|
+
ErrMempoolIsFull = 20,
|
|
23
|
+
ErrTxTooLarge = 21,
|
|
24
|
+
ErrKeyNotFound = 22,
|
|
25
|
+
ErrWrongPassword = 23,
|
|
26
|
+
ErrorInvalidSigner = 24,
|
|
27
|
+
ErrorInvalidGasAdjustment = 25,
|
|
28
|
+
ErrInvalidHeight = 26,
|
|
29
|
+
ErrInvalidVersion = 27,
|
|
30
|
+
ErrInvalidChainID = 28,
|
|
31
|
+
ErrInvalidType = 29,
|
|
32
|
+
ErrTxTimeoutHeight = 30,
|
|
33
|
+
ErrUnknownExtensionOptions = 31,
|
|
34
|
+
ErrWrongSequence = 32,
|
|
35
|
+
ErrPackAny = 33,
|
|
36
|
+
ErrUnpackAny = 34,
|
|
37
|
+
ErrLogic = 35,
|
|
38
|
+
ErrConflict = 36,
|
|
39
|
+
ErrNotSupported = 37,
|
|
40
|
+
ErrNotFound = 38,
|
|
41
|
+
ErrIO = 39,
|
|
42
|
+
ErrAppConfig = 40,
|
|
43
|
+
ErrInvalidGasLimit = 41
|
|
44
|
+
}
|
|
45
|
+
export declare enum ChainExchangeModuleErrorCode {
|
|
46
|
+
ErrOrderInvalid = 1,
|
|
47
|
+
ErrSpotMarketNotFound = 2,
|
|
48
|
+
ErrSpotMarketExists = 3,
|
|
49
|
+
ErrBadField = 4,
|
|
50
|
+
ErrMarketInvalid = 5,
|
|
51
|
+
ErrInsufficientDeposit = 6,
|
|
52
|
+
ErrUnrecognizedOrderType = 7,
|
|
53
|
+
ErrInsufficientPositionQuantity = 8,
|
|
54
|
+
ErrOrderHashInvalid = 9,
|
|
55
|
+
ErrBadSubaccountID = 10,
|
|
56
|
+
ErrInvalidTicker = 11,
|
|
57
|
+
ErrInvalidBaseDenom = 12,
|
|
58
|
+
ErrInvalidQuoteDenom = 13,
|
|
59
|
+
ErrInvalidOracle = 14,
|
|
60
|
+
ErrInvalidExpiry = 15,
|
|
61
|
+
ErrInvalidPrice = 16,
|
|
62
|
+
ErrInvalidQuantity = 17,
|
|
63
|
+
ErrUnsupportedOracleType = 18,
|
|
64
|
+
ErrOrderDoesntExist = 19,
|
|
65
|
+
ErrOrderbookFillInvalid = 20,
|
|
66
|
+
ErrPerpetualMarketExists = 21,
|
|
67
|
+
ErrExpiryFuturesMarketExists = 22,
|
|
68
|
+
ErrExpiryFuturesMarketExpired = 23,
|
|
69
|
+
ErrNoLiquidity = 24,
|
|
70
|
+
ErrSlippageExceedsWorstPrice = 25,
|
|
71
|
+
ErrInsufficientOrderMargin = 26,
|
|
72
|
+
ErrDerivativeMarketNotFound = 27,
|
|
73
|
+
ErrPositionNotFound = 28,
|
|
74
|
+
ErrInvalidReduceOnlyPositionDirection = 29,
|
|
75
|
+
ErrPriceSurpassesBankruptcyPrice = 30,
|
|
76
|
+
ErrPositionNotLiquidable = 31,
|
|
77
|
+
ErrInvalidTriggerPrice = 32,
|
|
78
|
+
ErrInvalidOracleType = 33,
|
|
79
|
+
ErrInvalidPriceTickSize = 34,
|
|
80
|
+
ErrInvalidQuantityTickSize = 35,
|
|
81
|
+
ErrInvalidMargin = 36,
|
|
82
|
+
ErrExceedsOrderSideCount = 37,
|
|
83
|
+
ErrMarketOrderAlreadyExists = 38,
|
|
84
|
+
ErrConditionalMarketOrderAlreadyExists = 39,
|
|
85
|
+
ErrMarketLaunchProposalAlreadyExists = 40,
|
|
86
|
+
ErrInvalidMarketStatus = 41,
|
|
87
|
+
ErrSameDenoms = 42,
|
|
88
|
+
ErrSameOracles = 43,
|
|
89
|
+
ErrFeeRatesRelation = 44,
|
|
90
|
+
ErrMarginsRelation = 45,
|
|
91
|
+
ErrExceedsMaxOracleScaleFactor = 46,
|
|
92
|
+
ErrSpotExchangeNotEnabled = 47,
|
|
93
|
+
ErrDerivativesExchangeNotEnabled = 48,
|
|
94
|
+
ErrOraclePriceDeltaExceedsThreshold = 49,
|
|
95
|
+
ErrInvalidHourlyInterestRate = 50,
|
|
96
|
+
ErrInvalidHourlyFundingRateCap = 51,
|
|
97
|
+
ErrInvalidMarketFundingParamUpdate = 52,
|
|
98
|
+
ErrInvalidTradingRewardCampaign = 53,
|
|
99
|
+
ErrInvalidFeeDiscountSchedule = 54,
|
|
100
|
+
ErrInvalidLiquidationOrder = 55,
|
|
101
|
+
ErrTradingRewardCampaignDistributionError = 56,
|
|
102
|
+
ErrInvalidTradingRewardsPendingPointsUpdate = 57,
|
|
103
|
+
ErrInvalidBatchMsgUpdate = 58,
|
|
104
|
+
ErrExceedsTopOfBookPrice = 59,
|
|
105
|
+
ErrInvalidOrderTypeForMessage = 60,
|
|
106
|
+
ErrInvalidDMMSender = 61,
|
|
107
|
+
ErrAlreadyOptedOutOfRewards = 62,
|
|
108
|
+
ErrInvalidMarginRatio = 63,
|
|
109
|
+
ErrBelowMinimalContribution = 64,
|
|
110
|
+
ErrLowPositionMargin = 65,
|
|
111
|
+
ErrInvalidTotalSupply = 66,
|
|
112
|
+
ErrInvalidLpTokenBurnAmount = 67,
|
|
113
|
+
ErrUnsupportedAction = 68,
|
|
114
|
+
ErrNegativePositionQuantity = 69,
|
|
115
|
+
ErrBinaryOptionsMarketExists = 70,
|
|
116
|
+
ErrBinaryOptionsMarketNotFound = 71,
|
|
117
|
+
ErrInvalidSettlement = 72,
|
|
118
|
+
ErrAccountDoesntExist = 73,
|
|
119
|
+
ErrSenderIsNotAnAdmin = 74,
|
|
120
|
+
ErrMarketAlreadyScheduledToSettle = 75,
|
|
121
|
+
ErrGenericMarketNotFound = 76,
|
|
122
|
+
ErrInvalidDenomDecimal = 77,
|
|
123
|
+
ErrInvalidState = 78,
|
|
124
|
+
ErrTransientOrdersUpToCancelNotSupported = 79,
|
|
125
|
+
ErrInvalidTrade = 80,
|
|
126
|
+
ErrNoMarginLocked = 81,
|
|
127
|
+
ErrInvalidAccessLevel = 82,
|
|
128
|
+
ErrInvalidAddress = 83,
|
|
129
|
+
ErrInvalidArgument = 84
|
|
130
|
+
}
|
|
131
|
+
export declare type IndexerApiErrorCode = number;
|
|
132
|
+
export declare const UnspecifiedErrorCode = -1;
|
|
133
|
+
export declare type ErrorCode = StatusCodes | typeof UnspecifiedErrorCode | grpc.Code;
|
|
134
|
+
export declare type ErrorContextCode = ChainExchangeModuleErrorCode | ChainCosmosErrorCode | typeof UnspecifiedErrorCode;
|
|
135
|
+
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/types/codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,oBAAY,oBAAoB;IAE9B,WAAW,IAAI;IAEf,kBAAkB,IAAI;IAEtB,eAAe,IAAI;IAEnB,oBAAoB,IAAI;IAExB,iBAAiB,IAAI;IAErB,iBAAiB,IAAI;IAErB,gBAAgB,IAAI;IAEpB,iBAAiB,IAAI;IAErB,eAAe,KAAK;IAEpB,WAAW,KAAK;IAEhB,eAAe,KAAK;IAEpB,kBAA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