@leofcoin/chain 1.7.67 → 1.7.68

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 CHANGED
@@ -1,88 +1,88 @@
1
- Creative Commons Attribution-NonCommercial 4.0 International Public License
2
-
3
- By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
4
-
5
- Section 1 – Definitions.
6
-
7
- Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
8
- Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
9
- Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
10
- Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
11
- Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
12
- Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
13
- Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
14
- Licensor means the individual(s) or entity(ies) granting rights under this Public License.
15
- NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
16
- Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
17
- Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
18
- You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
19
- Section 2 – Scope.
20
-
21
- License grant.
22
- Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
23
- reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
24
- produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
25
- Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
26
- Term. The term of this Public License is specified in Section 6(a).
27
- Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
28
- Downstream recipients.
29
- Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
30
- No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
31
- No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
32
- Other rights.
33
-
34
- Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
35
- Patent and trademark rights are not licensed under this Public License.
36
- To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
37
- Section 3 – License Conditions.
38
-
39
- Your exercise of the Licensed Rights is expressly made subject to the following conditions.
40
-
41
- Attribution.
42
-
43
- If You Share the Licensed Material (including in modified form), You must:
44
-
45
- retain the following if it is supplied by the Licensor with the Licensed Material:
46
- identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
47
- a copyright notice;
48
- a notice that refers to this Public License;
49
- a notice that refers to the disclaimer of warranties;
50
- a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
51
- indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
52
- indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
53
- You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
54
- If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
55
- If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
56
- Section 4 – Sui Generis Database Rights.
57
-
58
- Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
59
-
60
- for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
61
- if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
62
- You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
63
- For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
64
- Section 5 – Disclaimer of Warranties and Limitation of Liability.
65
-
66
- Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
67
- To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
68
- The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
69
- Section 6 – Term and Termination.
70
-
71
- This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
72
- Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
73
-
74
- automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
75
- upon express reinstatement by the Licensor.
76
- For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
77
- For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
78
- Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
79
- Section 7 – Other Terms and Conditions.
80
-
81
- The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
82
- Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
83
- Section 8 – Interpretation.
84
-
85
- For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
86
- To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
87
- No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
88
- Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
1
+ Creative Commons Attribution-NonCommercial 4.0 International Public License
2
+
3
+ By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
4
+
5
+ Section 1 – Definitions.
6
+
7
+ Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
8
+ Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
9
+ Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
10
+ Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
11
+ Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
12
+ Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
13
+ Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
14
+ Licensor means the individual(s) or entity(ies) granting rights under this Public License.
15
+ NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
16
+ Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
17
+ Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
18
+ You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
19
+ Section 2 – Scope.
20
+
21
+ License grant.
22
+ Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
23
+ reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
24
+ produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
25
+ Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
26
+ Term. The term of this Public License is specified in Section 6(a).
27
+ Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
28
+ Downstream recipients.
29
+ Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
30
+ No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
31
+ No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
32
+ Other rights.
33
+
34
+ Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
35
+ Patent and trademark rights are not licensed under this Public License.
36
+ To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
37
+ Section 3 – License Conditions.
38
+
39
+ Your exercise of the Licensed Rights is expressly made subject to the following conditions.
40
+
41
+ Attribution.
42
+
43
+ If You Share the Licensed Material (including in modified form), You must:
44
+
45
+ retain the following if it is supplied by the Licensor with the Licensed Material:
46
+ identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
47
+ a copyright notice;
48
+ a notice that refers to this Public License;
49
+ a notice that refers to the disclaimer of warranties;
50
+ a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
51
+ indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
52
+ indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
53
+ You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
54
+ If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
55
+ If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
56
+ Section 4 – Sui Generis Database Rights.
57
+
58
+ Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
59
+
60
+ for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
61
+ if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
62
+ You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
63
+ For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
64
+ Section 5 – Disclaimer of Warranties and Limitation of Liability.
65
+
66
+ Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
67
+ To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
68
+ The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
69
+ Section 6 – Term and Termination.
70
+
71
+ This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
72
+ Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
73
+
74
+ automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
75
+ upon express reinstatement by the Licensor.
76
+ For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
77
+ For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
78
+ Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
79
+ Section 7 – Other Terms and Conditions.
80
+
81
+ The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
82
+ Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
83
+ Section 8 – Interpretation.
84
+
85
+ For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
86
+ To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
87
+ No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
88
+ Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # @leofcoin/chain
2
-
3
- > JS based chain
4
-
5
- ## Flags
6
-
7
- - reachedOneZeroZero
8
-
9
- <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
1
+ # @leofcoin/chain
2
+
3
+ > JS based chain
4
+
5
+ ## Flags
6
+
7
+ - reachedOneZeroZero
8
+
9
+ <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from './node-browser-DewO13hB.js';
1
+ import { g as getDefaultExportFromCjs } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
3
3
 
4
4
  var global;
@@ -70,31 +70,31 @@ class KeyValue {
70
70
  }
71
71
  }
72
72
 
73
- if (!globalThis.DEBUG) {
74
- let DEBUG = [];
75
- if (globalThis.localStorage) {
76
- DEBUG = globalThis.localStorage.getItem('DEBUG');
77
- globalThis.DEBUG = DEBUG ? DEBUG.split(',') : [DEBUG];
78
- }
79
- }
80
-
81
- const debug$1 = (target, text) => {
82
- if (!globalThis.DEBUG && globalThis.DEBUG.length === 0) return;
83
- if (
84
- globalThis.DEBUG === 'true' ||
85
- globalThis.DEBUG === true ||
86
- globalThis.DEBUG?.indexOf(target) !== -1 ||
87
- globalThis.DEBUG?.indexOf('*') !== -1 ||
88
- globalThis.DEBUG?.indexOf(target.split('/')[0]) !== -1
89
- )
90
- if (text) console.log('\x1b[34m\x1b[1m%s', `${target}: ${text}`, '\x1b[0m');
91
- else console.log('\x1b[34m\x1b[1m%s', `${target}`, '\x1b[0m');
92
- };
93
-
94
- if (!globalThis.debug) {
95
- globalThis.debug = debug$1;
96
-
97
- globalThis.createDebugger = (target) => (text) => debug$1(target, text);
73
+ if (!globalThis.DEBUG) {
74
+ let DEBUG = [];
75
+ if (globalThis.localStorage) {
76
+ DEBUG = globalThis.localStorage.getItem('DEBUG');
77
+ globalThis.DEBUG = DEBUG ? DEBUG.split(',') : [DEBUG];
78
+ }
79
+ }
80
+
81
+ const debug$1 = (target, text) => {
82
+ if (!globalThis.DEBUG && globalThis.DEBUG.length === 0) return;
83
+ if (
84
+ globalThis.DEBUG === 'true' ||
85
+ globalThis.DEBUG === true ||
86
+ globalThis.DEBUG?.indexOf(target) !== -1 ||
87
+ globalThis.DEBUG?.indexOf('*') !== -1 ||
88
+ globalThis.DEBUG?.indexOf(target.split('/')[0]) !== -1
89
+ )
90
+ if (text) console.log('\x1b[34m\x1b[1m%s', `${target}: ${text}`, '\x1b[0m');
91
+ else console.log('\x1b[34m\x1b[1m%s', `${target}`, '\x1b[0m');
92
+ };
93
+
94
+ if (!globalThis.debug) {
95
+ globalThis.debug = debug$1;
96
+
97
+ globalThis.createDebugger = (target) => (text) => debug$1(target, text);
98
98
  }
99
99
 
100
100
  const debug = globalThis.createDebugger('leofcoin/storage');
@@ -285,8 +285,6 @@ class BrowerStore {
285
285
  for await (const cursor of this.db.values()) {
286
286
  // huh? Outdated typings?
287
287
  // @ts-ignore
288
- console.log((await cursor.getFile()).size);
289
-
290
288
  size += (await cursor.getFile()).size;
291
289
  }
292
290
  return size;
@@ -38,7 +38,7 @@ if (!globalThis.debug) {
38
38
  /**
39
39
  * The current version of Ethers.
40
40
  */
41
- const version = "6.13.2";
41
+ const version = "6.13.3";
42
42
 
43
43
  /**
44
44
  * Property helper functions.
@@ -1,4 +1,4 @@
1
- import { L as LittlePubSub } from './node-browser-DewO13hB.js';
1
+ import { L as LittlePubSub } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
3
3
 
4
4
  class Api {
@@ -209,7 +209,7 @@ class SocketRequestClient {
209
209
  const init = async () => {
210
210
  // @ts-ignore
211
211
  if (!globalThis.WebSocket && !this.#experimentalWebsocket)
212
- globalThis.WebSocket = (await import('./browser-DQJ6xf_F-D0onvbt2.js').then(function (n) { return n.b; })).default.w3cwebsocket;
212
+ globalThis.WebSocket = (await import('./browser-DQJ6xf_F-CzlYfrdl.js').then(function (n) { return n.b; })).default.w3cwebsocket;
213
213
  const client = new WebSocket(this.#url, this.#protocol);
214
214
  if (this.#experimentalWebsocket) {
215
215
  client.addEventListener('error', this.onerror);
@@ -313,7 +313,7 @@ const iceServers = [
313
313
  credential: 'openrelayproject'
314
314
  }
315
315
  ];
316
- const SimplePeer = (await import('./index-DqPlTtAJ-Bczd-x6k.js').then(function (n) { return n.i; })).default;
316
+ const SimplePeer = (await import('./index-DqPlTtAJ-5WzDhVhB.js').then(function (n) { return n.i; })).default;
317
317
  class Peer extends SimplePeer {
318
318
  peerId;
319
319
  channelName;
@@ -1,4 +1,4 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-DewO13hB.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { i as inherits_browserExports, c as commonjsGlobal, g as getDefaultExportFromCjs, r as require$$3 } from './node-browser-DewO13hB.js';
1
+ import { i as inherits_browserExports, c as commonjsGlobal, g as getDefaultExportFromCjs, r as require$$3 } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
3
3
 
4
4
  var browser$2 = {exports: {}};
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './node-browser-DewO13hB.js';
1
+ import { F as FormatInterface } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
3
3
 
4
4
  var proto$b = {
@@ -16678,7 +16678,7 @@ class Identity {
16678
16678
  this.selectedAccount = new TextDecoder().decode(selected);
16679
16679
  }
16680
16680
  else {
16681
- const importee = await import(/* webpackChunkName: "generate-account" */ './index-BeqbCwUk-DfNb2uRP.js');
16681
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-BeqbCwUk-BRCKn9cO.js');
16682
16682
  const { identity, accounts } = await importee.default(password, this.network);
16683
16683
  await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
16684
16684
  await globalThis.walletStore.put('version', String(1));
@@ -29434,7 +29434,7 @@ class Peernet {
29434
29434
  this.root = options.root;
29435
29435
  const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
29436
29436
  // FolderMessageResponse
29437
- } = await import(/* webpackChunkName: "messages" */ './messages-RYLqPGkg-Da9CI_ow.js');
29437
+ } = await import(/* webpackChunkName: "messages" */ './messages-RYLqPGkg-BjU0THWo.js');
29438
29438
  /**
29439
29439
  * proto Object containing protos
29440
29440
  * @type {Object}
@@ -29528,7 +29528,7 @@ class Peernet {
29528
29528
  if (this.#starting || this.#started)
29529
29529
  return;
29530
29530
  this.#starting = true;
29531
- const importee = await import('./client-Depp28gl-DItJEEYa.js');
29531
+ const importee = await import('./client-Depp28gl-Tg6da8wY.js');
29532
29532
  /**
29533
29533
  * @access public
29534
29534
  * @type {PeernetClient}
@@ -30037,7 +30037,7 @@ var networks = {
30037
30037
  const DEFAULT_NODE_OPTIONS = {
30038
30038
  network: 'leofcoin:peach',
30039
30039
  networkVersion: 'peach',
30040
- version: '1.2.1',
30040
+ version: '0.1.0',
30041
30041
  stars: networks.leofcoin.peach.stars
30042
30042
  };
30043
30043
 
@@ -30047,12 +30047,7 @@ class Node {
30047
30047
  constructor(config, password) {
30048
30048
  return this._init(config, password);
30049
30049
  }
30050
- async _init(config = {
30051
- network: 'leofcoin:peach',
30052
- networkVersion: 'peach',
30053
- version: '0.1.0',
30054
- stars: networks.leofcoin.peach.stars
30055
- }, password) {
30050
+ async _init(config = {}, password) {
30056
30051
  config = { ...DEFAULT_NODE_OPTIONS, ...config };
30057
30052
  this.#node = globalThis.Peernet
30058
30053
  ? await new globalThis.Peernet(config, password)
@@ -1,2 +1,2 @@
1
- export { N as default } from './node-browser-DewO13hB.js';
1
+ export { N as default } from './node-browser-DsmSaC-G.js';
2
2
  import './index-CM4QYC3g.js';
@@ -341,10 +341,10 @@ const _ = {
341
341
  }
342
342
  catch (e) {
343
343
  console.log({ e });
344
- throw new Error(`error: ${e.message}
345
- contract: ${contract}
346
- method: ${method}
347
- params: ${JSON.stringify(params, null, '\t')}
344
+ throw new Error(`error: ${e.message}
345
+ contract: ${contract}
346
+ method: ${method}
347
+ params: ${JSON.stringify(params, null, '\t')}
348
348
  `);
349
349
  }
350
350
  },
@@ -19,14 +19,14 @@ export default class Chain extends VersionControl {
19
19
  sendTransaction(transaction: any): Promise<{
20
20
  hash: any;
21
21
  data: any;
22
- fee: string | bigint | 0;
22
+ fee: any;
23
23
  wait: Promise<unknown>;
24
24
  message: any;
25
25
  }>;
26
26
  addContract(transaction: any, contractMessage: any): Promise<{
27
27
  hash: any;
28
28
  data: any;
29
- fee: string | bigint | 0;
29
+ fee: any;
30
30
  wait: Promise<unknown>;
31
31
  message: any;
32
32
  }>;
@@ -1,3 +1,9 @@
1
+ export type NodeOptions = {
2
+ network?: string;
3
+ networkVersion?: string;
4
+ version?: string;
5
+ stars?: string[];
6
+ };
1
7
  export declare const DEFAULT_NODE_OPTIONS: {
2
8
  network: string;
3
9
  networkVersion: string;
@@ -13,7 +13,7 @@ export default class Contract extends Transaction {
13
13
  * @param {Array} constructorParameters
14
14
  * @returns lib.createContractMessage
15
15
  */
16
- createContractMessage(creator: any, contract: any, constructorParameters?: any[]): Promise<import("@leofcoin/messages").ContractMessage>;
16
+ createContractMessage(creator: any, contract: any, constructorParameters?: any[]): Promise<any>;
17
17
  /**
18
18
  *
19
19
  * @param {Address} creator
@@ -31,14 +31,14 @@ export default class Contract extends Transaction {
31
31
  deployContract(signer: MultiWallet, contract: any, constructorParameters?: any[]): Promise<{
32
32
  hash: any;
33
33
  data: any;
34
- fee: string | bigint | 0;
34
+ fee: any;
35
35
  wait: Promise<unknown>;
36
36
  message: any;
37
37
  }>;
38
38
  deployContractMessage(signer: any, message: any): Promise<{
39
39
  hash: any;
40
40
  data: any;
41
- fee: string | bigint | 0;
41
+ fee: any;
42
42
  wait: Promise<unknown>;
43
43
  message: any;
44
44
  }>;
@@ -1,10 +1,6 @@
1
+ import { NodeOptions } from './constants.js';
1
2
  export default class Node {
2
3
  #private;
3
4
  constructor(config: any, password: string);
4
- _init(config: {
5
- network: string;
6
- networkVersion: string;
7
- version: string;
8
- stars: string[];
9
- }, password: string): Promise<this>;
5
+ _init(config: NodeOptions, password: string): Promise<this>;
10
6
  }
package/exports/node.d.ts CHANGED
@@ -2,11 +2,6 @@ export default class Node {
2
2
  #private;
3
3
  constructor(config: any, password: any);
4
4
  _init(config: {
5
- network: string;
6
- networkName: string;
7
- networkVersion: string;
8
- version: string;
9
- stars: string[];
10
5
  autoStart: boolean;
11
6
  }, password: any): Promise<this>;
12
7
  }
package/exports/node.js CHANGED
@@ -5,7 +5,7 @@ import networks from '@leofcoin/networks';
5
5
  const DEFAULT_NODE_OPTIONS = {
6
6
  network: 'leofcoin:peach',
7
7
  networkVersion: 'peach',
8
- version: '1.2.1',
8
+ version: '0.1.0',
9
9
  stars: networks.leofcoin.peach.stars
10
10
  };
11
11
 
@@ -17,11 +17,6 @@ class Node {
17
17
  return this._init(config, password);
18
18
  }
19
19
  async _init(config = {
20
- network: 'leofcoin:peach',
21
- networkName: 'leofcoin:peach',
22
- networkVersion: 'peach',
23
- version: '0.1.0',
24
- stars: networks.leofcoin.peach.stars,
25
20
  autoStart: false
26
21
  }, password) {
27
22
  config = { ...DEFAULT_NODE_OPTIONS, ...config };
@@ -34,7 +34,7 @@ export default class Transaction extends Protocol {
34
34
  sendTransaction(message: any): Promise<{
35
35
  hash: any;
36
36
  data: any;
37
- fee: string | bigint | 0;
37
+ fee: any;
38
38
  wait: Promise<unknown>;
39
39
  message: any;
40
40
  }>;
@@ -341,10 +341,10 @@ const _ = {
341
341
  }
342
342
  catch (e) {
343
343
  console.log({ e });
344
- throw new Error(`error: ${e.message}
345
- contract: ${contract}
346
- method: ${method}
347
- params: ${JSON.stringify(params, null, '\t')}
344
+ throw new Error(`error: ${e.message}
345
+ contract: ${contract}
346
+ method: ${method}
347
+ params: ${JSON.stringify(params, null, '\t')}
348
348
  `);
349
349
  }
350
350
  },
package/package.json CHANGED
@@ -1,80 +1,80 @@
1
- {
2
- "name": "@leofcoin/chain",
3
- "version": "1.7.67",
4
- "description": "Official javascript implementation",
5
- "private": false,
6
- "exports": {
7
- "./node": {
8
- "import": "./exports/node.js",
9
- "types": "./exports/node.d.ts"
10
- },
11
- "./chain": {
12
- "import": "./exports/chain.js",
13
- "types": "./exports/chain.d.ts"
14
- },
15
- "./browser/node": {
16
- "import": "./exports/browser/node.js",
17
- "types": "./exports/node.d.ts"
18
- },
19
- "./browser/chain": {
20
- "import": "./exports/browser/chain.js",
21
- "types": "./exports/chain.d.ts"
22
- },
23
- "./workers/machine-worker": "./exports/workers/machine-worker.js"
24
- },
25
- "type": "module",
26
- "files": [
27
- "./exports",
28
- "LICENSE.txt"
29
- ],
30
- "scripts": {
31
- "np": "np",
32
- "watch": "rollup -c -w --silent error --cache true",
33
- "prettier": "prettier src --config ./../../.prettierrc --write",
34
- "w": "rollup -c -w",
35
- "docs": "sh ./node_modules/.bin/esdoc src/chain.js",
36
- "workers": "cp ./../workers/src/** ./workers",
37
- "demo": "jsproject --serve ./ --port 5478 --open demo",
38
- "test": "node --inspect test",
39
- "pack": "webpack",
40
- "build": "rollup -c --silent error",
41
- "npm-check-updates": "npx npm-check-updates -u --install always"
42
- },
43
- "np": {
44
- "yarn": false,
45
- "contents": "."
46
- },
47
- "browserslist": "> 0.5%, last 2 versions, not dead",
48
- "keywords": [],
49
- "author": "",
50
- "license": "MIT",
51
- "devDependencies": {
52
- "@rollup/plugin-commonjs": "^28.0.0",
53
- "@rollup/plugin-json": "^6.1.0",
54
- "@rollup/plugin-node-resolve": "^15.3.0",
55
- "@rollup/plugin-typescript": "^12.1.0",
56
- "@types/semver": "^7.5.8",
57
- "@vandeurenglenn/debug": "^1.2.5",
58
- "rollup": "^4.23.0",
59
- "rollup-plugin-modify": "^3.0.0",
60
- "tape": "^5.9.0",
61
- "tslib": "^2.7.0"
62
- },
63
- "dependencies": {
64
- "@leofcoin/addresses": "^1.0.44",
65
- "@leofcoin/contracts": "^0.1.14",
66
- "@leofcoin/crypto": "^0.2.28",
67
- "@leofcoin/errors": "^1.0.23",
68
- "@leofcoin/lib": "^1.2.67",
69
- "@leofcoin/messages": "^1.4.37",
70
- "@leofcoin/multi-wallet": "^3.1.8",
71
- "@leofcoin/networks": "^1.1.22",
72
- "@leofcoin/peernet": "^1.1.80",
73
- "@leofcoin/storage": "^3.5.32",
74
- "@leofcoin/utils": "^1.1.36",
75
- "@leofcoin/workers": "^1.5.19",
76
- "@vandeurenglenn/base58": "^1.1.9",
77
- "@vandeurenglenn/easy-worker": "^1.0.2",
78
- "semver": "^7.6.3"
79
- }
80
- }
1
+ {
2
+ "name": "@leofcoin/chain",
3
+ "version": "1.7.68",
4
+ "description": "Official javascript implementation",
5
+ "private": false,
6
+ "exports": {
7
+ "./node": {
8
+ "import": "./exports/node.js",
9
+ "types": "./exports/node.d.ts"
10
+ },
11
+ "./chain": {
12
+ "import": "./exports/chain.js",
13
+ "types": "./exports/chain.d.ts"
14
+ },
15
+ "./browser/node": {
16
+ "import": "./exports/browser/node.js",
17
+ "types": "./exports/node.d.ts"
18
+ },
19
+ "./browser/chain": {
20
+ "import": "./exports/browser/chain.js",
21
+ "types": "./exports/chain.d.ts"
22
+ },
23
+ "./workers/machine-worker": "./exports/workers/machine-worker.js"
24
+ },
25
+ "type": "module",
26
+ "files": [
27
+ "./exports",
28
+ "LICENSE.txt"
29
+ ],
30
+ "scripts": {
31
+ "np": "np",
32
+ "watch": "rollup -c -w --silent error --cache true",
33
+ "prettier": "prettier src --config ./../../.prettierrc --write",
34
+ "w": "rollup -c -w",
35
+ "docs": "sh ./node_modules/.bin/esdoc src/chain.js",
36
+ "workers": "cp ./../workers/src/** ./workers",
37
+ "demo": "jsproject --serve ./ --port 5478 --open demo",
38
+ "test": "node --inspect test",
39
+ "pack": "webpack",
40
+ "build": "rollup -c --silent error",
41
+ "npm-check-updates": "npx npm-check-updates -u --install always"
42
+ },
43
+ "np": {
44
+ "yarn": false,
45
+ "contents": "."
46
+ },
47
+ "browserslist": "> 0.5%, last 2 versions, not dead",
48
+ "keywords": [],
49
+ "author": "",
50
+ "license": "MIT",
51
+ "devDependencies": {
52
+ "@rollup/plugin-commonjs": "^28.0.0",
53
+ "@rollup/plugin-json": "^6.1.0",
54
+ "@rollup/plugin-node-resolve": "^15.3.0",
55
+ "@rollup/plugin-typescript": "^12.1.0",
56
+ "@types/semver": "^7.5.8",
57
+ "@vandeurenglenn/debug": "^1.2.5",
58
+ "rollup": "^4.23.0",
59
+ "rollup-plugin-modify": "^3.0.0",
60
+ "tape": "^5.9.0",
61
+ "tslib": "^2.7.0"
62
+ },
63
+ "dependencies": {
64
+ "@leofcoin/addresses": "^1.0.44",
65
+ "@leofcoin/contracts": "^0.1.14",
66
+ "@leofcoin/crypto": "^0.2.28",
67
+ "@leofcoin/errors": "^1.0.23",
68
+ "@leofcoin/lib": "^1.2.67",
69
+ "@leofcoin/messages": "^1.4.37",
70
+ "@leofcoin/multi-wallet": "^3.1.8",
71
+ "@leofcoin/networks": "^1.1.22",
72
+ "@leofcoin/peernet": "^1.1.80",
73
+ "@leofcoin/storage": "^3.5.32",
74
+ "@leofcoin/utils": "^1.1.36",
75
+ "@leofcoin/workers": "^1.5.19",
76
+ "@vandeurenglenn/base58": "^1.1.9",
77
+ "@vandeurenglenn/easy-worker": "^1.0.2",
78
+ "semver": "^7.6.3"
79
+ }
80
+ }