@xyo-network/id-payload-plugin 7.0.4 → 7.0.6
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/README.md +1 -47
- package/dist/neutral/index.d.ts +5 -4
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -47
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +15 -21
- package/dist/neutral/Payload.d.ts +0 -86
- package/dist/neutral/Payload.d.ts.map +0 -1
- package/dist/neutral/Plugin.d.ts +0 -7
- package/dist/neutral/Plugin.d.ts.map +0 -1
- package/dist/neutral/Schema.d.ts +0 -5
- package/dist/neutral/Schema.d.ts.map +0 -1
- package/dist/neutral/Template.d.ts +0 -3
- package/dist/neutral/Template.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
[![logo][]](https://xyo.network)
|
|
2
|
-
|
|
3
1
|
# @xyo-network/id-payload-plugin
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
[![license][license-badge]][license-link]
|
|
7
|
-
|
|
8
|
-
> Typescript/Javascript Plugins for XYO Platform
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
Using npm:
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
npm install {{name}}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Using yarn:
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
yarn add {{name}}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Using pnpm:
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
pnpm add {{name}}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Using bun:
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
bun add {{name}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
|
-
|
|
41
|
-
## Credits
|
|
42
|
-
|
|
43
|
-
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
44
|
-
|
|
45
|
-
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/id-payload-plugin.svg
|
|
46
|
-
[npm-link]: https://www.npmjs.com/package/@xyo-network/id-payload-plugin
|
|
47
|
-
[license-badge]: https://img.shields.io/npm/l/@xyo-network/id-payload-plugin.svg
|
|
48
|
-
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
|
49
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
3
|
+
Deprecated compatibility stub. Use `@xyo-network/sdk-protocol/id-payload-plugin` instead.
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@xyo-network/sdk-protocol/id-payload-plugin` instead.
|
|
3
|
+
* `@xyo-network/id-payload-plugin` is a backward-compatibility re-export stub.
|
|
4
|
+
*/
|
|
5
|
+
export * from '@xyo-network/sdk-protocol/id-payload-plugin';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,6CAA6C,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
zodAsFactory,
|
|
4
|
-
zodIsFactory,
|
|
5
|
-
zodToFactory
|
|
6
|
-
} from "@xylabs/sdk";
|
|
7
|
-
import { isPayloadOfSchemaTypeWithSources, PayloadZodOfSchema } from "@xyo-network/payload-model";
|
|
8
|
-
import * as z from "zod/mini";
|
|
9
|
-
|
|
10
|
-
// src/Schema.ts
|
|
11
|
-
import { asSchema } from "@xyo-network/payload-model";
|
|
12
|
-
var IdSchema = asSchema("network.xyo.id", true);
|
|
13
|
-
|
|
14
|
-
// src/Payload.ts
|
|
15
|
-
var IdPayloadZod = z.extend(PayloadZodOfSchema(IdSchema), { salt: z.string() });
|
|
16
|
-
var isId = zodIsFactory(IdPayloadZod);
|
|
17
|
-
var asId = zodAsFactory(IdPayloadZod, "asId");
|
|
18
|
-
var toId = zodToFactory(IdPayloadZod, "toId");
|
|
19
|
-
var asOptionalId = asId;
|
|
20
|
-
var isIdWithSources = isPayloadOfSchemaTypeWithSources(IdSchema);
|
|
21
|
-
|
|
22
|
-
// src/Plugin.ts
|
|
23
|
-
import { createPayloadPlugin } from "@xyo-network/payload-plugin";
|
|
24
|
-
|
|
25
|
-
// src/Template.ts
|
|
26
|
-
var idPayloadTemplate = () => ({
|
|
27
|
-
salt: "",
|
|
28
|
-
schema: IdSchema
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// src/Plugin.ts
|
|
32
|
-
var IdPayloadPlugin = () => createPayloadPlugin({
|
|
33
|
-
schema: IdSchema,
|
|
34
|
-
template: idPayloadTemplate
|
|
35
|
-
});
|
|
36
|
-
export {
|
|
37
|
-
IdPayloadPlugin,
|
|
38
|
-
IdPayloadZod,
|
|
39
|
-
IdSchema,
|
|
40
|
-
asId,
|
|
41
|
-
asOptionalId,
|
|
42
|
-
IdPayloadPlugin as default,
|
|
43
|
-
idPayloadTemplate,
|
|
44
|
-
isId,
|
|
45
|
-
isIdWithSources,
|
|
46
|
-
toId
|
|
47
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/sdk-protocol/id-payload-plugin";
|
|
48
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": ["/**\n * @deprecated Use `@xyo-network/sdk-protocol/id-payload-plugin` instead.\n * `@xyo-network/id-payload-plugin` is a backward-compatibility re-export stub.\n */\nexport * from '@xyo-network/sdk-protocol/id-payload-plugin'\n"],
|
|
5
|
+
"mappings": ";AAIA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/id-payload-plugin",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.6",
|
|
4
|
+
"description": "DEPRECATED - use @xyo-network/sdk-protocol/id-payload-plugin. Backward-compatibility re-export stub for @xyo-network/id-payload-plugin.",
|
|
5
|
+
"deprecated": "Use @xyo-network/sdk-protocol/id-payload-plugin instead. @xyo-network/id-payload-plugin is a backward-compatibility re-export stub and will not receive further updates.",
|
|
5
6
|
"homepage": "https://xyo.network",
|
|
6
7
|
"bugs": {
|
|
7
8
|
"url": "git+https://github.com/XYOracleNetwork/plugins/issues",
|
|
@@ -34,39 +35,32 @@
|
|
|
34
35
|
"README.md"
|
|
35
36
|
],
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/payload-model": "~7.0.4"
|
|
38
|
+
"@xyo-network/sdk-protocol": "~7.0.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@scure/base": "~2.2.0",
|
|
44
|
-
"@xylabs/sdk": "^7.0.1",
|
|
45
|
-
"@xylabs/threads": "~7.0.1",
|
|
46
|
-
"@xylabs/toolchain": "~8.5.3",
|
|
47
|
-
"@xylabs/tsconfig": "~8.5.3",
|
|
48
|
-
"@xylabs/vitest-extended": "^7.0.1",
|
|
49
|
-
"async-mutex": "^0.5.0",
|
|
41
|
+
"@xylabs/toolchain": "~8.5.12",
|
|
42
|
+
"@xylabs/tsconfig": "~8.5.12",
|
|
50
43
|
"browserslist": "4.28.4",
|
|
51
|
-
"debug": "^4.4.3",
|
|
52
44
|
"eslint": "^10.6.0",
|
|
53
45
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
54
|
-
"
|
|
55
|
-
"observable-fns": "^0.6.1",
|
|
56
|
-
"typescript": "~6.0.3",
|
|
57
|
-
"vite": "^8.1.0",
|
|
58
|
-
"vitest": "~4.1.9",
|
|
59
|
-
"zod": "^4.4.3"
|
|
46
|
+
"typescript": "~6.0.3"
|
|
60
47
|
},
|
|
61
48
|
"peerDependencies": {
|
|
49
|
+
"@ariestools/sdk": "^7.0.4",
|
|
50
|
+
"@bitauth/libauth": "~3.0",
|
|
51
|
+
"@noble/post-quantum": "~0.6.1",
|
|
62
52
|
"@opentelemetry/api": "^1.9",
|
|
63
53
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
64
54
|
"@scure/base": "~2.2",
|
|
65
|
-
"@
|
|
55
|
+
"@scure/bip39": "~2.2",
|
|
56
|
+
"@xylabs/geo": "^7.0",
|
|
66
57
|
"@xylabs/threads": "^7.0",
|
|
58
|
+
"ajv": "^8.20",
|
|
67
59
|
"async-mutex": "^0.5",
|
|
68
60
|
"debug": "^4.4",
|
|
61
|
+
"ethers": "^6.16",
|
|
69
62
|
"hash-wasm": "~4.12",
|
|
63
|
+
"idb": "^8.0",
|
|
70
64
|
"observable-fns": "^0.6",
|
|
71
65
|
"zod": "^4.4"
|
|
72
66
|
},
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { WithSources } from '@xyo-network/payload-model';
|
|
2
|
-
import * as z from 'zod/mini';
|
|
3
|
-
/**
|
|
4
|
-
* The fields of an ID Payload
|
|
5
|
-
*/
|
|
6
|
-
export interface IdFields {
|
|
7
|
-
salt: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const IdPayloadZod: z.ZodMiniObject<{
|
|
10
|
-
schema: z.ZodMiniLiteral<"network.xyo.id" & {
|
|
11
|
-
readonly __schema: true;
|
|
12
|
-
}>;
|
|
13
|
-
salt: z.ZodMiniString<string>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
/**
|
|
16
|
-
* The ID Payload
|
|
17
|
-
*/
|
|
18
|
-
export type Id = z.infer<typeof IdPayloadZod>;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use `Id` instead
|
|
21
|
-
*/
|
|
22
|
-
export type IdPayload = Id;
|
|
23
|
-
/**
|
|
24
|
-
* Identity helpers for ID Payload
|
|
25
|
-
*/
|
|
26
|
-
export declare const isId: <T>(value: T) => value is T & {
|
|
27
|
-
schema: "network.xyo.id" & {
|
|
28
|
-
readonly __schema: true;
|
|
29
|
-
};
|
|
30
|
-
salt: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const asId: {
|
|
33
|
-
<T>(value: T): (T & {
|
|
34
|
-
schema: "network.xyo.id" & {
|
|
35
|
-
readonly __schema: true;
|
|
36
|
-
};
|
|
37
|
-
salt: string;
|
|
38
|
-
}) | undefined;
|
|
39
|
-
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
40
|
-
schema: "network.xyo.id" & {
|
|
41
|
-
readonly __schema: true;
|
|
42
|
-
};
|
|
43
|
-
salt: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export declare const toId: {
|
|
47
|
-
<T>(value: T): (T & {
|
|
48
|
-
schema: "network.xyo.id" & {
|
|
49
|
-
readonly __schema: true;
|
|
50
|
-
};
|
|
51
|
-
salt: string;
|
|
52
|
-
}) | undefined;
|
|
53
|
-
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
54
|
-
schema: "network.xyo.id" & {
|
|
55
|
-
readonly __schema: true;
|
|
56
|
-
};
|
|
57
|
-
salt: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Use `asId` instead (returns undefined on failure when called without an assert config)
|
|
62
|
-
*/
|
|
63
|
-
export declare const asOptionalId: {
|
|
64
|
-
<T>(value: T): (T & {
|
|
65
|
-
schema: "network.xyo.id" & {
|
|
66
|
-
readonly __schema: true;
|
|
67
|
-
};
|
|
68
|
-
salt: string;
|
|
69
|
-
}) | undefined;
|
|
70
|
-
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
71
|
-
schema: "network.xyo.id" & {
|
|
72
|
-
readonly __schema: true;
|
|
73
|
-
};
|
|
74
|
-
salt: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Identity helper for ID Payload with sources
|
|
79
|
-
*/
|
|
80
|
-
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<{
|
|
81
|
-
schema: "network.xyo.id" & {
|
|
82
|
-
readonly __schema: true;
|
|
83
|
-
};
|
|
84
|
-
salt: string;
|
|
85
|
-
}>>;
|
|
86
|
-
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,YAAY;;;;;iBAA+D,CAAA;AAExF;;GAEG;AACH,MAAM,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,EAAE,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;CAA6B,CAAA;AAC9C,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAAqC,CAAA;AACtD,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAAqC,CAAA;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAAO,CAAA;AAEhC;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;GAA8D,CAAA"}
|
package/dist/neutral/Plugin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;EAIxB,CAAA"}
|
package/dist/neutral/Schema.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;CAAmC,CAAA;AACxD,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Template.d.ts","sourceRoot":"","sources":["../../src/Template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAGtC,eAAO,MAAM,iBAAiB,QAAO,EAGnC,CAAA"}
|