@swarm-tips/client 0.4.9 → 0.4.10
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/SBOM.spdx.json +76 -174
- package/dist/auth/token-manager.d.ts +9 -0
- package/dist/auth/token-manager.js +31 -18
- package/dist/cli/lean-init.d.ts +3 -1
- package/dist/cli/lean-init.js +91 -16
- package/dist/cli/vow-verify.js +14 -9
- package/dist/contracts/generated/shillbot.d.ts +15 -3
- package/dist/contracts/idl/shillbot.json +15 -3
- package/dist/coordination-game/evm/cross-chain.d.ts +6 -0
- package/dist/coordination-game/evm/cross-chain.js +65 -15
- package/dist/inbox/client.js +3 -0
- package/dist/shillbot/api.d.ts +104 -3
- package/dist/shillbot/api.js +326 -6
- package/dist/shillbot/index.js +40 -2
- package/dist/shillbot/verify-tx.js +49 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/vow/types.d.ts +1 -1
- package/dist/vow/verify.d.ts +4 -2
- package/dist/vow/verify.js +32 -11
- package/package.json +1 -1
package/SBOM.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@swarm-tips/client-0.4.
|
|
6
|
-
"documentNamespace": "https://swarm.tips/sbom/client/0.4.
|
|
5
|
+
"name": "@swarm-tips/client-0.4.10",
|
|
6
|
+
"documentNamespace": "https://swarm.tips/sbom/client/0.4.10",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-11-
|
|
8
|
+
"created": "2026-11-27T09:27:26.689Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: sdk/client/scripts/generate-sbom.mjs",
|
|
11
11
|
"Organization: Swarm Tips"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
{
|
|
16
16
|
"name": "@swarm-tips/client",
|
|
17
17
|
"SPDXID": "SPDXRef-Package",
|
|
18
|
-
"versionInfo": "0.4.
|
|
19
|
-
"downloadLocation": "https://www.npmjs.com/package/@swarm-tips/client/v/0.4.
|
|
18
|
+
"versionInfo": "0.4.10",
|
|
19
|
+
"downloadLocation": "https://www.npmjs.com/package/@swarm-tips/client/v/0.4.10",
|
|
20
20
|
"filesAnalyzed": false,
|
|
21
21
|
"licenseConcluded": "MIT",
|
|
22
22
|
"licenseDeclared": "MIT"
|
|
@@ -75,96 +75,6 @@
|
|
|
75
75
|
"licenseConcluded": "MIT",
|
|
76
76
|
"licenseDeclared": "MIT"
|
|
77
77
|
},
|
|
78
|
-
{
|
|
79
|
-
"name": "@protobufjs/aspromise",
|
|
80
|
-
"SPDXID": "SPDXRef-Dependency-1fefb4e3e524ccd0",
|
|
81
|
-
"versionInfo": "1.1.2",
|
|
82
|
-
"downloadLocation": "NOASSERTION",
|
|
83
|
-
"filesAnalyzed": false,
|
|
84
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
85
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"name": "@protobufjs/base64",
|
|
89
|
-
"SPDXID": "SPDXRef-Dependency-cab63b986f2c84a5",
|
|
90
|
-
"versionInfo": "1.1.2",
|
|
91
|
-
"downloadLocation": "NOASSERTION",
|
|
92
|
-
"filesAnalyzed": false,
|
|
93
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
94
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "@protobufjs/codegen",
|
|
98
|
-
"SPDXID": "SPDXRef-Dependency-b40479418843f026",
|
|
99
|
-
"versionInfo": "2.0.4",
|
|
100
|
-
"downloadLocation": "NOASSERTION",
|
|
101
|
-
"filesAnalyzed": false,
|
|
102
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
103
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "@protobufjs/eventemitter",
|
|
107
|
-
"SPDXID": "SPDXRef-Dependency-2a3467c29eb77b94",
|
|
108
|
-
"versionInfo": "1.1.0",
|
|
109
|
-
"downloadLocation": "NOASSERTION",
|
|
110
|
-
"filesAnalyzed": false,
|
|
111
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
112
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "@protobufjs/fetch",
|
|
116
|
-
"SPDXID": "SPDXRef-Dependency-f7239b33540cac40",
|
|
117
|
-
"versionInfo": "1.1.0",
|
|
118
|
-
"downloadLocation": "NOASSERTION",
|
|
119
|
-
"filesAnalyzed": false,
|
|
120
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
121
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "@protobufjs/float",
|
|
125
|
-
"SPDXID": "SPDXRef-Dependency-73d40770bec3b939",
|
|
126
|
-
"versionInfo": "1.0.2",
|
|
127
|
-
"downloadLocation": "NOASSERTION",
|
|
128
|
-
"filesAnalyzed": false,
|
|
129
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
130
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"name": "@protobufjs/inquire",
|
|
134
|
-
"SPDXID": "SPDXRef-Dependency-f838b625ce767919",
|
|
135
|
-
"versionInfo": "1.1.0",
|
|
136
|
-
"downloadLocation": "NOASSERTION",
|
|
137
|
-
"filesAnalyzed": false,
|
|
138
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
139
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"name": "@protobufjs/path",
|
|
143
|
-
"SPDXID": "SPDXRef-Dependency-c09274e296946685",
|
|
144
|
-
"versionInfo": "1.1.2",
|
|
145
|
-
"downloadLocation": "NOASSERTION",
|
|
146
|
-
"filesAnalyzed": false,
|
|
147
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
148
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "@protobufjs/pool",
|
|
152
|
-
"SPDXID": "SPDXRef-Dependency-ce165d6d460f3b69",
|
|
153
|
-
"versionInfo": "1.1.0",
|
|
154
|
-
"downloadLocation": "NOASSERTION",
|
|
155
|
-
"filesAnalyzed": false,
|
|
156
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
157
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "@protobufjs/utf8",
|
|
161
|
-
"SPDXID": "SPDXRef-Dependency-f46f396f972cb1a9",
|
|
162
|
-
"versionInfo": "1.1.0",
|
|
163
|
-
"downloadLocation": "NOASSERTION",
|
|
164
|
-
"filesAnalyzed": false,
|
|
165
|
-
"licenseConcluded": "BSD-3-Clause",
|
|
166
|
-
"licenseDeclared": "BSD-3-Clause"
|
|
167
|
-
},
|
|
168
78
|
{
|
|
169
79
|
"name": "@solana/buffer-layout",
|
|
170
80
|
"SPDXID": "SPDXRef-Dependency-36ab218a9d39fbdd",
|
|
@@ -282,6 +192,15 @@
|
|
|
282
192
|
"licenseConcluded": "MIT",
|
|
283
193
|
"licenseDeclared": "MIT"
|
|
284
194
|
},
|
|
195
|
+
{
|
|
196
|
+
"name": "agent-base",
|
|
197
|
+
"SPDXID": "SPDXRef-Dependency-90b79cd8f1f67d4f",
|
|
198
|
+
"versionInfo": "6.0.2",
|
|
199
|
+
"downloadLocation": "NOASSERTION",
|
|
200
|
+
"filesAnalyzed": false,
|
|
201
|
+
"licenseConcluded": "MIT",
|
|
202
|
+
"licenseDeclared": "MIT"
|
|
203
|
+
},
|
|
285
204
|
{
|
|
286
205
|
"name": "agentkeepalive",
|
|
287
206
|
"SPDXID": "SPDXRef-Dependency-740deb0abaad0736",
|
|
@@ -302,8 +221,8 @@
|
|
|
302
221
|
},
|
|
303
222
|
{
|
|
304
223
|
"name": "axios",
|
|
305
|
-
"SPDXID": "SPDXRef-Dependency-
|
|
306
|
-
"versionInfo": "1.
|
|
224
|
+
"SPDXID": "SPDXRef-Dependency-3300393249dd0eb4",
|
|
225
|
+
"versionInfo": "1.21.1",
|
|
307
226
|
"downloadLocation": "NOASSERTION",
|
|
308
227
|
"filesAnalyzed": false,
|
|
309
228
|
"licenseConcluded": "MIT",
|
|
@@ -471,6 +390,15 @@
|
|
|
471
390
|
"licenseConcluded": "MIT",
|
|
472
391
|
"licenseDeclared": "MIT"
|
|
473
392
|
},
|
|
393
|
+
{
|
|
394
|
+
"name": "debug",
|
|
395
|
+
"SPDXID": "SPDXRef-Dependency-6390bf853aed627e",
|
|
396
|
+
"versionInfo": "4.4.3",
|
|
397
|
+
"downloadLocation": "NOASSERTION",
|
|
398
|
+
"filesAnalyzed": false,
|
|
399
|
+
"licenseConcluded": "MIT",
|
|
400
|
+
"licenseDeclared": "MIT"
|
|
401
|
+
},
|
|
474
402
|
{
|
|
475
403
|
"name": "decimal.js",
|
|
476
404
|
"SPDXID": "SPDXRef-Dependency-3048c2985ef8cae5",
|
|
@@ -599,8 +527,8 @@
|
|
|
599
527
|
},
|
|
600
528
|
{
|
|
601
529
|
"name": "follow-redirects",
|
|
602
|
-
"SPDXID": "SPDXRef-Dependency-
|
|
603
|
-
"versionInfo": "1.16.
|
|
530
|
+
"SPDXID": "SPDXRef-Dependency-85d05a4055406a55",
|
|
531
|
+
"versionInfo": "1.16.3",
|
|
604
532
|
"downloadLocation": "NOASSERTION",
|
|
605
533
|
"filesAnalyzed": false,
|
|
606
534
|
"licenseConcluded": "MIT",
|
|
@@ -608,8 +536,8 @@
|
|
|
608
536
|
},
|
|
609
537
|
{
|
|
610
538
|
"name": "form-data",
|
|
611
|
-
"SPDXID": "SPDXRef-Dependency-
|
|
612
|
-
"versionInfo": "4.0.
|
|
539
|
+
"SPDXID": "SPDXRef-Dependency-f78599f94cbc9921",
|
|
540
|
+
"versionInfo": "4.0.6",
|
|
613
541
|
"downloadLocation": "NOASSERTION",
|
|
614
542
|
"filesAnalyzed": false,
|
|
615
543
|
"licenseConcluded": "MIT",
|
|
@@ -678,6 +606,24 @@
|
|
|
678
606
|
"licenseConcluded": "MIT",
|
|
679
607
|
"licenseDeclared": "MIT"
|
|
680
608
|
},
|
|
609
|
+
{
|
|
610
|
+
"name": "hasown",
|
|
611
|
+
"SPDXID": "SPDXRef-Dependency-ba2e3a5fbd1028da",
|
|
612
|
+
"versionInfo": "2.0.4",
|
|
613
|
+
"downloadLocation": "NOASSERTION",
|
|
614
|
+
"filesAnalyzed": false,
|
|
615
|
+
"licenseConcluded": "MIT",
|
|
616
|
+
"licenseDeclared": "MIT"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "https-proxy-agent",
|
|
620
|
+
"SPDXID": "SPDXRef-Dependency-acdc336da538f649",
|
|
621
|
+
"versionInfo": "5.0.1",
|
|
622
|
+
"downloadLocation": "NOASSERTION",
|
|
623
|
+
"filesAnalyzed": false,
|
|
624
|
+
"licenseConcluded": "MIT",
|
|
625
|
+
"licenseDeclared": "MIT"
|
|
626
|
+
},
|
|
681
627
|
{
|
|
682
628
|
"name": "humanize-ms",
|
|
683
629
|
"SPDXID": "SPDXRef-Dependency-34e5d376545fd68c",
|
|
@@ -797,8 +743,8 @@
|
|
|
797
743
|
},
|
|
798
744
|
{
|
|
799
745
|
"name": "protobufjs",
|
|
800
|
-
"SPDXID": "SPDXRef-Dependency-
|
|
801
|
-
"versionInfo": "
|
|
746
|
+
"SPDXID": "SPDXRef-Dependency-6d4416de76e186b0",
|
|
747
|
+
"versionInfo": "8.8.1",
|
|
802
748
|
"downloadLocation": "NOASSERTION",
|
|
803
749
|
"filesAnalyzed": false,
|
|
804
750
|
"licenseConcluded": "BSD-3-Clause",
|
|
@@ -950,17 +896,8 @@
|
|
|
950
896
|
},
|
|
951
897
|
{
|
|
952
898
|
"name": "ws",
|
|
953
|
-
"SPDXID": "SPDXRef-Dependency-
|
|
954
|
-
"versionInfo": "
|
|
955
|
-
"downloadLocation": "NOASSERTION",
|
|
956
|
-
"filesAnalyzed": false,
|
|
957
|
-
"licenseConcluded": "MIT",
|
|
958
|
-
"licenseDeclared": "MIT"
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
"name": "ws",
|
|
962
|
-
"SPDXID": "SPDXRef-Dependency-ac06eeb5565dab8c",
|
|
963
|
-
"versionInfo": "8.20.0",
|
|
899
|
+
"SPDXID": "SPDXRef-Dependency-d250ffc75a805ad5",
|
|
900
|
+
"versionInfo": "8.21.3",
|
|
964
901
|
"downloadLocation": "NOASSERTION",
|
|
965
902
|
"filesAnalyzed": false,
|
|
966
903
|
"licenseConcluded": "MIT",
|
|
@@ -1012,56 +949,6 @@
|
|
|
1012
949
|
"relationshipType": "DEPENDS_ON",
|
|
1013
950
|
"relatedSpdxElement": "SPDXRef-Dependency-8b95304023ea3287"
|
|
1014
951
|
},
|
|
1015
|
-
{
|
|
1016
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1017
|
-
"relationshipType": "DEPENDS_ON",
|
|
1018
|
-
"relatedSpdxElement": "SPDXRef-Dependency-1fefb4e3e524ccd0"
|
|
1019
|
-
},
|
|
1020
|
-
{
|
|
1021
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1022
|
-
"relationshipType": "DEPENDS_ON",
|
|
1023
|
-
"relatedSpdxElement": "SPDXRef-Dependency-cab63b986f2c84a5"
|
|
1024
|
-
},
|
|
1025
|
-
{
|
|
1026
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1027
|
-
"relationshipType": "DEPENDS_ON",
|
|
1028
|
-
"relatedSpdxElement": "SPDXRef-Dependency-b40479418843f026"
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1032
|
-
"relationshipType": "DEPENDS_ON",
|
|
1033
|
-
"relatedSpdxElement": "SPDXRef-Dependency-2a3467c29eb77b94"
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1037
|
-
"relationshipType": "DEPENDS_ON",
|
|
1038
|
-
"relatedSpdxElement": "SPDXRef-Dependency-f7239b33540cac40"
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1042
|
-
"relationshipType": "DEPENDS_ON",
|
|
1043
|
-
"relatedSpdxElement": "SPDXRef-Dependency-73d40770bec3b939"
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1047
|
-
"relationshipType": "DEPENDS_ON",
|
|
1048
|
-
"relatedSpdxElement": "SPDXRef-Dependency-f838b625ce767919"
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1052
|
-
"relationshipType": "DEPENDS_ON",
|
|
1053
|
-
"relatedSpdxElement": "SPDXRef-Dependency-c09274e296946685"
|
|
1054
|
-
},
|
|
1055
|
-
{
|
|
1056
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1057
|
-
"relationshipType": "DEPENDS_ON",
|
|
1058
|
-
"relatedSpdxElement": "SPDXRef-Dependency-ce165d6d460f3b69"
|
|
1059
|
-
},
|
|
1060
|
-
{
|
|
1061
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1062
|
-
"relationshipType": "DEPENDS_ON",
|
|
1063
|
-
"relatedSpdxElement": "SPDXRef-Dependency-f46f396f972cb1a9"
|
|
1064
|
-
},
|
|
1065
952
|
{
|
|
1066
953
|
"spdxElementId": "SPDXRef-Package",
|
|
1067
954
|
"relationshipType": "DEPENDS_ON",
|
|
@@ -1127,6 +1014,11 @@
|
|
|
1127
1014
|
"relationshipType": "DEPENDS_ON",
|
|
1128
1015
|
"relatedSpdxElement": "SPDXRef-Dependency-ee1128304b54dc39"
|
|
1129
1016
|
},
|
|
1017
|
+
{
|
|
1018
|
+
"spdxElementId": "SPDXRef-Package",
|
|
1019
|
+
"relationshipType": "DEPENDS_ON",
|
|
1020
|
+
"relatedSpdxElement": "SPDXRef-Dependency-90b79cd8f1f67d4f"
|
|
1021
|
+
},
|
|
1130
1022
|
{
|
|
1131
1023
|
"spdxElementId": "SPDXRef-Package",
|
|
1132
1024
|
"relationshipType": "DEPENDS_ON",
|
|
@@ -1140,7 +1032,7 @@
|
|
|
1140
1032
|
{
|
|
1141
1033
|
"spdxElementId": "SPDXRef-Package",
|
|
1142
1034
|
"relationshipType": "DEPENDS_ON",
|
|
1143
|
-
"relatedSpdxElement": "SPDXRef-Dependency-
|
|
1035
|
+
"relatedSpdxElement": "SPDXRef-Dependency-3300393249dd0eb4"
|
|
1144
1036
|
},
|
|
1145
1037
|
{
|
|
1146
1038
|
"spdxElementId": "SPDXRef-Package",
|
|
@@ -1232,6 +1124,11 @@
|
|
|
1232
1124
|
"relationshipType": "DEPENDS_ON",
|
|
1233
1125
|
"relatedSpdxElement": "SPDXRef-Dependency-a20c045c29ed2b3d"
|
|
1234
1126
|
},
|
|
1127
|
+
{
|
|
1128
|
+
"spdxElementId": "SPDXRef-Package",
|
|
1129
|
+
"relationshipType": "DEPENDS_ON",
|
|
1130
|
+
"relatedSpdxElement": "SPDXRef-Dependency-6390bf853aed627e"
|
|
1131
|
+
},
|
|
1235
1132
|
{
|
|
1236
1133
|
"spdxElementId": "SPDXRef-Package",
|
|
1237
1134
|
"relationshipType": "DEPENDS_ON",
|
|
@@ -1305,12 +1202,12 @@
|
|
|
1305
1202
|
{
|
|
1306
1203
|
"spdxElementId": "SPDXRef-Package",
|
|
1307
1204
|
"relationshipType": "DEPENDS_ON",
|
|
1308
|
-
"relatedSpdxElement": "SPDXRef-Dependency-
|
|
1205
|
+
"relatedSpdxElement": "SPDXRef-Dependency-85d05a4055406a55"
|
|
1309
1206
|
},
|
|
1310
1207
|
{
|
|
1311
1208
|
"spdxElementId": "SPDXRef-Package",
|
|
1312
1209
|
"relationshipType": "DEPENDS_ON",
|
|
1313
|
-
"relatedSpdxElement": "SPDXRef-Dependency-
|
|
1210
|
+
"relatedSpdxElement": "SPDXRef-Dependency-f78599f94cbc9921"
|
|
1314
1211
|
},
|
|
1315
1212
|
{
|
|
1316
1213
|
"spdxElementId": "SPDXRef-Package",
|
|
@@ -1347,6 +1244,16 @@
|
|
|
1347
1244
|
"relationshipType": "DEPENDS_ON",
|
|
1348
1245
|
"relatedSpdxElement": "SPDXRef-Dependency-ace41f4c3d63ecdc"
|
|
1349
1246
|
},
|
|
1247
|
+
{
|
|
1248
|
+
"spdxElementId": "SPDXRef-Package",
|
|
1249
|
+
"relationshipType": "DEPENDS_ON",
|
|
1250
|
+
"relatedSpdxElement": "SPDXRef-Dependency-ba2e3a5fbd1028da"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"spdxElementId": "SPDXRef-Package",
|
|
1254
|
+
"relationshipType": "DEPENDS_ON",
|
|
1255
|
+
"relatedSpdxElement": "SPDXRef-Dependency-acdc336da538f649"
|
|
1256
|
+
},
|
|
1350
1257
|
{
|
|
1351
1258
|
"spdxElementId": "SPDXRef-Package",
|
|
1352
1259
|
"relationshipType": "DEPENDS_ON",
|
|
@@ -1415,7 +1322,7 @@
|
|
|
1415
1322
|
{
|
|
1416
1323
|
"spdxElementId": "SPDXRef-Package",
|
|
1417
1324
|
"relationshipType": "DEPENDS_ON",
|
|
1418
|
-
"relatedSpdxElement": "SPDXRef-Dependency-
|
|
1325
|
+
"relatedSpdxElement": "SPDXRef-Dependency-6d4416de76e186b0"
|
|
1419
1326
|
},
|
|
1420
1327
|
{
|
|
1421
1328
|
"spdxElementId": "SPDXRef-Package",
|
|
@@ -1500,12 +1407,7 @@
|
|
|
1500
1407
|
{
|
|
1501
1408
|
"spdxElementId": "SPDXRef-Package",
|
|
1502
1409
|
"relationshipType": "DEPENDS_ON",
|
|
1503
|
-
"relatedSpdxElement": "SPDXRef-Dependency-
|
|
1504
|
-
},
|
|
1505
|
-
{
|
|
1506
|
-
"spdxElementId": "SPDXRef-Package",
|
|
1507
|
-
"relationshipType": "DEPENDS_ON",
|
|
1508
|
-
"relatedSpdxElement": "SPDXRef-Dependency-ac06eeb5565dab8c"
|
|
1410
|
+
"relatedSpdxElement": "SPDXRef-Dependency-d250ffc75a805ad5"
|
|
1509
1411
|
},
|
|
1510
1412
|
{
|
|
1511
1413
|
"spdxElementId": "SPDXRef-Package",
|
|
@@ -8,6 +8,15 @@ export interface WalletTokenManagerOptions {
|
|
|
8
8
|
fetch?: FetchLike;
|
|
9
9
|
now?: () => number;
|
|
10
10
|
}
|
|
11
|
+
/** Canonical server-issued auth challenge nonce format (`hex::encode([u8; 32])`, P2-25). */
|
|
12
|
+
export declare const AUTH_CHALLENGE_NONCE_RE: RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* Validate a server-supplied auth challenge nonce before signing it.
|
|
15
|
+
* Rejects arbitrary strings (such as `swarm-attr-v1:...` referral messages or
|
|
16
|
+
* crafted off-chain authorizations) so a compromised API cannot turn wallet
|
|
17
|
+
* login into a blind-signing oracle.
|
|
18
|
+
*/
|
|
19
|
+
export declare function validateAuthChallengeNonce(nonce: unknown, operation: string): string;
|
|
11
20
|
/**
|
|
12
21
|
* Non-custodial JWT manager backed by `game-api` wallet challenges:
|
|
13
22
|
* - Solana: `POST /auth/challenge` + `POST /auth/verify` (Ed25519 detached bs58)
|
|
@@ -17,6 +17,31 @@ function parseJwtClaims(token) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
const DEFAULT_OPAQUE_TTL_MS = 23 * 60 * 60 * 1_000;
|
|
20
|
+
/** Canonical server-issued auth challenge nonce format (`hex::encode([u8; 32])`, P2-25). */
|
|
21
|
+
export const AUTH_CHALLENGE_NONCE_RE = /^[0-9a-f]{64}$/;
|
|
22
|
+
/**
|
|
23
|
+
* Validate a server-supplied auth challenge nonce before signing it.
|
|
24
|
+
* Rejects arbitrary strings (such as `swarm-attr-v1:...` referral messages or
|
|
25
|
+
* crafted off-chain authorizations) so a compromised API cannot turn wallet
|
|
26
|
+
* login into a blind-signing oracle.
|
|
27
|
+
*/
|
|
28
|
+
export function validateAuthChallengeNonce(nonce, operation) {
|
|
29
|
+
if (typeof nonce !== "string" || nonce.length === 0) {
|
|
30
|
+
throw new SwarmClientError({
|
|
31
|
+
code: "INVALID_RESPONSE",
|
|
32
|
+
operation,
|
|
33
|
+
message: "Auth challenge returned no nonce",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (!AUTH_CHALLENGE_NONCE_RE.test(nonce)) {
|
|
37
|
+
throw new SwarmClientError({
|
|
38
|
+
code: "INVALID_RESPONSE",
|
|
39
|
+
operation,
|
|
40
|
+
message: "Auth challenge nonce must be 64 lowercase hex characters; refusing to sign arbitrary payload",
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return nonce;
|
|
44
|
+
}
|
|
20
45
|
/**
|
|
21
46
|
* Non-custodial JWT manager backed by `game-api` wallet challenges:
|
|
22
47
|
* - Solana: `POST /auth/challenge` + `POST /auth/verify` (Ed25519 detached bs58)
|
|
@@ -109,17 +134,11 @@ export class WalletTokenManager {
|
|
|
109
134
|
const challenge = await this.http.post("/auth/challenge", {
|
|
110
135
|
wallet: signer.address,
|
|
111
136
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
code: "INVALID_RESPONSE",
|
|
115
|
-
operation: "auth.challenge",
|
|
116
|
-
message: "Auth challenge returned no nonce",
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
const sigBytes = await signer.signMessage(new TextEncoder().encode(challenge.nonce));
|
|
137
|
+
const nonce = validateAuthChallengeNonce(challenge?.nonce, "auth.challenge");
|
|
138
|
+
const sigBytes = await signer.signMessage(new TextEncoder().encode(nonce));
|
|
120
139
|
const verified = await this.http.post("/auth/verify", {
|
|
121
140
|
wallet: signer.address,
|
|
122
|
-
nonce
|
|
141
|
+
nonce,
|
|
123
142
|
signature: bs58.encode(sigBytes),
|
|
124
143
|
});
|
|
125
144
|
if (!verified?.token) {
|
|
@@ -135,17 +154,11 @@ export class WalletTokenManager {
|
|
|
135
154
|
const challenge = await this.http.post("/auth/evm/challenge", {
|
|
136
155
|
wallet: signer.address,
|
|
137
156
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
code: "INVALID_RESPONSE",
|
|
141
|
-
operation: "auth.evmChallenge",
|
|
142
|
-
message: "EVM auth challenge returned no nonce",
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
const signature = await signer.signMessage(challenge.nonce);
|
|
157
|
+
const nonce = validateAuthChallengeNonce(challenge?.nonce, "auth.evmChallenge");
|
|
158
|
+
const signature = await signer.signMessage(nonce);
|
|
146
159
|
const verified = await this.http.post("/auth/evm/verify", {
|
|
147
160
|
wallet: signer.address,
|
|
148
|
-
nonce
|
|
161
|
+
nonce,
|
|
149
162
|
signature,
|
|
150
163
|
});
|
|
151
164
|
if (!verified?.token) {
|
package/dist/cli/lean-init.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export declare function extractLeanWorkspaceSpec(task: Record<string, unknown>,
|
|
|
34
34
|
export declare function buildLeanWorkspaceFiles(task: Record<string, unknown>, taskId: string): Record<string, string>;
|
|
35
35
|
/**
|
|
36
36
|
* Materialize a Lean 4 prover workspace on disk. Refuses to overwrite any
|
|
37
|
-
* existing non-empty target file unless `force === true
|
|
37
|
+
* existing non-empty target file unless `force === true`, and unconditionally
|
|
38
|
+
* refuses symbolic links (live or dangling) at the target directory or any
|
|
39
|
+
* destination file path even when `force === true`.
|
|
38
40
|
*/
|
|
39
41
|
export declare function scaffoldLeanWorkspace(task: Record<string, unknown>, taskId: string, targetDir: string, force?: boolean): ScaffoldLeanWorkspaceResult;
|
package/dist/cli/lean-init.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { closeSync, constants as fsConstants, lstatSync, mkdirSync, openSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
import { CliUsageError } from "./keyfile.js";
|
|
4
4
|
export const DEFAULT_LEAN_TOOLCHAINS = {
|
|
@@ -10,6 +10,11 @@ export const DEFAULT_LEAN_TOOLCHAINS = {
|
|
|
10
10
|
export const DEFAULT_MATHLIB_REV_V2_V3 = "c5ea00351c28e24afc9f0f84379aa41082b1188f";
|
|
11
11
|
export const DEFAULT_MATHLIB_REV_V4 = "51e6992efd06126df61a496bebf8f49482a4e129";
|
|
12
12
|
export const DEFAULT_ZETA23_REV_V4 = "3635e74826a4c1fcece7d1cd2b6fa75e43a00510";
|
|
13
|
+
const LEAN_TOOLCHAIN_RE = /^leanprover\/lean4:v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$/;
|
|
14
|
+
const GIT_COMMIT_SHA_RE = /^[0-9a-f]{40}$/;
|
|
15
|
+
const TASK_ID_RE = /^[A-Za-z0-9:._-]{1,128}$/;
|
|
16
|
+
const MODE_RE = /^[a-z0-9_-]{1,32}$/;
|
|
17
|
+
const IMPORT_IDENT_RE = /^[A-Za-z0-9_.]+$/;
|
|
13
18
|
function parsePositiveIntDirective(statementLean, key) {
|
|
14
19
|
const re = new RegExp(`^\\s*--\\s*swarm:${key}\\s*=\\s*(\\d+)\\s*$`, "m");
|
|
15
20
|
const match = re.exec(statementLean);
|
|
@@ -26,13 +31,21 @@ function asLeanEnv(value) {
|
|
|
26
31
|
? value
|
|
27
32
|
: undefined;
|
|
28
33
|
}
|
|
29
|
-
function nonEmptyString(value) {
|
|
30
|
-
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
|
|
31
|
-
}
|
|
32
34
|
function positiveInt(value) {
|
|
33
35
|
return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : undefined;
|
|
34
36
|
}
|
|
37
|
+
function validateOptionalPattern(value, pattern, field, description) {
|
|
38
|
+
if (value === undefined || value === null)
|
|
39
|
+
return undefined;
|
|
40
|
+
if (typeof value !== "string" || !pattern.test(value)) {
|
|
41
|
+
throw new CliUsageError(`Invalid ${field} in task metadata: expected ${description}.`);
|
|
42
|
+
}
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
35
45
|
export function extractLeanWorkspaceSpec(task, taskId) {
|
|
46
|
+
if (typeof taskId !== "string" || !TASK_ID_RE.test(taskId)) {
|
|
47
|
+
throw new CliUsageError(`Invalid task_id "${String(taskId)}": expected 1-128 characters matching [A-Za-z0-9:._-].`);
|
|
48
|
+
}
|
|
36
49
|
if (task.platform !== 10) {
|
|
37
50
|
throw new CliUsageError(`Task "${taskId}" is not a LeanProof task (platform=${String(task.platform)}, expected 10).`);
|
|
38
51
|
}
|
|
@@ -42,27 +55,39 @@ export function extractLeanWorkspaceSpec(task, taskId) {
|
|
|
42
55
|
}
|
|
43
56
|
const env = asLeanEnv(task.lean_environment);
|
|
44
57
|
const rawPolicy = positiveInt(env?.lean_policy) ?? positiveInt(task.lean_policy) ?? 1;
|
|
45
|
-
const leanToolchain =
|
|
58
|
+
const leanToolchain = validateOptionalPattern(env?.lean_toolchain, LEAN_TOOLCHAIN_RE, "lean_toolchain", "official leanprover/lean4:v<major>.<minor>.<patch>[-rc<N>] toolchain") ??
|
|
46
59
|
DEFAULT_LEAN_TOOLCHAINS[rawPolicy] ??
|
|
47
60
|
DEFAULT_LEAN_TOOLCHAINS[1];
|
|
48
61
|
const defaultMode = rawPolicy === 4 ? "composable" : rawPolicy === 2 || rawPolicy === 3 ? "mathlib" : "self-contained";
|
|
49
|
-
const mode =
|
|
62
|
+
const mode = validateOptionalPattern(env?.mode, MODE_RE, "mode", "1-32 characters matching [a-z0-9_-]") ?? defaultMode;
|
|
50
63
|
const defaultImports = rawPolicy === 4
|
|
51
64
|
? ["Mathlib", "Zeta23", "SwarmProofs"]
|
|
52
65
|
: rawPolicy === 2 || rawPolicy === 3
|
|
53
66
|
? ["Mathlib"]
|
|
54
67
|
: [];
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
let importAllowlist;
|
|
69
|
+
if (env?.import_allowlist !== undefined && env?.import_allowlist !== null) {
|
|
70
|
+
if (!Array.isArray(env.import_allowlist)) {
|
|
71
|
+
throw new CliUsageError("Invalid import_allowlist in task metadata: expected array of Lean module names.");
|
|
72
|
+
}
|
|
73
|
+
importAllowlist = env.import_allowlist.map((item) => {
|
|
74
|
+
if (typeof item !== "string" || !IMPORT_IDENT_RE.test(item)) {
|
|
75
|
+
throw new CliUsageError(`Invalid import_allowlist entry "${String(item)}": expected Lean module identifier matching [A-Za-z0-9_.]+.`);
|
|
76
|
+
}
|
|
77
|
+
return item;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
importAllowlist = defaultImports;
|
|
82
|
+
}
|
|
83
|
+
const mathlibRev = validateOptionalPattern(env?.mathlib_rev, GIT_COMMIT_SHA_RE, "mathlib_rev", "40-character lowercase hex git commit SHA") ??
|
|
59
84
|
(rawPolicy === 4
|
|
60
85
|
? DEFAULT_MATHLIB_REV_V4
|
|
61
86
|
: rawPolicy === 2 || rawPolicy === 3
|
|
62
87
|
? DEFAULT_MATHLIB_REV_V2_V3
|
|
63
88
|
: undefined);
|
|
64
|
-
const zeta23Rev =
|
|
65
|
-
const swarmProofsRev =
|
|
89
|
+
const zeta23Rev = validateOptionalPattern(env?.zeta23_rev, GIT_COMMIT_SHA_RE, "zeta23_rev", "40-character lowercase hex git commit SHA") ?? (rawPolicy === 4 ? DEFAULT_ZETA23_REV_V4 : undefined);
|
|
90
|
+
const swarmProofsRev = validateOptionalPattern(env?.swarm_proofs_rev, GIT_COMMIT_SHA_RE, "swarm_proofs_rev", "40-character lowercase hex git commit SHA");
|
|
66
91
|
const allowsDisproof = typeof env?.allows_disproof === "boolean"
|
|
67
92
|
? env.allows_disproof
|
|
68
93
|
: hasBidirectionalDirective(statementLean);
|
|
@@ -191,19 +216,64 @@ export function buildLeanWorkspaceFiles(task, taskId) {
|
|
|
191
216
|
"README.md": buildReadmeMd(spec),
|
|
192
217
|
};
|
|
193
218
|
}
|
|
219
|
+
function safeLstat(path) {
|
|
220
|
+
try {
|
|
221
|
+
return lstatSync(path);
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
if (err?.code === "ENOENT")
|
|
225
|
+
return undefined;
|
|
226
|
+
throw err;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function writeFileNoFollow(dest, content) {
|
|
230
|
+
const noFollow = fsConstants.O_NOFOLLOW ?? 0;
|
|
231
|
+
const flags = fsConstants.O_WRONLY | fsConstants.O_CREAT | fsConstants.O_TRUNC | noFollow;
|
|
232
|
+
let fd;
|
|
233
|
+
try {
|
|
234
|
+
fd = openSync(dest, flags, 0o644);
|
|
235
|
+
}
|
|
236
|
+
catch (err) {
|
|
237
|
+
const code = err?.code;
|
|
238
|
+
if (code === "ELOOP" || code === "EMLINK") {
|
|
239
|
+
throw new CliUsageError(`Refusing to write through symbolic link at ${dest}.`);
|
|
240
|
+
}
|
|
241
|
+
throw err;
|
|
242
|
+
}
|
|
243
|
+
try {
|
|
244
|
+
writeFileSync(fd, content, "utf8");
|
|
245
|
+
}
|
|
246
|
+
finally {
|
|
247
|
+
closeSync(fd);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
194
250
|
/**
|
|
195
251
|
* Materialize a Lean 4 prover workspace on disk. Refuses to overwrite any
|
|
196
|
-
* existing non-empty target file unless `force === true
|
|
252
|
+
* existing non-empty target file unless `force === true`, and unconditionally
|
|
253
|
+
* refuses symbolic links (live or dangling) at the target directory or any
|
|
254
|
+
* destination file path even when `force === true`.
|
|
197
255
|
*/
|
|
198
256
|
export function scaffoldLeanWorkspace(task, taskId, targetDir, force = false) {
|
|
199
257
|
const spec = extractLeanWorkspaceSpec(task, taskId);
|
|
200
258
|
const files = buildLeanWorkspaceFiles(task, taskId);
|
|
201
259
|
const resolvedDir = resolve(targetDir);
|
|
260
|
+
const dirStat = safeLstat(resolvedDir);
|
|
261
|
+
if (dirStat) {
|
|
262
|
+
if (dirStat.isSymbolicLink()) {
|
|
263
|
+
throw new CliUsageError(`Refusing to scaffold into symbolic link directory: ${resolvedDir}.`);
|
|
264
|
+
}
|
|
265
|
+
if (!dirStat.isDirectory()) {
|
|
266
|
+
throw new CliUsageError(`Target path exists and is not a directory: ${resolvedDir}.`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
202
269
|
const existingNonEmpty = [];
|
|
203
270
|
for (const relName of Object.keys(files)) {
|
|
204
271
|
const dest = join(resolvedDir, relName);
|
|
205
|
-
|
|
206
|
-
|
|
272
|
+
const stat = safeLstat(dest);
|
|
273
|
+
if (stat) {
|
|
274
|
+
if (stat.isSymbolicLink()) {
|
|
275
|
+
throw new CliUsageError(`Refusing to write through symbolic link target file: ${dest}.`);
|
|
276
|
+
}
|
|
207
277
|
if (stat.isDirectory() || stat.size > 0) {
|
|
208
278
|
existingNonEmpty.push(relName);
|
|
209
279
|
}
|
|
@@ -215,7 +285,12 @@ export function scaffoldLeanWorkspace(task, taskId, targetDir, force = false) {
|
|
|
215
285
|
mkdirSync(resolvedDir, { recursive: true });
|
|
216
286
|
const written = [];
|
|
217
287
|
for (const [relName, content] of Object.entries(files)) {
|
|
218
|
-
|
|
288
|
+
const dest = join(resolvedDir, relName);
|
|
289
|
+
const postStat = safeLstat(dest);
|
|
290
|
+
if (postStat?.isSymbolicLink()) {
|
|
291
|
+
throw new CliUsageError(`Refusing to write through symbolic link target file: ${dest}.`);
|
|
292
|
+
}
|
|
293
|
+
writeFileNoFollow(dest, content);
|
|
219
294
|
written.push(relName);
|
|
220
295
|
}
|
|
221
296
|
return {
|