@covalenthq/client-sdk 0.7.5 → 0.7.6
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 +20 -0
- package/dist/cjs/index.js +455 -357
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +2 -1
- package/dist/cjs/services/BaseService.d.ts +2 -1
- package/dist/cjs/services/CovalentClient.d.ts +4 -2
- package/dist/cjs/services/NftService.d.ts +2 -1
- package/dist/cjs/services/PricingService.d.ts +2 -1
- package/dist/cjs/services/SecurityService.d.ts +2 -1
- package/dist/cjs/services/TransactionService.d.ts +8 -4
- package/dist/cjs/services/XykService.d.ts +62 -8
- package/dist/cjs/util/ApiHelpers.d.ts +1 -1
- package/dist/cjs/util/types/XykServiceTypes.d.ts +46 -8
- package/dist/es/index.js +455 -357
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +2 -1
- package/dist/es/services/BaseService.d.ts +2 -1
- package/dist/es/services/CovalentClient.d.ts +4 -2
- package/dist/es/services/NftService.d.ts +2 -1
- package/dist/es/services/PricingService.d.ts +2 -1
- package/dist/es/services/SecurityService.d.ts +2 -1
- package/dist/es/services/TransactionService.d.ts +8 -4
- package/dist/es/services/XykService.d.ts +62 -8
- package/dist/es/util/ApiHelpers.d.ts +1 -1
- package/dist/es/util/types/XykServiceTypes.d.ts +46 -8
- package/dist/esm/index.js +455 -357
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +2 -1
- package/dist/esm/services/BaseService.d.ts +2 -1
- package/dist/esm/services/CovalentClient.d.ts +4 -2
- package/dist/esm/services/NftService.d.ts +2 -1
- package/dist/esm/services/PricingService.d.ts +2 -1
- package/dist/esm/services/SecurityService.d.ts +2 -1
- package/dist/esm/services/TransactionService.d.ts +8 -4
- package/dist/esm/services/XykService.d.ts +62 -8
- package/dist/esm/util/ApiHelpers.d.ts +1 -1
- package/dist/esm/util/types/XykServiceTypes.d.ts +46 -8
- package/dist/services/BalanceService.d.ts +2 -1
- package/dist/services/BalanceService.js +40 -33
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +2 -1
- package/dist/services/BaseService.js +66 -55
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +4 -2
- package/dist/services/CovalentClient.js +17 -17
- package/dist/services/CovalentClient.js.map +1 -1
- package/dist/services/NftService.d.ts +2 -1
- package/dist/services/NftService.js +82 -68
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.d.ts +2 -1
- package/dist/services/PricingService.js +8 -6
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.d.ts +2 -1
- package/dist/services/SecurityService.js +14 -11
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +8 -4
- package/dist/services/TransactionService.js +95 -79
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +62 -8
- package/dist/services/XykService.js +122 -78
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.d.ts +1 -1
- package/dist/util/ApiHelpers.js +6 -5
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/types/XykServiceTypes.d.ts +46 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.npmjs.com/package/@covalenthq/client-sdk">
|
|
3
|
+
<img src="https://img.shields.io/npm/v/@covalenthq/client-sdk" alt="NPM">
|
|
4
|
+
</a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@covalenthq/client-sdk">
|
|
6
|
+
<img src="https://img.shields.io/npm/dm/@covalenthq/client-sdk" alt="npm downloads">
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
# Covalent SDK for TypeScript
|
|
2
12
|
|
|
3
13
|
The Covalent SDK is the fastest way to integrate the Covalent Unified API for working with blockchain data. The SDK works with all [supported chains](https://www.covalenthq.com/docs/networks/) including Mainnets and Testnets.
|
|
@@ -297,6 +307,16 @@ const ApiServices = async () => {
|
|
|
297
307
|
|
|
298
308
|
Each endpoint is equipped with an exponential backoff algorithm that exponentially extends the wait time between retries, up to a `maximum of 5` retry attempts.
|
|
299
309
|
|
|
310
|
+
Users have the ability to control the retry feature through the enableRetry configuration setting. By default, this feature is enabled `true`. However, users can deactivate it by setting `enableRetry` to `false`.
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
import { CovalentClient, CovalentClientSettings } from "@covalenthq/client-sdk";
|
|
314
|
+
|
|
315
|
+
const settings: CovalentClientSettings = {
|
|
316
|
+
enableRetry: false
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
300
320
|
### Error Handling
|
|
301
321
|
The paginated endpoints throw an error message in this format: `An error occurred {error_code}: {error_message}`. The developer will need to `catch` these errors. Note - these endpoints do not follow the default response format which is:
|
|
302
322
|
```ts
|