@openfort/openfort-node 0.7.0 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfort/openfort-node",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Openfort Node SDK",
5
5
  "author": "Openfort",
6
6
  "repository": {
@@ -59,7 +59,7 @@
59
59
  "@changesets/cli": "^2.29.7",
60
60
  "@vitest/coverage-v8": "^3.0.0",
61
61
  "knip": "^5.70.1",
62
- "orval": "^7.6.0",
62
+ "orval": "^7.18.0",
63
63
  "publint": "^0.2.12",
64
64
  "simple-git-hooks": "^2.13.1",
65
65
  "tsup": "^8.5.1",
@@ -1,29 +0,0 @@
1
- // Usage: npx tsx contracts/readContract.ts
2
-
3
- import Openfort from "@openfort/openfort-node";
4
- import "dotenv/config";
5
-
6
- const openfort = new Openfort(process.env.OPENFORT_API_KEY!, {
7
- basePath: process.env.OPENFORT_BASE_URL,
8
- });
9
-
10
- const chainId = Number(process.env.CHAIN_ID) || 80002;
11
-
12
- // Create a contract reference first
13
- const contract = await openfort.contracts.create({
14
- name: "ERC20 Token",
15
- chainId,
16
- address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", // USDC on Polygon
17
- });
18
-
19
- console.log("Contract ID:", contract.id);
20
-
21
- // Read contract data (e.g., totalSupply)
22
- const result = await openfort.contracts.read(contract.id, {
23
- functionName: "totalSupply",
24
- functionArgs: [],
25
- });
26
-
27
- console.log("\nContract read result:");
28
- console.log(" Function: totalSupply");
29
- console.log(" Result:", result.result);