@covalenthq/client-sdk 0.2.1 → 0.2.3
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 +7 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# covalent-api-sdk-
|
|
1
|
+
# covalent-api-sdk-ts
|
|
2
2
|
|
|
3
|
-
The Covalent API SDK
|
|
3
|
+
The Covalent API SDK supported for Typescript.
|
|
4
4
|
|
|
5
5
|
The Covalent SDK supports all chains across Mainnets and Testnets. List of supported Networks can be found on our [Supported Networks page](https://www.covalenthq.com/docs/networks/)
|
|
6
6
|
|
|
@@ -26,7 +26,11 @@ import { Client } from "@covalenthq/client-sdk";
|
|
|
26
26
|
const ApiServices = async () => {
|
|
27
27
|
const client = new Client("YOUR_API_KEY"); // Replace with your Covalent API key.
|
|
28
28
|
const resp = await client.BalanceService.getTokenBalancesForWalletAddress("eth-mainnet", "WALLET_ADDRESS"); // Example call, refer to API Docs for required paramaters or click into the method `getTokenBalancesForWalletAddress` to see the accepted parameter arguments
|
|
29
|
-
|
|
29
|
+
if (!resp.error) {
|
|
30
|
+
console.log(resp.data);
|
|
31
|
+
} else {
|
|
32
|
+
console.log(resp.error_message);
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
```
|
|
32
36
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@covalenthq/client-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"/dist"
|
|
8
8
|
],
|
|
9
|
-
"repository": "https://github.com/covalenthq/covalent-api-sdk-
|
|
9
|
+
"repository": "https://github.com/covalenthq/covalent-api-sdk-ts",
|
|
10
10
|
"author": "Covalenthq",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|