@xyo-network/diviner-payload-pointer-model 5.3.22 → 5.3.24

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/diviner-payload-pointer-model",
3
- "version": "5.3.22",
3
+ "version": "5.3.24",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,39 +30,35 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
35
  "!**/*.test.*",
37
36
  "README.md"
38
37
  ],
39
38
  "dependencies": {
40
- "@xyo-network/boundwitness-model": "~5.3.22",
41
- "@xyo-network/diviner-model": "~5.3.22",
42
- "@xyo-network/diviner-payload-model": "~5.3.22",
43
- "@xyo-network/module-model": "~5.3.22",
44
- "@xyo-network/payload-model": "~5.3.22"
39
+ "@xyo-network/diviner-model": "~5.3.24",
40
+ "@xyo-network/boundwitness-model": "~5.3.24",
41
+ "@xyo-network/diviner-payload-model": "~5.3.24",
42
+ "@xyo-network/payload-model": "~5.3.24",
43
+ "@xyo-network/module-model": "~5.3.24"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@opentelemetry/api": "^1.9.1",
48
47
  "@types/node": "^25.5.0",
49
- "@xylabs/sdk-js": "^5.0.91",
50
- "@xylabs/ts-scripts-common": "~7.6.8",
51
- "@xylabs/ts-scripts-yarn3": "~7.6.8",
52
- "@xylabs/tsconfig": "~7.6.8",
53
- "@xyo-network/boundwitness-model": "~5.3.22",
54
- "@xyo-network/diviner-model": "~5.3.22",
55
- "@xyo-network/diviner-payload-model": "~5.3.22",
56
- "@xyo-network/module-model": "~5.3.22",
57
- "@xyo-network/payload-model": "~5.3.22",
48
+ "@xylabs/sdk-js": "^5.0.93",
49
+ "@xylabs/ts-scripts-common": "~7.6.16",
50
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
51
+ "@xylabs/tsconfig": "~7.6.16",
58
52
  "acorn": "^8.16.0",
59
53
  "axios": "^1.14.0",
60
- "cosmiconfig": "^9.0.1",
61
- "esbuild": "^0.27.4",
62
- "eslint": "^10.1.0",
63
- "rollup": "^4.60.1",
54
+ "esbuild": "^0.28.0",
64
55
  "typescript": "~5.9.3",
65
- "zod": "^4.3.6"
56
+ "zod": "^4.3.6",
57
+ "@xyo-network/module-model": "~5.3.24",
58
+ "@xyo-network/diviner-model": "~5.3.24",
59
+ "@xyo-network/payload-model": "~5.3.24",
60
+ "@xyo-network/diviner-payload-model": "~5.3.24",
61
+ "@xyo-network/boundwitness-model": "~5.3.24"
66
62
  },
67
63
  "peerDependencies": {
68
64
  "@xylabs/sdk-js": "^5",
@@ -71,4 +67,4 @@
71
67
  "publishConfig": {
72
68
  "access": "public"
73
69
  }
74
- }
70
+ }
package/src/Config.ts DELETED
@@ -1,31 +0,0 @@
1
- import type { DivinerConfig } from '@xyo-network/diviner-model'
2
- import type { ModuleIdentifier } from '@xyo-network/module-model'
3
- import { asSchema } from '@xyo-network/payload-model'
4
-
5
- import { PayloadPointerDivinerSchema } from './Schema.ts'
6
-
7
- /**
8
- * The config schema for the Payload Pointer Diviner
9
- */
10
- export const PayloadPointerDivinerConfigSchema = asSchema(`${PayloadPointerDivinerSchema}.config`, true)
11
-
12
- /**
13
- * The config schema type for the Payload Pointer Diviner
14
- */
15
- export type PayloadPointerDivinerConfigSchema = typeof PayloadPointerDivinerConfigSchema
16
-
17
- /**
18
- * The configuration for the Payload Pointer Diviner
19
- */
20
- export type PayloadPointerDivinerConfig = DivinerConfig<
21
- {
22
- /**
23
- * The module identifier of the bound witness diviner
24
- */
25
- boundWitnessDiviner: ModuleIdentifier
26
- /**
27
- * The module identifier of the payload diviner
28
- */
29
- payloadDiviner: ModuleIdentifier
30
- } & { schema: PayloadPointerDivinerConfigSchema }
31
- >
package/src/Params.ts DELETED
@@ -1,9 +0,0 @@
1
- import type { DivinerParams } from '@xyo-network/diviner-model'
2
- import type { AnyConfigSchema } from '@xyo-network/module-model'
3
-
4
- import type { PayloadPointerDivinerConfig } from './Config.ts'
5
-
6
- /**
7
- * The params type of the Payload Pointer diviner
8
- **/
9
- export type PayloadPointerDivinerParams = DivinerParams<AnyConfigSchema<PayloadPointerDivinerConfig>>
@@ -1,17 +0,0 @@
1
- import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
2
- import { asSchema, type Payload } from '@xyo-network/payload-model'
3
-
4
- import type { PointerPayload } from './Pointer.ts'
5
-
6
- export const BoundWitnessPointerSchema = asSchema(`${BoundWitnessSchema}.pointer`, true)
7
- export type BoundWitnessPointerSchema = typeof BoundWitnessPointerSchema
8
-
9
- export type BoundWitnessPointerPayload = PointerPayload & {
10
- schema: BoundWitnessPointerSchema
11
- }
12
-
13
- /**
14
- * Identity function for determining if an object is a BoundWitness Pointer
15
- * @param x The object to check
16
- */
17
- export const isBoundWitnessPointer = (x?: Payload | null): x is BoundWitnessPointerPayload => x?.schema === BoundWitnessPointerSchema
@@ -1,17 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
- import { asSchema, PayloadSchema } from '@xyo-network/payload-model'
3
-
4
- import type { PointerPayload } from './Pointer.ts'
5
-
6
- export const PayloadPointerSchema = asSchema(`${PayloadSchema}.pointer`, true)
7
- export type PayloadPointerSchema = typeof PayloadPointerSchema
8
-
9
- export type PayloadPointerPayload = PointerPayload & {
10
- schema: PayloadPointerSchema
11
- }
12
-
13
- /**
14
- * Identity function for determining if an object is a Payload Pointer
15
- * @param x The object to check
16
- */
17
- export const isPayloadPointer = (x?: Payload | null): x is PayloadPointerPayload => x?.schema === PayloadPointerSchema
@@ -1,5 +0,0 @@
1
- import type {
2
- PayloadAddressRule, PayloadSchemaRule, PayloadSequenceOrderRule,
3
- } from './Rules/index.ts'
4
-
5
- export type PayloadRule = PayloadAddressRule | PayloadSequenceOrderRule | PayloadSchemaRule
@@ -1,10 +0,0 @@
1
- import type { Address } from '@xylabs/sdk-js'
2
- import type { Order } from '@xyo-network/diviner-payload-model'
3
- import type { Schema, Sequence } from '@xyo-network/payload-model'
4
-
5
- export interface PayloadSearchCriteria {
6
- addresses: Address[]
7
- cursor?: Sequence
8
- order: Order
9
- schemas: Schema[]
10
- }
@@ -1,3 +0,0 @@
1
- export interface PayloadAddressRule {
2
- address: string
3
- }
@@ -1,5 +0,0 @@
1
- import type { Schema } from '@xyo-network/payload-model'
2
-
3
- export interface PayloadSchemaRule {
4
- schema: Schema
5
- }
@@ -1,8 +0,0 @@
1
- import type { Order } from '@xyo-network/diviner-payload-model'
2
- import type { Sequence } from '@xyo-network/payload-model'
3
-
4
- export interface PayloadSequenceOrderRule {
5
- order?: Order
6
- // timestamp: number
7
- sequence?: Sequence
8
- }
@@ -1,3 +0,0 @@
1
- export * from './PayloadAddressRule.ts'
2
- export * from './PayloadSchemaRule.ts'
3
- export * from './PayloadSequenceOrderRule.ts'
@@ -1,3 +0,0 @@
1
- export * from './isPayloadAddressRule.ts'
2
- export * from './isPayloadSchemaRule.ts'
3
- export * from './isPayloadSequenceOrderRule.ts'
@@ -1,6 +0,0 @@
1
- import type { PayloadRule } from '../PayloadRule.ts'
2
- import type { PayloadAddressRule } from '../Rules/index.ts'
3
-
4
- export const isPayloadAddressRule = (rule: PayloadRule): rule is PayloadAddressRule => {
5
- return !!(rule as PayloadAddressRule)?.address
6
- }
@@ -1,8 +0,0 @@
1
- import { isString } from '@xylabs/sdk-js'
2
-
3
- import type { PayloadRule } from '../PayloadRule.ts'
4
- import type { PayloadSchemaRule } from '../Rules/index.ts'
5
-
6
- export const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {
7
- return isString((rule as PayloadSchemaRule)?.schema)
8
- }
@@ -1,15 +0,0 @@
1
- import { exists } from '@xylabs/sdk-js'
2
- import { isSequence } from '@xyo-network/payload-model'
3
-
4
- import type { PayloadRule } from '../PayloadRule.ts'
5
- import type { PayloadSequenceOrderRule } from '../Rules/index.ts'
6
-
7
- export const isPayloadSequenceOrderRule = (rule: PayloadRule): rule is PayloadSequenceOrderRule => {
8
- const { order, sequence } = rule as Partial<PayloadSequenceOrderRule>
9
- // If sequence is defined, but not a sequence, it's not a PayloadSequenceOrderRule
10
- if (exists(sequence) && !isSequence(sequence)) return false
11
- // If neither order or sequence is defined, it's not a PayloadSequenceOrderRule
12
- if (!exists(order) && !exists(sequence)) return false
13
- // If order is defined, but not a valid order, it's not a PayloadSequenceOrderRule
14
- return !(order && order !== 'asc' && order !== 'desc')
15
- }
@@ -1,4 +0,0 @@
1
- export * from './PayloadRule.ts'
2
- export * from './PayloadSearchCriteria.ts'
3
- export * from './Rules/index.ts'
4
- export * from './TypePredicates/index.ts'
@@ -1,7 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
-
3
- import type { PayloadRule } from './PayloadRules/index.ts'
4
-
5
- export type PointerPayload = Payload<{
6
- reference: PayloadRule[][]
7
- }>
@@ -1,5 +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'
@@ -1,12 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
-
3
- import { BoundWitnessPointerSchema } from './BoundWitnessPointer.ts'
4
- import { PayloadPointerSchema } from './PayloadPointer.ts'
5
- import type { PointerPayload } from './Pointer.ts'
6
-
7
- /**
8
- * Identity function for determining if an object is a Pointer Payload (PayloadPointer or BoundWitnessPointer)
9
- * @param x The object to check
10
- */
11
- export const isPointerPayload = (x?: Payload | null): x is PointerPayload =>
12
- x?.schema === PayloadPointerSchema || x?.schema === BoundWitnessPointerSchema
package/src/Schema.ts DELETED
@@ -1,11 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- /**
4
- * The schema used for the Payload Pointer Diviner.
5
- */
6
- export const PayloadPointerDivinerSchema = asSchema('network.xyo.diviner.payload.pointer', true)
7
-
8
- /**
9
- * The schema type used for the Payload Pointer Diviner.
10
- */
11
- export type PayloadPointerDivinerSchema = typeof PayloadPointerDivinerSchema
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './Config.ts'
2
- export * from './Params.ts'
3
- export * from './Pointer/index.ts'
4
- export * from './Schema.ts'