@covalenthq/client-sdk 2.3.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -233
- package/dist/index.js +111 -668
- package/dist/index.js.map +1 -1
- package/dist/src/services/AllChainsService.d.ts +0 -16
- package/dist/src/services/BalanceService.d.ts +2 -6
- package/dist/src/services/BaseService.d.ts +0 -17
- package/dist/src/services/NftService.d.ts +1 -159
- package/dist/src/services/SecurityService.d.ts +1 -9
- package/dist/src/services/TransactionService.d.ts +1 -4
- package/dist/src/utils/types/BalanceService.types.d.ts +2 -12
- package/dist/src/utils/types/Generic.types.d.ts +13 -8
- package/dist/src/utils/types/NftService.types.d.ts +1 -281
- package/dist/src/utils/types/SecurityService.types.d.ts +0 -52
- package/dist/src/utils/types/TransactionService.types.d.ts +2 -0
- package/package.json +5 -11
|
@@ -35,22 +35,6 @@ export declare class AllChainsService {
|
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
37
|
getMultiChainMultiAddressTransactions(queryParamOpts?: GetMultiChainMultiAddressTransactionsParamOtps): Promise<GoldRushResponse<MultiChainMultiAddressTransactionsResponse>>;
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated This method is deprecated and will be removed in the upcoming versions. Please use `AllChainsService.getMultiChainMultiAddressTransactions` instead.
|
|
40
|
-
*
|
|
41
|
-
* Commonly used to get transactions cross chains and addresses.
|
|
42
|
-
*
|
|
43
|
-
* @param {Chain[]} chains - An array of the chain names or IDs to retrieve transactions from. Defaults to all foundational chains.
|
|
44
|
-
* @param {string[]} addresses - An array of addresses for which transactions are fetched. Does not support name resolution.
|
|
45
|
-
* @param {number} limit - Number of transactions to return per page, up to the default max of 100 items.
|
|
46
|
-
* @param {string} before - Pagination cursor pointing to fetch transactions before a certain point.
|
|
47
|
-
* @param {string} after - Pagination cursor pointing to fetch transactions after a certain point.
|
|
48
|
-
* @param {boolean} withLogs - Whether to include raw logs in the response.
|
|
49
|
-
* @param {boolean} withDecodedLogs - Whether to include decoded logs in the response.
|
|
50
|
-
* @param {Quote | CryptocurrencyQuote} quoteCurrency - The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, `GBP`, `BTC` and `ETH`.
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
getMultiChainAndMultiAddressTransactions(queryParamOpts?: GetMultiChainMultiAddressTransactionsParamOtps): Promise<GoldRushResponse<MultiChainMultiAddressTransactionsResponse>>;
|
|
54
38
|
/**
|
|
55
39
|
*
|
|
56
40
|
* Fetch paginated spot & historical native and token balances for a single address on up to 10 EVM chains with one API call.
|
|
@@ -18,10 +18,7 @@ export declare class BalanceService {
|
|
|
18
18
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
19
19
|
* @param {GetTokenBalancesForWalletAddressQueryParamOpts} queryParamOpts
|
|
20
20
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
21
|
-
* - `nft`: If `true`, NFTs will be included in the response.
|
|
22
|
-
* - `noNftFetch`: If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times.
|
|
23
21
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
24
|
-
* - `noNftAssetMetadata`: If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs.
|
|
25
22
|
*
|
|
26
23
|
*/
|
|
27
24
|
getTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<GoldRushResponse<BalancesResponse>>;
|
|
@@ -84,6 +81,7 @@ export declare class BalanceService {
|
|
|
84
81
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
85
82
|
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
86
83
|
* @param {GetTokenHoldersV2ForTokenAddressQueryParamOpts} queryParamOpts
|
|
84
|
+
* - `noSnapshot`: Defaults to `false`. Set to `true` to bypass last snapshot and get the latest token holders list.
|
|
87
85
|
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
88
86
|
* - `pageSize`: Number of items per page. Note: Currently, only values of `100` and `1000` are supported. Omitting this parameter defaults to 100.
|
|
89
87
|
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
@@ -100,6 +98,7 @@ export declare class BalanceService {
|
|
|
100
98
|
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
101
99
|
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
102
100
|
* @param {GetTokenHoldersV2ForTokenAddressQueryParamOpts} queryParamOpts
|
|
101
|
+
* - `noSnapshot`: Defaults to `false`. Set to `true` to bypass last snapshot and get the latest token holders list.
|
|
103
102
|
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
104
103
|
* - `pageSize`: Number of items per page. Note: Currently, only values of `100` and `1000` are supported. Omitting this parameter defaults to 100.
|
|
105
104
|
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
@@ -117,10 +116,7 @@ export declare class BalanceService {
|
|
|
117
116
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
118
117
|
* @param {GetHistoricalTokenBalancesForWalletAddressQueryParamOpts} queryParamOpts
|
|
119
118
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
120
|
-
* - `nft`: If `true`, NFTs will be included in the response.
|
|
121
|
-
* - `noNftFetch`: If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times.
|
|
122
119
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
123
|
-
* - `noNftAssetMetadata`: If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs.
|
|
124
120
|
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
125
121
|
* - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
|
|
126
122
|
*
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type ChainActivityResponse, type GetAddressActivityQueryParamOpts } from "../utils/types/AllChainService.types";
|
|
3
2
|
import { type AllChainsResponse, type AllChainsStatusResponse, type BlockHeightsResponse, type BlockResponse, type GasPricesResponse, type GetBlockHeightsQueryParamOpts, type GetGasPricesQueryParamOpts, type GetLogEventsByAddressQueryParamOpts, type GetLogEventsByTopicHashQueryParamOpts, type GetLogsQueryParamOpts, type GetLogsResponse, type LogEventsByAddressResponse, type LogEventsByTopicHashResponse, type ResolvedAddress } from "../utils/types/BaseService.types";
|
|
4
3
|
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
5
4
|
/**
|
|
@@ -160,22 +159,6 @@ export declare class BaseService {
|
|
|
160
159
|
*
|
|
161
160
|
*/
|
|
162
161
|
getAllChainStatus(): Promise<GoldRushResponse<AllChainsStatusResponse>>;
|
|
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
|
-
*
|
|
169
|
-
* @deprecated This method is deprecated and will be removed in the upcoming versions. Please use `AllChainsService.getAddressActivity` instead.
|
|
170
|
-
*
|
|
171
|
-
* Commonly used to locate chains which an address is active on with a single API call.
|
|
172
|
-
*
|
|
173
|
-
* @param {string} walletAddress - The requested wallet address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
174
|
-
* @param {GetAddressActivityQueryParamOpts} queryParamOpts
|
|
175
|
-
* - `testnets`: Set to true to include testnets with activity in the response. By default, it's set to `false` and only returns mainnet activity.
|
|
176
|
-
*
|
|
177
|
-
*/
|
|
178
|
-
getAddressActivity(walletAddress: string, queryParamOpts?: GetAddressActivityQueryParamOpts): Promise<GoldRushResponse<ChainActivityResponse>>;
|
|
179
162
|
/**
|
|
180
163
|
*
|
|
181
164
|
* Get real-time gas estimates for different transaction speeds on a specific network, enabling users to optimize transaction costs and confirmation times.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Execution } from "../utils/functions/execution";
|
|
2
2
|
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
3
|
-
import { type
|
|
3
|
+
import { type CheckOwnershipInNftQueryParamOpts, type GetNftsForAddressQueryParamOpts, type NftAddressBalanceNftResponse, type NftOwnershipForCollectionResponse } from "../utils/types/NftService.types";
|
|
4
4
|
/**
|
|
5
5
|
* NFTs API
|
|
6
6
|
*
|
|
@@ -8,32 +8,6 @@ import { type ChainCollectionResponse, type CheckOwnershipInNftQueryParamOpts, t
|
|
|
8
8
|
export declare class NftService {
|
|
9
9
|
private execution;
|
|
10
10
|
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
16
|
-
* @param {GetChainCollectionsQueryParamOpts} queryParamOpts
|
|
17
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
18
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
19
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
20
|
-
*
|
|
21
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
22
|
-
*/
|
|
23
|
-
getChainCollections(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<GoldRushResponse<ChainCollectionResponse>>;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
29
|
-
* @param {GetChainCollectionsQueryParamOpts} queryParamOpts
|
|
30
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
31
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
32
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
33
|
-
*
|
|
34
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
35
|
-
*/
|
|
36
|
-
getChainCollectionsByPage(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<GoldRushResponse<ChainCollectionResponse>>;
|
|
37
11
|
/**
|
|
38
12
|
*
|
|
39
13
|
* Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.
|
|
@@ -45,141 +19,9 @@ export declare class NftService {
|
|
|
45
19
|
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
46
20
|
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
47
21
|
* - `noNftAssetMetadata`: If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs.
|
|
48
|
-
* - `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.
|
|
49
22
|
*
|
|
50
23
|
*/
|
|
51
24
|
getNftsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<GoldRushResponse<NftAddressBalanceNftResponse>>;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
|
|
55
|
-
*
|
|
56
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
57
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
58
|
-
* @param {GetTokenIdsForContractWithMetadataQueryParamOpts} queryParamOpts
|
|
59
|
-
* - `noMetadata`: Omit metadata.
|
|
60
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
61
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
62
|
-
* - `traitsFilter`: Filters NFTs based on a specific trait. If this filter is used, the API will return all NFTs with the specified trait. Accepts comma-separated values, is case-sensitive, and requires proper URL encoding.
|
|
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.
|
|
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.
|
|
65
|
-
*
|
|
66
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
67
|
-
*/
|
|
68
|
-
getTokenIdsForContractWithMetadata(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<GoldRushResponse<NftMetadataResponse>>;
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
* Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
74
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
75
|
-
* @param {GetTokenIdsForContractWithMetadataQueryParamOpts} queryParamOpts
|
|
76
|
-
* - `noMetadata`: Omit metadata.
|
|
77
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
78
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
79
|
-
* - `traitsFilter`: Filters NFTs based on a specific trait. If this filter is used, the API will return all NFTs with the specified trait. Accepts comma-separated values, is case-sensitive, and requires proper URL encoding.
|
|
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.
|
|
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.
|
|
82
|
-
*
|
|
83
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
84
|
-
*/
|
|
85
|
-
getTokenIdsForContractWithMetadataByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
|
|
89
|
-
*
|
|
90
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
91
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
92
|
-
* @param {string} tokenId - The requested token ID.
|
|
93
|
-
* @param {GetNftMetadataForGivenTokenIdForContractQueryParamOpts} queryParamOpts
|
|
94
|
-
* - `noMetadata`: Omit metadata.
|
|
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.
|
|
96
|
-
*
|
|
97
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
98
|
-
*/
|
|
99
|
-
getNftMetadataForGivenTokenIdForContract(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.
|
|
103
|
-
*
|
|
104
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
105
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
106
|
-
* @param {string} tokenId - The requested token ID.
|
|
107
|
-
* @param {GetNftTransactionsForContractTokenIdQueryParamOpts} queryParamOpts
|
|
108
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
109
|
-
*
|
|
110
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
111
|
-
*/
|
|
112
|
-
getNftTransactionsForContractTokenId(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<GoldRushResponse<NftTransactionsResponse>>;
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* Commonly used to fetch and render the traits of a collection as seen in rarity calculators.
|
|
116
|
-
*
|
|
117
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
118
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
119
|
-
*
|
|
120
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
121
|
-
*/
|
|
122
|
-
getTraitsForCollection(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsResponse>>;
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* Commonly used to get the count of unique values for traits within an NFT collection.
|
|
126
|
-
*
|
|
127
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
128
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
129
|
-
* @param {string} trait - The requested trait.
|
|
130
|
-
*
|
|
131
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
132
|
-
*/
|
|
133
|
-
getAttributesForTraitInCollection(chainName: Chain, collectionContract: string, trait: string): Promise<GoldRushResponse<NftCollectionAttributesForTraitResponse>>;
|
|
134
|
-
/**
|
|
135
|
-
*
|
|
136
|
-
* Commonly used to calculate rarity scores for a collection based on its traits.
|
|
137
|
-
*
|
|
138
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
139
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
140
|
-
*
|
|
141
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
142
|
-
*/
|
|
143
|
-
getCollectionTraitsSummary(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsSummaryResponse>>;
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
* Commonly used to render a price floor chart for an NFT collection.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
149
|
-
* @param {string} collectionAddress - The requested address.
|
|
150
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
151
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
152
|
-
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
153
|
-
*
|
|
154
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
155
|
-
*/
|
|
156
|
-
getHistoricalFloorPricesForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionFloorPriceResponse>>;
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* Commonly used to build a time-series chart of the transaction volume of an NFT collection.
|
|
160
|
-
*
|
|
161
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
162
|
-
* @param {string} collectionAddress - The requested address.
|
|
163
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
164
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
165
|
-
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
166
|
-
*
|
|
167
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
168
|
-
*/
|
|
169
|
-
getHistoricalVolumeForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionVolumeResponse>>;
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
* Commonly used to build a time-series chart of the sales count of an NFT collection.
|
|
173
|
-
*
|
|
174
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
175
|
-
* @param {string} collectionAddress - The requested address.
|
|
176
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
177
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
178
|
-
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
179
|
-
*
|
|
180
|
-
* @deprecated This endpoint is no longer supported by the GoldRush API.
|
|
181
|
-
*/
|
|
182
|
-
getHistoricalSalesCountForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionSalesCountResponse>>;
|
|
183
25
|
/**
|
|
184
26
|
*
|
|
185
27
|
* Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Execution } from "../utils/functions/execution";
|
|
2
2
|
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
3
|
-
import { type ApprovalsResponse
|
|
3
|
+
import { type ApprovalsResponse } from "../utils/types/SecurityService.types";
|
|
4
4
|
/**
|
|
5
5
|
* Approvals API
|
|
6
6
|
*
|
|
@@ -19,12 +19,4 @@ export declare class SecurityService {
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
getApprovals(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<ApprovalsResponse>>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
25
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
getNftApprovals(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<NftApprovalsResponse>>;
|
|
30
22
|
}
|
|
@@ -36,6 +36,7 @@ export declare class TransactionService {
|
|
|
36
36
|
* @param {GetTransactionSummaryQueryParamOpts} queryParamOpts
|
|
37
37
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
38
38
|
* - `withGas`: Include gas summary details. Additional charge of 1 credit when true. Response times may be impacted for wallets with millions of transactions.
|
|
39
|
+
* - `withTransferCount`: Represents the total count of ERC-20 token movement events, including `Transfer`, `Deposit` and `Withdraw`. Response times may be impacted for wallets with large number of transactions. Additional charge of 3 credits.
|
|
39
40
|
*
|
|
40
41
|
*/
|
|
41
42
|
getTransactionSummary(chainName: Chain, walletAddress: string, queryParamOpts?: GetTransactionSummaryQueryParamOpts): Promise<GoldRushResponse<TransactionsSummaryResponse>>;
|
|
@@ -139,8 +140,4 @@ export declare class TransactionService {
|
|
|
139
140
|
*
|
|
140
141
|
*/
|
|
141
142
|
getTransactionsForBlock(chainName: Chain, blockHash: string, queryParamOpts?: getTransactionsForBlockByPageQueryParamOpts): Promise<GoldRushResponse<TransactionsForBlockResponse>>;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated This method has been deprecated and will be removed in future releases. Use `getPaginatedTransactionsForAddress` instead.
|
|
144
|
-
*/
|
|
145
|
-
getTransactionsForAddressV3(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: getPaginatedTransactionsForAddressQueryParamOpts): Promise<GoldRushResponse<TransactionsResponse>>;
|
|
146
143
|
}
|
|
@@ -379,14 +379,8 @@ export type NativeBalanceItem = Nullable<{
|
|
|
379
379
|
export type GetTokenBalancesForWalletAddressQueryParamOpts = Nullable<{
|
|
380
380
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
381
381
|
quoteCurrency?: Quote;
|
|
382
|
-
/** * If `true`, NFTs will be included in the response. */
|
|
383
|
-
nft?: boolean;
|
|
384
|
-
/** * If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times. */
|
|
385
|
-
noNftFetch?: boolean;
|
|
386
382
|
/** * If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
387
383
|
noSpam?: boolean;
|
|
388
|
-
/** * If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs. */
|
|
389
|
-
noNftAssetMetadata?: boolean;
|
|
390
384
|
}>;
|
|
391
385
|
export type GetHistoricalPortfolioForWalletAddressQueryParamOpts = Nullable<{
|
|
392
386
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
@@ -409,6 +403,8 @@ export type GetErc20TransfersForWalletAddressQueryParamOpts = Nullable<{
|
|
|
409
403
|
pageNumber?: number;
|
|
410
404
|
}>;
|
|
411
405
|
export type GetTokenHoldersV2ForTokenAddressQueryParamOpts = Nullable<{
|
|
406
|
+
/** * Defaults to `false`. Set to `true` to bypass last snapshot and get the latest token holders list. */
|
|
407
|
+
noSnapshot?: boolean;
|
|
412
408
|
/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
|
|
413
409
|
blockHeight?: number | string;
|
|
414
410
|
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */
|
|
@@ -421,14 +417,8 @@ export type GetTokenHoldersV2ForTokenAddressQueryParamOpts = Nullable<{
|
|
|
421
417
|
export type GetHistoricalTokenBalancesForWalletAddressQueryParamOpts = Nullable<{
|
|
422
418
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
423
419
|
quoteCurrency?: Quote;
|
|
424
|
-
/** * If `true`, NFTs will be included in the response. */
|
|
425
|
-
nft?: boolean;
|
|
426
|
-
/** * If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times. */
|
|
427
|
-
noNftFetch?: boolean;
|
|
428
420
|
/** * If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
429
421
|
noSpam?: boolean;
|
|
430
|
-
/** * If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs. */
|
|
431
|
-
noNftAssetMetadata?: boolean;
|
|
432
422
|
/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
|
|
433
423
|
blockHeight?: number | string;
|
|
434
424
|
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */
|
|
@@ -2,17 +2,16 @@ export declare enum ChainName {
|
|
|
2
2
|
ETH_MAINNET = "eth-mainnet",
|
|
3
3
|
ETH_SEPOLIA = "eth-sepolia",
|
|
4
4
|
ETH_HOLESKY = "eth-holesky",
|
|
5
|
-
ETH_HOODI = "eth-hoodi",
|
|
6
5
|
MATIC_MAINNET = "matic-mainnet",
|
|
7
6
|
AVALANCHE_MAINNET = "avalanche-mainnet",
|
|
8
7
|
AVALANCHE_TESTNET = "avalanche-testnet",
|
|
9
8
|
BSC_MAINNET = "bsc-mainnet",
|
|
10
9
|
BSC_TESTNET = "bsc-testnet",
|
|
11
10
|
MOONBEAM_MAINNET = "moonbeam-mainnet",
|
|
12
|
-
MOONBEAM_MOONBASE_ALPHA = "moonbeam-moonbase-alpha",
|
|
13
11
|
MOONBEAM_MOONRIVER = "moonbeam-moonriver",
|
|
14
12
|
ARBITRUM_MAINNET = "arbitrum-mainnet",
|
|
15
13
|
ARBITRUM_NOVA_MAINNET = "arbitrum-nova-mainnet",
|
|
14
|
+
ARBITRUM_SEPOLIA = "arbitrum-sepolia",
|
|
16
15
|
FANTOM_MAINNET = "fantom-mainnet",
|
|
17
16
|
FANTOM_TESTNET = "fantom-testnet",
|
|
18
17
|
BTC_MAINNET = "btc-mainnet",
|
|
@@ -24,17 +23,22 @@ export declare enum ChainName {
|
|
|
24
23
|
EMERALD_PARATIME_MAINNET = "emerald-paratime-mainnet",
|
|
25
24
|
MONAD_TESTNET = "monad-testnet",
|
|
26
25
|
MONAD_MAINNET = "monad-mainnet",
|
|
26
|
+
MEGAETH_MAINNET = "megaeth-mainnet",
|
|
27
27
|
BERACHAIN_MAINNET = "berachain-mainnet",
|
|
28
|
+
BERACHAIN_TESTNET = "berachain-testnet",
|
|
29
|
+
HYPERCORE_MAINNET = "hypercore-mainnet",
|
|
28
30
|
PLASMA_MAINNET = "plasma-mainnet",
|
|
29
31
|
UNICHAIN_MAINNET = "unichain-mainnet",
|
|
30
32
|
PLASMA_TESTNET = "plasma-testnet",
|
|
31
33
|
ARC_TESTNET = "arc-testnet",
|
|
34
|
+
ADI_TESTNET = "adi-testnet",
|
|
32
35
|
CANTO_MAINNET = "canto-mainnet",
|
|
33
36
|
LINEA_MAINNET = "linea-mainnet",
|
|
34
37
|
LINEA_SEPOLIA_TESTNET = "linea-sepolia-testnet",
|
|
35
38
|
POLYGON_AMOY_TESTNET = "polygon-amoy-testnet",
|
|
36
39
|
MANTLE_MAINNET = "mantle-mainnet",
|
|
37
40
|
BASE_MAINNET = "base-mainnet",
|
|
41
|
+
BASE_SEPOLIA_TESTNET = "base-sepolia-testnet",
|
|
38
42
|
OASIS_SAPPHIRE_MAINNET = "oasis-sapphire-mainnet",
|
|
39
43
|
CELO_MAINNET = "celo-mainnet",
|
|
40
44
|
HYPEREVM_MAINNET = "hyperevm-mainnet",
|
|
@@ -46,10 +50,9 @@ export declare enum ChainName {
|
|
|
46
50
|
SONIC_MAINNET = "sonic-mainnet",
|
|
47
51
|
WORLD_MAINNET = "world-mainnet",
|
|
48
52
|
WORLD_SEPOLIA_TESTNET = "world-sepolia-testnet",
|
|
49
|
-
|
|
53
|
+
MANTA_SEPOLIA_TESTNET = "manta-sepolia-testnet",
|
|
50
54
|
INK_SEPOLIA_TESTNET = "ink-sepolia-testnet",
|
|
51
55
|
INK_MAINNET = "ink-mainnet",
|
|
52
|
-
LENS_MAINNET = "lens-mainnet",
|
|
53
56
|
ZKSYNC_MAINNET = "zksync-mainnet",
|
|
54
57
|
BNB_OPBNB_MAINNET = "bnb-opbnb-mainnet",
|
|
55
58
|
ZETACHAIN_MAINNET = "zetachain-mainnet",
|
|
@@ -64,17 +67,16 @@ export declare enum ChainID {
|
|
|
64
67
|
ETH_MAINNET = 1,
|
|
65
68
|
ETH_SEPOLIA = 11155111,
|
|
66
69
|
ETH_HOLESKY = 17000,
|
|
67
|
-
ETH_HOODI = 560048,
|
|
68
70
|
MATIC_MAINNET = 137,
|
|
69
71
|
AVALANCHE_MAINNET = 43114,
|
|
70
72
|
AVALANCHE_TESTNET = 43113,
|
|
71
73
|
BSC_MAINNET = 56,
|
|
72
74
|
BSC_TESTNET = 97,
|
|
73
75
|
MOONBEAM_MAINNET = 1284,
|
|
74
|
-
MOONBEAM_MOONBASE_ALPHA = 1287,
|
|
75
76
|
MOONBEAM_MOONRIVER = 1285,
|
|
76
77
|
ARBITRUM_MAINNET = 42161,
|
|
77
78
|
ARBITRUM_NOVA_MAINNET = 42170,
|
|
79
|
+
ARBITRUM_SEPOLIA = 421614,
|
|
78
80
|
FANTOM_MAINNET = 250,
|
|
79
81
|
FANTOM_TESTNET = 4002,
|
|
80
82
|
BTC_MAINNET = 20090103,
|
|
@@ -86,17 +88,21 @@ export declare enum ChainID {
|
|
|
86
88
|
EMERALD_PARATIME_MAINNET = 42262,
|
|
87
89
|
MONAD_TESTNET = 10143,
|
|
88
90
|
MONAD_MAINNET = 143,
|
|
91
|
+
MEGAETH_MAINNET = 4326,
|
|
89
92
|
BERACHAIN_MAINNET = 80094,
|
|
93
|
+
BERACHAIN_TESTNET = 80084,
|
|
90
94
|
PLASMA_MAINNET = 9745,
|
|
91
95
|
UNICHAIN_MAINNET = 130,
|
|
92
96
|
PLASMA_TESTNET = 9746,
|
|
93
97
|
ARC_TESTNET = 5042002,
|
|
98
|
+
ADI_TESTNET = 99999,
|
|
94
99
|
CANTO_MAINNET = 7700,
|
|
95
100
|
LINEA_MAINNET = 59144,
|
|
96
101
|
LINEA_SEPOLIA_TESTNET = 59141,
|
|
97
102
|
POLYGON_AMOY_TESTNET = 80002,
|
|
98
103
|
MANTLE_MAINNET = 5000,
|
|
99
104
|
BASE_MAINNET = 8453,
|
|
105
|
+
BASE_SEPOLIA_TESTNET = 84532,
|
|
100
106
|
OASIS_SAPPHIRE_MAINNET = 23294,
|
|
101
107
|
CELO_MAINNET = 42220,
|
|
102
108
|
HYPEREVM_MAINNET = 999,
|
|
@@ -108,10 +114,9 @@ export declare enum ChainID {
|
|
|
108
114
|
SONIC_MAINNET = 146,
|
|
109
115
|
WORLD_MAINNET = 480,
|
|
110
116
|
WORLD_SEPOLIA_TESTNET = 4801,
|
|
111
|
-
|
|
117
|
+
MANTA_SEPOLIA_TESTNET = 3441006,
|
|
112
118
|
INK_SEPOLIA_TESTNET = 763373,
|
|
113
119
|
INK_MAINNET = 57073,
|
|
114
|
-
LENS_MAINNET = 232,
|
|
115
120
|
ZKSYNC_MAINNET = 324,
|
|
116
121
|
BNB_OPBNB_MAINNET = 204,
|
|
117
122
|
ZETACHAIN_MAINNET = 7000,
|