@huma-finance/permissionless-sdk 1.0.7-beta.20250915020149.2e1566e → 1.0.8-beta.20250915130422.cd6a470

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.
@@ -0,0 +1,33 @@
1
+ import { Connection, Keypair } from "@solana/web3.js";
2
+ import { PermissionlessClient, SolanaChainEnum } from "../src";
3
+ import { DepositMode } from "../src/types/metadata";
4
+ import dotenv from "dotenv";
5
+
6
+ dotenv.config();
7
+
8
+ async function main() {
9
+ const connection = new Connection(process.env.RPC_URL!);
10
+ const client = new PermissionlessClient(connection, SolanaChainEnum.DEVNET);
11
+
12
+ const key = Keypair.fromSecretKey(
13
+ new Uint8Array(JSON.parse(process.env.PRIVATE_KEY!))
14
+ );
15
+
16
+ console.log("Getting locked balance for", key.publicKey.toString());
17
+ const data = await client.getLockedBalance(
18
+ key.publicKey,
19
+ DepositMode.CLASSIC
20
+ );
21
+
22
+ console.log(data.toString());
23
+
24
+ console.log("Getting unlocked balance for", key.publicKey.toString());
25
+ const unlockedData = await client.getUnlockedBalance(
26
+ key.publicKey,
27
+ DepositMode.CLASSIC
28
+ );
29
+
30
+ console.log(unlockedData.toString());
31
+ }
32
+
33
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/permissionless-sdk",
3
- "version": "1.0.7-beta.20250915020149.2e1566e",
3
+ "version": "1.0.8-beta.20250915130422.cd6a470",
4
4
  "description": "Huma Finance Permissionless SDK for Solana",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",