@covalenthq/client-sdk 0.8.5 → 0.8.6
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.d.ts +9 -1
- package/dist/cjs/index.js +158 -128
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +21 -0
- package/dist/cjs/services/BaseService.d.ts +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/TransactionService.d.ts +1 -1
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +7 -1
- package/dist/es/index.d.ts +9 -1
- package/dist/es/index.js +150 -129
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +21 -0
- package/dist/es/services/BaseService.d.ts +1 -1
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/TransactionService.d.ts +1 -1
- package/dist/es/util/types/BalanceServiceTypes.d.ts +7 -1
- package/dist/esm/index.d.ts +9 -1
- package/dist/esm/index.js +150 -129
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +21 -0
- package/dist/esm/services/BaseService.d.ts +1 -1
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/TransactionService.d.ts +1 -1
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +7 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/services/BalanceService.d.ts +21 -0
- package/dist/services/BalanceService.js +25 -12
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +1 -1
- package/dist/services/BaseService.js +20 -20
- 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.js +26 -26
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.js +1 -1
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.js +4 -4
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +1 -1
- package/dist/services/TransactionService.js +33 -33
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.js +30 -30
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.js +1 -1
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +7 -1
- package/package.json +1 -1
|
@@ -180,12 +180,16 @@ declare class BlockTransactionWithContractTransfers {
|
|
|
180
180
|
block_signed_at: Date;
|
|
181
181
|
/** * The height of the block. */
|
|
182
182
|
block_height: number;
|
|
183
|
+
/** * The hash of the block. Use it to remove transactions from re-org-ed blocks. */
|
|
184
|
+
block_hash: string;
|
|
183
185
|
/** * The requested transaction hash. */
|
|
184
186
|
tx_hash: string;
|
|
185
187
|
/** * The offset is the position of the tx in the block. */
|
|
186
188
|
tx_offset: number;
|
|
187
189
|
/** * Whether or not transaction is successful. */
|
|
188
190
|
successful: boolean;
|
|
191
|
+
/** * The address of the miner. */
|
|
192
|
+
miner_address: string;
|
|
189
193
|
/** * The sender's wallet address. */
|
|
190
194
|
from_address: string;
|
|
191
195
|
/** * The label of `from` address. */
|
|
@@ -200,6 +204,8 @@ declare class BlockTransactionWithContractTransfers {
|
|
|
200
204
|
value_quote: number;
|
|
201
205
|
/** * A prettier version of the quote for rendering purposes. */
|
|
202
206
|
pretty_value_quote: string;
|
|
207
|
+
/** * The requested chain native gas token metadata. */
|
|
208
|
+
gas_metadata: ContractMetadata;
|
|
203
209
|
gas_offered: number;
|
|
204
210
|
/** * The gas spent for this tx. */
|
|
205
211
|
gas_spent: number;
|
|
@@ -227,6 +233,21 @@ declare class Pagination {
|
|
|
227
233
|
total_count: number;
|
|
228
234
|
constructor(data: Pagination);
|
|
229
235
|
}
|
|
236
|
+
declare class ContractMetadata {
|
|
237
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
238
|
+
contract_decimals: number;
|
|
239
|
+
/** * The string returned by the `name()` method. */
|
|
240
|
+
contract_name: string;
|
|
241
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
242
|
+
contract_ticker_symbol: string;
|
|
243
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
244
|
+
contract_address: string;
|
|
245
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
246
|
+
supports_erc: string;
|
|
247
|
+
/** * The contract logo URL. */
|
|
248
|
+
logo_url: string;
|
|
249
|
+
constructor(data: ContractMetadata);
|
|
250
|
+
}
|
|
230
251
|
declare class Explorer {
|
|
231
252
|
/** * The name of the explorer. */
|
|
232
253
|
label: string;
|
|
@@ -517,6 +517,6 @@ export declare class BaseService {
|
|
|
517
517
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
518
518
|
*
|
|
519
519
|
*/
|
|
520
|
-
getGasPrices(chainName: Chains, eventType: string, queryParamOpts?: GetGasPricesQueryParamOpts): Promise<Response<GasPricesResponse>>;
|
|
520
|
+
getGasPrices(chainName: Chain | Chains | ChainID, eventType: string, queryParamOpts?: GetGasPricesQueryParamOpts): Promise<Response<GasPricesResponse>>;
|
|
521
521
|
}
|
|
522
522
|
export {};
|
|
@@ -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";
|
|
12
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.
|
|
12
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.6";
|
|
13
13
|
export declare class Response<T> {
|
|
14
14
|
data: T;
|
|
15
15
|
error: boolean;
|
|
@@ -702,6 +702,6 @@ export declare class TransactionService {
|
|
|
702
702
|
* - `withSafe`: Include safe details.
|
|
703
703
|
*
|
|
704
704
|
*/
|
|
705
|
-
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
|
|
705
|
+
getTransactionsForBlockHash(chainName: Chain | Chains | ChainID, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
|
|
706
706
|
}
|
|
707
707
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NftData, Pagination, Explorer } from "./GenericTypes";
|
|
1
|
+
import { NftData, Pagination, Explorer, ContractMetadata } from "./GenericTypes";
|
|
2
2
|
export interface BalancesResponse {
|
|
3
3
|
/** * The requested address. */
|
|
4
4
|
address: string;
|
|
@@ -136,12 +136,16 @@ export interface BlockTransactionWithContractTransfers {
|
|
|
136
136
|
block_signed_at: Date;
|
|
137
137
|
/** * The height of the block. */
|
|
138
138
|
block_height: number;
|
|
139
|
+
/** * The hash of the block. Use it to remove transactions from re-org-ed blocks. */
|
|
140
|
+
block_hash: string;
|
|
139
141
|
/** * The requested transaction hash. */
|
|
140
142
|
tx_hash: string;
|
|
141
143
|
/** * The offset is the position of the tx in the block. */
|
|
142
144
|
tx_offset: number;
|
|
143
145
|
/** * Whether or not transaction is successful. */
|
|
144
146
|
successful: boolean;
|
|
147
|
+
/** * The address of the miner. */
|
|
148
|
+
miner_address: string;
|
|
145
149
|
/** * The sender's wallet address. */
|
|
146
150
|
from_address: string;
|
|
147
151
|
/** * The label of `from` address. */
|
|
@@ -156,6 +160,8 @@ export interface BlockTransactionWithContractTransfers {
|
|
|
156
160
|
value_quote: number;
|
|
157
161
|
/** * A prettier version of the quote for rendering purposes. */
|
|
158
162
|
pretty_value_quote: string;
|
|
163
|
+
/** * The requested chain native gas token metadata. */
|
|
164
|
+
gas_metadata: ContractMetadata;
|
|
159
165
|
gas_offered: number;
|
|
160
166
|
/** * The gas spent for this tx. */
|
|
161
167
|
gas_spent: number;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
export { CovalentClient, Client, Chain, Quote, CovalentClientSettings, ChainID } from "./services/CovalentClient";
|
|
1
|
+
export { CovalentClient, Client, Chain, Quote, CovalentClientSettings, ChainID, Response } from "./services/CovalentClient";
|
|
2
|
+
export { Response as PriceResponse } from "./services/PricingService";
|
|
3
|
+
export * from "./services/BalanceService";
|
|
4
|
+
export * from "./services/BaseService";
|
|
5
|
+
export * from "./services/NftService";
|
|
6
|
+
export * from "./services/PricingService";
|
|
7
|
+
export * from "./services/SecurityService";
|
|
8
|
+
export * from "./services/XykService";
|
|
9
|
+
export * from "./services/TransactionService";
|
|
2
10
|
export * from "./util/types/BalanceServiceTypes";
|
|
3
11
|
export * from "./util/types/BaseServiceTypes";
|
|
4
12
|
export * from "./util/types/NftServiceTypes";
|