@xyo-network/diviner-boundwitness 5.6.3 → 6.0.0

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.
@@ -19,4 +19,4 @@ var BoundWitnessDiviner = class extends AbstractDiviner {
19
19
  export {
20
20
  BoundWitnessDiviner
21
21
  };
22
- //# sourceMappingURL=abstract.mjs.map
22
+ //# sourceMappingURL=abstract.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/BoundWitnessDiviner.ts","../../src/Config.ts","../../src/Schema.ts"],"sourcesContent":["import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n"],"mappings":";AACA,SAAS,uBAAuB;;;ACAhC,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;ADI5F,IAAe,sBAAf,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AACzD;","names":["asSchema","asSchema"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/BoundWitnessDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts"],
4
+ "sourcesContent": ["import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n", "import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n"],
5
+ "mappings": ";AACA,SAAS,uBAAuB;;;ACAhC,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;ADI5F,IAAe,sBAAf,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AACzD;",
6
+ "names": ["asSchema", "asSchema"]
7
+ }
@@ -90,4 +90,4 @@ export {
90
90
  applyBoundWitnessDivinerQueryPayload,
91
91
  isBoundWitnessDivinerQueryPayload
92
92
  };
93
- //# sourceMappingURL=index.mjs.map
93
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/BoundWitnessDiviner.ts","../../src/Config.ts","../../src/Schema.ts","../../src/applyBoundWitnessDivinerQueryPayload.ts","../../src/MemoryBoundWitnessDiviner.ts","../../src/Query.ts"],"sourcesContent":["import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n","import {\n assertEx, containsAll,\n exists, hexFromHexString,\n} from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type {\n Payload,\n WithStorageMeta,\n} from '@xyo-network/payload-model'\nimport { SequenceConstants } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\n// eslint-disable-next-line complexity\nexport const applyBoundWitnessDivinerQueryPayload = (filter?: BoundWitnessDivinerQueryPayload, payloads: WithStorageMeta<Payload>[] = []): BoundWitness[] => {\n if (!filter) return []\n const {\n addresses, cursor, destination, limit, order = 'desc', payload_hashes, payload_schemas, sourceQuery,\n } = filter\n\n const sortedPayloads = PayloadBuilder.sortByStorageMeta(payloads, order === 'desc' ? -1 : 1)\n const parsedCursor = cursor === undefined ? (order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence : cursor\n const parsedOffset = (order === 'desc')\n ? sortedPayloads.findIndex(bw => bw._sequence < parsedCursor)\n : sortedPayloads.findIndex(bw => bw._sequence > parsedCursor)\n if (parsedOffset === -1) return []\n const payloadSubset = sortedPayloads.slice(parsedOffset)\n\n let bws = payloadSubset.filter(isBoundWitness)\n const allAddresses = addresses?.map(address => hexFromHexString(address)).filter(exists)\n if (allAddresses?.length) bws = bws.filter(bw => containsAll(bw.addresses, allAddresses))\n if (payload_hashes?.length) bws = bws.filter(bw => containsAll(bw.payload_hashes, payload_hashes))\n if (payload_schemas?.length) bws = bws.filter(bw => containsAll(bw.payload_schemas, payload_schemas))\n if (sourceQuery) bws = bws.filter(bw => bw?.$sourceQuery === sourceQuery)\n // If there's a destination filter of the right kind\n if (destination && Array.isArray(destination) && destination?.length > 0) {\n const targetFilter = assertEx(destination, () => 'Missing destination')\n // Find all BWs that satisfy the destination constraint\n bws = bws.filter((bw) => {\n const targetDestinationField = (bw as { $destination?: string | string[] })?.$destination\n // If the destination field is an array and contains at least one element\n return targetDestinationField !== undefined && Array.isArray(targetDestinationField) && targetDestinationField.length > 0\n // Check that the targetDestinationField contains all the elements in the targetFilter\n ? containsAll(targetFilter, targetDestinationField ?? [])\n // Otherwise, filter it out\n : false\n })\n }\n const parsedLimit = limit ?? bws.length\n return bws.slice(0, parsedLimit)\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport { applyBoundWitnessDivinerQueryPayload } from './applyBoundWitnessDivinerQueryPayload.ts'\nimport { BoundWitnessDiviner } from './BoundWitnessDiviner.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport { type BoundWitnessDivinerQueryPayload, isBoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport interface EqualityComparisonOperators {\n /**\n * 'Not Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value does not match the provided string.\n * Example: field != 'value'\n */\n '!=': string\n\n /**\n * 'Less Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than the provided string.\n * Example: field < 'value'\n */\n '<': string\n\n /**\n * 'Less Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than or equal to the provided string.\n * Example: field <= 'value'\n */\n '<=': string\n\n /**\n * 'Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value matches the provided string exactly.\n * Example: field = 'value'\n */\n '=': string\n\n /**\n * 'Greater Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than the provided string.\n * Example: field > 'value'\n */\n '>': string\n\n /**\n * 'Greater Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than or equal to the provided string.\n * Example: field >= 'value'\n */\n '>=': string\n}\n\nexport class MemoryBoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n> extends BoundWitnessDiviner<TParams, TIn, TOut> {\n protected override async divineHandler(payloads?: TIn[]) {\n const filter = assertEx(payloads?.filter(isBoundWitnessDivinerQueryPayload)?.pop(), () => 'Missing query payload')\n if (!filter) return []\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const bws = ((await archivist?.next({ limit: 10_000 })) ?? []).filter(x => isBoundWitness(x) && isStorageMeta(x))\n return applyBoundWitnessDivinerQueryPayload(filter, bws) as TOut[]\n }\n}\n","import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],"mappings":";AACA,SAAS,uBAAuB;;;ACAhC,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;ADI5F,IAAe,sBAAf,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AACzD;;;AGrBA;AAAA,EACE;AAAA,EAAU;AAAA,EACV;AAAA,EAAQ;AAAA,OACH;AACP,SAA4B,sBAAsB;AAClD,SAAS,sBAAsB;AAK/B,SAAS,yBAAyB;AAK3B,IAAM,uCAAuC,CAAC,QAA0C,WAAuC,CAAC,MAAsB;AAC3J,MAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,QAAM;AAAA,IACJ;AAA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MAAM,GAAG,WAAW;AACjC;;;ACnDA,SAAS,YAAAC,iBAAgB;AACzB,SAA4B,kBAAAC,uBAAsB;AAClD,SAAS,qBAAqB;;;ACD9B,SAAS,YAAAC,WAAU,6BAA6B;AAKzC,IAAM,iCAAiCC,UAAS,GAAG,yBAAyB,UAAU,IAAI;AAI1F,IAAM,oCAAoC,sBAAuD,8BAA8B;;;ADiD/H,IAAM,4BAAN,cAIG,oBAAwC;AAAA,EAChD,MAAyB,cAAc,UAAkB;AACvD,UAAM,SAASC,UAAS,UAAU,OAAO,iCAAiC,GAAG,IAAI,GAAG,MAAM,uBAAuB;AACjH,QAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,UAAM,YAAYA,UAAS,MAAM,KAAK,kBAAkB,GAAG,MAAM,6BAA6B;AAC9F,UAAM,OAAQ,MAAM,WAAW,KAAK,EAAE,OAAO,IAAO,CAAC,KAAM,CAAC,GAAG,OAAO,OAAKC,gBAAe,CAAC,KAAK,cAAc,CAAC,CAAC;AAChH,WAAO,qCAAqC,QAAQ,GAAG;AAAA,EACzD;AACF;","names":["asSchema","asSchema","assertEx","isBoundWitness","asSchema","asSchema","assertEx","isBoundWitness"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/BoundWitnessDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts", "../../src/applyBoundWitnessDivinerQueryPayload.ts", "../../src/MemoryBoundWitnessDiviner.ts", "../../src/Query.ts"],
4
+ "sourcesContent": ["import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n", "import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n", "import {\n assertEx, containsAll,\n exists, hexFromHexString,\n} from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type {\n Payload,\n WithStorageMeta,\n} from '@xyo-network/payload-model'\nimport { SequenceConstants } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\n// eslint-disable-next-line complexity\nexport const applyBoundWitnessDivinerQueryPayload = (filter?: BoundWitnessDivinerQueryPayload, payloads: WithStorageMeta<Payload>[] = []): BoundWitness[] => {\n if (!filter) return []\n const {\n addresses, cursor, destination, limit, order = 'desc', payload_hashes, payload_schemas, sourceQuery,\n } = filter\n\n const sortedPayloads = PayloadBuilder.sortByStorageMeta(payloads, order === 'desc' ? -1 : 1)\n const parsedCursor = cursor === undefined ? (order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence : cursor\n const parsedOffset = (order === 'desc')\n ? sortedPayloads.findIndex(bw => bw._sequence < parsedCursor)\n : sortedPayloads.findIndex(bw => bw._sequence > parsedCursor)\n if (parsedOffset === -1) return []\n const payloadSubset = sortedPayloads.slice(parsedOffset)\n\n let bws = payloadSubset.filter(isBoundWitness)\n const allAddresses = addresses?.map(address => hexFromHexString(address)).filter(exists)\n if (allAddresses?.length) bws = bws.filter(bw => containsAll(bw.addresses, allAddresses))\n if (payload_hashes?.length) bws = bws.filter(bw => containsAll(bw.payload_hashes, payload_hashes))\n if (payload_schemas?.length) bws = bws.filter(bw => containsAll(bw.payload_schemas, payload_schemas))\n if (sourceQuery) bws = bws.filter(bw => bw?.$sourceQuery === sourceQuery)\n // If there's a destination filter of the right kind\n if (destination && Array.isArray(destination) && destination?.length > 0) {\n const targetFilter = assertEx(destination, () => 'Missing destination')\n // Find all BWs that satisfy the destination constraint\n bws = bws.filter((bw) => {\n const targetDestinationField = (bw as { $destination?: string | string[] })?.$destination\n // If the destination field is an array and contains at least one element\n return targetDestinationField !== undefined && Array.isArray(targetDestinationField) && targetDestinationField.length > 0\n // Check that the targetDestinationField contains all the elements in the targetFilter\n ? containsAll(targetFilter, targetDestinationField ?? [])\n // Otherwise, filter it out\n : false\n })\n }\n const parsedLimit = limit ?? bws.length\n return bws.slice(0, parsedLimit)\n}\n", "import { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport { applyBoundWitnessDivinerQueryPayload } from './applyBoundWitnessDivinerQueryPayload.ts'\nimport { BoundWitnessDiviner } from './BoundWitnessDiviner.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport { type BoundWitnessDivinerQueryPayload, isBoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport interface EqualityComparisonOperators {\n /**\n * 'Not Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value does not match the provided string.\n * Example: field != 'value'\n */\n '!=': string\n\n /**\n * 'Less Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than the provided string.\n * Example: field < 'value'\n */\n '<': string\n\n /**\n * 'Less Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than or equal to the provided string.\n * Example: field <= 'value'\n */\n '<=': string\n\n /**\n * 'Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value matches the provided string exactly.\n * Example: field = 'value'\n */\n '=': string\n\n /**\n * 'Greater Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than the provided string.\n * Example: field > 'value'\n */\n '>': string\n\n /**\n * 'Greater Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than or equal to the provided string.\n * Example: field >= 'value'\n */\n '>=': string\n}\n\nexport class MemoryBoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n> extends BoundWitnessDiviner<TParams, TIn, TOut> {\n protected override async divineHandler(payloads?: TIn[]) {\n const filter = assertEx(payloads?.filter(isBoundWitnessDivinerQueryPayload)?.pop(), () => 'Missing query payload')\n if (!filter) return []\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const bws = ((await archivist?.next({ limit: 10_000 })) ?? []).filter(x => isBoundWitness(x) && isStorageMeta(x))\n return applyBoundWitnessDivinerQueryPayload(filter, bws) as TOut[]\n }\n}\n", "import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],
5
+ "mappings": ";AACA,SAAS,uBAAuB;;;ACAhC,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;ADI5F,IAAe,sBAAf,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AACzD;;;AGrBA;AAAA,EACE;AAAA,EAAU;AAAA,EACV;AAAA,EAAQ;AAAA,OACH;AACP,SAA4B,sBAAsB;AAClD,SAAS,sBAAsB;AAK/B,SAAS,yBAAyB;AAK3B,IAAM,uCAAuC,CAAC,QAA0C,WAAuC,CAAC,MAAsB;AAC3J,MAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,QAAM;AAAA,IACJ;AAAA,IAAW;AAAA,IAAQ;AAAA,IAAa;AAAA,IAAO,QAAQ;AAAA,IAAQ;AAAA,IAAgB;AAAA,IAAiB;AAAA,EAC1F,IAAI;AAEJ,QAAM,iBAAiB,eAAe,kBAAkB,UAAU,UAAU,SAAS,KAAK,CAAC;AAC3F,QAAM,eAAe,WAAW,SAAa,UAAU,SAAU,kBAAkB,mBAAmB,kBAAkB,mBAAmB;AAC3I,QAAM,eAAgB,UAAU,SAC5B,eAAe,UAAU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,UAAkB;AACvD,UAAM,SAASC,UAAS,UAAU,OAAO,iCAAiC,GAAG,IAAI,GAAG,MAAM,uBAAuB;AACjH,QAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,UAAM,YAAYA,UAAS,MAAM,KAAK,kBAAkB,GAAG,MAAM,6BAA6B;AAC9F,UAAM,OAAQ,MAAM,WAAW,KAAK,EAAE,OAAO,IAAO,CAAC,KAAM,CAAC,GAAG,OAAO,OAAKC,gBAAe,CAAC,KAAK,cAAc,CAAC,CAAC;AAChH,WAAO,qCAAqC,QAAQ,GAAG;AAAA,EACzD;AACF;",
6
+ "names": ["asSchema", "asSchema", "assertEx", "isBoundWitness", "asSchema", "asSchema", "assertEx", "isBoundWitness"]
7
+ }
@@ -85,4 +85,4 @@ export {
85
85
  MemoryBoundWitnessDiviner,
86
86
  applyBoundWitnessDivinerQueryPayload
87
87
  };
88
- //# sourceMappingURL=memory.mjs.map
88
+ //# sourceMappingURL=memory.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/applyBoundWitnessDivinerQueryPayload.ts","../../src/MemoryBoundWitnessDiviner.ts","../../src/BoundWitnessDiviner.ts","../../src/Config.ts","../../src/Schema.ts","../../src/Query.ts"],"sourcesContent":["import {\n assertEx, containsAll,\n exists, hexFromHexString,\n} from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type {\n Payload,\n WithStorageMeta,\n} from '@xyo-network/payload-model'\nimport { SequenceConstants } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\n// eslint-disable-next-line complexity\nexport const applyBoundWitnessDivinerQueryPayload = (filter?: BoundWitnessDivinerQueryPayload, payloads: WithStorageMeta<Payload>[] = []): BoundWitness[] => {\n if (!filter) return []\n const {\n addresses, cursor, destination, limit, order = 'desc', payload_hashes, payload_schemas, sourceQuery,\n } = filter\n\n const sortedPayloads = PayloadBuilder.sortByStorageMeta(payloads, order === 'desc' ? -1 : 1)\n const parsedCursor = cursor === undefined ? (order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence : cursor\n const parsedOffset = (order === 'desc')\n ? sortedPayloads.findIndex(bw => bw._sequence < parsedCursor)\n : sortedPayloads.findIndex(bw => bw._sequence > parsedCursor)\n if (parsedOffset === -1) return []\n const payloadSubset = sortedPayloads.slice(parsedOffset)\n\n let bws = payloadSubset.filter(isBoundWitness)\n const allAddresses = addresses?.map(address => hexFromHexString(address)).filter(exists)\n if (allAddresses?.length) bws = bws.filter(bw => containsAll(bw.addresses, allAddresses))\n if (payload_hashes?.length) bws = bws.filter(bw => containsAll(bw.payload_hashes, payload_hashes))\n if (payload_schemas?.length) bws = bws.filter(bw => containsAll(bw.payload_schemas, payload_schemas))\n if (sourceQuery) bws = bws.filter(bw => bw?.$sourceQuery === sourceQuery)\n // If there's a destination filter of the right kind\n if (destination && Array.isArray(destination) && destination?.length > 0) {\n const targetFilter = assertEx(destination, () => 'Missing destination')\n // Find all BWs that satisfy the destination constraint\n bws = bws.filter((bw) => {\n const targetDestinationField = (bw as { $destination?: string | string[] })?.$destination\n // If the destination field is an array and contains at least one element\n return targetDestinationField !== undefined && Array.isArray(targetDestinationField) && targetDestinationField.length > 0\n // Check that the targetDestinationField contains all the elements in the targetFilter\n ? containsAll(targetFilter, targetDestinationField ?? [])\n // Otherwise, filter it out\n : false\n })\n }\n const parsedLimit = limit ?? bws.length\n return bws.slice(0, parsedLimit)\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport { applyBoundWitnessDivinerQueryPayload } from './applyBoundWitnessDivinerQueryPayload.ts'\nimport { BoundWitnessDiviner } from './BoundWitnessDiviner.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport { type BoundWitnessDivinerQueryPayload, isBoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport interface EqualityComparisonOperators {\n /**\n * 'Not Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value does not match the provided string.\n * Example: field != 'value'\n */\n '!=': string\n\n /**\n * 'Less Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than the provided string.\n * Example: field < 'value'\n */\n '<': string\n\n /**\n * 'Less Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than or equal to the provided string.\n * Example: field <= 'value'\n */\n '<=': string\n\n /**\n * 'Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value matches the provided string exactly.\n * Example: field = 'value'\n */\n '=': string\n\n /**\n * 'Greater Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than the provided string.\n * Example: field > 'value'\n */\n '>': string\n\n /**\n * 'Greater Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than or equal to the provided string.\n * Example: field >= 'value'\n */\n '>=': string\n}\n\nexport class MemoryBoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n> extends BoundWitnessDiviner<TParams, TIn, TOut> {\n protected override async divineHandler(payloads?: TIn[]) {\n const filter = assertEx(payloads?.filter(isBoundWitnessDivinerQueryPayload)?.pop(), () => 'Missing query payload')\n if (!filter) return []\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const bws = ((await archivist?.next({ limit: 10_000 })) ?? []).filter(x => isBoundWitness(x) && isStorageMeta(x))\n return applyBoundWitnessDivinerQueryPayload(filter, bws) as TOut[]\n }\n}\n","import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n","import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EAAU;AAAA,EACV;AAAA,EAAQ;AAAA,OACH;AACP,SAA4B,sBAAsB;AAClD,SAAS,sBAAsB;AAK/B,SAAS,yBAAyB;AAK3B,IAAM,uCAAuC,CAAC,QAA0C,WAAuC,CAAC,MAAsB;AAC3J,MAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,QAAM;AAAA,IACJ;AAAA,IAAW;AAAA,IAAQ;AAAA,IAAa;AAAA,IAAO,QAAQ;AAAA,IAAQ;AAAA,IAAgB;AAAA,IAAiB;AAAA,EAC1F,IAAI;AAEJ,QAAM,iBAAiB,eAAe,kBAAkB,UAAU,UAAU,SAAS,KAAK,CAAC;AAC3F,QAAM,eAAe,WAAW,SAAa,UAAU,SAAU,kBAAkB,mBAAmB,kBAAkB,mBAAmB;AAC3I,QAAM,eAAgB,UAAU,SAC5B,eAAe,UAAU,QAAM,GAAG,YAAY,YAAY,IAC1D,eAAe,UAAU,QAAM,GAAG,YAAY,YAAY;AAC9D,MAAI,iBAAiB,GAAI,QAAO,CAAC;AACjC,QAAM,gBAAgB,eAAe,MAAM,YAAY;AAEvD,MAAI,MAAM,cAAc,OAAO,cAAc;AAC7C,QAAM,eAAe,WAAW,IAAI,aAAW,iBAAiB,OAAO,CAAC,EAAE,OAAO,MAAM;AACvF,MAAI,cAAc,OAAQ,OAAM,IAAI,OAAO,QAAM,YAAY,GAAG,WAAW,YAAY,CAAC;AACxF,MAAI,gBAAgB,OAAQ,OAAM,IAAI,OAAO,QAAM,YAAY,GAAG,gBAAgB,cAAc,CAAC;AACjG,MAAI,iBAAiB,OAAQ,OAAM,IAAI,OA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AK,kBAAkB,GAAG,MAAM,6BAA6B;AAC9F,UAAM,OAAQ,MAAM,WAAW,KAAK,EAAE,OAAO,IAAO,CAAC,KAAM,CAAC,GAAG,OAAO,OAAKC,gBAAe,CAAC,KAAK,cAAc,CAAC,CAAC;AAChH,WAAO,qCAAqC,QAAQ,GAAG;AAAA,EACzD;AACF;","names":["assertEx","isBoundWitness","asSchema","asSchema","asSchema","asSchema","assertEx","isBoundWitness"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/applyBoundWitnessDivinerQueryPayload.ts", "../../src/MemoryBoundWitnessDiviner.ts", "../../src/BoundWitnessDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts", "../../src/Query.ts"],
4
+ "sourcesContent": ["import {\n assertEx, containsAll,\n exists, hexFromHexString,\n} from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type {\n Payload,\n WithStorageMeta,\n} from '@xyo-network/payload-model'\nimport { SequenceConstants } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\n// eslint-disable-next-line complexity\nexport const applyBoundWitnessDivinerQueryPayload = (filter?: BoundWitnessDivinerQueryPayload, payloads: WithStorageMeta<Payload>[] = []): BoundWitness[] => {\n if (!filter) return []\n const {\n addresses, cursor, destination, limit, order = 'desc', payload_hashes, payload_schemas, sourceQuery,\n } = filter\n\n const sortedPayloads = PayloadBuilder.sortByStorageMeta(payloads, order === 'desc' ? -1 : 1)\n const parsedCursor = cursor === undefined ? (order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence : cursor\n const parsedOffset = (order === 'desc')\n ? sortedPayloads.findIndex(bw => bw._sequence < parsedCursor)\n : sortedPayloads.findIndex(bw => bw._sequence > parsedCursor)\n if (parsedOffset === -1) return []\n const payloadSubset = sortedPayloads.slice(parsedOffset)\n\n let bws = payloadSubset.filter(isBoundWitness)\n const allAddresses = addresses?.map(address => hexFromHexString(address)).filter(exists)\n if (allAddresses?.length) bws = bws.filter(bw => containsAll(bw.addresses, allAddresses))\n if (payload_hashes?.length) bws = bws.filter(bw => containsAll(bw.payload_hashes, payload_hashes))\n if (payload_schemas?.length) bws = bws.filter(bw => containsAll(bw.payload_schemas, payload_schemas))\n if (sourceQuery) bws = bws.filter(bw => bw?.$sourceQuery === sourceQuery)\n // If there's a destination filter of the right kind\n if (destination && Array.isArray(destination) && destination?.length > 0) {\n const targetFilter = assertEx(destination, () => 'Missing destination')\n // Find all BWs that satisfy the destination constraint\n bws = bws.filter((bw) => {\n const targetDestinationField = (bw as { $destination?: string | string[] })?.$destination\n // If the destination field is an array and contains at least one element\n return targetDestinationField !== undefined && Array.isArray(targetDestinationField) && targetDestinationField.length > 0\n // Check that the targetDestinationField contains all the elements in the targetFilter\n ? containsAll(targetFilter, targetDestinationField ?? [])\n // Otherwise, filter it out\n : false\n })\n }\n const parsedLimit = limit ?? bws.length\n return bws.slice(0, parsedLimit)\n}\n", "import { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport { applyBoundWitnessDivinerQueryPayload } from './applyBoundWitnessDivinerQueryPayload.ts'\nimport { BoundWitnessDiviner } from './BoundWitnessDiviner.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport { type BoundWitnessDivinerQueryPayload, isBoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport interface EqualityComparisonOperators {\n /**\n * 'Not Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value does not match the provided string.\n * Example: field != 'value'\n */\n '!=': string\n\n /**\n * 'Less Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than the provided string.\n * Example: field < 'value'\n */\n '<': string\n\n /**\n * 'Less Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically less than or equal to the provided string.\n * Example: field <= 'value'\n */\n '<=': string\n\n /**\n * 'Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value matches the provided string exactly.\n * Example: field = 'value'\n */\n '=': string\n\n /**\n * 'Greater Than' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than the provided string.\n * Example: field > 'value'\n */\n '>': string\n\n /**\n * 'Greater Than or Equal To' comparison operator.\n * Compares the field with the specified string value,\n * selecting records where the field value is lexicographically greater than or equal to the provided string.\n * Example: field >= 'value'\n */\n '>=': string\n}\n\nexport class MemoryBoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n> extends BoundWitnessDiviner<TParams, TIn, TOut> {\n protected override async divineHandler(payloads?: TIn[]) {\n const filter = assertEx(payloads?.filter(isBoundWitnessDivinerQueryPayload)?.pop(), () => 'Missing query payload')\n if (!filter) return []\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const bws = ((await archivist?.next({ limit: 10_000 })) ?? []).filter(x => isBoundWitness(x) && isStorageMeta(x))\n return applyBoundWitnessDivinerQueryPayload(filter, bws) as TOut[]\n }\n}\n", "import type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerConfigSchema } from './Config.ts'\nimport type { BoundWitnessDivinerParams } from './Params.ts'\nimport type { BoundWitnessDivinerQueryPayload } from './Query.ts'\n\nexport abstract class BoundWitnessDiviner<\n TParams extends BoundWitnessDivinerParams = BoundWitnessDivinerParams,\n TIn extends BoundWitnessDivinerQueryPayload = BoundWitnessDivinerQueryPayload,\n TOut extends BoundWitness = BoundWitness,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, BoundWitnessDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = BoundWitnessDivinerConfigSchema\n}\n", "import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n", "import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],
5
+ "mappings": ";AAAA;AAAA,EACE;AAAA,EAAU;AAAA,EACV;AAAA,EAAQ;AAAA,OACH;AACP,SAA4B,sBA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}
@@ -18,4 +18,4 @@ export {
18
18
  BoundWitnessDivinerSchema,
19
19
  isBoundWitnessDivinerQueryPayload
20
20
  };
21
- //# sourceMappingURL=model.mjs.map
21
+ //# sourceMappingURL=model.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts","../../src/Query.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n","import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],"mappings":";AACA,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;AEJnG,SAAS,YAAAC,WAAU,6BAA6B;AAKzC,IAAM,iCAAiCC,UAAS,GAAG,yBAAyB,UAAU,IAAI;AAI1F,IAAM,oCAAoC,sBAAuD,8BAA8B;","names":["asSchema","asSchema","asSchema","asSchema"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Config.ts", "../../src/Schema.ts", "../../src/Query.ts"],
4
+ "sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerConfigSchema = asSchema(`${BoundWitnessDivinerSchema}.config`, true)\nexport type BoundWitnessDivinerConfigSchema = typeof BoundWitnessDivinerConfigSchema\n\nexport type BoundWitnessDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: BoundWitnessDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/payload-model'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n", "import type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BoundWitnessDivinerPredicate } from './Predicate.ts'\nimport { BoundWitnessDivinerSchema } from './Schema.ts'\n\nexport const BoundWitnessDivinerQuerySchema = asSchema(`${BoundWitnessDivinerSchema}.query`, true)\nexport type BoundWitnessDivinerQuerySchema = typeof BoundWitnessDivinerQuerySchema\n\nexport type BoundWitnessDivinerQueryPayload = Query<{ schema: BoundWitnessDivinerQuerySchema } & BoundWitnessDivinerPredicate>\nexport const isBoundWitnessDivinerQueryPayload = isPayloadOfSchemaType<BoundWitnessDivinerQueryPayload>(BoundWitnessDivinerQuerySchema)\n"],
5
+ "mappings": ";AACA,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;AEJnG,SAAS,YAAAC,WAAU,6BAA6B;AAKzC,IAAM,iCAAiCC,UAAS,GAAG,yBAAyB,UAAU,IAAI;AAI1F,IAAM,oCAAoC,sBAAuD,8BAA8B;",
6
+ "names": ["asSchema", "asSchema", "asSchema", "asSchema"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-boundwitness",
3
- "version": "5.6.3",
3
+ "version": "6.0.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -46,81 +46,81 @@
46
46
  "README.md"
47
47
  ],
48
48
  "dependencies": {
49
- "@xyo-network/diviner-abstract": "~5.6.3",
50
- "@xyo-network/diviner-model": "~5.6.3",
51
- "@xyo-network/diviner-payload-model": "~5.6.3",
52
- "@xyo-network/module-model": "~5.6.3"
49
+ "@xyo-network/diviner-abstract": "~6.0.0",
50
+ "@xyo-network/diviner-payload-model": "~6.0.0",
51
+ "@xyo-network/diviner-model": "~6.0.0",
52
+ "@xyo-network/module-model": "~6.0.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@bitauth/libauth": "~3.0.0",
56
56
  "@opentelemetry/api": "^1.9.1",
57
57
  "@opentelemetry/sdk-trace-base": "^2.7.1",
58
58
  "@scure/base": "~2.2.0",
59
- "@xylabs/sdk-js": "^5.1.1",
60
- "@xylabs/threads": "~5.1.1",
61
- "@xylabs/toolchain": "~7.13.4",
62
- "@xylabs/tsconfig": "~7.13.4",
63
- "@xylabs/vitest-extended": "~5.1.1",
64
- "@xyo-network/account": "~5.6.1",
65
- "@xyo-network/account-model": "~5.6.2",
66
- "@xyo-network/boundwitness-builder": "~5.6.1",
67
- "@xyo-network/boundwitness-model": "~5.6.2",
68
- "@xyo-network/boundwitness-wrapper": "~5.6.1",
69
- "@xyo-network/config-payload-plugin": "~5.6.2",
70
- "@xyo-network/manifest-model": "~5.6.2",
71
- "@xyo-network/payload-builder": "~5.6.1",
72
- "@xyo-network/payload-model": "~5.6.2",
73
- "@xyo-network/query-payload-plugin": "~5.6.2",
74
- "@xyo-network/wallet-model": "~5.6.2",
59
+ "@xylabs/sdk-js": "^6.0.0",
60
+ "@xylabs/threads": "~6.0.0",
61
+ "@xylabs/toolchain": "~8.0.17",
62
+ "@xylabs/tsconfig": "~8.0.17",
63
+ "@xylabs/vitest-extended": "~6.0.0",
64
+ "@xyo-network/account": "~6.0",
65
+ "@xyo-network/account-model": "~6.0",
66
+ "@xyo-network/boundwitness-builder": "~6.0",
67
+ "@xyo-network/boundwitness-model": "~6.0",
68
+ "@xyo-network/boundwitness-wrapper": "~6.0",
69
+ "@xyo-network/config-payload-plugin": "~6.0",
70
+ "@xyo-network/manifest-model": "~6.0",
71
+ "@xyo-network/payload-builder": "~6.0.0",
72
+ "@xyo-network/payload-model": "~6.0.0",
73
+ "@xyo-network/query-payload-plugin": "~6.0",
74
+ "@xyo-network/wallet-model": "~6.0",
75
75
  "async-mutex": "^0.5.0",
76
76
  "bn.js": "^5.2.3",
77
77
  "buffer": "^6.0.3",
78
78
  "chalk": "^5.6.2",
79
79
  "debug": "~4.4.3",
80
- "eslint": "^10.3.0",
80
+ "eslint": "^10.4.0",
81
81
  "ethers": "^6.16.0",
82
82
  "hash-wasm": "~4.12.0",
83
- "lru-cache": "^11.3.6",
83
+ "lru-cache": "^11.5.0",
84
84
  "observable-fns": "~0.6.1",
85
85
  "pako": "~2.1.0",
86
- "typescript": "~5.9.3",
87
- "vite": "^8.0.10",
88
- "vitest": "~4.1.5",
86
+ "typescript": "~6.0.3",
87
+ "vite": "^8.0.13",
88
+ "vitest": "~4.1.6",
89
89
  "wasm-feature-detect": "~1.8.0",
90
90
  "zod": "^4.4.3",
91
- "@xyo-network/archivist-memory": "~5.6.3",
92
- "@xyo-network/node-memory": "~5.6.3"
91
+ "@xyo-network/archivist-memory": "~6.0.0",
92
+ "@xyo-network/node-memory": "~6.0.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "@bitauth/libauth": ">=3.0.0 <3.1",
96
- "@opentelemetry/api": ">=1.9.1 <2",
97
- "@opentelemetry/sdk-trace-base": ">=2.7.1 <3",
98
- "@scure/base": ">=2.2.0 <2.3",
99
- "@xylabs/sdk-js": ">=5.1.1 <6",
100
- "@xylabs/threads": ">=5.1.1 <5.2",
101
- "@xyo-network/account": ">=5.6.1 <5.7",
102
- "@xyo-network/account-model": ">=5.6.2 <5.7",
103
- "@xyo-network/boundwitness-builder": ">=5.6.1 <5.7",
104
- "@xyo-network/boundwitness-model": ">=5.6.2 <5.7",
105
- "@xyo-network/boundwitness-wrapper": ">=5.6.1 <5.7",
106
- "@xyo-network/config-payload-plugin": ">=5.6.2 <5.7",
107
- "@xyo-network/manifest-model": ">=5.6.2 <5.7",
108
- "@xyo-network/payload-builder": ">=5.6.1 <5.7",
109
- "@xyo-network/payload-model": ">=5.6.2 <5.7",
110
- "@xyo-network/query-payload-plugin": ">=5.6.2 <5.7",
111
- "@xyo-network/wallet-model": ">=5.6.2 <5.7",
112
- "async-mutex": ">=0.5.0 <1",
113
- "bn.js": ">=5.2.3 <6",
114
- "buffer": ">=6.0.3 <7",
115
- "chalk": ">=5.6.2 <6",
116
- "debug": ">=4.4.3 <4.5",
117
- "ethers": ">=6.16.0 <7",
118
- "hash-wasm": ">=4.12.0 <4.13",
119
- "lru-cache": ">=11.3.6 <12",
120
- "observable-fns": ">=0.6.1 <0.7",
121
- "pako": ">=2.1.0 <2.2",
122
- "wasm-feature-detect": ">=1.8.0 <1.9",
123
- "zod": ">=4.4.3 <5"
95
+ "@bitauth/libauth": "~3.0",
96
+ "@opentelemetry/api": "^1.9",
97
+ "@opentelemetry/sdk-trace-base": "^2.7",
98
+ "@scure/base": "~2.2",
99
+ "@xylabs/sdk-js": "^6.0",
100
+ "@xylabs/threads": "~6.0",
101
+ "@xyo-network/account": "~6.0",
102
+ "@xyo-network/account-model": "~6.0",
103
+ "@xyo-network/boundwitness-builder": "~6.0",
104
+ "@xyo-network/boundwitness-model": "~6.0",
105
+ "@xyo-network/boundwitness-wrapper": "~6.0",
106
+ "@xyo-network/config-payload-plugin": "~6.0",
107
+ "@xyo-network/manifest-model": "~6.0",
108
+ "@xyo-network/payload-builder": "~6.0",
109
+ "@xyo-network/payload-model": "~6.0",
110
+ "@xyo-network/query-payload-plugin": "~6.0",
111
+ "@xyo-network/wallet-model": "~6.0",
112
+ "async-mutex": "^0.5",
113
+ "bn.js": "^5.2",
114
+ "buffer": "^6.0",
115
+ "chalk": "^5.6",
116
+ "debug": "~4.4",
117
+ "ethers": "^6.16",
118
+ "hash-wasm": "~4.12",
119
+ "lru-cache": "^11.3",
120
+ "observable-fns": "~0.6",
121
+ "pako": "~2.1",
122
+ "wasm-feature-detect": "~1.8",
123
+ "zod": "^4.4"
124
124
  },
125
125
  "publishConfig": {
126
126
  "access": "public"