@333eco/origin-verify 0.1.4 → 0.3.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 +5 -123
- package/LICENSE-APACHE +73 -0
- package/LICENSE-CC0 +125 -0
- package/README.md +19 -1
- package/embed.mjs +13 -0
- package/index.mjs +12 -2
- package/package.json +3 -4
package/LICENSE
CHANGED
|
@@ -1,125 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
@333eco/origin-verify is offered under your choice of two licenses (SPDX: CC0-1.0 OR Apache-2.0):
|
|
2
2
|
|
|
3
|
-
CC0 1.0 Universal
|
|
3
|
+
- CC0 1.0 Universal (public domain dedication): see LICENSE-CC0
|
|
4
|
+
- Apache License 2.0: see LICENSE-APACHE
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
and governs in the event of any discrepancy with the copy below.
|
|
8
|
-
|
|
9
|
-
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
10
|
-
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
11
|
-
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
12
|
-
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
13
|
-
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
14
|
-
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
15
|
-
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
16
|
-
HEREUNDER.
|
|
17
|
-
|
|
18
|
-
Statement of Purpose
|
|
19
|
-
|
|
20
|
-
The laws of most jurisdictions throughout the world automatically confer
|
|
21
|
-
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
22
|
-
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
23
|
-
authorship and/or a database (each, a "Work").
|
|
24
|
-
|
|
25
|
-
Certain owners wish to permanently relinquish those rights to a Work for
|
|
26
|
-
the purpose of contributing to a commons of creative, cultural and
|
|
27
|
-
scientific works ("Commons") that the public can reliably and without fear
|
|
28
|
-
of later claims of infringement build upon, modify, incorporate in other
|
|
29
|
-
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
30
|
-
and for any purposes, including without limitation commercial purposes.
|
|
31
|
-
These owners may contribute to the Commons to promote the ideal of a free
|
|
32
|
-
culture and the further production of creative, cultural and scientific
|
|
33
|
-
works, or to gain reputation or greater distribution for their Work in
|
|
34
|
-
part through the use and efforts of others.
|
|
35
|
-
|
|
36
|
-
For these and/or other purposes and motivations, and without any
|
|
37
|
-
expectation of additional consideration or compensation, the person
|
|
38
|
-
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
39
|
-
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
40
|
-
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
41
|
-
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
42
|
-
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
43
|
-
|
|
44
|
-
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
45
|
-
protected by copyright and related or neighboring rights ("Copyright and
|
|
46
|
-
Related Rights"). Copyright and Related Rights include, but are not
|
|
47
|
-
limited to, the following:
|
|
48
|
-
|
|
49
|
-
i. the right to reproduce, adapt, distribute, perform, display,
|
|
50
|
-
communicate, and translate a Work;
|
|
51
|
-
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
52
|
-
iii. publicity and privacy rights pertaining to a person's image or
|
|
53
|
-
likeness depicted in a Work;
|
|
54
|
-
iv. rights protecting against unfair competition in regards to a Work,
|
|
55
|
-
subject to the limitations in paragraph 4(a), below;
|
|
56
|
-
v. rights protecting the extraction, dissemination, use and reuse of
|
|
57
|
-
data in a Work;
|
|
58
|
-
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
59
|
-
European Parliament and of the Council of 11 March 1996 on the legal
|
|
60
|
-
protection of databases, and under any national implementation
|
|
61
|
-
thereof, including any amended or successor version of such
|
|
62
|
-
directive); and
|
|
63
|
-
vii. other similar, equivalent or corresponding rights throughout the
|
|
64
|
-
world based on applicable law or treaty, and any national
|
|
65
|
-
implementations thereof.
|
|
66
|
-
|
|
67
|
-
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
68
|
-
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
69
|
-
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
70
|
-
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
71
|
-
of action, whether now known or unknown (including existing as well as
|
|
72
|
-
future claims and causes of action), in the Work (i) in all territories
|
|
73
|
-
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
74
|
-
treaty (including future time extensions), (iii) in any current or future
|
|
75
|
-
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
76
|
-
including without limitation commercial, advertising or promotional
|
|
77
|
-
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
78
|
-
member of the public at large and to the detriment of Affirmer's heirs and
|
|
79
|
-
successors, fully intending that such Waiver shall not be subject to
|
|
80
|
-
revocation, rescission, cancellation, termination, or any other legal or
|
|
81
|
-
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
82
|
-
as contemplated by Affirmer's express Statement of Purpose.
|
|
83
|
-
|
|
84
|
-
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
85
|
-
be judged legally invalid or ineffective under applicable law, then the
|
|
86
|
-
Waiver shall be preserved to the maximum extent permitted taking into
|
|
87
|
-
account Affirmer's express Statement of Purpose. In addition, to the
|
|
88
|
-
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
89
|
-
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
90
|
-
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
91
|
-
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
92
|
-
maximum duration provided by applicable law or treaty (including future
|
|
93
|
-
time extensions), (iii) in any current or future medium and for any number
|
|
94
|
-
of copies, and (iv) for any purpose whatsoever, including without
|
|
95
|
-
limitation commercial, advertising or promotional purposes (the
|
|
96
|
-
"License"). The License shall be deemed effective as of the date CC0 was
|
|
97
|
-
applied by Affirmer to the Work. Should any part of the License for any
|
|
98
|
-
reason be judged legally invalid or ineffective under applicable law, such
|
|
99
|
-
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
100
|
-
of the License, and in such case Affirmer hereby affirms that he or she
|
|
101
|
-
will not (i) exercise any of his or her remaining Copyright and Related
|
|
102
|
-
Rights in the Work or (ii) assert any associated claims and causes of
|
|
103
|
-
action with respect to the Work, in either case contrary to Affirmer's
|
|
104
|
-
express Statement of Purpose.
|
|
105
|
-
|
|
106
|
-
4. Limitations and Disclaimers.
|
|
107
|
-
|
|
108
|
-
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
109
|
-
surrendered, licensed or otherwise affected by this document.
|
|
110
|
-
b. Affirmer offers the Work as-is and makes no representations or
|
|
111
|
-
warranties of any kind concerning the Work, express, implied,
|
|
112
|
-
statutory or otherwise, including without limitation warranties of
|
|
113
|
-
title, merchantability, fitness for a particular purpose, non
|
|
114
|
-
infringement, or the absence of latent or other defects, accuracy, or
|
|
115
|
-
the present or absence of errors, whether or not discoverable, all to
|
|
116
|
-
the greatest extent permissible under applicable law.
|
|
117
|
-
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
118
|
-
that may apply to the Work or any use thereof, including without
|
|
119
|
-
limitation any person's Copyright and Related Rights in the Work.
|
|
120
|
-
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
121
|
-
consents, permissions or other rights required for any use of the
|
|
122
|
-
Work.
|
|
123
|
-
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
124
|
-
party to this document and has no duty or obligation with respect to
|
|
125
|
-
this CC0 or use of the Work.
|
|
6
|
+
Pick whichever suits you; you need follow only the one you pick. Neither grants any right in the HeartBank® or other
|
|
7
|
+
trademarks, which are not licensed here.
|
package/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
+
|
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
+
|
|
61
|
+
Copyright [yyyy] [name of copyright owner]
|
|
62
|
+
|
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
+
you may not use this file except in compliance with the License.
|
|
65
|
+
You may obtain a copy of the License at
|
|
66
|
+
|
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
+
|
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
+
See the License for the specific language governing permissions and
|
|
73
|
+
limitations under the License.
|
package/LICENSE-CC0
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
The authoritative text of this licence is published at
|
|
6
|
+
https://creativecommons.org/publicdomain/zero/1.0/legalcode
|
|
7
|
+
and governs in the event of any discrepancy with the copy below.
|
|
8
|
+
|
|
9
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
10
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
11
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
12
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
13
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
14
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
15
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
16
|
+
HEREUNDER.
|
|
17
|
+
|
|
18
|
+
Statement of Purpose
|
|
19
|
+
|
|
20
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
21
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
22
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
23
|
+
authorship and/or a database (each, a "Work").
|
|
24
|
+
|
|
25
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
26
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
27
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
28
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
29
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
30
|
+
and for any purposes, including without limitation commercial purposes.
|
|
31
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
32
|
+
culture and the further production of creative, cultural and scientific
|
|
33
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
34
|
+
part through the use and efforts of others.
|
|
35
|
+
|
|
36
|
+
For these and/or other purposes and motivations, and without any
|
|
37
|
+
expectation of additional consideration or compensation, the person
|
|
38
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
39
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
40
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
41
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
42
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
43
|
+
|
|
44
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
45
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
46
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
47
|
+
limited to, the following:
|
|
48
|
+
|
|
49
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
50
|
+
communicate, and translate a Work;
|
|
51
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
52
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
53
|
+
likeness depicted in a Work;
|
|
54
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
55
|
+
subject to the limitations in paragraph 4(a), below;
|
|
56
|
+
v. rights protecting the extraction, dissemination, use and reuse of
|
|
57
|
+
data in a Work;
|
|
58
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
59
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
60
|
+
protection of databases, and under any national implementation
|
|
61
|
+
thereof, including any amended or successor version of such
|
|
62
|
+
directive); and
|
|
63
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
64
|
+
world based on applicable law or treaty, and any national
|
|
65
|
+
implementations thereof.
|
|
66
|
+
|
|
67
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
68
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
69
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
70
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
71
|
+
of action, whether now known or unknown (including existing as well as
|
|
72
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
73
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
74
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
75
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
76
|
+
including without limitation commercial, advertising or promotional
|
|
77
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
78
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
79
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
80
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
81
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
82
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
83
|
+
|
|
84
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
85
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
86
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
87
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
88
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
89
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
90
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
91
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
92
|
+
maximum duration provided by applicable law or treaty (including future
|
|
93
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
94
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
95
|
+
limitation commercial, advertising or promotional purposes (the
|
|
96
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
97
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
98
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
99
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
100
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
101
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
102
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
103
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
104
|
+
express Statement of Purpose.
|
|
105
|
+
|
|
106
|
+
4. Limitations and Disclaimers.
|
|
107
|
+
|
|
108
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
109
|
+
surrendered, licensed or otherwise affected by this document.
|
|
110
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
111
|
+
warranties of any kind concerning the Work, express, implied,
|
|
112
|
+
statutory or otherwise, including without limitation warranties of
|
|
113
|
+
title, merchantability, fitness for a particular purpose, non
|
|
114
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
115
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
116
|
+
the greatest extent permissible under applicable law.
|
|
117
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
118
|
+
that may apply to the Work or any use thereof, including without
|
|
119
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
120
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
121
|
+
consents, permissions or other rights required for any use of the
|
|
122
|
+
Work.
|
|
123
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
124
|
+
party to this document and has no duty or obligation with respect to
|
|
125
|
+
this CC0 or use of the Work.
|
package/README.md
CHANGED
|
@@ -32,6 +32,12 @@ Four states. Each stands alone and none implies another.
|
|
|
32
32
|
|
|
33
33
|
**What a record does not say:** who imagined the work, or that one person holds one account. Without a signer's reveal it says *the operator witnessed this claim at this time and cannot later remove it*. With the reveal, *a passkey whose public key is given here signed exactly this claim*.
|
|
34
34
|
|
|
35
|
+
**Version-3 records** name their press, inside the log's signature: `press: { key: "passkey" }`, or for a key held by the B-PoH app
|
|
36
|
+
`{ key: "b-poh", unlock, shown }` (how it was unlocked; whose screen showed the words). A revealed press must carry the origin its
|
|
37
|
+
press allows: a press made in the app's own screen (`shown: "app"`) one of the trust file's `appOrigins` — none is listed yet, so such
|
|
38
|
+
a reveal is refused until the app ships — and every other press sign.333.eco's, including an app key pressed through the phone's
|
|
39
|
+
passkey sheet, whose origin the browser writes. Version-2 records read exactly as before.
|
|
40
|
+
|
|
35
41
|
## Finding a file after its metadata is gone
|
|
36
42
|
|
|
37
43
|
| field | what it is | survives |
|
|
@@ -60,6 +66,18 @@ The proof sits in a private PNG chunk or in JPEG APP9 segments. The picture isn'
|
|
|
60
66
|
- Most platforms strip or re-encode what they receive, and the proof goes with it. Then look the file up by what it still is, below.
|
|
61
67
|
- A carried proof is a snapshot. It can't say whether the signer withdrew the record later, so `verifyFile` reports `withdrawalChecked: false`. Only the log can answer that.
|
|
62
68
|
|
|
69
|
+
## A receipt inside the file
|
|
70
|
+
|
|
71
|
+
A record joins the log at its next checkpoint, so the moment a file is signed there is no proof yet, only the record, signed by the log's record key. A file can carry that:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
import { embedReceipt, verifyFile } from "@333eco/origin-verify";
|
|
75
|
+
const carried = embedReceipt(fileBytes, entry); // `entry` is the signed record; refuses one for any other file
|
|
76
|
+
const { ok, receipt } = await verifyFile(carried, trust); // ok is FALSE; receipt is { index, witnessedAt } when its signature is good
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
A receipt shows, with no network, that the log's record key signed for exactly this file, and when. It is not a proof that the record is in the log, so `ok` stays false. `embedPack` replaces it once the proof exists, and a receipt never replaces a proof.
|
|
80
|
+
|
|
63
81
|
## Honest limits
|
|
64
82
|
|
|
65
83
|
- `trust.mjs` pins the log's keys and the timestamp authorities' roots. If you got this package from somewhere you don't trust, nothing here helps. npm provenance links each version to this repository's source.
|
|
@@ -67,4 +85,4 @@ The proof sits in a private PNG chunk or in JPEG APP9 segments. The picture isn'
|
|
|
67
85
|
- A Bitcoin header proves its own work, but its height is the word of whoever supplied it. The CLI asks blockstream.info; check against your own node if it matters.
|
|
68
86
|
- It verifies. It never grades a person or a work, and it has no opinion on whether something is genuine.
|
|
69
87
|
|
|
70
|
-
CC0.
|
|
88
|
+
Your choice of CC0-1.0 or Apache-2.0 (see `LICENSE`).
|
package/embed.mjs
CHANGED
|
@@ -92,6 +92,19 @@ export function readEmbedded(bytes) {
|
|
|
92
92
|
*/
|
|
93
93
|
export function embedPack(bytes, pack) {
|
|
94
94
|
if (pack?.kind !== "b-origin-pack" || pack.entry?.t !== "record") throw new TypeError("not a B-Origin pack for a record");
|
|
95
|
+
return carry(bytes, pack);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A copy of the file with its RECEIPT inside: the signed record itself, the moment it exists, before the log's next checkpoint can prove it is there.
|
|
99
|
+
* It shows the log's record key signed for exactly this file at that time. ⛔ It is not a proof: verifyFile answers `ok: false` with a `receipt`, so
|
|
100
|
+
* nobody mistakes one for the other. embedPack replaces it when the proof exists; a receipt never replaces a proof.
|
|
101
|
+
*/
|
|
102
|
+
export function embedReceipt(bytes, entry) {
|
|
103
|
+
if (entry?.t !== "record" || typeof entry.witnessSig !== "string") throw new TypeError("not a signed record");
|
|
104
|
+
if (readEmbedded(new Uint8Array(bytes))?.pack?.kind === "b-origin-pack") throw new Error("this file already carries a proof");
|
|
105
|
+
return carry(bytes, { kind: "b-origin-receipt", v: 1, entry });
|
|
106
|
+
}
|
|
107
|
+
function carry(bytes, pack) {
|
|
95
108
|
const b = new Uint8Array(bytes), had = readEmbedded(b);
|
|
96
109
|
if (had?.damaged) throw new Error(`can't renew: ${had.damaged}`);
|
|
97
110
|
const base = had ? had.original : b;
|
package/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { checkOts, checkTimestamp } from "./clocks.mjs";
|
|
|
6
6
|
export { checkOts, checkTimestamp } from "./clocks.mjs";
|
|
7
7
|
export { hashFile, decodePng, phashOf, phashDistance } from "./media.mjs";
|
|
8
8
|
import { readEmbedded } from "./embed.mjs";
|
|
9
|
-
export { embedPack, readEmbedded } from "./embed.mjs";
|
|
9
|
+
export { embedPack, embedReceipt, readEmbedded } from "./embed.mjs";
|
|
10
10
|
|
|
11
11
|
const NODE = new Uint8Array([1]), LEAF = new Uint8Array([0]);
|
|
12
12
|
const odd = (n) => n % 2 === 1;
|
|
@@ -163,7 +163,12 @@ export async function checkReveal(entry, opening, trust) {
|
|
|
163
163
|
if (toB64u(challenge) !== entry.claimCommitment) return fail("the challenge does not bind this claim");
|
|
164
164
|
let cd;
|
|
165
165
|
try { cd = JSON.parse(text(raw.clientDataJSON)); } catch { return fail("bad client data"); }
|
|
166
|
-
|
|
166
|
+
// Version 3: the record names its press, inside the log's signature. A press made in the B-PoH app's own screen (shown "app")
|
|
167
|
+
// carries an app origin the trust file must list; every other press carries sign.333.eco's — a passkey, every version-2 record,
|
|
168
|
+
// and an app key pressed through the phone's passkey sheet (shown "site"), whose origin the browser writes.
|
|
169
|
+
const appPress = entry.v >= 3 && entry.press?.key === "b-poh" && entry.press?.shown === "app";
|
|
170
|
+
const originOk = appPress ? Array.isArray(trust.appOrigins) && trust.appOrigins.includes(cd.origin) : cd.origin === trust.webOrigin;
|
|
171
|
+
if (cd.type !== "webauthn.get" || !originOk || cd.challenge !== entry.claimCommitment) return fail("the assertion was made elsewhere or for something else");
|
|
167
172
|
const auth = raw.authenticatorData;
|
|
168
173
|
if (auth.length < 37 || !eq(auth.subarray(0, 32), sha256(utf8(trust.rpId)))) return fail("the assertion names another site");
|
|
169
174
|
if ((auth[32] & 0x05) !== 0x05) return fail("the passkey's owner was not present and verified");
|
|
@@ -388,6 +393,11 @@ export async function verifyFile(bytes, trust, opts = {}) {
|
|
|
388
393
|
const claim = found.pack?.entry?.claim;
|
|
389
394
|
if (found.pack?.entry?.t !== "record" || !claim) return { ok: false, embedded: true, why: "the proof is not for a record" };
|
|
390
395
|
if (hex(sha256(found.original)) !== claim.sha256) return { ok: false, embedded: true, why: "this proof describes a different file" };
|
|
396
|
+
if (found.pack.kind === "b-origin-receipt") {
|
|
397
|
+
// ⛔ Never ok: a receipt says the record key signed for this file, and nothing about the log. A caller that reads only `ok` is not misled.
|
|
398
|
+
if (found.pack.v !== 1 || !(await checkWitnessSignature(found.pack.entry, trust))) return { ok: false, embedded: true, why: "the receipt's signature is not the log's" };
|
|
399
|
+
return { ok: false, embedded: true, format: found.format, claim, receipt: { index: found.pack.entry.index, witnessedAt: found.pack.entry.witnessedAt }, withdrawalChecked: false, why: "a receipt: signed by the log's record key, not yet shown to be in the log" };
|
|
400
|
+
}
|
|
391
401
|
const out = await verifyPack(found.pack, trust, opts);
|
|
392
402
|
if (!out.ok) return { ...out, embedded: true };
|
|
393
403
|
return { ...out, embedded: true, format: found.format, claim, withdrawalChecked: false };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@333eco/origin-verify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Checks a B-Origin record with no help from its operator: signatures, its place in the public log, witness cosignatures, RFC 3161 tokens, OpenTimestamps proofs against Bitcoin, and a signer's reveal. Browser or Node, no runtime dependencies.",
|
|
5
|
-
"license": "CC0-1.0",
|
|
5
|
+
"license": "CC0-1.0 OR Apache-2.0",
|
|
6
6
|
"author": "Thon Ly",
|
|
7
7
|
"homepage": "https://github.com/333eco/origin-verify.333.eco#readme",
|
|
8
8
|
"repository": {
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
"embed.mjs",
|
|
36
36
|
"trust.mjs",
|
|
37
37
|
"cli.mjs",
|
|
38
|
-
"README.md"
|
|
39
|
-
],
|
|
38
|
+
"README.md", "LICENSE", "LICENSE-CC0", "LICENSE-APACHE"],
|
|
40
39
|
"bin": {
|
|
41
40
|
"origin-verify": "./cli.mjs"
|
|
42
41
|
},
|