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