@covalenthq/client-sdk 2.0.1 → 2.0.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 +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +30 -17
- package/dist/es/index.d.ts +0 -17
- package/dist/es/index.js +0 -2854
- package/dist/es/index.js.map +0 -1
- package/dist/es/src/GoldRushClient.d.ts +0 -20
- package/dist/es/src/services/BalanceService.d.ts +0 -125
- package/dist/es/src/services/BaseService.d.ts +0 -161
- package/dist/es/src/services/NftService.d.ts +0 -157
- package/dist/es/src/services/PricingService.d.ts +0 -25
- package/dist/es/src/services/SecurityService.d.ts +0 -28
- package/dist/es/src/services/TransactionService.d.ts +0 -128
- package/dist/es/src/utils/functions/bigIntParser.d.ts +0 -1
- package/dist/es/src/utils/functions/calculatePrettyBalance.d.ts +0 -1
- package/dist/es/src/utils/functions/debugOutput.d.ts +0 -2
- package/dist/es/src/utils/functions/endpointGenerator.d.ts +0 -4
- package/dist/es/src/utils/functions/execution.d.ts +0 -11
- package/dist/es/src/utils/functions/isValidApiKey.d.ts +0 -1
- package/dist/es/src/utils/functions/paginateEndpoint.d.ts +0 -7
- package/dist/es/src/utils/functions/prettifyCurrency.d.ts +0 -2
- package/dist/es/src/utils/types/BalanceService.types.d.ts +0 -442
- package/dist/es/src/utils/types/BaseService.types.d.ts +0 -326
- package/dist/es/src/utils/types/Generic.types.d.ts +0 -477
- package/dist/es/src/utils/types/NftService.types.d.ts +0 -273
- package/dist/es/src/utils/types/PricingService.types.d.ts +0 -39
- package/dist/es/src/utils/types/SecurityService.types.d.ts +0 -122
- package/dist/es/src/utils/types/TransactionService.types.d.ts +0 -474
|
@@ -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,161 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type AllChainsResponse, type AllChainsStatusResponse, type BlockHeightsResponse, type BlockResponse, type ChainActivityResponse, type GasPricesResponse, type GetAddressActivityQueryParamOpts, type GetBlockHeightsQueryParamOpts, type GetGasPricesQueryParamOpts, type GetLogEventsByAddressQueryParamOpts, type GetLogEventsByTopicHashQueryParamOpts, type GetLogsQueryParamOpts, type GetLogsResponse, type LogEventsByAddressResponse, type LogEventsByTopicHashResponse, type ResolvedAddress } from "../utils/types/BaseService.types";
|
|
3
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
4
|
-
/**
|
|
5
|
-
* Class A - Base
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class BaseService {
|
|
9
|
-
private execution;
|
|
10
|
-
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to fetch and render a single block for a block explorer.
|
|
14
|
-
*
|
|
15
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
|
-
* @param {string} blockHeight - The block height or `latest` for the latest block available.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
getBlock(chainName: Chain, blockHeight: string): Promise<GoldRushResponse<BlockResponse>>;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* Commonly used to resolve ENS, RNS and Unstoppable Domains addresses.
|
|
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
|
-
getResolvedAddress(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<ResolvedAddress>>;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
32
|
-
*
|
|
33
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
34
|
-
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
35
|
-
* @param {string} endDate - The end date in YYYY-MM-DD format.
|
|
36
|
-
* @param {GetBlockHeightsQueryParamOpts} queryParamOpts
|
|
37
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
38
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
getBlockHeights(chainName: Chain, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<GoldRushResponse<BlockHeightsResponse>>;
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
45
|
-
*
|
|
46
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
47
|
-
* @param {string} startDate - The start date in YYYY-MM-DD format.
|
|
48
|
-
* @param {string} endDate - The end date in YYYY-MM-DD format.
|
|
49
|
-
* @param {GetBlockHeightsQueryParamOpts} queryParamOpts
|
|
50
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
51
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
getBlockHeightsByPage(chainName: Chain, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<GoldRushResponse<BlockHeightsResponse>>;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* 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.
|
|
58
|
-
*
|
|
59
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
60
|
-
* @param {GetLogsQueryParamOpts} queryParamOpts
|
|
61
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
62
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
63
|
-
* - `address`: The address of the log events sender contract.
|
|
64
|
-
* - `topics`: The topic hash(es) to retrieve logs with.
|
|
65
|
-
* - `blockHash`: The block hash to retrieve logs for.
|
|
66
|
-
* - `skipDecode`: Omit decoded log events.
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
getLogs(chainName: Chain, queryParamOpts?: GetLogsQueryParamOpts): Promise<GoldRushResponse<GetLogsResponse>>;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
73
|
-
*
|
|
74
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
75
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
76
|
-
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
77
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
78
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
79
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
80
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
getLogEventsByAddress(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<GoldRushResponse<LogEventsByAddressResponse>>;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
|
|
87
|
-
*
|
|
88
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
89
|
-
* @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
90
|
-
* @param {GetLogEventsByAddressQueryParamOpts} queryParamOpts
|
|
91
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
92
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
93
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
94
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
|
-
getLogEventsByAddressByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<GoldRushResponse<LogEventsByAddressResponse>>;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* 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.
|
|
101
|
-
*
|
|
102
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
103
|
-
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
104
|
-
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
105
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
106
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
107
|
-
* - `secondaryTopics`: Additional topic hash(es) to filter on - padded & unpadded address fields are supported. Separate multiple topics with a comma.
|
|
108
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
109
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
getLogEventsByTopicHash(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<GoldRushResponse<LogEventsByTopicHashResponse>>;
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
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.
|
|
116
|
-
*
|
|
117
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
118
|
-
* @param {string} topicHash - The endpoint will return event logs that contain this topic hash.
|
|
119
|
-
* @param {GetLogEventsByTopicHashQueryParamOpts} queryParamOpts
|
|
120
|
-
* - `startingBlock`: The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
121
|
-
* - `endingBlock`: The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings `earliest` and `latest`.
|
|
122
|
-
* - `secondaryTopics`: Additional topic hash(es) to filter on - padded & unpadded address fields are supported. Separate multiple topics with a comma.
|
|
123
|
-
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
124
|
-
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
getLogEventsByTopicHashByPage(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<GoldRushResponse<LogEventsByTopicHashResponse>>;
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
* Commonly used to build internal dashboards for all supported chains on Covalent.
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
getAllChains(): Promise<GoldRushResponse<AllChainsResponse>>;
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* Commonly used to build internal status dashboards of all supported chains.
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*/
|
|
141
|
-
getAllChainStatus(): Promise<GoldRushResponse<AllChainsStatusResponse>>;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* Commonly used to locate chains which an address is active on with a single API call.
|
|
145
|
-
*
|
|
146
|
-
* @param {string} walletAddress - The requested wallet address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
147
|
-
* @param {GetAddressActivityQueryParamOpts} queryParamOpts
|
|
148
|
-
* - `testnets`: Set to true to include testnets with activity in the response. By default, it's set to `false` and only returns mainnet activity.
|
|
149
|
-
*
|
|
150
|
-
*/
|
|
151
|
-
getAddressActivity(walletAddress: string, queryParamOpts?: GetAddressActivityQueryParamOpts): Promise<GoldRushResponse<ChainActivityResponse>>;
|
|
152
|
-
/**
|
|
153
|
-
*
|
|
154
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
155
|
-
* @param {string} eventType - The desired event type to retrieve gas prices for. Supports `erc20` transfer events, `uniswapv3` swap events and `nativetokens` transfers.
|
|
156
|
-
* @param {GetGasPricesQueryParamOpts} queryParamOpts
|
|
157
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
getGasPrices(chainName: Chain, eventType: "erc20" | "nativetokens" | "uniswapv3", queryParamOpts?: GetGasPricesQueryParamOpts): Promise<GoldRushResponse<GasPricesResponse>>;
|
|
161
|
-
}
|
|
@@ -1,157 +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 GetNftMetadataForGivenTokenIdForContractQueryParamOpts, type GetNftTransactionsForContractTokenIdQueryParamOpts, type GetNftsForAddressQueryParamOpts, type GetTokenIdsForContractWithMetadataQueryParamOpts, type NftAddressBalanceNftResponse, type NftCollectionAttributesForTraitResponse, type NftCollectionTraitsResponse, type NftCollectionTraitsSummaryResponse, type NftMetadataResponse, type NftOwnershipForCollectionResponse, type NftTransactionsResponse } from "../utils/types/NftService.types";
|
|
4
|
-
/**
|
|
5
|
-
* NFT APIs
|
|
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 verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
|
|
136
|
-
*
|
|
137
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
138
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
139
|
-
* @param {string} collectionContract - The requested collection address.
|
|
140
|
-
* @param {CheckOwnershipInNftQueryParamOpts} queryParamOpts
|
|
141
|
-
* - `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.
|
|
142
|
-
* - `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.
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
checkOwnershipInNft(chainName: Chain, walletAddress: string, collectionContract: string, queryParamOpts?: CheckOwnershipInNftQueryParamOpts): Promise<GoldRushResponse<NftOwnershipForCollectionResponse>>;
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
|
|
149
|
-
*
|
|
150
|
-
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
151
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
152
|
-
* @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
153
|
-
* @param {string} tokenId - The requested token ID.
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
checkOwnershipInNftForSpecificTokenId(chainName: Chain, walletAddress: string, collectionContract: string, tokenId: string): Promise<GoldRushResponse<NftOwnershipForCollectionResponse>>;
|
|
157
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type Chain, type GoldRushResponse, type Quote } from "../utils/types/Generic.types";
|
|
3
|
-
import { type GetTokenPricesQueryParamOpts, type TokenPricesResponse } from "../utils/types/PricingService.types";
|
|
4
|
-
/**
|
|
5
|
-
* Pricing APIs
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class PricingService {
|
|
9
|
-
private execution;
|
|
10
|
-
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to get historic prices of a token between date ranges. Supports native tokens.
|
|
14
|
-
*
|
|
15
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
16
|
-
* @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`.
|
|
17
|
-
* @param {string} contractAddress - Contract address for the token. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically. Supports multiple contract addresses separated by commas.
|
|
18
|
-
* @param {GetTokenPricesQueryParamOpts} queryParamOpts
|
|
19
|
-
* - `from`: The start day of the historical price range (YYYY-MM-DD).
|
|
20
|
-
* - `to`: The end day of the historical price range (YYYY-MM-DD).
|
|
21
|
-
* - `pricesAtAsc`: Sort the prices in chronological ascending order. By default, it's set to `false` and returns prices in chronological descending order.
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
getTokenPrices(chainName: Chain, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<GoldRushResponse<TokenPricesResponse[]>>;
|
|
25
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
3
|
-
import { type ApprovalsResponse, type NftApprovalsResponse } from "../utils/types/SecurityService.types";
|
|
4
|
-
/**
|
|
5
|
-
* Approvals API
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class SecurityService {
|
|
9
|
-
private execution;
|
|
10
|
-
constructor(execution: Execution);
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
|
|
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
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
getApprovals(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<ApprovalsResponse>>;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
23
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
getNftApprovals(chainName: Chain, walletAddress: string): Promise<GoldRushResponse<NftApprovalsResponse>>;
|
|
28
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { type Execution } from "../utils/functions/execution";
|
|
2
|
-
import { type Chain, type GoldRushResponse } from "../utils/types/Generic.types";
|
|
3
|
-
import { type GetAllTransactionsForAddressQueryParamOpts, type GetTimeBucketTransactionsForAddressQueryParamOpts, type GetTransactionQueryParamOpts, type GetTransactionSummaryQueryParamOpts, type GetTransactionsForAddressV3QueryParamOpts, type GetTransactionsForBlockHashByPageQueryParamOpts, type GetTransactionsForBlockHashQueryParamOpts, type GetTransactionsForBlockQueryParamOpts, type RecentTransactionsResponse, type TransactionResponse, type TransactionsBlockPageResponse, type TransactionsBlockResponse, type TransactionsResponse, type TransactionsSummaryResponse, type TransactionsTimeBucketResponse } from "../utils/types/TransactionService.types";
|
|
4
|
-
export declare class TransactionService {
|
|
5
|
-
private execution;
|
|
6
|
-
constructor(execution: Execution);
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* Commonly used to fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales.
|
|
10
|
-
*
|
|
11
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
12
|
-
* @param {string} txHash - The transaction hash.
|
|
13
|
-
* @param {GetTransactionQueryParamOpts} queryParamOpts
|
|
14
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
15
|
-
* - `noLogs`: Omit log events.
|
|
16
|
-
* - `withDex`: Decoded DEX details including protocol (e.g. Uniswap), event (e.g 'add_liquidity') and tokens involved with historical prices. Additional 0.05 credits charged if data available.
|
|
17
|
-
* - `withNftSales`: Decoded NFT sales details including marketplace (e.g. Opensea) and cached media links. Additional 0.05 credits charged if data available.
|
|
18
|
-
* - `withLending`: Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available.
|
|
19
|
-
* - `withSafe`: Include safe details.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
getTransaction(chainName: Chain, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<GoldRushResponse<TransactionResponse>>;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
|
|
26
|
-
*
|
|
27
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
28
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
29
|
-
* @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
30
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
31
|
-
* - `noLogs`: Omit log events.
|
|
32
|
-
* - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
|
|
33
|
-
* - `withSafe`: Include safe details.
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
getAllTransactionsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<GoldRushResponse<RecentTransactionsResponse>>;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
|
|
40
|
-
*
|
|
41
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
42
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
43
|
-
* @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
44
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
45
|
-
* - `noLogs`: Omit log events.
|
|
46
|
-
* - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
|
|
47
|
-
* - `withSafe`: Include safe details.
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
getAllTransactionsForAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<GoldRushResponse<RecentTransactionsResponse>>;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
54
|
-
*
|
|
55
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
56
|
-
* @param {number} blockHeight - The requested block height.
|
|
57
|
-
* @param {GetTransactionsForBlockQueryParamOpts} queryParamOpts
|
|
58
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
59
|
-
* - `noLogs`: Omit log events.
|
|
60
|
-
* - `withSafe`: Include safe details.
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
getTransactionsForBlock(chainName: Chain, blockHeight: number | string, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<GoldRushResponse<TransactionsBlockResponse>>;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Calculate the age of the wallet and the time it has been idle and quickly gain insights into their engagement with web3.
|
|
67
|
-
*
|
|
68
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
69
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
70
|
-
* @param {GetTransactionSummaryQueryParamOpts} queryParamOpts
|
|
71
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
72
|
-
* - `withGas`: Include gas summary details. Additional charge of 1 credit when true. Response times may be impacted for wallets with millions of transactions.
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
getTransactionSummary(chainName: Chain, walletAddress: string, queryParamOpts?: GetTransactionSummaryQueryParamOpts): Promise<GoldRushResponse<TransactionsSummaryResponse>>;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
79
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
80
|
-
* @param {number} page - The requested page, 0-indexed.
|
|
81
|
-
* @param {GetTransactionsForAddressV3QueryParamOpts} queryParamOpts
|
|
82
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
83
|
-
* - `noLogs`: Omit log events.
|
|
84
|
-
* - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
|
|
85
|
-
* - `withSafe`: Include safe details.
|
|
86
|
-
*
|
|
87
|
-
*/
|
|
88
|
-
getTransactionsForAddressV3(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<GoldRushResponse<TransactionsResponse>>;
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
92
|
-
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
93
|
-
* @param {number} timeBucket - The 0-indexed 15-minute time bucket. E.g. 27 Feb 2023 05:23 GMT = 1677475383 (Unix time). 1677475383/900=1863861 timeBucket.
|
|
94
|
-
* @param {GetTimeBucketTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
95
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
96
|
-
* - `noLogs`: Omit log events.
|
|
97
|
-
* - `withSafe`: Include safe details.
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
getTimeBucketTransactionsForAddress(chainName: Chain, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<GoldRushResponse<TransactionsTimeBucketResponse>>;
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
104
|
-
*
|
|
105
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
106
|
-
* @param {string} blockHash - The requested block hash.
|
|
107
|
-
* @param {number} page - The requested 0-indexed page number.
|
|
108
|
-
* @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
|
|
109
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
110
|
-
* - `noLogs`: Omit log events.
|
|
111
|
-
* - `withSafe`: Include safe details.
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
getTransactionsForBlockHashByPage(chainName: Chain, blockHash: string, page: number, queryParamOpts?: GetTransactionsForBlockHashByPageQueryParamOpts): Promise<GoldRushResponse<TransactionsBlockPageResponse>>;
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
118
|
-
*
|
|
119
|
-
* @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
|
|
120
|
-
* @param {string} blockHash - The requested block hash.
|
|
121
|
-
* @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
|
|
122
|
-
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
123
|
-
* - `noLogs`: Omit log events.
|
|
124
|
-
* - `withSafe`: Include safe details.
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<GoldRushResponse<TransactionsBlockResponse>>;
|
|
128
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const bigIntParser: (val: null | undefined | string | number | bigint) => bigint | null;
|