@xyo-network/sdk-protocol 7.2.3 → 7.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Jason Dreyzehner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ export * from '@xyo-network/sdk-protocol-core/elliptic/workerd';
2
+ //# sourceMappingURL=workerd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workerd.d.ts","sourceRoot":"","sources":["../../../src/elliptic/workerd.ts"],"names":[],"mappings":"AACA,cAAc,iDAAiD,CAAA"}
@@ -0,0 +1 @@
1
+ export * from '@xyo-network/sdk-protocol-core/elliptic/workerd';
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/modules/elliptic/workerd/index.ts"],
4
+ "sourcesContent": ["// Generated by xy monolith layout sync (package-sync-layout) \u2014 do not edit by hand.\nexport * from '@xyo-network/sdk-protocol-core/elliptic/workerd'\n"],
5
+ "mappings": ";AACA,cAAc;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  (() => {
3
- // ../../node_modules/.pnpm/@ariestools+threads@8.1.6_@opentelemetry+api@1.9.1_observable-fns@0.6.1_zod@4.4.3/node_modules/@ariestools/threads/dist/browser/worker/worker.browser.mjs
3
+ // ../../node_modules/.pnpm/@ariestools+threads@8.1.9_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@7.2.0_zod@4.4.3/node_modules/@ariestools/threads/dist/browser/worker/worker.browser.mjs
4
4
  var DefaultErrorSerializer = {
5
5
  deserialize: (message) => {
6
6
  const error = Object.create(Error.prototype);
@@ -1372,7 +1372,7 @@
1372
1372
  }
1373
1373
  };
1374
1374
 
1375
- // ../../node_modules/.pnpm/@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3/node_modules/@ariestools/sdk/dist/browser/index.mjs
1375
+ // ../../node_modules/.pnpm/@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3/node_modules/@ariestools/sdk/dist/browser/index.mjs
1376
1376
  var __defProp = Object.defineProperty;
1377
1377
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1378
1378
  var __decorateClass = (decorators, target, key, kind) => {
@@ -1500,6 +1500,9 @@
1500
1500
  cause: error
1501
1501
  });
1502
1502
  }
1503
+ function fetchDefault(input, init) {
1504
+ return globalThis.fetch(input, init);
1505
+ }
1503
1506
  async function gzipString(body) {
1504
1507
  const blob = new Blob([body]);
1505
1508
  const stream = blob.stream().pipeThrough(new CompressionStream("gzip"));
@@ -1507,21 +1510,25 @@
1507
1510
  return response.arrayBuffer();
1508
1511
  }
1509
1512
  async function fetchCompress(url, options = {}) {
1510
- const { compressMinLength = 1024, ...init } = options;
1513
+ const {
1514
+ compressMinLength = 1024,
1515
+ fetcher = fetchDefault,
1516
+ ...init
1517
+ } = options;
1511
1518
  try {
1512
1519
  if (init.body !== void 0 && init.body !== null) {
1513
1520
  const bodyStr = typeof init.body === "string" ? init.body : JSON.stringify(init.body);
1514
1521
  if (bodyStr.length > compressMinLength) {
1515
1522
  const headers = new Headers(init.headers);
1516
1523
  headers.set("Content-Encoding", "gzip");
1517
- return await fetch(url, {
1524
+ return await fetcher(url, {
1518
1525
  ...init,
1519
1526
  body: await gzipString(bodyStr),
1520
1527
  headers
1521
1528
  });
1522
1529
  }
1523
1530
  }
1524
- return await fetch(url, init);
1531
+ return await fetcher(url, init);
1525
1532
  } catch (error) {
1526
1533
  throw toFetchError(error, { url: url.toString(), method: init.method });
1527
1534
  }
@@ -1660,17 +1667,29 @@
1660
1667
  async request(config2) {
1661
1668
  const merged = { ...this.defaults, ...config2 };
1662
1669
  const url = buildURL(merged);
1670
+ const {
1671
+ baseURL: _baseURL,
1672
+ data: requestData,
1673
+ headers,
1674
+ method = "GET",
1675
+ params: _params,
1676
+ signal,
1677
+ timeout,
1678
+ url: _url2,
1679
+ validateStatus: validateStatusOption,
1680
+ ...requestInit
1681
+ } = merged;
1663
1682
  const init = {
1664
- method: merged.method ?? "GET",
1665
- headers: buildHeaders(merged.headers, merged.data !== void 0),
1666
- compressMinLength: merged.compressMinLength,
1667
- signal: merged.timeout !== void 0 && merged.timeout !== 0 ? AbortSignal.timeout(merged.timeout) : merged.signal
1683
+ ...requestInit,
1684
+ method,
1685
+ headers: buildHeaders(headers, requestData !== void 0),
1686
+ signal: timeout !== void 0 && timeout !== 0 ? AbortSignal.timeout(timeout) : signal
1668
1687
  };
1669
- if (merged.data !== void 0) {
1670
- init.body = JSON.stringify(merged.data);
1688
+ if (requestData !== void 0) {
1689
+ init.body = JSON.stringify(requestData);
1671
1690
  }
1672
1691
  const response = await fetchCompress(url, init);
1673
- const data = response.ok ? await parseJsonResponse(response, { url, method: merged.method }) : await tryParseJson(response);
1692
+ const data = response.ok ? await parseJsonResponse(response, { url, method }) : await tryParseJson(response);
1674
1693
  const result = {
1675
1694
  data,
1676
1695
  headers: response.headers,
@@ -1678,12 +1697,16 @@
1678
1697
  status: response.status,
1679
1698
  statusText: response.statusText
1680
1699
  };
1681
- const validateStatus = merged.validateStatus === void 0 ? (s) => s >= 200 && s < 300 : merged.validateStatus;
1700
+ const validateStatus = validateStatusOption === void 0 ? (s) => s >= 200 && s < 300 : validateStatusOption;
1682
1701
  if (validateStatus && !validateStatus(response.status)) {
1683
1702
  throw new FetchClientError(
1684
1703
  `Request failed with status ${response.status} ${response.statusText}`,
1685
1704
  result,
1686
- { ...merged, url }
1705
+ {
1706
+ ...merged,
1707
+ method,
1708
+ url
1709
+ }
1687
1710
  );
1688
1711
  }
1689
1712
  return result;
@@ -2063,6 +2086,14 @@
2063
2086
  _Base.globalInstances[baseClassName] = instanceArray;
2064
2087
  }
2065
2088
  };
2089
+ var LogLevel = Enum({
2090
+ error: 1,
2091
+ warn: 2,
2092
+ info: 3,
2093
+ log: 4,
2094
+ debug: 5,
2095
+ trace: 6
2096
+ });
2066
2097
  var defaultForgetConfig = { timeout: 3e4 };
2067
2098
  var defaultForgetNodeConfig = {
2068
2099
  ...defaultForgetConfig,
@@ -2725,7 +2756,7 @@
2725
2756
  return this.creatable.create(mergedParams);
2726
2757
  }
2727
2758
  };
2728
- function getFunctionName(depth = 2) {
2759
+ function getFunctionName2(depth = 2) {
2729
2760
  const error = new Error("Stack");
2730
2761
  let newIndex;
2731
2762
  const stackParts = error.stack?.split("\n")[depth]?.split(" ");
@@ -2968,7 +2999,7 @@
2968
2999
  * Asserts that the given function has not been overridden in a subclass.
2969
3000
  * Used to enforce the handler pattern (override `startHandler` not `start`).
2970
3001
  */
2971
- _noOverride(functionName2 = getFunctionName(3)) {
3002
+ _noOverride(functionName2 = getFunctionName2(3)) {
2972
3003
  const thisFunc = this[functionName2];
2973
3004
  const rootFunc = getRootFunction(this, functionName2);
2974
3005
  assertEx(thisFunc === rootFunc, () => `Override not allowed for [${functionName2}] - override ${functionName2}Handler instead`);
@@ -3015,14 +3046,6 @@
3015
3046
  ], AbstractCreatableWithFactory);
3016
3047
  var d2r = Math.PI / 180;
3017
3048
  var r2d = 180 / Math.PI;
3018
- var LogLevel = Enum({
3019
- error: 1,
3020
- warn: 2,
3021
- info: 3,
3022
- log: 4,
3023
- debug: 5,
3024
- trace: 6
3025
- });
3026
3049
  var AsTypeFactory = {
3027
3050
  create: (typeCheck) => {
3028
3051
  const func = (value, assertOrConfig, config2) => {
@@ -3197,7 +3220,7 @@
3197
3220
  var toJsonObject = zodToFactory(JsonObjectZod, "toJsonObject");
3198
3221
  var subtle = globalThis.crypto?.subtle;
3199
3222
 
3200
- // ../../node_modules/.pnpm/@ariestools+threads@8.1.6_@opentelemetry+api@1.9.1_observable-fns@0.6.1_zod@4.4.3/node_modules/@ariestools/threads/dist/browser/worker/worker.browser.mjs
3223
+ // ../../node_modules/.pnpm/@ariestools+threads@8.1.9_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@7.2.0_zod@4.4.3/node_modules/@ariestools/threads/dist/browser/worker/worker.browser.mjs
3201
3224
  var DefaultErrorSerializer = {
3202
3225
  deserialize: (message) => {
3203
3226
  const error = Object.create(Error.prototype);
@@ -0,0 +1,2 @@
1
+ export * from '@xyo-network/sdk-protocol-core/elliptic/workerd';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/elliptic/workerd/index.ts"],"names":[],"mappings":"AACA,cAAc,iDAAiD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/sdk-protocol",
3
- "version": "7.2.3",
3
+ "version": "7.3.0",
4
4
  "description": "Foundation SDK facade for XYO Protocol 2.0 (re-exports @xyo-network/sdk-protocol-core)",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -60,6 +60,8 @@
60
60
  "#domain-payload-plugin/*": "./src/modules/domain-payload-plugin/*",
61
61
  "#elliptic": "./src/modules/elliptic/index.ts",
62
62
  "#elliptic/*": "./src/modules/elliptic/*",
63
+ "#elliptic/workerd": "./src/modules/elliptic/workerd/index.ts",
64
+ "#elliptic/workerd/*": "./src/modules/elliptic/workerd/*",
63
65
  "#hash": "./src/modules/hash/index.ts",
64
66
  "#hash/*": "./src/modules/hash/*",
65
67
  "#huri": "./src/modules/huri/index.ts",
@@ -214,6 +216,16 @@
214
216
  "types": "./dist/neutral/elliptic.d.ts",
215
217
  "default": "./dist/neutral/elliptic.mjs"
216
218
  },
219
+ "./elliptic/workerd": {
220
+ "types": "./dist/neutral/elliptic/workerd.d.ts",
221
+ "default": "./dist/neutral/elliptic/workerd.mjs"
222
+ },
223
+ "./elliptic/LIBAUTH-LICENSE.txt": {
224
+ "default": "./dist/neutral/elliptic/LIBAUTH-LICENSE.txt"
225
+ },
226
+ "./elliptic/secp256k1.wasm": {
227
+ "default": "./dist/neutral/elliptic/secp256k1.wasm"
228
+ },
217
229
  "./hash": {
218
230
  "types": "./dist/neutral/hash.d.ts",
219
231
  "default": "./dist/neutral/hash.mjs"
@@ -363,15 +375,15 @@
363
375
  "README.md"
364
376
  ],
365
377
  "dependencies": {
366
- "@xyo-network/sdk-protocol-core": "~7.2.3"
378
+ "@xyo-network/sdk-protocol-core": "~7.3.0"
367
379
  },
368
380
  "devDependencies": {
369
- "@ariestools/sdk": "~8.1.6",
370
- "@ariestools/toolchain": "~8.7.26",
371
- "@ariestools/tsconfig": "~8.7.26",
381
+ "@ariestools/sdk": "~8.1.9",
382
+ "@ariestools/toolchain": "~9.0.2",
383
+ "@ariestools/tsconfig": "~9.0.2",
372
384
  "@opentelemetry/api": "~1.9.1",
373
385
  "ajv": "~8.20.0",
374
- "eslint": "~10.8.0",
386
+ "eslint": "~10.8.1",
375
387
  "eslint-import-resolver-typescript": "~4.4.5",
376
388
  "ethers": "~6.17.0",
377
389
  "typescript": "~6.0.3",
package/LICENSE DELETED
@@ -1,165 +0,0 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
-
9
- This version of the GNU Lesser General Public License incorporates
10
- the terms and conditions of version 3 of the GNU General Public
11
- License, supplemented by the additional permissions listed below.
12
-
13
- 0. Additional Definitions.
14
-
15
- As used herein, "this License" refers to version 3 of the GNU Lesser
16
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
- General Public License.
18
-
19
- "The Library" refers to a covered work governed by this License,
20
- other than an Application or a Combined Work as defined below.
21
-
22
- An "Application" is any work that makes use of an interface provided
23
- by the Library, but which is not otherwise based on the Library.
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
30
- Version".
31
-
32
- The "Minimal Corresponding Source" for a Combined Work means the
33
- Corresponding Source for the Combined Work, excluding any source code
34
- for portions of the Combined Work that, considered in isolation, are
35
- based on the Application, and not on the Linked Version.
36
-
37
- The "Corresponding Application Code" for a Combined Work means the
38
- object code and/or source code for the Application, including any data
39
- and utility programs needed for reproducing the Combined Work from the
40
- Application, but excluding the System Libraries of the Combined Work.
41
-
42
- 1. Exception to Section 3 of the GNU GPL.
43
-
44
- You may convey a covered work under sections 3 and 4 of this License
45
- without being bound by section 3 of the GNU GPL.
46
-
47
- 2. Conveying Modified Versions.
48
-
49
- If you modify a copy of the Library, and, in your modifications, a
50
- facility refers to a function or data to be supplied by an Application
51
- that uses the facility (other than as an argument passed when the
52
- facility is invoked), then you may convey a copy of the modified
53
- version:
54
-
55
- a) under this License, provided that you make a good faith effort to
56
- ensure that, in the event an Application does not supply the
57
- function or data, the facility still operates, and performs
58
- whatever part of its purpose remains meaningful, or
59
-
60
- b) under the GNU GPL, with none of the additional permissions of
61
- this License applicable to that copy.
62
-
63
- 3. Object Code Incorporating Material from Library Header Files.
64
-
65
- The object code form of an Application may incorporate material from
66
- a header file that is part of the Library. You may convey such object
67
- code under terms of your choice, provided that, if the incorporated
68
- material is not limited to numerical parameters, data structure
69
- layouts and accessors, or small macros, inline functions and templates
70
- (ten or fewer lines in length), you do both of the following:
71
-
72
- a) Give prominent notice with each copy of the object code that the
73
- Library is used in it and that the Library and its use are
74
- covered by this License.
75
-
76
- b) Accompany the object code with a copy of the GNU GPL and this license
77
- document.
78
-
79
- 4. Combined Works.
80
-
81
- You may convey a Combined Work under terms of your choice that,
82
- taken together, effectively do not restrict modification of the
83
- portions of the Library contained in the Combined Work and reverse
84
- engineering for debugging such modifications, if you also do each of
85
- the following:
86
-
87
- a) Give prominent notice with each copy of the Combined Work that
88
- the Library is used in it and that the Library and its use are
89
- covered by this License.
90
-
91
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
- document.
93
-
94
- c) For a Combined Work that displays copyright notices during
95
- execution, include the copyright notice for the Library among
96
- these notices, as well as a reference directing the user to the
97
- copies of the GNU GPL and this license document.
98
-
99
- d) Do one of the following:
100
-
101
- 0) Convey the Minimal Corresponding Source under the terms of this
102
- License, and the Corresponding Application Code in a form
103
- suitable for, and under terms that permit, the user to
104
- recombine or relink the Application with a modified version of
105
- the Linked Version to produce a modified Combined Work, in the
106
- manner specified by section 6 of the GNU GPL for conveying
107
- Corresponding Source.
108
-
109
- 1) Use a suitable shared library mechanism for linking with the
110
- Library. A suitable mechanism is one that (a) uses at run time
111
- a copy of the Library already present on the user's computer
112
- system, and (b) will operate properly with a modified version
113
- of the Library that is interface-compatible with the Linked
114
- Version.
115
-
116
- e) Provide Installation Information, but only if you would otherwise
117
- be required to provide such information under section 6 of the
118
- GNU GPL, and only to the extent that such information is
119
- necessary to install and execute a modified version of the
120
- Combined Work produced by recombining or relinking the
121
- Application with a modified version of the Linked Version. (If
122
- you use option 4d0, the Installation Information must accompany
123
- the Minimal Corresponding Source and Corresponding Application
124
- Code. If you use option 4d1, you must provide the Installation
125
- Information in the manner specified by section 6 of the GNU GPL
126
- for conveying Corresponding Source.)
127
-
128
- 5. Combined Libraries.
129
-
130
- You may place library facilities that are a work based on the
131
- Library side by side in a single library together with other library
132
- facilities that are not Applications and are not covered by this
133
- License, and convey such a combined library under terms of your
134
- choice, if you do both of the following:
135
-
136
- a) Accompany the combined library with a copy of the same work based
137
- on the Library, uncombined with any other library facilities,
138
- conveyed under the terms of this License.
139
-
140
- b) Give prominent notice with the combined library that part of it
141
- is a work based on the Library, and explaining where to find the
142
- accompanying uncombined form of the same work.
143
-
144
- 6. Revised Versions of the GNU Lesser General Public License.
145
-
146
- The Free Software Foundation may publish revised and/or new versions
147
- of the GNU Lesser General Public License from time to time. Such new
148
- versions will be similar in spirit to the present version, but may
149
- differ in detail to address new problems or concerns.
150
-
151
- Each version is given a distinguishing version number. If the
152
- Library as you received it specifies that a certain numbered version
153
- of the GNU Lesser General Public License "or any later version"
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.