@covalenthq/client-sdk 0.2.9 → 0.4.2
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 +64 -14
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.js +4619 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/services/BalanceService.d.ts +443 -0
- package/dist/cjs/services/BaseService.d.ts +357 -0
- package/dist/cjs/services/CovalentClient.d.ts +65 -0
- package/dist/cjs/services/NftService.d.ts +484 -0
- package/dist/cjs/services/PricingService.d.ts +88 -0
- package/dist/cjs/services/SecurityService.d.ts +96 -0
- package/dist/cjs/services/TransactionService.d.ts +440 -0
- package/dist/cjs/services/XykService.d.ts +682 -0
- package/dist/cjs/util/ApiHelpers.d.ts +5 -0
- package/dist/cjs/util/backoff.d.ts +11 -0
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/cjs/util/types/GenericTypes.d.ts +96 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/cjs/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/cjs/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/es/index.d.ts +9 -0
- package/dist/es/index.js +4616 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/services/BalanceService.d.ts +443 -0
- package/dist/es/services/BaseService.d.ts +357 -0
- package/dist/es/services/CovalentClient.d.ts +65 -0
- package/dist/es/services/NftService.d.ts +484 -0
- package/dist/es/services/PricingService.d.ts +88 -0
- package/dist/es/services/SecurityService.d.ts +96 -0
- package/dist/es/services/TransactionService.d.ts +440 -0
- package/dist/es/services/XykService.d.ts +682 -0
- package/dist/es/util/ApiHelpers.d.ts +5 -0
- package/dist/es/util/backoff.d.ts +11 -0
- package/dist/es/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/es/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/es/util/types/GenericTypes.d.ts +96 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/es/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/es/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/es/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/es/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +4616 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/services/BalanceService.d.ts +443 -0
- package/dist/esm/services/BaseService.d.ts +357 -0
- package/dist/esm/services/CovalentClient.d.ts +65 -0
- package/dist/esm/services/NftService.d.ts +484 -0
- package/dist/esm/services/PricingService.d.ts +88 -0
- package/dist/esm/services/SecurityService.d.ts +96 -0
- package/dist/esm/services/TransactionService.d.ts +440 -0
- package/dist/esm/services/XykService.d.ts +682 -0
- package/dist/esm/util/ApiHelpers.d.ts +5 -0
- package/dist/esm/util/backoff.d.ts +11 -0
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/esm/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/esm/util/types/GenericTypes.d.ts +96 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/esm/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/esm/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/esm/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -27
- package/dist/index.js.map +1 -1
- package/dist/services/BalanceService.d.ts +49 -11
- package/dist/services/BalanceService.js +110 -81
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +46 -10
- package/dist/services/BaseService.js +193 -145
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +65 -0
- package/dist/services/CovalentClient.js +44 -0
- package/dist/services/CovalentClient.js.map +1 -0
- package/dist/services/NftService.d.ts +52 -22
- package/dist/services/NftService.js +236 -235
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.d.ts +8 -3
- package/dist/services/PricingService.js +43 -37
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.d.ts +9 -3
- package/dist/services/SecurityService.js +38 -31
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +41 -9
- package/dist/services/TransactionService.js +133 -100
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +81 -19
- package/dist/services/XykService.js +451 -278
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.d.ts +2 -1
- package/dist/util/ApiHelpers.js +57 -36
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/backoff.d.ts +5 -3
- package/dist/util/backoff.js +35 -13
- package/dist/util/backoff.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +25 -0
- package/dist/util/types/BalanceServiceTypes.js +1 -2
- package/dist/util/types/BaseServiceTypes.d.ts +8 -0
- package/dist/util/types/BaseServiceTypes.js +1 -2
- package/dist/util/types/GenericTypes.d.ts +7 -0
- package/dist/util/types/GenericTypes.js +1 -2
- package/dist/util/types/NftServiceTypes.d.ts +10 -2
- package/dist/util/types/NftServiceTypes.js +1 -2
- package/dist/util/types/PricingServiceTypes.js +1 -2
- package/dist/util/types/SecurityServiceTypes.d.ts +1 -0
- package/dist/util/types/SecurityServiceTypes.js +1 -2
- package/dist/util/types/TransactionServiceTypes.d.ts +14 -2
- package/dist/util/types/TransactionServiceTypes.js +1 -2
- package/dist/util/types/XykServiceTypes.d.ts +20 -6
- package/dist/util/types/XykServiceTypes.js +1 -2
- package/package.json +19 -4
- package/dist/services/Client.d.ts +0 -29
- package/dist/services/Client.js +0 -30
- package/dist/services/Client.js.map +0 -1
|
@@ -45,7 +45,7 @@ export interface NftTokenContractBalanceItem {
|
|
|
45
45
|
last_transfered_at: Date;
|
|
46
46
|
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
47
47
|
balance: bigint | null;
|
|
48
|
-
|
|
48
|
+
balance_24h: number;
|
|
49
49
|
type: string;
|
|
50
50
|
nft_data: NftData[];
|
|
51
51
|
}
|
|
@@ -105,10 +105,15 @@ export interface NftTransactionItem {
|
|
|
105
105
|
tx_hash: string;
|
|
106
106
|
/** * The offset is the position of the tx in the block. */
|
|
107
107
|
tx_offset: number;
|
|
108
|
+
/** * Whether or not transaction is successful. */
|
|
108
109
|
successful: boolean;
|
|
110
|
+
/** * The sender's wallet address. */
|
|
109
111
|
from_address: string;
|
|
112
|
+
/** * The label of `from` address. */
|
|
110
113
|
from_address_label: string;
|
|
114
|
+
/** * The receiver's wallet address. */
|
|
111
115
|
to_address: string;
|
|
116
|
+
/** * The label of `to` address. */
|
|
112
117
|
to_address_label: string;
|
|
113
118
|
/** * The value attached to this tx. */
|
|
114
119
|
value: bigint | null;
|
|
@@ -117,7 +122,9 @@ export interface NftTransactionItem {
|
|
|
117
122
|
/** * A prettier version of the quote for rendering purposes. */
|
|
118
123
|
pretty_value_quote: string;
|
|
119
124
|
gas_offered: string;
|
|
125
|
+
/** * The gas spent for this tx. */
|
|
120
126
|
gas_spent: string;
|
|
127
|
+
/** * The gas price at the time of this tx. */
|
|
121
128
|
gas_price: string;
|
|
122
129
|
/** * The total transaction fees (gas_price * gas_spent) paid for this tx, denoted in wei. */
|
|
123
130
|
fees_paid: bigint | null;
|
|
@@ -126,6 +133,7 @@ export interface NftTransactionItem {
|
|
|
126
133
|
/** * A prettier version of the quote for rendering purposes. */
|
|
127
134
|
pretty_gas_quote: string;
|
|
128
135
|
gas_quote_rate: number;
|
|
136
|
+
/** * The log events. */
|
|
129
137
|
log_events: LogEvent[];
|
|
130
138
|
}
|
|
131
139
|
export interface NftCollectionTraitsResponse {
|
|
@@ -207,7 +215,7 @@ export interface NftOwnershipForCollectionItem {
|
|
|
207
215
|
last_transfered_at: Date;
|
|
208
216
|
/** * Nft balance. */
|
|
209
217
|
balance: bigint | null;
|
|
210
|
-
|
|
218
|
+
balance_24h: number;
|
|
211
219
|
type: string;
|
|
212
220
|
nft_data: NftData;
|
|
213
221
|
}
|
|
@@ -45,6 +45,7 @@ export interface TokenSpenderItem {
|
|
|
45
45
|
block_height: number;
|
|
46
46
|
/** * The offset is the position of the tx in the block. */
|
|
47
47
|
tx_offset: number;
|
|
48
|
+
/** * The offset is the position of the log entry within an event log." */
|
|
48
49
|
log_offset: number;
|
|
49
50
|
/** * The block signed timestamp in UTC. */
|
|
50
51
|
block_signed_at: Date;
|
|
@@ -14,15 +14,23 @@ export interface Transaction {
|
|
|
14
14
|
block_signed_at: Date;
|
|
15
15
|
/** * The height of the block. */
|
|
16
16
|
block_height: number;
|
|
17
|
+
/** * The hash of the block. Use it to remove transactions from re-org-ed blocks. */
|
|
18
|
+
block_hash: string;
|
|
17
19
|
/** * The requested transaction hash. */
|
|
18
20
|
tx_hash: string;
|
|
19
21
|
/** * The offset is the position of the tx in the block. */
|
|
20
22
|
tx_offset: number;
|
|
21
23
|
/** * Indicates whether a transaction failed or succeeded. */
|
|
22
24
|
successful: boolean;
|
|
25
|
+
/** * The sender's wallet address. */
|
|
23
26
|
from_address: string;
|
|
27
|
+
/** * The address of the miner. */
|
|
28
|
+
miner_address: string;
|
|
29
|
+
/** * The label of `from` address. */
|
|
24
30
|
from_address_label: string;
|
|
31
|
+
/** * The receiver's wallet address. */
|
|
25
32
|
to_address: string;
|
|
33
|
+
/** * The label of `to` address. */
|
|
26
34
|
to_address_label: string;
|
|
27
35
|
/** * The value attached to this tx. */
|
|
28
36
|
value: bigint | null;
|
|
@@ -33,7 +41,9 @@ export interface Transaction {
|
|
|
33
41
|
/** * The requested chain native gas token metadata. */
|
|
34
42
|
gas_metadata: ContractMetadata;
|
|
35
43
|
gas_offered: string;
|
|
44
|
+
/** * The gas spent for this tx. */
|
|
36
45
|
gas_spent: string;
|
|
46
|
+
/** * The gas price at the time of this tx. */
|
|
37
47
|
gas_price: string;
|
|
38
48
|
/** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
|
|
39
49
|
fees_paid: bigint | null;
|
|
@@ -49,9 +59,11 @@ export interface Transaction {
|
|
|
49
59
|
nft_sale_details: NftSalesReport;
|
|
50
60
|
/** * The details for the lending protocol transaction. */
|
|
51
61
|
lending_details: LendingReport;
|
|
62
|
+
/** * The log events. */
|
|
52
63
|
log_events: LogEvent[];
|
|
53
64
|
}
|
|
54
65
|
export interface DexReport {
|
|
66
|
+
/** * The offset is the position of the log entry within an event log. */
|
|
55
67
|
log_offset: number;
|
|
56
68
|
/** * Stores the name of the protocol that facilitated the event. */
|
|
57
69
|
protocol_name: string;
|
|
@@ -114,6 +126,7 @@ export interface DexReport {
|
|
|
114
126
|
recipient: string;
|
|
115
127
|
}
|
|
116
128
|
export interface NftSalesReport {
|
|
129
|
+
/** * The offset is the position of the log entry within an event log. */
|
|
117
130
|
log_offset: number;
|
|
118
131
|
/** * Stores the topic event hash. All events have a unique topic event hash. */
|
|
119
132
|
topic0: string;
|
|
@@ -164,6 +177,7 @@ export interface NftSalesReport {
|
|
|
164
177
|
trade_group_type: string;
|
|
165
178
|
}
|
|
166
179
|
export interface LendingReport {
|
|
180
|
+
/** * The offset is the position of the log entry within an event log. */
|
|
167
181
|
log_offset: number;
|
|
168
182
|
/** * Stores the name of the lending protocol that facilitated the event. */
|
|
169
183
|
protocol_name: string;
|
|
@@ -240,8 +254,6 @@ export interface RecentTransactionsResponse {
|
|
|
240
254
|
address: string;
|
|
241
255
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
242
256
|
updated_at: Date;
|
|
243
|
-
/** * DEPRECATED */
|
|
244
|
-
next_update_at: Date;
|
|
245
257
|
/** * The requested quote currency eg: `USD`. */
|
|
246
258
|
quote_currency: string;
|
|
247
259
|
/** * The requested chain ID eg: `1`. */
|
|
@@ -65,6 +65,10 @@ export interface PoolToDexResponse {
|
|
|
65
65
|
/** * List of response items. */
|
|
66
66
|
items: PoolToDexItem[];
|
|
67
67
|
}
|
|
68
|
+
export interface PoolToDexItem extends SupportedDex {
|
|
69
|
+
/** * The dex logo URL. */
|
|
70
|
+
logo_url: string;
|
|
71
|
+
}
|
|
68
72
|
export interface SupportedDex {
|
|
69
73
|
/** * The requested chain ID eg: `1`. */
|
|
70
74
|
chain_id: string;
|
|
@@ -76,10 +80,6 @@ export interface SupportedDex {
|
|
|
76
80
|
router_contract_addresses: string;
|
|
77
81
|
swap_fee: number;
|
|
78
82
|
}
|
|
79
|
-
export interface PoolToDexItem extends SupportedDex {
|
|
80
|
-
/** * The dex logo URL */
|
|
81
|
-
logo_url: string;
|
|
82
|
-
}
|
|
83
83
|
export interface PoolByAddressResponse {
|
|
84
84
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
85
85
|
updated_at: Date;
|
|
@@ -198,12 +198,28 @@ export interface PoolsDexDataItem {
|
|
|
198
198
|
total_liquidity_quote: number;
|
|
199
199
|
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
200
200
|
pretty_total_liquidity_quote: string;
|
|
201
|
+
/** * The volume 24h converted to fiat in `quote-currency`. */
|
|
202
|
+
volume_24h_quote: number;
|
|
203
|
+
/** * The volume 7d converted to fiat in `quote-currency`. */
|
|
204
|
+
volume_7d_quote: number;
|
|
205
|
+
/** * The fee 24h converted to fiat in `quote-currency`. */
|
|
206
|
+
fee_24h_quote: number;
|
|
207
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
208
|
+
pretty_volume_24h_quote: string;
|
|
209
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
210
|
+
pretty_volume_7d_quote: string;
|
|
211
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
212
|
+
pretty_fee_24h_quote: string;
|
|
201
213
|
/** * Token0's contract metadata and reserve data. */
|
|
202
214
|
token_0: PoolsDexToken;
|
|
203
215
|
/** * Token1's contract metadata and reserve data. */
|
|
204
216
|
token_1: PoolsDexToken;
|
|
205
217
|
}
|
|
206
218
|
export interface PoolsDexToken {
|
|
219
|
+
/** * The reserves for the token. */
|
|
220
|
+
reserve: string;
|
|
221
|
+
/** * The string returned by the `name()` method. */
|
|
222
|
+
contract_name: string;
|
|
207
223
|
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
208
224
|
contract_decimals: number;
|
|
209
225
|
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
@@ -212,8 +228,6 @@ export interface PoolsDexToken {
|
|
|
212
228
|
contract_address: string;
|
|
213
229
|
/** * The contract logo URL. */
|
|
214
230
|
logo_url: string;
|
|
215
|
-
/** * The reserves for the token. */
|
|
216
|
-
reserve: string;
|
|
217
231
|
/** * The exchange rate for the requested quote currency. */
|
|
218
232
|
quote_rate: number;
|
|
219
233
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@covalenthq/client-sdk",
|
|
3
|
-
"version": "0.2
|
|
4
|
-
"main": "dist/index.js",
|
|
3
|
+
"version": "0.4.2",
|
|
5
4
|
"types": "dist/index.d.ts",
|
|
6
5
|
"files": [
|
|
7
6
|
"/dist"
|
|
@@ -10,15 +9,31 @@
|
|
|
10
9
|
"author": "Covalenthq",
|
|
11
10
|
"license": "MIT",
|
|
12
11
|
"dependencies": {
|
|
12
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
13
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
14
|
+
"chalk": "^4.1.2",
|
|
13
15
|
"date-fns": "^2.30.0",
|
|
16
|
+
"rollup": "^3.29.1",
|
|
17
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
14
18
|
"typescript": "^5.1.6"
|
|
15
19
|
},
|
|
16
20
|
"devDependencies": {
|
|
17
|
-
"@types/
|
|
21
|
+
"@types/chalk": "^2.2.0",
|
|
22
|
+
"@types/jest": "^29.5.5",
|
|
18
23
|
"jest": "^29.6.1",
|
|
24
|
+
"p-limit": "^3.1.0",
|
|
19
25
|
"ts-jest": "^29.1.1"
|
|
20
26
|
},
|
|
21
27
|
"scripts": {
|
|
22
|
-
"test": "jest"
|
|
28
|
+
"test": "jest",
|
|
29
|
+
"build": "rollup -c rollup.config.js",
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"start": "rollup -c"
|
|
32
|
+
},
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"require": "./dist/cjs/index.js",
|
|
36
|
+
"import": "./dist/es/index.js"
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { SecurityService } from "./SecurityService";
|
|
2
|
-
import { BalanceService } from "./BalanceService";
|
|
3
|
-
import { BaseService } from "./BaseService";
|
|
4
|
-
import { NftService } from "./NftService";
|
|
5
|
-
import { PricingService } from "./PricingService";
|
|
6
|
-
import { TransactionService } from "./TransactionService";
|
|
7
|
-
import { XykService } from "./XykService";
|
|
8
|
-
export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet";
|
|
9
|
-
export type Quotes = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
|
|
10
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.2.9";
|
|
11
|
-
export declare class Response<T> {
|
|
12
|
-
data: T;
|
|
13
|
-
error: boolean;
|
|
14
|
-
error_code: number;
|
|
15
|
-
error_message: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Client Class
|
|
19
|
-
*/
|
|
20
|
-
export declare class Client {
|
|
21
|
-
SecurityService: SecurityService;
|
|
22
|
-
BalanceService: BalanceService;
|
|
23
|
-
BaseService: BaseService;
|
|
24
|
-
NftService: NftService;
|
|
25
|
-
PricingService: PricingService;
|
|
26
|
-
TransactionService: TransactionService;
|
|
27
|
-
XykService: XykService;
|
|
28
|
-
constructor(apiKey: string);
|
|
29
|
-
}
|
package/dist/services/Client.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Client = exports.Response = exports.userAgent = void 0;
|
|
4
|
-
const SecurityService_1 = require("./SecurityService");
|
|
5
|
-
const BalanceService_1 = require("./BalanceService");
|
|
6
|
-
const BaseService_1 = require("./BaseService");
|
|
7
|
-
const NftService_1 = require("./NftService");
|
|
8
|
-
const PricingService_1 = require("./PricingService");
|
|
9
|
-
const TransactionService_1 = require("./TransactionService");
|
|
10
|
-
const XykService_1 = require("./XykService");
|
|
11
|
-
exports.userAgent = "com.covalenthq.sdk.typescript/0.2.9";
|
|
12
|
-
class Response {
|
|
13
|
-
}
|
|
14
|
-
exports.Response = Response;
|
|
15
|
-
/**
|
|
16
|
-
* Client Class
|
|
17
|
-
*/
|
|
18
|
-
class Client {
|
|
19
|
-
constructor(apiKey) {
|
|
20
|
-
this.SecurityService = new SecurityService_1.SecurityService(apiKey);
|
|
21
|
-
this.BalanceService = new BalanceService_1.BalanceService(apiKey);
|
|
22
|
-
this.BaseService = new BaseService_1.BaseService(apiKey);
|
|
23
|
-
this.NftService = new NftService_1.NftService(apiKey);
|
|
24
|
-
this.PricingService = new PricingService_1.PricingService(apiKey);
|
|
25
|
-
this.TransactionService = new TransactionService_1.TransactionService(apiKey);
|
|
26
|
-
this.XykService = new XykService_1.XykService(apiKey);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.Client = Client;
|
|
30
|
-
//# sourceMappingURL=Client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../src/services/Client.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,qDAAkD;AAClD,+CAA4C;AAC5C,6CAA0C;AAC1C,qDAAkD;AAClD,6DAA0D;AAC1D,6CAA0C;AAI7B,QAAA,SAAS,GAAG,qCAAqC,CAAC;AAE/D,MAAa,QAAQ;CAKpB;AALD,4BAKC;AAED;;GAEG;AACH,MAAa,MAAM;IAgBf,YAAY,MAAc;QAEtB,IAAI,CAAC,eAAe,GAAG,IAAI,iCAAe,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,IAAI,yBAAW,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,kBAAkB,GAAG,IAAI,uCAAkB,CAAC,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CAEJ;AA3BD,wBA2BC"}
|