@covalenthq/client-sdk 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/cjs/index.js +21 -80
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BaseService.d.ts +16 -0
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/NftService.d.ts +10 -1
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/es/index.js +21 -80
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BaseService.d.ts +16 -0
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/NftService.d.ts +10 -1
- package/dist/es/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/esm/index.js +21 -80
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BaseService.d.ts +16 -0
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/NftService.d.ts +10 -1
- package/dist/esm/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/services/BalanceService.js +1 -7
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +16 -0
- package/dist/services/BaseService.js +9 -11
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/NftService.d.ts +10 -1
- package/dist/services/NftService.js +11 -15
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.js +1 -2
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.js +1 -3
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.js +2 -19
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.js +1 -17
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.js +1 -2
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/types/BaseServiceTypes.d.ts +16 -0
- package/package.json +1 -1
|
@@ -12,10 +12,26 @@ declare class BlockResponse {
|
|
|
12
12
|
constructor(data: BlockResponse);
|
|
13
13
|
}
|
|
14
14
|
declare class Block {
|
|
15
|
+
/** * The hash of the block. */
|
|
16
|
+
block_hash: string;
|
|
15
17
|
/** * The block signed timestamp in UTC. */
|
|
16
18
|
signed_at: Date;
|
|
17
19
|
/** * The block height. */
|
|
18
20
|
height: number;
|
|
21
|
+
/** * The parent block hash. */
|
|
22
|
+
block_parent_hash: string;
|
|
23
|
+
/** * Extra data written to the block. */
|
|
24
|
+
extra_data: string;
|
|
25
|
+
/** * The address of the miner. */
|
|
26
|
+
miner_address: string;
|
|
27
|
+
/** * The associated mining cost. */
|
|
28
|
+
mining_cost: number;
|
|
29
|
+
/** * The associated gas used. */
|
|
30
|
+
gas_used: number;
|
|
31
|
+
/** * The associated gas limit. */
|
|
32
|
+
gas_limit: number;
|
|
33
|
+
/** * The link to the related tx by block endpoint. */
|
|
34
|
+
transactions_link: string;
|
|
19
35
|
constructor(data: Block);
|
|
20
36
|
}
|
|
21
37
|
declare class ResolvedAddress {
|
|
@@ -9,7 +9,7 @@ export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainn
|
|
|
9
9
|
export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
|
|
10
10
|
export type ChainID = 20090103 | 1 | 137 | 56 | 43114 | 10 | 250 | 1284 | 1285 | 30 | 42161 | 11297108109 | 8217 | 128 | 71402 | 2020 | 9001 | 592 | 4689 | 1666600000 | 25 | 1313161554 | 42262 | 288 | 5 | 80001 | 43113 | 97 | 1287 | 31 | 421613 | 4002 | 11297108099 | 256 | 71401 | 9000 | 336 | 4690 | 1666700000 | 1313161555 | 534354 | 534351 | 1131378225 | 53935 | 73772 | 43288 | 1294 | 56288 | 28 | 1297 | 9728 | 4328 | 1001 | 192837465 | 356256156 | 1564830818 | 278611351 | 432204 | 1026062157 | 432201 | 81 | 338 | 335 | 1088 | 588 | 2002 | 200202 | 2001 | 200101 | 73773 | 1399811149 | 2046399126 | 82 | 83 | 2139927552 | 2888 | 245022926 | 344106930 | 476158412 | 42170 | 7700 | 119 | 1029 | 14 | 114 | 19 | 16 | 321 | 322 | 1422 | 59140 | 84531 | 5001 | 534353 | 248 | 9372 | 2152 | 2154 | 416 | 23294 | 23295 | 420 | 1101 | 1662 | 1024 | 39797 | 49797 | 1663 | 11155111 | 1482601649 | 644937893 | 222000222 | 49321 | 1231 | 1230 | 7777777 | 999 | 245022934 | 2044 | 8453 | 5000 | 262018 | 59144 | 7332 | 10507 | 7979 | 1234 | 1228 | 8888 | 333000333 | 12008 | 12011 | 2038 | 1995 | 12010 | 51178 | 12009 | 12012 | 324 | 599 | 280 | 1343 | 11115 | 6765897100 | 1079 | 13337 | 16350 | 1990 | 20221 | 5611 | 12018 | 12013 | 12020 | 12015 | 12016 | 12014 | 12017 | 12019 | 431234 | 6119 | 73 | 7001 | 42888 | 919 | 5151706 | 923018 | 3441005 | 424 | 58008 | 100 | 10200 | 570 | 57000 | 167007 | 11155420 | 204 | 40 | 41 | 321123 | 360163 | 78431 | 2037 | 17772 | 152703 | 894538 | 179188 | 78432 | 7777 | 986532 | 78430 | 2195 | 11111 | 3012 | 4337 | 534352 | 17000 | 88 | 89 | 20765 | 84532 | 47279324479 | 421614 | 12027 | 12028 | 12029 | 31330 | 31331 | 31332 | 31333 | 31334 | 31335 | 412346 | 8545 | 42220;
|
|
11
11
|
export type Source = "Ponder" | "GoldRush" | "Viem";
|
|
12
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.9.
|
|
12
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/0.9.3";
|
|
13
13
|
export declare class Response<T> {
|
|
14
14
|
data: T;
|
|
15
15
|
error: boolean;
|
|
@@ -457,6 +457,12 @@ export interface GetNftTransactionsForContractTokenIdQueryParamOpts {
|
|
|
457
457
|
/** * If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
458
458
|
noSpam?: boolean;
|
|
459
459
|
}
|
|
460
|
+
export interface CheckOwnershipInNftQueryParamOpts {
|
|
461
|
+
/** * 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. */
|
|
462
|
+
traitsFilter?: string;
|
|
463
|
+
/** * 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. */
|
|
464
|
+
valuesFilter?: string;
|
|
465
|
+
}
|
|
460
466
|
export interface GetNftMarketSaleCountQueryParamOpts {
|
|
461
467
|
/** * The number of days to return data for. Request up 365 days. Defaults to 30 days. */
|
|
462
468
|
days?: number;
|
|
@@ -617,9 +623,12 @@ export declare class NftService {
|
|
|
617
623
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
618
624
|
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
619
625
|
* @param {string} collectionContract - The requested collection address.
|
|
626
|
+
* @param {CheckOwnershipInNftQueryParamOpts} queryParamOpts
|
|
627
|
+
* - `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.
|
|
628
|
+
* - `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.
|
|
620
629
|
*
|
|
621
630
|
*/
|
|
622
|
-
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
|
|
631
|
+
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string, queryParamOpts?: CheckOwnershipInNftQueryParamOpts): Promise<Response<NftOwnershipForCollectionResponse>>;
|
|
623
632
|
/**
|
|
624
633
|
*
|
|
625
634
|
* Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
|
|
@@ -10,10 +10,26 @@ export interface BlockResponse {
|
|
|
10
10
|
items: Block[];
|
|
11
11
|
}
|
|
12
12
|
export interface Block {
|
|
13
|
+
/** * The hash of the block. */
|
|
14
|
+
block_hash: string;
|
|
13
15
|
/** * The block signed timestamp in UTC. */
|
|
14
16
|
signed_at: Date;
|
|
15
17
|
/** * The block height. */
|
|
16
18
|
height: number;
|
|
19
|
+
/** * The parent block hash. */
|
|
20
|
+
block_parent_hash: string;
|
|
21
|
+
/** * Extra data written to the block. */
|
|
22
|
+
extra_data: string;
|
|
23
|
+
/** * The address of the miner. */
|
|
24
|
+
miner_address: string;
|
|
25
|
+
/** * The associated mining cost. */
|
|
26
|
+
mining_cost: number;
|
|
27
|
+
/** * The associated gas used. */
|
|
28
|
+
gas_used: number;
|
|
29
|
+
/** * The associated gas limit. */
|
|
30
|
+
gas_limit: number;
|
|
31
|
+
/** * The link to the related tx by block endpoint. */
|
|
32
|
+
transactions_link: string;
|
|
17
33
|
}
|
|
18
34
|
export interface ResolvedAddress {
|
|
19
35
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|