@xyo-network/diviner-boundwitness 6.0.1 → 6.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/BoundWitnessDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts", "../../src/applyBoundWitnessDivinerQueryPayload.ts", "../../src/MemoryBoundWitnessDiviner.ts", "../../src/Query.ts"],
|
|
4
|
-
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { BoundWitness, Schema } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\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/sdk-protocol-js'\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 {\n BoundWitness, Payload, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n isBoundWitness, PayloadBuilder, SequenceConstants,\n} from '@xyo-network/sdk-protocol-js'\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 ?? ((order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence)\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/sdk-protocol-js'\nimport { isStorageMeta } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-protocol-js'\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,SAAS,uBAAuB;;;ACChC,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,4BAA4B,SAAS,oCAAoC,IAAI;;;ADGnF,IAAM,kCAAkCC,UAAS,GAAG,yBAAyB,WAAW,IAAI;;;ADG5F,IAAe,sBAAf,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AACzD;;;AGpBA;AAAA,EACE;AAAA,EAAU;AAAA,EACV;AAAA,EAAQ;AAAA,OACH;AAIP;AAAA,EACE;AAAA,EAAgB;AAAA,EAAgB;AAAA,OAC3B;AAKA,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,WAAY,UAAU,SAAU,kBAAkB,mBAAmB,kBAAkB;AAC5G,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,
|
|
4
|
+
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { BoundWitness, Schema } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\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/sdk-protocol-js'\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 {\n BoundWitness, Payload, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n isBoundWitness, PayloadBuilder, SequenceConstants,\n} from '@xyo-network/sdk-protocol-js'\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 ?? ((order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence)\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<string>(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/sdk-protocol-js'\nimport { isStorageMeta } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-protocol-js'\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": "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",
|
|
6
6
|
"names": ["asSchema", "asSchema", "assertEx", "isBoundWitness", "asSchema", "asSchema", "assertEx", "isBoundWitness"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 {\n BoundWitness, Payload, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n isBoundWitness, PayloadBuilder, SequenceConstants,\n} from '@xyo-network/sdk-protocol-js'\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 ?? ((order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence)\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/sdk-protocol-js'\nimport { isStorageMeta } from '@xyo-network/sdk-protocol-js'\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 { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { BoundWitness, Schema } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\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/sdk-protocol-js'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n", "import type { Query } from '@xyo-network/sdk-protocol-js'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-protocol-js'\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;AAIP;AAAA,EACE;AAAA,EAAgB;AAAA,EAAgB;AAAA,OAC3B;AAKA,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,WAAY,UAAU,SAAU,kBAAkB,mBAAmB,kBAAkB;AAC5G,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,
|
|
4
|
+
"sourcesContent": ["import {\n assertEx, containsAll,\n exists, hexFromHexString,\n} from '@xylabs/sdk-js'\nimport type {\n BoundWitness, Payload, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n isBoundWitness, PayloadBuilder, SequenceConstants,\n} from '@xyo-network/sdk-protocol-js'\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 ?? ((order === 'desc') ? SequenceConstants.maxLocalSequence : SequenceConstants.minLocalSequence)\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<string>(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/sdk-protocol-js'\nimport { isStorageMeta } from '@xyo-network/sdk-protocol-js'\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 { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { BoundWitness, Schema } from '@xyo-network/sdk-protocol-js'\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/sdk-protocol-js'\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/sdk-protocol-js'\n\nexport const BoundWitnessDivinerSchema = asSchema('network.xyo.diviner.boundwitness', true)\nexport type BoundWitnessDivinerSchema = typeof BoundWitnessDivinerSchema\n", "import type { Query } from '@xyo-network/sdk-protocol-js'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-protocol-js'\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": "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",
|
|
6
6
|
"names": ["assertEx", "isBoundWitness", "asSchema", "asSchema", "asSchema", "asSchema", "assertEx", "isBoundWitness"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-boundwitness",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -46,48 +46,45 @@
|
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@xyo-network/
|
|
50
|
-
"@xyo-network/diviner-model": "~6.0.
|
|
51
|
-
"@xyo-network/
|
|
52
|
-
"@xyo-network/diviner-
|
|
49
|
+
"@xyo-network/diviner-model": "~6.0.3",
|
|
50
|
+
"@xyo-network/diviner-payload-model": "~6.0.3",
|
|
51
|
+
"@xyo-network/module-model": "~6.0.3",
|
|
52
|
+
"@xyo-network/diviner-abstract": "~6.0.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@bitauth/libauth": "~3.0.0",
|
|
56
|
-
"@metamask/providers": "^22.1",
|
|
56
|
+
"@metamask/providers": "^22.1.1",
|
|
57
57
|
"@noble/post-quantum": "~0.6.1",
|
|
58
58
|
"@opentelemetry/api": "^1.9.1",
|
|
59
59
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
60
60
|
"@scure/base": "~2.2.0",
|
|
61
|
-
"@scure/bip39": "~2.2",
|
|
62
|
-
"@xylabs/geo": "^6.0",
|
|
63
|
-
"@xylabs/sdk-js": "^6.0.
|
|
64
|
-
"@xylabs/threads": "
|
|
65
|
-
"@xylabs/toolchain": "~8.1.
|
|
66
|
-
"@xylabs/tsconfig": "~8.1.
|
|
67
|
-
"@xylabs/vitest-extended": "~6.0.
|
|
68
|
-
"@xyo-network/sdk-protocol-js": "~6.0.
|
|
69
|
-
"ajv": "^8.20",
|
|
61
|
+
"@scure/bip39": "~2.2.0",
|
|
62
|
+
"@xylabs/geo": "^6.0.7",
|
|
63
|
+
"@xylabs/sdk-js": "^6.0.7",
|
|
64
|
+
"@xylabs/threads": "^6.0.7",
|
|
65
|
+
"@xylabs/toolchain": "~8.1.15",
|
|
66
|
+
"@xylabs/tsconfig": "~8.1.15",
|
|
67
|
+
"@xylabs/vitest-extended": "~6.0.7",
|
|
68
|
+
"@xyo-network/sdk-protocol-js": "~6.0.8",
|
|
69
|
+
"ajv": "^8.20.0",
|
|
70
70
|
"async-mutex": "^0.5.0",
|
|
71
71
|
"bn.js": "^5.2.3",
|
|
72
72
|
"buffer": "^6.0.3",
|
|
73
73
|
"debug": "~4.4.3",
|
|
74
|
-
"eslint": "^10.4.
|
|
74
|
+
"eslint": "^10.4.1",
|
|
75
75
|
"ethers": "^6.16.0",
|
|
76
76
|
"hash-wasm": "~4.12.0",
|
|
77
|
-
"idb": "^8.0",
|
|
77
|
+
"idb": "^8.0.3",
|
|
78
78
|
"lru-cache": "^11.5.1",
|
|
79
|
-
"mapbox-gl": "^3.23",
|
|
80
79
|
"observable-fns": "~0.6.1",
|
|
81
80
|
"pako": "~2.1.0",
|
|
82
|
-
"store2": "~2.14",
|
|
83
81
|
"typescript": "~6.0.3",
|
|
84
|
-
"vite": "^8.0.
|
|
85
|
-
"vitest": "~4.1.
|
|
86
|
-
"
|
|
87
|
-
"webextension-polyfill": "^0.12",
|
|
82
|
+
"vite": "^8.0.16",
|
|
83
|
+
"vitest": "~4.1.8",
|
|
84
|
+
"webextension-polyfill": "^0.12.0",
|
|
88
85
|
"zod": "^4.4.3",
|
|
89
|
-
"@xyo-network/
|
|
90
|
-
"@xyo-network/
|
|
86
|
+
"@xyo-network/archivist-memory": "~6.0.3",
|
|
87
|
+
"@xyo-network/node-memory": "~6.0.3"
|
|
91
88
|
},
|
|
92
89
|
"peerDependencies": {
|
|
93
90
|
"@bitauth/libauth": "~3.0",
|
|
@@ -99,7 +96,7 @@
|
|
|
99
96
|
"@scure/bip39": "~2.2",
|
|
100
97
|
"@xylabs/geo": "^6.0",
|
|
101
98
|
"@xylabs/sdk-js": "^6.0",
|
|
102
|
-
"@xylabs/threads": "
|
|
99
|
+
"@xylabs/threads": "^6.0",
|
|
103
100
|
"@xyo-network/sdk-protocol-js": "~6.0",
|
|
104
101
|
"ajv": "^8.20",
|
|
105
102
|
"async-mutex": "^0.5",
|
|
@@ -110,11 +107,8 @@
|
|
|
110
107
|
"hash-wasm": "~4.12",
|
|
111
108
|
"idb": "^8.0",
|
|
112
109
|
"lru-cache": "^11.3",
|
|
113
|
-
"mapbox-gl": "^3.23",
|
|
114
110
|
"observable-fns": "~0.6",
|
|
115
111
|
"pako": "~2.1",
|
|
116
|
-
"store2": "~2.14",
|
|
117
|
-
"wasm-feature-detect": "~1.8",
|
|
118
112
|
"webextension-polyfill": "^0.12",
|
|
119
113
|
"zod": "^4.4"
|
|
120
114
|
},
|