@covalenthq/client-sdk 0.9.3 → 0.9.4
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 +72 -51
- package/dist/cjs/index.js +15 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +1 -1
- package/dist/cjs/services/BaseService.d.ts +4 -0
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/PricingService.d.ts +11 -0
- package/dist/cjs/services/TransactionService.d.ts +2 -0
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +2 -10
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +2 -0
- package/dist/cjs/util/types/GenericTypes.d.ts +10 -0
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +3 -1
- package/dist/es/index.js +15 -4
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +1 -1
- package/dist/es/services/BaseService.d.ts +4 -0
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/PricingService.d.ts +11 -0
- package/dist/es/services/TransactionService.d.ts +2 -0
- package/dist/es/util/types/BalanceServiceTypes.d.ts +2 -10
- package/dist/es/util/types/BaseServiceTypes.d.ts +2 -0
- package/dist/es/util/types/GenericTypes.d.ts +10 -0
- package/dist/es/util/types/PricingServiceTypes.d.ts +3 -1
- package/dist/esm/index.js +15 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +1 -1
- package/dist/esm/services/BaseService.d.ts +4 -0
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/PricingService.d.ts +11 -0
- package/dist/esm/services/TransactionService.d.ts +2 -0
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +2 -10
- package/dist/esm/util/types/BaseServiceTypes.d.ts +2 -0
- package/dist/esm/util/types/GenericTypes.d.ts +10 -0
- package/dist/esm/util/types/PricingServiceTypes.d.ts +3 -1
- package/dist/services/BalanceService.d.ts +1 -1
- package/dist/services/BaseService.d.ts +4 -0
- package/dist/services/BaseService.js +2 -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/services/PricingService.d.ts +11 -0
- package/dist/services/PricingService.js +8 -0
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +2 -0
- package/dist/services/TransactionService.js +1 -0
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +2 -10
- package/dist/util/types/BaseServiceTypes.d.ts +2 -0
- package/dist/util/types/GenericTypes.d.ts +10 -0
- package/dist/util/types/PricingServiceTypes.d.ts +3 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ declare class BalanceItem {
|
|
|
30
30
|
supports_erc: string;
|
|
31
31
|
/** * The contract logo URL. */
|
|
32
32
|
logo_url: string;
|
|
33
|
-
/** * The
|
|
33
|
+
/** * The contract logo URLs. */
|
|
34
34
|
logo_urls: LogoUrls;
|
|
35
35
|
/** * The timestamp when the token was transferred. */
|
|
36
36
|
last_transferred_at: Date;
|
|
@@ -113,6 +113,8 @@ declare class GetLogsEvent {
|
|
|
113
113
|
sender_address_label: string;
|
|
114
114
|
/** * The contract logo URL. */
|
|
115
115
|
sender_logo_url: string;
|
|
116
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
117
|
+
sender_factory_address: string;
|
|
116
118
|
/** * The log events in raw. */
|
|
117
119
|
raw_log_data: string;
|
|
118
120
|
/** * The decoded item. */
|
|
@@ -170,6 +172,8 @@ declare class LogEvent {
|
|
|
170
172
|
sender_address_label: string;
|
|
171
173
|
/** * The contract logo URL. */
|
|
172
174
|
sender_logo_url: string;
|
|
175
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
176
|
+
sender_factory_address: string;
|
|
173
177
|
/** * The log events in raw. */
|
|
174
178
|
raw_log_data: string;
|
|
175
179
|
/** * The decoded item. */
|
|
@@ -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.4";
|
|
13
13
|
export declare class Response<T> {
|
|
14
14
|
data: T;
|
|
15
15
|
error: boolean;
|
|
@@ -16,12 +16,23 @@ declare class TokenPricesResponse {
|
|
|
16
16
|
update_at: Date;
|
|
17
17
|
/** * The requested quote currency eg: `USD`. */
|
|
18
18
|
quote_currency: string;
|
|
19
|
+
/** * The contract logo URLs. */
|
|
20
|
+
logo_urls: LogoUrls;
|
|
19
21
|
/** * List of response items. */
|
|
20
22
|
prices: Price[];
|
|
21
23
|
/** * List of response items. */
|
|
22
24
|
items: Price[];
|
|
23
25
|
constructor(data: TokenPricesResponse);
|
|
24
26
|
}
|
|
27
|
+
declare class LogoUrls {
|
|
28
|
+
/** * The token logo URL. */
|
|
29
|
+
token_logo_url: string;
|
|
30
|
+
/** * The protocol logo URL. */
|
|
31
|
+
protocol_logo_url: string;
|
|
32
|
+
/** * The chain logo URL. */
|
|
33
|
+
chain_logo_url: string;
|
|
34
|
+
constructor(data: LogoUrls);
|
|
35
|
+
}
|
|
25
36
|
declare class Price {
|
|
26
37
|
contract_metadata: ContractMetadata;
|
|
27
38
|
/** * The date of the price capture. */
|
|
@@ -305,6 +305,8 @@ declare class LogEvent {
|
|
|
305
305
|
sender_address_label: string;
|
|
306
306
|
/** * The contract logo URL. */
|
|
307
307
|
sender_logo_url: string;
|
|
308
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
309
|
+
sender_factory_address: string;
|
|
308
310
|
/** * The log events in raw. */
|
|
309
311
|
raw_log_data: string;
|
|
310
312
|
/** * The decoded item. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NftData, Pagination, Explorer, ContractMetadata } from "./GenericTypes";
|
|
1
|
+
import { NftData, Pagination, Explorer, ContractMetadata, LogoUrls } from "./GenericTypes";
|
|
2
2
|
export interface BalancesResponse {
|
|
3
3
|
/** * The requested address. */
|
|
4
4
|
address: string;
|
|
@@ -28,7 +28,7 @@ export interface BalanceItem {
|
|
|
28
28
|
supports_erc: string;
|
|
29
29
|
/** * The contract logo URL. */
|
|
30
30
|
logo_url: string;
|
|
31
|
-
/** * The
|
|
31
|
+
/** * The contract logo URLs. */
|
|
32
32
|
logo_urls: LogoUrls;
|
|
33
33
|
/** * The timestamp when the token was transferred. */
|
|
34
34
|
last_transferred_at: Date;
|
|
@@ -59,14 +59,6 @@ export interface BalanceItem {
|
|
|
59
59
|
/** * NFT-specific data. */
|
|
60
60
|
nft_data: NftData[];
|
|
61
61
|
}
|
|
62
|
-
export interface LogoUrls {
|
|
63
|
-
/** * The token logo URL. */
|
|
64
|
-
token_logo_url: string;
|
|
65
|
-
/** * The protocol logo URL. */
|
|
66
|
-
protocol_logo_url: string;
|
|
67
|
-
/** * The chain logo URL. */
|
|
68
|
-
chain_logo_url: string;
|
|
69
|
-
}
|
|
70
62
|
export interface ProtocolMetadata {
|
|
71
63
|
/** * The name of the protocol. */
|
|
72
64
|
protocol_name: string;
|
|
@@ -95,6 +95,8 @@ export interface GetLogsEvent {
|
|
|
95
95
|
sender_address_label: string;
|
|
96
96
|
/** * The contract logo URL. */
|
|
97
97
|
sender_logo_url: string;
|
|
98
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
99
|
+
sender_factory_address: string;
|
|
98
100
|
/** * The log events in raw. */
|
|
99
101
|
raw_log_data: string;
|
|
100
102
|
/** * The decoded item. */
|
|
@@ -75,6 +75,8 @@ export interface LogEvent {
|
|
|
75
75
|
sender_address_label: string;
|
|
76
76
|
/** * The contract logo URL. */
|
|
77
77
|
sender_logo_url: string;
|
|
78
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
79
|
+
sender_factory_address: string;
|
|
78
80
|
/** * The log events in raw. */
|
|
79
81
|
raw_log_data: string;
|
|
80
82
|
/** * The decoded item. */
|
|
@@ -100,3 +102,11 @@ export interface Explorer {
|
|
|
100
102
|
/** * The URL of the explorer. */
|
|
101
103
|
url: string;
|
|
102
104
|
}
|
|
105
|
+
export interface LogoUrls {
|
|
106
|
+
/** * The token logo URL. */
|
|
107
|
+
token_logo_url: string;
|
|
108
|
+
/** * The protocol logo URL. */
|
|
109
|
+
protocol_logo_url: string;
|
|
110
|
+
/** * The chain logo URL. */
|
|
111
|
+
chain_logo_url: string;
|
|
112
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractMetadata } from "./GenericTypes";
|
|
1
|
+
import { ContractMetadata, LogoUrls } from "./GenericTypes";
|
|
2
2
|
export interface TokenPricesResponse {
|
|
3
3
|
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
4
4
|
contract_decimals: number;
|
|
@@ -15,6 +15,8 @@ export interface TokenPricesResponse {
|
|
|
15
15
|
update_at: Date;
|
|
16
16
|
/** * The requested quote currency eg: `USD`. */
|
|
17
17
|
quote_currency: string;
|
|
18
|
+
/** * The contract logo URLs. */
|
|
19
|
+
logo_urls: LogoUrls;
|
|
18
20
|
/** * List of response items. */
|
|
19
21
|
prices: Price[];
|
|
20
22
|
/** * List of response items. */
|
package/dist/es/index.js
CHANGED
|
@@ -553,18 +553,18 @@ class BalanceItem {
|
|
|
553
553
|
this.quote_24h = data.quote_24h;
|
|
554
554
|
this.pretty_quote = data.pretty_quote;
|
|
555
555
|
this.pretty_quote_24h = data.pretty_quote_24h;
|
|
556
|
-
this.logo_urls = data.logo_urls && data.logo_urls !== null ? new LogoUrls(data.logo_urls) : null;
|
|
556
|
+
this.logo_urls = data.logo_urls && data.logo_urls !== null ? new LogoUrls$1(data.logo_urls) : null;
|
|
557
557
|
this.protocol_metadata = data.protocol_metadata && data.protocol_metadata !== null ? new ProtocolMetadata(data.protocol_metadata) : null;
|
|
558
558
|
this.nft_data = data.nft_data && data.nft_data !== null ? data.nft_data.map((itemData) => new NftData$1(itemData)) : null;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
class LogoUrls {
|
|
561
|
+
let LogoUrls$1 = class LogoUrls {
|
|
562
562
|
constructor(data) {
|
|
563
563
|
this.token_logo_url = data.token_logo_url;
|
|
564
564
|
this.protocol_logo_url = data.protocol_logo_url;
|
|
565
565
|
this.chain_logo_url = data.chain_logo_url;
|
|
566
566
|
}
|
|
567
|
-
}
|
|
567
|
+
};
|
|
568
568
|
class ProtocolMetadata {
|
|
569
569
|
constructor(data) {
|
|
570
570
|
this.protocol_name = data.protocol_name;
|
|
@@ -1547,6 +1547,7 @@ class GetLogsEvent {
|
|
|
1547
1547
|
this.sender_address = data.sender_address;
|
|
1548
1548
|
this.sender_address_label = data.sender_address_label;
|
|
1549
1549
|
this.sender_logo_url = data.sender_logo_url;
|
|
1550
|
+
this.sender_factory_address = data.sender_factory_address;
|
|
1550
1551
|
this.raw_log_data = data.raw_log_data;
|
|
1551
1552
|
this.decoded = data.decoded && data.decoded !== null ? new DecodedItem$2(data.decoded) : null;
|
|
1552
1553
|
}
|
|
@@ -1590,6 +1591,7 @@ let LogEvent$2 = class LogEvent {
|
|
|
1590
1591
|
this.sender_address = data.sender_address;
|
|
1591
1592
|
this.sender_address_label = data.sender_address_label;
|
|
1592
1593
|
this.sender_logo_url = data.sender_logo_url;
|
|
1594
|
+
this.sender_factory_address = data.sender_factory_address;
|
|
1593
1595
|
this.raw_log_data = data.raw_log_data;
|
|
1594
1596
|
this.decoded = data.decoded && data.decoded !== null ? new DecodedItem$2(data.decoded) : null;
|
|
1595
1597
|
}
|
|
@@ -4140,10 +4142,18 @@ class TokenPricesResponse {
|
|
|
4140
4142
|
this.logo_url = data.logo_url;
|
|
4141
4143
|
this.update_at = data.update_at && data.update_at !== null ? parseISO(data.update_at.toString()) : null;
|
|
4142
4144
|
this.quote_currency = data.quote_currency;
|
|
4145
|
+
this.logo_urls = data.logo_urls && data.logo_urls !== null ? new LogoUrls(data.logo_urls) : null;
|
|
4143
4146
|
this.prices = data.prices && data.prices !== null ? data.prices.map((itemData) => new Price(itemData)) : null;
|
|
4144
4147
|
this.items = data.items && data.items !== null ? data.items.map((itemData) => new Price(itemData)) : null;
|
|
4145
4148
|
}
|
|
4146
4149
|
}
|
|
4150
|
+
class LogoUrls {
|
|
4151
|
+
constructor(data) {
|
|
4152
|
+
this.token_logo_url = data.token_logo_url;
|
|
4153
|
+
this.protocol_logo_url = data.protocol_logo_url;
|
|
4154
|
+
this.chain_logo_url = data.chain_logo_url;
|
|
4155
|
+
}
|
|
4156
|
+
}
|
|
4147
4157
|
class Price {
|
|
4148
4158
|
constructor(data) {
|
|
4149
4159
|
this.date = data.date && data.date !== null ? parseISO(data.date.toString()) : null;
|
|
@@ -4457,6 +4467,7 @@ class LogEvent {
|
|
|
4457
4467
|
this.sender_address = data.sender_address;
|
|
4458
4468
|
this.sender_address_label = data.sender_address_label;
|
|
4459
4469
|
this.sender_logo_url = data.sender_logo_url;
|
|
4470
|
+
this.sender_factory_address = data.sender_factory_address;
|
|
4460
4471
|
this.raw_log_data = data.raw_log_data;
|
|
4461
4472
|
this.decoded = data.decoded && data.decoded !== null ? new DecodedItem(data.decoded) : null;
|
|
4462
4473
|
}
|
|
@@ -7771,7 +7782,7 @@ class XykService {
|
|
|
7771
7782
|
}
|
|
7772
7783
|
}
|
|
7773
7784
|
|
|
7774
|
-
const userAgent = "com.covalenthq.sdk.typescript/0.9.
|
|
7785
|
+
const userAgent = "com.covalenthq.sdk.typescript/0.9.4";
|
|
7775
7786
|
class Response {
|
|
7776
7787
|
}
|
|
7777
7788
|
/**
|