@silvana-one/mina-utils 1.0.25 → 1.0.27

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@silvana-one/mina-utils",
3
3
  "description": "Silvana Mina Utils",
4
- "version": "1.0.25",
4
+ "version": "1.0.27",
5
5
  "author": "DFST",
6
6
  "bugs": "https://github.com/SilvanaOne/silvana-lib/issues",
7
7
  "dependencies": {
@@ -10,12 +10,12 @@
10
10
  "devDependencies": {
11
11
  "@types/node": "^24.0.14",
12
12
  "esbuild": "^0.25.6",
13
- "o1js": "^2.4.0",
13
+ "o1js": "2.4.0",
14
14
  "ts-node": "^10.9.2",
15
15
  "typescript": "^5.8.3"
16
16
  },
17
17
  "engines": {
18
- "node": ">=20.0.0"
18
+ "node": ">=22.0.0"
19
19
  },
20
20
  "exports": {
21
21
  "types": "./dist/node/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "license": "Apache-2.0",
48
48
  "main": "dist/web/index.js",
49
49
  "peerDependencies": {
50
- "o1js": "^2.4.0"
50
+ "o1js": "2.4.0"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
package/src/networks.ts CHANGED
@@ -5,6 +5,7 @@ export {
5
5
  Mainnet,
6
6
  Devnet,
7
7
  Zeko,
8
+ ZekoAlphaNet,
8
9
  Lightnet,
9
10
  Local,
10
11
  };
@@ -12,7 +13,13 @@ export {
12
13
  /**
13
14
  * blockchain is the type for the chain ID.
14
15
  */
15
- type blockchain = "local" | "devnet" | "lightnet" | "mainnet" | "zeko";
16
+ type blockchain =
17
+ | "local"
18
+ | "devnet"
19
+ | "lightnet"
20
+ | "mainnet"
21
+ | "zeko"
22
+ | "zeko:alphanet";
16
23
 
17
24
  /**
18
25
  * MinaNetwork is the data structure for a Mina network, keeping track of the Mina and archive endpoints, chain ID, name, account manager, explorer account URL, explorer transaction URL, and faucet.
@@ -90,15 +97,15 @@ const Zeko: MinaNetwork = {
90
97
  faucet: "https://zeko.io/faucet",
91
98
  };
92
99
 
93
- // const Zeko: MinaNetwork = {
94
- // mina: ["http://m1.zeko.io/graphql"],
95
- // archive: ["http://m1.zeko.io/graphql"],
96
- // explorerAccountUrl: "https://zekoscan.io/devnet/account/",
97
- // explorerTransactionUrl: "https://zekoscan.io/devnet/tx/",
98
- // chainId: "zeko",
99
- // name: "Zeko",
100
- // faucet: "https://zeko.io/faucet",
101
- // };
100
+ const ZekoAlphaNet: MinaNetwork = {
101
+ mina: ["http://m1.zeko.io/graphql"],
102
+ archive: ["http://m1.zeko.io/graphql"],
103
+ explorerAccountUrl: "",
104
+ explorerTransactionUrl: "",
105
+ chainId: "zeko:alphanet",
106
+ name: "Zeko AlphaNet",
107
+ faucet: "",
108
+ };
102
109
 
103
110
  const Lightnet: MinaNetwork = {
104
111
  mina: ["http://localhost:8080/graphql"],
package/src/utils/mina.ts CHANGED
@@ -70,7 +70,9 @@ function getDeployer(): Mina.TestPublicKey | undefined {
70
70
  async function initBlockchain(
71
71
  instance: blockchain,
72
72
  deployersNumber: number = 0,
73
- proofsEnabled: boolean = true
73
+ proofsEnabled: boolean = true,
74
+ customMinaNodeUrl: string | undefined = undefined,
75
+ customMinaArchiveNodeUrl: string | undefined = undefined
74
76
  ): Promise<MinaNetworkInstance> {
75
77
  /*
76
78
  if (instance === "mainnet") {
@@ -113,10 +115,12 @@ async function initBlockchain(
113
115
  mina:
114
116
  process.env.MINA_NODE_URL ??
115
117
  process.env.NEXT_PUBLIC_MINA_NODE_URL ??
118
+ customMinaNodeUrl ??
116
119
  network.mina,
117
120
  archive:
118
121
  process.env.MINA_ARCHIVE_NODE_URL ??
119
122
  process.env.NEXT_PUBLIC_MINA_ARCHIVE_NODE_URL ??
123
+ customMinaArchiveNodeUrl ??
120
124
  network.archive,
121
125
  lightnetAccountManager: network.accountManager,
122
126
  networkId: instance === "mainnet" ? "mainnet" : "testnet",