@xyo-network/diviner-payload-pointer-model 3.0.2 → 3.0.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.
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/Config.ts +2 -2
- package/src/Params.ts +3 -3
- package/src/Pointer/BoundWitnessPointer.ts +2 -2
- package/src/Pointer/PayloadPointer.ts +3 -2
- package/src/Pointer/PayloadRules/PayloadRule.ts +1 -1
- package/src/Pointer/PayloadRules/PayloadSearchCriteria.ts +3 -3
- package/src/Pointer/PayloadRules/Rules/PayloadTimestampDirectionRule.ts +1 -1
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadAddressRule.ts +2 -2
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts +2 -2
- package/src/Pointer/PayloadRules/TypePredicates/isPayloadTimestampDirectionRule.ts +2 -2
- package/src/Pointer/Pointer.ts +2 -2
- package/src/Pointer/isPointerPayload.ts +2 -2
- package/xy.config.ts +1 -1
|
@@ -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/isPayloadTimestampDirectionRule.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 { DivinerConfig } from '@xyo-network/diviner-model'\nimport { 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 { Payload } from '@xyo-network/payload-model'\n\nimport { 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 { Payload
|
|
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/isPayloadTimestampDirectionRule.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 type { PayloadRule } from '../PayloadRule.ts'\nimport type { PayloadTimestampOrderRule } from '../Rules/index.ts'\n\nexport const isPayloadTimestampOrderRule = (rule: PayloadRule): rule is PayloadTimestampOrderRule => {\n return typeof (rule as PayloadTimestampOrderRule)?.timestamp === 'number'\n}\n"],"mappings":";;;;AAGO,IAAMA,8BAA8B;;;ACKpC,IAAMC,oCAAoC,GAAGC,2BAAAA;;;ACRpD,SAASC,0BAA0B;AAM5B,IAAMC,4BAAuD,GAAGC,kBAAAA;AAUhE,IAAMC,wBAAwB,wBAACC,MAAwDA,GAAGC,WAAWJ,2BAAvE;;;ACfrC,SAASK,qBAAqB;AAKvB,IAAMC,uBAA6C,GAAGC,aAAAA;AAUtD,IAAMC,mBAAmB,wBAACC,MAAmDA,GAAGC,WAAWJ,sBAAlE;;;ACNzB,IAAMK,mBAAmB,wBAACC,MAC/BA,GAAGC,WAAWC,wBAAwBF,GAAGC,WAAWE,2BADtB;;;ACPzB,IAAMC,uBAAuB,wBAACC,SAAAA;AACnC,SAAO,CAAC,CAAEA,MAA6BC;AACzC,GAFoC;;;ACA7B,IAAMC,sBAAsB,wBAACC,SAAAA;AAClC,SAAO,CAAC,CAAEA,MAA4BC;AACxC,GAFmC;;;ACA5B,IAAMC,8BAA8B,wBAACC,SAAAA;AAC1C,SAAO,OAAQA,MAAoCC,cAAc;AACnE,GAF2C;","names":["PayloadPointerDivinerSchema","PayloadPointerDivinerConfigSchema","PayloadPointerDivinerSchema","BoundWitnessSchema","BoundWitnessPointerSchema","BoundWitnessSchema","isBoundWitnessPointer","x","schema","PayloadSchema","PayloadPointerSchema","PayloadSchema","isPayloadPointer","x","schema","isPointerPayload","x","schema","PayloadPointerSchema","BoundWitnessPointerSchema","isPayloadAddressRule","rule","address","isPayloadSchemaRule","rule","schema","isPayloadTimestampOrderRule","rule","timestamp"]}
|
package/package.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
},
|
|
8
8
|
"bugs": {
|
|
9
9
|
"email": "support@xyo.network",
|
|
10
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
10
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/hex": "^4.0.
|
|
14
|
-
"@xyo-network/boundwitness-model": "^3.0.
|
|
15
|
-
"@xyo-network/diviner-model": "^3.0.
|
|
16
|
-
"@xyo-network/diviner-payload-model": "^3.0.
|
|
17
|
-
"@xyo-network/module-model": "^3.0.
|
|
18
|
-
"@xyo-network/payload-model": "^3.0.
|
|
13
|
+
"@xylabs/hex": "^4.0.2",
|
|
14
|
+
"@xyo-network/boundwitness-model": "^3.0.3",
|
|
15
|
+
"@xyo-network/diviner-model": "^3.0.3",
|
|
16
|
+
"@xyo-network/diviner-payload-model": "^3.0.3",
|
|
17
|
+
"@xyo-network/module-model": "^3.0.3",
|
|
18
|
+
"@xyo-network/payload-model": "^3.0.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.
|
|
22
|
-
"@xylabs/tsconfig": "^4.0.0-rc.
|
|
21
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
|
|
22
|
+
"@xylabs/tsconfig": "^4.0.0-rc.20",
|
|
23
23
|
"typescript": "^5.5.4"
|
|
24
24
|
},
|
|
25
25
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
42
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
|
-
"version": "3.0.
|
|
45
|
+
"version": "3.0.3",
|
|
46
46
|
"type": "module"
|
|
47
47
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DivinerConfig } from '@xyo-network/diviner-model'
|
|
2
|
-
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
1
|
+
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
2
|
+
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
4
|
import { PayloadPointerDivinerSchema } from './Schema.ts'
|
|
5
5
|
|
package/src/Params.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
-
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
1
|
+
import type { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
|
-
import { PayloadPointerDivinerConfig } from './Config.ts'
|
|
4
|
+
import type { PayloadPointerDivinerConfig } from './Config.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The params type of the Payload Pointer diviner
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import { PointerPayload } from './Pointer.ts'
|
|
4
|
+
import type { PointerPayload } from './Pointer.ts'
|
|
5
5
|
|
|
6
6
|
export type BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`
|
|
7
7
|
export const BoundWitnessPointerSchema: BoundWitnessPointerSchema = `${BoundWitnessSchema}.pointer`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Payload
|
|
1
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
2
|
+
import { PayloadSchema } from '@xyo-network/payload-model'
|
|
2
3
|
|
|
3
|
-
import { PointerPayload } from './Pointer.ts'
|
|
4
|
+
import type { PointerPayload } from './Pointer.ts'
|
|
4
5
|
|
|
5
6
|
export type PayloadPointerSchema = `${PayloadSchema}.pointer`
|
|
6
7
|
export const PayloadPointerSchema: PayloadPointerSchema = `${PayloadSchema}.pointer`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PayloadAddressRule, PayloadSchemaRule, PayloadTimestampOrderRule } from './Rules/index.ts'
|
|
1
|
+
import type { PayloadAddressRule, PayloadSchemaRule, PayloadTimestampOrderRule } from './Rules/index.ts'
|
|
2
2
|
|
|
3
3
|
export type PayloadRule = PayloadAddressRule | PayloadTimestampOrderRule | PayloadSchemaRule
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Address } from '@xylabs/hex'
|
|
2
|
-
import { Order } from '@xyo-network/diviner-payload-model'
|
|
3
|
-
import { Schema } from '@xyo-network/payload-model'
|
|
1
|
+
import type { Address } from '@xylabs/hex'
|
|
2
|
+
import type { Order } from '@xyo-network/diviner-payload-model'
|
|
3
|
+
import type { Schema } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
5
|
export interface PayloadSearchCriteria {
|
|
6
6
|
addresses: Address[]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
-
import { PayloadAddressRule } from '../Rules/index.ts'
|
|
1
|
+
import type { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
+
import type { PayloadAddressRule } from '../Rules/index.ts'
|
|
3
3
|
|
|
4
4
|
export const isPayloadAddressRule = (rule: PayloadRule): rule is PayloadAddressRule => {
|
|
5
5
|
return !!(rule as PayloadAddressRule)?.address
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
-
import { PayloadSchemaRule } from '../Rules/index.ts'
|
|
1
|
+
import type { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
+
import type { PayloadSchemaRule } from '../Rules/index.ts'
|
|
3
3
|
|
|
4
4
|
export const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {
|
|
5
5
|
return !!(rule as PayloadSchemaRule)?.schema
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
-
import { PayloadTimestampOrderRule } from '../Rules/index.ts'
|
|
1
|
+
import type { PayloadRule } from '../PayloadRule.ts'
|
|
2
|
+
import type { PayloadTimestampOrderRule } from '../Rules/index.ts'
|
|
3
3
|
|
|
4
4
|
export const isPayloadTimestampOrderRule = (rule: PayloadRule): rule is PayloadTimestampOrderRule => {
|
|
5
5
|
return typeof (rule as PayloadTimestampOrderRule)?.timestamp === 'number'
|
package/src/Pointer/Pointer.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
1
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
import { PayloadRule } from './PayloadRules/index.ts'
|
|
3
|
+
import type { PayloadRule } from './PayloadRules/index.ts'
|
|
4
4
|
|
|
5
5
|
export type PointerPayload = Payload<{
|
|
6
6
|
reference: PayloadRule[][]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
1
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import { BoundWitnessPointerSchema } from './BoundWitnessPointer.ts'
|
|
4
4
|
import { PayloadPointerSchema } from './PayloadPointer.ts'
|
|
5
|
-
import { PointerPayload } from './Pointer.ts'
|
|
5
|
+
import type { PointerPayload } from './Pointer.ts'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Identity function for determining if an object is a Pointer Payload (PayloadPointer or BoundWitnessPointer)
|
package/xy.config.ts
CHANGED