@xyo-network/diviner-payload-pointer-model 5.3.22 → 5.3.25
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 +18 -22
- package/src/Config.ts +0 -31
- package/src/Params.ts +0 -9
- package/src/Pointer/BoundWitnessPointer.ts +0 -17
- package/src/Pointer/PayloadPointer.ts +0 -17
- package/src/Pointer/PayloadRules/PayloadRule.ts +0 -5
- package/src/Pointer/PayloadRules/PayloadSearchCriteria.ts +0 -10
- package/src/Pointer/PayloadRules/Rules/PayloadAddressRule.ts +0 -3
- package/src/Pointer/PayloadRules/Rules/PayloadSchemaRule.ts +0 -5
- package/src/Pointer/PayloadRules/Rules/PayloadSequenceOrderRule.ts +0 -8
- package/src/Pointer/PayloadRules/Rules/index.ts +0 -3
- package/src/Pointer/PayloadRules/TypePredicates/index.ts +0 -3
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.ts +0 -6
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts +0 -8
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.ts +0 -15
- package/src/Pointer/PayloadRules/index.ts +0 -4
- package/src/Pointer/Pointer.ts +0 -7
- package/src/Pointer/index.ts +0 -5
- package/src/Pointer/isPointerPayload.ts +0 -12
- package/src/Schema.ts +0 -11
- package/src/index.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-pointer-model",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.25",
|
|
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/
|
|
41
|
-
"@xyo-network/
|
|
42
|
-
"@xyo-network/
|
|
43
|
-
"@xyo-network/
|
|
44
|
-
"@xyo-network/
|
|
39
|
+
"@xyo-network/diviner-model": "~5.3.25",
|
|
40
|
+
"@xyo-network/boundwitness-model": "~5.3.25",
|
|
41
|
+
"@xyo-network/payload-model": "~5.3.25",
|
|
42
|
+
"@xyo-network/diviner-payload-model": "~5.3.25",
|
|
43
|
+
"@xyo-network/module-model": "~5.3.25"
|
|
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.
|
|
50
|
-
"@xylabs/ts-scripts-common": "~7.6.
|
|
51
|
-
"@xylabs/ts-scripts-
|
|
52
|
-
"@xylabs/tsconfig": "~7.6.
|
|
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
|
-
"
|
|
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/boundwitness-model": "~5.3.25",
|
|
58
|
+
"@xyo-network/diviner-model": "~5.3.25",
|
|
59
|
+
"@xyo-network/module-model": "~5.3.25",
|
|
60
|
+
"@xyo-network/diviner-payload-model": "~5.3.25",
|
|
61
|
+
"@xyo-network/payload-model": "~5.3.25"
|
|
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,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,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
|
-
}
|
package/src/Pointer/Pointer.ts
DELETED
package/src/Pointer/index.ts
DELETED
|
@@ -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