@injectivelabs/sdk-ts 1.16.15 → 1.16.17
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/client/chain/ChainGrpcClient.d.ts +14 -10
- package/dist/cjs/client/chain/ChainGrpcClient.js +26 -20
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthApi.js +2 -2
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthZApi.js +4 -4
- package/dist/cjs/client/chain/grpc/ChainGrpcBankApi.js +5 -5
- package/dist/cjs/client/chain/grpc/ChainGrpcErc20Api.d.ts +28 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcErc20Api.js +124 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcEvmApi.d.ts +30 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcEvmApi.js +198 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcGovApi.js +4 -4
- package/dist/cjs/client/chain/grpc/ChainGrpcIbcApi.js +2 -2
- package/dist/cjs/client/chain/grpc/ChainGrpcStakingApi.js +14 -14
- package/dist/cjs/client/chain/grpc/ChainGrpcWasmApi.js +5 -5
- package/dist/cjs/client/chain/grpc/index.d.ts +15 -13
- package/dist/cjs/client/chain/grpc/index.js +31 -27
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthTransformer.js +2 -2
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthZTransformer.js +4 -4
- package/dist/cjs/client/chain/transformers/ChainGrpcBankTransformer.js +4 -5
- package/dist/cjs/client/chain/transformers/ChainGrpcCommonTransformer.d.ts +5 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcCommonTransformer.js +42 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcErc20Transformer.d.ts +16 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcErc20Transformer.js +31 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcEvmTransformer.d.ts +29 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcEvmTransformer.js +102 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcGovTransformer.js +4 -4
- package/dist/cjs/client/chain/transformers/ChainGrpcStakingTransformer.js +5 -5
- package/dist/cjs/client/chain/transformers/ChainGrpcWasmTransformer.js +6 -6
- package/dist/cjs/client/chain/transformers/index.d.ts +13 -10
- package/dist/cjs/client/chain/transformers/index.js +13 -10
- package/dist/cjs/client/chain/types/erc20.d.ts +13 -0
- package/dist/cjs/client/chain/types/erc20.js +2 -0
- package/dist/cjs/client/chain/types/evm.d.ts +62 -0
- package/dist/cjs/client/chain/types/evm.js +2 -0
- package/dist/cjs/client/chain/types/index.d.ts +20 -16
- package/dist/cjs/client/indexer/grpc/IndexerGrpcAuctionApi.d.ts +19 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcAuctionApi.js +79 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcMegaVaultApi.d.ts +45 -0
- package/dist/cjs/client/indexer/grpc/IndexerGrpcMegaVaultApi.js +207 -0
- package/dist/cjs/client/indexer/grpc/index.d.ts +1 -0
- package/dist/cjs/client/indexer/grpc/index.js +3 -1
- package/dist/cjs/client/indexer/grpc_stream/IndexerGrpcArchiverStream.d.ts +18 -0
- package/dist/cjs/client/indexer/grpc_stream/IndexerGrpcArchiverStream.js +38 -0
- package/dist/cjs/client/indexer/grpc_stream/index.d.ts +1 -0
- package/dist/cjs/client/indexer/grpc_stream/index.js +1 -0
- package/dist/cjs/client/indexer/transformers/IndexerArchiverStreamTransformer.d.ts +11 -0
- package/dist/cjs/client/indexer/transformers/IndexerArchiverStreamTransformer.js +21 -0
- package/dist/cjs/client/indexer/transformers/IndexerAuctionStreamTransformer.d.ts +2 -2
- package/dist/cjs/client/indexer/transformers/IndexerGrpcArchiverTransformer.d.ts +2 -1
- package/dist/cjs/client/indexer/transformers/IndexerGrpcArchiverTransformer.js +8 -0
- package/dist/cjs/client/indexer/transformers/IndexerGrpcAuctionTransformer.d.ts +18 -6
- package/dist/cjs/client/indexer/transformers/IndexerGrpcAuctionTransformer.js +51 -9
- package/dist/cjs/client/indexer/transformers/IndexerGrpcMegaVaultTransformer.d.ts +30 -0
- package/dist/cjs/client/indexer/transformers/IndexerGrpcMegaVaultTransformer.js +230 -0
- package/dist/cjs/client/indexer/transformers/index.d.ts +3 -1
- package/dist/cjs/client/indexer/transformers/index.js +3 -1
- package/dist/cjs/client/indexer/types/archiver.d.ts +7 -0
- package/dist/cjs/client/indexer/types/auction.d.ts +49 -5
- package/dist/cjs/client/indexer/types/index.d.ts +16 -14
- package/dist/cjs/client/indexer/types/mega-vault.d.ts +153 -0
- package/dist/cjs/client/indexer/types/mega-vault.js +11 -0
- package/dist/cjs/core/modules/exchange/index.d.ts +2 -1
- package/dist/cjs/core/modules/exchange/index.js +3 -1
- package/dist/cjs/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.d.ts +44 -0
- package/dist/cjs/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.js +83 -0
- package/dist/cjs/core/modules/msgs.d.ts +2 -1
- package/dist/cjs/utils/pagination.d.ts +11 -12
- package/dist/cjs/utils/pagination.js +14 -72
- package/dist/esm/client/chain/ChainGrpcClient.d.ts +14 -10
- package/dist/esm/client/chain/ChainGrpcClient.js +26 -20
- package/dist/esm/client/chain/grpc/ChainGrpcAuthApi.js +2 -2
- package/dist/esm/client/chain/grpc/ChainGrpcAuthZApi.js +4 -4
- package/dist/esm/client/chain/grpc/ChainGrpcBankApi.js +5 -5
- package/dist/esm/client/chain/grpc/ChainGrpcErc20Api.d.ts +28 -0
- package/dist/esm/client/chain/grpc/ChainGrpcErc20Api.js +117 -0
- package/dist/esm/client/chain/grpc/ChainGrpcEvmApi.d.ts +30 -0
- package/dist/esm/client/chain/grpc/ChainGrpcEvmApi.js +191 -0
- package/dist/esm/client/chain/grpc/ChainGrpcGovApi.js +4 -4
- package/dist/esm/client/chain/grpc/ChainGrpcIbcApi.js +2 -2
- package/dist/esm/client/chain/grpc/ChainGrpcStakingApi.js +14 -14
- package/dist/esm/client/chain/grpc/ChainGrpcWasmApi.js +5 -5
- package/dist/esm/client/chain/grpc/index.d.ts +15 -13
- package/dist/esm/client/chain/grpc/index.js +15 -13
- package/dist/esm/client/chain/transformers/ChainGrpcAuthTransformer.js +2 -2
- package/dist/esm/client/chain/transformers/ChainGrpcAuthZTransformer.js +4 -4
- package/dist/esm/client/chain/transformers/ChainGrpcBankTransformer.js +4 -5
- package/dist/esm/client/chain/transformers/ChainGrpcCommonTransformer.d.ts +5 -0
- package/dist/esm/client/chain/transformers/ChainGrpcCommonTransformer.js +42 -0
- package/dist/esm/client/chain/transformers/ChainGrpcErc20Transformer.d.ts +16 -0
- package/dist/esm/client/chain/transformers/ChainGrpcErc20Transformer.js +27 -0
- package/dist/esm/client/chain/transformers/ChainGrpcEvmTransformer.d.ts +29 -0
- package/dist/esm/client/chain/transformers/ChainGrpcEvmTransformer.js +98 -0
- package/dist/esm/client/chain/transformers/ChainGrpcGovTransformer.js +4 -4
- package/dist/esm/client/chain/transformers/ChainGrpcStakingTransformer.js +5 -5
- package/dist/esm/client/chain/transformers/ChainGrpcWasmTransformer.js +6 -6
- package/dist/esm/client/chain/transformers/index.d.ts +13 -10
- package/dist/esm/client/chain/transformers/index.js +13 -10
- package/dist/esm/client/chain/types/erc20.d.ts +13 -0
- package/dist/esm/client/chain/types/erc20.js +1 -0
- package/dist/esm/client/chain/types/evm.d.ts +62 -0
- package/dist/esm/client/chain/types/evm.js +1 -0
- package/dist/esm/client/chain/types/index.d.ts +20 -16
- package/dist/esm/client/indexer/grpc/IndexerGrpcAuctionApi.d.ts +19 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcAuctionApi.js +79 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcMegaVaultApi.d.ts +45 -0
- package/dist/esm/client/indexer/grpc/IndexerGrpcMegaVaultApi.js +200 -0
- package/dist/esm/client/indexer/grpc/index.d.ts +1 -0
- package/dist/esm/client/indexer/grpc/index.js +1 -0
- package/dist/esm/client/indexer/grpc_stream/IndexerGrpcArchiverStream.d.ts +18 -0
- package/dist/esm/client/indexer/grpc_stream/IndexerGrpcArchiverStream.js +34 -0
- package/dist/esm/client/indexer/grpc_stream/index.d.ts +1 -0
- package/dist/esm/client/indexer/grpc_stream/index.js +1 -0
- package/dist/esm/client/indexer/transformers/IndexerArchiverStreamTransformer.d.ts +11 -0
- package/dist/esm/client/indexer/transformers/IndexerArchiverStreamTransformer.js +17 -0
- package/dist/esm/client/indexer/transformers/IndexerAuctionStreamTransformer.d.ts +2 -2
- package/dist/esm/client/indexer/transformers/IndexerGrpcArchiverTransformer.d.ts +2 -1
- package/dist/esm/client/indexer/transformers/IndexerGrpcArchiverTransformer.js +8 -0
- package/dist/esm/client/indexer/transformers/IndexerGrpcAuctionTransformer.d.ts +18 -6
- package/dist/esm/client/indexer/transformers/IndexerGrpcAuctionTransformer.js +51 -9
- package/dist/esm/client/indexer/transformers/IndexerGrpcMegaVaultTransformer.d.ts +30 -0
- package/dist/esm/client/indexer/transformers/IndexerGrpcMegaVaultTransformer.js +226 -0
- package/dist/esm/client/indexer/transformers/index.d.ts +3 -1
- package/dist/esm/client/indexer/transformers/index.js +3 -1
- package/dist/esm/client/indexer/types/archiver.d.ts +7 -0
- package/dist/esm/client/indexer/types/auction.d.ts +49 -5
- package/dist/esm/client/indexer/types/index.d.ts +16 -14
- package/dist/esm/client/indexer/types/mega-vault.d.ts +153 -0
- package/dist/esm/client/indexer/types/mega-vault.js +10 -0
- package/dist/esm/core/modules/exchange/index.d.ts +2 -1
- package/dist/esm/core/modules/exchange/index.js +2 -1
- package/dist/esm/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.d.ts +44 -0
- package/dist/esm/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.js +77 -0
- package/dist/esm/core/modules/msgs.d.ts +2 -1
- package/dist/esm/utils/pagination.d.ts +11 -12
- package/dist/esm/utils/pagination.js +13 -69
- package/package.json +7 -7
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import snakecaseKeys from 'snakecase-keys';
|
|
2
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
3
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
4
|
+
const createMessage = (params) => {
|
|
5
|
+
const message = InjectiveExchangeV2Tx.MsgCancelPostOnlyMode.create();
|
|
6
|
+
message.sender = params.sender;
|
|
7
|
+
return InjectiveExchangeV2Tx.MsgCancelPostOnlyMode.fromPartial(message);
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @category Messages
|
|
11
|
+
*/
|
|
12
|
+
export default class MsgCancelPostOnlyModeV2 extends MsgBase {
|
|
13
|
+
static fromJSON(params) {
|
|
14
|
+
return new MsgCancelPostOnlyModeV2(params);
|
|
15
|
+
}
|
|
16
|
+
toProto() {
|
|
17
|
+
const { params: initialParams } = this;
|
|
18
|
+
const params = {
|
|
19
|
+
...initialParams,
|
|
20
|
+
};
|
|
21
|
+
return createMessage(params);
|
|
22
|
+
}
|
|
23
|
+
toData() {
|
|
24
|
+
const proto = this.toProto();
|
|
25
|
+
return {
|
|
26
|
+
'@type': '/injective.exchange.v2.MsgCancelPostOnlyMode',
|
|
27
|
+
...proto,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
toAmino() {
|
|
31
|
+
const { params } = this;
|
|
32
|
+
const msg = createMessage(params);
|
|
33
|
+
const message = {
|
|
34
|
+
...snakecaseKeys(msg),
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
type: 'exchange/MsgCancelPostOnlyMode',
|
|
38
|
+
value: message,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
toWeb3Gw() {
|
|
42
|
+
const amino = this.toAmino();
|
|
43
|
+
const { value } = amino;
|
|
44
|
+
return {
|
|
45
|
+
'@type': '/injective.exchange.v2.MsgCancelPostOnlyMode',
|
|
46
|
+
...value,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
toEip712() {
|
|
50
|
+
const amino = this.toAmino();
|
|
51
|
+
const { type, value } = amino;
|
|
52
|
+
const messageAdjusted = {
|
|
53
|
+
...value,
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
type,
|
|
57
|
+
value: messageAdjusted,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
toEip712V2() {
|
|
61
|
+
const web3gw = this.toWeb3Gw();
|
|
62
|
+
const messageAdjusted = {
|
|
63
|
+
...web3gw,
|
|
64
|
+
};
|
|
65
|
+
return messageAdjusted;
|
|
66
|
+
}
|
|
67
|
+
toDirectSign() {
|
|
68
|
+
const proto = this.toProto();
|
|
69
|
+
return {
|
|
70
|
+
type: '/injective.exchange.v2.MsgCancelPostOnlyMode',
|
|
71
|
+
message: proto,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
toBinary() {
|
|
75
|
+
return InjectiveExchangeV2Tx.MsgCancelPostOnlyMode.encode(this.toProto()).finish();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -34,6 +34,7 @@ import type MsgBatchCancelBinaryOptionsOrders from './exchange/msgs/MsgBatchCanc
|
|
|
34
34
|
import type MsgCreateBinaryOptionsMarketOrder from './exchange/msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
35
35
|
import type MsgSetDelegationTransferReceivers from './exchange/msgs/MsgSetDelegationTransferReceivers.js';
|
|
36
36
|
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
37
|
+
import type MsgCancelPostOnlyModeV2 from './exchange/msgs/MsgCancelPostOnlyModeV2.js';
|
|
37
38
|
import type MsgUpdateDerivativeMarketV2 from './exchange/msgs/MsgUpdateDerivativeMarketV2.js';
|
|
38
39
|
import type MsgGrantAllowance from './feegrant/msgs/MsgGrantAllowance.js';
|
|
39
40
|
import type MsgRevokeAllowance from './feegrant/msgs/MsgRevokeAllowance.js';
|
|
@@ -69,7 +70,7 @@ export type AuthzMsgs = MsgGrant | MsgRevoke | MsgAuthzExec | MsgGrantWithAuthor
|
|
|
69
70
|
export type BankMsgs = MsgSend | MsgMultiSend;
|
|
70
71
|
export type DistributionMsgs = MsgFundCommunityPool | MsgWithdrawDelegatorReward | MsgWithdrawValidatorCommission;
|
|
71
72
|
export type ExchangeV1Msgs = MsgDeposit | MsgSignData | MsgWithdraw | MsgRewardsOptOut | MsgCancelSpotOrder | MsgExternalTransfer | MsgBatchUpdateOrders | MsgLiquidatePosition | MsgReclaimLockedFunds | MsgAuthorizeStakeGrants | MsgCreateSpotLimitOrder | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCreateSpotMarketOrder | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgCancelBinaryOptionsOrder | MsgCreateDerivativeLimitOrder | MsgBatchCancelDerivativeOrders | MsgCreateDerivativeMarketOrder | MsgCreateBinaryOptionsLimitOrder | MsgAdminUpdateBinaryOptionsMarket | MsgBatchCancelBinaryOptionsOrders | MsgCreateBinaryOptionsMarketOrder | MsgSetDelegationTransferReceivers;
|
|
72
|
-
export type ExchangeV2Msgs = MsgUpdateSpotMarketV2 | MsgUpdateDerivativeMarketV2;
|
|
73
|
+
export type ExchangeV2Msgs = MsgUpdateSpotMarketV2 | MsgCancelPostOnlyModeV2 | MsgUpdateDerivativeMarketV2;
|
|
73
74
|
export type FeegrantMsgs = MsgGrantAllowance | MsgRevokeAllowance;
|
|
74
75
|
export type GovMsgs = MsgVote | MsgSubmitProposal | MsgGovDeposit;
|
|
75
76
|
export type IbcMsgs = MsgTransfer;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { CosmosBaseQueryV1Beta1Pagination } from '@injectivelabs/core-proto-ts';
|
|
2
|
-
import type { Pagination, PagePagination } from '../types/pagination.js';
|
|
3
1
|
import type { InjectiveExplorerRpc } from '@injectivelabs/indexer-proto-ts';
|
|
4
|
-
import type {
|
|
2
|
+
import type { CosmosBaseQueryV1Beta1Pagination } from '@injectivelabs/core-proto-ts';
|
|
3
|
+
import type { Pagination, PaginationOption, ExchangePagination } from '../types/pagination.js';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use ChainGrpcCommonTransformer.pageRequestToGrpcPageRequest instead
|
|
6
|
+
*/
|
|
5
7
|
export declare const paginationRequestFromPagination: (pagination?: PaginationOption) => CosmosBaseQueryV1Beta1Pagination.PageRequest | undefined;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
} | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use ChainGrpcCommonTransformer.paginationUint8ArrayToString instead
|
|
10
|
+
*/
|
|
11
11
|
export declare const paginationUint8ArrayToString: (key: any) => string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}) => PagePagination;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use ChainGrpcCommonTransformer.grpcPaginationToPagination instead
|
|
14
|
+
*/
|
|
16
15
|
export declare const grpcPaginationToPagination: (pagination: CosmosBaseQueryV1Beta1Pagination.PageResponse | undefined) => Pagination;
|
|
17
16
|
export declare const grpcPagingToPaging: (pagination: InjectiveExplorerRpc.Paging | undefined) => ExchangePagination;
|
|
18
17
|
export declare const fetchAllWithPagination: <T extends {
|
|
@@ -1,77 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChainGrpcCommonTransformer } from '../client/chain/transformers/ChainGrpcCommonTransformer.js';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use ChainGrpcCommonTransformer.pageRequestToGrpcPageRequest instead
|
|
4
|
+
*/
|
|
2
5
|
export const paginationRequestFromPagination = (pagination) => {
|
|
3
|
-
|
|
4
|
-
if (!pagination) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
if (pagination.key) {
|
|
8
|
-
paginationForRequest.key = Buffer.from(pagination.key, 'base64');
|
|
9
|
-
}
|
|
10
|
-
if (pagination.limit !== undefined) {
|
|
11
|
-
paginationForRequest.limit = pagination.limit.toString();
|
|
12
|
-
}
|
|
13
|
-
if (pagination.offset !== undefined) {
|
|
14
|
-
paginationForRequest.offset = pagination.offset.toString();
|
|
15
|
-
}
|
|
16
|
-
if (pagination.reverse !== undefined) {
|
|
17
|
-
paginationForRequest.reverse = pagination.reverse;
|
|
18
|
-
}
|
|
19
|
-
if (pagination.countTotal !== undefined) {
|
|
20
|
-
paginationForRequest.countTotal = pagination.countTotal;
|
|
21
|
-
}
|
|
22
|
-
return paginationForRequest;
|
|
23
|
-
};
|
|
24
|
-
export const generatePagination = (pagination) => {
|
|
25
|
-
if (!pagination) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (!pagination.next) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
pagination: {
|
|
33
|
-
key: pagination.next,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
6
|
+
return ChainGrpcCommonTransformer.pageRequestToGrpcPageRequest(pagination);
|
|
36
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use ChainGrpcCommonTransformer.paginationUint8ArrayToString instead
|
|
10
|
+
*/
|
|
37
11
|
export const paginationUint8ArrayToString = (key) => {
|
|
38
|
-
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
41
|
-
if (key.constructor !== Uint8Array) {
|
|
42
|
-
return key;
|
|
43
|
-
}
|
|
44
|
-
return Buffer.from(key).toString('base64');
|
|
45
|
-
};
|
|
46
|
-
export const pageResponseToPagination = ({ newPagination, oldPagination, }) => {
|
|
47
|
-
if (!newPagination) {
|
|
48
|
-
return {
|
|
49
|
-
prev: null,
|
|
50
|
-
current: null,
|
|
51
|
-
next: null,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const next = paginationUint8ArrayToString(newPagination.next);
|
|
55
|
-
if (!oldPagination) {
|
|
56
|
-
return {
|
|
57
|
-
prev: null,
|
|
58
|
-
current: null,
|
|
59
|
-
next,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
prev: oldPagination.current,
|
|
64
|
-
current: oldPagination.next,
|
|
65
|
-
next,
|
|
66
|
-
};
|
|
12
|
+
return ChainGrpcCommonTransformer.paginationUint8ArrayToString(key);
|
|
67
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use ChainGrpcCommonTransformer.grpcPaginationToPagination instead
|
|
16
|
+
*/
|
|
68
17
|
export const grpcPaginationToPagination = (pagination) => {
|
|
69
|
-
return
|
|
70
|
-
total: pagination
|
|
71
|
-
? parseInt(paginationUint8ArrayToString(pagination.total), 10)
|
|
72
|
-
: 0,
|
|
73
|
-
next: pagination ? paginationUint8ArrayToString(pagination.nextKey) : '',
|
|
74
|
-
};
|
|
18
|
+
return ChainGrpcCommonTransformer.grpcPaginationToPagination(pagination);
|
|
75
19
|
};
|
|
76
20
|
export const grpcPagingToPaging = (pagination) => {
|
|
77
21
|
if (!pagination) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/sdk-ts",
|
|
3
3
|
"description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.17",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|
|
@@ -124,16 +124,16 @@
|
|
|
124
124
|
"@cosmjs/stargate": "^0.33.0",
|
|
125
125
|
"@injectivelabs/abacus-proto-ts": "1.14.0",
|
|
126
126
|
"@injectivelabs/core-proto-ts": "1.16.6",
|
|
127
|
-
"@injectivelabs/exceptions": "1.16.
|
|
127
|
+
"@injectivelabs/exceptions": "1.16.17",
|
|
128
128
|
"@injectivelabs/grpc-web": "^0.0.1",
|
|
129
129
|
"@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
|
|
130
130
|
"@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
|
|
131
|
-
"@injectivelabs/indexer-proto-ts": "1.13.
|
|
131
|
+
"@injectivelabs/indexer-proto-ts": "1.13.19",
|
|
132
132
|
"@injectivelabs/mito-proto-ts": "1.13.2",
|
|
133
|
-
"@injectivelabs/networks": "1.16.
|
|
133
|
+
"@injectivelabs/networks": "1.16.17",
|
|
134
134
|
"@injectivelabs/olp-proto-ts": "1.13.4",
|
|
135
|
-
"@injectivelabs/ts-types": "1.16.
|
|
136
|
-
"@injectivelabs/utils": "1.16.
|
|
135
|
+
"@injectivelabs/ts-types": "1.16.17",
|
|
136
|
+
"@injectivelabs/utils": "1.16.17",
|
|
137
137
|
"@noble/curves": "^1.8.1",
|
|
138
138
|
"@noble/hashes": "^1.7.1",
|
|
139
139
|
"@scure/base": "^1.2.6",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"snakecase-keys": "^5.4.1",
|
|
152
152
|
"viem": "^2.33.2"
|
|
153
153
|
},
|
|
154
|
-
"gitHead": "
|
|
154
|
+
"gitHead": "c99ac11b35e7a212f6a1f82cbf35540d6d053062",
|
|
155
155
|
"typedoc": {
|
|
156
156
|
"entryPoint": "./src/index.ts",
|
|
157
157
|
"readmeFile": "./README.md",
|