@xyo-network/diviner-payload-pointer-model 5.1.3 → 5.1.5
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPayloadSchemaRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isPayloadSchemaRule.d.ts","sourceRoot":"","sources":["../../../../../src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,eAAO,MAAM,mBAAmB,GAAI,MAAM,WAAW,KAAG,IAAI,IAAI,iBAE/D,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -23,8 +23,9 @@ var isPayloadAddressRule = (rule) => {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
// src/Pointer/PayloadRules/TypePredicates/isPayloadSchemaRule.ts
|
|
26
|
+
import { isString } from "@xylabs/typeof";
|
|
26
27
|
var isPayloadSchemaRule = (rule) => {
|
|
27
|
-
return
|
|
28
|
+
return isString(rule?.schema);
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
// src/Pointer/PayloadRules/TypePredicates/isPayloadSequenceOrderRule.ts
|
|
@@ -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
|
|
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 { isString } from '@xylabs/typeof'\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/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;;;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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-pointer-model",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -35,15 +35,16 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@xylabs/exists": "~5.0.11",
|
|
37
37
|
"@xylabs/hex": "~5.0.11",
|
|
38
|
-
"@
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/diviner-
|
|
41
|
-
"@xyo-network/
|
|
42
|
-
"@xyo-network/
|
|
38
|
+
"@xylabs/typeof": "~5.0.11",
|
|
39
|
+
"@xyo-network/boundwitness-model": "~5.1.5",
|
|
40
|
+
"@xyo-network/diviner-model": "~5.1.5",
|
|
41
|
+
"@xyo-network/diviner-payload-model": "~5.1.5",
|
|
42
|
+
"@xyo-network/module-model": "~5.1.5",
|
|
43
|
+
"@xyo-network/payload-model": "~5.1.5"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "~7.1.
|
|
46
|
-
"@xylabs/tsconfig": "~7.1.
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "~7.1.8",
|
|
47
|
+
"@xylabs/tsconfig": "~7.1.8",
|
|
47
48
|
"typescript": "~5.9.2"
|
|
48
49
|
},
|
|
49
50
|
"publishConfig": {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { isString } from '@xylabs/typeof'
|
|
2
|
+
|
|
1
3
|
import type { PayloadRule } from '../PayloadRule.ts'
|
|
2
4
|
import type { PayloadSchemaRule } from '../Rules/index.ts'
|
|
3
5
|
|
|
4
6
|
export const isPayloadSchemaRule = (rule: PayloadRule): rule is PayloadSchemaRule => {
|
|
5
|
-
return
|
|
7
|
+
return isString((rule as PayloadSchemaRule)?.schema)
|
|
6
8
|
}
|