@crisp-e3/zk-inputs 0.2.3-test → 0.4.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 +92 -123
- package/README.md +9 -6
- package/dist/index_base64.js +1 -1
- package/main.js +8 -8
- package/package.json +4 -4
package/LICENSE.md
CHANGED
|
@@ -1,102 +1,83 @@
|
|
|
1
|
-
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
-
Version 3, 29 June 2007
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007
|
|
3
2
|
|
|
4
|
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
-
|
|
6
|
-
of this license document, but changing it is not allowed.
|
|
3
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy
|
|
4
|
+
and distribute verbatim copies of this license document, but changing it is not allowed.
|
|
7
5
|
|
|
6
|
+
This version of the GNU Lesser General Public License incorporates the terms and conditions of
|
|
7
|
+
version 3 of the GNU General Public License, supplemented by the additional permissions listed
|
|
8
|
+
below.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
-
License, supplemented by the additional permissions listed below.
|
|
10
|
+
0. Additional Definitions.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the
|
|
13
|
+
"GNU GPL" refers to version 3 of the GNU General Public License.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
General Public License.
|
|
15
|
+
"The Library" refers to a covered work governed by this License, other than an Application or a
|
|
16
|
+
Combined Work as defined below.
|
|
18
17
|
|
|
19
|
-
"
|
|
20
|
-
|
|
18
|
+
An "Application" is any work that makes use of an interface provided by the Library, but which is
|
|
19
|
+
not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed
|
|
20
|
+
a mode of using an interface provided by the Library.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
-
of using an interface provided by the Library.
|
|
26
|
-
|
|
27
|
-
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
-
Application with the Library. The particular version of the Library
|
|
29
|
-
with which the Combined Work was made is also called the "Linked
|
|
22
|
+
A "Combined Work" is a work produced by combining or linking an Application with the Library. The
|
|
23
|
+
particular version of the Library with which the Combined Work was made is also called the "Linked
|
|
30
24
|
Version".
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
based on the Application, and not on the Linked Version.
|
|
26
|
+
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the
|
|
27
|
+
Combined Work, excluding any source code for portions of the Combined Work that, considered in
|
|
28
|
+
isolation, are based on the Application, and not on the Linked Version.
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Application, but excluding the System Libraries of the Combined Work.
|
|
30
|
+
The "Corresponding Application Code" for a Combined Work means the object code and/or source code
|
|
31
|
+
for the Application, including any data and utility programs needed for reproducing the Combined
|
|
32
|
+
Work from the Application, but excluding the System Libraries of the Combined Work.
|
|
41
33
|
|
|
42
|
-
|
|
34
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
You may convey a covered work under sections 3 and 4 of this License without being bound by section
|
|
37
|
+
3 of the GNU GPL.
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
2. Conveying Modified Versions.
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
facility is invoked), then you may convey a copy of the modified
|
|
53
|
-
version:
|
|
41
|
+
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or
|
|
42
|
+
data to be supplied by an Application that uses the facility (other than as an argument passed when
|
|
43
|
+
the facility is invoked), then you may convey a copy of the modified version:
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
whatever part of its purpose remains meaningful, or
|
|
45
|
+
a) under this License, provided that you make a good faith effort to ensure that, in the event an
|
|
46
|
+
Application does not supply the function or data, the facility still operates, and performs whatever
|
|
47
|
+
part of its purpose remains meaningful, or
|
|
59
48
|
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
b) under the GNU GPL, with none of the additional permissions of this License applicable to that
|
|
50
|
+
copy.
|
|
62
51
|
|
|
63
|
-
|
|
52
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
53
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(ten or fewer lines in length), you do both of the following:
|
|
54
|
+
The object code form of an Application may incorporate material from a header file that is part of
|
|
55
|
+
the Library. You may convey such object code under terms of your choice, provided that, if the
|
|
56
|
+
incorporated material is not limited to numerical parameters, data structure layouts and accessors,
|
|
57
|
+
or small macros, inline functions and templates (ten or fewer lines in length), you do both of the
|
|
58
|
+
following:
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
covered by this License.
|
|
60
|
+
a) Give prominent notice with each copy of the object code that the Library is used in it and that
|
|
61
|
+
the Library and its use are covered by this License.
|
|
75
62
|
|
|
76
|
-
|
|
77
|
-
document.
|
|
63
|
+
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
|
78
64
|
|
|
79
|
-
|
|
65
|
+
4. Combined Works.
|
|
80
66
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
engineering for debugging such modifications, if you also do each of
|
|
85
|
-
the following:
|
|
67
|
+
You may convey a Combined Work under terms of your choice that, taken together, effectively do not
|
|
68
|
+
restrict modification of the portions of the Library contained in the Combined Work and reverse
|
|
69
|
+
engineering for debugging such modifications, if you also do each of the following:
|
|
86
70
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
covered by this License.
|
|
71
|
+
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that
|
|
72
|
+
the Library and its use are covered by this License.
|
|
90
73
|
|
|
91
|
-
|
|
92
|
-
document.
|
|
74
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
|
93
75
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
copies of the GNU GPL and this license document.
|
|
76
|
+
c) For a Combined Work that displays copyright notices during execution, include the copyright
|
|
77
|
+
notice for the Library among these notices, as well as a reference directing the user to the copies
|
|
78
|
+
of the GNU GPL and this license document.
|
|
98
79
|
|
|
99
|
-
|
|
80
|
+
d) Do one of the following:
|
|
100
81
|
|
|
101
82
|
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
83
|
License, and the Corresponding Application Code in a form
|
|
@@ -113,53 +94,41 @@ the following:
|
|
|
113
94
|
of the Library that is interface-compatible with the Linked
|
|
114
95
|
Version.
|
|
115
96
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
of the GNU Lesser General Public License
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
applies to it, you have the option of following the terms and
|
|
155
|
-
conditions either of that published version or of any later version
|
|
156
|
-
published by the Free Software Foundation. If the Library as you
|
|
157
|
-
received it does not specify a version number of the GNU Lesser
|
|
158
|
-
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
-
General Public License ever published by the Free Software Foundation.
|
|
160
|
-
|
|
161
|
-
If the Library as you received it specifies that a proxy can decide
|
|
162
|
-
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
-
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
-
permanent authorization for you to choose that version for the
|
|
165
|
-
Library.
|
|
97
|
+
e) Provide Installation Information, but only if you would otherwise be required to provide such
|
|
98
|
+
information under section 6 of the GNU GPL, and only to the extent that such information is
|
|
99
|
+
necessary to install and execute a modified version of the Combined Work produced by recombining or
|
|
100
|
+
relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the
|
|
101
|
+
Installation Information must accompany the Minimal Corresponding Source and Corresponding
|
|
102
|
+
Application Code. If you use option 4d1, you must provide the Installation Information in the manner
|
|
103
|
+
specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
|
104
|
+
|
|
105
|
+
5. Combined Libraries.
|
|
106
|
+
|
|
107
|
+
You may place library facilities that are a work based on the Library side by side in a single
|
|
108
|
+
library together with other library facilities that are not Applications and are not covered by this
|
|
109
|
+
License, and convey such a combined library under terms of your choice, if you do both of the
|
|
110
|
+
following:
|
|
111
|
+
|
|
112
|
+
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with
|
|
113
|
+
any other library facilities, conveyed under the terms of this License.
|
|
114
|
+
|
|
115
|
+
b) Give prominent notice with the combined library that part of it is a work based on the Library,
|
|
116
|
+
and explaining where to find the accompanying uncombined form of the same work.
|
|
117
|
+
|
|
118
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
119
|
+
|
|
120
|
+
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General
|
|
121
|
+
Public License from time to time. Such new versions will be similar in spirit to the present
|
|
122
|
+
version, but may differ in detail to address new problems or concerns.
|
|
123
|
+
|
|
124
|
+
Each version is given a distinguishing version number. If the Library as you received it specifies
|
|
125
|
+
that a certain numbered version of the GNU Lesser General Public License "or any later version"
|
|
126
|
+
applies to it, you have the option of following the terms and conditions either of that published
|
|
127
|
+
version or of any later version published by the Free Software Foundation. If the Library as you
|
|
128
|
+
received it does not specify a version number of the GNU Lesser General Public License, you may
|
|
129
|
+
choose any version of the GNU Lesser General Public License ever published by the Free Software
|
|
130
|
+
Foundation.
|
|
131
|
+
|
|
132
|
+
If the Library as you received it specifies that a proxy can decide whether future versions of the
|
|
133
|
+
GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any
|
|
134
|
+
version is permanent authorization for you to choose that version for the Library.
|
package/README.md
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
# Wasm bundle for crisp-zk-inputs
|
|
2
2
|
|
|
3
|
-
Here we export wasm functionality for consumption in TypeScript to enable us to share code between
|
|
3
|
+
Here we export wasm functionality for consumption in TypeScript to enable us to share code between
|
|
4
|
+
Rust and TypeScript.
|
|
4
5
|
|
|
5
6
|
## Usage
|
|
6
7
|
|
|
7
|
-
This package exposes an `init` subpackage default function which should be used to universally load
|
|
8
|
+
This package exposes an `init` subpackage default function which should be used to universally load
|
|
9
|
+
the wasm module instead of exporting the default loader.
|
|
8
10
|
|
|
9
|
-
This is because in modern node there is no need for preloading however in the browser we still need
|
|
11
|
+
This is because in modern node there is no need for preloading however in the browser we still need
|
|
12
|
+
to load the wasm bundle.
|
|
10
13
|
|
|
11
14
|
### ❌ DONT USE THE DEFAULT INIT
|
|
12
15
|
|
|
13
16
|
```ts
|
|
14
17
|
// Bad! Because this uses the raw loader which doesn't exist in node contexts
|
|
15
|
-
import init, { bfvEncryptNumber } from
|
|
18
|
+
import init, { bfvEncryptNumber } from '@crisp-e3/zk-inputs'
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
### ✅ DO USE THE EXPORTED SUBMODULE
|
|
19
22
|
|
|
20
23
|
```ts
|
|
21
24
|
// Good! Use the universal loader
|
|
22
|
-
import init from
|
|
25
|
+
import init from '@crisp-e3/zk-inputs/init'
|
|
23
26
|
|
|
24
|
-
await init()
|
|
27
|
+
await init()
|
|
25
28
|
// other package imports here
|
|
26
29
|
```
|