@covalenthq/client-sdk 1.0.0 → 1.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 +9 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BaseService.d.ts +17 -1
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/es/index.js +9 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BaseService.d.ts +17 -1
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/esm/index.js +9 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BaseService.d.ts +17 -1
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/util/types/BaseServiceTypes.d.ts +16 -0
- package/dist/services/BaseService.d.ts +17 -1
- package/dist/services/BaseService.js +8 -0
- 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/util/types/BaseServiceTypes.d.ts +16 -0
- package/package.json +1 -1
|
@@ -65,10 +65,26 @@ declare class BlockHeightsResponse {
|
|
|
65
65
|
constructor(data: BlockHeightsResponse);
|
|
66
66
|
}
|
|
67
67
|
declare class BlockHeights {
|
|
68
|
+
/** * The hash of the block. */
|
|
69
|
+
block_hash: string;
|
|
68
70
|
/** * The block signed timestamp in UTC. */
|
|
69
71
|
signed_at: Date;
|
|
70
72
|
/** * The block height. */
|
|
71
73
|
height: number;
|
|
74
|
+
/** * The parent block hash. */
|
|
75
|
+
block_parent_hash: string;
|
|
76
|
+
/** * Extra data written to the block. */
|
|
77
|
+
extra_data: string;
|
|
78
|
+
/** * The address of the miner. */
|
|
79
|
+
miner_address: string;
|
|
80
|
+
/** * The associated mining cost. */
|
|
81
|
+
mining_cost: number;
|
|
82
|
+
/** * The associated gas used. */
|
|
83
|
+
gas_used: number;
|
|
84
|
+
/** * The associated gas limit. */
|
|
85
|
+
gas_limit: number;
|
|
86
|
+
/** * The link to the related tx by block endpoint. */
|
|
87
|
+
transactions_link: string;
|
|
72
88
|
constructor(data: BlockHeights);
|
|
73
89
|
}
|
|
74
90
|
declare class Pagination {
|
|
@@ -431,7 +447,7 @@ export declare class BaseService {
|
|
|
431
447
|
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
432
448
|
*
|
|
433
449
|
*/
|
|
434
|
-
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<
|
|
450
|
+
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<BlockHeights>;
|
|
435
451
|
/**
|
|
436
452
|
*
|
|
437
453
|
* Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
@@ -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 | 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 | 167008 | 336 | 999999999 | 4200 | 686868 | 1992 | 660279;
|
|
11
11
|
export type Source = "Ponder" | "GoldRush" | "Viem";
|
|
12
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/1.0.
|
|
12
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/1.0.2";
|
|
13
13
|
export declare class Response<T> {
|
|
14
14
|
data: T;
|
|
15
15
|
error: boolean;
|
|
@@ -59,10 +59,26 @@ export interface BlockHeightsResponse {
|
|
|
59
59
|
pagination: Pagination;
|
|
60
60
|
}
|
|
61
61
|
export interface BlockHeights {
|
|
62
|
+
/** * The hash of the block. */
|
|
63
|
+
block_hash: string;
|
|
62
64
|
/** * The block signed timestamp in UTC. */
|
|
63
65
|
signed_at: Date;
|
|
64
66
|
/** * The block height. */
|
|
65
67
|
height: number;
|
|
68
|
+
/** * The parent block hash. */
|
|
69
|
+
block_parent_hash: string;
|
|
70
|
+
/** * Extra data written to the block. */
|
|
71
|
+
extra_data: string;
|
|
72
|
+
/** * The address of the miner. */
|
|
73
|
+
miner_address: string;
|
|
74
|
+
/** * The associated mining cost. */
|
|
75
|
+
mining_cost: number;
|
|
76
|
+
/** * The associated gas used. */
|
|
77
|
+
gas_used: number;
|
|
78
|
+
/** * The associated gas limit. */
|
|
79
|
+
gas_limit: number;
|
|
80
|
+
/** * The link to the related tx by block endpoint. */
|
|
81
|
+
transactions_link: string;
|
|
66
82
|
}
|
|
67
83
|
export interface GetLogsResponse {
|
|
68
84
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
package/dist/es/index.js
CHANGED
|
@@ -1522,8 +1522,16 @@ class BlockHeightsResponse {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
class BlockHeights {
|
|
1524
1524
|
constructor(data) {
|
|
1525
|
+
this.block_hash = data.block_hash;
|
|
1525
1526
|
this.signed_at = data.signed_at && data.signed_at !== null ? parseISO(data.signed_at.toString()) : null;
|
|
1526
1527
|
this.height = data.height;
|
|
1528
|
+
this.block_parent_hash = data.block_parent_hash;
|
|
1529
|
+
this.extra_data = data.extra_data;
|
|
1530
|
+
this.miner_address = data.miner_address;
|
|
1531
|
+
this.mining_cost = data.mining_cost;
|
|
1532
|
+
this.gas_used = data.gas_used;
|
|
1533
|
+
this.gas_limit = data.gas_limit;
|
|
1534
|
+
this.transactions_link = data.transactions_link;
|
|
1527
1535
|
}
|
|
1528
1536
|
}
|
|
1529
1537
|
let Pagination$2 = class Pagination {
|
|
@@ -7798,7 +7806,7 @@ class XykService {
|
|
|
7798
7806
|
}
|
|
7799
7807
|
}
|
|
7800
7808
|
|
|
7801
|
-
const userAgent = "com.covalenthq.sdk.typescript/1.0.
|
|
7809
|
+
const userAgent = "com.covalenthq.sdk.typescript/1.0.2";
|
|
7802
7810
|
class Response {
|
|
7803
7811
|
}
|
|
7804
7812
|
/**
|