@xyo-network/diviner-payload-pointer-model 5.2.27 → 5.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.
- package/dist/neutral/Config.d.ts +3 -1
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/Pointer/PayloadPointer.d.ts +4 -3
- package/dist/neutral/Pointer/PayloadPointer.d.ts.map +1 -1
- package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSchemaRule.d.ts +2 -1
- package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSchemaRule.d.ts.map +1 -1
- package/dist/neutral/index.mjs +6 -3
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/Config.ts +2 -1
- package/src/Pointer/PayloadPointer.ts +3 -3
- package/src/Pointer/PayloadRules/Rules/PayloadSchemaRule.ts +3 -1
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
|
3
3
|
/**
|
|
4
4
|
* The config schema for the Payload Pointer Diviner
|
|
5
5
|
*/
|
|
6
|
-
export declare const PayloadPointerDivinerConfigSchema
|
|
6
|
+
export declare const PayloadPointerDivinerConfigSchema: "network.xyo.diviner.payload.pointer.config" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* The config schema type for the Payload Pointer Diviner
|
|
9
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAKjE;;GAEG;AACH,eAAO,MAAM,iCAAiC;;CAA0D,CAAA;AAExG;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,aAAa,CACrD;IACE;;OAEG;IACH,mBAAmB,EAAE,gBAAgB,CAAA;IACrC;;OAEG;IACH,cAAc,EAAE,gBAAgB,CAAA;CACjC,GAAG;IAAE,MAAM,EAAE,iCAAiC,CAAA;CAAE,CAClD,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
import { PayloadSchema } from '@xyo-network/payload-model';
|
|
3
2
|
import type { PointerPayload } from './Pointer.ts';
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export declare const PayloadPointerSchema: string & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
export type PayloadPointerSchema = typeof PayloadPointerSchema;
|
|
6
7
|
export type PayloadPointerPayload = PointerPayload & {
|
|
7
8
|
schema: PayloadPointerSchema;
|
|
8
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadPointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/PayloadPointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"PayloadPointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/PayloadPointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,eAAO,MAAM,oBAAoB;;CAA6C,CAAA;AAC9E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG;IACnD,MAAM,EAAE,oBAAoB,CAAA;CAC7B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,qBAA2D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadSchemaRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/Rules/PayloadSchemaRule.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
1
|
+
{"version":3,"file":"PayloadSchemaRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/Rules/PayloadSchemaRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
// src/Config.ts
|
|
2
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
3
|
+
|
|
1
4
|
// src/Schema.ts
|
|
2
5
|
var PayloadPointerDivinerSchema = "network.xyo.diviner.payload.pointer";
|
|
3
6
|
|
|
4
7
|
// src/Config.ts
|
|
5
|
-
var PayloadPointerDivinerConfigSchema = `${PayloadPointerDivinerSchema}.config
|
|
8
|
+
var PayloadPointerDivinerConfigSchema = asSchema(`${PayloadPointerDivinerSchema}.config`, true);
|
|
6
9
|
|
|
7
10
|
// src/Pointer/BoundWitnessPointer.ts
|
|
8
11
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
@@ -10,8 +13,8 @@ var BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`;
|
|
|
10
13
|
var isBoundWitnessPointer = (x) => x?.schema === BoundWitnessPointerSchema;
|
|
11
14
|
|
|
12
15
|
// src/Pointer/PayloadPointer.ts
|
|
13
|
-
import { PayloadSchema } from "@xyo-network/payload-model";
|
|
14
|
-
var PayloadPointerSchema = `${PayloadSchema}.pointer
|
|
16
|
+
import { asSchema as asSchema2, PayloadSchema } from "@xyo-network/payload-model";
|
|
17
|
+
var PayloadPointerSchema = asSchema2(`${PayloadSchema}.pointer`, true);
|
|
15
18
|
var isPayloadPointer = (x) => x?.schema === PayloadPointerSchema;
|
|
16
19
|
|
|
17
20
|
// src/Pointer/isPointerPayload.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts","../../src/Pointer/BoundWitnessPointer.ts","../../src/Pointer/PayloadPointer.ts","../../src/Pointer/isPointerPayload.ts","../../src/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.ts","../../src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts","../../src/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nimport { PayloadPointerDivinerSchema } from './Schema.ts'\n\n/**\n * The config schema for the Payload Pointer Diviner\n */\nexport const PayloadPointerDivinerConfigSchema = asSchema(`${PayloadPointerDivinerSchema}.config`, true)\n\n/**\n * The config schema type for the Payload Pointer Diviner\n */\nexport type PayloadPointerDivinerConfigSchema = typeof PayloadPointerDivinerConfigSchema\n\n/**\n * The configuration for the Payload Pointer Diviner\n */\nexport type PayloadPointerDivinerConfig = DivinerConfig<\n {\n /**\n * The module identifier of the bound witness diviner\n */\n boundWitnessDiviner: ModuleIdentifier\n /**\n * The module identifier of the payload diviner\n */\n payloadDiviner: ModuleIdentifier\n } & { schema: PayloadPointerDivinerConfigSchema }\n>\n","/**\n * The schema used for the Payload Pointer Diviner.\n */\nexport const PayloadPointerDivinerSchema = 'network.xyo.diviner.payload.pointer'\n\n/**\n * The schema type used for the Payload Pointer Diviner.\n */\nexport type PayloadPointerDivinerSchema = typeof PayloadPointerDivinerSchema\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { PointerPayload } from './Pointer.ts'\n\nexport type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`\nexport const BoundWitnessPointerSchema: BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`\n\nexport type BoundWitnessPointerPayload = PointerPayload & {\n schema: BoundWitnessPointerSchema\n}\n\n/**\n * Identity function for determining if an object is a BoundWitness Pointer\n * @param x The object to check\n */\nexport const isBoundWitnessPointer = (x?: Payload | null): x is BoundWitnessPointerPayload => x?.schema === BoundWitnessPointerSchema\n","import type { Payload } from '@xyo-network/payload-model'\nimport { asSchema, PayloadSchema } from '@xyo-network/payload-model'\n\nimport type { PointerPayload } from './Pointer.ts'\n\nexport const PayloadPointerSchema = asSchema(`${PayloadSchema}.pointer`, true)\nexport type PayloadPointerSchema = typeof PayloadPointerSchema\n\nexport type PayloadPointerPayload = PointerPayload & {\n schema: PayloadPointerSchema\n}\n\n/**\n * Identity function for determining if an object is a Payload Pointer\n * @param x The object to check\n */\nexport const isPayloadPointer = (x?: Payload | null): x is PayloadPointerPayload => x?.schema === PayloadPointerSchema\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessPointerSchema } from './BoundWitnessPointer.ts'\nimport { PayloadPointerSchema } from './PayloadPointer.ts'\nimport type { PointerPayload } from './Pointer.ts'\n\n/**\n * Identity function for determining if an object is a Pointer Payload (PayloadPointer or BoundWitnessPointer)\n * @param x The object to check\n */\nexport const isPointerPayload = (x?: Payload | null): x is PointerPayload =>\n x?.schema === PayloadPointerSchema || x?.schema === BoundWitnessPointerSchema\n","import type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadAddressRule } from '../Rules/index.ts'\n\nexport const isPayloadAddressRule = (rule: PayloadRule): rule is PayloadAddressRule => {\n return !!(rule as PayloadAddressRule)?.address\n}\n","import { isString } from '@xylabs/sdk-js'\n\nimport type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadSchemaRule } from '../Rules/index.ts'\n\nexport const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {\n return isString((rule as PayloadSchemaRule)?.schema)\n}\n","import { exists } from '@xylabs/sdk-js'\nimport { isSequence } from '@xyo-network/payload-model'\n\nimport type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadSequenceOrderRule } from '../Rules/index.ts'\n\nexport const isPayloadSequenceOrderRule = (rule: PayloadRule): rule is PayloadSequenceOrderRule => {\n const { order, sequence } = rule as Partial<PayloadSequenceOrderRule>\n // If sequence is defined, but not a sequence, it's not a PayloadSequenceOrderRule\n if (exists(sequence) && !isSequence(sequence)) return false\n // If neither order or sequence is defined, it's not a PayloadSequenceOrderRule\n if (!exists(order) && !exists(sequence)) return false\n // If order is defined, but not a valid order, it's not a PayloadSequenceOrderRule\n return !(order && order !== 'asc' && order !== 'desc')\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;;;ACClB,IAAM,8BAA8B;;;ADMpC,IAAM,oCAAoC,SAAS,GAAG,2BAA2B,WAAW,IAAI;;;AETvG,SAAS,0BAA0B;AAM5B,IAAM,4BAAuD,GAAG,kBAAkB;AAUlF,IAAM,wBAAwB,CAAC,MAAwD,GAAG,WAAW;;;ACf5G,SAAS,YAAAA,WAAU,qBAAqB;AAIjC,IAAM,uBAAuBA,UAAS,GAAG,aAAa,YAAY,IAAI;AAWtE,IAAM,mBAAmB,CAAC,MAAmD,GAAG,WAAW;;;ACN3F,IAAM,mBAAmB,CAAC,MAC/B,GAAG,WAAW,wBAAwB,GAAG,WAAW;;;ACR/C,IAAM,uBAAuB,CAAC,SAAkD;AACrF,SAAO,CAAC,CAAE,MAA6B;AACzC;;;ACLA,SAAS,gBAAgB;AAKlB,IAAM,sBAAsB,CAAC,SAAiD;AACnF,SAAO,SAAU,MAA4B,MAAM;AACrD;;;ACPA,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAKpB,IAAM,6BAA6B,CAAC,SAAwD;AACjG,QAAM,EAAE,OAAO,SAAS,IAAI;AAE5B,MAAI,OAAO,QAAQ,KAAK,CAAC,WAAW,QAAQ,EAAG,QAAO;AAEtD,MAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,QAAQ,EAAG,QAAO;AAEhD,SAAO,EAAE,SAAS,UAAU,SAAS,UAAU;AACjD;","names":["asSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-pointer-model",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
-
"@xyo-network/boundwitness-model": "~5.
|
|
41
|
-
"@xyo-network/diviner-model": "~5.
|
|
42
|
-
"@xyo-network/diviner-payload-model": "~5.
|
|
43
|
-
"@xyo-network/module-model": "~5.
|
|
44
|
-
"@xyo-network/payload-model": "~5.
|
|
40
|
+
"@xyo-network/boundwitness-model": "~5.3.0",
|
|
41
|
+
"@xyo-network/diviner-model": "~5.3.0",
|
|
42
|
+
"@xyo-network/diviner-payload-model": "~5.3.0",
|
|
43
|
+
"@xyo-network/module-model": "~5.3.0",
|
|
44
|
+
"@xyo-network/payload-model": "~5.3.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
package/src/Config.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
2
2
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
3
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
import { PayloadPointerDivinerSchema } from './Schema.ts'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The config schema for the Payload Pointer Diviner
|
|
8
9
|
*/
|
|
9
|
-
export const PayloadPointerDivinerConfigSchema = `${PayloadPointerDivinerSchema}.config
|
|
10
|
+
export const PayloadPointerDivinerConfigSchema = asSchema(`${PayloadPointerDivinerSchema}.config`, true)
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* The config schema type for the Payload Pointer Diviner
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Payload } from '@xyo-network/payload-model'
|
|
2
|
-
import { PayloadSchema } from '@xyo-network/payload-model'
|
|
2
|
+
import { asSchema, PayloadSchema } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
4
|
import type { PointerPayload } from './Pointer.ts'
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export const PayloadPointerSchema = asSchema(`${PayloadSchema}.pointer`, true)
|
|
7
|
+
export type PayloadPointerSchema = typeof PayloadPointerSchema
|
|
8
8
|
|
|
9
9
|
export type PayloadPointerPayload = PointerPayload & {
|
|
10
10
|
schema: PayloadPointerSchema
|