@xyo-network/diviner-payload-pointer-model 3.7.2 → 3.8.1

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.
Files changed (44) hide show
  1. package/dist/neutral/index.d.ts +70 -5
  2. package/dist/neutral/index.mjs +1 -2
  3. package/dist/neutral/index.mjs.map +1 -1
  4. package/package.json +8 -8
  5. package/src/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.ts +1 -3
  6. package/dist/neutral/Config.d.ts +0 -26
  7. package/dist/neutral/Config.d.ts.map +0 -1
  8. package/dist/neutral/Params.d.ts +0 -8
  9. package/dist/neutral/Params.d.ts.map +0 -1
  10. package/dist/neutral/Pointer/BoundWitnessPointer.d.ts +0 -14
  11. package/dist/neutral/Pointer/BoundWitnessPointer.d.ts.map +0 -1
  12. package/dist/neutral/Pointer/PayloadPointer.d.ts +0 -14
  13. package/dist/neutral/Pointer/PayloadPointer.d.ts.map +0 -1
  14. package/dist/neutral/Pointer/PayloadRules/PayloadRule.d.ts +0 -3
  15. package/dist/neutral/Pointer/PayloadRules/PayloadRule.d.ts.map +0 -1
  16. package/dist/neutral/Pointer/PayloadRules/PayloadSearchCriteria.d.ts +0 -10
  17. package/dist/neutral/Pointer/PayloadRules/PayloadSearchCriteria.d.ts.map +0 -1
  18. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadAddressRule.d.ts +0 -4
  19. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadAddressRule.d.ts.map +0 -1
  20. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSchemaRule.d.ts +0 -4
  21. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSchemaRule.d.ts.map +0 -1
  22. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSequenceOrderRule.d.ts +0 -7
  23. package/dist/neutral/Pointer/PayloadRules/Rules/PayloadSequenceOrderRule.d.ts.map +0 -1
  24. package/dist/neutral/Pointer/PayloadRules/Rules/index.d.ts +0 -4
  25. package/dist/neutral/Pointer/PayloadRules/Rules/index.d.ts.map +0 -1
  26. package/dist/neutral/Pointer/PayloadRules/TypePredicates/index.d.ts +0 -4
  27. package/dist/neutral/Pointer/PayloadRules/TypePredicates/index.d.ts.map +0 -1
  28. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.d.ts +0 -4
  29. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.d.ts.map +0 -1
  30. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.d.ts +0 -4
  31. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.d.ts.map +0 -1
  32. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.d.ts +0 -4
  33. package/dist/neutral/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.d.ts.map +0 -1
  34. package/dist/neutral/Pointer/PayloadRules/index.d.ts +0 -5
  35. package/dist/neutral/Pointer/PayloadRules/index.d.ts.map +0 -1
  36. package/dist/neutral/Pointer/Pointer.d.ts +0 -6
  37. package/dist/neutral/Pointer/Pointer.d.ts.map +0 -1
  38. package/dist/neutral/Pointer/index.d.ts +0 -6
  39. package/dist/neutral/Pointer/index.d.ts.map +0 -1
  40. package/dist/neutral/Pointer/isPointerPayload.d.ts +0 -8
  41. package/dist/neutral/Pointer/isPointerPayload.d.ts.map +0 -1
  42. package/dist/neutral/Schema.d.ts +0 -9
  43. package/dist/neutral/Schema.d.ts.map +0 -1
  44. package/dist/neutral/index.d.ts.map +0 -1
@@ -1,5 +1,70 @@
1
- export * from './Config.ts';
2
- export * from './Params.ts';
3
- export * from './Pointer/index.ts';
4
- export * from './Schema.ts';
5
- //# sourceMappingURL=index.d.ts.map
1
+ import { DivinerConfig, DivinerParams } from '@xyo-network/diviner-model';
2
+ import { ModuleIdentifier, AnyConfigSchema } from '@xyo-network/module-model';
3
+ import { BoundWitnessSchema } from '@xyo-network/boundwitness-model';
4
+ import { Sequence, Schema, Payload, PayloadSchema } from '@xyo-network/payload-model';
5
+ import { Order } from '@xyo-network/diviner-payload-model';
6
+ import { Address } from '@xylabs/hex';
7
+
8
+ declare const PayloadPointerDivinerConfigSchema = "network.xyo.diviner.payload.pointer.config";
9
+ type PayloadPointerDivinerConfigSchema = typeof PayloadPointerDivinerConfigSchema;
10
+ type PayloadPointerDivinerConfig = DivinerConfig<{
11
+ boundWitnessDiviner: ModuleIdentifier;
12
+ payloadDiviner: ModuleIdentifier;
13
+ } & {
14
+ schema: PayloadPointerDivinerConfigSchema;
15
+ }>;
16
+
17
+ type PayloadPointerDivinerParams = DivinerParams<AnyConfigSchema<PayloadPointerDivinerConfig>>;
18
+
19
+ interface PayloadAddressRule {
20
+ address: string;
21
+ }
22
+
23
+ interface PayloadSchemaRule {
24
+ schema: string;
25
+ }
26
+
27
+ interface PayloadSequenceOrderRule {
28
+ order?: Order;
29
+ sequence?: Sequence;
30
+ }
31
+
32
+ type PayloadRule = PayloadAddressRule | PayloadSequenceOrderRule | PayloadSchemaRule;
33
+
34
+ interface PayloadSearchCriteria {
35
+ addresses: Address[];
36
+ cursor?: Sequence;
37
+ order: Order;
38
+ schemas: Schema[];
39
+ }
40
+
41
+ declare const isPayloadAddressRule: (rule: PayloadRule) => rule is PayloadAddressRule;
42
+
43
+ declare const isPayloadSchemaRule: (rule: PayloadRule) => rule is PayloadSchemaRule;
44
+
45
+ declare const isPayloadSequenceOrderRule: (rule: PayloadRule) => rule is PayloadSequenceOrderRule;
46
+
47
+ type PointerPayload = Payload<{
48
+ reference: PayloadRule[][];
49
+ }>;
50
+
51
+ type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`;
52
+ declare const BoundWitnessPointerSchema: BoundWitnessPointerSchema;
53
+ type BoundWitnessPointerPayload = PointerPayload & {
54
+ schema: BoundWitnessPointerSchema;
55
+ };
56
+ declare const isBoundWitnessPointer: (x?: Payload | null) => x is BoundWitnessPointerPayload;
57
+
58
+ declare const isPointerPayload: (x?: Payload | null) => x is PointerPayload;
59
+
60
+ type PayloadPointerSchema = `${PayloadSchema}.pointer`;
61
+ declare const PayloadPointerSchema: PayloadPointerSchema;
62
+ type PayloadPointerPayload = PointerPayload & {
63
+ schema: PayloadPointerSchema;
64
+ };
65
+ declare const isPayloadPointer: (x?: Payload | null) => x is PayloadPointerPayload;
66
+
67
+ declare const PayloadPointerDivinerSchema = "network.xyo.diviner.payload.pointer";
68
+ type PayloadPointerDivinerSchema = typeof PayloadPointerDivinerSchema;
69
+
70
+ export { type BoundWitnessPointerPayload, BoundWitnessPointerSchema, type PayloadAddressRule, type PayloadPointerDivinerConfig, PayloadPointerDivinerConfigSchema, type PayloadPointerDivinerParams, PayloadPointerDivinerSchema, type PayloadPointerPayload, PayloadPointerSchema, type PayloadRule, type PayloadSchemaRule, type PayloadSearchCriteria, type PayloadSequenceOrderRule, type PointerPayload, isBoundWitnessPointer, isPayloadAddressRule, isPayloadPointer, isPayloadSchemaRule, isPayloadSequenceOrderRule, isPointerPayload };
@@ -34,8 +34,7 @@ var isPayloadSequenceOrderRule = (rule) => {
34
34
  const { order, sequence } = rule;
35
35
  if (exists(sequence) && !isSequence(sequence)) return false;
36
36
  if (!exists(order) && !exists(sequence)) return false;
37
- if (order && order !== "asc" && order !== "desc") return false;
38
- return true;
37
+ return !(order && order !== "asc" && order !== "desc");
39
38
  };
40
39
  export {
41
40
  BoundWitnessPointerSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Schema.ts","../../src/Config.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":["/**\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 type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\n\nimport { PayloadPointerDivinerSchema } from './Schema.ts'\n\n/**\n * The config schema for the Payload Pointer Diviner\n */\nexport const PayloadPointerDivinerConfigSchema = `${PayloadPointerDivinerSchema}.config`\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","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 { PayloadSchema } from '@xyo-network/payload-model'\n\nimport type { PointerPayload } from './Pointer.ts'\n\nexport type PayloadPointerSchema = `${PayloadSchema}.pointer`\nexport const PayloadPointerSchema: PayloadPointerSchema = `${PayloadSchema}.pointer`\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 type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadSchemaRule } from '../Rules/index.ts'\n\nexport const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {\n return !!(rule as PayloadSchemaRule)?.schema\n}\n","import { exists } from '@xylabs/exists'\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 if (order && order !== 'asc' && order !== 'desc') return false\n // It's a PayloadSequenceOrderRule\n return true\n}\n"],"mappings":";AAGO,IAAM,8BAA8B;;;ACKpC,IAAM,oCAAoC,GAAG,2BAA2B;;;ACR/E,SAAS,0BAA0B;AAM5B,IAAM,4BAAuD,GAAG,kBAAkB;AAUlF,IAAM,wBAAwB,CAAC,MAAwD,GAAG,WAAW;;;ACf5G,SAAS,qBAAqB;AAKvB,IAAM,uBAA6C,GAAG,aAAa;AAUnE,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;;;ACFO,IAAM,sBAAsB,CAAC,SAAiD;AACnF,SAAO,CAAC,CAAE,MAA4B;AACxC;;;ACLA,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,MAAI,SAAS,UAAU,SAAS,UAAU,OAAQ,QAAO;AAEzD,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/Schema.ts","../../src/Config.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":["/**\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 type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\n\nimport { PayloadPointerDivinerSchema } from './Schema.ts'\n\n/**\n * The config schema for the Payload Pointer Diviner\n */\nexport const PayloadPointerDivinerConfigSchema = `${PayloadPointerDivinerSchema}.config`\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","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 { PayloadSchema } from '@xyo-network/payload-model'\n\nimport type { PointerPayload } from './Pointer.ts'\n\nexport type PayloadPointerSchema = `${PayloadSchema}.pointer`\nexport const PayloadPointerSchema: PayloadPointerSchema = `${PayloadSchema}.pointer`\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 type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadSchemaRule } from '../Rules/index.ts'\n\nexport const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {\n return !!(rule as PayloadSchemaRule)?.schema\n}\n","import { exists } from '@xylabs/exists'\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":";AAGO,IAAM,8BAA8B;;;ACKpC,IAAM,oCAAoC,GAAG,2BAA2B;;;ACR/E,SAAS,0BAA0B;AAM5B,IAAM,4BAAuD,GAAG,kBAAkB;AAUlF,IAAM,wBAAwB,CAAC,MAAwD,GAAG,WAAW;;;ACf5G,SAAS,qBAAqB;AAKvB,IAAM,uBAA6C,GAAG,aAAa;AAUnE,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;;;ACFO,IAAM,sBAAsB,CAAC,SAAiD;AACnF,SAAO,CAAC,CAAE,MAA4B;AACxC;;;ACLA,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":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-payload-pointer-model",
3
- "version": "3.7.2",
3
+ "version": "3.8.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -31,15 +31,15 @@
31
31
  "dependencies": {
32
32
  "@xylabs/exists": "^4.5.1",
33
33
  "@xylabs/hex": "^4.5.1",
34
- "@xyo-network/boundwitness-model": "^3.7.2",
35
- "@xyo-network/diviner-model": "^3.7.2",
36
- "@xyo-network/diviner-payload-model": "^3.7.2",
37
- "@xyo-network/module-model": "^3.7.2",
38
- "@xyo-network/payload-model": "^3.7.2"
34
+ "@xyo-network/boundwitness-model": "^3.8.1",
35
+ "@xyo-network/diviner-model": "^3.8.1",
36
+ "@xyo-network/diviner-payload-model": "^3.8.1",
37
+ "@xyo-network/module-model": "^3.8.1",
38
+ "@xyo-network/payload-model": "^3.8.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@xylabs/ts-scripts-yarn3": "^4.2.6",
42
- "@xylabs/tsconfig": "^4.2.6",
41
+ "@xylabs/ts-scripts-yarn3": "^5.0.22",
42
+ "@xylabs/tsconfig": "^5.0.22",
43
43
  "typescript": "^5.7.3"
44
44
  },
45
45
  "publishConfig": {
@@ -11,7 +11,5 @@ export const isPayloadSequenceOrderRule = (rule: PayloadRule): rule is PayloadSe
11
11
  // If neither order or sequence is defined, it's not a PayloadSequenceOrderRule
12
12
  if (!exists(order) && !exists(sequence)) return false
13
13
  // If order is defined, but not a valid order, it's not a PayloadSequenceOrderRule
14
- if (order && order !== 'asc' && order !== 'desc') return false
15
- // It's a PayloadSequenceOrderRule
16
- return true
14
+ return !(order && order !== 'asc' && order !== 'desc')
17
15
  }
@@ -1,26 +0,0 @@
1
- import type { DivinerConfig } from '@xyo-network/diviner-model';
2
- import type { ModuleIdentifier } from '@xyo-network/module-model';
3
- /**
4
- * The config schema for the Payload Pointer Diviner
5
- */
6
- export declare const PayloadPointerDivinerConfigSchema = "network.xyo.diviner.payload.pointer.config";
7
- /**
8
- * The config schema type for the Payload Pointer Diviner
9
- */
10
- export type PayloadPointerDivinerConfigSchema = typeof PayloadPointerDivinerConfigSchema;
11
- /**
12
- * The configuration for the Payload Pointer Diviner
13
- */
14
- export type PayloadPointerDivinerConfig = DivinerConfig<{
15
- /**
16
- * The module identifier of the bound witness diviner
17
- */
18
- boundWitnessDiviner: ModuleIdentifier;
19
- /**
20
- * The module identifier of the payload diviner
21
- */
22
- payloadDiviner: ModuleIdentifier;
23
- } & {
24
- schema: PayloadPointerDivinerConfigSchema;
25
- }>;
26
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
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;AAIjE;;GAEG;AACH,eAAO,MAAM,iCAAiC,+CAA0C,CAAA;AAExF;;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 +0,0 @@
1
- import type { DivinerParams } from '@xyo-network/diviner-model';
2
- import type { AnyConfigSchema } from '@xyo-network/module-model';
3
- import type { PayloadPointerDivinerConfig } from './Config.ts';
4
- /**
5
- * The params type of the Payload Pointer diviner
6
- **/
7
- export type PayloadPointerDivinerParams = DivinerParams<AnyConfigSchema<PayloadPointerDivinerConfig>>;
8
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAE9D;;IAEI;AACJ,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA"}
@@ -1,14 +0,0 @@
1
- import { BoundWitnessSchema } from '@xyo-network/boundwitness-model';
2
- import type { Payload } from '@xyo-network/payload-model';
3
- import type { PointerPayload } from './Pointer.ts';
4
- export type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`;
5
- export declare const BoundWitnessPointerSchema: BoundWitnessPointerSchema;
6
- export type BoundWitnessPointerPayload = PointerPayload & {
7
- schema: BoundWitnessPointerSchema;
8
- };
9
- /**
10
- * Identity function for determining if an object is a BoundWitness Pointer
11
- * @param x The object to check
12
- */
13
- export declare const isBoundWitnessPointer: (x?: Payload | null) => x is BoundWitnessPointerPayload;
14
- //# sourceMappingURL=BoundWitnessPointer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoundWitnessPointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/BoundWitnessPointer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,MAAM,yBAAyB,GAAG,GAAG,kBAAkB,UAAU,CAAA;AACvE,eAAO,MAAM,yBAAyB,EAAE,yBAA2D,CAAA;AAEnG,MAAM,MAAM,0BAA0B,GAAG,cAAc,GAAG;IACxD,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,OAAQ,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,0BAAqE,CAAA"}
@@ -1,14 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model';
2
- import { PayloadSchema } from '@xyo-network/payload-model';
3
- import type { PointerPayload } from './Pointer.ts';
4
- export type PayloadPointerSchema = `${PayloadSchema}.pointer`;
5
- export declare const PayloadPointerSchema: PayloadPointerSchema;
6
- export type PayloadPointerPayload = PointerPayload & {
7
- schema: PayloadPointerSchema;
8
- };
9
- /**
10
- * Identity function for determining if an object is a Payload Pointer
11
- * @param x The object to check
12
- */
13
- export declare const isPayloadPointer: (x?: Payload | null) => x is PayloadPointerPayload;
14
- //# sourceMappingURL=PayloadPointer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadPointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/PayloadPointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,MAAM,oBAAoB,GAAG,GAAG,aAAa,UAAU,CAAA;AAC7D,eAAO,MAAM,oBAAoB,EAAE,oBAAiD,CAAA;AAEpF,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG;IACnD,MAAM,EAAE,oBAAoB,CAAA;CAC7B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,OAAQ,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,qBAA2D,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { PayloadAddressRule, PayloadSchemaRule, PayloadSequenceOrderRule } from './Rules/index.ts';
2
- export type PayloadRule = PayloadAddressRule | PayloadSequenceOrderRule | PayloadSchemaRule;
3
- //# sourceMappingURL=PayloadRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadRule.d.ts","sourceRoot":"","sources":["../../../../src/Pointer/PayloadRules/PayloadRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAChE,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,iBAAiB,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { Address } from '@xylabs/hex';
2
- import type { Order } from '@xyo-network/diviner-payload-model';
3
- import type { Schema, Sequence } from '@xyo-network/payload-model';
4
- export interface PayloadSearchCriteria {
5
- addresses: Address[];
6
- cursor?: Sequence;
7
- order: Order;
8
- schemas: Schema[];
9
- }
10
- //# sourceMappingURL=PayloadSearchCriteria.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadSearchCriteria.d.ts","sourceRoot":"","sources":["../../../../src/Pointer/PayloadRules/PayloadSearchCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAElE,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
@@ -1,4 +0,0 @@
1
- export interface PayloadAddressRule {
2
- address: string;
3
- }
4
- //# sourceMappingURL=PayloadAddressRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadAddressRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/Rules/PayloadAddressRule.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;CAChB"}
@@ -1,4 +0,0 @@
1
- export interface PayloadSchemaRule {
2
- schema: string;
3
- }
4
- //# sourceMappingURL=PayloadSchemaRule.d.ts.map
@@ -1 +0,0 @@
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,7 +0,0 @@
1
- import type { Order } from '@xyo-network/diviner-payload-model';
2
- import type { Sequence } from '@xyo-network/payload-model';
3
- export interface PayloadSequenceOrderRule {
4
- order?: Order;
5
- sequence?: Sequence;
6
- }
7
- //# sourceMappingURL=PayloadSequenceOrderRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadSequenceOrderRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/Rules/PayloadSequenceOrderRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,KAAK,CAAA;IAEb,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB"}
@@ -1,4 +0,0 @@
1
- export * from './PayloadAddressRule.ts';
2
- export * from './PayloadSchemaRule.ts';
3
- export * from './PayloadSequenceOrderRule.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/Rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './isPayloadAddressRule.ts';
2
- export * from './isPayloadSchemaRule.ts';
3
- export * from './isPayloadSequenceOrderRule.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { PayloadRule } from '../PayloadRule.ts';
2
- import type { PayloadAddressRule } from '../Rules/index.ts';
3
- export declare const isPayloadAddressRule: (rule: PayloadRule) => rule is PayloadAddressRule;
4
- //# sourceMappingURL=isPayloadAddressRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPayloadAddressRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,eAAO,MAAM,oBAAoB,SAAU,WAAW,KAAG,IAAI,IAAI,kBAEhE,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { PayloadRule } from '../PayloadRule.ts';
2
- import type { PayloadSchemaRule } from '../Rules/index.ts';
3
- export declare const isPayloadSchemaRule: (rule: PayloadRule) => rule is PayloadSchemaRule;
4
- //# sourceMappingURL=isPayloadSchemaRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPayloadSchemaRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,eAAO,MAAM,mBAAmB,SAAU,WAAW,KAAG,IAAI,IAAI,iBAE/D,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { PayloadRule } from '../PayloadRule.ts';
2
- import type { PayloadSequenceOrderRule } from '../Rules/index.ts';
3
- export declare const isPayloadSequenceOrderRule: (rule: PayloadRule) => rule is PayloadSequenceOrderRule;
4
- //# sourceMappingURL=isPayloadSequenceOrderRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPayloadSequenceOrderRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAEjE,eAAO,MAAM,0BAA0B,SAAU,WAAW,KAAG,IAAI,IAAI,wBAUtE,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './PayloadRule.ts';
2
- export * from './PayloadSearchCriteria.ts';
3
- export * from './Rules/index.ts';
4
- export * from './TypePredicates/index.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Pointer/PayloadRules/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model';
2
- import type { PayloadRule } from './PayloadRules/index.ts';
3
- export type PointerPayload = Payload<{
4
- reference: PayloadRule[][];
5
- }>;
6
- //# sourceMappingURL=Pointer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/Pointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;IACnC,SAAS,EAAE,WAAW,EAAE,EAAE,CAAA;CAC3B,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- export * from './BoundWitnessPointer.ts';
2
- export * from './isPointerPayload.ts';
3
- export * from './PayloadPointer.ts';
4
- export * from './PayloadRules/index.ts';
5
- export * from './Pointer.ts';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pointer/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model';
2
- import type { PointerPayload } from './Pointer.ts';
3
- /**
4
- * Identity function for determining if an object is a Pointer Payload (PayloadPointer or BoundWitnessPointer)
5
- * @param x The object to check
6
- */
7
- export declare const isPointerPayload: (x?: Payload | null) => x is PointerPayload;
8
- //# sourceMappingURL=isPointerPayload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPointerPayload.d.ts","sourceRoot":"","sources":["../../../src/Pointer/isPointerPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAIzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,OAAQ,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,cACoB,CAAA"}
@@ -1,9 +0,0 @@
1
- /**
2
- * The schema used for the Payload Pointer Diviner.
3
- */
4
- export declare const PayloadPointerDivinerSchema = "network.xyo.diviner.payload.pointer";
5
- /**
6
- * The schema type used for the Payload Pointer Diviner.
7
- */
8
- export type PayloadPointerDivinerSchema = typeof PayloadPointerDivinerSchema;
9
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,2BAA2B,wCAAwC,CAAA;AAEhF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA"}