@covalenthq/client-sdk 0.9.5 → 0.9.7

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.
@@ -1,4 +1,4 @@
1
- import { NftData, Pagination, Explorer, ContractMetadata, LogoUrls } from "./GenericTypes";
1
+ import { Pagination, Explorer, ContractMetadata, LogoUrls, NftCollectionAttribute } from "./GenericTypes";
2
2
  export interface BalancesResponse {
3
3
  /** * The requested address. */
4
4
  address: string;
@@ -57,12 +57,47 @@ export interface BalanceItem {
57
57
  /** * The protocol metadata. */
58
58
  protocol_metadata: ProtocolMetadata;
59
59
  /** * NFT-specific data. */
60
- nft_data: NftData[];
60
+ nft_data: BalanceNftData[];
61
61
  }
62
62
  export interface ProtocolMetadata {
63
63
  /** * The name of the protocol. */
64
64
  protocol_name: string;
65
65
  }
66
+ export interface BalanceNftData {
67
+ /** * The token's id. */
68
+ token_id: bigint | null;
69
+ /** * The count of the number of NFTs with this ID. */
70
+ token_balance: bigint | null;
71
+ /** * External URL for additional metadata. */
72
+ token_url: string;
73
+ /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
74
+ supports_erc: string[];
75
+ /** * The latest price value on chain of the token ID. */
76
+ token_price_wei: bigint | null;
77
+ /** * The latest quote_rate of the token ID denominated in unscaled ETH. */
78
+ token_quote_rate_eth: string;
79
+ /** * The address of the original owner of this NFT. */
80
+ original_owner: string;
81
+ external_data: NftExternalDataV1;
82
+ /** * The current owner of this NFT. */
83
+ owner: string;
84
+ /** * The address of the current owner of this NFT. */
85
+ owner_address: string;
86
+ /** * When set to true, this NFT has been Burned. */
87
+ burned: boolean;
88
+ }
89
+ export interface NftExternalDataV1 {
90
+ name: string;
91
+ description: string;
92
+ image: string;
93
+ image_256: string;
94
+ image_512: string;
95
+ image_1024: string;
96
+ animation_url: string;
97
+ external_url: string;
98
+ attributes: NftCollectionAttribute[];
99
+ owner: string;
100
+ }
66
101
  export interface PortfolioResponse {
67
102
  /** * The requested address. */
68
103
  address: string;
@@ -281,6 +316,7 @@ export interface HistoricalBalanceItem {
281
316
  block_height: number;
282
317
  /** * The block height when the token was last transferred. */
283
318
  last_transferred_block_height: number;
319
+ contract_display_name: string;
284
320
  /** * The timestamp when the token was transferred. */
285
321
  last_transferred_at: Date;
286
322
  /** * Indicates if a token is the chain's native gas token, eg: ETH on Ethereum. */
@@ -297,8 +333,10 @@ export interface HistoricalBalanceItem {
297
333
  quote: number;
298
334
  /** * A prettier version of the quote for rendering purposes. */
299
335
  pretty_quote: string;
336
+ /** * The protocol metadata. */
337
+ protocol_metadata: ProtocolMetadata;
300
338
  /** * NFT-specific data. */
301
- nft_data: NftData[];
339
+ nft_data: BalanceNftData[];
302
340
  }
303
341
  export interface TokenBalanceNativeResponse {
304
342
  /** * The requested address. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalenthq/client-sdk",
3
- "version": "0.9.5",
3
+ "version": "0.9.7",
4
4
  "types": "dist/index.d.ts",
5
5
  "files": [
6
6
  "/dist"