@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/dist/node/index.cjs +14 -3
- package/dist/node/networks.d.ts +3 -2
- package/dist/node/networks.js +10 -10
- package/dist/node/networks.js.map +1 -1
- package/dist/node/utils/mina.d.ts +1 -1
- package/dist/node/utils/mina.js +3 -1
- package/dist/node/utils/mina.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.web.tsbuildinfo +1 -1
- package/dist/web/networks.d.ts +3 -2
- package/dist/web/networks.js +10 -10
- package/dist/web/networks.js.map +1 -1
- package/dist/web/utils/mina.d.ts +1 -1
- package/dist/web/utils/mina.js +3 -1
- package/dist/web/utils/mina.js.map +1 -1
- package/package.json +4 -4
- package/src/networks.ts +17 -10
- package/src/utils/mina.ts +5 -1
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.
|
|
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": "
|
|
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": ">=
|
|
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": "
|
|
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 =
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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",
|