@covalenthq/client-sdk 0.4.2 → 0.5.0
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 +60 -39
- package/dist/cjs/index.js +687 -80
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +100 -0
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/NftService.d.ts +137 -1
- package/dist/cjs/services/SecurityService.d.ts +62 -0
- package/dist/cjs/services/TransactionService.d.ts +17 -0
- package/dist/cjs/services/XykService.d.ts +4 -0
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +38 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +76 -0
- package/dist/cjs/util/types/SecurityServiceTypes.d.ts +50 -0
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +10 -0
- package/dist/es/index.js +687 -80
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +100 -0
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/NftService.d.ts +137 -1
- package/dist/es/services/SecurityService.d.ts +62 -0
- package/dist/es/services/TransactionService.d.ts +17 -0
- package/dist/es/services/XykService.d.ts +4 -0
- package/dist/es/util/types/BalanceServiceTypes.d.ts +38 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +76 -0
- package/dist/es/util/types/SecurityServiceTypes.d.ts +50 -0
- package/dist/es/util/types/TransactionServiceTypes.d.ts +10 -0
- package/dist/esm/index.js +687 -80
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +100 -0
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/NftService.d.ts +137 -1
- package/dist/esm/services/SecurityService.d.ts +62 -0
- package/dist/esm/services/TransactionService.d.ts +17 -0
- package/dist/esm/services/XykService.d.ts +4 -0
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +38 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +76 -0
- package/dist/esm/util/types/SecurityServiceTypes.d.ts +50 -0
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +10 -0
- package/dist/services/BalanceService.d.ts +100 -0
- package/dist/services/BalanceService.js +193 -6
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.js +12 -12
- 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 +137 -1
- package/dist/services/NftService.js +294 -16
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.js +2 -2
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.d.ts +62 -0
- package/dist/services/SecurityService.js +103 -2
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +17 -0
- package/dist/services/TransactionService.js +23 -7
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +4 -0
- package/dist/services/XykService.js +34 -28
- 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 +38 -0
- package/dist/util/types/NftServiceTypes.d.ts +76 -0
- package/dist/util/types/SecurityServiceTypes.d.ts +50 -0
- package/dist/util/types/TransactionServiceTypes.d.ts +10 -0
- package/package.json +1 -1
|
@@ -219,3 +219,79 @@ export interface NftOwnershipForCollectionItem {
|
|
|
219
219
|
type: string;
|
|
220
220
|
nft_data: NftData;
|
|
221
221
|
}
|
|
222
|
+
export interface NftMarketSaleCountResponse {
|
|
223
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
224
|
+
updated_at: Date;
|
|
225
|
+
/** * The requested address. */
|
|
226
|
+
address: string;
|
|
227
|
+
/** * The requested quote currency eg: `USD`. */
|
|
228
|
+
quote_currency: string;
|
|
229
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
230
|
+
chain_name: string;
|
|
231
|
+
/** * The requested chain ID eg: `1`. */
|
|
232
|
+
chain_id: number;
|
|
233
|
+
/** * List of response items. */
|
|
234
|
+
items: MarketSaleCountItem[];
|
|
235
|
+
}
|
|
236
|
+
export interface MarketSaleCountItem {
|
|
237
|
+
/** * The timestamp of the date of sale. */
|
|
238
|
+
date: Date;
|
|
239
|
+
/** * The total amount of sales for the current day. */
|
|
240
|
+
sale_count: number;
|
|
241
|
+
}
|
|
242
|
+
export interface NftMarketVolumeResponse {
|
|
243
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
244
|
+
updated_at: Date;
|
|
245
|
+
/** * The requested address. */
|
|
246
|
+
address: string;
|
|
247
|
+
/** * The requested quote currency eg: `USD`. */
|
|
248
|
+
quote_currency: string;
|
|
249
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
250
|
+
chain_name: string;
|
|
251
|
+
/** * The requested chain ID eg: `1`. */
|
|
252
|
+
chain_id: number;
|
|
253
|
+
/** * List of response items. */
|
|
254
|
+
items: MarketVolumeItem[];
|
|
255
|
+
}
|
|
256
|
+
export interface MarketVolumeItem {
|
|
257
|
+
/** * The timestamp of the date of sale. */
|
|
258
|
+
date: Date;
|
|
259
|
+
/** * The ticker symbol for the native currency. */
|
|
260
|
+
native_ticker_symbol: string;
|
|
261
|
+
/** * The contract name of the native currency. */
|
|
262
|
+
native_name: string;
|
|
263
|
+
/** * The current volume converted to fiat in `quote-currency`. */
|
|
264
|
+
volume_quote: number;
|
|
265
|
+
/** * The current volume in native currency. */
|
|
266
|
+
volume_native_quote: number;
|
|
267
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
268
|
+
pretty_volume_quote: string;
|
|
269
|
+
}
|
|
270
|
+
export interface NftMarketFloorPriceResponse {
|
|
271
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
272
|
+
updated_at: Date;
|
|
273
|
+
/** * The requested address. */
|
|
274
|
+
address: string;
|
|
275
|
+
/** * The requested quote currency eg: `USD`. */
|
|
276
|
+
quote_currency: string;
|
|
277
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
278
|
+
chain_name: string;
|
|
279
|
+
/** * The requested chain ID eg: `1`. */
|
|
280
|
+
chain_id: number;
|
|
281
|
+
/** * List of response items. */
|
|
282
|
+
items: MarketFloorPriceItem[];
|
|
283
|
+
}
|
|
284
|
+
export interface MarketFloorPriceItem {
|
|
285
|
+
/** * The timestamp of the date of sale. */
|
|
286
|
+
date: Date;
|
|
287
|
+
/** * The ticker symbol for the native currency. */
|
|
288
|
+
native_ticker_symbol: string;
|
|
289
|
+
/** * The contract name of the native currency. */
|
|
290
|
+
native_name: string;
|
|
291
|
+
/** * The current floor price in native currency. */
|
|
292
|
+
floor_price_native_quote: number;
|
|
293
|
+
/** * The current floor price converted to fiat in `quote-currency`. */
|
|
294
|
+
floor_price_quote: number;
|
|
295
|
+
/** * A prettier version of the floor price quote for rendering purposes. */
|
|
296
|
+
pretty_floor_price_quote: string;
|
|
297
|
+
}
|
|
@@ -69,3 +69,53 @@ export interface TokenSpenderItem {
|
|
|
69
69
|
pretty_value_at_risk_quote: string;
|
|
70
70
|
risk_factor: string;
|
|
71
71
|
}
|
|
72
|
+
export interface NftApprovalsResponse {
|
|
73
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
74
|
+
updated_at: Date;
|
|
75
|
+
/** * The requested chain ID eg: `1`. */
|
|
76
|
+
chain_id: number;
|
|
77
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
78
|
+
chain_name: string;
|
|
79
|
+
/** * The requested address. */
|
|
80
|
+
address: string;
|
|
81
|
+
/** * List of response items. */
|
|
82
|
+
items: NftApprovalsItem[];
|
|
83
|
+
}
|
|
84
|
+
export interface NftApprovalsItem {
|
|
85
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
86
|
+
contract_address: string;
|
|
87
|
+
/** * The label of the contract address. */
|
|
88
|
+
contract_address_label: string;
|
|
89
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
90
|
+
contract_ticker_symbol: string;
|
|
91
|
+
/** * List of asset balances held by the user. */
|
|
92
|
+
token_balances: NftApprovalBalance[];
|
|
93
|
+
/** * Contracts with non-zero approvals for this token. */
|
|
94
|
+
spenders: NftApprovalSpender[];
|
|
95
|
+
}
|
|
96
|
+
export interface NftApprovalBalance {
|
|
97
|
+
/** * The token's id. */
|
|
98
|
+
token_id: bigint | null;
|
|
99
|
+
/** * The NFT's token balance. */
|
|
100
|
+
token_balance: bigint | null;
|
|
101
|
+
}
|
|
102
|
+
export interface NftApprovalSpender {
|
|
103
|
+
/** * The height of the block. */
|
|
104
|
+
block_height: number;
|
|
105
|
+
/** * The offset is the position of the tx in the block. */
|
|
106
|
+
tx_offset: number;
|
|
107
|
+
/** * The offset is the position of the log entry within an event log." */
|
|
108
|
+
log_offset: number;
|
|
109
|
+
/** * The block signed timestamp in UTC. */
|
|
110
|
+
block_signed_at: Date;
|
|
111
|
+
/** * Most recent transaction that updated approval amounts for the token. */
|
|
112
|
+
tx_hash: string;
|
|
113
|
+
/** * Address of the contract with approval for the token. */
|
|
114
|
+
spender_address: string;
|
|
115
|
+
/** * Name of the contract with approval for the token. */
|
|
116
|
+
spender_address_label: string;
|
|
117
|
+
/** * The token ids approved. */
|
|
118
|
+
token_ids_approved: string;
|
|
119
|
+
/** * Remaining number of tokens granted to the spender by the approval. */
|
|
120
|
+
allowance: string;
|
|
121
|
+
}
|
|
@@ -61,6 +61,8 @@ export interface Transaction {
|
|
|
61
61
|
lending_details: LendingReport;
|
|
62
62
|
/** * The log events. */
|
|
63
63
|
log_events: LogEvent[];
|
|
64
|
+
/** * The details related to the safe transaction. */
|
|
65
|
+
safe_details: SafeDetails[];
|
|
64
66
|
}
|
|
65
67
|
export interface DexReport {
|
|
66
68
|
/** * The offset is the position of the log entry within an event log. */
|
|
@@ -249,6 +251,14 @@ export interface LendingReport {
|
|
|
249
251
|
/** * Stores the wallet address of the user initiating the event. */
|
|
250
252
|
user: string;
|
|
251
253
|
}
|
|
254
|
+
export interface SafeDetails {
|
|
255
|
+
/** * The address that signed the safe transaction. */
|
|
256
|
+
owner_address: string;
|
|
257
|
+
/** * The signature of the owner for the safe transaction. */
|
|
258
|
+
signature: string;
|
|
259
|
+
/** * The type of safe signature used. */
|
|
260
|
+
signature_type: string;
|
|
261
|
+
}
|
|
252
262
|
export interface RecentTransactionsResponse {
|
|
253
263
|
/** * The requested address. */
|
|
254
264
|
address: string;
|