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