@xyo-network/signature-payload-plugin 5.2.4 → 5.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/signature-payload-plugin",
3
- "version": "5.2.4",
3
+ "version": "5.3.2",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -35,15 +35,19 @@
35
35
  "!**/*.spec.*",
36
36
  "!**/*.test.*"
37
37
  ],
38
- "dependencies": {
39
- "@xyo-network/payload-model": "~5.2.14"
40
- },
41
38
  "devDependencies": {
42
- "@xylabs/ts-scripts-yarn3": "~7.2.8",
43
- "@xylabs/tsconfig": "~7.2.8",
44
- "typescript": "~5.9.3"
39
+ "@xylabs/sdk-js": "^5.0.90",
40
+ "@xylabs/ts-scripts-yarn3": "~7.5.10",
41
+ "@xylabs/tsconfig": "~7.5.10",
42
+ "@xyo-network/payload-model": "~5.3.5",
43
+ "typescript": "~5.9.3",
44
+ "zod": "^4.3.6"
45
+ },
46
+ "peerDependencies": {
47
+ "@xylabs/sdk-js": "^5",
48
+ "zod": "^4"
45
49
  },
46
50
  "publishConfig": {
47
51
  "access": "public"
48
52
  }
49
- }
53
+ }
package/src/Schema.ts CHANGED
@@ -1,2 +1,4 @@
1
- export const SignatureSchema = 'network.xyo.signing.signature' as const
1
+ import { asSchema } from '@xyo-network/payload-model'
2
+
3
+ export const SignatureSchema = asSchema('network.xyo.signing.signature', true)
2
4
  export type SignatureSchema = typeof SignatureSchema
@@ -1,26 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model';
2
- import { SignatureSchema } from './Schema.ts';
3
- export type Digest = 'sha512' | 'sha3-256';
4
- export interface SignatureFields {
5
- /**
6
- * The digest algorithm used to create the signature
7
- */
8
- digestAlgorithm: Digest;
9
- /**
10
- * The signature
11
- */
12
- signature: string;
13
- }
14
- /**
15
- * A Signature Payload
16
- */
17
- export type Signature = Payload<SignatureFields, SignatureSchema>;
18
- /**
19
- * Identity function for determine if an object is a Signature
20
- */
21
- export declare const isSignature: (x?: unknown | null) => x is Signature;
22
- /**
23
- * Identity function for determine if an object is a Signature with sources
24
- */
25
- export declare const isSignatureWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Signature>;
26
- //# sourceMappingURL=Payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAM7C,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAA;AAEjE;;GAEG;AACH,eAAO,MAAM,WAAW,wCAAoD,CAAA;AAE5E;;GAEG;AACH,eAAO,MAAM,sBAAsB,0FAA+D,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const SignatureSchema: "network.xyo.signing.signature";
2
- export type SignatureSchema = typeof SignatureSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,+BAAwC,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Payload.ts';
2
- export * from './Schema.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
@@ -1,15 +0,0 @@
1
- // src/Payload.ts
2
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
3
-
4
- // src/Schema.ts
5
- var SignatureSchema = "network.xyo.signing.signature";
6
-
7
- // src/Payload.ts
8
- var isSignature = isPayloadOfSchemaType(SignatureSchema);
9
- var isSignatureWithSources = isPayloadOfSchemaTypeWithSources(SignatureSchema);
10
- export {
11
- SignatureSchema,
12
- isSignature,
13
- isSignatureWithSources
14
- };
15
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts"],"sourcesContent":["import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'\n\nimport { SignatureSchema } from './Schema.ts'\n\n// TODO: Overlap of outputs from:\n// openssl list -digest-algorithms\n// AND\n// inputs to node.js crypto.createHash\nexport type Digest = 'sha512' | 'sha3-256'\n\nexport interface SignatureFields {\n /**\n * The digest algorithm used to create the signature\n */\n digestAlgorithm: Digest\n /**\n * The signature\n */\n signature: string\n}\n\n/**\n * A Signature Payload\n */\nexport type Signature = Payload<SignatureFields, SignatureSchema>\n\n/**\n * Identity function for determine if an object is a Signature\n */\nexport const isSignature = isPayloadOfSchemaType<Signature>(SignatureSchema)\n\n/**\n * Identity function for determine if an object is a Signature with sources\n */\nexport const isSignatureWithSources = isPayloadOfSchemaTypeWithSources<Signature>(SignatureSchema)\n","export const SignatureSchema = 'network.xyo.signing.signature' as const\nexport type SignatureSchema = typeof SignatureSchema\n"],"mappings":";AACA,SAAS,uBAAuB,wCAAwC;;;ACDjE,IAAM,kBAAkB;;;AD8BxB,IAAM,cAAc,sBAAiC,eAAe;AAKpE,IAAM,yBAAyB,iCAA4C,eAAe;","names":[]}