@tinycloudlabs/node-sdk-wasm 1.0.0

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/LICENSE.md ADDED
@@ -0,0 +1,320 @@
1
+ # TinyCloud Ecosystem General Public License (EGPL) v1.5
2
+
3
+ License text copyright (c) 2026 TinyCloud Labs. Based on the Ethereum General Public License v1.5.
4
+ Original EGPL copyright © 2025 [Lighthouse Labs](https://lighthouse.cx). All rights reserved.
5
+
6
+ ## Parameters
7
+
8
+ **Licensor:** TinyCloud Labs
9
+
10
+ **Licensed Work:** TinyCloud Protocol
11
+ The Licensed Work is © 2026 TinyCloud Labs
12
+
13
+ **Additional Use Grant:** Integration testing and development use
14
+
15
+ **Transition Date:** 2030-01-01, or if not specified, the fourth anniversary of the first publicly available distribution of this version
16
+
17
+ **Transition License:** AGPL-3.0-or-later
18
+
19
+ **TinyCloud Network:** The TinyCloud ecosystem encompasses decentralized storage protocols,
20
+ user-owned data namespace systems, and platforms utilizing decentralized
21
+ identifiers (DIDs), delegation chains, and object capability (OCAP)
22
+ authorization models for secure, user-controlled data management.
23
+
24
+
25
+ **TinyCloud-Aligned:** Any system that stores data within TinyCloud namespaces, uses TinyCloud's
26
+ DID-based authentication, or integrates with TinyCloud's delegation and
27
+ capability system for authorization.
28
+
29
+
30
+ ## Core Terms
31
+
32
+ The Licensor grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work for any purpose.
33
+
34
+ Before the Transition Date, production use is permitted only:
35
+
36
+ - By the Licensor;
37
+ - By parties explicitly authorized in writing by the Licensor;
38
+ - As specified in the Additional Use Grant above; or
39
+ - Under a separate commercial license from the Licensor.
40
+
41
+ On the Transition Date, the Licensed Work automatically becomes available under the Transition License. Additionally, production use on the TinyCloud Network and TinyCloud-Aligned Networks becomes freely permitted (subject to copyleft requirements in Section 3).
42
+
43
+ At all times (before and after the Transition Date), production use on Non-TinyCloud-Aligned Networks (networks that do not meet the TinyCloud-Aligned criteria) requires a separate commercial license from the Licensor.
44
+
45
+ Production use generating more than 100000 USD in annual recurring revenue requires a commercial license from the Licensor, regardless of TinyCloud alignment status.
46
+
47
+ All copies and derivative works must retain this License. If you deploy the Licensed Work where third parties can interact with it over a network, you must make the complete source code available under this License.
48
+
49
+ Any use in violation of this License automatically terminates your rights for all versions of the Licensed Work.
50
+
51
+ This License does not grant rights to trademarks, logos, or tokens associated with the Licensor or TinyCloud.
52
+
53
+ **TO THE EXTENT PERMITTED BY LAW, THE LICENSED WORK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, AND THE LICENSOR SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING FROM USE OF THE LICENSED WORK.**
54
+
55
+ ## Detailed Provisions
56
+
57
+ ### 1. Definitions
58
+
59
+ **"Licensed Work"** means the software (source code and object code) and documentation specified in the Parameters section above, made available under this License.
60
+
61
+ **"Licensor"** means the copyright holder specified in the Parameters section.
62
+
63
+ **"TinyCloud Network"** means The TinyCloud ecosystem encompasses decentralized storage protocols,
64
+ user-owned data namespace systems, and platforms utilizing decentralized
65
+ identifiers (DIDs), delegation chains, and object capability (OCAP)
66
+ authorization models for secure, user-controlled data management.
67
+ .
68
+
69
+ **"TinyCloud-Aligned Network"** means Any system that stores data within TinyCloud namespaces, uses TinyCloud's
70
+ DID-based authentication, or integrates with TinyCloud's delegation and
71
+ capability system for authorization.
72
+ .
73
+
74
+ **"Non-TinyCloud-Aligned Network"** means Systems that provide similar functionality for decentralized storage,
75
+ namespace management, or DID-based authorization that do not integrate
76
+ with or contribute to the TinyCloud ecosystem.
77
+ .
78
+
79
+ **"Production Use"** means any use of the Licensed Work to:
80
+
81
+ - Provide services to third parties
82
+ - Validate or execute transactions on a public network
83
+ - Operate publicly accessible infrastructure
84
+ - Generate revenue or operate in a live commercial environment
85
+ - Deploy smart contracts, validators, nodes, or applications that external parties interact with or rely upon
86
+
87
+ **Non-Production Use** includes internal testing, development, security auditing, academic research, or experimentation not made available to third parties and not used for revenue generation.
88
+
89
+ **"Transition Date"** means the date specified in the Parameters section, or if none is specified, the fourth anniversary of the first publicly available distribution of this specific version of the Licensed Work. Each version may have its own Transition Date, which may be updated by the Licensor to an earlier date but not a later date beyond four years from initial release.
90
+
91
+ **"Transition License"** means the license specified in the Parameters section (typically AGPL-3.0-or-later) that will govern the Licensed Work on and after the Transition Date.
92
+
93
+ **"Additional Use Grant"** means any specific production uses explicitly permitted before the Transition Date, as defined in the Parameters section or in a separate document referenced therein.
94
+
95
+ ### 2. Grant of Rights
96
+
97
+ #### 2.1 Non-Production Rights
98
+
99
+ Subject to compliance with this License, the Licensor grants you a worldwide, royalty-free, non-exclusive license to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work in any environment or on any network.
100
+
101
+ #### 2.2 Production Use Before Transition Date
102
+
103
+ Before the Transition Date, Production Use of the Licensed Work is permitted only if you meet one of the following conditions:
104
+
105
+ - You are the Licensor; or
106
+ - You have written authorization from the Licensor explicitly granting you Production Use rights; or
107
+ - Your use falls within the Additional Use Grant specified in the Parameters section; or
108
+ - You have obtained a commercial license from the Licensor for such Production Use.
109
+
110
+ Any Production Use not meeting these conditions before the Transition Date is prohibited and constitutes a material breach of this License.
111
+
112
+ #### 2.3 Additional Use Grant Mechanism
113
+
114
+ The Licensor may specify an Additional Use Grant in the Parameters section to permit certain limited production uses before the Transition Date without requiring individual authorization. Such grants might include:
115
+
116
+ - Non-commercial production use on TinyCloud or aligned networks
117
+ - Production use by specified categories of users (e.g., researchers, non-profits)
118
+ - Beta testing by approved testers
119
+ - Use by ecosystem partners or grant recipients
120
+ - Other uses defined at a URL, ENS name, or in a separate document
121
+
122
+ If the Additional Use Grant field states "None," no additional production uses are permitted beyond those authorized directly by the Licensor.
123
+
124
+ #### 2.4 Rights Upon Transition Date
125
+
126
+ Effective on the Transition Date:
127
+
128
+ - **Transition License Applies:** The Licensed Work becomes available under the Transition License specified in the Parameters section, and you may exercise all rights granted by that license.
129
+ - **TinyCloud-Aligned Production Use:** You may make Production Use of the Licensed Work on the TinyCloud Network and TinyCloud-Aligned Networks without restriction, royalty, or commercial license, subject to the copyleft requirements in Section 3.
130
+ - **Prior Restrictions Lifted:** The early-stage production restrictions in Section 2.2 cease to apply, except as noted in Sections 2.5 and 2.6.
131
+
132
+ #### 2.5 Non-TinyCloud-Aligned Network Restriction (Permanent)
133
+
134
+ At all times, both before and after the Transition Date, Production Use on Non-TinyCloud-Aligned Networks requires a separate commercial license from the Licensor.
135
+
136
+ The Transition Date conversion does not grant rights to deploy the Licensed Work on Non-TinyCloud-Aligned Networks. Such use requires explicit commercial licensing regardless of when it occurs.
137
+
138
+ #### 2.6 Revenue Threshold
139
+
140
+ Production use generating more than 100000 USD in annual recurring revenue requires a commercial license from the Licensor, regardless of TinyCloud alignment status.
141
+
142
+ #### 2.7 Version-Specific Licensing
143
+
144
+ This License applies separately to each version of the Licensed Work released by the Licensor. Different versions may have different Transition Dates, Additional Use Grants, or other terms as specified in their respective Parameters sections. The Transition Date for one version does not affect the license terms for other versions.
145
+
146
+ ### 3. Copyleft and Source Code Requirements
147
+
148
+ #### 3.1 License Preservation
149
+
150
+ All copies, modifications, and derivative works of the Licensed Work must be distributed under this License (before the Transition Date) or the Transition License (after the Transition Date). You must retain all copyright, license, and attribution notices present in the Licensed Work.
151
+
152
+ #### 3.2 Network Use as Distribution
153
+
154
+ Making the Licensed Work available for third parties to interact with over a network constitutes distribution under this License, even if no copy is directly transferred. This includes deploying smart contracts, operating blockchain nodes, running validators, or providing network services based on the Licensed Work.
155
+
156
+ #### 3.3 Source Code Disclosure
157
+
158
+ Whenever you distribute or deploy the Licensed Work (including through network deployment), you must make the complete corresponding source code available to all users/recipients under this License's terms. The source code must be:
159
+
160
+ - **Complete:** Include all source files, build scripts, configuration, and dependencies needed to compile and run the software
161
+ - **Accessible:** Published in a readily accessible location (e.g., public repository)
162
+ - **Timely:** Available simultaneously with or before the deployment
163
+ - **Unobfuscated:** Not protected by technical measures that prevent study or modification
164
+ - **Under This License:** Available under this License's terms (before Transition Date) or Transition License terms (after Transition Date)
165
+
166
+ Failure to provide source code as required is a material breach resulting in immediate license termination.
167
+
168
+ #### 3.4 Modifications and Derivative Works
169
+
170
+ Any modifications or derivative works you create must also be licensed under this License (or the Transition License after the Transition Date). You may not distribute or deploy modified versions under proprietary or incompatible terms.
171
+
172
+ You are encouraged (though not required before the Transition Date) to contribute improvements back to the original project or the TinyCloud community.
173
+
174
+ ### 4. Transition Date and License Transition
175
+
176
+ #### 4.1 Automatic Conversion
177
+
178
+ On the Transition Date specified in the Parameters section, the Licensed Work automatically becomes available under the Transition License. From that date forward, the Transition License governs use of the Licensed Work, and the production restrictions in Section 2.2 cease to apply.
179
+
180
+ The Non-TinyCloud-Aligned Network restriction in Section 2.5 and the Revenue Threshold in Section 2.6 persist as separate commercial licensing arrangements at the Licensor's discretion.
181
+
182
+ #### 4.2 No Retroactive Effect
183
+
184
+ Conversion to the Transition License does not retroactively excuse violations that occurred before the Transition Date. The Licensor retains all rights to pursue remedies for prior breaches.
185
+
186
+ #### 4.3 Earlier Transition Date
187
+
188
+ The Licensor may specify an earlier Transition Date at any time by updating the Parameters section or publishing a notice at a referenced URL/ENS name. The Licensor cannot extend the Transition Date beyond four years from initial release.
189
+
190
+ ### 5. Patent Grant
191
+
192
+ #### 5.1 License Grant
193
+
194
+ The Licensor grants you a worldwide, royalty-free, non-exclusive patent license under the Licensor's patent claims that are necessarily infringed by using or modifying the Licensed Work as permitted by this License.
195
+
196
+ #### 5.2 Patent Retaliation
197
+
198
+ If you initiate patent litigation against the Licensor, any contributor to the Licensed Work, or any user of the Licensed Work alleging that the Licensed Work infringes your patents, all patent licenses granted to you under this License immediately terminate.
199
+
200
+ ### 6. Termination
201
+
202
+ #### 6.1 Automatic Termination
203
+
204
+ Your rights under this License automatically terminate immediately if you:
205
+
206
+ - Make Production Use before the Transition Date without authorization (Section 2.2)
207
+ - Deploy on a Non-TinyCloud-Aligned Network without a commercial license (Section 2.5)
208
+ - Exceed the Revenue Threshold without a commercial license (Section 2.6)
209
+ - Fail to provide source code as required (Section 3.3)
210
+ - Violate any other material term of this License
211
+
212
+ Termination applies to all versions of the Licensed Work licensed to you.
213
+
214
+ #### 6.2 No Cure Period
215
+
216
+ Terminated rights are not automatically restored. Restoration requires explicit written reinstatement from the Licensor. Ceasing the violation does not restore your rights.
217
+
218
+ #### 6.3 Downstream Recipients
219
+
220
+ Your termination does not affect rights of downstream recipients who are in compliance with the License, as they receive their license directly from the Licensor.
221
+
222
+ ### 7. Warranty Disclaimer
223
+
224
+ THE LICENSED WORK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSOR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
225
+
226
+ You use the Licensed Work at your own risk and are solely responsible for determining its appropriateness for your purposes.
227
+
228
+ ### 8. Limitation of Liability
229
+
230
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSOR SHALL NOT BE LIABLE FOR ANY DAMAGES (INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, OR EXEMPLARY DAMAGES) ARISING FROM THIS LICENSE OR USE OF THE LICENSED WORK, even if advised of possible damages.
231
+
232
+ This includes but is not limited to: loss of profits, data, funds, tokens, or digital assets; business interruption; security vulnerabilities; or regulatory consequences.
233
+
234
+ Some jurisdictions do not allow liability exclusions; in such cases, liability is limited to the fullest extent permitted by law.
235
+
236
+ ### 9. Indemnification
237
+
238
+ You agree to indemnify and hold harmless the Licensor and contributors from all claims, damages, and expenses (including attorneys' fees) arising from:
239
+
240
+ - Your use, modification, or distribution of the Licensed Work
241
+ - Your violation of this License
242
+ - Your violation of third-party rights
243
+
244
+ ### 10. Miscellaneous
245
+
246
+ #### 10.1 No Trademark Rights
247
+
248
+ This License does not grant rights to use trademarks, logos, or brand names of the Licensor or TinyCloud. You may not imply endorsement by the Licensor or the TinyCloud community.
249
+
250
+ This License does not grant rights to any tokens or cryptocurrencies associated with the Licensed Work or TinyCloud.
251
+
252
+ #### 10.2 No Sublicensing
253
+
254
+ You may not sublicense the Licensed Work. Recipients receive their license directly from the Licensor under this License's terms.
255
+
256
+ #### 10.3 Entire Agreement
257
+
258
+ This License (together with any commercial license you obtain) constitutes the entire agreement regarding the Licensed Work.
259
+
260
+ #### 10.4 Severability
261
+
262
+ If any provision is unenforceable, it shall be reformed to the minimum extent necessary, and all other provisions remain in effect.
263
+
264
+ #### 10.5 No Waiver
265
+
266
+ Failure to enforce any provision does not waive future enforcement rights. Waivers must be in writing signed by the Licensor.
267
+
268
+ #### 10.6 Governing Law
269
+
270
+ This License is governed by the laws of the jurisdiction in which the Licensor is incorporated, without regard to conflicts of law principles.
271
+
272
+ #### 10.7 Export Compliance
273
+
274
+ You are responsible for complying with all export laws and regulations. You represent that you are not in a jurisdiction where export is prohibited.
275
+
276
+ #### 10.8 Conspicuous Display
277
+
278
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work from a third party, this License applies to your use of that work.
279
+
280
+ #### 10.9 License Text Reuse
281
+
282
+ Others may use this License text for their own works, provided they:
283
+
284
+ - Do not alter the substantive terms, alignment provisions, or copyleft requirements
285
+ - Replace Parameters section placeholders with their own details
286
+ - Specify an OSI-approved Transition License and a Transition Date within four years
287
+ - Use an appropriate name that reflects the ecosystem they are targeting
288
+
289
+ ## Covenants of Licensor
290
+
291
+ In consideration of the right to use this License text, Licensor covenants to all recipients of the Licensed Work:
292
+
293
+ - To specify as the Transition License either AGPL-3.0-or-later or another OSI-approved license compatible with AGPL v3, where "compatible" means software under the Transition License can be combined with software under AGPL v3 or later versions.
294
+ - To either: (a) specify an Additional Use Grant that does not impose restrictions beyond this License, or (b) specify "None" if no additional production uses are granted before the Transition Date.
295
+ - To specify a Transition Date within four years of initial release.
296
+ - Not to modify the substantive protections, requirements, or structure of this License in ways that would defeat its purpose of protecting ecosystem alignment while ensuring eventual open-source release.
297
+
298
+ ## Notice
299
+
300
+ This License is not an Open Source license as defined by the Open Source Initiative (OSI) during its initial term before the Transition Date. However, the Licensed Work will automatically become available under an Open Source license (the Transition License) on the Transition Date, as stated in this License.
301
+
302
+ This License is designed to protect software development for the TinyCloud ecosystem from parasitic use and commercial extraction by non-aligned networks, while ensuring the software eventually enters the open commons for all to use freely.
303
+
304
+ ---
305
+
306
+ **END OF LICENSE**
307
+
308
+ ---
309
+
310
+ ## Attribution
311
+
312
+ This software is licensed under the TinyCloud Ecosystem General Public License (EGPL),
313
+ based on the Ethereum General Public License by Lighthouse Labs.
314
+ See LICENSE.md for full terms.
315
+
316
+
317
+ This license is derived from the Ethereum General Public License (EGPL) v1.5 by Lighthouse Labs.
318
+ Original EGPL: Ethereum General Public License (EGPL) v1.5
319
+
320
+ For more information, visit [Lighthouse Labs](https://lighthouse.cx).
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @tinycloudlabs/node-sdk-wasm
3
+ *
4
+ * TinyCloud WASM bindings for Node.js environments.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ export * from "../../../node-sdk-wasm/tinycloud_web_sdk_rs.js";
9
+ export { TCWSessionManager, prepareSession, completeSessionSetup, invoke, makeSpaceId, ensureEip55, signEthereumMessage, signSecp256k1, initPanicHook, exportKey, importKey, importKeyFromEnvValue, generateHostSIWEMessage, siweToDelegationHeaders, createDelegation, protocolVersion, } from "../../../node-sdk-wasm/tinycloud_web_sdk_rs.js";
10
+ export type { HostConfig, Session, SessionConfig, SiweConfig, } from "../../../node-sdk-wasm/tinycloud_web_sdk_rs.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,qBAAqB,EAErB,uBAAuB,EACvB,uBAAuB,EAEvB,gBAAgB,EAEhB,eAAe,GAChB,MAAM,gDAAgD,CAAC;AAGxD,YAAY,EACV,UAAU,EACV,OAAO,EACP,aAAa,EACb,UAAU,GACX,MAAM,gDAAgD,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @tinycloudlabs/node-sdk-wasm
3
+ *
4
+ * TinyCloud WASM bindings for Node.js environments.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ // Re-export everything from the Node.js WASM build
9
+ export * from "../../../node-sdk-wasm/tinycloud_web_sdk_rs.js";
10
+ // Also export common utilities directly for convenience
11
+ export { TCWSessionManager, prepareSession, completeSessionSetup, invoke, makeSpaceId, ensureEip55, signEthereumMessage, signSecp256k1, initPanicHook, exportKey, importKey, importKeyFromEnvValue,
12
+ // Space hosting
13
+ generateHostSIWEMessage, siweToDelegationHeaders,
14
+ // Delegation creation
15
+ createDelegation,
16
+ // Protocol version
17
+ protocolVersion, } from "../../../node-sdk-wasm/tinycloud_web_sdk_rs.js";
18
+ // Note: CreateDelegationWasmParams and CreateDelegationWasmResult types are available
19
+ // from @tinycloudlabs/sdk-core for TypeScript consumers
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mDAAmD;AACnD,cAAc,gDAAgD,CAAC;AAE/D,wDAAwD;AACxD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,qBAAqB;AACrB,gBAAgB;AAChB,uBAAuB,EACvB,uBAAuB;AACvB,sBAAsB;AACtB,gBAAgB;AAChB,mBAAmB;AACnB,eAAe,GAChB,MAAM,gDAAgD,CAAC;AAUxD,sFAAsF;AACtF,wDAAwD"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@tinycloudlabs/node-sdk-wasm",
3
+ "version": "1.0.0",
4
+ "description": "TinyCloud WASM bindings for Node.js",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "author": "TinyCloud, Inc.",
9
+ "license": "EGPL",
10
+ "engines": {
11
+ "node": ">=18"
12
+ },
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "clean": "rm -rf dist"
16
+ },
17
+ "dependencies": {
18
+ "@tinycloudlabs/sdk-rs": "^1.0.0"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^20",
22
+ "typescript": "^5.7.0"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/tinycloudlabs/web-sdk"
30
+ }
31
+ }