@covalenthq/client-sdk 2.3.6 → 2.3.8
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/LICENSE +21 -201
- package/README.md +595 -596
- package/dist/index.js +605 -375
- package/dist/index.js.map +1 -1
- package/dist/src/services/AllChainsService.d.ts +6 -0
- package/dist/src/services/BalanceService.d.ts +22 -4
- package/dist/src/services/BaseService.d.ts +30 -1
- package/dist/src/services/BitcoinService.d.ts +7 -1
- package/dist/src/services/NftService.d.ts +18 -0
- package/dist/src/services/PricingService.d.ts +5 -1
- package/dist/src/services/SecurityService.d.ts +2 -0
- package/dist/src/services/StreamingService.d.ts +76 -27
- package/dist/src/services/TransactionService.d.ts +14 -2
- package/dist/src/utils/types/Generic.types.d.ts +16 -104
- package/dist/src/utils/types/StreamingService.types.d.ts +134 -39
- package/package.json +6 -3
|
@@ -12,6 +12,8 @@ export declare class AllChainsService {
|
|
|
12
12
|
*
|
|
13
13
|
* Commonly used to locate chains which an address is active on with a single API call.
|
|
14
14
|
*
|
|
15
|
+
* **Credit Cost**: 0.5 per call
|
|
16
|
+
*
|
|
15
17
|
* @param {string} walletAddress - The requested wallet address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
16
18
|
* @param {GetAddressActivityQueryParamOpts} queryParamOpts
|
|
17
19
|
* - `testnets`: Set to true to include testnets with activity in the response. By default, it's set to `false` and only returns mainnet activity.
|
|
@@ -50,6 +52,10 @@ export declare class AllChainsService {
|
|
|
50
52
|
*/
|
|
51
53
|
getMultiChainAndMultiAddressTransactions(queryParamOpts?: GetMultiChainMultiAddressTransactionsParamOtps): Promise<GoldRushResponse<MultiChainMultiAddressTransactionsResponse>>;
|
|
52
54
|
/**
|
|
55
|
+
*
|
|
56
|
+
* Fetch paginated spot & historical native and token balances for a single address on up to 10 EVM chains with one API call.
|
|
57
|
+
*
|
|
58
|
+
* **Credit Cost**: 2.5 per call
|
|
53
59
|
*
|
|
54
60
|
* @param {string} walletAddress - The requested wallet Address.
|
|
55
61
|
* @param {GetMultiChainBalanceQueryParamOpts} queryParamOpts
|
|
@@ -10,7 +10,9 @@ export declare class BalanceService {
|
|
|
10
10
|
constructor(execution: Execution);
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
|
-
* Commonly used to fetch the native
|
|
13
|
+
* Commonly used to fetch the native and fungible (ERC20) tokens held by an address. Response includes spot prices and other metadata.
|
|
14
|
+
*
|
|
15
|
+
* **Credit Cost**: 1 per call
|
|
14
16
|
*
|
|
15
17
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
18
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -27,6 +29,8 @@ export declare class BalanceService {
|
|
|
27
29
|
*
|
|
28
30
|
* Commonly used to render a daily portfolio balance for an address broken down by the token. The timeframe is user-configurable, defaults to 30 days.
|
|
29
31
|
*
|
|
32
|
+
* **Credit Cost**: 2 per 30 days
|
|
33
|
+
*
|
|
30
34
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
31
35
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
32
36
|
* @param {GetHistoricalPortfolioForWalletAddressQueryParamOpts} queryParamOpts
|
|
@@ -39,6 +43,8 @@ export declare class BalanceService {
|
|
|
39
43
|
*
|
|
40
44
|
* Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
|
|
41
45
|
*
|
|
46
|
+
* **Credit Cost**: 0.05 per item
|
|
47
|
+
*
|
|
42
48
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
43
49
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
44
50
|
* @param {GetErc20TransfersForWalletAddressQueryParamOpts} queryParamOpts
|
|
@@ -55,6 +61,8 @@ export declare class BalanceService {
|
|
|
55
61
|
*
|
|
56
62
|
* Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
|
|
57
63
|
*
|
|
64
|
+
* **Credit Cost**: 0.05 per item
|
|
65
|
+
*
|
|
58
66
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
59
67
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
60
68
|
* @param {GetErc20TransfersForWalletAddressQueryParamOpts} queryParamOpts
|
|
@@ -69,7 +77,9 @@ export declare class BalanceService {
|
|
|
69
77
|
getErc20TransfersForWalletAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<GoldRushResponse<Erc20TransfersResponse>>;
|
|
70
78
|
/**
|
|
71
79
|
*
|
|
72
|
-
*
|
|
80
|
+
* Used to get a paginated list of current or historical token holders for a specified ERC20 or ERC721 token.
|
|
81
|
+
*
|
|
82
|
+
* **Credit Cost**: 0.02 per item
|
|
73
83
|
*
|
|
74
84
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
75
85
|
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -83,7 +93,9 @@ export declare class BalanceService {
|
|
|
83
93
|
getTokenHoldersV2ForTokenAddress(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<GoldRushResponse<TokenHoldersResponse>>;
|
|
84
94
|
/**
|
|
85
95
|
*
|
|
86
|
-
*
|
|
96
|
+
* Used to get a paginated list of current or historical token holders for a specified ERC20 or ERC721 token.
|
|
97
|
+
*
|
|
98
|
+
* **Credit Cost**: 0.02 per item
|
|
87
99
|
*
|
|
88
100
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
89
101
|
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -97,7 +109,9 @@ export declare class BalanceService {
|
|
|
97
109
|
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<GoldRushResponse<TokenHoldersResponse>>;
|
|
98
110
|
/**
|
|
99
111
|
*
|
|
100
|
-
* Commonly used to fetch the historical native
|
|
112
|
+
* Commonly used to fetch the historical native and fungible (ERC20) tokens held by an address at a given block height or date. Response includes daily prices and other metadata.
|
|
113
|
+
*
|
|
114
|
+
* **Credit Cost**: 1 per call
|
|
101
115
|
*
|
|
102
116
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
103
117
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -113,6 +127,10 @@ export declare class BalanceService {
|
|
|
113
127
|
*/
|
|
114
128
|
getHistoricalTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<GoldRushResponse<HistoricalBalancesResponse>>;
|
|
115
129
|
/**
|
|
130
|
+
*
|
|
131
|
+
* Lightweight endpoint to just get the native token balance for an EVM address.
|
|
132
|
+
*
|
|
133
|
+
* **Credit Cost**: 0.5 per call
|
|
116
134
|
*
|
|
117
135
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
118
136
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -13,6 +13,8 @@ export declare class BaseService {
|
|
|
13
13
|
*
|
|
14
14
|
* Commonly used to fetch and render a single block for a block explorer.
|
|
15
15
|
*
|
|
16
|
+
* **Credit Cost**: 1 per call
|
|
17
|
+
*
|
|
16
18
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
17
19
|
* @param {string} blockHeight - The block height or `latest` for the latest block available.
|
|
18
20
|
*
|
|
@@ -20,7 +22,9 @@ export declare class BaseService {
|
|
|
20
22
|
getBlock(chainName: Chain, blockHeight: string): Promise<GoldRushResponse<BlockResponse>>;
|
|
21
23
|
/**
|
|
22
24
|
*
|
|
23
|
-
* Commonly used to resolve ENS, RNS and Unstoppable Domains addresses.
|
|
25
|
+
* Commonly used to resolve ENS, RNS and Unstoppable Domains addresses. Only supports the resolution of a registered domain to an address.
|
|
26
|
+
*
|
|
27
|
+
* **Credit Cost**: 1 per call
|
|
24
28
|
*
|
|
25
29
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
26
30
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -31,6 +35,8 @@ export declare class BaseService {
|
|
|
31
35
|
*
|
|
32
36
|
* Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
33
37
|
*
|
|
38
|
+
* **Credit Cost**: 1 per call
|
|
39
|
+
*
|
|
34
40
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
35
41
|
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
36
42
|
* @param {string | "latest"} endDate - The end date in YYYY-MM-DD format. Also accepts "latest" for the latest block height
|
|
@@ -44,6 +50,8 @@ export declare class BaseService {
|
|
|
44
50
|
*
|
|
45
51
|
* Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
46
52
|
*
|
|
53
|
+
* **Credit Cost**: 1 per call
|
|
54
|
+
*
|
|
47
55
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
48
56
|
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
49
57
|
* @param {string | "latest"} endDate - The end date in YYYY-MM-DD format. Also accepts "latest" for the latest block height
|
|
@@ -57,6 +65,8 @@ export declare class BaseService {
|
|
|
57
65
|
*
|
|
58
66
|
* Commonly used to get all the event logs of the latest block, or for a range of blocks. Includes sender contract metadata as well as decoded logs.
|
|
59
67
|
*
|
|
68
|
+
* **Credit Cost**: 0.01 per item
|
|
69
|
+
*
|
|
60
70
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
61
71
|
* @param {GetLogsQueryParamOpts} queryParamOpts
|
|
62
72
|
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
@@ -72,6 +82,8 @@ export declare class BaseService {
|
|
|
72
82
|
*
|
|
73
83
|
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
74
84
|
*
|
|
85
|
+
* **Credit Cost**: 0.01 per item
|
|
86
|
+
*
|
|
75
87
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
76
88
|
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
77
89
|
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
@@ -86,6 +98,8 @@ export declare class BaseService {
|
|
|
86
98
|
*
|
|
87
99
|
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
88
100
|
*
|
|
101
|
+
* **Credit Cost**: 0.01 per item
|
|
102
|
+
*
|
|
89
103
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
90
104
|
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
91
105
|
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
@@ -100,6 +114,8 @@ export declare class BaseService {
|
|
|
100
114
|
*
|
|
101
115
|
* Commonly used to get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain.
|
|
102
116
|
*
|
|
117
|
+
* **Credit Cost**: 0.01 per item
|
|
118
|
+
*
|
|
103
119
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
104
120
|
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
105
121
|
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
@@ -115,6 +131,8 @@ export declare class BaseService {
|
|
|
115
131
|
*
|
|
116
132
|
* Commonly used to get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain.
|
|
117
133
|
*
|
|
134
|
+
* **Credit Cost**: 0.01 per item
|
|
135
|
+
*
|
|
118
136
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
119
137
|
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
120
138
|
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
@@ -130,6 +148,7 @@ export declare class BaseService {
|
|
|
130
148
|
*
|
|
131
149
|
* Commonly used to build internal dashboards for all supported chains on Covalent.
|
|
132
150
|
*
|
|
151
|
+
* **Credit Cost**: 0.01 per call
|
|
133
152
|
*
|
|
134
153
|
*/
|
|
135
154
|
getAllChains(): Promise<GoldRushResponse<AllChainsResponse>>;
|
|
@@ -137,10 +156,16 @@ export declare class BaseService {
|
|
|
137
156
|
*
|
|
138
157
|
* Commonly used to build internal status dashboards of all supported chains.
|
|
139
158
|
*
|
|
159
|
+
* **Credit Cost**: 1 per call
|
|
140
160
|
*
|
|
141
161
|
*/
|
|
142
162
|
getAllChainStatus(): Promise<GoldRushResponse<AllChainsStatusResponse>>;
|
|
143
163
|
/**
|
|
164
|
+
*
|
|
165
|
+
* Commonly used to locate chains which an address is active on with a single API call.
|
|
166
|
+
*
|
|
167
|
+
* **Credit Cost**: 0.5 per call
|
|
168
|
+
*
|
|
144
169
|
* @deprecated This method is deprecated and will be removed in the upcoming versions. Please use `AllChainsService.getAddressActivity` instead.
|
|
145
170
|
*
|
|
146
171
|
* Commonly used to locate chains which an address is active on with a single API call.
|
|
@@ -152,6 +177,10 @@ export declare class BaseService {
|
|
|
152
177
|
*/
|
|
153
178
|
getAddressActivity(walletAddress: string, queryParamOpts?: GetAddressActivityQueryParamOpts): Promise<GoldRushResponse<ChainActivityResponse>>;
|
|
154
179
|
/**
|
|
180
|
+
*
|
|
181
|
+
* Get real-time gas estimates for different transaction speeds on a specific network, enabling users to optimize transaction costs and confirmation times.
|
|
182
|
+
*
|
|
183
|
+
* **Credit Cost**: 1 per call
|
|
155
184
|
*
|
|
156
185
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
157
186
|
* @param {string} eventType - The desired event type to retrieve gas prices for. Supports `erc20` transfer events, `uniswapv3` swap events and `nativetokens` transfers.
|
|
@@ -10,6 +10,10 @@ export declare class BitcoinService {
|
|
|
10
10
|
private execution;
|
|
11
11
|
constructor(execution: Execution);
|
|
12
12
|
/**
|
|
13
|
+
*
|
|
14
|
+
* Commonly used to fetch the historical Bitcoin balance held by an address at a given block height or date. Response includes daily prices and other metadata.
|
|
15
|
+
*
|
|
16
|
+
* **Credit Cost**: 1 per call
|
|
13
17
|
*
|
|
14
18
|
* @param {string} walletAddress - The requested Bitcoin HD address.
|
|
15
19
|
* @param {GetBitcoinHdWalletBalancesQueryParamOpts} queryParamOpts
|
|
@@ -29,7 +33,9 @@ export declare class BitcoinService {
|
|
|
29
33
|
getTransactionsForBtcAddress(queryParamOpts?: GetTransactionsForBitcoinAddressParamOpts): Promise<GoldRushResponse<BitcoinTransactionResponse>>;
|
|
30
34
|
/**
|
|
31
35
|
*
|
|
32
|
-
*
|
|
36
|
+
* Fetch Bitcoin balance for a non-HD address. Response includes spot prices and other metadata.
|
|
37
|
+
*
|
|
38
|
+
* **Credit Cost**: 1 per call
|
|
33
39
|
*
|
|
34
40
|
* @param {string} walletAddress - The requested Bitcoin Non HD address.
|
|
35
41
|
* @param {GetBitcoinNonHdWalletBalancesQueryParamOpts} queryParamOpts
|
|
@@ -18,6 +18,7 @@ export declare class NftService {
|
|
|
18
18
|
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
19
19
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
20
20
|
*
|
|
21
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
21
22
|
*/
|
|
22
23
|
getChainCollections(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<GoldRushResponse<ChainCollectionResponse>>;
|
|
23
24
|
/**
|
|
@@ -30,12 +31,15 @@ export declare class NftService {
|
|
|
30
31
|
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
31
32
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
32
33
|
*
|
|
34
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
33
35
|
*/
|
|
34
36
|
getChainCollectionsByPage(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<GoldRushResponse<ChainCollectionResponse>>;
|
|
35
37
|
/**
|
|
36
38
|
*
|
|
37
39
|
* Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.
|
|
38
40
|
*
|
|
41
|
+
* **Credit Cost**: 1 per call
|
|
42
|
+
*
|
|
39
43
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
40
44
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
41
45
|
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
@@ -59,6 +63,7 @@ export declare class NftService {
|
|
|
59
63
|
* - `valuesFilter`: Filters NFTs based on a specific trait value. If this filter is used, the API will return all NFTs with the specified trait value. If used with "traits-filter", only NFTs matching both filters will be returned. Accepts comma-separated values, is case-sensitive, and requires proper URL encoding.
|
|
60
64
|
* - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
|
|
61
65
|
*
|
|
66
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
62
67
|
*/
|
|
63
68
|
getTokenIdsForContractWithMetadata(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<GoldRushResponse<NftMetadataResponse>>;
|
|
64
69
|
/**
|
|
@@ -75,6 +80,7 @@ export declare class NftService {
|
|
|
75
80
|
* - `valuesFilter`: Filters NFTs based on a specific trait value. If this filter is used, the API will return all NFTs with the specified trait value. If used with "traits-filter", only NFTs matching both filters will be returned. Accepts comma-separated values, is case-sensitive, and requires proper URL encoding.
|
|
76
81
|
* - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
|
|
77
82
|
*
|
|
83
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
78
84
|
*/
|
|
79
85
|
getTokenIdsForContractWithMetadataByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
80
86
|
/**
|
|
@@ -88,6 +94,7 @@ export declare class NftService {
|
|
|
88
94
|
* - `noMetadata`: Omit metadata.
|
|
89
95
|
* - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
|
|
90
96
|
*
|
|
97
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
91
98
|
*/
|
|
92
99
|
getNftMetadataForGivenTokenIdForContract(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
93
100
|
/**
|
|
@@ -100,6 +107,7 @@ export declare class NftService {
|
|
|
100
107
|
* @param {GetNftTransactionsForContractTokenIdQueryParamOpts} queryParamOpts
|
|
101
108
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
102
109
|
*
|
|
110
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
103
111
|
*/
|
|
104
112
|
getNftTransactionsForContractTokenId(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<GoldRushResponse<NftTransactionsResponse>>;
|
|
105
113
|
/**
|
|
@@ -109,6 +117,7 @@ export declare class NftService {
|
|
|
109
117
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
110
118
|
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
111
119
|
*
|
|
120
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
112
121
|
*/
|
|
113
122
|
getTraitsForCollection(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsResponse>>;
|
|
114
123
|
/**
|
|
@@ -119,6 +128,7 @@ export declare class NftService {
|
|
|
119
128
|
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
120
129
|
* @param {string} trait - The requested trait.
|
|
121
130
|
*
|
|
131
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
122
132
|
*/
|
|
123
133
|
getAttributesForTraitInCollection(chainName: Chain, collectionContract: string, trait: string): Promise<GoldRushResponse<NftCollectionAttributesForTraitResponse>>;
|
|
124
134
|
/**
|
|
@@ -128,6 +138,7 @@ export declare class NftService {
|
|
|
128
138
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
129
139
|
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
130
140
|
*
|
|
141
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
131
142
|
*/
|
|
132
143
|
getCollectionTraitsSummary(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsSummaryResponse>>;
|
|
133
144
|
/**
|
|
@@ -140,6 +151,7 @@ export declare class NftService {
|
|
|
140
151
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
141
152
|
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
142
153
|
*
|
|
154
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
143
155
|
*/
|
|
144
156
|
getHistoricalFloorPricesForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionFloorPriceResponse>>;
|
|
145
157
|
/**
|
|
@@ -152,6 +164,7 @@ export declare class NftService {
|
|
|
152
164
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
153
165
|
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
154
166
|
*
|
|
167
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
155
168
|
*/
|
|
156
169
|
getHistoricalVolumeForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionVolumeResponse>>;
|
|
157
170
|
/**
|
|
@@ -164,12 +177,15 @@ export declare class NftService {
|
|
|
164
177
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
165
178
|
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
166
179
|
*
|
|
180
|
+
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
167
181
|
*/
|
|
168
182
|
getHistoricalSalesCountForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionSalesCountResponse>>;
|
|
169
183
|
/**
|
|
170
184
|
*
|
|
171
185
|
* Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
|
|
172
186
|
*
|
|
187
|
+
* **Credit Cost**: 1 per call
|
|
188
|
+
*
|
|
173
189
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
174
190
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
175
191
|
* @param {string} collectionContract - The requested collection address.
|
|
@@ -183,6 +199,8 @@ export declare class NftService {
|
|
|
183
199
|
*
|
|
184
200
|
* Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
|
|
185
201
|
*
|
|
202
|
+
* **Credit Cost**: 1 per call
|
|
203
|
+
*
|
|
186
204
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
187
205
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
188
206
|
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -10,7 +10,9 @@ export declare class PricingService {
|
|
|
10
10
|
constructor(execution: Execution);
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Get the historical prices of one (or many) large cap ERC20 tokens between specified date ranges. Also supports native tokens.
|
|
14
|
+
*
|
|
15
|
+
* **Credit Cost**: 1 per call
|
|
14
16
|
*
|
|
15
17
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
18
|
* @param {string} quoteCurrency - The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
@@ -26,6 +28,8 @@ export declare class PricingService {
|
|
|
26
28
|
*
|
|
27
29
|
* Get the spot token pair prices for a specified pool contract address. Supports pools on Uniswap V2, V3 and their forks.
|
|
28
30
|
*
|
|
31
|
+
* **Credit Cost**: 1 per call
|
|
32
|
+
*
|
|
29
33
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
30
34
|
* @param {string} contractAddress - The pool contract address.
|
|
31
35
|
* @param {GetTokenPricesQueryParamOpts} queryParamOpts
|
|
@@ -12,6 +12,8 @@ export declare class SecurityService {
|
|
|
12
12
|
*
|
|
13
13
|
* Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
|
|
14
14
|
*
|
|
15
|
+
* **Credit Cost**: 2 per call
|
|
16
|
+
*
|
|
15
17
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
18
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
17
19
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NewPairsStreamParams, type NewPairsStreamResponse, type OHLCVPairsStreamParams, type OHLCVPairsStreamResponse, type OHLCVTokensStreamParams, type OHLCVTokensStreamResponse, type StreamingServiceConfig, type StreamSubscriptionOptions, type
|
|
1
|
+
import { type NewPairsStreamParams, type NewPairsStreamResponse, type OHLCVPairsStreamParams, type OHLCVPairsStreamResponse, type OHLCVTokensStreamParams, type OHLCVTokensStreamResponse, type StreamingServiceConfig, type StreamSubscriptionOptions, type TokenSearchParams, type TokenSearchResponse, type UnsubscribeFunction, type UpdatePairsStreamParams, type UpdatePairsStreamResponse, type UPnLForTokenParams, type UPnLForTokenResponse, type UPnLForWalletParams, type UPnLForWalletResponse, type WalletActivityStreamParams, type WalletActivityStreamResponse } from "../utils/types/StreamingService.types";
|
|
2
2
|
import { type Client } from "graphql-ws";
|
|
3
3
|
/**
|
|
4
4
|
* Streaming API Service
|
|
@@ -30,7 +30,12 @@ export declare class StreamingService {
|
|
|
30
30
|
*/
|
|
31
31
|
rawQuery<T = Array<object>>(query: string, variables: Record<string, unknown>, callbacks: StreamSubscriptionOptions<T>): UnsubscribeFunction;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
|
+
* The OHLCV Pairs stream provides real-time updates on the Open, High, Low, Close prices and Volume of one or many token pairs at configurable intervals.
|
|
35
|
+
*
|
|
36
|
+
* **Credit Cost**: 0 per call
|
|
37
|
+
*
|
|
38
|
+
* **Beta**: This endpoint is in beta.
|
|
34
39
|
*
|
|
35
40
|
* @param params - Parameters for the OHLCV pairs stream
|
|
36
41
|
* @param callbacks - Subscription callbacks
|
|
@@ -55,7 +60,12 @@ export declare class StreamingService {
|
|
|
55
60
|
*/
|
|
56
61
|
subscribeToOHLCVPairs(params: OHLCVPairsStreamParams, callbacks: StreamSubscriptionOptions<OHLCVPairsStreamResponse[]>): UnsubscribeFunction;
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
63
|
+
*
|
|
64
|
+
* The OHLCV Tokens stream provides real-time updates on the Open, High, Low, Close prices and Volume of one or many tokens at configurable intervals.
|
|
65
|
+
*
|
|
66
|
+
* **Credit Cost**: 0 per call
|
|
67
|
+
*
|
|
68
|
+
* **Beta**: This endpoint is in beta.
|
|
59
69
|
*
|
|
60
70
|
* @param params - Parameters for the OHLCV tokens stream
|
|
61
71
|
* @param callbacks - Subscription callbacks
|
|
@@ -80,7 +90,12 @@ export declare class StreamingService {
|
|
|
80
90
|
*/
|
|
81
91
|
subscribeToOHLCVTokens(params: OHLCVTokensStreamParams, callbacks: StreamSubscriptionOptions<OHLCVTokensStreamResponse[]>): UnsubscribeFunction;
|
|
82
92
|
/**
|
|
83
|
-
*
|
|
93
|
+
*
|
|
94
|
+
* The New DEX Pairs stream provides real-time updates when new liquidity pairs are created on decentralized exchanges (DEXes). This documentation follows our standard streaming API structure.
|
|
95
|
+
*
|
|
96
|
+
* **Credit Cost**: 0 per call
|
|
97
|
+
*
|
|
98
|
+
* **Beta**: This endpoint is in beta.
|
|
84
99
|
*
|
|
85
100
|
* @param params - Parameters for the new pairs stream
|
|
86
101
|
* @param callbacks - Subscription callbacks
|
|
@@ -103,7 +118,12 @@ export declare class StreamingService {
|
|
|
103
118
|
*/
|
|
104
119
|
subscribeToNewPairs(params: NewPairsStreamParams, callbacks: StreamSubscriptionOptions<NewPairsStreamResponse[]>): UnsubscribeFunction;
|
|
105
120
|
/**
|
|
106
|
-
*
|
|
121
|
+
*
|
|
122
|
+
* The Update DEX Pairs stream provides real-time event updates on the prices, volumes, market cap and liquidity of one or many token pairs.
|
|
123
|
+
*
|
|
124
|
+
* **Credit Cost**: 0 per call
|
|
125
|
+
*
|
|
126
|
+
* **Beta**: This endpoint is in beta.
|
|
107
127
|
*
|
|
108
128
|
* @param params - Parameters for the update pairs stream
|
|
109
129
|
* @param callbacks - Subscription callbacks
|
|
@@ -128,30 +148,12 @@ export declare class StreamingService {
|
|
|
128
148
|
*/
|
|
129
149
|
subscribeToUpdatePairs(params: UpdatePairsStreamParams, callbacks: StreamSubscriptionOptions<UpdatePairsStreamResponse>): UnsubscribeFunction;
|
|
130
150
|
/**
|
|
131
|
-
* Subscribe to real-time token balance updates for a specific wallet address
|
|
132
151
|
*
|
|
133
|
-
*
|
|
134
|
-
* @param callbacks - Subscription callbacks
|
|
135
|
-
* @returns Unsubscribe function
|
|
152
|
+
* The Wallet Activity stream provides real-time updates on wallet transactions, token transfers, and interactions with smart contracts . This documentation follows our standard Streaming API structure.
|
|
136
153
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* {
|
|
141
|
-
* chain_name: StreamingChain.BASE_MAINNET,
|
|
142
|
-
* wallet_address: "0x198ef79f1f515f02dfe9e3115ed9fc07183f02fc"
|
|
143
|
-
* },
|
|
144
|
-
* {
|
|
145
|
-
* next: (data) => console.log("Token Balances:", data),
|
|
146
|
-
* error: (err) => console.error("Error:", err),
|
|
147
|
-
* complete: () => console.log("Stream completed")
|
|
148
|
-
* }
|
|
149
|
-
* );
|
|
150
|
-
* ```
|
|
151
|
-
*/
|
|
152
|
-
subscribeToTokenBalances(params: TokenBalancesStreamParams, callbacks: StreamSubscriptionOptions<TokenBalancesStreamResponse>): UnsubscribeFunction;
|
|
153
|
-
/**
|
|
154
|
-
* Subscribe to real-time wallet activity including transactions, token transfers, and smart contract interactions
|
|
154
|
+
* **Credit Cost**: 0 per call
|
|
155
|
+
*
|
|
156
|
+
* **Beta**: This endpoint is in beta.
|
|
155
157
|
*
|
|
156
158
|
* @param params - Parameters for the wallet activity stream
|
|
157
159
|
* @param callbacks - Subscription callbacks
|
|
@@ -173,4 +175,51 @@ export declare class StreamingService {
|
|
|
173
175
|
* ```
|
|
174
176
|
*/
|
|
175
177
|
subscribeToWalletActivity(params: WalletActivityStreamParams, callbacks: StreamSubscriptionOptions<WalletActivityStreamResponse[]>): UnsubscribeFunction;
|
|
178
|
+
/**
|
|
179
|
+
* Search for tokens by keyword, ticker, or contract address
|
|
180
|
+
*
|
|
181
|
+
* @param params - Parameters for the token search query
|
|
182
|
+
* @returns Promise resolving to an array of matching tokens
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const results = await streamingService.searchToken({
|
|
187
|
+
* query: "PEPE"
|
|
188
|
+
* });
|
|
189
|
+
* console.log("Search Results:", results);
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
searchToken(params: TokenSearchParams): Promise<TokenSearchResponse[]>;
|
|
193
|
+
/**
|
|
194
|
+
* Get top trader wallets and their PnL for a specific token
|
|
195
|
+
*
|
|
196
|
+
* @param params - Parameters for the UPnL token query
|
|
197
|
+
* @returns Promise resolving to an array of top trader wallet data
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* const traders = await streamingService.getUPnLForToken({
|
|
202
|
+
* chain_name: StreamingChain.ETH_MAINNET,
|
|
203
|
+
* token_address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
|
|
204
|
+
* });
|
|
205
|
+
* console.log("Top Traders:", traders);
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
getUPnLForToken(params: UPnLForTokenParams): Promise<UPnLForTokenResponse[]>;
|
|
209
|
+
/**
|
|
210
|
+
* Get unrealized and realized PnL for all tokens held by a wallet
|
|
211
|
+
*
|
|
212
|
+
* @param params - Parameters for the UPnL wallet query
|
|
213
|
+
* @returns Promise resolving to an array of token PnL data for the wallet
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* const pnl = await streamingService.getUPnLForWallet({
|
|
218
|
+
* chain_name: StreamingChain.ETH_MAINNET,
|
|
219
|
+
* wallet_address: "0xfe97b0C517a84F98fc6eDe3CD26B43012d31992a"
|
|
220
|
+
* });
|
|
221
|
+
* console.log("Wallet PnL:", pnl);
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
getUPnLForWallet(params: UPnLForWalletParams): Promise<UPnLForWalletResponse[]>;
|
|
176
225
|
}
|
|
@@ -10,7 +10,9 @@ export declare class TransactionService {
|
|
|
10
10
|
constructor(execution: Execution);
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Used to fetch and render a single transaction including its decoded event logs. For foundational chains, can also retrieve internal transactions, state changes and method ID where available.
|
|
14
|
+
*
|
|
15
|
+
* **Credit Cost**: 0.1 per call
|
|
14
16
|
*
|
|
15
17
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
18
|
* @param {string} txHash - The transaction hash.
|
|
@@ -25,7 +27,9 @@ export declare class TransactionService {
|
|
|
25
27
|
getTransaction(chainName: Chain, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<GoldRushResponse<TransactionResponse>>;
|
|
26
28
|
/**
|
|
27
29
|
*
|
|
28
|
-
*
|
|
30
|
+
* Used to fetch the earliest and latest transactions, and the transaction count for a wallet. Also enriched with gas expenditure details and total ERC20 token transfers count.
|
|
31
|
+
*
|
|
32
|
+
* **Credit Cost**: 1 per call
|
|
29
33
|
*
|
|
30
34
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
31
35
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
@@ -51,6 +55,8 @@ export declare class TransactionService {
|
|
|
51
55
|
*
|
|
52
56
|
* Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
|
|
53
57
|
*
|
|
58
|
+
* **Credit Cost**: 0.1 per item
|
|
59
|
+
*
|
|
54
60
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
55
61
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
56
62
|
* @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
@@ -67,6 +73,8 @@ export declare class TransactionService {
|
|
|
67
73
|
*
|
|
68
74
|
* Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
|
|
69
75
|
*
|
|
76
|
+
* **Credit Cost**: 0.1 per item
|
|
77
|
+
*
|
|
70
78
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
71
79
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
72
80
|
* @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
@@ -106,6 +114,8 @@ export declare class TransactionService {
|
|
|
106
114
|
*
|
|
107
115
|
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
108
116
|
*
|
|
117
|
+
* **Credit Cost**: 0.1 per item
|
|
118
|
+
*
|
|
109
119
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
110
120
|
* @param {number} blockHeight - The requested block height.
|
|
111
121
|
* @param {number} page - The requested page, 0-indexed.
|
|
@@ -119,6 +129,8 @@ export declare class TransactionService {
|
|
|
119
129
|
*
|
|
120
130
|
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
121
131
|
*
|
|
132
|
+
* **Credit Cost**: 0.1 per item
|
|
133
|
+
*
|
|
122
134
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
123
135
|
* @param {string} blockHash - The requested block hash.
|
|
124
136
|
* @param {getTransactionsForBlockByPageQueryParamOpts} queryParamOpts
|