@injectivelabs/sdk-ts 1.0.143 → 1.0.145
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/classes/Address.d.ts.map +1 -1
- package/dist/classes/Address.js +13 -5
- package/dist/classes/Address.js.map +1 -1
- package/dist/classes/Denom.d.ts.map +1 -1
- package/dist/classes/Denom.js +7 -2
- package/dist/classes/Denom.js.map +1 -1
- package/dist/client/BaseGrpcConsumer.d.ts +1 -0
- package/dist/client/BaseGrpcConsumer.d.ts.map +1 -1
- package/dist/client/BaseGrpcConsumer.js +8 -2
- package/dist/client/BaseGrpcConsumer.js.map +1 -1
- package/dist/client/BaseRestConsumer.d.ts +2 -0
- package/dist/client/BaseRestConsumer.d.ts.map +1 -1
- package/dist/client/BaseRestConsumer.js +69 -0
- package/dist/client/BaseRestConsumer.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcAuctionApi.d.ts +4 -3
- package/dist/client/chain/grpc/ChainGrpcAuctionApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcAuctionApi.js +27 -3
- package/dist/client/chain/grpc/ChainGrpcAuctionApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcAuthApi.d.ts +1 -0
- package/dist/client/chain/grpc/ChainGrpcAuthApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcAuthApi.js +18 -3
- package/dist/client/chain/grpc/ChainGrpcAuthApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcBankApi.d.ts +3 -2
- package/dist/client/chain/grpc/ChainGrpcBankApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcBankApi.js +34 -4
- package/dist/client/chain/grpc/ChainGrpcBankApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcDistributionApi.d.ts +1 -0
- package/dist/client/chain/grpc/ChainGrpcDistributionApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcDistributionApi.js +29 -5
- package/dist/client/chain/grpc/ChainGrpcDistributionApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcExchangeApi.d.ts +6 -5
- package/dist/client/chain/grpc/ChainGrpcExchangeApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcExchangeApi.js +62 -8
- package/dist/client/chain/grpc/ChainGrpcExchangeApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcGovApi.d.ts +7 -6
- package/dist/client/chain/grpc/ChainGrpcGovApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcGovApi.js +48 -6
- package/dist/client/chain/grpc/ChainGrpcGovApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcIbcApi.d.ts +1 -0
- package/dist/client/chain/grpc/ChainGrpcIbcApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcIbcApi.js +20 -2
- package/dist/client/chain/grpc/ChainGrpcIbcApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.d.ts +4 -3
- package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.js +41 -5
- package/dist/client/chain/grpc/ChainGrpcInsuranceFundApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcMintApi.d.ts +2 -1
- package/dist/client/chain/grpc/ChainGrpcMintApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcMintApi.js +27 -3
- package/dist/client/chain/grpc/ChainGrpcMintApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcOracleApi.d.ts +1 -0
- package/dist/client/chain/grpc/ChainGrpcOracleApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcOracleApi.js +13 -1
- package/dist/client/chain/grpc/ChainGrpcOracleApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcPeggyApi.d.ts +2 -1
- package/dist/client/chain/grpc/ChainGrpcPeggyApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcPeggyApi.js +13 -1
- package/dist/client/chain/grpc/ChainGrpcPeggyApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcStakingApi.d.ts +18 -17
- package/dist/client/chain/grpc/ChainGrpcStakingApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcStakingApi.js +125 -17
- package/dist/client/chain/grpc/ChainGrpcStakingApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcWasmApi.d.ts +6 -5
- package/dist/client/chain/grpc/ChainGrpcWasmApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcWasmApi.js +62 -8
- package/dist/client/chain/grpc/ChainGrpcWasmApi.js.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcWasmXApi.d.ts +1 -0
- package/dist/client/chain/grpc/ChainGrpcWasmXApi.d.ts.map +1 -1
- package/dist/client/chain/grpc/ChainGrpcWasmXApi.js +20 -2
- package/dist/client/chain/grpc/ChainGrpcWasmXApi.js.map +1 -1
- package/dist/client/chain/rest/ChainRestAuthApi.d.ts.map +1 -1
- package/dist/client/chain/rest/ChainRestAuthApi.js +32 -8
- package/dist/client/chain/rest/ChainRestAuthApi.js.map +1 -1
- package/dist/client/chain/rest/ChainRestBankApi.d.ts.map +1 -1
- package/dist/client/chain/rest/ChainRestBankApi.js +38 -7
- package/dist/client/chain/rest/ChainRestBankApi.js.map +1 -1
- package/dist/client/chain/rest/ChainRestTendermintApi.d.ts.map +1 -1
- package/dist/client/chain/rest/ChainRestTendermintApi.js +31 -7
- package/dist/client/chain/rest/ChainRestTendermintApi.js.map +1 -1
- package/dist/client/chain/types/index.d.ts +18 -0
- package/dist/client/chain/types/index.d.ts.map +1 -1
- package/dist/client/chain/types/index.js +3 -0
- package/dist/client/chain/types/index.js.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestDerivativesChronosApi.d.ts.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestDerivativesChronosApi.js +2 -3
- package/dist/client/exchange/rest/ExchangeRestDerivativesChronosApi.js.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestExplorerApi.d.ts.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestExplorerApi.js +17 -18
- package/dist/client/exchange/rest/ExchangeRestExplorerApi.js.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestSpotChronosApi.d.ts.map +1 -1
- package/dist/client/exchange/rest/ExchangeRestSpotChronosApi.js +2 -3
- package/dist/client/exchange/rest/ExchangeRestSpotChronosApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcAccountApi.d.ts +6 -5
- package/dist/client/indexer/grpc/IndexerGrpcAccountApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcAccountApi.js +62 -8
- package/dist/client/indexer/grpc/IndexerGrpcAccountApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.d.ts +4 -3
- package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.js +20 -2
- package/dist/client/indexer/grpc/IndexerGrpcAuctionApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.d.ts +15 -14
- package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.js +104 -14
- package/dist/client/indexer/grpc/IndexerGrpcDerivativesApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.d.ts +8 -7
- package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.js +76 -10
- package/dist/client/indexer/grpc/IndexerGrpcExplorerApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.d.ts +3 -2
- package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.js +20 -2
- package/dist/client/indexer/grpc/IndexerGrpcInsuranceFundApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcMetaApi.d.ts +1 -0
- package/dist/client/indexer/grpc/IndexerGrpcMetaApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcMetaApi.js +27 -3
- package/dist/client/indexer/grpc/IndexerGrpcMetaApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcOracleApi.d.ts +2 -1
- package/dist/client/indexer/grpc/IndexerGrpcOracleApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcOracleApi.js +27 -3
- package/dist/client/indexer/grpc/IndexerGrpcOracleApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcSpotApi.d.ts +10 -9
- package/dist/client/indexer/grpc/IndexerGrpcSpotApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcSpotApi.js +69 -9
- package/dist/client/indexer/grpc/IndexerGrpcSpotApi.js.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.d.ts +1 -0
- package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.d.ts.map +1 -1
- package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.js +39 -3
- package/dist/client/indexer/grpc/IndexerGrpcTransactionApi.js.map +1 -1
- package/dist/client/indexer/rest/IndexerRestDerivativesChronosApi.d.ts.map +1 -1
- package/dist/client/indexer/rest/IndexerRestDerivativesChronosApi.js +17 -5
- package/dist/client/indexer/rest/IndexerRestDerivativesChronosApi.js.map +1 -1
- package/dist/client/indexer/rest/IndexerRestExplorerApi.d.ts.map +1 -1
- package/dist/client/indexer/rest/IndexerRestExplorerApi.js +135 -53
- package/dist/client/indexer/rest/IndexerRestExplorerApi.js.map +1 -1
- package/dist/client/indexer/rest/IndexerRestMarketChronosApi.d.ts +1 -1
- package/dist/client/indexer/rest/IndexerRestMarketChronosApi.d.ts.map +1 -1
- package/dist/client/indexer/rest/IndexerRestMarketChronosApi.js +9 -2
- package/dist/client/indexer/rest/IndexerRestMarketChronosApi.js.map +1 -1
- package/dist/client/indexer/rest/IndexerRestSpotChronosApi.d.ts +2 -2
- package/dist/client/indexer/rest/IndexerRestSpotChronosApi.d.ts.map +1 -1
- package/dist/client/indexer/rest/IndexerRestSpotChronosApi.js +17 -4
- package/dist/client/indexer/rest/IndexerRestSpotChronosApi.js.map +1 -1
- package/dist/client/indexer/types/index.d.ts +15 -0
- package/dist/client/indexer/types/index.d.ts.map +1 -1
- package/dist/client/indexer/types/index.js +3 -0
- package/dist/client/indexer/types/index.js.map +1 -1
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcInsuranceFundApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcInsuranceFundApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4GAAmH;AACnH,4FAWsE;AACtE,8EAAiD;AACjD,yGAAqG;
|
|
1
|
+
{"version":3,"file":"ChainGrpcInsuranceFundApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcInsuranceFundApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4GAAmH;AACnH,4FAWsE;AACtE,8EAAiD;AACjD,yGAAqG;AACrG,oCAAsC;AACtC,0DAGkC;AAElC;;GAEG;AACH,MAAa,yBAA0B,SAAQ,0BAAY;IAA3D;;QACY,WAAM,GAAW,mBAAW,CAAC,aAAa,CAAA;IA+ItD,CAAC;IA7IO,iBAAiB;;YACrB,MAAM,OAAO,GAAG,IAAI,sCAA2B,EAAE,CAAA;YAEjD,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAIjC,OAAO,EAAE,wBAAkB,CAAC,eAAe,CAAC,CAAA;gBAE9C,OAAO,qEAAiC,CAAC,kCAAkC,CACzE,QAAQ,CACT,CAAA;aACF;YAAC,OA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C9C,IAAI,EAAE,iCAAoB;oBAC1B,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;aACH;QACH,CAAC;KAAA;CACF;AAhJD,8DAgJC"}
|
|
@@ -3,7 +3,8 @@ import BaseConsumer from '../../BaseGrpcConsumer';
|
|
|
3
3
|
* @category Chain Grpc API
|
|
4
4
|
*/
|
|
5
5
|
export declare class ChainGrpcMintApi extends BaseConsumer {
|
|
6
|
-
|
|
6
|
+
protected module: string;
|
|
7
|
+
fetchModuleParams(): Promise<import("../types").MinModuleParams>;
|
|
7
8
|
fetchInflation(): Promise<{
|
|
8
9
|
inflation: string;
|
|
9
10
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcMintApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcMintApi.ts"],"names":[],"mappings":"AASA,OAAO,YAAY,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"ChainGrpcMintApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcMintApi.ts"],"names":[],"mappings":"AASA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AAUjD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAmB;IAErC,iBAAiB;IAyBjB,cAAc;;;IA2Bd,qBAAqB;;;CA4B5B"}
|
|
@@ -19,10 +19,16 @@ const BaseGrpcConsumer_1 = __importDefault(require("../../BaseGrpcConsumer"));
|
|
|
19
19
|
const utils_1 = require("../../../utils");
|
|
20
20
|
const utils_2 = require("@injectivelabs/utils");
|
|
21
21
|
const ChainGrpcMintTransformer_1 = require("./../transformers/ChainGrpcMintTransformer");
|
|
22
|
+
const types_1 = require("../types");
|
|
23
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
22
24
|
/**
|
|
23
25
|
* @category Chain Grpc API
|
|
24
26
|
*/
|
|
25
27
|
class ChainGrpcMintApi extends BaseGrpcConsumer_1.default {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.module = types_1.ChainModule.Mint;
|
|
31
|
+
}
|
|
26
32
|
fetchModuleParams() {
|
|
27
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
34
|
const request = new query_pb_1.QueryParamsRequest();
|
|
@@ -31,7 +37,13 @@ class ChainGrpcMintApi extends BaseGrpcConsumer_1.default {
|
|
|
31
37
|
return ChainGrpcMintTransformer_1.ChainGrpcMintTransformer.moduleParamsResponseToModuleParams(response);
|
|
32
38
|
}
|
|
33
39
|
catch (e) {
|
|
34
|
-
|
|
40
|
+
if (e instanceof exceptions_1.GrpcUnaryRequestException) {
|
|
41
|
+
throw e;
|
|
42
|
+
}
|
|
43
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
44
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
45
|
+
contextModule: this.module,
|
|
46
|
+
});
|
|
35
47
|
}
|
|
36
48
|
});
|
|
37
49
|
}
|
|
@@ -45,7 +57,13 @@ class ChainGrpcMintApi extends BaseGrpcConsumer_1.default {
|
|
|
45
57
|
};
|
|
46
58
|
}
|
|
47
59
|
catch (e) {
|
|
48
|
-
|
|
60
|
+
if (e instanceof exceptions_1.GrpcUnaryRequestException) {
|
|
61
|
+
throw e;
|
|
62
|
+
}
|
|
63
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
64
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
65
|
+
contextModule: this.module,
|
|
66
|
+
});
|
|
49
67
|
}
|
|
50
68
|
});
|
|
51
69
|
}
|
|
@@ -59,7 +77,13 @@ class ChainGrpcMintApi extends BaseGrpcConsumer_1.default {
|
|
|
59
77
|
};
|
|
60
78
|
}
|
|
61
79
|
catch (e) {
|
|
62
|
-
|
|
80
|
+
if (e instanceof exceptions_1.GrpcUnaryRequestException) {
|
|
81
|
+
throw e;
|
|
82
|
+
}
|
|
83
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
84
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
85
|
+
contextModule: this.module,
|
|
86
|
+
});
|
|
63
87
|
}
|
|
64
88
|
});
|
|
65
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcMintApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcMintApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oGAAkG;AAClG,oFAO8D;AAC9D,8EAAiD;AACjD,0CAA4E;AAC5E,gDAAsD;AACtD,yFAAqF;
|
|
1
|
+
{"version":3,"file":"ChainGrpcMintApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcMintApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oGAAkG;AAClG,oFAO8D;AAC9D,8EAAiD;AACjD,0CAA4E;AAC5E,gDAAsD;AACtD,yFAAqF;AACrF,oCAAsC;AACtC,0DAGkC;AAElC;;GAEG;AACH,MAAa,gBAAiB,SAAQ,0BAAY;IAAlD;;QACY,WAAM,GAAW,mBAAW,CAAC,IAAI,CAAA;IAkF7C,CAAC;IAhFO,iBAAiB;;YACrB,MAAM,OAAO,GAAG,IAAI,6BAAsB,EAAE,CAAA;YAE5C,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAIjC,OAAO,EAAE,wBAAS,CAAC,MAAM,CAAC,CAAA;gBAE5B,OAAO,mDAAwB,CAAC,kCAAkC,CAChE,QAAQ,CACT,CAAA;aACF;YAAC,OAAO,CAAU,EAAE;gBACnB,IAAI,CAAC,YAAY,sCAAyB,EAAE;oBAC1C,MAAM,CAAC,CAAA;iBACR;gBAED,MAAM,IAAI,sCAAyB,CAAC,CAAU,EAAE;oBAC9C,IAAI,EAAE,iCAAoB;oBAC1B,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;a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AnFD,4CAmFC"}
|
|
@@ -4,6 +4,7 @@ import { OracleModuleParams } from '../types';
|
|
|
4
4
|
* @category Chain Grpc API
|
|
5
5
|
*/
|
|
6
6
|
export declare class ChainGrpcOracleApi extends BaseConsumer {
|
|
7
|
+
protected module: string;
|
|
7
8
|
fetchModuleParams(): Promise<OracleModuleParams>;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=ChainGrpcOracleApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcOracleApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcOracleApi.ts"],"names":[],"mappings":"AAKA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"ChainGrpcOracleApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcOracleApi.ts"],"names":[],"mappings":"AAKA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAe,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAM1D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAqB;IAEvC,iBAAiB;CAsBxB"}
|
|
@@ -16,10 +16,16 @@ exports.ChainGrpcOracleApi = void 0;
|
|
|
16
16
|
const query_pb_service_1 = require("@injectivelabs/chain-api/injective/oracle/v1beta1/query_pb_service");
|
|
17
17
|
const query_pb_1 = require("@injectivelabs/chain-api/injective/oracle/v1beta1/query_pb");
|
|
18
18
|
const BaseGrpcConsumer_1 = __importDefault(require("../../BaseGrpcConsumer"));
|
|
19
|
+
const types_1 = require("../types");
|
|
20
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
19
21
|
/**
|
|
20
22
|
* @category Chain Grpc API
|
|
21
23
|
*/
|
|
22
24
|
class ChainGrpcOracleApi extends BaseGrpcConsumer_1.default {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.module = types_1.ChainModule.Oracle;
|
|
28
|
+
}
|
|
23
29
|
fetchModuleParams() {
|
|
24
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
31
|
const request = new query_pb_1.QueryParamsRequest();
|
|
@@ -28,7 +34,13 @@ class ChainGrpcOracleApi extends BaseGrpcConsumer_1.default {
|
|
|
28
34
|
return response.toObject();
|
|
29
35
|
}
|
|
30
36
|
catch (e) {
|
|
31
|
-
|
|
37
|
+
if (e instanceof exceptions_1.GrpcUnaryRequestException) {
|
|
38
|
+
throw e;
|
|
39
|
+
}
|
|
40
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
41
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
42
|
+
contextModule: this.module,
|
|
43
|
+
});
|
|
32
44
|
}
|
|
33
45
|
});
|
|
34
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcOracleApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcOracleApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yGAAyG;AACzG,yFAGmE;AACnE,8EAAiD;
|
|
1
|
+
{"version":3,"file":"ChainGrpcOracleApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcOracleApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yGAAyG;AACzG,yFAGmE;AACnE,8EAAiD;AACjD,oCAA0D;AAC1D,0DAGkC;AAElC;;GAEG;AACH,MAAa,kBAAmB,SAAQ,0BAAY;IAApD;;QACY,WAAM,GAAW,mBAAW,CAAC,MAAM,CAAA;IAwB/C,CAAC;IAtBO,iBAAiB;;YACrB,MAAM,OAAO,GAAG,IAAI,6BAAwB,EAAE,CAAA;YAE9C,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAIjC,OAAO,EAAE,wBAAW,CAAC,MAAM,CAAC,CAAA;gBAE9B,OAAO,QAAQ,CAAC,QAAQ,EAAwB,CAAA;aACjD;YAAC,OAAO,CAAU,EAAE;gBACnB,IAAI,CAAC,YAAY,sCAAyB,EAAE;oBAC1C,MAAM,CAAC,CAAA;iBACR;gBAED,MAAM,IAAI,sCAAyB,CAAC,CAAU,EAAE;oBAC9C,IAAI,EAAE,iCAAoB;oBAC1B,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;aACH;QACH,CAAC;KAAA;CACF;AAzBD,gDAyBC"}
|
|
@@ -3,6 +3,7 @@ import BaseConsumer from '../../BaseGrpcConsumer';
|
|
|
3
3
|
* @category Chain Grpc API
|
|
4
4
|
*/
|
|
5
5
|
export declare class ChainGrpcPeggyApi extends BaseConsumer {
|
|
6
|
-
|
|
6
|
+
protected module: string;
|
|
7
|
+
fetchModuleParams(): Promise<import("../types").PeggyModuleParams>;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=ChainGrpcPeggyApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcPeggyApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcPeggyApi.ts"],"names":[],"mappings":"AAKA,OAAO,YAAY,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"ChainGrpcPeggyApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcPeggyApi.ts"],"names":[],"mappings":"AAKA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AAQjD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAoB;IAEtC,iBAAiB;CAwBxB"}
|
|
@@ -17,10 +17,16 @@ const query_pb_service_1 = require("@injectivelabs/chain-api/injective/peggy/v1/
|
|
|
17
17
|
const query_pb_1 = require("@injectivelabs/chain-api/injective/peggy/v1/query_pb");
|
|
18
18
|
const BaseGrpcConsumer_1 = __importDefault(require("../../BaseGrpcConsumer"));
|
|
19
19
|
const transformers_1 = require("../transformers");
|
|
20
|
+
const types_1 = require("../types");
|
|
21
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
20
22
|
/**
|
|
21
23
|
* @category Chain Grpc API
|
|
22
24
|
*/
|
|
23
25
|
class ChainGrpcPeggyApi extends BaseGrpcConsumer_1.default {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.module = types_1.ChainModule.Peggy;
|
|
29
|
+
}
|
|
24
30
|
fetchModuleParams() {
|
|
25
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
32
|
const request = new query_pb_1.QueryParamsRequest();
|
|
@@ -29,7 +35,13 @@ class ChainGrpcPeggyApi extends BaseGrpcConsumer_1.default {
|
|
|
29
35
|
return transformers_1.ChainGrpcPeggyTransformer.moduleParamsResponseToModuleParams(response);
|
|
30
36
|
}
|
|
31
37
|
catch (e) {
|
|
32
|
-
|
|
38
|
+
if (e instanceof exceptions_1.GrpcUnaryRequestException) {
|
|
39
|
+
throw e;
|
|
40
|
+
}
|
|
41
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
42
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
43
|
+
contextModule: this.module,
|
|
44
|
+
});
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcPeggyApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcPeggyApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mGAAkG;AAClG,mFAG6D;AAC7D,8EAAiD;AACjD,kDAA2D;
|
|
1
|
+
{"version":3,"file":"ChainGrpcPeggyApi.js","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcPeggyApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mGAAkG;AAClG,mFAG6D;AAC7D,8EAAiD;AACjD,kDAA2D;AAC3D,oCAAsC;AACtC,0DAGkC;AAElC;;GAEG;AACH,MAAa,iBAAkB,SAAQ,0BAAY;IAAnD;;QACY,WAAM,GAAW,mBAAW,CAAC,KAAK,CAAA;IA0B9C,CAAC;IAxBO,iBAAiB;;YACrB,MAAM,OAAO,GAAG,IAAI,6BAAuB,EAAE,CAAA;YAE7C,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAIjC,OAAO,EAAE,wBAAU,CAAC,MAAM,CAAC,CAAA;gBAE7B,OAAO,wCAAyB,CAAC,kCAAkC,CACjE,QAAQ,CACT,CAAA;aACF;YAAC,OAAO,CAAU,EAAE;gBACnB,IAAI,CAAC,YAAY,sCAAyB,EAAE;oBAC1C,MAAM,CAAC,CAAA;iBACR;gBAED,MAAM,IAAI,sCAAyB,CAAC,CAAU,EAAE;oBAC9C,IAAI,EAAE,iCAAoB;oBAC1B,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;aACH;QACH,CAAC;KAAA;CACF;AA3BD,8CA2BC"}
|
|
@@ -4,99 +4,100 @@ import { PaginationOption } from '../../../types/pagination';
|
|
|
4
4
|
* @category Chain Grpc API
|
|
5
5
|
*/
|
|
6
6
|
export declare class ChainGrpcStakingApi extends BaseConsumer {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
protected module: string;
|
|
8
|
+
fetchModuleParams(): Promise<import("../types").StakingModuleParams>;
|
|
9
|
+
fetchPool(): Promise<import("../types").Pool>;
|
|
9
10
|
fetchValidators(): Promise<{
|
|
10
|
-
validators: import("
|
|
11
|
+
validators: import("../types").Validator[];
|
|
11
12
|
pagination: import("../../../types/pagination").Pagination;
|
|
12
13
|
}>;
|
|
13
|
-
fetchValidator(address: string): Promise<import("
|
|
14
|
+
fetchValidator(address: string): Promise<import("../types").Validator>;
|
|
14
15
|
fetchValidatorDelegations({ validatorAddress, pagination, }: {
|
|
15
16
|
validatorAddress: string;
|
|
16
17
|
pagination?: PaginationOption;
|
|
17
18
|
}): Promise<{
|
|
18
|
-
delegations: import("
|
|
19
|
+
delegations: import("../types").Delegation[];
|
|
19
20
|
pagination: import("../../../types/pagination").Pagination;
|
|
20
21
|
}>;
|
|
21
22
|
fetchValidatorDelegationsNoThrow({ validatorAddress, pagination, }: {
|
|
22
23
|
validatorAddress: string;
|
|
23
24
|
pagination?: PaginationOption;
|
|
24
25
|
}): Promise<{
|
|
25
|
-
delegations: import("
|
|
26
|
+
delegations: import("../types").Delegation[];
|
|
26
27
|
pagination: import("../../../types/pagination").Pagination;
|
|
27
28
|
}>;
|
|
28
29
|
fetchValidatorUnbondingDelegations({ validatorAddress, pagination, }: {
|
|
29
30
|
validatorAddress: string;
|
|
30
31
|
pagination?: PaginationOption;
|
|
31
32
|
}): Promise<{
|
|
32
|
-
unbondingDelegations: import("
|
|
33
|
+
unbondingDelegations: import("../types").UnBondingDelegation[];
|
|
33
34
|
pagination: import("../../../types/pagination").Pagination;
|
|
34
35
|
}>;
|
|
35
36
|
fetchValidatorUnbondingDelegationsNoThrow({ validatorAddress, pagination, }: {
|
|
36
37
|
validatorAddress: string;
|
|
37
38
|
pagination?: PaginationOption;
|
|
38
39
|
}): Promise<{
|
|
39
|
-
unbondingDelegations: import("
|
|
40
|
+
unbondingDelegations: import("../types").UnBondingDelegation[];
|
|
40
41
|
pagination: import("../../../types/pagination").Pagination;
|
|
41
42
|
}>;
|
|
42
43
|
fetchDelegation({ injectiveAddress, validatorAddress, }: {
|
|
43
44
|
injectiveAddress: string;
|
|
44
45
|
validatorAddress: string;
|
|
45
|
-
}): Promise<import("
|
|
46
|
+
}): Promise<import("../types").Delegation>;
|
|
46
47
|
fetchDelegations({ injectiveAddress, pagination, }: {
|
|
47
48
|
injectiveAddress: string;
|
|
48
49
|
pagination?: PaginationOption;
|
|
49
50
|
}): Promise<{
|
|
50
|
-
delegations: import("
|
|
51
|
+
delegations: import("../types").Delegation[];
|
|
51
52
|
pagination: import("../../../types/pagination").Pagination;
|
|
52
53
|
}>;
|
|
53
54
|
fetchDelegationsNoThrow({ injectiveAddress, pagination, }: {
|
|
54
55
|
injectiveAddress: string;
|
|
55
56
|
pagination?: PaginationOption;
|
|
56
57
|
}): Promise<{
|
|
57
|
-
delegations: import("
|
|
58
|
+
delegations: import("../types").Delegation[];
|
|
58
59
|
pagination: import("../../../types/pagination").Pagination;
|
|
59
60
|
}>;
|
|
60
61
|
fetchDelegators({ validatorAddress, pagination, }: {
|
|
61
62
|
validatorAddress: string;
|
|
62
63
|
pagination?: PaginationOption;
|
|
63
64
|
}): Promise<{
|
|
64
|
-
delegations: import("
|
|
65
|
+
delegations: import("../types").Delegation[];
|
|
65
66
|
pagination: import("../../../types/pagination").Pagination;
|
|
66
67
|
}>;
|
|
67
68
|
fetchDelegatorsNoThrow({ validatorAddress, pagination, }: {
|
|
68
69
|
validatorAddress: string;
|
|
69
70
|
pagination?: PaginationOption;
|
|
70
71
|
}): Promise<{
|
|
71
|
-
delegations: import("
|
|
72
|
+
delegations: import("../types").Delegation[];
|
|
72
73
|
pagination: import("../../../types/pagination").Pagination;
|
|
73
74
|
}>;
|
|
74
75
|
fetchUnbondingDelegations({ injectiveAddress, pagination, }: {
|
|
75
76
|
injectiveAddress: string;
|
|
76
77
|
pagination?: PaginationOption;
|
|
77
78
|
}): Promise<{
|
|
78
|
-
unbondingDelegations: import("
|
|
79
|
+
unbondingDelegations: import("../types").UnBondingDelegation[];
|
|
79
80
|
pagination: import("../../../types/pagination").Pagination;
|
|
80
81
|
}>;
|
|
81
82
|
fetchUnbondingDelegationsNoThrow({ injectiveAddress, pagination, }: {
|
|
82
83
|
injectiveAddress: string;
|
|
83
84
|
pagination?: PaginationOption;
|
|
84
85
|
}): Promise<{
|
|
85
|
-
unbondingDelegations: import("
|
|
86
|
+
unbondingDelegations: import("../types").UnBondingDelegation[];
|
|
86
87
|
pagination: import("../../../types/pagination").Pagination;
|
|
87
88
|
}>;
|
|
88
89
|
fetchReDelegations({ injectiveAddress, pagination, }: {
|
|
89
90
|
injectiveAddress: string;
|
|
90
91
|
pagination?: PaginationOption;
|
|
91
92
|
}): Promise<{
|
|
92
|
-
redelegations: import("
|
|
93
|
+
redelegations: import("../types").ReDelegation[];
|
|
93
94
|
pagination: import("../../../types/pagination").Pagination;
|
|
94
95
|
}>;
|
|
95
96
|
fetchReDelegationsNoThrow({ injectiveAddress, pagination, }: {
|
|
96
97
|
injectiveAddress: string;
|
|
97
98
|
pagination?: PaginationOption;
|
|
98
99
|
}): Promise<{
|
|
99
|
-
redelegations: import("
|
|
100
|
+
redelegations: import("../types").ReDelegation[];
|
|
100
101
|
pagination: import("../../../types/pagination").Pagination;
|
|
101
102
|
}>;
|
|
102
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainGrpcStakingApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcStakingApi.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"ChainGrpcStakingApi.d.ts","sourceRoot":"","sources":["../../../../src/client/chain/grpc/ChainGrpcStakingApi.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAS5D;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAsB;IAExC,iBAAiB;IAyBjB,SAAS;IAuBT,eAAe;;;;IAyBf,cAAc,CAAC,OAAO,EAAE,MAAM;IAwB9B,yBAAyB,CAAC,EAC9B,gBAAgB,EAChB,UAAU,GACX,EAAE;QACD,gBAAgB,EAAE,MAAM,CAAA;QACxB,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAC9B;;;;IAgCK,gCAAgC,CAAC,EACrC,gB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C,CAAC,EACrC,gBAAgB,EAChB,UAAU,GACX,EAAE;QACD,gBAAgB,EAAE,MAAM,CAAA;QACxB,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAC9B;;;;IAoCK,kBAAkB,CAAC,EACvB,gBAAgB,EAChB,UAAU,GACX,EAAE;QACD,gBAAgB,EAAE,MAAM,CAAA;QACxB,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAC9B;;;;IAgCK,yBAAyB,CAAC,EAC9B,gBAAgB,EAChB,UAAU,GACX,EAAE;QACD,gBAAgB,EAAE,MAAM,CAAA;QACxB,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAC9B;;;;CAmCF"}
|
|
@@ -18,10 +18,16 @@ const query_pb_service_1 = require("@injectivelabs/chain-api/cosmos/staking/v1be
|
|
|
18
18
|
const BaseGrpcConsumer_1 = __importDefault(require("../../BaseGrpcConsumer"));
|
|
19
19
|
const pagination_1 = require("../../../utils/pagination");
|
|
20
20
|
const transformers_1 = require("../transformers");
|
|
21
|
+
const types_1 = require("../types");
|
|
22
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
21
23
|
/**
|
|
22
24
|
* @category Chain Grpc API
|
|
23
25
|
*/
|
|
24
26
|
class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.module = types_1.ChainModule.Staking;
|
|
30
|
+
}
|
|
25
31
|
fetchModuleParams() {
|
|
26
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
33
|
const request = new query_pb_1.QueryParamsRequest();
|
|
@@ -30,7 +36,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
30
36
|
return transformers_1.ChainGrpcStakingTransformer.moduleParamsResponseToModuleParams(response);
|
|
31
37
|
}
|
|
32
38
|
catch (e) {
|
|
33
|
-
|
|
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
|
+
});
|
|
34
46
|
}
|
|
35
47
|
});
|
|
36
48
|
}
|
|
@@ -42,7 +54,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
42
54
|
return transformers_1.ChainGrpcStakingTransformer.poolResponseToPool(response);
|
|
43
55
|
}
|
|
44
56
|
catch (e) {
|
|
45
|
-
|
|
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
|
+
});
|
|
46
64
|
}
|
|
47
65
|
});
|
|
48
66
|
}
|
|
@@ -54,7 +72,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
54
72
|
return transformers_1.ChainGrpcStakingTransformer.validatorsResponseToValidators(response);
|
|
55
73
|
}
|
|
56
74
|
catch (e) {
|
|
57
|
-
|
|
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
|
+
});
|
|
58
82
|
}
|
|
59
83
|
});
|
|
60
84
|
}
|
|
@@ -67,7 +91,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
67
91
|
return transformers_1.ChainGrpcStakingTransformer.validatorResponseToValidator(response);
|
|
68
92
|
}
|
|
69
93
|
catch (e) {
|
|
70
|
-
|
|
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
|
+
});
|
|
71
101
|
}
|
|
72
102
|
});
|
|
73
103
|
}
|
|
@@ -84,7 +114,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
84
114
|
return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
|
|
85
115
|
}
|
|
86
116
|
catch (e) {
|
|
87
|
-
|
|
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
|
+
});
|
|
88
124
|
}
|
|
89
125
|
});
|
|
90
126
|
}
|
|
@@ -104,7 +140,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
104
140
|
if (e.message.includes('does not exist')) {
|
|
105
141
|
return { delegations: [], pagination: { total: 0, next: '' } };
|
|
106
142
|
}
|
|
107
|
-
|
|
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
|
+
});
|
|
108
150
|
}
|
|
109
151
|
});
|
|
110
152
|
}
|
|
@@ -121,7 +163,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
121
163
|
return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
|
|
122
164
|
}
|
|
123
165
|
catch (e) {
|
|
124
|
-
|
|
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
|
+
});
|
|
125
173
|
}
|
|
126
174
|
});
|
|
127
175
|
}
|
|
@@ -141,7 +189,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
141
189
|
if (e.message.includes('does not exist')) {
|
|
142
190
|
return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
|
|
143
191
|
}
|
|
144
|
-
|
|
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
|
+
});
|
|
145
199
|
}
|
|
146
200
|
});
|
|
147
201
|
}
|
|
@@ -155,7 +209,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
155
209
|
return transformers_1.ChainGrpcStakingTransformer.delegationResponseToDelegation(response);
|
|
156
210
|
}
|
|
157
211
|
catch (e) {
|
|
158
|
-
|
|
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
|
+
});
|
|
159
219
|
}
|
|
160
220
|
});
|
|
161
221
|
}
|
|
@@ -172,7 +232,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
172
232
|
return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
|
|
173
233
|
}
|
|
174
234
|
catch (e) {
|
|
175
|
-
|
|
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
|
+
});
|
|
176
242
|
}
|
|
177
243
|
});
|
|
178
244
|
}
|
|
@@ -192,7 +258,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
192
258
|
if (e.message.includes('does not exist')) {
|
|
193
259
|
return { delegations: [], pagination: { total: 0, next: '' } };
|
|
194
260
|
}
|
|
195
|
-
|
|
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
|
+
});
|
|
196
268
|
}
|
|
197
269
|
});
|
|
198
270
|
}
|
|
@@ -209,7 +281,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
209
281
|
return transformers_1.ChainGrpcStakingTransformer.delegationsResponseToDelegations(response);
|
|
210
282
|
}
|
|
211
283
|
catch (e) {
|
|
212
|
-
|
|
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
|
+
});
|
|
213
291
|
}
|
|
214
292
|
});
|
|
215
293
|
}
|
|
@@ -229,7 +307,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
229
307
|
if (e.message.includes('does not exist')) {
|
|
230
308
|
return { delegations: [], pagination: { total: 0, next: '' } };
|
|
231
309
|
}
|
|
232
|
-
|
|
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
|
+
});
|
|
233
317
|
}
|
|
234
318
|
});
|
|
235
319
|
}
|
|
@@ -246,7 +330,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
246
330
|
return transformers_1.ChainGrpcStakingTransformer.unBondingDelegationsResponseToUnBondingDelegations(response);
|
|
247
331
|
}
|
|
248
332
|
catch (e) {
|
|
249
|
-
|
|
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
|
+
});
|
|
250
340
|
}
|
|
251
341
|
});
|
|
252
342
|
}
|
|
@@ -266,7 +356,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
266
356
|
if (e.message.includes('does not exist')) {
|
|
267
357
|
return { unbondingDelegations: [], pagination: { total: 0, next: '' } };
|
|
268
358
|
}
|
|
269
|
-
|
|
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
|
+
});
|
|
270
366
|
}
|
|
271
367
|
});
|
|
272
368
|
}
|
|
@@ -283,7 +379,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
283
379
|
return transformers_1.ChainGrpcStakingTransformer.reDelegationsResponseToReDelegations(response);
|
|
284
380
|
}
|
|
285
381
|
catch (e) {
|
|
286
|
-
|
|
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
|
+
});
|
|
287
389
|
}
|
|
288
390
|
});
|
|
289
391
|
}
|
|
@@ -303,7 +405,13 @@ class ChainGrpcStakingApi extends BaseGrpcConsumer_1.default {
|
|
|
303
405
|
if (e.message.includes('does not exist')) {
|
|
304
406
|
return { redelegations: [], pagination: { total: 0, next: '' } };
|
|
305
407
|
}
|
|
306
|
-
|
|
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
|
+
});
|
|
307
415
|
}
|
|
308
416
|
});
|
|
309
417
|
}
|