@injectivelabs/sdk-ts 1.0.343 → 1.0.344

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 (226) hide show
  1. package/dist/client/chain/grpc/ChainGrpcAuctionApi.js +57 -42
  2. package/dist/client/chain/grpc/ChainGrpcAuctionApi.js.map +1 -1
  3. package/dist/client/chain/grpc/ChainGrpcAuthApi.js +53 -38
  4. package/dist/client/chain/grpc/ChainGrpcAuthApi.js.map +1 -1
  5. package/dist/client/chain/grpc/ChainGrpcBankApi.js +80 -63
  6. package/dist/client/chain/grpc/ChainGrpcBankApi.js.map +1 -1
  7. package/dist/client/chain/grpc/ChainGrpcDistributionApi.js +87 -68
  8. package/dist/client/chain/grpc/ChainGrpcDistributionApi.js.map +1 -1
  9. package/dist/client/chain/grpc/ChainGrpcExchangeApi.js +169 -142
  10. package/dist/client/chain/grpc/ChainGrpcExchangeApi.js.map +1 -1
  11. package/dist/client/chain/grpc/ChainGrpcGovApi.js +131 -110
  12. package/dist/client/chain/grpc/ChainGrpcGovApi.js.map +1 -1
  13. package/dist/client/chain/grpc/ChainGrpcIbcApi.js +42 -29
  14. package/dist/client/chain/grpc/ChainGrpcIbcApi.js.map +1 -1
  15. package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.js +94 -75
  16. package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.js.map +1 -1
  17. package/dist/client/chain/grpc/ChainGrpcMintApi.js +61 -46
  18. package/dist/client/chain/grpc/ChainGrpcMintApi.js.map +1 -1
  19. package/dist/client/chain/grpc/ChainGrpcOracleApi.js +25 -14
  20. package/dist/client/chain/grpc/ChainGrpcOracleApi.js.map +1 -1
  21. package/dist/client/chain/grpc/ChainGrpcPeggyApi.js +25 -14
  22. package/dist/client/chain/grpc/ChainGrpcPeggyApi.js.map +1 -1
  23. package/dist/client/chain/grpc/ChainGrpcStakingApi.js +379 -336
  24. package/dist/client/chain/grpc/ChainGrpcStakingApi.js.map +1 -1
  25. package/dist/client/chain/grpc/ChainGrpcWasmApi.js +174 -149
  26. package/dist/client/chain/grpc/ChainGrpcWasmApi.js.map +1 -1
  27. package/dist/client/chain/grpc/ChainGrpcWasmXApi.js +41 -28
  28. package/dist/client/chain/grpc/ChainGrpcWasmXApi.js.map +1 -1
  29. package/dist/client/chain/rest/ChainRestAuthApi.js +43 -30
  30. package/dist/client/chain/rest/ChainRestAuthApi.js.map +1 -1
  31. package/dist/client/chain/rest/ChainRestBankApi.js +48 -35
  32. package/dist/client/chain/rest/ChainRestBankApi.js.map +1 -1
  33. package/dist/client/chain/rest/ChainRestTendermintApi.js +42 -29
  34. package/dist/client/chain/rest/ChainRestTendermintApi.js.map +1 -1
  35. package/dist/client/chain/transformers/ChainGrpcAuctionTransformer.js +2 -2
  36. package/dist/client/chain/transformers/ChainGrpcAuctionTransformer.js.map +1 -1
  37. package/dist/client/chain/transformers/ChainGrpcGovTransformer.js +8 -10
  38. package/dist/client/chain/transformers/ChainGrpcGovTransformer.js.map +1 -1
  39. package/dist/client/chain/transformers/ChainGrpcInsuranceFundTransformer.js +5 -4
  40. package/dist/client/chain/transformers/ChainGrpcInsuranceFundTransformer.js.map +1 -1
  41. package/dist/client/chain/transformers/ChainGrpcStakingTransformer.js +1 -1
  42. package/dist/client/chain/transformers/ChainGrpcStakingTransformer.js.map +1 -1
  43. package/dist/client/chain/types/index.js +1 -1
  44. package/dist/client/chain/types/index.js.map +1 -1
  45. package/dist/client/gql/client.js +38 -25
  46. package/dist/client/gql/client.js.map +1 -1
  47. package/dist/client/indexer/grpc/IndexerGrpcAccountApi.js +182 -157
  48. package/dist/client/indexer/grpc/IndexerGrpcAccountApi.js.map +1 -1
  49. package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.js +45 -32
  50. package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.js.map +1 -1
  51. package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.js +472 -435
  52. package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.js.map +1 -1
  53. package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.js +265 -236
  54. package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.js.map +1 -1
  55. package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.js +48 -35
  56. package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.js.map +1 -1
  57. package/dist/client/indexer/grpc/IndexerGrpcMetaApi.js +57 -42
  58. package/dist/client/indexer/grpc/IndexerGrpcMetaApi.js.map +1 -1
  59. package/dist/client/indexer/grpc/IndexerGrpcNinjaApi.js +207 -182
  60. package/dist/client/indexer/grpc/IndexerGrpcNinjaApi.js.map +1 -1
  61. package/dist/client/indexer/grpc/IndexerGrpcOracleApi.js +73 -58
  62. package/dist/client/indexer/grpc/IndexerGrpcOracleApi.js.map +1 -1
  63. package/dist/client/indexer/grpc/IndexerGrpcSpotApi.js +316 -289
  64. package/dist/client/indexer/grpc/IndexerGrpcSpotApi.js.map +1 -1
  65. package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.js +214 -193
  66. package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.js.map +1 -1
  67. package/dist/client/indexer/rest/IndexerRestDerivativesChronosApi.js +46 -33
  68. package/dist/client/indexer/rest/IndexerRestDerivativesChronosApi.js.map +1 -1
  69. package/dist/client/indexer/rest/IndexerRestExplorerApi.js +322 -283
  70. package/dist/client/indexer/rest/IndexerRestExplorerApi.js.map +1 -1
  71. package/dist/client/indexer/rest/IndexerRestLeaderboardChronosApi.js +27 -16
  72. package/dist/client/indexer/rest/IndexerRestLeaderboardChronosApi.js.map +1 -1
  73. package/dist/client/indexer/rest/IndexerRestMarketChronosApi.js +37 -26
  74. package/dist/client/indexer/rest/IndexerRestMarketChronosApi.js.map +1 -1
  75. package/dist/client/indexer/rest/IndexerRestSpotChronosApi.js +46 -33
  76. package/dist/client/indexer/rest/IndexerRestSpotChronosApi.js.map +1 -1
  77. package/dist/client/indexer/transformers/IndexerGrpcAccountTransformer.js +1 -1
  78. package/dist/client/indexer/transformers/IndexerGrpcAccountTransformer.js.map +1 -1
  79. package/dist/client/indexer/transformers/IndexerGrpcDerivativeTransformer.js +3 -15
  80. package/dist/client/indexer/transformers/IndexerGrpcDerivativeTransformer.js.map +1 -1
  81. package/dist/client/indexer/transformers/IndexerGrpcExplorerTransformer.js +1 -1
  82. package/dist/client/indexer/transformers/IndexerGrpcExplorerTransformer.js.map +1 -1
  83. package/dist/client/indexer/transformers/IndexerGrpcSpotTransformer.js +3 -14
  84. package/dist/client/indexer/transformers/IndexerGrpcSpotTransformer.js.map +1 -1
  85. package/dist/client/indexer/transformers/IndexerRestExplorerTransformer.js +7 -10
  86. package/dist/client/indexer/transformers/IndexerRestExplorerTransformer.js.map +1 -1
  87. package/dist/client/indexer/types/index.js +1 -1
  88. package/dist/client/indexer/types/index.js.map +1 -1
  89. package/dist/client/wasm/supernova/transformer.js +10 -25
  90. package/dist/client/wasm/supernova/transformer.js.map +1 -1
  91. package/dist/core/accounts/PrivateKey.js +67 -46
  92. package/dist/core/accounts/PrivateKey.js.map +1 -1
  93. package/dist/core/accounts/signers/OfflineAminoSigner.js +43 -28
  94. package/dist/core/accounts/signers/OfflineAminoSigner.js.map +1 -1
  95. package/dist/core/accounts/signers/OfflineDirectSigner.js +43 -28
  96. package/dist/core/accounts/signers/OfflineDirectSigner.js.map +1 -1
  97. package/dist/core/modules/MsgBase.js +12 -1
  98. package/dist/core/modules/MsgBase.js.map +1 -1
  99. package/dist/core/modules/auction/msgs/MsgBid.js +15 -13
  100. package/dist/core/modules/auction/msgs/MsgBid.js.map +1 -1
  101. package/dist/core/modules/authz/msgs/MsgExec.js +15 -13
  102. package/dist/core/modules/authz/msgs/MsgExec.js.map +1 -1
  103. package/dist/core/modules/authz/msgs/MsgGrant.js +17 -22
  104. package/dist/core/modules/authz/msgs/MsgGrant.js.map +1 -1
  105. package/dist/core/modules/authz/msgs/MsgRevoke.js +15 -13
  106. package/dist/core/modules/authz/msgs/MsgRevoke.js.map +1 -1
  107. package/dist/core/modules/bank/msgs/MsgSend.js +17 -18
  108. package/dist/core/modules/bank/msgs/MsgSend.js.map +1 -1
  109. package/dist/core/modules/distribution/msgs/MsgWithdrawDelegatorReward.js +15 -13
  110. package/dist/core/modules/distribution/msgs/MsgWithdrawDelegatorReward.js.map +1 -1
  111. package/dist/core/modules/distribution/msgs/MsgWithdrawValidatorCommission.js +15 -13
  112. package/dist/core/modules/distribution/msgs/MsgWithdrawValidatorCommission.js.map +1 -1
  113. package/dist/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.js +18 -16
  114. package/dist/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.js.map +1 -1
  115. package/dist/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.js +18 -16
  116. package/dist/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.js.map +1 -1
  117. package/dist/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.js +18 -16
  118. package/dist/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.js.map +1 -1
  119. package/dist/core/modules/exchange/msgs/MsgBatchUpdateOrders.js +18 -33
  120. package/dist/core/modules/exchange/msgs/MsgBatchUpdateOrders.js.map +1 -1
  121. package/dist/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.js +15 -13
  122. package/dist/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.js.map +1 -1
  123. package/dist/core/modules/exchange/msgs/MsgCancelDerivativeOrder.js +15 -13
  124. package/dist/core/modules/exchange/msgs/MsgCancelDerivativeOrder.js.map +1 -1
  125. package/dist/core/modules/exchange/msgs/MsgCancelSpotOrder.js +15 -13
  126. package/dist/core/modules/exchange/msgs/MsgCancelSpotOrder.js.map +1 -1
  127. package/dist/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.js +16 -20
  128. package/dist/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.js.map +1 -1
  129. package/dist/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.js +16 -20
  130. package/dist/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.js.map +1 -1
  131. package/dist/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.js +16 -20
  132. package/dist/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.js.map +1 -1
  133. package/dist/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.js +16 -20
  134. package/dist/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.js.map +1 -1
  135. package/dist/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.js +16 -19
  136. package/dist/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.js.map +1 -1
  137. package/dist/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.js +16 -19
  138. package/dist/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.js.map +1 -1
  139. package/dist/core/modules/exchange/msgs/MsgDeposit.js +15 -13
  140. package/dist/core/modules/exchange/msgs/MsgDeposit.js.map +1 -1
  141. package/dist/core/modules/exchange/msgs/MsgExternalTransfer.js +15 -13
  142. package/dist/core/modules/exchange/msgs/MsgExternalTransfer.js.map +1 -1
  143. package/dist/core/modules/exchange/msgs/MsgIncreasePositionMargin.js +16 -17
  144. package/dist/core/modules/exchange/msgs/MsgIncreasePositionMargin.js.map +1 -1
  145. package/dist/core/modules/exchange/msgs/MsgInstantBinaryOptionsMarketLaunch.js +16 -23
  146. package/dist/core/modules/exchange/msgs/MsgInstantBinaryOptionsMarketLaunch.js.map +1 -1
  147. package/dist/core/modules/exchange/msgs/MsgInstantSpotMarketLaunch.js +16 -21
  148. package/dist/core/modules/exchange/msgs/MsgInstantSpotMarketLaunch.js.map +1 -1
  149. package/dist/core/modules/exchange/msgs/MsgMultiExecute.js +3 -12
  150. package/dist/core/modules/exchange/msgs/MsgMultiExecute.js.map +1 -1
  151. package/dist/core/modules/exchange/msgs/MsgReclaimLockedFunds.js +15 -13
  152. package/dist/core/modules/exchange/msgs/MsgReclaimLockedFunds.js.map +1 -1
  153. package/dist/core/modules/exchange/msgs/MsgTransferAndExecute.js +5 -20
  154. package/dist/core/modules/exchange/msgs/MsgTransferAndExecute.js.map +1 -1
  155. package/dist/core/modules/exchange/msgs/MsgWithdraw.js +15 -13
  156. package/dist/core/modules/exchange/msgs/MsgWithdraw.js.map +1 -1
  157. package/dist/core/modules/exchange/utils/classes/OrderHashManager.js +43 -28
  158. package/dist/core/modules/exchange/utils/classes/OrderHashManager.js.map +1 -1
  159. package/dist/core/modules/gov/msgs/MsgDeposit.js +17 -18
  160. package/dist/core/modules/gov/msgs/MsgDeposit.js.map +1 -1
  161. package/dist/core/modules/gov/msgs/MsgSubmitProposalExpiryFuturesMarketLaunch.js +7 -32
  162. package/dist/core/modules/gov/msgs/MsgSubmitProposalExpiryFuturesMarketLaunch.js.map +1 -1
  163. package/dist/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunch.js +7 -32
  164. package/dist/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunch.js.map +1 -1
  165. package/dist/core/modules/gov/msgs/MsgSubmitProposalSpotMarketLaunch.js +7 -32
  166. package/dist/core/modules/gov/msgs/MsgSubmitProposalSpotMarketLaunch.js.map +1 -1
  167. package/dist/core/modules/gov/msgs/MsgSubmitProposalSpotMarketParamUpdate.js +7 -32
  168. package/dist/core/modules/gov/msgs/MsgSubmitProposalSpotMarketParamUpdate.js.map +1 -1
  169. package/dist/core/modules/gov/msgs/MsgSubmitTextProposal.js +7 -32
  170. package/dist/core/modules/gov/msgs/MsgSubmitTextProposal.js.map +1 -1
  171. package/dist/core/modules/gov/msgs/MsgVote.js +15 -13
  172. package/dist/core/modules/gov/msgs/MsgVote.js.map +1 -1
  173. package/dist/core/modules/ibc/msgs/MsgTransfer.js +15 -13
  174. package/dist/core/modules/ibc/msgs/MsgTransfer.js.map +1 -1
  175. package/dist/core/modules/insurance/msgs/MsgCreateInsuranceFund.js +15 -13
  176. package/dist/core/modules/insurance/msgs/MsgCreateInsuranceFund.js.map +1 -1
  177. package/dist/core/modules/insurance/msgs/MsgRequestRedemption.js +15 -13
  178. package/dist/core/modules/insurance/msgs/MsgRequestRedemption.js.map +1 -1
  179. package/dist/core/modules/insurance/msgs/MsgUnderwrite.js +15 -13
  180. package/dist/core/modules/insurance/msgs/MsgUnderwrite.js.map +1 -1
  181. package/dist/core/modules/peggy/msgs/MsgSendToEth.js +15 -13
  182. package/dist/core/modules/peggy/msgs/MsgSendToEth.js.map +1 -1
  183. package/dist/core/modules/staking/msgs/MsgBeginRedelegate.js +15 -13
  184. package/dist/core/modules/staking/msgs/MsgBeginRedelegate.js.map +1 -1
  185. package/dist/core/modules/staking/msgs/MsgDelegate.js +15 -13
  186. package/dist/core/modules/staking/msgs/MsgDelegate.js.map +1 -1
  187. package/dist/core/modules/staking/msgs/MsgEditValidator.js +15 -13
  188. package/dist/core/modules/staking/msgs/MsgEditValidator.js.map +1 -1
  189. package/dist/core/modules/staking/msgs/MsgUndelegate.js +15 -13
  190. package/dist/core/modules/staking/msgs/MsgUndelegate.js.map +1 -1
  191. package/dist/core/modules/tx/api/TxGrpcApi.js +130 -120
  192. package/dist/core/modules/tx/api/TxGrpcApi.js.map +1 -1
  193. package/dist/core/modules/tx/api/TxRestApi.js +181 -163
  194. package/dist/core/modules/tx/api/TxRestApi.js.map +1 -1
  195. package/dist/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js +84 -84
  196. package/dist/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js.map +1 -1
  197. package/dist/core/modules/tx/eip712/eip712.js +2 -14
  198. package/dist/core/modules/tx/eip712/eip712.js.map +1 -1
  199. package/dist/core/modules/tx/eip712/maps.d.ts +1 -1
  200. package/dist/core/modules/tx/eip712/maps.js +6 -24
  201. package/dist/core/modules/tx/eip712/maps.js.map +1 -1
  202. package/dist/core/modules/tx/tx.js +24 -34
  203. package/dist/core/modules/tx/tx.js.map +1 -1
  204. package/dist/core/modules/wasm/exec-args/ExecArgInitiateTransfer.js +2 -9
  205. package/dist/core/modules/wasm/exec-args/ExecArgInitiateTransfer.js.map +1 -1
  206. package/dist/core/modules/wasm/exec-args/ExecArgUpdateSpotVaultConfig.js +1 -19
  207. package/dist/core/modules/wasm/exec-args/ExecArgUpdateSpotVaultConfig.js.map +1 -1
  208. package/dist/core/modules/wasm/msgs/MsgExecuteContract.js +16 -18
  209. package/dist/core/modules/wasm/msgs/MsgExecuteContract.js.map +1 -1
  210. package/dist/core/modules/wasm/msgs/MsgInstantiateContract.js +16 -16
  211. package/dist/core/modules/wasm/msgs/MsgInstantiateContract.js.map +1 -1
  212. package/dist/core/modules/wasm/msgs/MsgMigrateContract.js +16 -17
  213. package/dist/core/modules/wasm/msgs/MsgMigrateContract.js.map +1 -1
  214. package/dist/core/modules/wasm/msgs/MsgPrivilegedExecuteContract.js +16 -16
  215. package/dist/core/modules/wasm/msgs/MsgPrivilegedExecuteContract.js.map +1 -1
  216. package/dist/core/modules/wasm/msgs/MsgStoreCode.js +16 -16
  217. package/dist/core/modules/wasm/msgs/MsgStoreCode.js.map +1 -1
  218. package/dist/core/stargate/StargateClient.js +28 -17
  219. package/dist/core/stargate/StargateClient.js.map +1 -1
  220. package/dist/utils/classes/Denom/Denom.js +130 -104
  221. package/dist/utils/classes/Denom/Denom.js.map +1 -1
  222. package/dist/utils/classes/Denom/DenomClient.js +2 -10
  223. package/dist/utils/classes/Denom/DenomClient.js.map +1 -1
  224. package/dist/utils/pagination.js +1 -5
  225. package/dist/utils/pagination.js.map +1 -1
  226. package/package.json +7 -7
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -19,358 +28,392 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
19
28
  super(...arguments);
20
29
  this.module = types_1.ChainModule.Staking;
21
30
  }
22
- async fetchModuleParams() {
23
- const request = new query_pb_1.QueryParamsRequest();
24
- try {
25
- const response = await this.request(request, query_pb_service_1.Query.Params);
26
- return transformers_1.ChainGrpcStakingTransformer.moduleParamsResponseToModuleParams(response);
27
- }
28
- catch (e) {
29
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
30
- throw e;
31
- }
32
- throw new exceptions_1.GrpcUnaryRequestException(e, {
33
- code: exceptions_1.UnspecifiedErrorCode,
34
- contextModule: this.module,
35
- });
36
- }
31
+ fetchModuleParams() {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const request = new query_pb_1.QueryParamsRequest();
34
+ try {
35
+ const response = yield this.request(request, query_pb_service_1.Query.Params);
36
+ return transformers_1.ChainGrpcStakingTransformer.moduleParamsResponseToModuleParams(response);
37
+ }
38
+ catch (e) {
39
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
40
+ throw e;
41
+ }
42
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
43
+ code: exceptions_1.UnspecifiedErrorCode,
44
+ contextModule: this.module,
45
+ });
46
+ }
47
+ });
37
48
  }
38
- async fetchPool() {
39
- const request = new query_pb_1.QueryPoolRequest();
40
- try {
41
- const response = await this.request(request, query_pb_service_1.Query.Pool);
42
- return transformers_1.ChainGrpcStakingTransformer.poolResponseToPool(response);
43
- }
44
- catch (e) {
45
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
46
- throw e;
47
- }
48
- throw new exceptions_1.GrpcUnaryRequestException(e, {
49
- code: exceptions_1.UnspecifiedErrorCode,
50
- contextModule: this.module,
51
- });
52
- }
49
+ fetchPool() {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const request = new query_pb_1.QueryPoolRequest();
52
+ try {
53
+ const response = yield this.request(request, query_pb_service_1.Query.Pool);
54
+ return transformers_1.ChainGrpcStakingTransformer.poolResponseToPool(response);
55
+ }
56
+ catch (e) {
57
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
58
+ throw e;
59
+ }
60
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
61
+ code: exceptions_1.UnspecifiedErrorCode,
62
+ contextModule: this.module,
63
+ });
64
+ }
65
+ });
53
66
  }
54
- async fetchValidators() {
55
- const request = new query_pb_1.QueryValidatorsRequest();
56
- try {
57
- const response = await this.request(request, query_pb_service_1.Query.Validators);
58
- return transformers_1.ChainGrpcStakingTransformer.validatorsResponseToValidators(response);
59
- }
60
- catch (e) {
61
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
62
- throw e;
63
- }
64
- throw new exceptions_1.GrpcUnaryRequestException(e, {
65
- code: exceptions_1.UnspecifiedErrorCode,
66
- contextModule: this.module,
67
- });
68
- }
67
+ fetchValidators() {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const request = new query_pb_1.QueryValidatorsRequest();
70
+ try {
71
+ const response = yield this.request(request, query_pb_service_1.Query.Validators);
72
+ return transformers_1.ChainGrpcStakingTransformer.validatorsResponseToValidators(response);
73
+ }
74
+ catch (e) {
75
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
76
+ throw e;
77
+ }
78
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
79
+ code: exceptions_1.UnspecifiedErrorCode,
80
+ contextModule: this.module,
81
+ });
82
+ }
83
+ });
69
84
  }
70
- async fetchValidator(address) {
71
- const request = new query_pb_1.QueryValidatorRequest();
72
- request.setValidatorAddr(address);
73
- try {
74
- const response = await this.request(request, query_pb_service_1.Query.Validator);
75
- return transformers_1.ChainGrpcStakingTransformer.validatorResponseToValidator(response);
76
- }
77
- catch (e) {
78
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
79
- throw e;
80
- }
81
- throw new exceptions_1.GrpcUnaryRequestException(e, {
82
- code: exceptions_1.UnspecifiedErrorCode,
83
- contextModule: this.module,
84
- });
85
- }
85
+ fetchValidator(address) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const request = new query_pb_1.QueryValidatorRequest();
88
+ request.setValidatorAddr(address);
89
+ try {
90
+ const response = yield this.request(request, query_pb_service_1.Query.Validator);
91
+ return transformers_1.ChainGrpcStakingTransformer.validatorResponseToValidator(response);
92
+ }
93
+ catch (e) {
94
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
95
+ throw e;
96
+ }
97
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
98
+ code: exceptions_1.UnspecifiedErrorCode,
99
+ contextModule: this.module,
100
+ });
101
+ }
102
+ });
86
103
  }
87
- async fetchValidatorDelegations({ validatorAddress, pagination, }) {
88
- const request = new query_pb_1.QueryValidatorDelegationsRequest();
89
- request.setValidatorAddr(validatorAddress);
90
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
91
- if (paginationForRequest) {
92
- request.setPagination(paginationForRequest);
93
- }
94
- try {
95
- const response = await this.request(request, query_pb_service_1.Query.ValidatorDelegations);
96
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
97
- }
98
- catch (e) {
99
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
100
- throw e;
101
- }
102
- throw new exceptions_1.GrpcUnaryRequestException(e, {
103
- code: exceptions_1.UnspecifiedErrorCode,
104
- contextModule: this.module,
105
- });
106
- }
104
+ fetchValidatorDelegations({ validatorAddress, pagination, }) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const request = new query_pb_1.QueryValidatorDelegationsRequest();
107
+ request.setValidatorAddr(validatorAddress);
108
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
109
+ if (paginationForRequest) {
110
+ request.setPagination(paginationForRequest);
111
+ }
112
+ try {
113
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorDelegations);
114
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
115
+ }
116
+ catch (e) {
117
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
118
+ throw e;
119
+ }
120
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
121
+ code: exceptions_1.UnspecifiedErrorCode,
122
+ contextModule: this.module,
123
+ });
124
+ }
125
+ });
107
126
  }
108
- async fetchValidatorDelegationsNoThrow({ validatorAddress, pagination, }) {
109
- const request = new query_pb_1.QueryValidatorDelegationsRequest();
110
- request.setValidatorAddr(validatorAddress);
111
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
112
- if (paginationForRequest) {
113
- request.setPagination(paginationForRequest);
114
- }
115
- try {
116
- const response = await this.request(request, query_pb_service_1.Query.ValidatorDelegations);
117
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
118
- }
119
- catch (e) {
120
- if (e.message.includes('does not exist')) {
121
- return { delegations: [], pagination: { total: 0, next: '' } };
122
- }
123
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
124
- throw e;
125
- }
126
- throw new exceptions_1.GrpcUnaryRequestException(e, {
127
- code: exceptions_1.UnspecifiedErrorCode,
128
- contextModule: this.module,
129
- });
130
- }
127
+ fetchValidatorDelegationsNoThrow({ validatorAddress, pagination, }) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const request = new query_pb_1.QueryValidatorDelegationsRequest();
130
+ request.setValidatorAddr(validatorAddress);
131
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
132
+ if (paginationForRequest) {
133
+ request.setPagination(paginationForRequest);
134
+ }
135
+ try {
136
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorDelegations);
137
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
138
+ }
139
+ catch (e) {
140
+ if (e.message.includes('does not exist')) {
141
+ return { delegations: [], pagination: { total: 0, next: '' } };
142
+ }
143
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
144
+ throw e;
145
+ }
146
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
147
+ code: exceptions_1.UnspecifiedErrorCode,
148
+ contextModule: this.module,
149
+ });
150
+ }
151
+ });
131
152
  }
132
- async fetchValidatorUnbondingDelegations({ validatorAddress, pagination, }) {
133
- const request = new query_pb_1.QueryValidatorUnbondingDelegationsRequest();
134
- request.setValidatorAddr(validatorAddress);
135
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
136
- if (paginationForRequest) {
137
- request.setPagination(paginationForRequest);
138
- }
139
- try {
140
- const response = await this.request(request, query_pb_service_1.Query.ValidatorUnbondingDelegations);
141
- return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
142
- }
143
- catch (e) {
144
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
145
- throw e;
146
- }
147
- throw new exceptions_1.GrpcUnaryRequestException(e, {
148
- code: exceptions_1.UnspecifiedErrorCode,
149
- contextModule: this.module,
150
- });
151
- }
153
+ fetchValidatorUnbondingDelegations({ validatorAddress, pagination, }) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ const request = new query_pb_1.QueryValidatorUnbondingDelegationsRequest();
156
+ request.setValidatorAddr(validatorAddress);
157
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
158
+ if (paginationForRequest) {
159
+ request.setPagination(paginationForRequest);
160
+ }
161
+ try {
162
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorUnbondingDelegations);
163
+ return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
164
+ }
165
+ catch (e) {
166
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
167
+ throw e;
168
+ }
169
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
170
+ code: exceptions_1.UnspecifiedErrorCode,
171
+ contextModule: this.module,
172
+ });
173
+ }
174
+ });
152
175
  }
153
- async fetchValidatorUnbondingDelegationsNoThrow({ validatorAddress, pagination, }) {
154
- const request = new query_pb_1.QueryValidatorUnbondingDelegationsRequest();
155
- request.setValidatorAddr(validatorAddress);
156
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
157
- if (paginationForRequest) {
158
- request.setPagination(paginationForRequest);
159
- }
160
- try {
161
- const response = await this.request(request, query_pb_service_1.Query.ValidatorUnbondingDelegations);
162
- return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
163
- }
164
- catch (e) {
165
- if (e.message.includes('does not exist')) {
166
- return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
167
- }
168
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
169
- throw e;
170
- }
171
- throw new exceptions_1.GrpcUnaryRequestException(e, {
172
- code: exceptions_1.UnspecifiedErrorCode,
173
- contextModule: this.module,
174
- });
175
- }
176
+ fetchValidatorUnbondingDelegationsNoThrow({ validatorAddress, pagination, }) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ const request = new query_pb_1.QueryValidatorUnbondingDelegationsRequest();
179
+ request.setValidatorAddr(validatorAddress);
180
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
181
+ if (paginationForRequest) {
182
+ request.setPagination(paginationForRequest);
183
+ }
184
+ try {
185
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorUnbondingDelegations);
186
+ return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
187
+ }
188
+ catch (e) {
189
+ if (e.message.includes('does not exist')) {
190
+ return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
191
+ }
192
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
193
+ throw e;
194
+ }
195
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
196
+ code: exceptions_1.UnspecifiedErrorCode,
197
+ contextModule: this.module,
198
+ });
199
+ }
200
+ });
176
201
  }
177
- async fetchDelegation({ injectiveAddress, validatorAddress, }) {
178
- const request = new query_pb_1.QueryDelegationRequest();
179
- request.setDelegatorAddr(injectiveAddress);
180
- request.setValidatorAddr(validatorAddress);
181
- try {
182
- const response = await this.request(request, query_pb_service_1.Query.Delegation);
183
- return transformers_1.ChainGrpcStakingTransformer.delegationResponseToDelegation(response);
184
- }
185
- catch (e) {
186
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
187
- throw e;
188
- }
189
- throw new exceptions_1.GrpcUnaryRequestException(e, {
190
- code: exceptions_1.UnspecifiedErrorCode,
191
- contextModule: this.module,
192
- });
193
- }
202
+ fetchDelegation({ injectiveAddress, validatorAddress, }) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ const request = new query_pb_1.QueryDelegationRequest();
205
+ request.setDelegatorAddr(injectiveAddress);
206
+ request.setValidatorAddr(validatorAddress);
207
+ try {
208
+ const response = yield this.request(request, query_pb_service_1.Query.Delegation);
209
+ return transformers_1.ChainGrpcStakingTransformer.delegationResponseToDelegation(response);
210
+ }
211
+ catch (e) {
212
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
213
+ throw e;
214
+ }
215
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
216
+ code: exceptions_1.UnspecifiedErrorCode,
217
+ contextModule: this.module,
218
+ });
219
+ }
220
+ });
194
221
  }
195
- async fetchDelegations({ injectiveAddress, pagination, }) {
196
- const request = new query_pb_1.QueryDelegatorDelegationsRequest();
197
- request.setDelegatorAddr(injectiveAddress);
198
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
199
- if (paginationForRequest) {
200
- request.setPagination(paginationForRequest);
201
- }
202
- try {
203
- const response = await this.request(request, query_pb_service_1.Query.DelegatorDelegations);
204
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
205
- }
206
- catch (e) {
207
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
208
- throw e;
209
- }
210
- throw new exceptions_1.GrpcUnaryRequestException(e, {
211
- code: exceptions_1.UnspecifiedErrorCode,
212
- contextModule: this.module,
213
- });
214
- }
222
+ fetchDelegations({ injectiveAddress, pagination, }) {
223
+ return __awaiter(this, void 0, void 0, function* () {
224
+ const request = new query_pb_1.QueryDelegatorDelegationsRequest();
225
+ request.setDelegatorAddr(injectiveAddress);
226
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
227
+ if (paginationForRequest) {
228
+ request.setPagination(paginationForRequest);
229
+ }
230
+ try {
231
+ const response = yield this.request(request, query_pb_service_1.Query.DelegatorDelegations);
232
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
233
+ }
234
+ catch (e) {
235
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
236
+ throw e;
237
+ }
238
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
239
+ code: exceptions_1.UnspecifiedErrorCode,
240
+ contextModule: this.module,
241
+ });
242
+ }
243
+ });
215
244
  }
216
- async fetchDelegationsNoThrow({ injectiveAddress, pagination, }) {
217
- const request = new query_pb_1.QueryDelegatorDelegationsRequest();
218
- request.setDelegatorAddr(injectiveAddress);
219
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
220
- if (paginationForRequest) {
221
- request.setPagination(paginationForRequest);
222
- }
223
- try {
224
- const response = await this.request(request, query_pb_service_1.Query.DelegatorDelegations);
225
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
226
- }
227
- catch (e) {
228
- if (e.message.includes('does not exist')) {
229
- return { delegations: [], pagination: { total: 0, next: '' } };
230
- }
231
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
232
- throw e;
233
- }
234
- throw new exceptions_1.GrpcUnaryRequestException(e, {
235
- code: exceptions_1.UnspecifiedErrorCode,
236
- contextModule: this.module,
237
- });
238
- }
245
+ fetchDelegationsNoThrow({ injectiveAddress, pagination, }) {
246
+ return __awaiter(this, void 0, void 0, function* () {
247
+ const request = new query_pb_1.QueryDelegatorDelegationsRequest();
248
+ request.setDelegatorAddr(injectiveAddress);
249
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
250
+ if (paginationForRequest) {
251
+ request.setPagination(paginationForRequest);
252
+ }
253
+ try {
254
+ const response = yield this.request(request, query_pb_service_1.Query.DelegatorDelegations);
255
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
256
+ }
257
+ catch (e) {
258
+ if (e.message.includes('does not exist')) {
259
+ return { delegations: [], pagination: { total: 0, next: '' } };
260
+ }
261
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
262
+ throw e;
263
+ }
264
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
265
+ code: exceptions_1.UnspecifiedErrorCode,
266
+ contextModule: this.module,
267
+ });
268
+ }
269
+ });
239
270
  }
240
- async fetchDelegators({ validatorAddress, pagination, }) {
241
- const request = new query_pb_1.QueryValidatorDelegationsRequest();
242
- request.setValidatorAddr(validatorAddress);
243
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
244
- if (paginationForRequest) {
245
- request.setPagination(paginationForRequest);
246
- }
247
- try {
248
- const response = await this.request(request, query_pb_service_1.Query.ValidatorDelegations);
249
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
250
- }
251
- catch (e) {
252
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
253
- throw e;
254
- }
255
- throw new exceptions_1.GrpcUnaryRequestException(e, {
256
- code: exceptions_1.UnspecifiedErrorCode,
257
- contextModule: this.module,
258
- });
259
- }
271
+ fetchDelegators({ validatorAddress, pagination, }) {
272
+ return __awaiter(this, void 0, void 0, function* () {
273
+ const request = new query_pb_1.QueryValidatorDelegationsRequest();
274
+ request.setValidatorAddr(validatorAddress);
275
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
276
+ if (paginationForRequest) {
277
+ request.setPagination(paginationForRequest);
278
+ }
279
+ try {
280
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorDelegations);
281
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
282
+ }
283
+ catch (e) {
284
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
285
+ throw e;
286
+ }
287
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
288
+ code: exceptions_1.UnspecifiedErrorCode,
289
+ contextModule: this.module,
290
+ });
291
+ }
292
+ });
260
293
  }
261
- async fetchDelegatorsNoThrow({ validatorAddress, pagination, }) {
262
- const request = new query_pb_1.QueryValidatorDelegationsRequest();
263
- request.setValidatorAddr(validatorAddress);
264
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
265
- if (paginationForRequest) {
266
- request.setPagination(paginationForRequest);
267
- }
268
- try {
269
- const response = await this.request(request, query_pb_service_1.Query.ValidatorDelegations);
270
- return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
271
- }
272
- catch (e) {
273
- if (e.message.includes('does not exist')) {
274
- return { delegations: [], pagination: { total: 0, next: '' } };
275
- }
276
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
277
- throw e;
278
- }
279
- throw new exceptions_1.GrpcUnaryRequestException(e, {
280
- code: exceptions_1.UnspecifiedErrorCode,
281
- contextModule: this.module,
282
- });
283
- }
294
+ fetchDelegatorsNoThrow({ validatorAddress, pagination, }) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ const request = new query_pb_1.QueryValidatorDelegationsRequest();
297
+ request.setValidatorAddr(validatorAddress);
298
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
299
+ if (paginationForRequest) {
300
+ request.setPagination(paginationForRequest);
301
+ }
302
+ try {
303
+ const response = yield this.request(request, query_pb_service_1.Query.ValidatorDelegations);
304
+ return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
305
+ }
306
+ catch (e) {
307
+ if (e.message.includes('does not exist')) {
308
+ return { delegations: [], pagination: { total: 0, next: '' } };
309
+ }
310
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
311
+ throw e;
312
+ }
313
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
314
+ code: exceptions_1.UnspecifiedErrorCode,
315
+ contextModule: this.module,
316
+ });
317
+ }
318
+ });
284
319
  }
285
- async fetchUnbondingDelegations({ injectiveAddress, pagination, }) {
286
- const request = new query_pb_1.QueryDelegatorUnbondingDelegationsRequest();
287
- request.setDelegatorAddr(injectiveAddress);
288
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
289
- if (paginationForRequest) {
290
- request.setPagination(paginationForRequest);
291
- }
292
- try {
293
- const response = await this.request(request, query_pb_service_1.Query.DelegatorUnbondingDelegations);
294
- return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
295
- }
296
- catch (e) {
297
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
298
- throw e;
299
- }
300
- throw new exceptions_1.GrpcUnaryRequestException(e, {
301
- code: exceptions_1.UnspecifiedErrorCode,
302
- contextModule: this.module,
303
- });
304
- }
320
+ fetchUnbondingDelegations({ injectiveAddress, pagination, }) {
321
+ return __awaiter(this, void 0, void 0, function* () {
322
+ const request = new query_pb_1.QueryDelegatorUnbondingDelegationsRequest();
323
+ request.setDelegatorAddr(injectiveAddress);
324
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
325
+ if (paginationForRequest) {
326
+ request.setPagination(paginationForRequest);
327
+ }
328
+ try {
329
+ const response = yield this.request(request, query_pb_service_1.Query.DelegatorUnbondingDelegations);
330
+ return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
331
+ }
332
+ catch (e) {
333
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
334
+ throw e;
335
+ }
336
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
337
+ code: exceptions_1.UnspecifiedErrorCode,
338
+ contextModule: this.module,
339
+ });
340
+ }
341
+ });
305
342
  }
306
- async fetchUnbondingDelegationsNoThrow({ injectiveAddress, pagination, }) {
307
- const request = new query_pb_1.QueryDelegatorUnbondingDelegationsRequest();
308
- request.setDelegatorAddr(injectiveAddress);
309
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
310
- if (paginationForRequest) {
311
- request.setPagination(paginationForRequest);
312
- }
313
- try {
314
- const response = await this.request(request, query_pb_service_1.Query.DelegatorUnbondingDelegations);
315
- return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
316
- }
317
- catch (e) {
318
- if (e.message.includes('does not exist')) {
319
- return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
320
- }
321
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
322
- throw e;
323
- }
324
- throw new exceptions_1.GrpcUnaryRequestException(e, {
325
- code: exceptions_1.UnspecifiedErrorCode,
326
- contextModule: this.module,
327
- });
328
- }
343
+ fetchUnbondingDelegationsNoThrow({ injectiveAddress, pagination, }) {
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ const request = new query_pb_1.QueryDelegatorUnbondingDelegationsRequest();
346
+ request.setDelegatorAddr(injectiveAddress);
347
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
348
+ if (paginationForRequest) {
349
+ request.setPagination(paginationForRequest);
350
+ }
351
+ try {
352
+ const response = yield this.request(request, query_pb_service_1.Query.DelegatorUnbondingDelegations);
353
+ return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
354
+ }
355
+ catch (e) {
356
+ if (e.message.includes('does not exist')) {
357
+ return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
358
+ }
359
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
360
+ throw e;
361
+ }
362
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
363
+ code: exceptions_1.UnspecifiedErrorCode,
364
+ contextModule: this.module,
365
+ });
366
+ }
367
+ });
329
368
  }
330
- async fetchReDelegations({ injectiveAddress, pagination, }) {
331
- const request = new query_pb_1.QueryRedelegationsRequest();
332
- request.setDelegatorAddr(injectiveAddress);
333
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
334
- if (paginationForRequest) {
335
- request.setPagination(paginationForRequest);
336
- }
337
- try {
338
- const response = await this.request(request, query_pb_service_1.Query.Redelegations);
339
- return transformers_1.ChainGrpcStakingTransformer.reDelegationsResponseToReDelegations(response);
340
- }
341
- catch (e) {
342
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
343
- throw e;
344
- }
345
- throw new exceptions_1.GrpcUnaryRequestException(e, {
346
- code: exceptions_1.UnspecifiedErrorCode,
347
- contextModule: this.module,
348
- });
349
- }
369
+ fetchReDelegations({ injectiveAddress, pagination, }) {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ const request = new query_pb_1.QueryRedelegationsRequest();
372
+ request.setDelegatorAddr(injectiveAddress);
373
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
374
+ if (paginationForRequest) {
375
+ request.setPagination(paginationForRequest);
376
+ }
377
+ try {
378
+ const response = yield this.request(request, query_pb_service_1.Query.Redelegations);
379
+ return transformers_1.ChainGrpcStakingTransformer.reDelegationsResponseToReDelegations(response);
380
+ }
381
+ catch (e) {
382
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
383
+ throw e;
384
+ }
385
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
386
+ code: exceptions_1.UnspecifiedErrorCode,
387
+ contextModule: this.module,
388
+ });
389
+ }
390
+ });
350
391
  }
351
- async fetchReDelegationsNoThrow({ injectiveAddress, pagination, }) {
352
- const request = new query_pb_1.QueryRedelegationsRequest();
353
- request.setDelegatorAddr(injectiveAddress);
354
- const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
355
- if (paginationForRequest) {
356
- request.setPagination(paginationForRequest);
357
- }
358
- try {
359
- const response = await this.request(request, query_pb_service_1.Query.Redelegations);
360
- return transformers_1.ChainGrpcStakingTransformer.reDelegationsResponseToReDelegations(response);
361
- }
362
- catch (e) {
363
- if (e.message.includes('does not exist')) {
364
- return { redelegations: [], pagination: { total: 0, next: '' } };
365
- }
366
- if (e instanceof exceptions_1.GrpcUnaryRequestException) {
367
- throw e;
368
- }
369
- throw new exceptions_1.GrpcUnaryRequestException(e, {
370
- code: exceptions_1.UnspecifiedErrorCode,
371
- contextModule: this.module,
372
- });
373
- }
392
+ fetchReDelegationsNoThrow({ injectiveAddress, pagination, }) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ const request = new query_pb_1.QueryRedelegationsRequest();
395
+ request.setDelegatorAddr(injectiveAddress);
396
+ const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
397
+ if (paginationForRequest) {
398
+ request.setPagination(paginationForRequest);
399
+ }
400
+ try {
401
+ const response = yield this.request(request, query_pb_service_1.Query.Redelegations);
402
+ return transformers_1.ChainGrpcStakingTransformer.reDelegationsResponseToReDelegations(response);
403
+ }
404
+ catch (e) {
405
+ if (e.message.includes('does not exist')) {
406
+ return { redelegations: [], pagination: { total: 0, next: '' } };
407
+ }
408
+ if (e instanceof exceptions_1.GrpcUnaryRequestException) {
409
+ throw e;
410
+ }
411
+ throw new exceptions_1.GrpcUnaryRequestException(e, {
412
+ code: exceptions_1.UnspecifiedErrorCode,
413
+ contextModule: this.module,
414
+ });
415
+ }
416
+ });
374
417
  }
375
418
  }
376
419
  exports.ChainGrpcStakingApi = ChainGrpcStakingApi;