@injectivelabs/exceptions 1.16.38 → 1.17.2-alpha.0

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.
Files changed (133) hide show
  1. package/dist/cjs/index.cjs +2759 -0
  2. package/dist/cjs/index.d.cts +826 -0
  3. package/dist/cjs/package.json +2 -2
  4. package/dist/esm/index.d.ts +826 -3
  5. package/dist/esm/index.js +2712 -2
  6. package/dist/esm/package.json +2 -2
  7. package/package.json +37 -38
  8. package/dist/cjs/exceptions/base.d.ts +0 -81
  9. package/dist/cjs/exceptions/base.js +0 -179
  10. package/dist/cjs/exceptions/exceptions/BitGetException.d.ts +0 -7
  11. package/dist/cjs/exceptions/exceptions/BitGetException.js +0 -31
  12. package/dist/cjs/exceptions/exceptions/CosmosWalletException.d.ts +0 -7
  13. package/dist/cjs/exceptions/exceptions/CosmosWalletException.js +0 -16
  14. package/dist/cjs/exceptions/exceptions/GeneralException.d.ts +0 -5
  15. package/dist/cjs/exceptions/exceptions/GeneralException.js +0 -11
  16. package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.d.ts +0 -7
  17. package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.js +0 -21
  18. package/dist/cjs/exceptions/exceptions/HttpRequestException.d.ts +0 -11
  19. package/dist/cjs/exceptions/exceptions/HttpRequestException.js +0 -21
  20. package/dist/cjs/exceptions/exceptions/LedgerCosmosException.d.ts +0 -7
  21. package/dist/cjs/exceptions/exceptions/LedgerCosmosException.js +0 -40
  22. package/dist/cjs/exceptions/exceptions/LedgerException.d.ts +0 -7
  23. package/dist/cjs/exceptions/exceptions/LedgerException.js +0 -40
  24. package/dist/cjs/exceptions/exceptions/MetamaskException.d.ts +0 -7
  25. package/dist/cjs/exceptions/exceptions/MetamaskException.js +0 -31
  26. package/dist/cjs/exceptions/exceptions/OkxWalletException.d.ts +0 -7
  27. package/dist/cjs/exceptions/exceptions/OkxWalletException.js +0 -31
  28. package/dist/cjs/exceptions/exceptions/RabbyWalletException.d.ts +0 -7
  29. package/dist/cjs/exceptions/exceptions/RabbyWalletException.js +0 -33
  30. package/dist/cjs/exceptions/exceptions/RainbowWalletException.d.ts +0 -7
  31. package/dist/cjs/exceptions/exceptions/RainbowWalletException.js +0 -31
  32. package/dist/cjs/exceptions/exceptions/TransactionException.d.ts +0 -7
  33. package/dist/cjs/exceptions/exceptions/TransactionException.js +0 -34
  34. package/dist/cjs/exceptions/exceptions/TrezorException.d.ts +0 -7
  35. package/dist/cjs/exceptions/exceptions/TrezorException.js +0 -16
  36. package/dist/cjs/exceptions/exceptions/TrustWalletException.d.ts +0 -7
  37. package/dist/cjs/exceptions/exceptions/TrustWalletException.js +0 -33
  38. package/dist/cjs/exceptions/exceptions/TurnkeyWalletSessionException.d.ts +0 -5
  39. package/dist/cjs/exceptions/exceptions/TurnkeyWalletSessionException.js +0 -11
  40. package/dist/cjs/exceptions/exceptions/WalletConnectException.d.ts +0 -7
  41. package/dist/cjs/exceptions/exceptions/WalletConnectException.js +0 -31
  42. package/dist/cjs/exceptions/exceptions/WalletException.d.ts +0 -5
  43. package/dist/cjs/exceptions/exceptions/WalletException.js +0 -11
  44. package/dist/cjs/exceptions/exceptions/Web3Exception.d.ts +0 -7
  45. package/dist/cjs/exceptions/exceptions/Web3Exception.js +0 -16
  46. package/dist/cjs/exceptions/exceptions/index.d.ts +0 -18
  47. package/dist/cjs/exceptions/exceptions/index.js +0 -37
  48. package/dist/cjs/exceptions/index.d.ts +0 -2
  49. package/dist/cjs/exceptions/index.js +0 -18
  50. package/dist/cjs/exceptions/messages.d.ts +0 -13
  51. package/dist/cjs/exceptions/messages.js +0 -1600
  52. package/dist/cjs/exceptions/types/codes.d.ts +0 -441
  53. package/dist/cjs/exceptions/types/codes.js +0 -774
  54. package/dist/cjs/exceptions/types/context.d.ts +0 -93
  55. package/dist/cjs/exceptions/types/context.js +0 -21
  56. package/dist/cjs/exceptions/types/index.d.ts +0 -3
  57. package/dist/cjs/exceptions/types/index.js +0 -19
  58. package/dist/cjs/exceptions/types/modules.d.ts +0 -67
  59. package/dist/cjs/exceptions/types/modules.js +0 -66
  60. package/dist/cjs/exceptions/utils/grpc.d.ts +0 -3
  61. package/dist/cjs/exceptions/utils/grpc.js +0 -43
  62. package/dist/cjs/exceptions/utils/helpers.d.ts +0 -1
  63. package/dist/cjs/exceptions/utils/helpers.js +0 -24
  64. package/dist/cjs/exceptions/utils/maps.d.ts +0 -13
  65. package/dist/cjs/exceptions/utils/maps.js +0 -127
  66. package/dist/cjs/index.d.ts +0 -3
  67. package/dist/cjs/index.js +0 -18
  68. package/dist/cjs/types.d.ts +0 -2
  69. package/dist/cjs/types.js +0 -2
  70. package/dist/cjs/utils.d.ts +0 -8
  71. package/dist/cjs/utils.js +0 -49
  72. package/dist/esm/exceptions/base.d.ts +0 -81
  73. package/dist/esm/exceptions/base.js +0 -175
  74. package/dist/esm/exceptions/exceptions/BitGetException.d.ts +0 -7
  75. package/dist/esm/exceptions/exceptions/BitGetException.js +0 -27
  76. package/dist/esm/exceptions/exceptions/CosmosWalletException.d.ts +0 -7
  77. package/dist/esm/exceptions/exceptions/CosmosWalletException.js +0 -12
  78. package/dist/esm/exceptions/exceptions/GeneralException.d.ts +0 -5
  79. package/dist/esm/exceptions/exceptions/GeneralException.js +0 -7
  80. package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.d.ts +0 -7
  81. package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.js +0 -17
  82. package/dist/esm/exceptions/exceptions/HttpRequestException.d.ts +0 -11
  83. package/dist/esm/exceptions/exceptions/HttpRequestException.js +0 -17
  84. package/dist/esm/exceptions/exceptions/LedgerCosmosException.d.ts +0 -7
  85. package/dist/esm/exceptions/exceptions/LedgerCosmosException.js +0 -36
  86. package/dist/esm/exceptions/exceptions/LedgerException.d.ts +0 -7
  87. package/dist/esm/exceptions/exceptions/LedgerException.js +0 -36
  88. package/dist/esm/exceptions/exceptions/MetamaskException.d.ts +0 -7
  89. package/dist/esm/exceptions/exceptions/MetamaskException.js +0 -27
  90. package/dist/esm/exceptions/exceptions/OkxWalletException.d.ts +0 -7
  91. package/dist/esm/exceptions/exceptions/OkxWalletException.js +0 -27
  92. package/dist/esm/exceptions/exceptions/RabbyWalletException.d.ts +0 -7
  93. package/dist/esm/exceptions/exceptions/RabbyWalletException.js +0 -29
  94. package/dist/esm/exceptions/exceptions/RainbowWalletException.d.ts +0 -7
  95. package/dist/esm/exceptions/exceptions/RainbowWalletException.js +0 -27
  96. package/dist/esm/exceptions/exceptions/TransactionException.d.ts +0 -7
  97. package/dist/esm/exceptions/exceptions/TransactionException.js +0 -30
  98. package/dist/esm/exceptions/exceptions/TrezorException.d.ts +0 -7
  99. package/dist/esm/exceptions/exceptions/TrezorException.js +0 -12
  100. package/dist/esm/exceptions/exceptions/TrustWalletException.d.ts +0 -7
  101. package/dist/esm/exceptions/exceptions/TrustWalletException.js +0 -29
  102. package/dist/esm/exceptions/exceptions/TurnkeyWalletSessionException.d.ts +0 -5
  103. package/dist/esm/exceptions/exceptions/TurnkeyWalletSessionException.js +0 -7
  104. package/dist/esm/exceptions/exceptions/WalletConnectException.d.ts +0 -7
  105. package/dist/esm/exceptions/exceptions/WalletConnectException.js +0 -27
  106. package/dist/esm/exceptions/exceptions/WalletException.d.ts +0 -5
  107. package/dist/esm/exceptions/exceptions/WalletException.js +0 -7
  108. package/dist/esm/exceptions/exceptions/Web3Exception.d.ts +0 -7
  109. package/dist/esm/exceptions/exceptions/Web3Exception.js +0 -12
  110. package/dist/esm/exceptions/exceptions/index.d.ts +0 -18
  111. package/dist/esm/exceptions/exceptions/index.js +0 -18
  112. package/dist/esm/exceptions/index.d.ts +0 -2
  113. package/dist/esm/exceptions/index.js +0 -2
  114. package/dist/esm/exceptions/messages.d.ts +0 -13
  115. package/dist/esm/exceptions/messages.js +0 -1597
  116. package/dist/esm/exceptions/types/codes.d.ts +0 -441
  117. package/dist/esm/exceptions/types/codes.js +0 -770
  118. package/dist/esm/exceptions/types/context.d.ts +0 -93
  119. package/dist/esm/exceptions/types/context.js +0 -18
  120. package/dist/esm/exceptions/types/index.d.ts +0 -3
  121. package/dist/esm/exceptions/types/index.js +0 -3
  122. package/dist/esm/exceptions/types/modules.d.ts +0 -67
  123. package/dist/esm/exceptions/types/modules.js +0 -63
  124. package/dist/esm/exceptions/utils/grpc.d.ts +0 -3
  125. package/dist/esm/exceptions/utils/grpc.js +0 -6
  126. package/dist/esm/exceptions/utils/helpers.d.ts +0 -1
  127. package/dist/esm/exceptions/utils/helpers.js +0 -20
  128. package/dist/esm/exceptions/utils/maps.d.ts +0 -13
  129. package/dist/esm/exceptions/utils/maps.js +0 -120
  130. package/dist/esm/types.d.ts +0 -2
  131. package/dist/esm/types.js +0 -1
  132. package/dist/esm/utils.d.ts +0 -8
  133. package/dist/esm/utils.js +0 -44
@@ -1,774 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GRPC_REQUEST_FAILED = exports.UnspecifiedErrorCode = exports.ChainWasmErrorCodes = exports.ChainBankErrorCodes = exports.ChainDistributionErrorCodes = exports.ChainGovErrorCodes = exports.ChainStakingErrorCodes = exports.ChainWasmXErrorCodes = exports.ChainTokenFactoryErrorCodes = exports.ChainPeggyErrorCodes = exports.ChainOracleErrorCodes = exports.ChainOcrErrorCodes = exports.ChainInsuranceErrorCodes = exports.ChainAuthZErrorCodes = exports.ChainAuctionErrorCodes = exports.ChainExchangeModuleErrorCode = exports.ChainCosmosErrorCode = exports.TransactionChainErrorModule = exports.grpcErrorCodeToErrorCode = exports.GrpcErrorCode = void 0;
4
- exports.GrpcErrorCode = {
5
- OK: 0,
6
- Canceled: 1,
7
- Unknown: 2,
8
- InvalidArgument: 3,
9
- DeadlineExceeded: 4,
10
- NotFound: 5,
11
- AlreadyExists: 6,
12
- PermissionDenied: 7,
13
- ResourceExhausted: 8,
14
- FailedPrecondition: 9,
15
- Aborted: 10,
16
- OutOfRange: 11,
17
- Unimplemented: 12,
18
- Internal: 13,
19
- Unavailable: 14,
20
- DataLoss: 15,
21
- Unauthenticated: 16,
22
- };
23
- const grpcErrorCodeToErrorCode = (grpcErrorCode) => {
24
- return grpcErrorCode;
25
- };
26
- exports.grpcErrorCodeToErrorCode = grpcErrorCodeToErrorCode;
27
- exports.TransactionChainErrorModule = {
28
- Auction: 'auction',
29
- CosmosSdk: 'sdk',
30
- Staking: 'staking',
31
- Bank: 'bank',
32
- Distribution: 'distribution',
33
- Gov: 'gov',
34
- Exchange: 'exchange',
35
- Insurance: 'insurance',
36
- Ocr: 'ocr',
37
- Oracle: 'oracle',
38
- Peggy: 'peggy',
39
- TokenFactory: 'tokenfactory',
40
- Wasmx: 'wasmx',
41
- Wasm: 'wasm',
42
- AuthZ: 'authz',
43
- };
44
- exports.ChainCosmosErrorCode = {
45
- // ErrTxDecode is returned if we cannot parse a transaction
46
- ErrTxDecode: 2,
47
- // ErrInvalidSequence is used the sequence number (nonce) is incorrect for the signature
48
- ErrInvalidSequence: 3,
49
- // ErrUnauthorized is used whenever a request without sufficient authorization is handled.
50
- ErrUnauthorized: 4,
51
- // ErrInsufficientFunds is used when the account cannot pay requested amount.
52
- ErrInsufficientFunds: 5,
53
- // ErrUnknownRequest to doc
54
- ErrUnknownRequest: 6,
55
- // ErrInvalidAddress to doc
56
- ErrInvalidAddress: 7,
57
- // ErrInvalidPubKey to doc
58
- ErrInvalidPubKey: 8,
59
- // ErrUnknownAddress to doc
60
- ErrUnknownAddress: 9,
61
- // ErrInvalidCoins to doc
62
- ErrInvalidCoins: 10,
63
- // ErrOutOfGas to doc
64
- ErrOutOfGas: 11,
65
- // ErrMemoTooLarge to doc
66
- ErrMemoTooLarge: 12,
67
- // ErrInsufficientFee to doc
68
- ErrInsufficientFee: 13,
69
- // ErrTooManySignatures to doc
70
- ErrTooManySignatures: 14,
71
- // ErrNoSignatures to doc
72
- ErrNoSignatures: 15,
73
- // ErrJSONMarshal defines an ABCI typed JSON marshalling error
74
- ErrJSONMarshal: 16,
75
- // ErrJSONUnmarshal defines an ABCI typed JSON unmarshalling error
76
- ErrJSONUnmarshal: 17,
77
- // ErrInvalidRequest defines an ABCI typed error where the request contains invalid data.
78
- ErrInvalidRequest: 18,
79
- // ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool.
80
- ErrTxInMempoolCache: 19,
81
- // ErrMempoolIsFull defines an ABCI typed error where the mempool is full.
82
- ErrMempoolIsFull: 20,
83
- // ErrTxTooLarge defines an ABCI typed error where tx is too large.
84
- ErrTxTooLarge: 21,
85
- // ErrKeyNotFound defines an error when the key doesn't exist
86
- ErrKeyNotFound: 22,
87
- // ErrWrongPassword defines an error when the key password is invalid.
88
- ErrWrongPassword: 23,
89
- // ErrorInvalidSigner defines an error when the tx intended signer does not match the given signer.
90
- ErrorInvalidSigner: 24,
91
- // ErrorInvalidGasAdjustment defines an error for an invalid gas adjustment
92
- ErrorInvalidGasAdjustment: 25,
93
- // ErrInvalidHeight defines an error for an invalid height
94
- ErrInvalidHeight: 26,
95
- // ErrInvalidVersion defines a general error for an invalid version
96
- ErrInvalidVersion: 27,
97
- // ErrInvalidChainID defines an error for an invalid chain ID
98
- ErrInvalidChainID: 28,
99
- // ErrInvalidType defines an error an invalid type.
100
- ErrInvalidType: 29,
101
- // ErrTxTimeoutHeight defines an error for when a tx is rejected out due to an explicitly set timeout height.
102
- ErrTxTimeoutHeight: 30,
103
- // ErrUnknownExtensionOptions defines an error for unknown extension options.
104
- ErrUnknownExtensionOptions: 31,
105
- // ErrWrongSequence defines an error where the account sequence defined in the signer info doesn't match the account's actual sequence number.
106
- ErrWrongSequence: 32,
107
- // ErrPackAny defines an error when packing a protobuf message to Any fails.
108
- ErrPackAny: 33,
109
- // ErrUnpackAny defines an error when unpacking a protobuf message from Any fails.
110
- ErrUnpackAny: 34,
111
- // ErrLogic defines an internal logic error, e.g. an invariant or assertion that is violated. It is a programmer error, not a user-facing error.
112
- ErrLogic: 35,
113
- // ErrConflict defines a conflict error, e.g. when two goroutines try to access the same resource and one of them fails.
114
- ErrConflict: 36,
115
- // ErrNotSupported is returned when we call a branch of a code which is currently not supported.
116
- ErrNotSupported: 37,
117
- // ErrNotFound defines an error when requested entity doesn't exist in the state.
118
- ErrNotFound: 38,
119
- // ErrIO should be used to wrap internal errors caused by external operation. Examples: not DB domain error, file writing etc...
120
- ErrIO: 39,
121
- // ErrAppConfig defines an error occurred if min-gas-prices field in BaseConfig is empty.
122
- ErrAppConfig: 40,
123
- // ErrInvalidGasLimit defines an error when an invalid GasWanted value is supplied.
124
- ErrInvalidGasLimit: 41,
125
- };
126
- exports.ChainExchangeModuleErrorCode = {
127
- // failed to validate order
128
- ErrOrderInvalid: 1,
129
- // spot market not found
130
- ErrSpotMarketNotFound: 2,
131
- // spot market exists
132
- ErrSpotMarketExists: 3,
133
- // struct field error
134
- ErrBadField: 4,
135
- // failed to validate market
136
- ErrMarketInvalid: 5,
137
- // subaccount has insufficient deposits
138
- ErrInsufficientDeposit: 6,
139
- // unrecognized order type
140
- ErrUnrecognizedOrderType: 7,
141
- // position quantity insufficient for order
142
- ErrInsufficientPositionQuantity: 8,
143
- // order hash is not valid
144
- ErrOrderHashInvalid: 9,
145
- // subaccount id is not valid
146
- ErrBadSubaccountID: 10,
147
- // invalid ticker
148
- ErrInvalidTicker: 11,
149
- // invalid base denom
150
- ErrInvalidBaseDenom: 12,
151
- // invalid quote denom
152
- ErrInvalidQuoteDenom: 13,
153
- // invalid oracle
154
- ErrInvalidOracle: 14,
155
- // invalid expiry
156
- ErrInvalidExpiry: 15,
157
- // invalid price
158
- ErrInvalidPrice: 16,
159
- // invalid quantity
160
- ErrInvalidQuantity: 17,
161
- // unsupported oracle type
162
- ErrUnsupportedOracleType: 18,
163
- // order doesnt exist
164
- ErrOrderDoesntExist: 19,
165
- // spot limit orderbook fill invalid
166
- ErrOrderbookFillInvalid: 20,
167
- // perpetual market exists
168
- ErrPerpetualMarketExists: 21,
169
- // expiry futures market exists
170
- ErrExpiryFuturesMarketExists: 22,
171
- // expiry futures market expired
172
- ErrExpiryFuturesMarketExpired: 23,
173
- // no liquidity on the orderbook!
174
- ErrNoLiquidity: 24,
175
- // Orderbook liquidity cannot satisfy current worst price
176
- ErrSlippageExceedsWorstPrice: 25,
177
- // Order has insufficient margin
178
- ErrInsufficientOrderMargin: 26,
179
- // Derivative market not found
180
- ErrDerivativeMarketNotFound: 27,
181
- // Position not found
182
- ErrPositionNotFound: 28,
183
- // Position direction does not oppose the reduce-only order
184
- ErrInvalidReduceOnlyPositionDirection: 29,
185
- // Price Surpasses Bankruptcy Price
186
- ErrPriceSurpassesBankruptcyPrice: 30,
187
- // Position not liquidable
188
- ErrPositionNotLiquidable: 31,
189
- // invalid trigger price
190
- ErrInvalidTriggerPrice: 32,
191
- // invalid oracle type
192
- ErrInvalidOracleType: 33,
193
- // invalid minimum price tick size
194
- ErrInvalidPriceTickSize: 34,
195
- // invalid minimum quantity tick size
196
- ErrInvalidQuantityTickSize: 35,
197
- // invalid minimum order margin
198
- ErrInvalidMargin: 36,
199
- // Exceeds order side count
200
- ErrExceedsOrderSideCount: 37,
201
- // Subaccount cannot place a market order when a market order in the same market was already placed in same block
202
- ErrMarketOrderAlreadyExists: 38,
203
- // cannot place a conditional market order when a conditional market order in same relative direction already exists
204
- ErrConditionalMarketOrderAlreadyExists: 39,
205
- // An equivalent market launch proposal already exists.
206
- ErrMarketLaunchProposalAlreadyExists: 40,
207
- // Invalid Market Status
208
- ErrInvalidMarketStatus: 41,
209
- // base denom cannot be same with quote denom
210
- ErrSameDenoms: 42,
211
- // oracle base cannot be same with oracle quote
212
- ErrSameOracles: 43,
213
- // MakerFeeRate does not match TakerFeeRate requirements
214
- ErrFeeRatesRelation: 44,
215
- // MaintenanceMarginRatio cannot be greater than InitialMarginRatio
216
- ErrMarginsRelation: 45,
217
- // OracleScaleFactor cannot be greater than MaxOracleScaleFactor
218
- ErrExceedsMaxOracleScaleFactor: 46,
219
- // Spot exchange is not enabled yet
220
- ErrSpotExchangeNotEnabled: 47,
221
- // Derivatives exchange is not enabled yet
222
- ErrDerivativesExchangeNotEnabled: 48,
223
- // Oracle price delta exceeds threshold
224
- ErrOraclePriceDeltaExceedsThreshold: 49,
225
- // Invalid hourly interest rate
226
- ErrInvalidHourlyInterestRate: 50,
227
- // Invalid hourly funding rate cap
228
- ErrInvalidHourlyFundingRateCap: 51,
229
- // Only perpetual markets can update funding parameters
230
- ErrInvalidMarketFundingParamUpdate: 52,
231
- // Invalid trading reward campaign
232
- ErrInvalidTradingRewardCampaign: 53,
233
- // Invalid fee discount schedule
234
- ErrInvalidFeeDiscountSchedule: 54,
235
- // invalid liquidation order
236
- ErrInvalidLiquidationOrder: 55,
237
- // Unknown error happened for campaign distributions
238
- ErrTradingRewardCampaignDistributionError: 56,
239
- // Invalid trading reward points update
240
- ErrInvalidTradingRewardsPendingPointsUpdate: 57,
241
- // Invalid batch msg update
242
- ErrInvalidBatchMsgUpdate: 58,
243
- // Post-only order exceeds top of book price
244
- ErrExceedsTopOfBookPrice: 59,
245
- // Order type not supported for given message
246
- ErrInvalidOrderTypeForMessage: 60,
247
- // Sender must match dmm account
248
- ErrInvalidDMMSender: 61,
249
- // already opted out of rewards
250
- ErrAlreadyOptedOutOfRewards: 62,
251
- // Invalid margin ratio
252
- ErrInvalidMarginRatio: 63,
253
- // Provided funds are below minimum
254
- ErrBelowMinimalContribution: 64,
255
- // Position is below initial margin requirement
256
- ErrLowPositionMargin: 65,
257
- // Pool has non-positive total lp token supply
258
- ErrInvalidTotalSupply: 66,
259
- // Passed lp token burn amount is greater than total lp token supply
260
- ErrInvalidLpTokenBurnAmount: 67,
261
- // unsupported action
262
- ErrUnsupportedAction: 68,
263
- // position quantity cannot be negative
264
- ErrNegativePositionQuantity: 69,
265
- // binary options market exists
266
- ErrBinaryOptionsMarketExists: 70,
267
- // binary options market not found
268
- ErrBinaryOptionsMarketNotFound: 71,
269
- // invalid settlement
270
- ErrInvalidSettlement: 72,
271
- // account doesnt exist
272
- ErrAccountDoesntExist: 73,
273
- // sender should be a market admin
274
- ErrSenderIsNotAnAdmin: 74,
275
- // market is already scheduled to settle
276
- ErrMarketAlreadyScheduledToSettle: 75,
277
- // market not found
278
- ErrGenericMarketNotFound: 76,
279
- // denom decimal cannot be below 1 or above max scale factor
280
- ErrInvalidDenomDecimal: 77,
281
- // state is invalid
282
- ErrInvalidState: 78,
283
- // transient orders up to cancellation not supported
284
- ErrTransientOrdersUpToCancelNotSupported: 79,
285
- // invalid trade
286
- ErrInvalidTrade: 80,
287
- // no margin locked in subaccount
288
- ErrNoMarginLocked: 81,
289
- // Invalid access level to perform action
290
- ErrInvalidAccessLevel: 82,
291
- // Invalid address
292
- ErrInvalidAddress: 83,
293
- // Invalid argument
294
- ErrInvalidArgument: 84,
295
- // Invalid funds direction
296
- ErrInvalidFundsDirection: 85,
297
- // No funds provided
298
- ErrNoFundsProvided: 86,
299
- // Invalid signature
300
- ErrInvalidSignature: 87,
301
- // no funds to unlock
302
- ErrNoFundsToUnlock: 88,
303
- // No msgs provided
304
- ErrNoMsgsProvided: 89,
305
- // No msg provided
306
- ErrNoMsgProvided: 90,
307
- // Invalid amount
308
- ErrInvalidAmount: 91,
309
- // The current feature has been disabled
310
- ErrFeatureDisabled: 92,
311
- // Order has too much margin
312
- ErrTooMuchOrderMargin: 93,
313
- // Order has too much margin
314
- ErrBadSubaccountNonce: 94,
315
- ErrInsufficientFunds: 95,
316
- // Exchange is in post-only mode
317
- ErrPostOnlyMode: 96,
318
- // client order id already exists
319
- ErrClientOrderIdAlreadyExists: 97,
320
- // client order id is invalid. Max length is 36 chars
321
- ErrInvalidCid: 98,
322
- };
323
- exports.ChainAuctionErrorCodes = {
324
- // invalid bid denom
325
- ErrBidInvalid: 1,
326
- // invalid bid round
327
- ErrBidRound: 2,
328
- };
329
- exports.ChainAuthZErrorCodes = {
330
- // ErrNoAuthorizationFound error if there is no authorization found given a grant key
331
- ErrNoAuthorizationFound: 2,
332
- // ErrInvalidExpirationTime error if the set expiration time is in the past
333
- ErrInvalidExpirationTime: 3,
334
- // ErrUnknownAuthorizationType error for unknown authorization type
335
- ErrUnknownAuthorizationType: 4,
336
- // ErrNoGrantKeyFound error if the requested grant key does not exist
337
- ErrNoGrantKeyFound: 5,
338
- // ErrAuthorizationExpired error if the authorization has expired
339
- ErrAuthorizationExpired: 6,
340
- // ErrGranteeIsGranter error if the grantee and the granter are the same
341
- ErrGranteeIsGranter: 7,
342
- // ErrAuthorizationNumOfSigners error if an authorization message does not have only one signer
343
- ErrAuthorizationNumOfSigners: 9,
344
- // ErrNegativeMaxTokens error if the max tokens is negative
345
- ErrNegativeMaxTokens: 12,
346
- };
347
- exports.ChainInsuranceErrorCodes = {
348
- // insurance fund already exists
349
- ErrInsuranceFundAlreadyExists: 1,
350
- // insurance fund not found
351
- ErrInsuranceFundNotFound: 2,
352
- // redemption already exists
353
- ErrRedemptionAlreadyExists: 3,
354
- // invalid deposit amount
355
- ErrInvalidDepositAmount: 4,
356
- // invalid deposit denom
357
- ErrInvalidDepositDenom: 5,
358
- // insurance payout exceeds deposits
359
- ErrPayoutTooLarge: 6,
360
- // invalid ticker
361
- ErrInvalidTicker: 7,
362
- // invalid quote denom
363
- ErrInvalidQuoteDenom: 8,
364
- // invalid oracle
365
- ErrInvalidOracle: 9,
366
- // invalid expiration time
367
- ErrInvalidExpirationTime: 10,
368
- // invalid marketID
369
- ErrInvalidMarketID: 11,
370
- // invalid share denom
371
- ErrInvalidShareDenom: 12,
372
- };
373
- exports.ChainOcrErrorCodes = {
374
- // stale report
375
- ErrStaleReport: 1,
376
- // incomplete proposal
377
- ErrIncompleteProposal: 2,
378
- // repeated oracle address
379
- ErrRepeatedAddress: 3,
380
- // too many signers
381
- ErrTooManySigners: 4,
382
- // incorrect config
383
- ErrIncorrectConfig: 5,
384
- // config digest doesn't match
385
- ErrConfigDigestNotMatch: 6,
386
- // wrong number of signatures
387
- ErrWrongNumberOfSignatures: 7,
388
- // incorrect signature
389
- ErrIncorrectSignature: 8,
390
- // no transmitter specified
391
- ErrNoTransmitter: 9,
392
- // incorrect transmission data
393
- ErrIncorrectTransmissionData: 10,
394
- // no transmissions found
395
- ErrNoTransmissionsFound: 11,
396
- // median value is out of bounds
397
- ErrMedianValueOutOfBounds: 12,
398
- // LINK denom doesn't match
399
- ErrIncorrectRewardPoolDenom: 13,
400
- // Reward Pool doesn't exist
401
- ErrNoRewardPool: 14,
402
- // wrong number of payees and transmitters
403
- ErrInvalidPayees: 15,
404
- // action is restricted to the module admin
405
- ErrModuleAdminRestricted: 16,
406
- // feed already exists
407
- ErrFeedAlreadyExists: 17,
408
- // feed doesnt exists
409
- ErrFeedDoesntExists: 19,
410
- // action is admin-restricted
411
- ErrAdminRestricted: 20,
412
- // insufficient reward pool
413
- ErrInsufficientRewardPool: 21,
414
- // payee already set
415
- ErrPayeeAlreadySet: 22,
416
- // action is payee-restricted
417
- ErrPayeeRestricted: 23,
418
- // feed config not found
419
- ErrFeedConfigNotFound: 24,
420
- };
421
- exports.ChainOracleErrorCodes = {
422
- // relayer address is empty
423
- ErrEmptyRelayerAddr: 1,
424
- // bad rates count
425
- ErrBadRatesCount: 2,
426
- // bad resolve times
427
- ErrBadResolveTimesCount: 3,
428
- // bad request ID
429
- ErrBadRequestIDsCount: 4,
430
- // relayer not authorized
431
- ErrRelayerNotAuthorized: 5,
432
- // bad price feed base count
433
- ErrBadPriceFeedBaseCount: 6,
434
- // bad price feed quote count
435
- ErrBadPriceFeedQuoteCount: 7,
436
- // unsupported oracle type
437
- ErrUnsupportedOracleType: 8,
438
- // bad messages count
439
- ErrBadMessagesCount: 9,
440
- // bad Coinbase message
441
- ErrBadCoinbaseMessage: 10,
442
- // bad Ethereum signature
443
- ErrInvalidEthereumSignature: 11,
444
- // bad Coinbase message timestamp
445
- ErrBadCoinbaseMessageTimestamp: 12,
446
- // Coinbase price not found
447
- ErrCoinbasePriceNotFound: 13,
448
- // Prices must be positive
449
- ErrBadPrice: 14,
450
- // Prices must be less than 10 million.
451
- ErrPriceTooLarge: 15,
452
- // Invalid Band IBC Request
453
- ErrInvalidBandIBCRequest: 16,
454
- // sample error
455
- ErrSample: 17,
456
- // invalid packet timeout
457
- ErrInvalidPacketTimeout: 18,
458
- // invalid symbols count
459
- ErrBadSymbolsCount: 19,
460
- // could not claim port capability
461
- ErrBadIBCPortBind: 20,
462
- // invalid IBC Port ID
463
- ErrInvalidPortID: 21,
464
- // invalid IBC Channel ID
465
- ErrInvalidChannelID: 22,
466
- // invalid Band IBC request interval
467
- ErrBadRequestInterval: 23,
468
- // Invalid Band IBC Update Request Proposal
469
- ErrInvalidBandIBCUpdateRequest: 24,
470
- // Band IBC Oracle Request not found
471
- ErrBandIBCRequestNotFound: 25,
472
- // Base Info is empty
473
- ErrEmptyBaseInfo: 26,
474
- // provider is empty
475
- ErrEmptyProvider: 27,
476
- // invalid provider name
477
- ErrInvalidProvider: 28,
478
- // invalid symbol
479
- ErrInvalidSymbol: 29,
480
- // relayer already exists
481
- ErrRelayerAlreadyExists: 30,
482
- // provider price not found
483
- ErrProviderPriceNotFound: 31,
484
- // invalid oracle request
485
- ErrInvalidOracleRequest: 32,
486
- // no price for oracle was found
487
- ErrOraclePriceNotFound: 33,
488
- };
489
- exports.ChainPeggyErrorCodes = {
490
- // internal
491
- ErrInternal: 1,
492
- // duplicate
493
- ErrDuplicate: 2,
494
- // invalid
495
- ErrInvalid: 3,
496
- // timeout
497
- ErrTimeout: 4,
498
- // unknown
499
- ErrUnknown: 5,
500
- // empty
501
- ErrEmpty: 6,
502
- // outdated
503
- ErrOutdated: 7,
504
- // unsupported
505
- ErrUnsupported: 8,
506
- // non contiguous event nonce
507
- ErrNonContiguousEventNonce: 9,
508
- // no unbatched txs found
509
- ErrNoUnbatchedTxsFound: 10,
510
- // can not set orchestrator addresses more than once
511
- ErrResetDelegateKeys: 11,
512
- // supply cannot exceed max ERC20 value
513
- ErrSupplyOverflow: 12,
514
- // invalid ethereum sender on claim
515
- ErrInvalidEthSender: 13,
516
- // invalid ethereum destination
517
- ErrInvalidEthDestination: 14,
518
- };
519
- exports.ChainTokenFactoryErrorCodes = {
520
- // attempting to create a denom that already exists (has bank metadata)
521
- ErrDenomExists: 2,
522
- // unauthorized account
523
- ErrUnauthorized: 3,
524
- // invalid denom
525
- ErrInvalidDenom: 4,
526
- // invalid creator
527
- ErrInvalidCreator: 5,
528
- // invalid authority metadata
529
- ErrInvalidAuthorityMetadata: 6,
530
- // invalid genesis
531
- ErrInvalidGenesis: 7,
532
- // subdenom too long, max length is %d bytes
533
- ErrSubdenomTooLong: 8,
534
- // subdenom too short, min length is %d bytes
535
- ErrSubdenomTooShort: 9,
536
- // nested subdenom too short, each one should have at least %d bytes
537
- ErrSubdenomNestedTooShort: 10,
538
- // creator too long, max length is %d bytes
539
- ErrCreatorTooLong: 11,
540
- // denom does not exist
541
- ErrDenomDoesNotExist: 12,
542
- // amount has to be positive
543
- ErrAmountNotPositive: 13,
544
- };
545
- exports.ChainWasmXErrorCodes = {
546
- // invalid gas limit
547
- ErrInvalidGasLimit: 1,
548
- // invalid gas price
549
- ErrInvalidGasPrice: 2,
550
- // invalid contract address
551
- ErrInvalidContractAddress: 3,
552
- // contract already registered
553
- ErrAlreadyRegistered: 4,
554
- // duplicate contract
555
- ErrDuplicateContract: 5,
556
- // no contract addresses found
557
- ErrNoContractAddresses: 6,
558
- // invalid code id
559
- ErrInvalidCodeId: 7,
560
- };
561
- exports.ChainStakingErrorCodes = {
562
- // "empty validator address"
563
- ErrEmptyValidatorAddr: 2,
564
- // "validator does not exist"
565
- ErrNoValidatorFound: 3,
566
- // "validator already exist for this operator address; must use new validator operator address"
567
- ErrValidatorOwnerExists: 4,
568
- // "validator already exist for this pubkey; must use new validator pubkey"
569
- ErrValidatorPubKeyExists: 5,
570
- // "validator pubkey type is not supported"
571
- ErrValidatorPubKeyTypeNotSupported: 6,
572
- // "validator for this address is currently jailed"
573
- ErrValidatorJailed: 7,
574
- // "failed to remove validator"
575
- ErrBadRemoveValidator: 8,
576
- // "commission must be positive"
577
- ErrCommissionNegative: 9,
578
- // "commission cannot be more than 100%"
579
- ErrCommissionHuge: 10,
580
- // "commission cannot be more than the max rate"
581
- ErrCommissionGTMaxRate: 11,
582
- // "commission cannot be changed more than once in 24h"
583
- ErrCommissionUpdateTime: 12,
584
- // "commission change rate must be positive"
585
- ErrCommissionChangeRateNegative: 13,
586
- // "commission change rate cannot be more than the max rate"
587
- ErrCommissionChangeRateGTMaxRate: 14,
588
- // "commission cannot be changed more than max change rate"
589
- ErrCommissionGTMaxChangeRate: 15,
590
- // "validator's self delegation must be greater than their minimum self delegation"
591
- ErrSelfDelegationBelowMinimum: 16,
592
- // "minimum self delegation cannot be decrease"
593
- ErrMinSelfDelegationDecreased: 17,
594
- // "empty delegator address"
595
- ErrEmptyDelegatorAddr: 18,
596
- // "no delegation for (address, validator) tuple"
597
- ErrNoDelegation: 19,
598
- // "delegator does not exist with address"
599
- ErrBadDelegatorAddr: 20,
600
- // "delegator does not contain delegation"
601
- ErrNoDelegatorForAddress: 21,
602
- // "insufficient delegation shares"
603
- ErrInsufficientShares: 22,
604
- // "cannot delegate to an empty validator"
605
- ErrDelegationValidatorEmpty: 23,
606
- // "not enough delegation shares"
607
- ErrNotEnoughDelegationShares: 24,
608
- // "entry not mature"
609
- ErrNotMature: 25,
610
- // "no unbonding delegation found"
611
- ErrNoUnbondingDelegation: 26,
612
- // "too many unbonding delegation entries for (delegator, validator) tuple"
613
- ErrMaxUnbondingDelegationEntries: 27,
614
- // "no redelegation found"
615
- ErrNoRedelegation: 28,
616
- // "cannot redelegate to the same validator"
617
- ErrSelfRedelegation: 29,
618
- // "too few tokens to redelegate (truncates to zero tokens)"
619
- ErrTinyRedelegationAmount: 30,
620
- // "redelegation destination validator not found"
621
- ErrBadRedelegationDst: 31,
622
- // "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation"
623
- ErrTransitiveRedelegation: 32,
624
- // "too many redelegation entries for (delegator, src-validator, dst-validator) tuple"
625
- ErrMaxRedelegationEntries: 33,
626
- // "cannot delegate to validators with invalid (zero) ex-rate"
627
- ErrDelegatorShareExRateInvalid: 34,
628
- // "both shares amount and shares percent provided"
629
- ErrBothShareMsgsGiven: 35,
630
- // "neither shares amount nor shares percent provided"
631
- ErrNeitherShareMsgsGiven: 36,
632
- // "invalid historical info"
633
- ErrInvalidHistoricalInfo: 37,
634
- // "no historical info found"
635
- ErrNoHistoricalInfo: 38,
636
- // "empty validator public key"
637
- ErrEmptyValidatorPubKey: 39,
638
- // "commission cannot be less than min rate"
639
- ErrCommissionLTMinRate: 40,
640
- // "unbonding operation not found"
641
- ErrUnbondingNotFound: 41,
642
- // "cannot un-hold unbonding operation that is not on hold"
643
- ErrUnbondingOnHoldRefCountNegative: 42,
644
- };
645
- exports.ChainGovErrorCodes = {
646
- // "unknown proposal"
647
- ErrUnknownProposal: 2,
648
- // "inactive proposal"
649
- ErrInactiveProposal: 3,
650
- // "proposal already active)
651
- ErrAlreadyActiveProposal: 4,
652
- // "invalid proposal content"
653
- ErrInvalidProposalContent: 5,
654
- // "invalid proposal type"
655
- ErrInvalidProposalType: 6,
656
- // "invalid vote option"
657
- ErrInvalidVote: 7,
658
- // "invalid genesis state"
659
- ErrInvalidGenesis: 8,
660
- // "no handler exists for proosal type")
661
- ErrNoProposalHandlerExists: 9,
662
- // "proposal message not recognized by router")
663
- ErrUnroutableProposalMsg: 10,
664
- // "no messages proposed"
665
- ErrNoProposalMsgs: 11,
666
- // "invalid proposal message"
667
- ErrInvalidProposalMsg: 12,
668
- // "expected gov account as ony signer for proposal message")
669
- ErrInvalidSigner: 13,
670
- // "signal message is invalid"
671
- ErrInvalidSignalMsg: 14,
672
- // "metadata too long"
673
- ErrMetadataTooLong: 15,
674
- // "minimum deposit is too smal")
675
- ErrMinDepositTooSmall: 16,
676
- // "proposal is not found"
677
- ErrProposalNotFound: 17,
678
- // "invalid proposer"
679
- ErrInvalidProposer: 18,
680
- // "no deposits found"
681
- ErrNoDeposits: 19,
682
- // "voting period already ende")
683
- ErrVotingPeriodEnded: 20,
684
- // "invalid proposal"
685
- ErrInvalidProposal: 21,
686
- };
687
- exports.ChainDistributionErrorCodes = {
688
- // "delegator address is empty"
689
- ErrEmptyDelegatorAddr: 2,
690
- // "withdraw address is empty"
691
- ErrEmptyWithdrawAddr: 3,
692
- // "validator address is empty"
693
- ErrEmptyValidatorAddr: 4,
694
- // "no delegation distribution info"
695
- ErrEmptyDelegationDistInfo: 5,
696
- // "no validator distribution info"
697
- ErrNoValidatorDistInfo: 6,
698
- // "no validator commission to withdraw"
699
- ErrNoValidatorCommission: 7,
700
- // "set withdraw address disabled"
701
- ErrSetWithdrawAddrDisabled: 8,
702
- // "community pool does not have sufficient coins to distribute"
703
- ErrBadDistribution: 9,
704
- // "invalid community pool spend proposal amount"
705
- ErrInvalidProposalAmount: 10,
706
- // "invalid community pool spend proposal recipient"
707
- ErrEmptyProposalRecipient: 11,
708
- // "validator does not exist"
709
- ErrNoValidatorExists: 12,
710
- // "delegation does not exist"
711
- ErrNoDelegationExists: 13,
712
- };
713
- exports.ChainBankErrorCodes = {
714
- // "no inputs to send transaction"
715
- ErrNoInputs: 2,
716
- // "no outputs to send transaction"
717
- ErrNoOutputs: 3,
718
- // "sum inputs != sum outputs"
719
- ErrInputOutputMismatch: 4,
720
- // "send transactions are disabled"
721
- ErrSendDisabled: 5,
722
- // "client denom metadata not found"
723
- ErrDenomMetadataNotFound: 6,
724
- // "invalid key"
725
- ErrInvalidKey: 7,
726
- // "duplicate entry"
727
- ErrDuplicateEntry: 8,
728
- // "multiple senders not allowed"
729
- ErrMultipleSenders: 9,
730
- };
731
- exports.ChainWasmErrorCodes = {
732
- // ErrCreateFailed error for wasm code that has already been uploaded or failed
733
- ErrCreateFailed: 2,
734
- // ErrAccountExists error for a contract account that already exists
735
- ErrAccountExists: 3,
736
- // ErrInstantiateFailed error for rust instantiate contract failure
737
- ErrInstantiateFailed: 4,
738
- // ErrExecuteFailed error for rust execution contract failure
739
- ErrExecuteFailed: 5,
740
- // ErrGasLimit error for out of gas
741
- ErrGasLimit: 6,
742
- // ErrInvalidGenesis error for invalid genesis file syntax
743
- ErrInvalidGenesis: 7,
744
- // ErrNotFound error for an entry not found in the store
745
- ErrNotFound: 8,
746
- // ErrQueryFailed error for rust smart query contract failure
747
- ErrQueryFailed: 9,
748
- // ErrInvalidMsg error when we cannot process the error returned from the contract
749
- ErrInvalidMsg: 10,
750
- // ErrMigrationFailed error for rust execution contract failure
751
- ErrMigrationFailed: 11,
752
- // ErrEmpty error for empty content
753
- ErrEmpty: 12,
754
- // ErrLimit error for content that exceeds a limit
755
- ErrLimit: 13,
756
- // ErrInvalid error for content that is invalid in this context
757
- ErrInvalid: 14,
758
- // ErrDuplicate error for content that exists
759
- ErrDuplicate: 15,
760
- // ErrMaxIBCChannels error for maximum number of ibc channels reached
761
- ErrMaxIBCChannels: 16,
762
- // ErrUnsupportedForContract error when a capability is used that is not supported for/ by this contract
763
- ErrUnsupportedForContract: 17,
764
- // ErrPinContractFailed error for pinning contract failures
765
- ErrPinContractFailed: 18,
766
- // ErrUnpinContractFailed error for unpinning contract failures
767
- ErrUnpinContractFailed: 19,
768
- // ErrUnknownMsg error by a message handler to show that it is not responsible for this message type
769
- ErrUnknownMsg: 20,
770
- // ErrInvalidEvent error if an attribute/event from the contract is invalid
771
- ErrInvalidEvent: 21,
772
- };
773
- exports.UnspecifiedErrorCode = -1;
774
- exports.GRPC_REQUEST_FAILED = exports.GrpcErrorCode.Unavailable;