@covalenthq/client-sdk 0.2.8 → 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.
Files changed (117) hide show
  1. package/README.md +64 -14
  2. package/dist/cjs/index.d.ts +9 -0
  3. package/dist/cjs/index.js +4619 -0
  4. package/dist/cjs/index.js.map +1 -0
  5. package/dist/cjs/services/BalanceService.d.ts +443 -0
  6. package/dist/cjs/services/BaseService.d.ts +357 -0
  7. package/dist/cjs/services/CovalentClient.d.ts +65 -0
  8. package/dist/cjs/services/NftService.d.ts +484 -0
  9. package/dist/cjs/services/PricingService.d.ts +88 -0
  10. package/dist/cjs/services/SecurityService.d.ts +96 -0
  11. package/dist/cjs/services/TransactionService.d.ts +440 -0
  12. package/dist/cjs/services/XykService.d.ts +682 -0
  13. package/dist/cjs/util/ApiHelpers.d.ts +5 -0
  14. package/dist/cjs/util/backoff.d.ts +11 -0
  15. package/dist/cjs/util/types/BalanceServiceTypes.d.ts +284 -0
  16. package/dist/cjs/util/types/BaseServiceTypes.d.ts +180 -0
  17. package/dist/cjs/util/types/GenericTypes.d.ts +96 -0
  18. package/dist/cjs/util/types/NftServiceTypes.d.ts +221 -0
  19. package/dist/cjs/util/types/PricingServiceTypes.d.ts +31 -0
  20. package/dist/cjs/util/types/SecurityServiceTypes.d.ts +71 -0
  21. package/dist/cjs/util/types/TransactionServiceTypes.d.ts +312 -0
  22. package/dist/cjs/util/types/XykServiceTypes.d.ts +479 -0
  23. package/dist/es/index.d.ts +9 -0
  24. package/dist/es/index.js +4616 -0
  25. package/dist/es/index.js.map +1 -0
  26. package/dist/es/services/BalanceService.d.ts +443 -0
  27. package/dist/es/services/BaseService.d.ts +357 -0
  28. package/dist/es/services/CovalentClient.d.ts +65 -0
  29. package/dist/es/services/NftService.d.ts +484 -0
  30. package/dist/es/services/PricingService.d.ts +88 -0
  31. package/dist/es/services/SecurityService.d.ts +96 -0
  32. package/dist/es/services/TransactionService.d.ts +440 -0
  33. package/dist/es/services/XykService.d.ts +682 -0
  34. package/dist/es/util/ApiHelpers.d.ts +5 -0
  35. package/dist/es/util/backoff.d.ts +11 -0
  36. package/dist/es/util/types/BalanceServiceTypes.d.ts +284 -0
  37. package/dist/es/util/types/BaseServiceTypes.d.ts +180 -0
  38. package/dist/es/util/types/GenericTypes.d.ts +96 -0
  39. package/dist/es/util/types/NftServiceTypes.d.ts +221 -0
  40. package/dist/es/util/types/PricingServiceTypes.d.ts +31 -0
  41. package/dist/es/util/types/SecurityServiceTypes.d.ts +71 -0
  42. package/dist/es/util/types/TransactionServiceTypes.d.ts +312 -0
  43. package/dist/es/util/types/XykServiceTypes.d.ts +479 -0
  44. package/dist/esm/index.d.ts +9 -0
  45. package/dist/esm/index.js +4616 -0
  46. package/dist/esm/index.js.map +1 -0
  47. package/dist/esm/services/BalanceService.d.ts +443 -0
  48. package/dist/esm/services/BaseService.d.ts +357 -0
  49. package/dist/esm/services/CovalentClient.d.ts +65 -0
  50. package/dist/esm/services/NftService.d.ts +484 -0
  51. package/dist/esm/services/PricingService.d.ts +88 -0
  52. package/dist/esm/services/SecurityService.d.ts +96 -0
  53. package/dist/esm/services/TransactionService.d.ts +440 -0
  54. package/dist/esm/services/XykService.d.ts +682 -0
  55. package/dist/esm/util/ApiHelpers.d.ts +5 -0
  56. package/dist/esm/util/backoff.d.ts +11 -0
  57. package/dist/esm/util/types/BalanceServiceTypes.d.ts +284 -0
  58. package/dist/esm/util/types/BaseServiceTypes.d.ts +180 -0
  59. package/dist/esm/util/types/GenericTypes.d.ts +96 -0
  60. package/dist/esm/util/types/NftServiceTypes.d.ts +221 -0
  61. package/dist/esm/util/types/PricingServiceTypes.d.ts +31 -0
  62. package/dist/esm/util/types/SecurityServiceTypes.d.ts +71 -0
  63. package/dist/esm/util/types/TransactionServiceTypes.d.ts +312 -0
  64. package/dist/esm/util/types/XykServiceTypes.d.ts +479 -0
  65. package/dist/index.d.ts +3 -3
  66. package/dist/index.js +9 -27
  67. package/dist/index.js.map +1 -1
  68. package/dist/services/BalanceService.d.ts +49 -11
  69. package/dist/services/BalanceService.js +110 -81
  70. package/dist/services/BalanceService.js.map +1 -1
  71. package/dist/services/BaseService.d.ts +46 -10
  72. package/dist/services/BaseService.js +193 -145
  73. package/dist/services/BaseService.js.map +1 -1
  74. package/dist/services/CovalentClient.d.ts +65 -0
  75. package/dist/services/CovalentClient.js +44 -0
  76. package/dist/services/CovalentClient.js.map +1 -0
  77. package/dist/services/NftService.d.ts +52 -22
  78. package/dist/services/NftService.js +236 -235
  79. package/dist/services/NftService.js.map +1 -1
  80. package/dist/services/PricingService.d.ts +8 -3
  81. package/dist/services/PricingService.js +43 -37
  82. package/dist/services/PricingService.js.map +1 -1
  83. package/dist/services/SecurityService.d.ts +9 -3
  84. package/dist/services/SecurityService.js +38 -31
  85. package/dist/services/SecurityService.js.map +1 -1
  86. package/dist/services/TransactionService.d.ts +41 -9
  87. package/dist/services/TransactionService.js +133 -100
  88. package/dist/services/TransactionService.js.map +1 -1
  89. package/dist/services/XykService.d.ts +81 -19
  90. package/dist/services/XykService.js +451 -278
  91. package/dist/services/XykService.js.map +1 -1
  92. package/dist/util/ApiHelpers.d.ts +2 -1
  93. package/dist/util/ApiHelpers.js +57 -36
  94. package/dist/util/ApiHelpers.js.map +1 -1
  95. package/dist/util/backoff.d.ts +5 -3
  96. package/dist/util/backoff.js +35 -13
  97. package/dist/util/backoff.js.map +1 -1
  98. package/dist/util/types/BalanceServiceTypes.d.ts +25 -0
  99. package/dist/util/types/BalanceServiceTypes.js +1 -2
  100. package/dist/util/types/BaseServiceTypes.d.ts +8 -0
  101. package/dist/util/types/BaseServiceTypes.js +1 -2
  102. package/dist/util/types/GenericTypes.d.ts +21 -0
  103. package/dist/util/types/GenericTypes.js +1 -2
  104. package/dist/util/types/NftServiceTypes.d.ts +10 -2
  105. package/dist/util/types/NftServiceTypes.js +1 -2
  106. package/dist/util/types/PricingServiceTypes.d.ts +1 -14
  107. package/dist/util/types/PricingServiceTypes.js +1 -2
  108. package/dist/util/types/SecurityServiceTypes.d.ts +1 -0
  109. package/dist/util/types/SecurityServiceTypes.js +1 -2
  110. package/dist/util/types/TransactionServiceTypes.d.ts +15 -17
  111. package/dist/util/types/TransactionServiceTypes.js +1 -2
  112. package/dist/util/types/XykServiceTypes.d.ts +20 -6
  113. package/dist/util/types/XykServiceTypes.js +1 -2
  114. package/package.json +19 -4
  115. package/dist/services/Client.d.ts +0 -29
  116. package/dist/services/Client.js +0 -30
  117. package/dist/services/Client.js.map +0 -1
@@ -58,18 +58,39 @@ export interface LogEvent {
58
58
  block_height: number;
59
59
  /** * The offset is the position of the tx in the block. */
60
60
  tx_offset: number;
61
+ /** * The offset is the position of the log entry within an event log. */
61
62
  log_offset: number;
62
63
  /** * The requested transaction hash. */
63
64
  tx_hash: string;
65
+ /** * The log topics in raw data. */
64
66
  raw_log_topics: string;
65
67
  /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
66
68
  sender_contract_decimals: number;
69
+ /** * The name of the sender. */
67
70
  sender_name: string;
68
71
  sender_contract_ticker_symbol: string;
72
+ /** * The address of the sender. */
69
73
  sender_address: string;
74
+ /** * The label of the sender address. */
70
75
  sender_address_label: string;
71
76
  /** * The contract logo URL. */
72
77
  sender_logo_url: string;
78
+ /** * The log events in raw. */
73
79
  raw_log_data: string;
80
+ /** * The decoded item. */
74
81
  decoded: DecodedItem;
75
82
  }
83
+ export interface ContractMetadata {
84
+ /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
85
+ contract_decimals: number;
86
+ /** * The string returned by the `name()` method. */
87
+ contract_name: string;
88
+ /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
89
+ contract_ticker_symbol: string;
90
+ /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
91
+ contract_address: string;
92
+ /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
93
+ supports_erc: string;
94
+ /** * The contract logo URL. */
95
+ logo_url: string;
96
+ }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=GenericTypes.js.map
@@ -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
- balance24h: number;
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
- balance24h: number;
218
+ balance_24h: number;
211
219
  type: string;
212
220
  nft_data: NftData;
213
221
  }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=NftServiceTypes.js.map
@@ -1,3 +1,4 @@
1
+ import { ContractMetadata } from "./GenericTypes";
1
2
  export interface TokenPricesResponse {
2
3
  /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
3
4
  contract_decimals: number;
@@ -28,17 +29,3 @@ export interface Price {
28
29
  /** * A prettier version of the price for rendering purposes. */
29
30
  pretty_price: string;
30
31
  }
31
- export interface ContractMetadata {
32
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
33
- contract_decimals: number;
34
- /** * The string returned by the `name()` method. */
35
- contract_name: string;
36
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
37
- contract_ticker_symbol: string;
38
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
39
- contract_address: string;
40
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
41
- supports_erc: string;
42
- /** * The contract logo URL. */
43
- logo_url: string;
44
- }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=PricingServiceTypes.js.map
@@ -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;
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=SecurityServiceTypes.js.map
@@ -1,4 +1,4 @@
1
- import { LogEvent } from "./GenericTypes";
1
+ import { ContractMetadata, LogEvent } from "./GenericTypes";
2
2
  export interface TransactionResponse {
3
3
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
4
  updated_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,23 +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
- export interface ContractMetadata {
55
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
56
- contract_decimals: number;
57
- /** * The string returned by the `name()` method. */
58
- contract_name: string;
59
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
60
- contract_ticker_symbol: string;
61
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
62
- contract_address: string;
63
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
64
- supports_erc: string;
65
- /** * The contract logo URL. */
66
- logo_url: string;
67
- }
68
65
  export interface DexReport {
66
+ /** * The offset is the position of the log entry within an event log. */
69
67
  log_offset: number;
70
68
  /** * Stores the name of the protocol that facilitated the event. */
71
69
  protocol_name: string;
@@ -128,6 +126,7 @@ export interface DexReport {
128
126
  recipient: string;
129
127
  }
130
128
  export interface NftSalesReport {
129
+ /** * The offset is the position of the log entry within an event log. */
131
130
  log_offset: number;
132
131
  /** * Stores the topic event hash. All events have a unique topic event hash. */
133
132
  topic0: string;
@@ -178,6 +177,7 @@ export interface NftSalesReport {
178
177
  trade_group_type: string;
179
178
  }
180
179
  export interface LendingReport {
180
+ /** * The offset is the position of the log entry within an event log. */
181
181
  log_offset: number;
182
182
  /** * Stores the name of the lending protocol that facilitated the event. */
183
183
  protocol_name: string;
@@ -254,8 +254,6 @@ export interface RecentTransactionsResponse {
254
254
  address: string;
255
255
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
256
256
  updated_at: Date;
257
- /** * DEPRECATED */
258
- next_update_at: Date;
259
257
  /** * The requested quote currency eg: `USD`. */
260
258
  quote_currency: string;
261
259
  /** * The requested chain ID eg: `1`. */
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=TransactionServiceTypes.js.map
@@ -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
  }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=XykServiceTypes.js.map
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@covalenthq/client-sdk",
3
- "version": "0.2.8",
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/jest": "^29.5.3",
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.8";
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
- }
@@ -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.8";
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"}