@xyo-network/diviner-payload-pointer-model 5.3.1 → 5.3.3

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.
@@ -1,8 +1,9 @@
1
- import { BoundWitnessSchema } from '@xyo-network/boundwitness-model';
2
- import type { Payload } from '@xyo-network/payload-model';
1
+ import { type Payload } from '@xyo-network/payload-model';
3
2
  import type { PointerPayload } from './Pointer.ts';
4
- export type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`;
5
- export declare const BoundWitnessPointerSchema: BoundWitnessPointerSchema;
3
+ export declare const BoundWitnessPointerSchema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ export type BoundWitnessPointerSchema = typeof BoundWitnessPointerSchema;
6
7
  export type BoundWitnessPointerPayload = PointerPayload & {
7
8
  schema: BoundWitnessPointerSchema;
8
9
  };
@@ -1 +1 @@
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,GAAI,IAAI,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,0BAAqE,CAAA"}
1
+ {"version":3,"file":"BoundWitnessPointer.d.ts","sourceRoot":"","sources":["../../../src/Pointer/BoundWitnessPointer.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,eAAO,MAAM,yBAAyB;;CAAkD,CAAA;AACxF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,0BAA0B,GAAG,cAAc,GAAG;IACxD,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,IAAI,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,0BAAqE,CAAA"}
@@ -10,12 +10,13 @@ var PayloadPointerDivinerConfigSchema = asSchema2(`${PayloadPointerDivinerSchema
10
10
 
11
11
  // src/Pointer/BoundWitnessPointer.ts
12
12
  import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
13
- var BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`;
13
+ import { asSchema as asSchema3 } from "@xyo-network/payload-model";
14
+ var BoundWitnessPointerSchema = asSchema3(`${BoundWitnessSchema}.pointer`, true);
14
15
  var isBoundWitnessPointer = (x) => x?.schema === BoundWitnessPointerSchema;
15
16
 
16
17
  // src/Pointer/PayloadPointer.ts
17
- import { asSchema as asSchema3, PayloadSchema } from "@xyo-network/payload-model";
18
- var PayloadPointerSchema = asSchema3(`${PayloadSchema}.pointer`, true);
18
+ import { asSchema as asSchema4, PayloadSchema } from "@xyo-network/payload-model";
19
+ var PayloadPointerSchema = asSchema4(`${PayloadSchema}.pointer`, true);
19
20
  var isPayloadPointer = (x) => x?.schema === PayloadPointerSchema;
20
21
 
21
22
  // src/Pointer/isPointerPayload.ts
@@ -1 +1 @@
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","import { asSchema } from '@xyo-network/payload-model'\n\n/**\n * The schema used for the Payload Pointer Diviner.\n */\nexport const PayloadPointerDivinerSchema = asSchema('network.xyo.diviner.payload.pointer', true)\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,YAAAA,iBAAgB;;;ACFzB,SAAS,gBAAgB;AAKlB,IAAM,8BAA8B,SAAS,uCAAuC,IAAI;;;ADIxF,IAAM,oCAAoCC,UAAS,GAAG,2BAA2B,WAAW,IAAI;;;AETvG,SAAS,0BAA0B;AAM5B,IAAM,4BAAuD,GAAG,kBAAkB;AAUlF,IAAM,wBAAwB,CAAC,MAAwD,GAAG,WAAW;;;ACf5G,SAAS,YAAAC,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","asSchema","asSchema"]}
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","import { asSchema } from '@xyo-network/payload-model'\n\n/**\n * The schema used for the Payload Pointer Diviner.\n */\nexport const PayloadPointerDivinerSchema = asSchema('network.xyo.diviner.payload.pointer', true)\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 { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport type { PointerPayload } from './Pointer.ts'\n\nexport const BoundWitnessPointerSchema = asSchema(`${BoundWitnessSchema}.pointer`, true)\nexport type BoundWitnessPointerSchema = typeof BoundWitnessPointerSchema\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,YAAAA,iBAAgB;;;ACFzB,SAAS,gBAAgB;AAKlB,IAAM,8BAA8B,SAAS,uCAAuC,IAAI;;;ADIxF,IAAM,oCAAoCC,UAAS,GAAG,2BAA2B,WAAW,IAAI;;;AETvG,SAAS,0BAA0B;AACnC,SAAS,YAAAC,iBAA8B;AAIhC,IAAM,4BAA4BA,UAAS,GAAG,kBAAkB,YAAY,IAAI;AAWhF,IAAM,wBAAwB,CAAC,MAAwD,GAAG,WAAW;;;ACf5G,SAAS,YAAAC,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","asSchema","asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-payload-pointer-model",
3
- "version": "5.3.1",
3
+ "version": "5.3.3",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -36,12 +36,12 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xylabs/sdk-js": "~5.0.64",
40
- "@xyo-network/boundwitness-model": "~5.3.1",
41
- "@xyo-network/diviner-model": "~5.3.1",
42
- "@xyo-network/diviner-payload-model": "~5.3.1",
43
- "@xyo-network/module-model": "~5.3.1",
44
- "@xyo-network/payload-model": "~5.3.1"
39
+ "@xylabs/sdk-js": "~5.0.79",
40
+ "@xyo-network/boundwitness-model": "~5.3.3",
41
+ "@xyo-network/diviner-model": "~5.3.3",
42
+ "@xyo-network/diviner-payload-model": "~5.3.3",
43
+ "@xyo-network/module-model": "~5.3.3",
44
+ "@xyo-network/payload-model": "~5.3.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@xylabs/ts-scripts-yarn3": "~7.3.2",
@@ -1,10 +1,10 @@
1
1
  import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
2
- import type { Payload } from '@xyo-network/payload-model'
2
+ import { asSchema, type Payload } from '@xyo-network/payload-model'
3
3
 
4
4
  import type { PointerPayload } from './Pointer.ts'
5
5
 
6
- export type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`
7
- export const BoundWitnessPointerSchema: BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`
6
+ export const BoundWitnessPointerSchema = asSchema(`${BoundWitnessSchema}.pointer`, true)
7
+ export type BoundWitnessPointerSchema = typeof BoundWitnessPointerSchema
8
8
 
9
9
  export type BoundWitnessPointerPayload = PointerPayload & {
10
10
  schema: BoundWitnessPointerSchema