@xyo-network/payload-utils 7.0.14 → 7.0.15
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/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@xyo-network/sdk-protocol/payload-utils';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yCAAyC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
var generateKeyForTuple = async (payloads) => {
|
|
4
|
-
await Promise.resolve();
|
|
5
|
-
return payloads.map((p) => ObjectHasher.stringifyHashFields(p)).join("|");
|
|
6
|
-
};
|
|
7
|
-
var combinationsBySchema = async (payloads, schemas) => {
|
|
8
|
-
const groupedPayloads = Object.fromEntries(schemas.map((schema) => [schema, []]));
|
|
9
|
-
for (const payload of payloads) {
|
|
10
|
-
if (schemas.includes(payload.schema)) {
|
|
11
|
-
groupedPayloads[payload.schema].push(payload);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const seen = /* @__PURE__ */ new Set();
|
|
15
|
-
let combinations = [[]];
|
|
16
|
-
for (const schema of schemas) {
|
|
17
|
-
const newCombinations = [];
|
|
18
|
-
for (const combination of combinations) {
|
|
19
|
-
for (const payload of groupedPayloads[schema]) {
|
|
20
|
-
const newPerm = [...combination, payload];
|
|
21
|
-
if (newPerm.length === schemas.length) {
|
|
22
|
-
const serialized = await generateKeyForTuple(newPerm);
|
|
23
|
-
if (!seen.has(serialized)) {
|
|
24
|
-
seen.add(serialized);
|
|
25
|
-
newCombinations.push(newPerm);
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
newCombinations.push(newPerm);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
combinations = newCombinations;
|
|
33
|
-
}
|
|
34
|
-
return combinations;
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
combinationsBySchema
|
|
38
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/sdk-protocol/payload-utils";
|
|
39
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/sdk-protocol.\nexport * from '@xyo-network/sdk-protocol/payload-utils'\n"],
|
|
5
|
+
"mappings": ";AACA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/payload-utils",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.15",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,39 +34,51 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/payload-model": "~7.0.14"
|
|
37
|
+
"@xyo-network/sdk-protocol": "~7.0.15"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@ariestools/sdk": "~8.0.2",
|
|
42
41
|
"@ariestools/threads": "~8.0.2",
|
|
43
|
-
"@
|
|
42
|
+
"@bitauth/libauth": "~3.0.0",
|
|
43
|
+
"@metamask/providers": "~22.1.1",
|
|
44
|
+
"@noble/post-quantum": "~0.6.1",
|
|
44
45
|
"@opentelemetry/api": "~1.9.1",
|
|
45
46
|
"@opentelemetry/sdk-trace-base": "~2.9.0",
|
|
46
47
|
"@scure/base": "~2.2.0",
|
|
47
|
-
"@
|
|
48
|
-
"@xylabs/
|
|
48
|
+
"@scure/bip39": "~2.2.0",
|
|
49
|
+
"@xylabs/toolchain": "~8.6.7",
|
|
50
|
+
"@xylabs/tsconfig": "~8.6.7",
|
|
51
|
+
"ajv": "~8.20.0",
|
|
49
52
|
"async-mutex": "~0.5.0",
|
|
50
53
|
"debug": "~4.4.3",
|
|
51
54
|
"eslint": "~10.6.0",
|
|
52
55
|
"eslint-import-resolver-typescript": "~4.4.5",
|
|
56
|
+
"ethers": "~6.17.0",
|
|
53
57
|
"hash-wasm": "~4.12.0",
|
|
58
|
+
"idb": "~8.0.3",
|
|
54
59
|
"observable-fns": "~0.6.1",
|
|
55
60
|
"typescript": "~6.0.3",
|
|
56
|
-
"
|
|
57
|
-
"vitest": "~4.1.9",
|
|
61
|
+
"webextension-polyfill": "~0.12.0",
|
|
58
62
|
"zod": "~4.4.3"
|
|
59
63
|
},
|
|
60
64
|
"peerDependencies": {
|
|
61
65
|
"@ariestools/sdk": "^8.0.2",
|
|
62
66
|
"@ariestools/threads": "^8.0.2",
|
|
67
|
+
"@bitauth/libauth": "^3.0.0",
|
|
68
|
+
"@metamask/providers": "^22.1.1",
|
|
69
|
+
"@noble/post-quantum": "^0.6.1",
|
|
63
70
|
"@opentelemetry/api": "^1.9.1",
|
|
64
71
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
65
72
|
"@scure/base": "^2.2.0",
|
|
73
|
+
"@scure/bip39": "^2.2.0",
|
|
74
|
+
"ajv": "^8.20.0",
|
|
66
75
|
"async-mutex": "^0.5.0",
|
|
67
76
|
"debug": "^4.4.3",
|
|
77
|
+
"ethers": "^6.17.0",
|
|
68
78
|
"hash-wasm": "^4.12.0",
|
|
79
|
+
"idb": "^8.0.3",
|
|
69
80
|
"observable-fns": "^0.6.1",
|
|
81
|
+
"webextension-polyfill": "^0.12.0",
|
|
70
82
|
"zod": "^4.4.3"
|
|
71
83
|
},
|
|
72
84
|
"engines": {
|
|
@@ -74,5 +86,6 @@
|
|
|
74
86
|
},
|
|
75
87
|
"publishConfig": {
|
|
76
88
|
"access": "public"
|
|
77
|
-
}
|
|
89
|
+
},
|
|
90
|
+
"deprecated": "Use @xyo-network/sdk-protocol/payload-utils instead. Replace @xyo-network/payload-utils with @xyo-network/sdk-protocol/payload-utils. This package is a compatibility shim only and will not receive further updates."
|
|
78
91
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the unique combinations of payloads for the given schemas
|
|
4
|
-
* @param payloads An array of payloads
|
|
5
|
-
* @param schemas An array of schemas
|
|
6
|
-
* @returns An array of unique combinations of payloads
|
|
7
|
-
*/
|
|
8
|
-
export declare const combinationsBySchema: (payloads: Payload[], schemas: string[]) => Promise<Payload[][]>;
|
|
9
|
-
//# sourceMappingURL=combinationsBySchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combinationsBySchema.d.ts","sourceRoot":"","sources":["../../src/combinationsBySchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAazD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAU,UAAU,OAAO,EAAE,EAAE,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,EAAE,EAAE,CA8CtG,CAAA"}
|