@covalenthq/client-sdk 1.0.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +223 -282
- package/dist/cjs/index.d.ts +17 -20
- package/dist/cjs/index.js +2331 -7659
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/GoldRushClient.d.ts +20 -0
- package/dist/cjs/src/services/BalanceService.d.ts +125 -0
- package/dist/cjs/src/services/BaseService.d.ts +161 -0
- package/dist/cjs/src/services/NftService.d.ts +157 -0
- package/dist/cjs/src/services/PricingService.d.ts +25 -0
- package/dist/cjs/src/services/SecurityService.d.ts +28 -0
- package/dist/cjs/src/services/TransactionService.d.ts +128 -0
- package/dist/cjs/src/utils/functions/bigIntParser.d.ts +1 -0
- package/dist/cjs/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
- package/dist/cjs/src/utils/functions/debugOutput.d.ts +2 -0
- package/dist/cjs/src/utils/functions/endpointGenerator.d.ts +4 -0
- package/dist/cjs/src/utils/functions/execution.d.ts +11 -0
- package/dist/cjs/src/utils/functions/isValidApiKey.d.ts +1 -0
- package/dist/cjs/src/utils/functions/paginateEndpoint.d.ts +7 -0
- package/dist/cjs/src/utils/functions/prettifyCurrency.d.ts +2 -0
- package/dist/{esm/util/types/BalanceServiceTypes.d.ts → cjs/src/utils/types/BalanceService.types.d.ts} +91 -27
- package/dist/{es/util/types/BaseServiceTypes.d.ts → cjs/src/utils/types/BaseService.types.d.ts} +68 -18
- package/dist/cjs/src/utils/types/Generic.types.d.ts +477 -0
- package/dist/{esm/util/types/NftServiceTypes.d.ts → cjs/src/utils/types/NftService.types.d.ts} +53 -83
- package/dist/cjs/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
- package/dist/{esm/util/types/SecurityServiceTypes.d.ts → cjs/src/utils/types/SecurityService.types.d.ts} +8 -7
- package/dist/{esm/util/types/TransactionServiceTypes.d.ts → cjs/src/utils/types/TransactionService.types.d.ts} +110 -24
- package/dist/es/index.d.ts +17 -20
- package/dist/es/index.js +2327 -7649
- package/dist/es/index.js.map +1 -1
- package/dist/es/src/GoldRushClient.d.ts +20 -0
- package/dist/es/src/services/BalanceService.d.ts +125 -0
- package/dist/es/src/services/BaseService.d.ts +161 -0
- package/dist/es/src/services/NftService.d.ts +157 -0
- package/dist/es/src/services/PricingService.d.ts +25 -0
- package/dist/es/src/services/SecurityService.d.ts +28 -0
- package/dist/es/src/services/TransactionService.d.ts +128 -0
- package/dist/es/src/utils/functions/bigIntParser.d.ts +1 -0
- package/dist/es/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
- package/dist/es/src/utils/functions/debugOutput.d.ts +2 -0
- package/dist/es/src/utils/functions/endpointGenerator.d.ts +4 -0
- package/dist/es/src/utils/functions/execution.d.ts +11 -0
- package/dist/es/src/utils/functions/isValidApiKey.d.ts +1 -0
- package/dist/es/src/utils/functions/paginateEndpoint.d.ts +7 -0
- package/dist/es/src/utils/functions/prettifyCurrency.d.ts +2 -0
- package/dist/{cjs/util/types/BalanceServiceTypes.d.ts → es/src/utils/types/BalanceService.types.d.ts} +91 -27
- package/dist/{esm/util/types/BaseServiceTypes.d.ts → es/src/utils/types/BaseService.types.d.ts} +68 -18
- package/dist/es/src/utils/types/Generic.types.d.ts +477 -0
- package/dist/{cjs/util/types/NftServiceTypes.d.ts → es/src/utils/types/NftService.types.d.ts} +53 -83
- package/dist/es/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
- package/dist/{util/types/SecurityServiceTypes.d.ts → es/src/utils/types/SecurityService.types.d.ts} +8 -7
- package/dist/{cjs/util/types/TransactionServiceTypes.d.ts → es/src/utils/types/TransactionService.types.d.ts} +110 -24
- package/dist/esm/index.d.ts +17 -20
- package/dist/esm/index.js +2327 -7649
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/GoldRushClient.d.ts +20 -0
- package/dist/esm/src/services/BalanceService.d.ts +125 -0
- package/dist/esm/src/services/BaseService.d.ts +161 -0
- package/dist/esm/src/services/NftService.d.ts +157 -0
- package/dist/esm/src/services/PricingService.d.ts +25 -0
- package/dist/esm/src/services/SecurityService.d.ts +28 -0
- package/dist/esm/src/services/TransactionService.d.ts +128 -0
- package/dist/esm/src/utils/functions/bigIntParser.d.ts +1 -0
- package/dist/esm/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
- package/dist/esm/src/utils/functions/debugOutput.d.ts +2 -0
- package/dist/esm/src/utils/functions/endpointGenerator.d.ts +4 -0
- package/dist/esm/src/utils/functions/execution.d.ts +11 -0
- package/dist/esm/src/utils/functions/isValidApiKey.d.ts +1 -0
- package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +7 -0
- package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +2 -0
- package/dist/{util/types/BalanceServiceTypes.d.ts → esm/src/utils/types/BalanceService.types.d.ts} +91 -27
- package/dist/{cjs/util/types/BaseServiceTypes.d.ts → esm/src/utils/types/BaseService.types.d.ts} +68 -18
- package/dist/esm/src/utils/types/Generic.types.d.ts +477 -0
- package/dist/{util/types/NftServiceTypes.d.ts → esm/src/utils/types/NftService.types.d.ts} +53 -83
- package/dist/esm/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
- package/dist/{es/util/types/SecurityServiceTypes.d.ts → esm/src/utils/types/SecurityService.types.d.ts} +8 -7
- package/dist/{util/types/TransactionServiceTypes.d.ts → esm/src/utils/types/TransactionService.types.d.ts} +110 -24
- package/package.json +25 -12
- package/dist/cjs/services/BalanceService.d.ts +0 -638
- package/dist/cjs/services/BaseService.d.ts +0 -571
- package/dist/cjs/services/CovalentClient.d.ts +0 -57
- package/dist/cjs/services/NftService.d.ts +0 -686
- package/dist/cjs/services/PricingService.d.ts +0 -103
- package/dist/cjs/services/SecurityService.d.ts +0 -162
- package/dist/cjs/services/TransactionService.d.ts +0 -711
- package/dist/cjs/services/XykService.d.ts +0 -1018
- package/dist/cjs/util/ApiHelpers.d.ts +0 -6
- package/dist/cjs/util/ApiKeyValidator.d.ts +0 -8
- package/dist/cjs/util/Chains.d.ts +0 -223
- package/dist/cjs/util/backoff.d.ts +0 -12
- package/dist/cjs/util/prettifyCurrency.d.ts +0 -2
- package/dist/cjs/util/types/GenericTypes.d.ts +0 -116
- package/dist/cjs/util/types/SecurityServiceTypes.d.ts +0 -121
- package/dist/cjs/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/es/services/BalanceService.d.ts +0 -638
- package/dist/es/services/BaseService.d.ts +0 -571
- package/dist/es/services/CovalentClient.d.ts +0 -57
- package/dist/es/services/NftService.d.ts +0 -686
- package/dist/es/services/PricingService.d.ts +0 -103
- package/dist/es/services/SecurityService.d.ts +0 -162
- package/dist/es/services/TransactionService.d.ts +0 -711
- package/dist/es/services/XykService.d.ts +0 -1018
- package/dist/es/util/ApiHelpers.d.ts +0 -6
- package/dist/es/util/ApiKeyValidator.d.ts +0 -8
- package/dist/es/util/Chains.d.ts +0 -223
- package/dist/es/util/backoff.d.ts +0 -12
- package/dist/es/util/prettifyCurrency.d.ts +0 -2
- package/dist/es/util/types/BalanceServiceTypes.d.ts +0 -378
- package/dist/es/util/types/GenericTypes.d.ts +0 -116
- package/dist/es/util/types/NftServiceTypes.d.ts +0 -303
- package/dist/es/util/types/TransactionServiceTypes.d.ts +0 -388
- package/dist/es/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/esm/services/BalanceService.d.ts +0 -638
- package/dist/esm/services/BaseService.d.ts +0 -571
- package/dist/esm/services/CovalentClient.d.ts +0 -57
- package/dist/esm/services/NftService.d.ts +0 -686
- package/dist/esm/services/PricingService.d.ts +0 -103
- package/dist/esm/services/SecurityService.d.ts +0 -162
- package/dist/esm/services/TransactionService.d.ts +0 -711
- package/dist/esm/services/XykService.d.ts +0 -1018
- package/dist/esm/util/ApiHelpers.d.ts +0 -6
- package/dist/esm/util/ApiKeyValidator.d.ts +0 -8
- package/dist/esm/util/Chains.d.ts +0 -223
- package/dist/esm/util/backoff.d.ts +0 -12
- package/dist/esm/util/prettifyCurrency.d.ts +0 -2
- package/dist/esm/util/types/GenericTypes.d.ts +0 -116
- package/dist/esm/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/services/BalanceService.d.ts +0 -638
- package/dist/services/BalanceService.js +0 -959
- package/dist/services/BalanceService.js.map +0 -1
- package/dist/services/BaseService.d.ts +0 -571
- package/dist/services/BaseService.js +0 -1202
- package/dist/services/BaseService.js.map +0 -1
- package/dist/services/CovalentClient.d.ts +0 -57
- package/dist/services/CovalentClient.js +0 -49
- package/dist/services/CovalentClient.js.map +0 -1
- package/dist/services/NftService.d.ts +0 -686
- package/dist/services/NftService.js +0 -1490
- package/dist/services/NftService.js.map +0 -1
- package/dist/services/PricingService.d.ts +0 -103
- package/dist/services/PricingService.js +0 -155
- package/dist/services/PricingService.js.map +0 -1
- package/dist/services/SecurityService.d.ts +0 -162
- package/dist/services/SecurityService.js +0 -249
- package/dist/services/SecurityService.js.map +0 -1
- package/dist/services/TransactionService.d.ts +0 -711
- package/dist/services/TransactionService.js +0 -1687
- package/dist/services/TransactionService.js.map +0 -1
- package/dist/services/XykService.d.ts +0 -1018
- package/dist/services/XykService.js +0 -1827
- package/dist/services/XykService.js.map +0 -1
- package/dist/util/ApiHelpers.d.ts +0 -6
- package/dist/util/ApiHelpers.js +0 -87
- package/dist/util/ApiHelpers.js.map +0 -1
- package/dist/util/ApiKeyValidator.d.ts +0 -8
- package/dist/util/ApiKeyValidator.js +0 -13
- package/dist/util/ApiKeyValidator.js.map +0 -1
- package/dist/util/CalculatePrettyBalance.d.ts +0 -1
- package/dist/util/CalculatePrettyBalance.js +0 -32
- package/dist/util/CalculatePrettyBalance.js.map +0 -1
- package/dist/util/Chains.d.ts +0 -223
- package/dist/util/Chains.js +0 -225
- package/dist/util/Chains.js.map +0 -1
- package/dist/util/backoff.d.ts +0 -12
- package/dist/util/backoff.js +0 -47
- package/dist/util/backoff.js.map +0 -1
- package/dist/util/prettifyCurrency.d.ts +0 -2
- package/dist/util/prettifyCurrency.js +0 -69
- package/dist/util/prettifyCurrency.js.map +0 -1
- package/dist/util/types/BalanceServiceTypes.js +0 -2
- package/dist/util/types/BalanceServiceTypes.js.map +0 -1
- package/dist/util/types/BaseServiceTypes.d.ts +0 -276
- package/dist/util/types/BaseServiceTypes.js +0 -2
- package/dist/util/types/BaseServiceTypes.js.map +0 -1
- package/dist/util/types/GenericTypes.d.ts +0 -116
- package/dist/util/types/GenericTypes.js +0 -2
- package/dist/util/types/GenericTypes.js.map +0 -1
- package/dist/util/types/NftServiceTypes.js +0 -2
- package/dist/util/types/NftServiceTypes.js.map +0 -1
- package/dist/util/types/PricingServiceTypes.d.ts +0 -33
- package/dist/util/types/PricingServiceTypes.js +0 -2
- package/dist/util/types/PricingServiceTypes.js.map +0 -1
- package/dist/util/types/SecurityServiceTypes.js +0 -2
- package/dist/util/types/SecurityServiceTypes.js.map +0 -1
- package/dist/util/types/TransactionServiceTypes.js +0 -2
- package/dist/util/types/TransactionServiceTypes.js.map +0 -1
- package/dist/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/util/types/XykServiceTypes.js +0 -2
- package/dist/util/types/XykServiceTypes.js.map +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Source } from "../services/CovalentClient";
|
|
2
|
-
export declare function checkAndModifyResponse(jsonObj: any): void;
|
|
3
|
-
export declare function debugOutput(url: string, responseStatus: number, startTime: Date | undefined): Promise<void>;
|
|
4
|
-
type Constructor<T> = new (...args: any[]) => T;
|
|
5
|
-
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
|
|
6
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare class ApiKeyValidator {
|
|
2
|
-
readonly _apiKey: string;
|
|
3
|
-
private static readonly _apiKeyV1Pattern;
|
|
4
|
-
private static readonly _apiKeyV2Pattern;
|
|
5
|
-
static readonly INVALID_API_KEY_MESSAGE = "Invalid or missing API key (sign up at covalenthq.com/platform)";
|
|
6
|
-
constructor(apiKey: string);
|
|
7
|
-
isValidApiKey(): boolean;
|
|
8
|
-
}
|
package/dist/es/util/Chains.d.ts
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
export declare enum Chains {
|
|
2
|
-
BTC_MAINNET = "btc-mainnet",
|
|
3
|
-
ETH_MAINNET = "eth-mainnet",
|
|
4
|
-
MATIC_MAINNET = "matic-mainnet",
|
|
5
|
-
BSC_MAINNET = "bsc-mainnet",
|
|
6
|
-
AVALANCHE_MAINNET = "avalanche-mainnet",
|
|
7
|
-
OPTIMISM_MAINNET = "optimism-mainnet",
|
|
8
|
-
FANTOM_MAINNET = "fantom-mainnet",
|
|
9
|
-
MOONBEAM_MAINNET = "moonbeam-mainnet",
|
|
10
|
-
MOONBEAM_MOONRIVER = "moonbeam-moonriver",
|
|
11
|
-
RSK_MAINNET = "rsk-mainnet",
|
|
12
|
-
ARBITRUM_MAINNET = "arbitrum-mainnet",
|
|
13
|
-
PALM_MAINNET = "palm-mainnet",
|
|
14
|
-
KLAYTN_MAINNET = "klaytn-mainnet",
|
|
15
|
-
HECO_MAINNET = "heco-mainnet",
|
|
16
|
-
NERVOS_GODWOKEN_MAINNET = "nervos-godwoken-mainnet",
|
|
17
|
-
AXIE_MAINNET = "axie-mainnet",
|
|
18
|
-
EVMOS_MAINNET = "evmos-mainnet",
|
|
19
|
-
ASTAR_MAINNET = "astar-mainnet",
|
|
20
|
-
IOTEX_MAINNET = "iotex-mainnet",
|
|
21
|
-
HARMONY_MAINNET = "harmony-mainnet",
|
|
22
|
-
CRONOS_MAINNET = "cronos-mainnet",
|
|
23
|
-
AURORA_MAINNET = "aurora-mainnet",
|
|
24
|
-
EMERALD_PARATIME_MAINNET = "emerald-paratime-mainnet",
|
|
25
|
-
BOBA_MAINNET = "boba-mainnet",
|
|
26
|
-
ETH_GOERLI = "eth-goerli",
|
|
27
|
-
MATIC_MUMBAI = "matic-mumbai",
|
|
28
|
-
AVALANCHE_TESTNET = "avalanche-testnet",
|
|
29
|
-
BSC_TESTNET = "bsc-testnet",
|
|
30
|
-
MOONBEAM_MOONBASE_ALPHA = "moonbeam-moonbase-alpha",
|
|
31
|
-
RSK_TESTNET = "rsk-testnet",
|
|
32
|
-
ARBITRUM_GOERLI = "arbitrum-goerli",
|
|
33
|
-
FANTOM_TESTNET = "fantom-testnet",
|
|
34
|
-
PALM_TESTNET = "palm-testnet",
|
|
35
|
-
HECO_TESTNET = "heco-testnet",
|
|
36
|
-
NERVOS_GODWOKEN_TESTNET = "nervos-godwoken-testnet",
|
|
37
|
-
EVMOS_TESTNET = "evmos-testnet",
|
|
38
|
-
IOTEX_TESTNET = "iotex-testnet",
|
|
39
|
-
HARMONY_TESTNET = "harmony-testnet",
|
|
40
|
-
AURORA_TESTNET = "aurora-testnet",
|
|
41
|
-
SCROLL_L2_TESTNET = "scroll-l2-testnet",
|
|
42
|
-
SCROLL_SEPOLIA_TESTNET = "scroll-sepolia-testnet",
|
|
43
|
-
COVALENT_INTERNAL_NETWORK_V1 = "covalent-internal-network-v1",
|
|
44
|
-
DEFI_KINGDOMS_MAINNET = "defi-kingdoms-mainnet",
|
|
45
|
-
SWIMMER_MAINNET = "swimmer-mainnet",
|
|
46
|
-
BOBA_AVALANCHE_MAINNET = "boba-avalanche-mainnet",
|
|
47
|
-
BOBA_BOBABEAM_MAINNET = "boba-bobabeam-mainnet",
|
|
48
|
-
BOBA_BNB_MAINNET = "boba-bnb-mainnet",
|
|
49
|
-
BOBA_RINKEBY_TESTNET = "boba-rinkeby-testnet",
|
|
50
|
-
BOBA_BOBABASE_TESTNET = "boba-bobabase-testnet",
|
|
51
|
-
BOBA_BNB_TESTNET = "boba-bnb-testnet",
|
|
52
|
-
BOBA_AVALANCHE_TESTNET = "boba-avalanche-testnet",
|
|
53
|
-
KLAYTN_TESTNET = "klaytn-testnet",
|
|
54
|
-
GATHER_MAINNET = "gather-mainnet",
|
|
55
|
-
GATHER_TESTNET = "gather-testnet",
|
|
56
|
-
SKALE_CALYPSO = "skale-calypso",
|
|
57
|
-
SKALE_MAINNET = "skale-mainnet",
|
|
58
|
-
SKALE_RAZOR = "skale-razor",
|
|
59
|
-
AVALANCHE_DEXALOT_MAINNET = "avalanche-dexalot-mainnet",
|
|
60
|
-
SKALE_OMNUS = "skale-omnus",
|
|
61
|
-
AVALANCHE_DEXALOT_TESTNET = "avalanche-dexalot-testnet",
|
|
62
|
-
ASTAR_SHIBUYA = "astar-shibuya",
|
|
63
|
-
CRONOS_TESTNET = "cronos-testnet",
|
|
64
|
-
DEFI_KINGDOMS_TESTNET = "defi-kingdoms-testnet",
|
|
65
|
-
METIS_MAINNET = "metis-mainnet",
|
|
66
|
-
METIS_STARDUST = "metis-stardust",
|
|
67
|
-
MILKOMEDA_A1_MAINNET = "milkomeda-a1-mainnet",
|
|
68
|
-
MILKOMEDA_A1_DEVNET = "milkomeda-a1-devnet",
|
|
69
|
-
MILKOMEDA_C1_MAINNET = "milkomeda-c1-mainnet",
|
|
70
|
-
MILKOMEDA_C1_DEVNET = "milkomeda-c1-devnet",
|
|
71
|
-
SWIMMER_TESTNET = "swimmer-testnet",
|
|
72
|
-
SOLANA_MAINNET = "solana-mainnet",
|
|
73
|
-
SKALE_EUROPA = "skale-europa",
|
|
74
|
-
METER_MAINNET = "meter-mainnet",
|
|
75
|
-
METER_TESTNET = "meter-testnet",
|
|
76
|
-
SKALE_EXORDE = "skale-exorde",
|
|
77
|
-
BOBA_GOERLI = "boba-goerli",
|
|
78
|
-
NEON_TESTNET = "neon-testnet",
|
|
79
|
-
SKALE_STAGING_UUM = "skale-staging-uum",
|
|
80
|
-
SKALE_STAGING_LCC = "skale-staging-lcc",
|
|
81
|
-
ARBITRUM_NOVA_MAINNET = "arbitrum-nova-mainnet",
|
|
82
|
-
CANTO_MAINNET = "canto-mainnet",
|
|
83
|
-
BITTORRENT_MAINNET = "bittorrent-mainnet",
|
|
84
|
-
BITTORRENT_TESTNET = "bittorrent-testnet",
|
|
85
|
-
FLARENETWORKS_FLARE_MAINNET = "flarenetworks-flare-mainnet",
|
|
86
|
-
FLARENETWORKS_FLARE_TESTNET = "flarenetworks-flare-testnet",
|
|
87
|
-
FLARENETWORKS_CANARY_MAINNET = "flarenetworks-canary-mainnet",
|
|
88
|
-
FLARENETWORKS_CANARY_TESTNET = "flarenetworks-canary-testnet",
|
|
89
|
-
KCC_MAINNET = "kcc-mainnet",
|
|
90
|
-
KCC_TESTNET = "kcc-testnet",
|
|
91
|
-
POLYGON_ZKEVM_TESTNET = "polygon-zkevm-testnet",
|
|
92
|
-
LINEA_TESTNET = "linea-testnet",
|
|
93
|
-
BASE_TESTNET = "base-testnet",
|
|
94
|
-
MANTLE_TESTNET = "mantle-testnet",
|
|
95
|
-
SCROLL_ALPHA_TESTNET = "scroll-alpha-testnet",
|
|
96
|
-
OASYS_MAINNET = "oasys-mainnet",
|
|
97
|
-
OASYS_TESTNET = "oasys-testnet",
|
|
98
|
-
FINDORA_MAINNET = "findora-mainnet",
|
|
99
|
-
FINDORA_FORGE_TESTNET = "findora-forge-testnet",
|
|
100
|
-
SX_MAINNET = "sx-mainnet",
|
|
101
|
-
OASIS_SAPPHIRE_MAINNET = "oasis-sapphire-mainnet",
|
|
102
|
-
OASIS_SAPPHIRE_TESTNET = "oasis-sapphire-testnet",
|
|
103
|
-
OPTIMISM_GOERLI = "optimism-goerli",
|
|
104
|
-
POLYGON_ZKEVM_MAINNET = "polygon-zkevm-mainnet",
|
|
105
|
-
HORIZEN_YUMA_TESTNET = "horizen-yuma-testnet",
|
|
106
|
-
CLV_PARACHAIN = "clv-parachain",
|
|
107
|
-
ENERGI_MAINNET = "energi-mainnet",
|
|
108
|
-
ENERGI_TESTNET = "energi-testnet",
|
|
109
|
-
HORIZEN_GOBI_TESTNET = "horizen-gobi-testnet",
|
|
110
|
-
ETH_SEPOLIA = "eth-sepolia",
|
|
111
|
-
SKALE_NEBULA = "skale-nebula",
|
|
112
|
-
SKALE_BATTLEGROUND = "skale-battleground",
|
|
113
|
-
AVALANCHE_MELD_TESTNET = "avalanche-meld-testnet",
|
|
114
|
-
GUNZILLA_TESTNET = "gunzilla-testnet",
|
|
115
|
-
ULTRON_MAINNET = "ultron-mainnet",
|
|
116
|
-
ULTRON_TESTNET = "ultron-testnet",
|
|
117
|
-
ZORA_MAINNET = "zora-mainnet",
|
|
118
|
-
ZORA_GOERLI_TESTNET = "zora-goerli-testnet",
|
|
119
|
-
NEON_MAINNET = "neon-mainnet",
|
|
120
|
-
AVALANCHE_SHRAPNEL_MAINNET = "avalanche-shrapnel-mainnet",
|
|
121
|
-
BASE_MAINNET = "base-mainnet",
|
|
122
|
-
MANTLE_MAINNET = "mantle-mainnet",
|
|
123
|
-
AVALANCHE_LOCO_LEGENDS_MAINNET = "avalanche-loco-legends-mainnet",
|
|
124
|
-
LINEA_MAINNET = "linea-mainnet",
|
|
125
|
-
HORIZEN_EON_MAINNET = "horizen-eon-mainnet",
|
|
126
|
-
AVALANCHE_NUMBERS = "avalanche-numbers",
|
|
127
|
-
AVALANCHE_DOS = "avalanche-dos",
|
|
128
|
-
AVALANCHE_STEP_NETWORK = "avalanche-step-network",
|
|
129
|
-
AVALANCHE_XPLUS = "avalanche-xplus",
|
|
130
|
-
AVALANCHE_XANACHAIN = "avalanche-xanachain",
|
|
131
|
-
AVALANCHE_MELD_MAINNET = "avalanche-meld-mainnet",
|
|
132
|
-
OPSIDE_PUBLIC_ZKEVM = "opside-public-zkevm",
|
|
133
|
-
OPSIDE_LAW_CHAIN = "opside-law-chain",
|
|
134
|
-
AVALANCHE_SHRAPNEL_TESTNET = "avalanche-shrapnel-testnet",
|
|
135
|
-
AVALANCHE_LOCO_LEGENDS_TESTNET = "avalanche-loco-legends-testnet",
|
|
136
|
-
OPSIDE_CB_ZKEVM = "opside-cb-zkevm",
|
|
137
|
-
OPSIDE_PRE_ALPHA_TESTNET = "opside-pre-alpha-testnet",
|
|
138
|
-
OPSIDE_ERA7 = "opside-era7",
|
|
139
|
-
OPSIDE_XTHRILL = "opside-xthrill",
|
|
140
|
-
ZKSYNC_MAINNET = "zksync-mainnet",
|
|
141
|
-
METIS_TESTNET = "metis-testnet",
|
|
142
|
-
ZKSYNC_TESTNET = "zksync-testnet",
|
|
143
|
-
AVALANCHE_BLITZ_TESTNET = "avalanche-blitz-testnet",
|
|
144
|
-
AVALANCHE_D_CHAIN_TESTNET = "avalanche-d-chain-testnet",
|
|
145
|
-
AVALANCHE_GREEN_DOT_TESTNET = "avalanche-green-dot-testnet",
|
|
146
|
-
AVALANCHE_MINTARA_TESTNET = "avalanche-mintara-testnet",
|
|
147
|
-
AVALANCHE_BEAM_TESTNET = "avalanche-beam-testnet",
|
|
148
|
-
BNB_META_APES_MAINNET = "bnb-meta-apes-mainnet",
|
|
149
|
-
BNB_ANTIMATTER_MAINNET = "bnb-antimatter-mainnet",
|
|
150
|
-
BNB_ANTIMATTER_TESTNET = "bnb-antimatter-testnet",
|
|
151
|
-
BNB_OPBNB_TESTNET = "bnb-opbnb-testnet",
|
|
152
|
-
OPSIDE_DEBOX = "opside-debox",
|
|
153
|
-
OPSIDE_JACKBOT = "opside-jackbot",
|
|
154
|
-
OPSIDE_ODX_ZKEVM_TESTNET = "opside-odx-zkevm-testnet",
|
|
155
|
-
OPSIDE_READON_CONTENT_TESTNET = "opside-readon-content-testnet",
|
|
156
|
-
OPSIDE_RELATION = "opside-relation",
|
|
157
|
-
OPSIDE_SOQUEST_ZKEVM = "opside-soquest-zkevm",
|
|
158
|
-
OPSIDE_VIP3 = "opside-vip3",
|
|
159
|
-
OPSIDE_ZKMETA = "opside-zkmeta",
|
|
160
|
-
AVALANCHE_PULSAR_TESTNET = "avalanche-pulsar-testnet",
|
|
161
|
-
AVALANCHE_UPTN = "avalanche-uptn",
|
|
162
|
-
BNB_FNCY_MAINNET = "bnb-fncy-mainnet",
|
|
163
|
-
ZETACHAIN_TESTNET = "zetachain-testnet",
|
|
164
|
-
KINTO_TESTNET = "kinto-testnet",
|
|
165
|
-
MODE_TESTNET = "mode-testnet",
|
|
166
|
-
LOOT_MAINNET = "loot-mainnet",
|
|
167
|
-
BNB_FNCY_TESTNET = "bnb-fncy-testnet",
|
|
168
|
-
MANTA_TESTNET = "manta-testnet",
|
|
169
|
-
PGN_MAINNET = "pgn-mainnet",
|
|
170
|
-
PGN_TESTNET = "pgn-testnet",
|
|
171
|
-
GNOSIS_MAINNET = "gnosis-mainnet",
|
|
172
|
-
GNOSIS_TESTNET = "gnosis-testnet",
|
|
173
|
-
ROLLUX_MAINNET = "rollux-mainnet",
|
|
174
|
-
ROLLUX_TESTNET = "rollux-testnet",
|
|
175
|
-
TAIKO_JOLNIR_TESTNET = "taiko-jolnir-testnet",
|
|
176
|
-
OPTIMISM_SEPOLIA = "optimism-sepolia",
|
|
177
|
-
BNB_OPBNB_MAINNET = "bnb-opbnb-mainnet",
|
|
178
|
-
TELOS_MAINNET = "telos-mainnet",
|
|
179
|
-
TELOS_TESTNET = "telos-testnet",
|
|
180
|
-
AVALANCHE_HUBBLE_EXCHANGE_TESTNET = "avalanche-hubble-exchange-testnet",
|
|
181
|
-
AVALANCHE_MIHO_TESTNET = "avalanche-miho-testnet",
|
|
182
|
-
AVALANCHE_BULLETIN_TESTNET = "avalanche-bulletin-testnet",
|
|
183
|
-
AVALANCHE_KIWI_TESTNET = "avalanche-kiwi-testnet",
|
|
184
|
-
AVALANCHE_HERO_TESTNET = "avalanche-hero-testnet",
|
|
185
|
-
AVALANCHE_AVACLOUD_TESTNET = "avalanche-avacloud-testnet",
|
|
186
|
-
AVALANCHE_THIRDWEB_TESTNET = "avalanche-thirdweb-testnet",
|
|
187
|
-
AVALANCHE_MONDRIAN_TESTNET = "avalanche-mondrian-testnet",
|
|
188
|
-
AVALANCHE_CONDUIT_TESTNET = "avalanche-conduit-testnet",
|
|
189
|
-
AVALANCHE_NMAC_TESTNET = "avalanche-nmac-testnet",
|
|
190
|
-
AVALANCHE_ORDERLY_TESTNET = "avalanche-orderly-testnet",
|
|
191
|
-
AVALANCHE_AMPLIFY_TESTNET = "avalanche-amplify-testnet",
|
|
192
|
-
AVALANCHE_MIRAI_TESTNET = "avalanche-mirai-testnet",
|
|
193
|
-
AVALANCHE_WAGMI_TESTNET = "avalanche-wagmi-testnet",
|
|
194
|
-
AVALANCHE_PLAYA3ULL_TESTNET = "avalanche-playa3ull-testnet",
|
|
195
|
-
AVALANCHE_BEAM_MAINNET = "avalanche-beam-mainnet",
|
|
196
|
-
SCROLL_MAINNET = "scroll-mainnet",
|
|
197
|
-
ETH_HOLESKY = "eth-holesky",
|
|
198
|
-
TOMOCHAIN_MAINNET = "tomochain-mainnet",
|
|
199
|
-
TOMOCHAIN_TESTNET = "tomochain-testnet",
|
|
200
|
-
AVALANCHE_JONO11_TESTNET = "avalanche-jono11-testnet",
|
|
201
|
-
BASE_SEPOLIA_TESTNET = "base-sepolia-testnet",
|
|
202
|
-
XAI_TESTNET = "xai-testnet",
|
|
203
|
-
ARBITRUM_SEPOLIA = "arbitrum-sepolia",
|
|
204
|
-
LUMOZ_PUBLIC_ZKSYNC_V2 = "lumoz-public-zksync-v2",
|
|
205
|
-
LUMOZ_DECIBLING = "lumoz-decibling",
|
|
206
|
-
LUMOZ_STARK_SPORT = "lumoz-stark-sport",
|
|
207
|
-
AVALANCHE_LT0_TESTNET = "avalanche-lt0-testnet",
|
|
208
|
-
AVALANCHE_LT1_TESTNET = "avalanche-lt1-testnet",
|
|
209
|
-
AVALANCHE_LT2_TESTNET = "avalanche-lt2-testnet",
|
|
210
|
-
AVALANCHE_LT3_TESTNET = "avalanche-lt3-testnet",
|
|
211
|
-
AVALANCHE_LT4_TESTNET = "avalanche-lt4-testnet",
|
|
212
|
-
AVALANCHE_LT5_TESTNET = "avalanche-lt5-testnet",
|
|
213
|
-
SYNDR_TESTNET = "syndr-testnet",
|
|
214
|
-
CROSSFI_EVM_TESTNET = "crossfi-evm-testnet",
|
|
215
|
-
CELO_MAINNET = "celo-mainnet",
|
|
216
|
-
TAIKO_KATLA_TESTNET = "taiko-katla-testnet",
|
|
217
|
-
MOVEMENT_MEVM_TESTNET = "movement-mevm-testnet",
|
|
218
|
-
ZORA_SEPOLIA_TESTNET = "zora-sepolia-testnet",
|
|
219
|
-
MERLIN_MAINNET = "merlin-mainnet",
|
|
220
|
-
MERLIN_TESTNET = "merlin-testnet",
|
|
221
|
-
AVALANCHE_HUBBLE_EXCHANGE_MAINNET = "avalanche-hubble-exchange-mainnet",
|
|
222
|
-
XAI_MAINNET = "xai-mainnet"
|
|
223
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Source } from "../services/CovalentClient";
|
|
2
|
-
export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;
|
|
3
|
-
export declare const BASE_DELAY_MS = 1000;
|
|
4
|
-
export declare class ExponentialBackoff<T> {
|
|
5
|
-
private maxRetries;
|
|
6
|
-
retryCount: number;
|
|
7
|
-
_apiKey: string;
|
|
8
|
-
_debug: boolean;
|
|
9
|
-
constructor(apiKey: string, debug: boolean, maxRetries?: number);
|
|
10
|
-
backOff(url: string, source: Source): Promise<T>;
|
|
11
|
-
setNumAttempts(retryCount: number): void;
|
|
12
|
-
}
|
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { Pagination, Explorer, ContractMetadata, LogoUrls, NftCollectionAttribute } from "./GenericTypes";
|
|
2
|
-
export interface BalancesResponse {
|
|
3
|
-
/** * The requested address. */
|
|
4
|
-
address: string;
|
|
5
|
-
/** * The requested chain ID eg: `1`. */
|
|
6
|
-
chain_id: number;
|
|
7
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
8
|
-
chain_name: string;
|
|
9
|
-
/** * The requested quote currency eg: `USD`. */
|
|
10
|
-
quote_currency: string;
|
|
11
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
12
|
-
updated_at: Date;
|
|
13
|
-
/** * List of response items. */
|
|
14
|
-
items: BalanceItem[];
|
|
15
|
-
}
|
|
16
|
-
export interface BalanceItem {
|
|
17
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
18
|
-
contract_decimals: number;
|
|
19
|
-
/** * The string returned by the `name()` method. */
|
|
20
|
-
contract_name: string;
|
|
21
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
22
|
-
contract_ticker_symbol: string;
|
|
23
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
24
|
-
contract_address: string;
|
|
25
|
-
/** * A display-friendly name for the contract. */
|
|
26
|
-
contract_display_name: string;
|
|
27
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
28
|
-
supports_erc: string[];
|
|
29
|
-
/** * The contract logo URL. */
|
|
30
|
-
logo_url: string;
|
|
31
|
-
/** * The contract logo URLs. */
|
|
32
|
-
logo_urls: LogoUrls;
|
|
33
|
-
/** * The timestamp when the token was transferred. */
|
|
34
|
-
last_transferred_at: Date;
|
|
35
|
-
/** * Indicates if a token is the chain's native gas token, eg: ETH on Ethereum. */
|
|
36
|
-
native_token: boolean;
|
|
37
|
-
/** * One of `cryptocurrency`, `stablecoin`, `nft` or `dust`. */
|
|
38
|
-
type: string;
|
|
39
|
-
/** * Denotes whether the token is suspected spam. */
|
|
40
|
-
is_spam: boolean;
|
|
41
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
42
|
-
balance: bigint | null;
|
|
43
|
-
/** * The 24h asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
44
|
-
balance_24h: bigint | null;
|
|
45
|
-
/** * The exchange rate for the requested quote currency. */
|
|
46
|
-
quote_rate: number;
|
|
47
|
-
/** * The 24h exchange rate for the requested quote currency. */
|
|
48
|
-
quote_rate_24h: number;
|
|
49
|
-
/** * The current balance converted to fiat in `quote-currency`. */
|
|
50
|
-
quote: number;
|
|
51
|
-
/** * The 24h balance converted to fiat in `quote-currency`. */
|
|
52
|
-
quote_24h: number;
|
|
53
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
54
|
-
pretty_quote: string;
|
|
55
|
-
/** * A prettier version of the 24h quote for rendering purposes. */
|
|
56
|
-
pretty_quote_24h: string;
|
|
57
|
-
/** * The protocol metadata. */
|
|
58
|
-
protocol_metadata: ProtocolMetadata;
|
|
59
|
-
/** * NFT-specific data. */
|
|
60
|
-
nft_data: BalanceNftData[];
|
|
61
|
-
}
|
|
62
|
-
export interface ProtocolMetadata {
|
|
63
|
-
/** * The name of the protocol. */
|
|
64
|
-
protocol_name: string;
|
|
65
|
-
}
|
|
66
|
-
export interface BalanceNftData {
|
|
67
|
-
/** * The token's id. */
|
|
68
|
-
token_id: bigint | null;
|
|
69
|
-
/** * The count of the number of NFTs with this ID. */
|
|
70
|
-
token_balance: bigint | null;
|
|
71
|
-
/** * External URL for additional metadata. */
|
|
72
|
-
token_url: string;
|
|
73
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
74
|
-
supports_erc: string[];
|
|
75
|
-
/** * The latest price value on chain of the token ID. */
|
|
76
|
-
token_price_wei: bigint | null;
|
|
77
|
-
/** * The latest quote_rate of the token ID denominated in unscaled ETH. */
|
|
78
|
-
token_quote_rate_eth: string;
|
|
79
|
-
/** * The address of the original owner of this NFT. */
|
|
80
|
-
original_owner: string;
|
|
81
|
-
external_data: NftExternalDataV1;
|
|
82
|
-
/** * The current owner of this NFT. */
|
|
83
|
-
owner: string;
|
|
84
|
-
/** * The address of the current owner of this NFT. */
|
|
85
|
-
owner_address: string;
|
|
86
|
-
/** * When set to true, this NFT has been Burned. */
|
|
87
|
-
burned: boolean;
|
|
88
|
-
}
|
|
89
|
-
export interface NftExternalDataV1 {
|
|
90
|
-
name: string;
|
|
91
|
-
description: string;
|
|
92
|
-
image: string;
|
|
93
|
-
image_256: string;
|
|
94
|
-
image_512: string;
|
|
95
|
-
image_1024: string;
|
|
96
|
-
animation_url: string;
|
|
97
|
-
external_url: string;
|
|
98
|
-
attributes: NftCollectionAttribute[];
|
|
99
|
-
owner: string;
|
|
100
|
-
}
|
|
101
|
-
export interface PortfolioResponse {
|
|
102
|
-
/** * The requested address. */
|
|
103
|
-
address: string;
|
|
104
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
105
|
-
updated_at: Date;
|
|
106
|
-
/** * The requested quote currency eg: `USD`. */
|
|
107
|
-
quote_currency: string;
|
|
108
|
-
/** * The requested chain ID eg: `1`. */
|
|
109
|
-
chain_id: number;
|
|
110
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
111
|
-
chain_name: string;
|
|
112
|
-
/** * List of response items. */
|
|
113
|
-
items: PortfolioItem[];
|
|
114
|
-
}
|
|
115
|
-
export interface PortfolioItem {
|
|
116
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
117
|
-
contract_address: string;
|
|
118
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
119
|
-
contract_decimals: number;
|
|
120
|
-
/** * The string returned by the `name()` method. */
|
|
121
|
-
contract_name: string;
|
|
122
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
123
|
-
contract_ticker_symbol: string;
|
|
124
|
-
/** * The contract logo URL. */
|
|
125
|
-
logo_url: string;
|
|
126
|
-
holdings: HoldingItem[];
|
|
127
|
-
}
|
|
128
|
-
export interface HoldingItem {
|
|
129
|
-
/** * The exchange rate for the requested quote currency. */
|
|
130
|
-
quote_rate: number;
|
|
131
|
-
timestamp: Date;
|
|
132
|
-
close: OhlcItem;
|
|
133
|
-
high: OhlcItem;
|
|
134
|
-
low: OhlcItem;
|
|
135
|
-
open: OhlcItem;
|
|
136
|
-
}
|
|
137
|
-
export interface OhlcItem {
|
|
138
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
139
|
-
balance: bigint | null;
|
|
140
|
-
/** * The current balance converted to fiat in `quote-currency`. */
|
|
141
|
-
quote: number;
|
|
142
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
143
|
-
pretty_quote: string;
|
|
144
|
-
}
|
|
145
|
-
export interface Erc20TransfersResponse {
|
|
146
|
-
/** * The requested address. */
|
|
147
|
-
address: string;
|
|
148
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
149
|
-
updated_at: Date;
|
|
150
|
-
/** * The requested quote currency eg: `USD`. */
|
|
151
|
-
quote_currency: string;
|
|
152
|
-
/** * The requested chain ID eg: `1`. */
|
|
153
|
-
chain_id: number;
|
|
154
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
155
|
-
chain_name: string;
|
|
156
|
-
/** * List of response items. */
|
|
157
|
-
items: BlockTransactionWithContractTransfers[];
|
|
158
|
-
/** * Pagination metadata. */
|
|
159
|
-
pagination: Pagination;
|
|
160
|
-
}
|
|
161
|
-
export interface BlockTransactionWithContractTransfers {
|
|
162
|
-
/** * The block signed timestamp in UTC. */
|
|
163
|
-
block_signed_at: Date;
|
|
164
|
-
/** * The height of the block. */
|
|
165
|
-
block_height: number;
|
|
166
|
-
/** * The hash of the block. Use it to remove transactions from re-org-ed blocks. */
|
|
167
|
-
block_hash: string;
|
|
168
|
-
/** * The requested transaction hash. */
|
|
169
|
-
tx_hash: string;
|
|
170
|
-
/** * The offset is the position of the tx in the block. */
|
|
171
|
-
tx_offset: number;
|
|
172
|
-
/** * Whether or not transaction is successful. */
|
|
173
|
-
successful: boolean;
|
|
174
|
-
/** * The address of the miner. */
|
|
175
|
-
miner_address: string;
|
|
176
|
-
/** * The sender's wallet address. */
|
|
177
|
-
from_address: string;
|
|
178
|
-
/** * The label of `from` address. */
|
|
179
|
-
from_address_label: string;
|
|
180
|
-
/** * The receiver's wallet address. */
|
|
181
|
-
to_address: string;
|
|
182
|
-
/** * The label of `to` address. */
|
|
183
|
-
to_address_label: string;
|
|
184
|
-
/** * The value attached to this tx. */
|
|
185
|
-
value: bigint | null;
|
|
186
|
-
/** * The value attached in `quote-currency` to this tx. */
|
|
187
|
-
value_quote: number;
|
|
188
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
189
|
-
pretty_value_quote: string;
|
|
190
|
-
/** * The requested chain native gas token metadata. */
|
|
191
|
-
gas_metadata: ContractMetadata;
|
|
192
|
-
gas_offered: number;
|
|
193
|
-
/** * The gas spent for this tx. */
|
|
194
|
-
gas_spent: number;
|
|
195
|
-
/** * The gas price at the time of this tx. */
|
|
196
|
-
gas_price: number;
|
|
197
|
-
/** * The transaction's gas_price * gas_spent, denoted in wei. */
|
|
198
|
-
fees_paid: bigint | null;
|
|
199
|
-
/** * The gas spent in `quote-currency` denomination. */
|
|
200
|
-
gas_quote: number;
|
|
201
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
202
|
-
pretty_gas_quote: string;
|
|
203
|
-
/** * The native gas exchange rate for the requested `quote-currency`. */
|
|
204
|
-
gas_quote_rate: number;
|
|
205
|
-
transfers: TokenTransferItem[];
|
|
206
|
-
}
|
|
207
|
-
export interface TokenTransferItem {
|
|
208
|
-
/** * The block signed timestamp in UTC. */
|
|
209
|
-
block_signed_at: Date;
|
|
210
|
-
/** * The requested transaction hash. */
|
|
211
|
-
tx_hash: string;
|
|
212
|
-
/** * The sender's wallet address. */
|
|
213
|
-
from_address: string;
|
|
214
|
-
/** * The label of `from` address. */
|
|
215
|
-
from_address_label: string;
|
|
216
|
-
/** * The receiver's wallet address. */
|
|
217
|
-
to_address: string;
|
|
218
|
-
/** * The label of `to` address. */
|
|
219
|
-
to_address_label: string;
|
|
220
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
221
|
-
contract_decimals: number;
|
|
222
|
-
/** * The string returned by the `name()` method. */
|
|
223
|
-
contract_name: string;
|
|
224
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
225
|
-
contract_ticker_symbol: string;
|
|
226
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
227
|
-
contract_address: string;
|
|
228
|
-
/** * The contract logo URL. */
|
|
229
|
-
logo_url: string;
|
|
230
|
-
/** * Categorizes token transactions as either `transfer-in` or `transfer-out`, indicating whether tokens are being received or sent from an account. */
|
|
231
|
-
transfer_type: string;
|
|
232
|
-
/** * The delta attached to this transfer. */
|
|
233
|
-
delta: bigint | null;
|
|
234
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
235
|
-
balance: bigint | null;
|
|
236
|
-
/** * The exchange rate for the requested quote currency. */
|
|
237
|
-
quote_rate: number;
|
|
238
|
-
/** * The current delta converted to fiat in `quote-currency`. */
|
|
239
|
-
delta_quote: number;
|
|
240
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
241
|
-
pretty_delta_quote: string;
|
|
242
|
-
/** * The current balance converted to fiat in `quote-currency`. */
|
|
243
|
-
balance_quote: number;
|
|
244
|
-
/** * Additional details on which transfer events were invoked. Defaults to `true`. */
|
|
245
|
-
method_calls: MethodCallsForTransfers[];
|
|
246
|
-
/** * The explorer links for this transaction. */
|
|
247
|
-
explorers: Explorer[];
|
|
248
|
-
}
|
|
249
|
-
export interface MethodCallsForTransfers {
|
|
250
|
-
/** * The address of the sender. */
|
|
251
|
-
sender_address: string;
|
|
252
|
-
method: string;
|
|
253
|
-
}
|
|
254
|
-
export interface TokenHoldersResponse {
|
|
255
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
256
|
-
updated_at: Date;
|
|
257
|
-
/** * The requested chain ID eg: `1`. */
|
|
258
|
-
chain_id: number;
|
|
259
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
260
|
-
chain_name: string;
|
|
261
|
-
/** * List of response items. */
|
|
262
|
-
items: TokenHolder[];
|
|
263
|
-
/** * Pagination metadata. */
|
|
264
|
-
pagination: Pagination;
|
|
265
|
-
}
|
|
266
|
-
export interface TokenHolder {
|
|
267
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
268
|
-
contract_decimals: number;
|
|
269
|
-
/** * The string returned by the `name()` method. */
|
|
270
|
-
contract_name: string;
|
|
271
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
272
|
-
contract_ticker_symbol: string;
|
|
273
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
274
|
-
contract_address: string;
|
|
275
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
276
|
-
supports_erc: string[];
|
|
277
|
-
/** * The contract logo URL. */
|
|
278
|
-
logo_url: string;
|
|
279
|
-
/** * The requested address. */
|
|
280
|
-
address: string;
|
|
281
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
282
|
-
balance: bigint | null;
|
|
283
|
-
/** * Total supply of this token. */
|
|
284
|
-
total_supply: bigint | null;
|
|
285
|
-
/** * The height of the block. */
|
|
286
|
-
block_height: number;
|
|
287
|
-
}
|
|
288
|
-
export interface HistoricalBalancesResponse {
|
|
289
|
-
/** * The requested address. */
|
|
290
|
-
address: string;
|
|
291
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
292
|
-
updated_at: Date;
|
|
293
|
-
/** * The requested quote currency eg: `USD`. */
|
|
294
|
-
quote_currency: string;
|
|
295
|
-
/** * The requested chain ID eg: `1`. */
|
|
296
|
-
chain_id: number;
|
|
297
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
298
|
-
chain_name: string;
|
|
299
|
-
/** * List of response items. */
|
|
300
|
-
items: HistoricalBalanceItem[];
|
|
301
|
-
}
|
|
302
|
-
export interface HistoricalBalanceItem {
|
|
303
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
304
|
-
contract_decimals: number;
|
|
305
|
-
/** * The string returned by the `name()` method. */
|
|
306
|
-
contract_name: string;
|
|
307
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
308
|
-
contract_ticker_symbol: string;
|
|
309
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
310
|
-
contract_address: string;
|
|
311
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
312
|
-
supports_erc: string[];
|
|
313
|
-
/** * The contract logo URL. */
|
|
314
|
-
logo_url: string;
|
|
315
|
-
/** * The height of the block. */
|
|
316
|
-
block_height: number;
|
|
317
|
-
/** * The block height when the token was last transferred. */
|
|
318
|
-
last_transferred_block_height: number;
|
|
319
|
-
contract_display_name: string;
|
|
320
|
-
/** * The timestamp when the token was transferred. */
|
|
321
|
-
last_transferred_at: Date;
|
|
322
|
-
/** * Indicates if a token is the chain's native gas token, eg: ETH on Ethereum. */
|
|
323
|
-
native_token: boolean;
|
|
324
|
-
/** * One of `cryptocurrency`, `stablecoin`, `nft` or `dust`. */
|
|
325
|
-
type: string;
|
|
326
|
-
/** * Denotes whether the token is suspected spam. */
|
|
327
|
-
is_spam: boolean;
|
|
328
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
329
|
-
balance: bigint | null;
|
|
330
|
-
/** * The exchange rate for the requested quote currency. */
|
|
331
|
-
quote_rate: number;
|
|
332
|
-
/** * The current balance converted to fiat in `quote-currency`. */
|
|
333
|
-
quote: number;
|
|
334
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
335
|
-
pretty_quote: string;
|
|
336
|
-
/** * The protocol metadata. */
|
|
337
|
-
protocol_metadata: ProtocolMetadata;
|
|
338
|
-
/** * NFT-specific data. */
|
|
339
|
-
nft_data: BalanceNftData[];
|
|
340
|
-
}
|
|
341
|
-
export interface TokenBalanceNativeResponse {
|
|
342
|
-
/** * The requested address. */
|
|
343
|
-
address: string;
|
|
344
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
345
|
-
updated_at: Date;
|
|
346
|
-
/** * The requested quote currency eg: `USD`. */
|
|
347
|
-
quote_currency: string;
|
|
348
|
-
/** * The requested chain ID eg: `1`. */
|
|
349
|
-
chain_id: number;
|
|
350
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
351
|
-
chain_name: string;
|
|
352
|
-
/** * List of response items. */
|
|
353
|
-
items: NativeBalanceItem[];
|
|
354
|
-
}
|
|
355
|
-
export interface NativeBalanceItem {
|
|
356
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
357
|
-
contract_decimals: number;
|
|
358
|
-
/** * The string returned by the `name()` method. */
|
|
359
|
-
contract_name: string;
|
|
360
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
361
|
-
contract_ticker_symbol: string;
|
|
362
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
363
|
-
contract_address: string;
|
|
364
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
365
|
-
supports_erc: string[];
|
|
366
|
-
/** * The contract logo URL. */
|
|
367
|
-
logo_url: string;
|
|
368
|
-
/** * The height of the block. */
|
|
369
|
-
block_height: number;
|
|
370
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
371
|
-
balance: bigint | null;
|
|
372
|
-
/** * The exchange rate for the requested quote currency. */
|
|
373
|
-
quote_rate: number;
|
|
374
|
-
/** * The current balance converted to fiat in `quote-currency`. */
|
|
375
|
-
quote: number;
|
|
376
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
377
|
-
pretty_quote: string;
|
|
378
|
-
}
|