@injectivelabs/sdk-ts 1.17.2 → 1.17.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{AbacusGrpcApi-DXSuhb6R.cjs → AbacusGrpcApi-ieWvx9Pk.cjs} +6 -5
- package/dist/cjs/BaseGrpcConsumer-TjcGQpif.d.cts +89 -0
- package/dist/cjs/{BaseGrpcConsumer-EtEQfhmo.cjs → BaseGrpcConsumer-hNH10qOJ.cjs} +22 -3
- package/dist/cjs/{BaseIndexerGrpcConsumer-CW1kTn-_.cjs → BaseIndexerGrpcConsumer-E9xi3hs8.cjs} +1 -1
- package/dist/cjs/{ChainGrpcExchangeApi-CF9ATYqN.cjs → ChainGrpcExchangeApi-C1v-xxCh.cjs} +7 -6
- package/dist/cjs/{ChainRestTendermintApi-vL0g-BF-.cjs → ChainRestTendermintApi-BtxXFstT.cjs} +11 -9
- package/dist/cjs/{IndexerGrpcWeb3GwApi-C7kkr4Il.cjs → IndexerGrpcWeb3GwApi-C5AlN6KV.cjs} +8 -7
- package/dist/cjs/{MsgSetDenomMetadata-CKvxIq_t.cjs → MsgSetDenomMetadata-BHkIa3K_.cjs} +1 -1
- package/dist/cjs/{OLPGrpcApi-BCCb6fBZ.cjs → OLPGrpcApi-D_o2P-SZ.cjs} +6 -5
- package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-Ayot_18R.cjs → QueryTradingStrategyContractTotalStrategies-DY_tydyG.cjs} +3 -3
- package/dist/cjs/{StreamManagerV2-igv0mn2I.cjs → StreamManagerV2-BxM7w64U.cjs} +78 -63
- package/dist/cjs/{chain-CGHrf7gg.cjs → chain-C_8R5bBd.cjs} +92 -74
- package/dist/cjs/client/abacus.cjs +2 -2
- package/dist/cjs/client/abacus.d.cts +4 -2
- package/dist/cjs/client/chain.cjs +4 -4
- package/dist/cjs/client/chain.d.cts +8 -9
- package/dist/cjs/client/indexer.cjs +4 -4
- package/dist/cjs/client/indexer.d.cts +8 -9
- package/dist/cjs/client/olp.cjs +3 -3
- package/dist/cjs/client/olp.d.cts +4 -2
- package/dist/cjs/client/wasm.cjs +5 -5
- package/dist/cjs/client/wasm.d.cts +3 -2
- package/dist/cjs/core/accounts.d.cts +8 -9
- package/dist/cjs/core/modules.cjs +7 -7
- package/dist/cjs/core/modules.d.cts +8 -9
- package/dist/cjs/core/tx.cjs +5 -5
- package/dist/cjs/core/tx.d.cts +8 -9
- package/dist/cjs/cosmjs.cjs +5 -5
- package/dist/cjs/cosmjs.d.cts +2 -3
- package/dist/cjs/exports.cjs +5 -5
- package/dist/cjs/exports.d.cts +2 -3
- package/dist/{esm/index-DOyiZiUK.d.ts → cjs/index-1xa-4b0j.d.cts} +2 -3
- package/dist/cjs/{index-D6ubyMlR.d.cts → index-B-ODtCMF.d.cts} +7 -7
- package/dist/{esm/index-Dn4OxoMy.d.ts → cjs/index-Btix6ZFg.d.cts} +4 -3
- package/dist/{esm/index-BJQt8IpY.d.ts → cjs/index-ByWM_5hr.d.cts} +2 -3
- package/dist/cjs/{index-DemZnO3c.d.cts → index-D9jzqFzT.d.cts} +81 -175
- package/dist/cjs/{index-DjRtDAy5.d.cts → index-Dems0piS.d.cts} +2924 -1125
- package/dist/{esm/index-C_3bL-y4.d.ts → cjs/index-nMOqRjvi.d.cts} +1 -1
- package/dist/cjs/index.cjs +12 -12
- package/dist/cjs/index.d.cts +9 -10
- package/dist/cjs/service.d.cts +3 -4
- package/dist/cjs/{tx-VwbP3UdI.cjs → tx-D3CYce5M.cjs} +8 -7
- package/dist/{esm/tx_pb-zz4o4hHG.d.ts → cjs/tx_pb-Wr-aZfKH.d.cts} +186 -6
- package/dist/cjs/types.d.cts +3 -4
- package/dist/cjs/utils.d.cts +8 -9
- package/dist/esm/{AbacusGrpcApi-Ce1hRKuD.js → AbacusGrpcApi-4J7beM6Y.js} +6 -5
- package/dist/esm/{BaseGrpcConsumer-BTWyD665.js → BaseGrpcConsumer-ByL34muR.js} +22 -3
- package/dist/esm/BaseGrpcConsumer-CQEK92MB.d.ts +89 -0
- package/dist/esm/{BaseIndexerGrpcConsumer-BTZzA_Eg.js → BaseIndexerGrpcConsumer-CUx8BFq4.js} +1 -1
- package/dist/esm/{ChainGrpcExchangeApi-DqdCst2Z.js → ChainGrpcExchangeApi-BxTTr_-W.js} +7 -6
- package/dist/esm/{ChainRestTendermintApi-BT_yOkAV.js → ChainRestTendermintApi-DpVPQNSn.js} +11 -9
- package/dist/esm/{IndexerGrpcWeb3GwApi-B2mgt9tE.js → IndexerGrpcWeb3GwApi-BHz_bM42.js} +8 -7
- package/dist/esm/{MsgSetDenomMetadata-CXgkQ3LF.js → MsgSetDenomMetadata-hxd0v-JN.js} +1 -1
- package/dist/esm/{OLPGrpcApi-DUCfcca_.js → OLPGrpcApi-BNGEcbpR.js} +6 -5
- package/dist/esm/{QueryTradingStrategyContractTotalStrategies-CZWdw3BE.js → QueryTradingStrategyContractTotalStrategies-DqCEu1NJ.js} +3 -3
- package/dist/esm/{StreamManagerV2-B9xiJYLj.js → StreamManagerV2-Dp2D7FL4.js} +78 -63
- package/dist/esm/{chain-CHX5uSpc.js → chain-BGq_0n_H.js} +92 -74
- package/dist/esm/client/abacus.d.ts +4 -2
- package/dist/esm/client/abacus.js +2 -2
- package/dist/esm/client/chain.d.ts +8 -9
- package/dist/esm/client/chain.js +4 -4
- package/dist/esm/client/indexer.d.ts +8 -9
- package/dist/esm/client/indexer.js +4 -4
- package/dist/esm/client/olp.d.ts +4 -2
- package/dist/esm/client/olp.js +3 -3
- package/dist/esm/client/wasm.d.ts +3 -2
- package/dist/esm/client/wasm.js +5 -5
- package/dist/esm/core/accounts.d.ts +8 -9
- package/dist/esm/core/modules.d.ts +8 -9
- package/dist/esm/core/modules.js +7 -7
- package/dist/esm/core/tx.d.ts +8 -9
- package/dist/esm/core/tx.js +5 -5
- package/dist/esm/cosmjs.d.ts +2 -3
- package/dist/esm/cosmjs.js +5 -5
- package/dist/esm/exports.d.ts +2 -3
- package/dist/esm/exports.js +5 -5
- package/dist/{cjs/index-DWbxb1AB.d.cts → esm/index-BJg6-o6s.d.ts} +4 -3
- package/dist/esm/{index--sg5xbEP.d.ts → index-BqYLsIZe.d.ts} +1 -1
- package/dist/esm/{index-Ch477yfL.d.ts → index-BzG_rDxK.d.ts} +80 -174
- package/dist/{cjs/index-lRWP4rKg.d.cts → esm/index-DXl4Xl74.d.ts} +2 -3
- package/dist/{cjs/index-CO3Y9drx.d.cts → esm/index-DbxF8Vb3.d.ts} +2 -3
- package/dist/esm/{index-B-SD0p02.d.ts → index-ICIQoqaU.d.ts} +2924 -1125
- package/dist/{cjs/index-CGvISJoE.d.cts → esm/index-T3rAmwhz.d.ts} +1 -1
- package/dist/esm/index.d.ts +9 -10
- package/dist/esm/index.js +12 -12
- package/dist/esm/service.d.ts +3 -4
- package/dist/esm/{tx-DsGG15fH.js → tx-Bgy5FhAu.js} +8 -7
- package/dist/{cjs/tx_pb-D-cNmrlO.d.cts → esm/tx_pb-DiV92WM9.d.ts} +186 -6
- package/dist/esm/types.d.ts +3 -4
- package/dist/esm/utils.d.ts +8 -9
- package/package.json +5 -5
- package/dist/cjs/BaseGrpcConsumer-Vvj4lzyS.d.cts +0 -1841
- package/dist/cjs/any_pb-CutLnOUR.d.cts +0 -187
- package/dist/esm/BaseGrpcConsumer-6x4RlZ16.d.ts +0 -1841
- package/dist/esm/any_pb-DBt7qvTr.d.ts +0 -187
package/dist/cjs/utils.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "./tx_pb-
|
|
2
|
-
import "./
|
|
3
|
-
import "./index-
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-CGvISJoE.cjs";
|
|
1
|
+
import "./tx_pb-Wr-aZfKH.cjs";
|
|
2
|
+
import "./index-Dems0piS.cjs";
|
|
3
|
+
import { $c as grpcPagingToPagingV2, $l as derivativePriceToChainPrice, $u as ripemd160, Al as getInjectiveAddress, Au as isBrowser, Bl as cosmosSdkDecToBigNumber, Bu as SignTypedDataVersionV4, Cl as uint8ArrayToHex, Cu as spotQuantityToChainQuantityToFixed, Dl as getChecksumAddress, Du as getErrorMessage, El as getAddressFromInjectiveAddress, Eu as bigIntToString, Fl as getDerivativeMarketDecimals, Fu as objectToJson, Gl as denomAmountToChainDenomAmountToFixed, Gu as domainHash, Hl as denomAmountFromChainDenomAmountToFixed, Hu as TypedDataUtilsSanitizeData, Hv as GrpcWebFetchTransport, Il as getDerivativeMarketTensMultiplier, Iu as protoObjectToJson, Jl as derivativeMarginFromChainMarginToFixed, Ju as privateKeyHashToPublicKey, Kl as denomAmountToGrpcChainDenomAmount, Ku as hashToHex, Ll as getSpotMarketDecimals, Lu as safeBigIntStringify, Ml as getSubaccountId, Mu as isNode, Nl as isCw20ContractAddress, Nu as isReactNative, Ol as getDefaultSubaccountId, Ou as grpcCoinToUiCoin, Pl as removeHexPrefix, Pu as isServerSide, Qc as grpcPagingToPaging, Ql as derivativePriceFromChainPriceToFixed, Qu as publicKeyToAddress, Rl as getSpotMarketTensMultiplier, Ru as sortObjectByKeys, Sl as uint8ArrayToBase64, Su as spotQuantityToChainQuantity, Tl as addHexPrefix, Tu as bigIntToNumber, Ul as denomAmountFromGrpcChainDenomAmount, Uu as TypedMessageV4, Vl as denomAmountFromChainDenomAmount, Vu as TypedDataUtilsHashStruct, Wl as denomAmountToChainDenomAmount, Wu as decompressPubKey, Xc as fetchAllWithPagination, Xl as derivativeMarginToChainMarginToFixed, Xu as privateKeyToPublicKey, Yc as recoverTypedSignaturePubKey, Yl as derivativeMarginToChainMargin, Yu as privateKeyHashToPublicKeyBase64, Zc as grpcPaginationToPagination, Zl as derivativePriceFromChainPrice, Zu as privateKeyToPublicKeyBase64, _l as hexToBuff, _u as spotPriceFromChainPriceToFixed, ad as getGasPriceBasedOnMessage, al as BECH32_ADDR_VAL_PREFIX, au as formatAmountToAllowableAmount, bl as toBase64, bu as spotQuantityFromChainQuantity, cd as protobufTimestampToDate, cl as BECH32_PUBKEY_VAL_PREFIX, cu as formatNumberToAllowableTensMultiplier, dl as base64ToUtf8, du as getExactDecimalsFromNumber, ed as sanitizeTypedData, el as pageRequestToGrpcPageRequestV2, eu as derivativePriceToChainPriceToFixed, fl as binaryToBase64, fu as getSignificantDecimalsFromNumber, gl as hexToBase64, gu as spotPriceFromChainPrice, hl as fromUtf8, hu as numberToCosmosSdkDecString, id as getGrpcWebTransport, il as BECH32_ADDR_CONS_PREFIX, iu as derivativeQuantityToChainQuantityToFixed, jl as getInjectiveAddressFromSubaccountId, ju as isJsonString, kl as getEthereumAddress, ku as hexToNumber, ld as protobufTimestampToUnixMs, ll as DEFAULT_DERIVATION_PATH, lu as formatPriceToAllowableDecimals, ml as fromBase64, mu as isNumber, nd as parseCoins, nl as paginationUint8ArrayToString, nu as derivativeQuantityFromChainQuantityToFixed, od as makeTimeoutTimestamp, ol as BECH32_PUBKEY_ACC_PREFIX, ou as formatAmountToAllowableDecimals, pl as concatUint8Arrays, pu as getTensMultiplier, ql as derivativeMarginFromChainMargin, qu as messageHash, rd as ofacList, rl as BECH32_ADDR_ACC_PREFIX, ru as derivativeQuantityToChainQuantity, sd as makeTimeoutTimestampInNs, sl as BECH32_PUBKEY_CONS_PREFIX, su as formatNumberToAllowableDecimals, td as sha256, tl as paginationRequestFromPagination, tu as derivativeQuantityFromChainQuantity, ud as protobufTimestampToUnixSeconds, ul as base64ToUint8Array, uu as formatPriceToAllowablePrice, vl as hexToUint8Array, vu as spotPriceToChainPrice, wl as uint8ArrayToString, wu as bigIntReplacer, xl as toUtf8, xu as spotQuantityFromChainQuantityToFixed, yl as stringToUint8Array, yu as spotPriceToChainPriceToFixed, zl as amountToCosmosSdkDecAmount, zu as sortObjectByKeysWithReduce } from "./index-D9jzqFzT.cjs";
|
|
4
|
+
import "./BaseGrpcConsumer-TjcGQpif.cjs";
|
|
5
|
+
import "./index-ByWM_5hr.cjs";
|
|
6
|
+
import "./index-Btix6ZFg.cjs";
|
|
7
|
+
import "./index-1xa-4b0j.cjs";
|
|
8
|
+
import "./index-nMOqRjvi.cjs";
|
|
10
9
|
export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
2
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
2
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-ByL34muR.js";
|
|
3
3
|
import { IndexerErrorModule } from "@injectivelabs/exceptions";
|
|
4
4
|
import * as PointsSvcPb from "@injectivelabs/abacus-proto-ts-v2/generated/points_svc_pb";
|
|
5
5
|
import { PointsSvcClient } from "@injectivelabs/abacus-proto-ts-v2/generated/points_svc_pb.client";
|
|
@@ -40,11 +40,12 @@ var AbacusGrpcTransformer = class {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/client/abacus/grpc/AbacusGrpcApi.ts
|
|
42
42
|
var AbacusGrpcApi = class extends BaseGrpcConsumer {
|
|
43
|
-
constructor(
|
|
44
|
-
super(
|
|
43
|
+
constructor(..._args) {
|
|
44
|
+
super(..._args);
|
|
45
45
|
_defineProperty(this, "module", IndexerErrorModule.Abacus);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
}
|
|
47
|
+
get client() {
|
|
48
|
+
return this.initClient(PointsSvcClient);
|
|
48
49
|
}
|
|
49
50
|
async fetchAccountLatestPoints(address) {
|
|
50
51
|
const request = PointsSvcPb.PointsLatestForAccountRequest.create({ accountAddress: address });
|
|
@@ -39,17 +39,23 @@ var GrpcWebRpcTransport = class {
|
|
|
39
39
|
* It uses the GrpcWebRpcTransport with GrpcWebFetchTransport from @protobuf-ts/grpcweb-transport.
|
|
40
40
|
*/
|
|
41
41
|
var BaseGrpcConsumer = class {
|
|
42
|
-
constructor(endpoint) {
|
|
42
|
+
constructor(endpoint, options) {
|
|
43
43
|
_defineProperty(this, "transport", void 0);
|
|
44
44
|
_defineProperty(this, "module", "");
|
|
45
45
|
_defineProperty(this, "metadata", void 0);
|
|
46
46
|
_defineProperty(this, "endpoint", void 0);
|
|
47
|
+
_defineProperty(this, "options", void 0);
|
|
48
|
+
_defineProperty(this, "_client", void 0);
|
|
47
49
|
this.endpoint = endpoint;
|
|
48
|
-
this.
|
|
50
|
+
this.options = options;
|
|
51
|
+
this.transport = new GrpcWebRpcTransport(endpoint, options);
|
|
49
52
|
}
|
|
50
53
|
setMetadata(map) {
|
|
51
54
|
this.metadata = map;
|
|
52
|
-
this.transport = new GrpcWebRpcTransport(this.endpoint, {
|
|
55
|
+
this.transport = new GrpcWebRpcTransport(this.endpoint, {
|
|
56
|
+
...this.options,
|
|
57
|
+
meta: this.metadata
|
|
58
|
+
});
|
|
53
59
|
return this;
|
|
54
60
|
}
|
|
55
61
|
clearMetadata() {
|
|
@@ -59,6 +65,19 @@ var BaseGrpcConsumer = class {
|
|
|
59
65
|
return this.transport;
|
|
60
66
|
}
|
|
61
67
|
/**
|
|
68
|
+
* Lazily initializes and returns the gRPC client.
|
|
69
|
+
* Call this from a getter in subclasses to avoid constructor boilerplate.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* private get client() {
|
|
73
|
+
* return this.initClient(MyGrpcClient)
|
|
74
|
+
* }
|
|
75
|
+
*/
|
|
76
|
+
initClient(ClientClass) {
|
|
77
|
+
if (!this._client) this._client = new ClientClass(this.transport);
|
|
78
|
+
return this._client;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
62
81
|
* Builds RpcOptions with metadata
|
|
63
82
|
*/
|
|
64
83
|
getRpcOptions() {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { At as MethodInfo, Dt as DuplexStreamingCall, Et as UnaryCall, Ot as ClientStreamingCall, Tt as RpcTransport, f as GrpcWebTransportAdditionalOptions, kt as ServerStreamingCall, wt as RpcOptions } from "./index-ICIQoqaU.js";
|
|
2
|
+
|
|
3
|
+
//#region src/client/base/GrpcWebRpcTransport.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* GrpcWebRpcTransport provides a simple wrapper around GrpcWebFetchTransport
|
|
7
|
+
* from @protobuf-ts/grpcweb-transport for use with protobuf-ts generated clients.
|
|
8
|
+
*
|
|
9
|
+
* This transport works in browser, Node.js, and React Native environments.
|
|
10
|
+
*/
|
|
11
|
+
declare class GrpcWebRpcTransport implements RpcTransport {
|
|
12
|
+
private transport;
|
|
13
|
+
constructor(baseUrl: string, options?: GrpcWebTransportAdditionalOptions);
|
|
14
|
+
mergeOptions(options?: Partial<RpcOptions>): RpcOptions;
|
|
15
|
+
unary<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): UnaryCall<I, O>;
|
|
16
|
+
serverStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): ServerStreamingCall<I, O>;
|
|
17
|
+
clientStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): ClientStreamingCall<I, O>;
|
|
18
|
+
duplex<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): DuplexStreamingCall<I, O>;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/client/base/BaseGrpcConsumer.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* BaseGrpcConsumer provides base functionality for all gRPC consumers.
|
|
24
|
+
* It uses the GrpcWebRpcTransport with GrpcWebFetchTransport from @protobuf-ts/grpcweb-transport.
|
|
25
|
+
*/
|
|
26
|
+
declare class BaseGrpcConsumer {
|
|
27
|
+
protected transport: GrpcWebRpcTransport;
|
|
28
|
+
protected module: string;
|
|
29
|
+
protected metadata?: Record<string, string>;
|
|
30
|
+
protected endpoint: string;
|
|
31
|
+
protected options?: GrpcWebTransportAdditionalOptions;
|
|
32
|
+
private _client;
|
|
33
|
+
constructor(endpoint: string, options?: GrpcWebTransportAdditionalOptions);
|
|
34
|
+
setMetadata(map: Record<string, string>): this;
|
|
35
|
+
clearMetadata(): void;
|
|
36
|
+
getTransport(): GrpcWebRpcTransport;
|
|
37
|
+
/**
|
|
38
|
+
* Lazily initializes and returns the gRPC client.
|
|
39
|
+
* Call this from a getter in subclasses to avoid constructor boilerplate.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* private get client() {
|
|
43
|
+
* return this.initClient(MyGrpcClient)
|
|
44
|
+
* }
|
|
45
|
+
*/
|
|
46
|
+
protected initClient<TClient>(ClientClass: new (transport: GrpcWebRpcTransport) => TClient): TClient;
|
|
47
|
+
/**
|
|
48
|
+
* Builds RpcOptions with metadata
|
|
49
|
+
*/
|
|
50
|
+
protected getRpcOptions(): RpcOptions;
|
|
51
|
+
/**
|
|
52
|
+
* Retry a gRPC call with exponential backoff
|
|
53
|
+
*/
|
|
54
|
+
protected retry<TResponse>(grpcCall: () => Promise<TResponse>, retries?: number, delay?: number): Promise<TResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Extracts the ABCI error code from a gRPC error message.
|
|
57
|
+
* Chain errors contain patterns like: {key:"ABCICode" value:"100"}
|
|
58
|
+
*/
|
|
59
|
+
private getABCICodeFromMessage;
|
|
60
|
+
/**
|
|
61
|
+
* Extracts the codespace/module from a gRPC error message.
|
|
62
|
+
* Chain errors contain patterns like: {key:"Codespace" value:"exchange"}
|
|
63
|
+
*/
|
|
64
|
+
private getCodespaceFromMessage;
|
|
65
|
+
/**
|
|
66
|
+
* Centralized error handler for gRPC calls.
|
|
67
|
+
* When the error contains chain error details (ABCI code and codespace),
|
|
68
|
+
* throws a TransactionException which will map the error to a user-friendly message.
|
|
69
|
+
* Otherwise throws a GrpcUnaryRequestException for generic gRPC errors.
|
|
70
|
+
*/
|
|
71
|
+
protected handleGrpcError(e: unknown, context: string): never;
|
|
72
|
+
/**
|
|
73
|
+
* Generic wrapper for gRPC calls with retry and error handling
|
|
74
|
+
* Simplifies the common pattern of: retry -> await response -> handle errors
|
|
75
|
+
*
|
|
76
|
+
* Usage with explicit type parameter:
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const response = await this.executeGrpcCall<QueryParamsRequest, QueryParamsResponse>(
|
|
79
|
+
* request,
|
|
80
|
+
* this.client.params.bind(this.client),
|
|
81
|
+
* )
|
|
82
|
+
* ```
|
|
83
|
+
* @template TRequest - The request message type
|
|
84
|
+
* @template TResponse - The response message type
|
|
85
|
+
*/
|
|
86
|
+
protected executeGrpcCall<TRequest extends object = object, TResponse extends object = object>(request: TRequest, clientMethod: (req: TRequest, options?: RpcOptions) => UnaryCall<TRequest, TResponse>): Promise<TResponse>;
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { BaseGrpcConsumer as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { O as denomAmountFromGrpcChainDenomAmount } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { o as ChainModule } from "./ChainRestTendermintApi-
|
|
4
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
3
|
+
import { o as ChainModule } from "./ChainRestTendermintApi-DpVPQNSn.js";
|
|
4
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-ByL34muR.js";
|
|
5
5
|
import { toHumanReadable } from "@injectivelabs/utils";
|
|
6
6
|
import * as InjectiveExchangeV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb";
|
|
7
7
|
import { QueryClient } from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb.client";
|
|
@@ -258,11 +258,12 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
|
|
|
258
258
|
* @category Chain Grpc API
|
|
259
259
|
*/
|
|
260
260
|
var ChainGrpcExchangeApi = class extends BaseGrpcConsumer {
|
|
261
|
-
constructor(
|
|
262
|
-
super(
|
|
261
|
+
constructor(..._args) {
|
|
262
|
+
super(..._args);
|
|
263
263
|
_defineProperty(this, "module", ChainModule.Exchange);
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
}
|
|
265
|
+
get client() {
|
|
266
|
+
return this.initClient(QueryClient);
|
|
266
267
|
}
|
|
267
268
|
async fetchModuleParams() {
|
|
268
269
|
const request = InjectiveExchangeV1Beta1QueryPb.QueryExchangeParamsRequest.create();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Jt as uint8ArrayToString, Kt as uint8ArrayToBase64, l as ChainGrpcCommonTransformer } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
3
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-ByL34muR.js";
|
|
4
4
|
import { t as BaseRestConsumer } from "./BaseRestConsumer-rK4eS4W8.js";
|
|
5
5
|
import { ChainErrorModule, HttpRequestException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
6
6
|
import * as InjectiveCryptoV1Beta1Ethsecp256k1KeysPb from "@injectivelabs/core-proto-ts-v2/generated/injective/crypto/v1beta1/ethsecp256k1/keys_pb";
|
|
@@ -99,11 +99,12 @@ var ChainGrpcAuthTransformer = class ChainGrpcAuthTransformer {
|
|
|
99
99
|
* @category Chain Grpc API
|
|
100
100
|
*/
|
|
101
101
|
var ChainGrpcAuthApi = class extends BaseGrpcConsumer {
|
|
102
|
-
constructor(
|
|
103
|
-
super(
|
|
102
|
+
constructor(..._args) {
|
|
103
|
+
super(..._args);
|
|
104
104
|
_defineProperty(this, "module", ChainModule.Auth);
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
}
|
|
106
|
+
get client() {
|
|
107
|
+
return this.initClient(QueryClient);
|
|
107
108
|
}
|
|
108
109
|
async fetchModuleParams() {
|
|
109
110
|
const request = CosmosAuthV1Beta1QueryPb.QueryParamsRequest.create();
|
|
@@ -131,11 +132,12 @@ var ChainGrpcAuthApi = class extends BaseGrpcConsumer {
|
|
|
131
132
|
* @category Chain Grpc API
|
|
132
133
|
*/
|
|
133
134
|
var ChainGrpcTendermintApi = class extends BaseGrpcConsumer {
|
|
134
|
-
constructor(
|
|
135
|
-
super(
|
|
135
|
+
constructor(..._args) {
|
|
136
|
+
super(..._args);
|
|
136
137
|
_defineProperty(this, "module", ChainModule.Tendermint);
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
}
|
|
139
|
+
get client() {
|
|
140
|
+
return this.initClient(ServiceClient);
|
|
139
141
|
}
|
|
140
142
|
async fetchLatestBlock() {
|
|
141
143
|
const request = CosmosBaseTendermintV1Beta1QueryPb.GetLatestBlockRequest.create();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Pt as base64ToUint8Array, Ut as stringToUint8Array, cn as safeBigIntStringify, qt as uint8ArrayToHex, t as recoverTypedSignaturePubKey } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-
|
|
3
|
+
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-CUx8BFq4.js";
|
|
4
4
|
import * as CosmosTxV1Beta1TxPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb";
|
|
5
5
|
import { DEFAULT_BRIDGE_FEE_DENOM, DEFAULT_BRIDGE_FEE_PRICE, DEFAULT_EXCHANGE_LIMIT, DEFAULT_GAS_LIMIT } from "@injectivelabs/utils";
|
|
6
6
|
import { ErrorType, IndexerErrorModule, TransactionException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
@@ -75,11 +75,12 @@ const IndexerModule = { ...IndexerErrorModule };
|
|
|
75
75
|
* @deprecated use IndexerGrpcWeb3GwApi
|
|
76
76
|
*/
|
|
77
77
|
var IndexerGrpcTransactionApi = class extends BaseIndexerGrpcConsumer {
|
|
78
|
-
constructor(
|
|
79
|
-
super(
|
|
78
|
+
constructor(..._args) {
|
|
79
|
+
super(..._args);
|
|
80
80
|
_defineProperty(this, "module", IndexerModule.Transaction);
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
}
|
|
82
|
+
get client() {
|
|
83
|
+
return this.initClient(InjectiveExchangeRPCClient);
|
|
83
84
|
}
|
|
84
85
|
async prepareTxRequest(args) {
|
|
85
86
|
const { address, chainId, message, memo, estimateGas = true, gasLimit = DEFAULT_GAS_LIMIT, feeDenom = DEFAULT_BRIDGE_FEE_DENOM, feePrice = DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight } = args;
|
|
@@ -184,8 +185,8 @@ var IndexerGrpcTransactionApi = class extends BaseIndexerGrpcConsumer {
|
|
|
184
185
|
* @category Indexer Grpc API
|
|
185
186
|
*/
|
|
186
187
|
var IndexerGrpcWeb3GwApi = class extends IndexerGrpcTransactionApi {
|
|
187
|
-
constructor(
|
|
188
|
-
super(
|
|
188
|
+
constructor(..._args) {
|
|
189
|
+
super(..._args);
|
|
189
190
|
_defineProperty(this, "module", IndexerModule.Web3Gw);
|
|
190
191
|
}
|
|
191
192
|
async prepareEip712Request({ address, chainId, message, memo, sequence, accountNumber, estimateGas = false, gasLimit = DEFAULT_GAS_LIMIT, feeDenom = DEFAULT_BRIDGE_FEE_DENOM, feePrice = DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight, eip712Version = "v1" }) {
|
|
@@ -2,7 +2,7 @@ import { Ht as hexToUint8Array, It as binaryToBase64, Kt as uint8ArrayToBase64,
|
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
3
|
import { A as createAny, F as Address } from "./accounts-C5HEaz0B.js";
|
|
4
4
|
import { n as prepareSignBytes, t as MsgBase } from "./MsgBase-BkRgVbdY.js";
|
|
5
|
-
import { t as ChainGrpcExchangeApi } from "./ChainGrpcExchangeApi-
|
|
5
|
+
import { t as ChainGrpcExchangeApi } from "./ChainGrpcExchangeApi-BxTTr_-W.js";
|
|
6
6
|
import { a as dataToExecData$1, i as ExecArgBase } from "./ExecArgNeptuneWithdraw-uLf3HttI.js";
|
|
7
7
|
import { keccak256 } from "viem";
|
|
8
8
|
import { BigNumber, DEFAULT_BRIDGE_FEE_AMOUNT, DEFAULT_BRIDGE_FEE_DENOM, toChainFormat, toPascalCase } from "@injectivelabs/utils";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
2
2
|
import { r as protobufTimestampToDate } from "./time-DYEqYFao.js";
|
|
3
|
-
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-
|
|
3
|
+
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-CUx8BFq4.js";
|
|
4
4
|
import { IndexerErrorModule } from "@injectivelabs/exceptions";
|
|
5
5
|
import * as DmmPb from "@injectivelabs/olp-proto-ts-v2/generated/dmm_pb";
|
|
6
6
|
import { InjectiveDmmV2RPCClient } from "@injectivelabs/olp-proto-ts-v2/generated/dmm_pb.client";
|
|
@@ -248,11 +248,12 @@ var DmmGrpcTransformer = class DmmGrpcTransformer {
|
|
|
248
248
|
//#endregion
|
|
249
249
|
//#region src/client/olp/grpc/OLPGrpcApi.ts
|
|
250
250
|
var OLPGrpcApi = class extends BaseIndexerGrpcConsumer {
|
|
251
|
-
constructor(
|
|
252
|
-
super(
|
|
251
|
+
constructor(..._args) {
|
|
252
|
+
super(..._args);
|
|
253
253
|
_defineProperty(this, "module", IndexerErrorModule.OLP);
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
}
|
|
255
|
+
get client() {
|
|
256
|
+
return this.initClient(InjectiveDmmV2RPCClient);
|
|
256
257
|
}
|
|
257
258
|
async fetchEpochs(status) {
|
|
258
259
|
const request = DmmPb.GetEpochsRequest.create();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Gt as toUtf8, It as binaryToBase64, Rt as fromBase64, Wt as toBase64 } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { h as ChainGrpcWasmApi } from "./chain-
|
|
3
|
+
import { h as ChainGrpcWasmApi } from "./chain-BGq_0n_H.js";
|
|
4
4
|
import { n as MsgExecuteContractCompat, r as ExecArgNeptuneDeposit, t as ExecArgNeptuneWithdraw } from "./ExecArgNeptuneWithdraw-uLf3HttI.js";
|
|
5
5
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
6
6
|
import { Network, getNetworkEndpoints, isMainnet } from "@injectivelabs/networks";
|
|
@@ -140,11 +140,11 @@ var NeptuneService = class {
|
|
|
140
140
|
* @param network The network to use (default: Mainnet).
|
|
141
141
|
* @param endpoints Optional custom network endpoints.
|
|
142
142
|
*/
|
|
143
|
-
constructor(network = Network.MainnetSentry, endpoints) {
|
|
143
|
+
constructor(network = Network.MainnetSentry, endpoints, options) {
|
|
144
144
|
_defineProperty(this, "client", void 0);
|
|
145
145
|
_defineProperty(this, "priceOracleContract", void 0);
|
|
146
146
|
if (!isMainnet(network)) throw new GeneralException(/* @__PURE__ */ new Error("Please switch to mainnet network"));
|
|
147
|
-
this.client = new ChainGrpcWasmApi((endpoints || getNetworkEndpoints(network)).grpc);
|
|
147
|
+
this.client = new ChainGrpcWasmApi((endpoints || getNetworkEndpoints(network)).grpc, options);
|
|
148
148
|
this.priceOracleContract = NEPTUNE_PRICE_CONTRACT;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Jt as uint8ArrayToString, Xt as bigIntToNumber, Zt as bigIntToString, a as grpcPagingToPagingV2, nn as isJsonString } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { n as GrpcWebRpcTransport } from "./BaseGrpcConsumer-
|
|
4
|
-
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-
|
|
3
|
+
import { n as GrpcWebRpcTransport } from "./BaseGrpcConsumer-ByL34muR.js";
|
|
4
|
+
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-CUx8BFq4.js";
|
|
5
5
|
import { t as BaseRestConsumer } from "./BaseRestConsumer-rK4eS4W8.js";
|
|
6
|
-
import { r as IndexerModule } from "./IndexerGrpcWeb3GwApi-
|
|
6
|
+
import { r as IndexerModule } from "./IndexerGrpcWeb3GwApi-BHz_bM42.js";
|
|
7
7
|
import { a as TradeDirection, c as GrpcStatusCode, d as StreamState, i as OrderState, l as StreamDisconnectReason, m as TokenVerification, p as TokenType, t as StreamOperation, u as StreamEvent } from "./types-68OuBiEQ.js";
|
|
8
8
|
import { BigNumber, toBigNumber, toHumanReadable } from "@injectivelabs/utils";
|
|
9
9
|
import { GeneralException, HttpRequestException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
@@ -2828,11 +2828,12 @@ _defineProperty(IndexerAccountPortfolioStreamTransformer, "accountPortfolioStrea
|
|
|
2828
2828
|
* @category Indexer Grpc API
|
|
2829
2829
|
*/
|
|
2830
2830
|
var IndexerGrpcMitoApi = class extends BaseIndexerGrpcConsumer {
|
|
2831
|
-
constructor(
|
|
2832
|
-
super(
|
|
2831
|
+
constructor(..._args) {
|
|
2832
|
+
super(..._args);
|
|
2833
2833
|
_defineProperty(this, "module", IndexerModule.Mito);
|
|
2834
|
-
|
|
2835
|
-
|
|
2834
|
+
}
|
|
2835
|
+
get client() {
|
|
2836
|
+
return this.initClient(MitoAPIClient);
|
|
2836
2837
|
}
|
|
2837
2838
|
async fetchVault({ contractAddress, slug }) {
|
|
2838
2839
|
const request = GoadesignGoagenMitoApiPb.GetVaultRequest.create();
|
|
@@ -3016,11 +3017,12 @@ var IndexerGrpcMitoApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3016
3017
|
* @category Indexer Grpc API
|
|
3017
3018
|
*/
|
|
3018
3019
|
var IndexerGrpcMetaApi = class extends BaseIndexerGrpcConsumer {
|
|
3019
|
-
constructor(
|
|
3020
|
-
super(
|
|
3020
|
+
constructor(..._args) {
|
|
3021
|
+
super(..._args);
|
|
3021
3022
|
_defineProperty(this, "module", IndexerModule.Meta);
|
|
3022
|
-
|
|
3023
|
-
|
|
3023
|
+
}
|
|
3024
|
+
get client() {
|
|
3025
|
+
return this.initClient(InjectiveMetaRPCClient);
|
|
3024
3026
|
}
|
|
3025
3027
|
async fetchPing() {
|
|
3026
3028
|
const request = InjectiveMetaRpcPb.PingRequest.create();
|
|
@@ -3043,11 +3045,12 @@ var IndexerGrpcMetaApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3043
3045
|
* @category Indexer Grpc API
|
|
3044
3046
|
*/
|
|
3045
3047
|
var IndexerGrpcSpotApi = class extends BaseIndexerGrpcConsumer {
|
|
3046
|
-
constructor(
|
|
3047
|
-
super(
|
|
3048
|
+
constructor(..._args) {
|
|
3049
|
+
super(..._args);
|
|
3048
3050
|
_defineProperty(this, "module", IndexerModule.Spot);
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
+
}
|
|
3052
|
+
get client() {
|
|
3053
|
+
return this.initClient(InjectiveSpotExchangeRPCClient);
|
|
3051
3054
|
}
|
|
3052
3055
|
async fetchMarkets(params) {
|
|
3053
3056
|
const { baseDenom, marketStatus, quoteDenom, marketStatuses } = params || {};
|
|
@@ -3195,11 +3198,12 @@ var IndexerGrpcSpotApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3195
3198
|
* @category Indexer Grpc API
|
|
3196
3199
|
*/
|
|
3197
3200
|
var IndexerGrpcOracleApi = class extends BaseIndexerGrpcConsumer {
|
|
3198
|
-
constructor(
|
|
3199
|
-
super(
|
|
3201
|
+
constructor(..._args) {
|
|
3202
|
+
super(..._args);
|
|
3200
3203
|
_defineProperty(this, "module", IndexerModule.Oracle);
|
|
3201
|
-
|
|
3202
|
-
|
|
3204
|
+
}
|
|
3205
|
+
get client() {
|
|
3206
|
+
return this.initClient(InjectiveOracleRPCClient);
|
|
3203
3207
|
}
|
|
3204
3208
|
async fetchOracleList() {
|
|
3205
3209
|
const request = InjectiveOracleRpcPb.OracleListRequest.create();
|
|
@@ -3235,11 +3239,12 @@ var IndexerGrpcOracleApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3235
3239
|
* @category Indexer Grpc API
|
|
3236
3240
|
*/
|
|
3237
3241
|
var IndexerGrpcAccountApi = class extends BaseIndexerGrpcConsumer {
|
|
3238
|
-
constructor(
|
|
3239
|
-
super(
|
|
3242
|
+
constructor(..._args) {
|
|
3243
|
+
super(..._args);
|
|
3240
3244
|
_defineProperty(this, "module", IndexerModule.Account);
|
|
3241
|
-
|
|
3242
|
-
|
|
3245
|
+
}
|
|
3246
|
+
get client() {
|
|
3247
|
+
return this.initClient(InjectiveAccountsRPCClient);
|
|
3243
3248
|
}
|
|
3244
3249
|
/**
|
|
3245
3250
|
* @deprecated - use IndexerGrpcAccountPortfolioApi.fetchPortfolio instead
|
|
@@ -3307,11 +3312,12 @@ var IndexerGrpcAccountApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3307
3312
|
* @category Indexer Grpc API
|
|
3308
3313
|
*/
|
|
3309
3314
|
var IndexerGrpcAuctionApi = class extends BaseIndexerGrpcConsumer {
|
|
3310
|
-
constructor(
|
|
3311
|
-
super(
|
|
3315
|
+
constructor(..._args) {
|
|
3316
|
+
super(..._args);
|
|
3312
3317
|
_defineProperty(this, "module", IndexerModule.Auction);
|
|
3313
|
-
|
|
3314
|
-
|
|
3318
|
+
}
|
|
3319
|
+
get client() {
|
|
3320
|
+
return this.initClient(InjectiveAuctionRPCClient);
|
|
3315
3321
|
}
|
|
3316
3322
|
async fetchAuction(round) {
|
|
3317
3323
|
const request = InjectiveAuctionRpcPb.AuctionEndpointRequest.create();
|
|
@@ -3368,11 +3374,12 @@ var IndexerGrpcAuctionApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3368
3374
|
* @category Indexer Grpc API
|
|
3369
3375
|
*/
|
|
3370
3376
|
var IndexerGrpcTradingApi = class extends BaseIndexerGrpcConsumer {
|
|
3371
|
-
constructor(
|
|
3372
|
-
super(
|
|
3377
|
+
constructor(..._args) {
|
|
3378
|
+
super(..._args);
|
|
3373
3379
|
_defineProperty(this, "module", IndexerModule.Trading);
|
|
3374
|
-
|
|
3375
|
-
|
|
3380
|
+
}
|
|
3381
|
+
get client() {
|
|
3382
|
+
return this.initClient(InjectiveTradingRPCClient);
|
|
3376
3383
|
}
|
|
3377
3384
|
async fetchTradingStats() {
|
|
3378
3385
|
const request = InjectiveTradingRpcPb.GetTradingStatsRequest.create();
|
|
@@ -3405,11 +3412,12 @@ var IndexerGrpcTradingApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3405
3412
|
* @category Indexer Grpc API
|
|
3406
3413
|
*/
|
|
3407
3414
|
var IndexerGrpcExplorerApi = class extends BaseIndexerGrpcConsumer {
|
|
3408
|
-
constructor(
|
|
3409
|
-
super(
|
|
3415
|
+
constructor(..._args) {
|
|
3416
|
+
super(..._args);
|
|
3410
3417
|
_defineProperty(this, "module", IndexerModule.Explorer);
|
|
3411
|
-
|
|
3412
|
-
|
|
3418
|
+
}
|
|
3419
|
+
get client() {
|
|
3420
|
+
return this.initClient(InjectiveExplorerRPCClient);
|
|
3413
3421
|
}
|
|
3414
3422
|
async fetchTxByHash(hash, isEvmHash = false) {
|
|
3415
3423
|
const request = InjectiveExplorerRpcPb.GetTxByTxHashRequest.create();
|
|
@@ -3554,11 +3562,12 @@ var IndexerGrpcExplorerApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3554
3562
|
* @category Indexer Grpc API
|
|
3555
3563
|
*/
|
|
3556
3564
|
var IndexerGrpcCampaignApi = class extends BaseIndexerGrpcConsumer {
|
|
3557
|
-
constructor(
|
|
3558
|
-
super(
|
|
3565
|
+
constructor(..._args) {
|
|
3566
|
+
super(..._args);
|
|
3559
3567
|
_defineProperty(this, "module", IndexerModule.Campaign);
|
|
3560
|
-
|
|
3561
|
-
|
|
3568
|
+
}
|
|
3569
|
+
get client() {
|
|
3570
|
+
return this.initClient(InjectiveCampaignRPCClient);
|
|
3562
3571
|
}
|
|
3563
3572
|
async fetchCampaign({ skip, limit, marketId, campaignId, accountAddress, contractAddress }) {
|
|
3564
3573
|
const request = InjectiveCampaignRpcPb.RankingRequest.create();
|
|
@@ -3625,11 +3634,12 @@ var IndexerGrpcCampaignApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3625
3634
|
* @category Indexer Grpc API
|
|
3626
3635
|
*/
|
|
3627
3636
|
var IndexerGrpcArchiverApi = class extends BaseIndexerGrpcConsumer {
|
|
3628
|
-
constructor(
|
|
3629
|
-
super(
|
|
3637
|
+
constructor(..._args) {
|
|
3638
|
+
super(..._args);
|
|
3630
3639
|
_defineProperty(this, "module", IndexerModule.Archiver);
|
|
3631
|
-
|
|
3632
|
-
|
|
3640
|
+
}
|
|
3641
|
+
get client() {
|
|
3642
|
+
return this.initClient(InjectiveArchiverRPCClient);
|
|
3633
3643
|
}
|
|
3634
3644
|
async fetchHistoricalBalance({ account, resolution }) {
|
|
3635
3645
|
const request = InjectiveArchiverRpcPb.BalanceRequest.create();
|
|
@@ -3709,11 +3719,12 @@ var IndexerGrpcArchiverApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3709
3719
|
* @category Indexer Grpc API
|
|
3710
3720
|
*/
|
|
3711
3721
|
var IndexerGrpcReferralApi = class extends BaseIndexerGrpcConsumer {
|
|
3712
|
-
constructor(
|
|
3713
|
-
super(
|
|
3722
|
+
constructor(..._args) {
|
|
3723
|
+
super(..._args);
|
|
3714
3724
|
_defineProperty(this, "module", IndexerModule.Referral);
|
|
3715
|
-
|
|
3716
|
-
|
|
3725
|
+
}
|
|
3726
|
+
get client() {
|
|
3727
|
+
return this.initClient(InjectiveReferralRPCClient);
|
|
3717
3728
|
}
|
|
3718
3729
|
async fetchReferrerDetails(address) {
|
|
3719
3730
|
const request = InjectiveReferralRpcPb.GetReferrerDetailsRequest.create();
|
|
@@ -3741,11 +3752,12 @@ var IndexerGrpcReferralApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3741
3752
|
* @category Indexer Grpc API
|
|
3742
3753
|
*/
|
|
3743
3754
|
var IndexerGrpcMegaVaultApi = class extends BaseIndexerGrpcConsumer {
|
|
3744
|
-
constructor(
|
|
3745
|
-
super(
|
|
3755
|
+
constructor(..._args) {
|
|
3756
|
+
super(..._args);
|
|
3746
3757
|
_defineProperty(this, "module", IndexerModule.MegaVault);
|
|
3747
|
-
|
|
3748
|
-
|
|
3758
|
+
}
|
|
3759
|
+
get client() {
|
|
3760
|
+
return this.initClient(InjectiveMegavaultRPCClient);
|
|
3749
3761
|
}
|
|
3750
3762
|
async fetchVault({ vaultAddress }) {
|
|
3751
3763
|
const request = InjectiveMegavaultRpcPb.GetVaultRequest.create();
|
|
@@ -3811,11 +3823,12 @@ var IndexerGrpcMegaVaultApi = class extends BaseIndexerGrpcConsumer {
|
|
|
3811
3823
|
* @category Indexer Grpc API
|
|
3812
3824
|
*/
|
|
3813
3825
|
var IndexerGrpcDerivativesApi = class extends BaseIndexerGrpcConsumer {
|
|
3814
|
-
constructor(
|
|
3815
|
-
super(
|
|
3826
|
+
constructor(..._args) {
|
|
3827
|
+
super(..._args);
|
|
3816
3828
|
_defineProperty(this, "module", IndexerModule.Derivatives);
|
|
3817
|
-
|
|
3818
|
-
|
|
3829
|
+
}
|
|
3830
|
+
get client() {
|
|
3831
|
+
return this.initClient(InjectiveDerivativeExchangeRPCClient);
|
|
3819
3832
|
}
|
|
3820
3833
|
async fetchMarkets(params) {
|
|
3821
3834
|
const { marketStatus, quoteDenom, marketStatuses } = params || {};
|
|
@@ -4026,11 +4039,12 @@ var IndexerGrpcDerivativesApi = class extends BaseIndexerGrpcConsumer {
|
|
|
4026
4039
|
* @category Indexer Grpc API
|
|
4027
4040
|
*/
|
|
4028
4041
|
var IndexerGrpcAccountPortfolioApi = class extends BaseIndexerGrpcConsumer {
|
|
4029
|
-
constructor(
|
|
4030
|
-
super(
|
|
4042
|
+
constructor(..._args) {
|
|
4043
|
+
super(..._args);
|
|
4031
4044
|
_defineProperty(this, "module", IndexerModule.Portfolio);
|
|
4032
|
-
|
|
4033
|
-
|
|
4045
|
+
}
|
|
4046
|
+
get client() {
|
|
4047
|
+
return this.initClient(InjectivePortfolioRPCClient);
|
|
4034
4048
|
}
|
|
4035
4049
|
async fetchAccountPortfolio(address) {
|
|
4036
4050
|
const request = InjectivePortfolioRpcPb.AccountPortfolioRequest.create();
|
|
@@ -4071,11 +4085,12 @@ var IndexerGrpcAccountPortfolioApi = class extends BaseIndexerGrpcConsumer {
|
|
|
4071
4085
|
* @category Indexer Grpc API
|
|
4072
4086
|
*/
|
|
4073
4087
|
var IndexerGrpcInsuranceFundApi = class extends BaseIndexerGrpcConsumer {
|
|
4074
|
-
constructor(
|
|
4075
|
-
super(
|
|
4088
|
+
constructor(..._args) {
|
|
4089
|
+
super(..._args);
|
|
4076
4090
|
_defineProperty(this, "module", IndexerModule.InsuranceFund);
|
|
4077
|
-
|
|
4078
|
-
|
|
4091
|
+
}
|
|
4092
|
+
get client() {
|
|
4093
|
+
return this.initClient(InjectiveInsuranceRPCClient);
|
|
4079
4094
|
}
|
|
4080
4095
|
async fetchRedemptions({ denom, address, status }) {
|
|
4081
4096
|
const request = InjectiveInsuranceRpcPb.RedemptionsRequest.create();
|