@covalenthq/client-sdk 2.3.1 → 2.3.2
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/index.js → index.js} +12 -28
- package/dist/index.js.map +1 -0
- package/dist/{esm/src → src}/utils/types/Generic.types.d.ts +11 -27
- package/package.json +9 -13
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/src/utils/types/Generic.types.d.ts +0 -391
- package/dist/esm/index.d.ts +0 -16
- package/dist/esm/index.js +0 -5696
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/src/GoldRushClient.d.ts +0 -27
- package/dist/esm/src/services/AllChainsService.d.ts +0 -63
- package/dist/esm/src/services/BalanceService.d.ts +0 -125
- package/dist/esm/src/services/BaseService.d.ts +0 -163
- package/dist/esm/src/services/BitcoinService.d.ts +0 -40
- package/dist/esm/src/services/NftService.d.ts +0 -193
- package/dist/esm/src/services/PricingService.d.ts +0 -36
- package/dist/esm/src/services/SecurityService.d.ts +0 -28
- package/dist/esm/src/services/StreamingService.d.ts +0 -151
- package/dist/esm/src/services/TransactionService.d.ts +0 -134
- package/dist/esm/src/utils/functions/bigIntParser.d.ts +0 -1
- package/dist/esm/src/utils/functions/calculatePrettyBalance.d.ts +0 -1
- package/dist/esm/src/utils/functions/debugOutput.d.ts +0 -2
- package/dist/esm/src/utils/functions/endpointGenerator.d.ts +0 -4
- package/dist/esm/src/utils/functions/execution.d.ts +0 -11
- package/dist/esm/src/utils/functions/isValidApiKey.d.ts +0 -1
- package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +0 -7
- package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +0 -2
- package/dist/esm/src/utils/functions/timestamp-parser.d.ts +0 -1
- package/dist/esm/src/utils/types/AllChainService.types.d.ts +0 -123
- package/dist/esm/src/utils/types/BalanceService.types.d.ts +0 -442
- package/dist/esm/src/utils/types/BaseService.types.d.ts +0 -312
- package/dist/esm/src/utils/types/BitcoinService.types.d.ts +0 -88
- package/dist/esm/src/utils/types/NftService.types.d.ts +0 -355
- package/dist/esm/src/utils/types/PricingService.types.d.ts +0 -80
- package/dist/esm/src/utils/types/SecurityService.types.d.ts +0 -124
- package/dist/esm/src/utils/types/StreamingService.types.d.ts +0 -201
- package/dist/esm/src/utils/types/TransactionService.types.d.ts +0 -392
- /package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
- /package/dist/{cjs/src → src}/GoldRushClient.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/AllChainsService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/BalanceService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/BaseService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/BitcoinService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/NftService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/PricingService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/SecurityService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/StreamingService.d.ts +0 -0
- /package/dist/{cjs/src → src}/services/TransactionService.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/bigIntParser.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/calculatePrettyBalance.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/debugOutput.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/endpointGenerator.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/execution.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/isValidApiKey.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/paginateEndpoint.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/prettifyCurrency.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/functions/timestamp-parser.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/AllChainService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/BalanceService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/BaseService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/BitcoinService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/NftService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/PricingService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/SecurityService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/StreamingService.types.d.ts +0 -0
- /package/dist/{cjs/src → src}/utils/types/TransactionService.types.d.ts +0 -0
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AllChainsService } from "./services/AllChainsService";
|
|
2
|
-
import { BalanceService } from "./services/BalanceService";
|
|
3
|
-
import { BaseService } from "./services/BaseService";
|
|
4
|
-
import { BitcoinService } from "./services/BitcoinService";
|
|
5
|
-
import { NftService } from "./services/NftService";
|
|
6
|
-
import { PricingService } from "./services/PricingService";
|
|
7
|
-
import { SecurityService } from "./services/SecurityService";
|
|
8
|
-
import { StreamingService } from "./services/StreamingService";
|
|
9
|
-
import { TransactionService } from "./services/TransactionService";
|
|
10
|
-
import { type GoldRushClientSettings } from "./utils/types/Generic.types";
|
|
11
|
-
import { type StreamingServiceConfig } from "./utils/types/StreamingService.types";
|
|
12
|
-
/**
|
|
13
|
-
* GoldRushClient Class
|
|
14
|
-
*/
|
|
15
|
-
export declare class GoldRushClient {
|
|
16
|
-
private readonly userAgent;
|
|
17
|
-
AllChainsService: AllChainsService;
|
|
18
|
-
BalanceService: BalanceService;
|
|
19
|
-
BaseService: BaseService;
|
|
20
|
-
BitcoinService: BitcoinService;
|
|
21
|
-
NftService: NftService;
|
|
22
|
-
PricingService: PricingService;
|
|
23
|
-
SecurityService: SecurityService;
|
|
24
|
-
StreamingService: StreamingService;
|
|
25
|
-
TransactionService: TransactionService;
|
|
26
|
-
constructor(apiKey: string, settings?: GoldRushClientSettings, streamingConfig?: StreamingServiceConfig);
|
|
27
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type ChainActivityResponse, type GetAddressActivityQueryParamOpts, type GetMultiChainBalanceQueryParamOpts, type GetMultiChainMultiAddressTransactionsParamOtps, type MultiChainBalanceResponse, type MultiChainMultiAddressTransactionsResponse } from "../utils/types/AllChainService.types";
|
|
3
|
-
import { type GoldRushResponse } from "../utils/types/Generic.types";
|
|
4
|
-
/**
|
|
5
|
-
* Cross Chain API
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class AllChainsService {
|
|
9
|
-
private execution;
|
|
10
|
-
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to locate chains which an address is active on with a single API call.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} walletAddress - The requested wallet address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
16
|
-
* @param {GetAddressActivityQueryParamOpts} queryParamOpts
|
|
17
|
-
* - `testnets`: Set to true to include testnets with activity in the response. By default, it's set to `false` and only returns mainnet activity.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
getAddressActivity(walletAddress: string, queryParamOpts?: GetAddressActivityQueryParamOpts): Promise<GoldRushResponse<ChainActivityResponse>>;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* Commonly used to get transactions cross chains and addresses.
|
|
24
|
-
*
|
|
25
|
-
* @param {Chain[]} chains - An array of the chain names or IDs to retrieve transactions from. Defaults to all foundational chains.
|
|
26
|
-
* @param {string[]} addresses - An array of addresses for which transactions are fetched. Does not support name resolution.
|
|
27
|
-
* @param {number} limit - Number of transactions to return per page, up to the default max of 100 items.
|
|
28
|
-
* @param {string} before - Pagination cursor pointing to fetch transactions before a certain point.
|
|
29
|
-
* @param {string} after - Pagination cursor pointing to fetch transactions after a certain point.
|
|
30
|
-
* @param {boolean} withLogs - Whether to include raw logs in the response.
|
|
31
|
-
* @param {boolean} withDecodedLogs - Whether to include decoded logs in the response.
|
|
32
|
-
* @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`.
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
getMultiChainMultiAddressTransactions(queryParamOpts?: GetMultiChainMultiAddressTransactionsParamOtps): Promise<GoldRushResponse<MultiChainMultiAddressTransactionsResponse>>;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated This method is deprecated and will be removed in the upcoming versions. Please use `AllChainsService.getMultiChainMultiAddressTransactions` instead.
|
|
38
|
-
*
|
|
39
|
-
* Commonly used to get transactions cross chains and addresses.
|
|
40
|
-
*
|
|
41
|
-
* @param {Chain[]} chains - An array of the chain names or IDs to retrieve transactions from. Defaults to all foundational chains.
|
|
42
|
-
* @param {string[]} addresses - An array of addresses for which transactions are fetched. Does not support name resolution.
|
|
43
|
-
* @param {number} limit - Number of transactions to return per page, up to the default max of 100 items.
|
|
44
|
-
* @param {string} before - Pagination cursor pointing to fetch transactions before a certain point.
|
|
45
|
-
* @param {string} after - Pagination cursor pointing to fetch transactions after a certain point.
|
|
46
|
-
* @param {boolean} withLogs - Whether to include raw logs in the response.
|
|
47
|
-
* @param {boolean} withDecodedLogs - Whether to include decoded logs in the response.
|
|
48
|
-
* @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`.
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
getMultiChainAndMultiAddressTransactions(queryParamOpts?: GetMultiChainMultiAddressTransactionsParamOtps): Promise<GoldRushResponse<MultiChainMultiAddressTransactionsResponse>>;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @param {string} walletAddress - The requested wallet Address.
|
|
55
|
-
* @param {GetMultiChainBalanceQueryParamOpts} queryParamOpts
|
|
56
|
-
* - `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`.
|
|
57
|
-
* - `chains`: Array chain ids or chain names to query. Limited to 10 chains.
|
|
58
|
-
* - `limit`: The number of items to return. Default is 100.
|
|
59
|
-
* - `timestamp`: The timestamp to query balances at. If omitted, the latest balances are returned.
|
|
60
|
-
* - `cursorBefore`: The cursor of previous page.
|
|
61
|
-
*/
|
|
62
|
-
getMultiChainBalances(walletAddress: string, queryParamOpts?: GetMultiChainBalanceQueryParamOpts): Promise<GoldRushResponse<MultiChainBalanceResponse>>;
|
|
63
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type BalancesResponse, type Erc20TransfersResponse, type GetErc20TransfersForWalletAddressQueryParamOpts, type GetHistoricalPortfolioForWalletAddressQueryParamOpts, type GetHistoricalTokenBalancesForWalletAddressQueryParamOpts, type GetNativeTokenBalanceQueryParamOpts, type GetTokenBalancesForWalletAddressQueryParamOpts, type GetTokenHoldersV2ForTokenAddressQueryParamOpts, type HistoricalBalancesResponse, type PortfolioResponse, type TokenBalanceNativeResponse, type TokenHoldersResponse } from "../utils/types/BalanceService.types";
|
|
3
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
4
|
-
/**
|
|
5
|
-
* Balances APIs
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class BalanceService {
|
|
9
|
-
private execution;
|
|
10
|
-
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.
|
|
14
|
-
*
|
|
15
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
17
|
-
* @param {GetTokenBalancesForWalletAddressQueryParamOpts} queryParamOpts
|
|
18
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
19
|
-
* - `nft`: If `true`, NFTs will be included in the response.
|
|
20
|
-
* - `noNftFetch`: If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times.
|
|
21
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
22
|
-
* - `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.
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
getTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<GoldRushResponse<BalancesResponse>>;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* 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
|
-
*
|
|
30
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
31
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
32
|
-
* @param {GetHistoricalPortfolioForWalletAddressQueryParamOpts} queryParamOpts
|
|
33
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
34
|
-
* - `days`: The number of days to return data for. Defaults to 30 days.
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
getHistoricalPortfolioForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<GoldRushResponse<PortfolioResponse>>;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
|
|
41
|
-
*
|
|
42
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
43
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
44
|
-
* @param {GetErc20TransfersForWalletAddressQueryParamOpts} queryParamOpts
|
|
45
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
46
|
-
* - `contractAddress`: The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
47
|
-
* - `startingBlock`: The block height to start from, defaults to `0`.
|
|
48
|
-
* - `endingBlock`: The block height to end at, defaults to current block height.
|
|
49
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
50
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
getErc20TransfersForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<GoldRushResponse<Erc20TransfersResponse>>;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
|
|
57
|
-
*
|
|
58
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
59
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
60
|
-
* @param {GetErc20TransfersForWalletAddressQueryParamOpts} queryParamOpts
|
|
61
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
62
|
-
* - `contractAddress`: The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
63
|
-
* - `startingBlock`: The block height to start from, defaults to `0`.
|
|
64
|
-
* - `endingBlock`: The block height to end at, defaults to current block height.
|
|
65
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
66
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
getErc20TransfersForWalletAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<GoldRushResponse<Erc20TransfersResponse>>;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to `latest`). Useful for building pie charts of token holders.
|
|
73
|
-
*
|
|
74
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
75
|
-
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
76
|
-
* @param {GetTokenHoldersV2ForTokenAddressQueryParamOpts} queryParamOpts
|
|
77
|
-
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
78
|
-
* - `pageSize`: Number of items per page. Note: Currently, only values of `100` and `1000` are supported. Omitting this parameter defaults to 100.
|
|
79
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
80
|
-
* - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
getTokenHoldersV2ForTokenAddress(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<GoldRushResponse<TokenHoldersResponse>>;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to `latest`). Useful for building pie charts of token holders.
|
|
87
|
-
*
|
|
88
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
89
|
-
* @param {string} tokenAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
90
|
-
* @param {GetTokenHoldersV2ForTokenAddressQueryParamOpts} queryParamOpts
|
|
91
|
-
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
92
|
-
* - `pageSize`: Number of items per page. Note: Currently, only values of `100` and `1000` are supported. Omitting this parameter defaults to 100.
|
|
93
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
94
|
-
* - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
|
-
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<GoldRushResponse<TokenHoldersResponse>>;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* Commonly used to fetch the historical native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address at a given block height or date. Response includes daily prices and other metadata.
|
|
101
|
-
*
|
|
102
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
103
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
104
|
-
* @param {GetHistoricalTokenBalancesForWalletAddressQueryParamOpts} queryParamOpts
|
|
105
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
106
|
-
* - `nft`: If `true`, NFTs will be included in the response.
|
|
107
|
-
* - `noNftFetch`: If `true`, only NFTs that have been cached will be included in the response. Helpful for faster response times.
|
|
108
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
109
|
-
* - `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.
|
|
110
|
-
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
111
|
-
* - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
getHistoricalTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<GoldRushResponse<HistoricalBalancesResponse>>;
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
118
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
119
|
-
* @param {GetNativeTokenBalanceQueryParamOpts} queryParamOpts
|
|
120
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
121
|
-
* - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
|
|
122
|
-
*
|
|
123
|
-
*/
|
|
124
|
-
getNativeTokenBalance(chainName: Chain, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<GoldRushResponse<TokenBalanceNativeResponse>>;
|
|
125
|
-
}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type ChainActivityResponse, type GetAddressActivityQueryParamOpts } from "../utils/types/AllChainService.types";
|
|
3
|
-
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
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
5
|
-
/**
|
|
6
|
-
* Base API
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare class BaseService {
|
|
10
|
-
private execution;
|
|
11
|
-
constructor(execution: Execution);
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* Commonly used to fetch and render a single block for a block explorer.
|
|
15
|
-
*
|
|
16
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
17
|
-
* @param {string} blockHeight - The block height or `latest` for the latest block available.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
getBlock(chainName: Chain, blockHeight: string): Promise<GoldRushResponse<BlockResponse>>;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* Commonly used to resolve ENS, RNS and Unstoppable Domains addresses.
|
|
24
|
-
*
|
|
25
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
26
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
getResolvedAddress(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<ResolvedAddress>>;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* 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
|
-
*
|
|
34
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
35
|
-
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
36
|
-
* @param {string | "latest"} endDate - The end date in YYYY-MM-DD format. Also accepts "latest" for the latest block height
|
|
37
|
-
* @param {GetBlockHeightsQueryParamOpts} queryParamOpts
|
|
38
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
39
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
getBlockHeights(chainName: Chain, startDate: string, endDate: string | "latest", queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<GoldRushResponse<BlockHeightsResponse>>;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* 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
|
-
*
|
|
47
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
48
|
-
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
49
|
-
* @param {string | "latest"} endDate - The end date in YYYY-MM-DD format. Also accepts "latest" for the latest block height
|
|
50
|
-
* @param {GetBlockHeightsQueryParamOpts} queryParamOpts
|
|
51
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
52
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
getBlockHeightsByPage(chainName: Chain, startDate: string, endDate: string | "latest", queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<GoldRushResponse<BlockHeightsResponse>>;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* 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
|
-
*
|
|
60
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
61
|
-
* @param {GetLogsQueryParamOpts} queryParamOpts
|
|
62
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
63
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
64
|
-
* - `address`: The address of the log events sender contract.
|
|
65
|
-
* - `topics`: The topic hash(es) to retrieve logs with.
|
|
66
|
-
* - `blockHash`: The block hash to retrieve logs for.
|
|
67
|
-
* - `skipDecode`: Omit decoded log events.
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
getLogs(chainName: Chain, queryParamOpts?: GetLogsQueryParamOpts): Promise<GoldRushResponse<GetLogsResponse>>;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
74
|
-
*
|
|
75
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
76
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
77
|
-
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
78
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
79
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
80
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
81
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
getLogEventsByAddress(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<GoldRushResponse<LogEventsByAddressResponse>>;
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
88
|
-
*
|
|
89
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
90
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
91
|
-
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
92
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
93
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
94
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
95
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
getLogEventsByAddressByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<GoldRushResponse<LogEventsByAddressResponse>>;
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* 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
|
-
*
|
|
103
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
104
|
-
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
105
|
-
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
106
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
107
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
108
|
-
* - `secondaryTopics`: Additional topic hash(es) to filter on - padded & unpadded address fields are supported. Separate multiple topics with a comma.
|
|
109
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
110
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
getLogEventsByTopicHash(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<GoldRushResponse<LogEventsByTopicHashResponse>>;
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* 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
|
-
*
|
|
118
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
119
|
-
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
120
|
-
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
121
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
122
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
123
|
-
* - `secondaryTopics`: Additional topic hash(es) to filter on - padded & unpadded address fields are supported. Separate multiple topics with a comma.
|
|
124
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
125
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
126
|
-
*
|
|
127
|
-
*/
|
|
128
|
-
getLogEventsByTopicHashByPage(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<GoldRushResponse<LogEventsByTopicHashResponse>>;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* Commonly used to build internal dashboards for all supported chains on Covalent.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
135
|
-
getAllChains(): Promise<GoldRushResponse<AllChainsResponse>>;
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
* Commonly used to build internal status dashboards of all supported chains.
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*/
|
|
142
|
-
getAllChainStatus(): Promise<GoldRushResponse<AllChainsStatusResponse>>;
|
|
143
|
-
/**
|
|
144
|
-
* @deprecated This method is deprecated and will be removed in the upcoming versions. Please use `AllChainsService.getAddressActivity` instead.
|
|
145
|
-
*
|
|
146
|
-
* Commonly used to locate chains which an address is active on with a single API call.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} walletAddress - The requested wallet address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
149
|
-
* @param {GetAddressActivityQueryParamOpts} queryParamOpts
|
|
150
|
-
* - `testnets`: Set to true to include testnets with activity in the response. By default, it's set to `false` and only returns mainnet activity.
|
|
151
|
-
*
|
|
152
|
-
*/
|
|
153
|
-
getAddressActivity(walletAddress: string, queryParamOpts?: GetAddressActivityQueryParamOpts): Promise<GoldRushResponse<ChainActivityResponse>>;
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
157
|
-
* @param {string} eventType - The desired event type to retrieve gas prices for. Supports `erc20` transfer events, `uniswapv3` swap events and `nativetokens` transfers.
|
|
158
|
-
* @param {GetGasPricesQueryParamOpts} queryParamOpts
|
|
159
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
160
|
-
*
|
|
161
|
-
*/
|
|
162
|
-
getGasPrices(chainName: Chain, eventType: "erc20" | "nativetokens" | "uniswapv3", queryParamOpts?: GetGasPricesQueryParamOpts): Promise<GoldRushResponse<GasPricesResponse>>;
|
|
163
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type BalancesResponse } from "../utils/types/BalanceService.types";
|
|
3
|
-
import { type BitcoinHdWalletBalancesResponse, type BitcoinTransactionResponse, type GetBitcoinHdWalletBalancesQueryParamOpts, type GetBitcoinNonHdWalletBalancesQueryParamOpts, type GetTransactionsForBitcoinAddressParamOpts } from "../utils/types/BitcoinService.types";
|
|
4
|
-
import { type GoldRushResponse } from "../utils/types/Generic.types";
|
|
5
|
-
/**
|
|
6
|
-
* Bitcoin APIs
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare class BitcoinService {
|
|
10
|
-
private execution;
|
|
11
|
-
constructor(execution: Execution);
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param {string} walletAddress - The requested Bitcoin HD address.
|
|
15
|
-
* @param {GetBitcoinHdWalletBalancesQueryParamOpts} queryParamOpts
|
|
16
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
getBitcoinHdWalletBalances(walletAddress: string, queryParamOpts?: GetBitcoinHdWalletBalancesQueryParamOpts): Promise<GoldRushResponse<BitcoinHdWalletBalancesResponse>>;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* Used to fetch the full transaction history of a Bitcoin wallet.
|
|
23
|
-
*
|
|
24
|
-
* @param {GetTransactionsForBitcoinAddressParamOpts} queryParamOpts
|
|
25
|
-
* - `address`: The bitcoin address to query.
|
|
26
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
27
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
28
|
-
*/
|
|
29
|
-
getTransactionsForBtcAddress(queryParamOpts?: GetTransactionsForBitcoinAddressParamOpts): Promise<GoldRushResponse<BitcoinTransactionResponse>>;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* Commonly used to fetch the tokens held by an address. Response includes spot prices and other metadata.
|
|
33
|
-
*
|
|
34
|
-
* @param {string} walletAddress - The requested Bitcoin Non HD address.
|
|
35
|
-
* @param {GetBitcoinNonHdWalletBalancesQueryParamOpts} queryParamOpts
|
|
36
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
getBitcoinNonHdWalletBalances(walletAddress: string, queryParamOpts?: GetBitcoinNonHdWalletBalancesQueryParamOpts): Promise<GoldRushResponse<BalancesResponse>>;
|
|
40
|
-
}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
3
|
-
import { type ChainCollectionResponse, type CheckOwnershipInNftQueryParamOpts, type GetChainCollectionsQueryParamOpts, type GetCollectionMarketDataQueryParamOpts, type GetNftMetadataForGivenTokenIdForContractQueryParamOpts, type GetNftTransactionsForContractTokenIdQueryParamOpts, type GetNftsForAddressQueryParamOpts, type GetTokenIdsForContractWithMetadataQueryParamOpts, type NftAddressBalanceNftResponse, type NftCollectionAttributesForTraitResponse, type NftCollectionFloorPriceResponse, type NftCollectionSalesCountResponse, type NftCollectionTraitsResponse, type NftCollectionTraitsSummaryResponse, type NftCollectionVolumeResponse, type NftMetadataResponse, type NftOwnershipForCollectionResponse, type NftTransactionsResponse } from "../utils/types/NftService.types";
|
|
4
|
-
/**
|
|
5
|
-
* NFTs API
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class NftService {
|
|
9
|
-
private execution;
|
|
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
|
-
*/
|
|
22
|
-
getChainCollections(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<GoldRushResponse<ChainCollectionResponse>>;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
|
|
26
|
-
*
|
|
27
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
28
|
-
* @param {GetChainCollectionsQueryParamOpts} queryParamOpts
|
|
29
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
30
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
31
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
getChainCollectionsByPage(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<GoldRushResponse<ChainCollectionResponse>>;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.
|
|
38
|
-
*
|
|
39
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
40
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
41
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
42
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
43
|
-
* - `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.
|
|
44
|
-
* - `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.
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
getNftsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<GoldRushResponse<NftAddressBalanceNftResponse>>;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
|
|
51
|
-
*
|
|
52
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
53
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
54
|
-
* @param {GetTokenIdsForContractWithMetadataQueryParamOpts} queryParamOpts
|
|
55
|
-
* - `noMetadata`: Omit metadata.
|
|
56
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
57
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
58
|
-
* - `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.
|
|
59
|
-
* - `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
|
-
* - `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
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
getTokenIdsForContractWithMetadata(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<GoldRushResponse<NftMetadataResponse>>;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
|
|
67
|
-
*
|
|
68
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
69
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
70
|
-
* @param {GetTokenIdsForContractWithMetadataQueryParamOpts} queryParamOpts
|
|
71
|
-
* - `noMetadata`: Omit metadata.
|
|
72
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
73
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
74
|
-
* - `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.
|
|
75
|
-
* - `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
|
-
* - `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
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
getTokenIdsForContractWithMetadataByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
|
|
83
|
-
*
|
|
84
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
85
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
86
|
-
* @param {string} tokenId - The requested token ID.
|
|
87
|
-
* @param {GetNftMetadataForGivenTokenIdForContractQueryParamOpts} queryParamOpts
|
|
88
|
-
* - `noMetadata`: Omit metadata.
|
|
89
|
-
* - `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
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
getNftMetadataForGivenTokenIdForContract(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<GoldRushResponse<NftMetadataResponse>>;
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.
|
|
96
|
-
*
|
|
97
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
98
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
99
|
-
* @param {string} tokenId - The requested token ID.
|
|
100
|
-
* @param {GetNftTransactionsForContractTokenIdQueryParamOpts} queryParamOpts
|
|
101
|
-
* - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
|
|
102
|
-
*
|
|
103
|
-
*/
|
|
104
|
-
getNftTransactionsForContractTokenId(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<GoldRushResponse<NftTransactionsResponse>>;
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* Commonly used to fetch and render the traits of a collection as seen in rarity calculators.
|
|
108
|
-
*
|
|
109
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
110
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
getTraitsForCollection(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsResponse>>;
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* Commonly used to get the count of unique values for traits within an NFT collection.
|
|
117
|
-
*
|
|
118
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
119
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
120
|
-
* @param {string} trait - The requested trait.
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
getAttributesForTraitInCollection(chainName: Chain, collectionContract: string, trait: string): Promise<GoldRushResponse<NftCollectionAttributesForTraitResponse>>;
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* Commonly used to calculate rarity scores for a collection based on its traits.
|
|
127
|
-
*
|
|
128
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
129
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
130
|
-
*
|
|
131
|
-
*/
|
|
132
|
-
getCollectionTraitsSummary(chainName: Chain, collectionContract: string): Promise<GoldRushResponse<NftCollectionTraitsSummaryResponse>>;
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* Commonly used to render a price floor chart for an NFT collection.
|
|
136
|
-
*
|
|
137
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
138
|
-
* @param {string} collectionAddress - The requested address.
|
|
139
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
140
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
141
|
-
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
142
|
-
*
|
|
143
|
-
*/
|
|
144
|
-
getHistoricalFloorPricesForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionFloorPriceResponse>>;
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
147
|
-
* Commonly used to build a time-series chart of the transaction volume of an NFT collection.
|
|
148
|
-
*
|
|
149
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
150
|
-
* @param {string} collectionAddress - The requested address.
|
|
151
|
-
* @param {GetNftsForAddressQueryParamOpts} queryParamOpts
|
|
152
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
153
|
-
* - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
getHistoricalVolumeForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionVolumeResponse>>;
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* Commonly used to build a time-series chart of the sales count 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
|
-
*/
|
|
168
|
-
getHistoricalSalesCountForCollection(chainName: Chain, collectionAddress: string, queryParamOpts?: GetCollectionMarketDataQueryParamOpts): Promise<GoldRushResponse<NftCollectionSalesCountResponse>>;
|
|
169
|
-
/**
|
|
170
|
-
*
|
|
171
|
-
* Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
|
|
172
|
-
*
|
|
173
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
174
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
175
|
-
* @param {string} collectionContract - The requested collection address.
|
|
176
|
-
* @param {CheckOwnershipInNftQueryParamOpts} queryParamOpts
|
|
177
|
-
* - `traitsFilter`: Filters NFTs based on a specific trait. If this filter is used, the API will return all NFTs with the specified trait. Must be used with "values-filter", is case-sensitive, and requires proper URL encoding.
|
|
178
|
-
* - `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. Must be used with "traits-filter", is case-sensitive, and requires proper URL encoding.
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
checkOwnershipInNft(chainName: Chain, walletAddress: string, collectionContract: string, queryParamOpts?: CheckOwnershipInNftQueryParamOpts): Promise<GoldRushResponse<NftOwnershipForCollectionResponse>>;
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
|
|
185
|
-
*
|
|
186
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
187
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
188
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
189
|
-
* @param {string} tokenId - The requested token ID.
|
|
190
|
-
*
|
|
191
|
-
*/
|
|
192
|
-
checkOwnershipInNftForSpecificTokenId(chainName: Chain, walletAddress: string, collectionContract: string, tokenId: string): Promise<GoldRushResponse<NftOwnershipForCollectionResponse>>;
|
|
193
|
-
}
|