@covalenthq/client-sdk 0.6.0 → 0.6.1
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 +16 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +20 -0
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/es/index.js +16 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +20 -0
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/esm/index.js +16 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +20 -0
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/services/BalanceService.d.ts +20 -0
- package/dist/services/BalanceService.js +15 -0
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +18 -0
- package/package.json +1 -1
|
@@ -23,10 +23,14 @@ declare class BalanceItem {
|
|
|
23
23
|
contract_ticker_symbol: string;
|
|
24
24
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
25
25
|
contract_address: string;
|
|
26
|
+
/** * A display-friendly name for the contract. */
|
|
27
|
+
contract_display_name: string;
|
|
26
28
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
27
29
|
supports_erc: string;
|
|
28
30
|
/** * The contract logo URL. */
|
|
29
31
|
logo_url: string;
|
|
32
|
+
/** * The balance item logo URLs. */
|
|
33
|
+
logo_urls: LogoUrls;
|
|
30
34
|
/** * The timestamp when the token was transferred. */
|
|
31
35
|
last_transferred_at: Date;
|
|
32
36
|
/** * Indicates if a token is the chain's native gas token, eg: ETH on Ethereum. */
|
|
@@ -51,10 +55,26 @@ declare class BalanceItem {
|
|
|
51
55
|
pretty_quote: string;
|
|
52
56
|
/** * A prettier version of the 24h quote for rendering purposes. */
|
|
53
57
|
pretty_quote_24h: string;
|
|
58
|
+
/** * The protocol metadata. */
|
|
59
|
+
protocol_metadata: ProtocolMetadata;
|
|
54
60
|
/** * NFT-specific data. */
|
|
55
61
|
nft_data: NftData[];
|
|
56
62
|
constructor(data: BalanceItem);
|
|
57
63
|
}
|
|
64
|
+
declare class LogoUrls {
|
|
65
|
+
/** * The token logo URL. */
|
|
66
|
+
token_logo_url: string;
|
|
67
|
+
/** * The protocol logo URL. */
|
|
68
|
+
protocol_logo_url: string;
|
|
69
|
+
/** * The chain logo URL. */
|
|
70
|
+
chain_logo_url: string;
|
|
71
|
+
constructor(data: LogoUrls);
|
|
72
|
+
}
|
|
73
|
+
declare class ProtocolMetadata {
|
|
74
|
+
/** * The name of the protocol. */
|
|
75
|
+
protocol_name: string;
|
|
76
|
+
constructor(data: ProtocolMetadata);
|
|
77
|
+
}
|
|
58
78
|
declare class NftData {
|
|
59
79
|
/** * The token's id. */
|
|
60
80
|
token_id: bigint | null;
|
|
@@ -21,7 +21,7 @@ export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-main
|
|
|
21
21
|
* CovalentClient Class
|
|
22
22
|
*/
|
|
23
23
|
export type Quotes = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
|
|
24
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.
|
|
24
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.1";
|
|
25
25
|
export declare class Response<T> {
|
|
26
26
|
data: T;
|
|
27
27
|
error: boolean;
|
|
@@ -22,10 +22,14 @@ export interface BalanceItem {
|
|
|
22
22
|
contract_ticker_symbol: string;
|
|
23
23
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
24
24
|
contract_address: string;
|
|
25
|
+
/** * A display-friendly name for the contract. */
|
|
26
|
+
contract_display_name: string;
|
|
25
27
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
26
28
|
supports_erc: string;
|
|
27
29
|
/** * The contract logo URL. */
|
|
28
30
|
logo_url: string;
|
|
31
|
+
/** * The balance item logo URLs. */
|
|
32
|
+
logo_urls: LogoUrls;
|
|
29
33
|
/** * The timestamp when the token was transferred. */
|
|
30
34
|
last_transferred_at: Date;
|
|
31
35
|
/** * Indicates if a token is the chain's native gas token, eg: ETH on Ethereum. */
|
|
@@ -50,9 +54,23 @@ export interface BalanceItem {
|
|
|
50
54
|
pretty_quote: string;
|
|
51
55
|
/** * A prettier version of the 24h quote for rendering purposes. */
|
|
52
56
|
pretty_quote_24h: string;
|
|
57
|
+
/** * The protocol metadata. */
|
|
58
|
+
protocol_metadata: ProtocolMetadata;
|
|
53
59
|
/** * NFT-specific data. */
|
|
54
60
|
nft_data: NftData[];
|
|
55
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
|
+
export interface ProtocolMetadata {
|
|
71
|
+
/** * The name of the protocol. */
|
|
72
|
+
protocol_name: string;
|
|
73
|
+
}
|
|
56
74
|
export interface PortfolioResponse {
|
|
57
75
|
/** * The requested address. */
|
|
58
76
|
address: string;
|
package/dist/es/index.js
CHANGED
|
@@ -522,6 +522,7 @@ class BalanceItem {
|
|
|
522
522
|
this.contract_name = data.contract_name;
|
|
523
523
|
this.contract_ticker_symbol = data.contract_ticker_symbol;
|
|
524
524
|
this.contract_address = data.contract_address;
|
|
525
|
+
this.contract_display_name = data.contract_display_name;
|
|
525
526
|
this.supports_erc = data.supports_erc;
|
|
526
527
|
this.logo_url = data.logo_url;
|
|
527
528
|
this.last_transferred_at = data.last_transferred_at && data.last_transferred_at !== null ? parseISO(data.last_transferred_at.toString()) : null;
|
|
@@ -536,9 +537,23 @@ class BalanceItem {
|
|
|
536
537
|
this.quote_24h = data.quote_24h;
|
|
537
538
|
this.pretty_quote = data.pretty_quote;
|
|
538
539
|
this.pretty_quote_24h = data.pretty_quote_24h;
|
|
540
|
+
this.logo_urls = data.logo_urls && data.logo_urls !== null ? new LogoUrls(data.logo_urls) : null;
|
|
541
|
+
this.protocol_metadata = data.protocol_metadata && data.protocol_metadata !== null ? new ProtocolMetadata(data.protocol_metadata) : null;
|
|
539
542
|
this.nft_data = data.nft_data && data.nft_data !== null ? data.nft_data.map((itemData) => new NftData$1(itemData)) : null;
|
|
540
543
|
}
|
|
541
544
|
}
|
|
545
|
+
class LogoUrls {
|
|
546
|
+
constructor(data) {
|
|
547
|
+
this.token_logo_url = data.token_logo_url;
|
|
548
|
+
this.protocol_logo_url = data.protocol_logo_url;
|
|
549
|
+
this.chain_logo_url = data.chain_logo_url;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
class ProtocolMetadata {
|
|
553
|
+
constructor(data) {
|
|
554
|
+
this.protocol_name = data.protocol_name;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
542
557
|
let NftData$1 = class NftData {
|
|
543
558
|
constructor(data) {
|
|
544
559
|
this.token_id = data.token_id && data.token_id !== null ? BigInt(data.token_id) : null;
|
|
@@ -5850,7 +5865,7 @@ class XykService {
|
|
|
5850
5865
|
}
|
|
5851
5866
|
}
|
|
5852
5867
|
|
|
5853
|
-
const userAgent = "com.covalenthq.sdk.typescript/0.6.
|
|
5868
|
+
const userAgent = "com.covalenthq.sdk.typescript/0.6.1";
|
|
5854
5869
|
/**
|
|
5855
5870
|
* CovalentClient Class
|
|
5856
5871
|
*/
|