@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,27 @@
|
|
|
1
|
+
import { ChainGrpcCommonTransformer } from './ChainGrpcCommonTransformer.js';
|
|
2
|
+
/**
|
|
3
|
+
* @category Chain Grpc Transformer
|
|
4
|
+
*/
|
|
5
|
+
export class ChainGrpcErc20Transformer {
|
|
6
|
+
static grpcTokenPairToTokenPair(grpcTokenPair) {
|
|
7
|
+
return {
|
|
8
|
+
bankDenom: grpcTokenPair.bankDenom,
|
|
9
|
+
erc20Address: grpcTokenPair.erc20Address,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static paramsResponseToParams(response) {
|
|
13
|
+
const params = response.params;
|
|
14
|
+
return {
|
|
15
|
+
denomCreationFee: params?.denomCreationFee,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static tokenPairsResponseToTokenPairs(response) {
|
|
19
|
+
return {
|
|
20
|
+
tokenPairs: response.tokenPairs.map((tokenPair) => ({
|
|
21
|
+
bankDenom: tokenPair.bankDenom,
|
|
22
|
+
erc20Address: tokenPair.erc20Address,
|
|
23
|
+
})),
|
|
24
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { InjectiveEvmV1Query } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import type { EvmParams, EvmBlobConfig, EvmChainConfig, EvmBlobScheduleConfig, GrpcEvmChainConfig, GrpcEvmBlobScheduleConfig, GrpcEvmBlobConfig } from '../types/evm.js';
|
|
3
|
+
/**
|
|
4
|
+
* @category Chain Grpc Transformer
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChainGrpcEvmTransformer {
|
|
7
|
+
static grpcBlobConfigToBlobConfig(config: GrpcEvmBlobConfig): EvmBlobConfig;
|
|
8
|
+
static grpcBlockScheduleConfigToBlockScheduleConfig(config: GrpcEvmBlobScheduleConfig): EvmBlobScheduleConfig;
|
|
9
|
+
static grpcChainConfigToChainConfig(config: GrpcEvmChainConfig): EvmChainConfig;
|
|
10
|
+
/**
|
|
11
|
+
* response transformers
|
|
12
|
+
* */
|
|
13
|
+
static accountResponseToAccount(response: InjectiveEvmV1Query.QueryAccountResponse): {
|
|
14
|
+
balance: string;
|
|
15
|
+
codeHash: string;
|
|
16
|
+
nonce: string;
|
|
17
|
+
};
|
|
18
|
+
static cosmosAccountResponseToCosmosAccount(response: InjectiveEvmV1Query.QueryCosmosAccountResponse): {
|
|
19
|
+
sequence: string;
|
|
20
|
+
cosmosAddress: string;
|
|
21
|
+
accountNumber: string;
|
|
22
|
+
};
|
|
23
|
+
static validatorAccountResponseToValidatorAccount(response: InjectiveEvmV1Query.QueryValidatorAccountResponse): {
|
|
24
|
+
sequence: string;
|
|
25
|
+
accountNumber: string;
|
|
26
|
+
accountAddress: string;
|
|
27
|
+
};
|
|
28
|
+
static paramsResponseToParams(response: InjectiveEvmV1Query.QueryParamsResponse): EvmParams | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category Chain Grpc Transformer
|
|
3
|
+
*/
|
|
4
|
+
export class ChainGrpcEvmTransformer {
|
|
5
|
+
static grpcBlobConfigToBlobConfig(config) {
|
|
6
|
+
return {
|
|
7
|
+
max: config.max,
|
|
8
|
+
target: config.target,
|
|
9
|
+
baseFeeUpdateFraction: config.baseFeeUpdateFraction,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static grpcBlockScheduleConfigToBlockScheduleConfig(config) {
|
|
13
|
+
return {
|
|
14
|
+
cancun: config.cancun
|
|
15
|
+
? this.grpcBlobConfigToBlobConfig(config.cancun)
|
|
16
|
+
: undefined,
|
|
17
|
+
prague: config.prague
|
|
18
|
+
? this.grpcBlobConfigToBlobConfig(config.prague)
|
|
19
|
+
: undefined,
|
|
20
|
+
osaka: config.osaka
|
|
21
|
+
? this.grpcBlobConfigToBlobConfig(config.osaka)
|
|
22
|
+
: undefined,
|
|
23
|
+
verkle: config.verkle
|
|
24
|
+
? this.grpcBlobConfigToBlobConfig(config.verkle)
|
|
25
|
+
: undefined,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static grpcChainConfigToChainConfig(config) {
|
|
29
|
+
return {
|
|
30
|
+
homesteadBlock: config.homesteadBlock,
|
|
31
|
+
daoForkBlock: config.daoForkBlock,
|
|
32
|
+
daoForkSupport: config.daoForkSupport,
|
|
33
|
+
eip150Block: config.eip150Block,
|
|
34
|
+
eip150Hash: config.eip150Hash,
|
|
35
|
+
eip155Block: config.eip155Block,
|
|
36
|
+
eip158Block: config.eip158Block,
|
|
37
|
+
byzantiumBlock: config.byzantiumBlock,
|
|
38
|
+
constantinopleBlock: config.constantinopleBlock,
|
|
39
|
+
petersburgBlock: config.petersburgBlock,
|
|
40
|
+
istanbulBlock: config.istanbulBlock,
|
|
41
|
+
muirGlacierBlock: config.muirGlacierBlock,
|
|
42
|
+
berlinBlock: config.berlinBlock,
|
|
43
|
+
londonBlock: config.londonBlock,
|
|
44
|
+
arrowGlacierBlock: config.arrowGlacierBlock,
|
|
45
|
+
grayGlacierBlock: config.grayGlacierBlock,
|
|
46
|
+
mergeNetsplitBlock: config.mergeNetsplitBlock,
|
|
47
|
+
shanghaiTime: config.shanghaiTime,
|
|
48
|
+
cancunTime: config.cancunTime,
|
|
49
|
+
pragueTime: config.pragueTime,
|
|
50
|
+
eip155ChainId: config.eip155ChainId,
|
|
51
|
+
blobScheduleConfig: config.blobScheduleConfig
|
|
52
|
+
? this.grpcBlockScheduleConfigToBlockScheduleConfig(config.blobScheduleConfig)
|
|
53
|
+
: undefined,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* response transformers
|
|
58
|
+
* */
|
|
59
|
+
static accountResponseToAccount(response) {
|
|
60
|
+
return {
|
|
61
|
+
balance: response.balance,
|
|
62
|
+
codeHash: response.codeHash,
|
|
63
|
+
nonce: response.nonce,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static cosmosAccountResponseToCosmosAccount(response) {
|
|
67
|
+
return {
|
|
68
|
+
sequence: response.sequence,
|
|
69
|
+
cosmosAddress: response.cosmosAddress,
|
|
70
|
+
accountNumber: response.accountNumber,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static validatorAccountResponseToValidatorAccount(response) {
|
|
74
|
+
return {
|
|
75
|
+
sequence: response.sequence,
|
|
76
|
+
accountNumber: response.accountNumber,
|
|
77
|
+
accountAddress: response.accountAddress,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static paramsResponseToParams(response) {
|
|
81
|
+
const { params } = response;
|
|
82
|
+
if (!params) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
evmDenom: params.evmDenom,
|
|
87
|
+
enableCreate: params.enableCreate,
|
|
88
|
+
enableCall: params.enableCall,
|
|
89
|
+
extraEips: params.extraEips,
|
|
90
|
+
chainConfig: params.chainConfig
|
|
91
|
+
? this.grpcChainConfigToChainConfig(params.chainConfig)
|
|
92
|
+
: undefined,
|
|
93
|
+
allowUnprotectedTxs: params.allowUnprotectedTxs,
|
|
94
|
+
authorizedDeployers: params.authorizedDeployers,
|
|
95
|
+
permissioned: params.permissioned,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toHumanReadable } from '@injectivelabs/utils';
|
|
2
2
|
import { uint8ArrayToString } from '../../../utils/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ChainGrpcCommonTransformer } from './ChainGrpcCommonTransformer.js';
|
|
4
4
|
/**
|
|
5
5
|
* @category Chain Grpc Transformer
|
|
6
6
|
*/
|
|
@@ -56,7 +56,7 @@ export class ChainGrpcGovTransformer {
|
|
|
56
56
|
const pagination = response.pagination;
|
|
57
57
|
return {
|
|
58
58
|
proposals: proposals.filter((p) => p),
|
|
59
|
-
pagination: grpcPaginationToPagination(pagination),
|
|
59
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(pagination),
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
static depositsResponseToDeposits(response) {
|
|
@@ -72,7 +72,7 @@ export class ChainGrpcGovTransformer {
|
|
|
72
72
|
});
|
|
73
73
|
return {
|
|
74
74
|
deposits: deposits,
|
|
75
|
-
pagination: grpcPaginationToPagination(pagination),
|
|
75
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(pagination),
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
static grpcVoteToVote(vote) {
|
|
@@ -86,7 +86,7 @@ export class ChainGrpcGovTransformer {
|
|
|
86
86
|
static votesResponseToVotes(response) {
|
|
87
87
|
return {
|
|
88
88
|
votes: response.votes.map(ChainGrpcGovTransformer.grpcVoteToVote),
|
|
89
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
89
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
static tallyResultResponseToTallyResult(response) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toBigNumber, toHumanReadable } from '@injectivelabs/utils';
|
|
2
2
|
import { BondStatus } from '../types/staking.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ChainGrpcCommonTransformer } from './ChainGrpcCommonTransformer.js';
|
|
4
4
|
/**
|
|
5
5
|
* @category Chain Grpc Transformer
|
|
6
6
|
*/
|
|
@@ -23,7 +23,7 @@ export class ChainGrpcStakingTransformer {
|
|
|
23
23
|
const validators = response.validators.map((validator) => ChainGrpcStakingTransformer.grpcValidatorToValidator(validator));
|
|
24
24
|
return {
|
|
25
25
|
validators,
|
|
26
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
26
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
static delegationResponseToDelegation(response) {
|
|
@@ -61,7 +61,7 @@ export class ChainGrpcStakingTransformer {
|
|
|
61
61
|
});
|
|
62
62
|
return {
|
|
63
63
|
delegations,
|
|
64
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
64
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
static unBondingDelegationsResponseToUnBondingDelegations(response) {
|
|
@@ -84,7 +84,7 @@ export class ChainGrpcStakingTransformer {
|
|
|
84
84
|
}, []);
|
|
85
85
|
return {
|
|
86
86
|
unbondingDelegations,
|
|
87
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
87
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
static reDelegationsResponseToReDelegations(response) {
|
|
@@ -115,7 +115,7 @@ export class ChainGrpcStakingTransformer {
|
|
|
115
115
|
}, []);
|
|
116
116
|
return {
|
|
117
117
|
redelegations,
|
|
118
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
118
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
static grpcValidatorToValidator(validator) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromUtf8 } from '../../../utils/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ChainGrpcCommonTransformer } from './ChainGrpcCommonTransformer.js';
|
|
3
3
|
/**
|
|
4
4
|
* @category Chain Grpc Transformer
|
|
5
5
|
*/
|
|
@@ -37,7 +37,7 @@ export class ChainGrpcWasmTransformer {
|
|
|
37
37
|
tokenInfo: JSON.parse(tokenInfoValue || '{}'),
|
|
38
38
|
contractInfo: JSON.parse(contractInfoValue || '{}'),
|
|
39
39
|
marketingInfo: JSON.parse(marketingInfoValue || '{}'),
|
|
40
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
40
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
static allContractStateResponseToContractState(response) {
|
|
@@ -73,7 +73,7 @@ export class ChainGrpcWasmTransformer {
|
|
|
73
73
|
tokenInfo: JSON.parse(tokenInfoValue || '{}'),
|
|
74
74
|
contractInfo: JSON.parse(contractInfoValue || '{}'),
|
|
75
75
|
marketingInfo: JSON.parse(marketingInfoValue || '{}'),
|
|
76
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
76
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
static contactInfoResponseToContractInfo(contractInfo) {
|
|
@@ -114,13 +114,13 @@ export class ChainGrpcWasmTransformer {
|
|
|
114
114
|
static contactHistoryResponseToContractHistory(response) {
|
|
115
115
|
return {
|
|
116
116
|
entriesList: response.entries.map(ChainGrpcWasmTransformer.grpcContractCodeHistoryEntryToContractCodeHistoryEntry),
|
|
117
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
117
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
static contractCodesResponseToContractCodes(response) {
|
|
121
121
|
return {
|
|
122
122
|
codeInfosList: response.codeInfos.map(ChainGrpcWasmTransformer.grpcCodeInfoResponseToCodeInfoResponse),
|
|
123
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
123
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
static contractCodeResponseToContractCode(response) {
|
|
@@ -132,7 +132,7 @@ export class ChainGrpcWasmTransformer {
|
|
|
132
132
|
static contractByCodeResponseToContractByCode(response) {
|
|
133
133
|
return {
|
|
134
134
|
contractsList: response.contracts,
|
|
135
|
-
pagination: grpcPaginationToPagination(response.pagination),
|
|
135
|
+
pagination: ChainGrpcCommonTransformer.grpcPaginationToPagination(response.pagination),
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './ChainGrpcGovTransformer.js';
|
|
2
|
+
export * from './ChainGrpcEvmTransformer.js';
|
|
2
3
|
export * from './ChainGrpcAuthTransformer.js';
|
|
3
|
-
export * from './ChainGrpcAuthZTransformer.js';
|
|
4
4
|
export * from './ChainGrpcBankTransformer.js';
|
|
5
|
-
export * from './ChainGrpcDistributionTransformer.js';
|
|
6
|
-
export * from './ChainGrpcExchangeTransformer.js';
|
|
7
|
-
export * from './ChainGrpcExchangeTransformer.js';
|
|
8
|
-
export * from './ChainGrpcGovTransformer.js';
|
|
9
|
-
export * from './ChainGrpcInsuranceFundTransformer.js';
|
|
10
5
|
export * from './ChainGrpcMintTransformer.js';
|
|
6
|
+
export * from './ChainGrpcWasmTransformer.js';
|
|
7
|
+
export * from './ChainGrpcAuthZTransformer.js';
|
|
11
8
|
export * from './ChainGrpcPeggyTransformer.js';
|
|
12
|
-
export * from './
|
|
9
|
+
export * from './ChainGrpcErc20Transformer.js';
|
|
10
|
+
export * from './ChainGrpcTxFeesTransformer.js';
|
|
11
|
+
export * from './ChainGrpcCommonTransformer.js';
|
|
12
|
+
export * from './ChainGrpcAuctionTransformer.js';
|
|
13
13
|
export * from './ChainGrpcStakingTransformer.js';
|
|
14
|
+
export * from './ChainGrpcExchangeTransformer.js';
|
|
15
|
+
export * from './ChainGrpcExchangeTransformer.js';
|
|
16
|
+
export * from './ChainGrpcPermissionsTransformer.js';
|
|
17
|
+
export * from './ChainGrpcDistributionTransformer.js';
|
|
14
18
|
export * from './ChainGrpcTokenFactoryTransformer.js';
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './ChainGrpcTxFeesTransformer.js';
|
|
19
|
+
export * from './ChainGrpcInsuranceFundTransformer.js';
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './ChainGrpcGovTransformer.js';
|
|
2
|
+
export * from './ChainGrpcEvmTransformer.js';
|
|
2
3
|
export * from './ChainGrpcAuthTransformer.js';
|
|
3
|
-
export * from './ChainGrpcAuthZTransformer.js';
|
|
4
4
|
export * from './ChainGrpcBankTransformer.js';
|
|
5
|
-
export * from './ChainGrpcDistributionTransformer.js';
|
|
6
|
-
export * from './ChainGrpcExchangeTransformer.js';
|
|
7
|
-
export * from './ChainGrpcExchangeTransformer.js';
|
|
8
|
-
export * from './ChainGrpcGovTransformer.js';
|
|
9
|
-
export * from './ChainGrpcInsuranceFundTransformer.js';
|
|
10
5
|
export * from './ChainGrpcMintTransformer.js';
|
|
6
|
+
export * from './ChainGrpcWasmTransformer.js';
|
|
7
|
+
export * from './ChainGrpcAuthZTransformer.js';
|
|
11
8
|
export * from './ChainGrpcPeggyTransformer.js';
|
|
12
|
-
export * from './
|
|
9
|
+
export * from './ChainGrpcErc20Transformer.js';
|
|
10
|
+
export * from './ChainGrpcTxFeesTransformer.js';
|
|
11
|
+
export * from './ChainGrpcCommonTransformer.js';
|
|
12
|
+
export * from './ChainGrpcAuctionTransformer.js';
|
|
13
13
|
export * from './ChainGrpcStakingTransformer.js';
|
|
14
|
+
export * from './ChainGrpcExchangeTransformer.js';
|
|
15
|
+
export * from './ChainGrpcExchangeTransformer.js';
|
|
16
|
+
export * from './ChainGrpcPermissionsTransformer.js';
|
|
17
|
+
export * from './ChainGrpcDistributionTransformer.js';
|
|
14
18
|
export * from './ChainGrpcTokenFactoryTransformer.js';
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './ChainGrpcTxFeesTransformer.js';
|
|
19
|
+
export * from './ChainGrpcInsuranceFundTransformer.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Coin } from '@injectivelabs/ts-types';
|
|
2
|
+
import type { InjectiveErc20V1Beta1Erc20, InjectiveErc20V1Beta1Params } from '@injectivelabs/core-proto-ts';
|
|
3
|
+
export interface TokenPair {
|
|
4
|
+
/** bank denom */
|
|
5
|
+
bankDenom: string;
|
|
6
|
+
/** address of erc20 smart contract that is backed by */
|
|
7
|
+
erc20Address: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Params {
|
|
10
|
+
denomCreationFee?: Coin;
|
|
11
|
+
}
|
|
12
|
+
export type GrpcParams = InjectiveErc20V1Beta1Params.Params;
|
|
13
|
+
export type GrpcTokenPair = InjectiveErc20V1Beta1Erc20.TokenPair;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { InjectiveEvmV1Log, InjectiveEvmV1Params, InjectiveEvmV1ChainConfig } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
export interface EvmLog {
|
|
3
|
+
address: string;
|
|
4
|
+
topics: string[];
|
|
5
|
+
data: Uint8Array;
|
|
6
|
+
blockNumber: string;
|
|
7
|
+
txHash: string;
|
|
8
|
+
txIndex: string;
|
|
9
|
+
blockHash: string;
|
|
10
|
+
index: string;
|
|
11
|
+
removed: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface EvmBlobConfig {
|
|
14
|
+
target: string;
|
|
15
|
+
max: string;
|
|
16
|
+
baseFeeUpdateFraction: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EvmBlobScheduleConfig {
|
|
19
|
+
cancun?: EvmBlobConfig;
|
|
20
|
+
prague?: EvmBlobConfig;
|
|
21
|
+
osaka?: EvmBlobConfig;
|
|
22
|
+
verkle?: EvmBlobConfig;
|
|
23
|
+
}
|
|
24
|
+
export interface EvmChainConfig {
|
|
25
|
+
homesteadBlock: string;
|
|
26
|
+
daoForkBlock: string;
|
|
27
|
+
daoForkSupport: boolean;
|
|
28
|
+
eip150Block: string;
|
|
29
|
+
eip150Hash: string;
|
|
30
|
+
eip155Block: string;
|
|
31
|
+
eip158Block: string;
|
|
32
|
+
byzantiumBlock: string;
|
|
33
|
+
constantinopleBlock: string;
|
|
34
|
+
petersburgBlock: string;
|
|
35
|
+
istanbulBlock: string;
|
|
36
|
+
muirGlacierBlock: string;
|
|
37
|
+
berlinBlock: string;
|
|
38
|
+
londonBlock: string;
|
|
39
|
+
arrowGlacierBlock: string;
|
|
40
|
+
grayGlacierBlock: string;
|
|
41
|
+
mergeNetsplitBlock: string;
|
|
42
|
+
shanghaiTime: string;
|
|
43
|
+
cancunTime: string;
|
|
44
|
+
pragueTime: string;
|
|
45
|
+
eip155ChainId: string;
|
|
46
|
+
blobScheduleConfig?: EvmBlobScheduleConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface EvmParams {
|
|
49
|
+
evmDenom: string;
|
|
50
|
+
enableCreate: boolean;
|
|
51
|
+
enableCall: boolean;
|
|
52
|
+
extraEips: string[];
|
|
53
|
+
chainConfig?: EvmChainConfig;
|
|
54
|
+
allowUnprotectedTxs: boolean;
|
|
55
|
+
authorizedDeployers: string[];
|
|
56
|
+
permissioned: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type GrpcEvmLog = InjectiveEvmV1Log.Log;
|
|
59
|
+
export type GrpcEvmParams = InjectiveEvmV1Params.Params;
|
|
60
|
+
export type GrpcEvmChainConfig = InjectiveEvmV1ChainConfig.ChainConfig;
|
|
61
|
+
export type GrpcEvmBlobScheduleConfig = InjectiveEvmV1ChainConfig.BlobScheduleConfig;
|
|
62
|
+
export type GrpcEvmBlobConfig = InjectiveEvmV1ChainConfig.BlobConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
export * from './gov.js';
|
|
2
|
+
export * from './wasm.js';
|
|
3
|
+
export * from './staking.js';
|
|
4
|
+
export * from './exchange.js';
|
|
5
|
+
export type * from './evm.js';
|
|
2
6
|
export type * from './auth.js';
|
|
3
7
|
export type * from './bank.js';
|
|
4
8
|
export type * from './mint.js';
|
|
5
|
-
export * from './
|
|
9
|
+
export * from './insurance.js';
|
|
6
10
|
export type * from './authZ.js';
|
|
7
11
|
export type * from './peggy.js';
|
|
12
|
+
export type * from './erc20.js';
|
|
8
13
|
export type * from './txFees.js';
|
|
9
14
|
export type * from './oracle.js';
|
|
15
|
+
export * from './permissions.js';
|
|
10
16
|
export type * from './auction.js';
|
|
11
|
-
export * from './staking.js';
|
|
12
|
-
export * from './exchange.js';
|
|
13
17
|
export type * from './auth-rest.js';
|
|
14
18
|
export type * from './bank-rest.js';
|
|
15
|
-
export * from './insurance.js';
|
|
16
19
|
export type * from './distribution.js';
|
|
17
20
|
export type * from './tokenfactory.js';
|
|
18
21
|
export type * from './tendermint-rest.js';
|
|
19
|
-
export * from './permissions.js';
|
|
20
22
|
export interface RestApiResponse<T> {
|
|
21
23
|
data: T;
|
|
22
24
|
}
|
|
23
25
|
export declare const ChainModule: {
|
|
24
|
-
Auction: "chain-auction";
|
|
25
|
-
Auth: "chain-auth";
|
|
26
|
-
Authz: "chain-authz";
|
|
27
|
-
Bank: "chain-bank";
|
|
28
|
-
Distribution: "chain-distribution";
|
|
29
|
-
Exchange: "chain-exchange";
|
|
30
26
|
Gov: "chain-gov";
|
|
31
27
|
Ibc: "chain-ibc";
|
|
32
|
-
|
|
28
|
+
Evm: "chain-evm";
|
|
29
|
+
Auth: "chain-auth";
|
|
30
|
+
Bank: "chain-bank";
|
|
33
31
|
Mint: "chain-mint";
|
|
34
|
-
Oracle: "chain-oracle";
|
|
35
|
-
Peggy: "chain-peggy";
|
|
36
|
-
Staking: "chain-staking";
|
|
37
32
|
Wasm: "chain-wasm";
|
|
33
|
+
Authz: "chain-authz";
|
|
34
|
+
Peggy: "chain-peggy";
|
|
38
35
|
WasmX: "chain-wasmx";
|
|
36
|
+
Erc20: "chain-erc20";
|
|
37
|
+
Oracle: "chain-oracle";
|
|
38
|
+
TxFees: "chain-tx-fees";
|
|
39
|
+
Auction: "chain-auction";
|
|
40
|
+
Staking: "chain-staking";
|
|
41
|
+
Exchange: "chain-exchange";
|
|
39
42
|
Tendermint: "chain-tendermint";
|
|
43
|
+
InsuranceFund: "chain-insurance";
|
|
40
44
|
Permissions: "chain-permissions";
|
|
41
|
-
|
|
45
|
+
Distribution: "chain-distribution";
|
|
42
46
|
};
|
|
@@ -9,8 +9,26 @@ export declare class IndexerGrpcAuctionApi extends BaseGrpcConsumer {
|
|
|
9
9
|
constructor(endpoint: string);
|
|
10
10
|
fetchAuction(round?: number): Promise<{
|
|
11
11
|
auction: import("../types/auction.js").Auction;
|
|
12
|
-
bids: import("../types/auction.js").
|
|
12
|
+
bids: import("../types/auction.js").IndexerAuctionBid[];
|
|
13
13
|
}>;
|
|
14
14
|
fetchAuctions(): Promise<import("../types/auction.js").Auction[]>;
|
|
15
15
|
fetchInjBurnt(): Promise<number>;
|
|
16
|
+
fetchAuctionsHistoryV2({ token, endTime, perPage, }: {
|
|
17
|
+
token?: string;
|
|
18
|
+
endTime?: string;
|
|
19
|
+
perPage?: number;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
auctions: import("../types/auction.js").AuctionV2[];
|
|
22
|
+
next: string[];
|
|
23
|
+
}>;
|
|
24
|
+
fetchAuctionV2(round?: number | string): Promise<import("../types/auction.js").AuctionV2>;
|
|
25
|
+
fetchAccountAuctionsV2({ token, address, perPage, }: {
|
|
26
|
+
token?: string;
|
|
27
|
+
address: string;
|
|
28
|
+
perPage?: number;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
auctions: import("../types/auction.js").AccountAuctionV2[];
|
|
31
|
+
next: string[];
|
|
32
|
+
total: string;
|
|
33
|
+
}>;
|
|
16
34
|
}
|
|
@@ -66,7 +66,7 @@ export class IndexerGrpcAuctionApi extends BaseGrpcConsumer {
|
|
|
66
66
|
const request = {};
|
|
67
67
|
try {
|
|
68
68
|
const response = await this.retry(() => this.client.InjBurntEndpoint(request, this.metadata));
|
|
69
|
-
return
|
|
69
|
+
return Number(response.totalInjBurnt);
|
|
70
70
|
}
|
|
71
71
|
catch (e) {
|
|
72
72
|
if (e instanceof InjectiveAuctionRpc.GrpcWebError) {
|
|
@@ -83,4 +83,82 @@ export class IndexerGrpcAuctionApi extends BaseGrpcConsumer {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
async fetchAuctionsHistoryV2({ token, endTime, perPage = 5, }) {
|
|
87
|
+
const request = InjectiveAuctionRpc.AuctionsHistoryV2Request.create();
|
|
88
|
+
request.perPage = perPage;
|
|
89
|
+
if (endTime) {
|
|
90
|
+
request.endTime = endTime;
|
|
91
|
+
}
|
|
92
|
+
if (token) {
|
|
93
|
+
request.token = token;
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
const response = await this.retry(() => this.client.AuctionsHistoryV2(request, this.metadata));
|
|
97
|
+
return IndexerGrpcAuctionTransformer.auctionsHistoryV2ResponseToAuctionHistory(response);
|
|
98
|
+
}
|
|
99
|
+
catch (e) {
|
|
100
|
+
if (e instanceof InjectiveAuctionRpc.GrpcWebError) {
|
|
101
|
+
throw new GrpcUnaryRequestException(new Error(e.toString()), {
|
|
102
|
+
code: grpcErrorCodeToErrorCode(e.code),
|
|
103
|
+
context: 'AuctionsV2',
|
|
104
|
+
contextModule: this.module,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
throw new GrpcUnaryRequestException(e, {
|
|
108
|
+
code: UnspecifiedErrorCode,
|
|
109
|
+
context: 'AuctionsV2',
|
|
110
|
+
contextModule: this.module,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async fetchAuctionV2(round = -1) {
|
|
115
|
+
const request = InjectiveAuctionRpc.AuctionV2Request.create();
|
|
116
|
+
if (round) {
|
|
117
|
+
request.round = round.toString();
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
const response = await this.retry(() => this.client.AuctionV2(request, this.metadata));
|
|
121
|
+
return IndexerGrpcAuctionTransformer.grpcAuctionV2ToAuctionV2(response);
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
if (e instanceof InjectiveAuctionRpc.GrpcWebError) {
|
|
125
|
+
throw new GrpcUnaryRequestException(new Error(e.toString()), {
|
|
126
|
+
code: grpcErrorCodeToErrorCode(e.code),
|
|
127
|
+
context: 'AuctionV2',
|
|
128
|
+
contextModule: this.module,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
throw new GrpcUnaryRequestException(e, {
|
|
132
|
+
code: UnspecifiedErrorCode,
|
|
133
|
+
context: 'AuctionV2',
|
|
134
|
+
contextModule: this.module,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async fetchAccountAuctionsV2({ token, address, perPage = 5, }) {
|
|
139
|
+
const request = InjectiveAuctionRpc.AccountAuctionsV2Request.create();
|
|
140
|
+
request.address = address;
|
|
141
|
+
request.perPage = perPage;
|
|
142
|
+
if (token) {
|
|
143
|
+
request.token = token.toString();
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const response = await this.retry(() => this.client.AccountAuctionsV2(request, this.metadata));
|
|
147
|
+
return IndexerGrpcAuctionTransformer.accountAuctionsV2ResponseToAccountAuctionsV2(response);
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
if (e instanceof InjectiveAuctionRpc.GrpcWebError) {
|
|
151
|
+
throw new GrpcUnaryRequestException(new Error(e.toString()), {
|
|
152
|
+
code: grpcErrorCodeToErrorCode(e.code),
|
|
153
|
+
context: 'AccountAuctionsV2',
|
|
154
|
+
contextModule: this.module,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
throw new GrpcUnaryRequestException(e, {
|
|
158
|
+
code: UnspecifiedErrorCode,
|
|
159
|
+
context: 'AccountAuctionsV2',
|
|
160
|
+
contextModule: this.module,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
86
164
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InjectiveMegaVaultRpc } from '@injectivelabs/indexer-proto-ts';
|
|
2
|
+
import BaseGrpcConsumer from '../../base/BaseIndexerGrpcConsumer.js';
|
|
3
|
+
/**
|
|
4
|
+
* @category Indexer Grpc API
|
|
5
|
+
*/
|
|
6
|
+
export declare class IndexerGrpcMegaVaultApi extends BaseGrpcConsumer {
|
|
7
|
+
protected module: string;
|
|
8
|
+
protected client: InjectiveMegaVaultRpc.InjectiveMegavaultRPCClientImpl;
|
|
9
|
+
constructor(endpoint: string);
|
|
10
|
+
fetchVault({ vaultAddress }: {
|
|
11
|
+
vaultAddress: string;
|
|
12
|
+
}): Promise<import("../types/mega-vault.js").MegaVault | undefined>;
|
|
13
|
+
fetchVaultUser({ vaultAddress, userAddress, }: {
|
|
14
|
+
userAddress: string;
|
|
15
|
+
vaultAddress: string;
|
|
16
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultUser | undefined>;
|
|
17
|
+
fetchVaultSubscriptions({ token, status, perPage, userAddress, vaultAddress, }: {
|
|
18
|
+
token?: string;
|
|
19
|
+
status?: string;
|
|
20
|
+
perPage?: number;
|
|
21
|
+
userAddress: string;
|
|
22
|
+
vaultAddress: string;
|
|
23
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultSubscription[]>;
|
|
24
|
+
fetchVaultRedemptions({ token, status, perPage, userAddress, vaultAddress, }: {
|
|
25
|
+
token?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
perPage?: number;
|
|
28
|
+
vaultAddress: string;
|
|
29
|
+
userAddress: string;
|
|
30
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultRedemption[]>;
|
|
31
|
+
fetchOperatorRedemptionBuckets({ vaultAddress, operatorAddress, }: {
|
|
32
|
+
vaultAddress: string;
|
|
33
|
+
operatorAddress: string;
|
|
34
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultOperatorRedemptionBucket[]>;
|
|
35
|
+
fetchVaultTvlHistory({ since, vaultAddress, maxDataPoints, }: {
|
|
36
|
+
since: number;
|
|
37
|
+
vaultAddress: string;
|
|
38
|
+
maxDataPoints?: number;
|
|
39
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultHistoricalTVL[]>;
|
|
40
|
+
fetchVaultPnlHistory({ since, vaultAddress, maxDataPoints, }: {
|
|
41
|
+
since: number;
|
|
42
|
+
vaultAddress: string;
|
|
43
|
+
maxDataPoints?: number;
|
|
44
|
+
}): Promise<import("../types/mega-vault.js").MegaVaultHistoricalPnL[]>;
|
|
45
|
+
}
|