@xyo-network/service-kit-xl1 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/dist/browser/createFleetAuthority.d.ts +87 -0
- package/dist/browser/createFleetAuthority.d.ts.map +1 -0
- package/dist/browser/fleetControl.d.ts +16 -0
- package/dist/browser/fleetControl.d.ts.map +1 -0
- package/dist/browser/fleetProjection.d.ts +35 -0
- package/dist/browser/fleetProjection.d.ts.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +508 -0
- package/dist/browser/index.mjs.map +4 -4
- package/dist/node/createFleetAuthority.d.ts +87 -0
- package/dist/node/createFleetAuthority.d.ts.map +1 -0
- package/dist/node/fleetControl.d.ts +16 -0
- package/dist/node/fleetControl.d.ts.map +1 -0
- package/dist/node/fleetProjection.d.ts +35 -0
- package/dist/node/fleetProjection.d.ts.map +1 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +508 -0
- package/dist/node/index.mjs.map +4 -4
- package/package.json +20 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/createXl1DataLakeSeed.ts", "../../src/configuration.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Hash } from '@ariestools/sdk'\nimport type { ConfiguredSeed } from '@xyo-network/service-kit-protocol'\nimport { createRestDataLakeViewer } from '@xyo-network/xl1-sdk/providers'\n\nimport {\n configuredSeed, type DataLakeSeedOptions, pinDataLakeSeedOptions, pinRead,\n} from './configuration.js'\n\nexport interface Xl1DataLakeSeedOptions extends DataLakeSeedOptions {}\n\n/** Create one explicitly configured public XL1 REST datalake seed. */\nexport async function createXl1DataLakeSeed(options: Xl1DataLakeSeedOptions): Promise<ConfiguredSeed> {\n const pinned = pinDataLakeSeedOptions(options)\n const native = await createRestDataLakeViewer(pinned.endpoint)\n return configuredSeed(pinned.id, async (hashes, readOptions) => {\n const read = pinRead(hashes, readOptions)\n return await native.get([read.hash as Hash], {\n credentials: 'omit',\n maxResponseBytes: read.maxResponseBytes,\n redirect: 'error',\n ...(pinned.fetcher !== undefined && { fetcher: pinned.fetcher }),\n ...(read.signal !== undefined && { signal: read.signal }),\n })\n })\n}\n", "import type {\n ConfiguredSeed, PublicObjectReader, PublicObjectReadOptions,\n} from '@xyo-network/service-kit-protocol'\nimport { DEFAULT_VERIFICATION_LIMITS } from '@xyo-network/service-kit-protocol'\n\nexport type DataLakeEndpointPolicy = 'explicit-local' | 'public-https'\n\nexport interface DataLakeSeedOptions {\n readonly endpoint: string\n readonly endpointPolicy: DataLakeEndpointPolicy\n readonly fetcher?: typeof fetch\n readonly id: string\n}\n\nexport interface PinnedDataLakeSeedOptions {\n readonly endpoint: string\n readonly fetcher?: typeof fetch\n readonly id: string\n}\n\ninterface PinnedRead {\n readonly hash: string\n readonly maxResponseBytes: number\n readonly signal?: AbortSignal\n}\n\nconst CONFIG_FIELDS = new Set(['endpoint', 'endpointPolicy', 'fetcher', 'id'])\nconst READ_FIELDS = new Set(['maxBodyBytes', 'signal'])\nconst HASH_PATTERN = /^[0-9a-f]{64}$/u\n\nfunction strictFields(value: unknown, fields: ReadonlySet<string>, required: readonly string[], label: string) {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new TypeError(label + ' must be a plain object')\n }\n const prototype: unknown = Object.getPrototypeOf(value)\n if (prototype !== null && prototype !== Object.prototype) {\n throw new TypeError(label + ' must be a plain object')\n }\n const descriptors = Object.getOwnPropertyDescriptors(value)\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== 'string' || !fields.has(key)) throw new TypeError(label + ' contains an unknown field')\n const descriptor = descriptors[key]\n if (descriptor?.enumerable !== true || !('value' in descriptor)) {\n throw new TypeError(label + ' fields must be enumerable own data properties')\n }\n }\n for (const key of required) {\n if (!Object.hasOwn(descriptors, key)) throw new TypeError(label + ' requires ' + key)\n }\n return descriptors\n}\n\nfunction seedId(value: unknown) {\n if (typeof value !== 'string' || value.length === 0 || value.length > 128 || value.trim() !== value) {\n throw new TypeError('Seed IDs must be nonempty trimmed strings of at most 128 characters')\n }\n return value\n}\n\nfunction hasDisallowedEndpointCharacter(value: string) {\n return [...value].some((character) => {\n const codePoint = character.codePointAt(0)\n return codePoint !== undefined && (codePoint <= 0x1F || codePoint === 0x7F\n || character === '\\\\' || character.trim() === '')\n })\n}\n\nfunction endpointText(value: unknown) {\n if (typeof value !== 'string' || value.length === 0 || value.length > 2048 || value.trim() !== value\n || hasDisallowedEndpointCharacter(value) || value.includes('?') || value.includes('#')) {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n return value\n}\n\nfunction endpointPolicy(value: unknown): DataLakeEndpointPolicy {\n if (value !== 'public-https' && value !== 'explicit-local') {\n throw new TypeError('endpointPolicy must be public-https or explicit-local')\n }\n return value\n}\n\nfunction parsedEndpoint(value: unknown, policyValue: unknown) {\n const text = endpointText(value)\n const policy = endpointPolicy(policyValue)\n let parsed: URL\n try {\n parsed = new URL(text)\n } catch {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n if ((parsed.protocol !== 'http:' && parsed.protocol !== 'https:') || parsed.hostname === ''\n || parsed.username !== '' || parsed.password !== '') {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n const inputWithoutTrailingSlashes = text.replace(/\\/+$/u, '')\n const parsedWithoutTrailingSlashes = parsed.href.replace(/\\/+$/u, '')\n if (parsedWithoutTrailingSlashes !== inputWithoutTrailingSlashes) {\n throw new TypeError('endpoint must not require URL normalization')\n }\n if (policy === 'public-https' && parsed.protocol !== 'https:') {\n throw new TypeError('public-https endpoints must use HTTPS')\n }\n parsed.pathname = parsed.pathname.replace(/\\/+$/u, '') || '/'\n return parsed\n}\n\nexport function pinDataLakeSeedOptions(options: DataLakeSeedOptions): PinnedDataLakeSeedOptions {\n const descriptors = strictFields(options, CONFIG_FIELDS, ['endpoint', 'endpointPolicy', 'id'], 'options')\n const fetcher: unknown = descriptors.fetcher?.value\n if (fetcher !== undefined && typeof fetcher !== 'function') throw new TypeError('fetcher must be a function')\n const endpoint = parsedEndpoint(descriptors.endpoint?.value as unknown, descriptors.endpointPolicy?.value as unknown)\n return Object.freeze({\n endpoint: endpoint.href.replace(/\\/+$/u, ''),\n id: seedId(descriptors.id?.value as unknown),\n ...(fetcher !== undefined && { fetcher: fetcher as typeof fetch }),\n })\n}\n\nfunction exactHash(hashes: string[]) {\n if (!Array.isArray(hashes) || hashes.length !== 1) throw new TypeError('Reader requires exactly one hash')\n const keys = Reflect.ownKeys(hashes)\n if (keys.some(key => typeof key !== 'string' || (key !== '0' && key !== 'length'))) {\n throw new TypeError('Hash input must be a dense one-element array')\n }\n const descriptor = Object.getOwnPropertyDescriptor(hashes, '0')\n const value: unknown = descriptor?.value\n if (typeof value !== 'string' || descriptor?.enumerable !== true || !('value' in descriptor)\n || !HASH_PATTERN.test(value)) {\n throw new TypeError('Hash must be canonical 64-character lowercase hexadecimal')\n }\n return value\n}\n\nfunction readPolicy(options: PublicObjectReadOptions | undefined) {\n if (options === undefined) return { maxResponseBytes: DEFAULT_VERIFICATION_LIMITS.maxBodyBytes }\n const descriptors = strictFields(options, READ_FIELDS, ['maxBodyBytes', 'signal'], 'read options')\n const maxResponseBytes: unknown = descriptors.maxBodyBytes?.value\n if (!Number.isSafeInteger(maxResponseBytes) || (maxResponseBytes as number) <= 0) {\n throw new RangeError('maxBodyBytes must be a positive safe integer')\n }\n const signal: unknown = descriptors.signal?.value\n if (typeof signal !== 'object' || signal === null || typeof (signal as AbortSignal).aborted !== 'boolean'\n || typeof (signal as AbortSignal).addEventListener !== 'function'\n || typeof (signal as AbortSignal).removeEventListener !== 'function'\n || typeof (signal as AbortSignal).throwIfAborted !== 'function') {\n throw new TypeError('signal must implement AbortSignal')\n }\n return { maxResponseBytes: maxResponseBytes as number, signal: signal as AbortSignal }\n}\n\nexport function pinRead(hashes: string[], options?: PublicObjectReadOptions): PinnedRead {\n return Object.freeze({ hash: exactHash(hashes), ...readPolicy(options) })\n}\n\nexport function configuredSeed(id: string, get: PublicObjectReader['get']): ConfiguredSeed {\n return Object.freeze({ id, reader: Object.freeze({ get }) })\n}\n"],
|
|
5
|
-
"mappings": ";AAEA,SAAS,gCAAgC;;;ACCzC,SAAS,mCAAmC;AAuB5C,IAAM,gBAAgB,oBAAI,IAAI,CAAC,YAAY,kBAAkB,WAAW,IAAI,CAAC;AAC7E,IAAM,cAAc,oBAAI,IAAI,CAAC,gBAAgB,QAAQ,CAAC;AACtD,IAAM,eAAe;AAErB,SAAS,aAAa,OAAgB,QAA6B,UAA6B,OAAe;AAC7G,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG;AACvE,UAAM,IAAI,UAAU,QAAQ,yBAAyB;AAAA,EACvD;AACA,QAAM,YAAqB,OAAO,eAAe,KAAK;AACtD,MAAI,cAAc,QAAQ,cAAc,OAAO,WAAW;AACxD,UAAM,IAAI,UAAU,QAAQ,yBAAyB;AAAA,EACvD;AACA,QAAM,cAAc,OAAO,0BAA0B,KAAK;AAC1D,aAAW,OAAO,QAAQ,QAAQ,KAAK,GAAG;AACxC,QAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,IAAI,GAAG,EAAG,OAAM,IAAI,UAAU,QAAQ,4BAA4B;AACzG,UAAM,aAAa,YAAY,GAAG;AAClC,QAAI,YAAY,eAAe,QAAQ,EAAE,WAAW,aAAa;AAC/D,YAAM,IAAI,UAAU,QAAQ,gDAAgD;AAAA,IAC9E;AAAA,EACF;AACA,aAAW,OAAO,UAAU;AAC1B,QAAI,CAAC,OAAO,OAAO,aAAa,GAAG,EAAG,OAAM,IAAI,UAAU,QAAQ,eAAe,GAAG;AAAA,EACtF;AACA,SAAO;AACT;AAEA,SAAS,OAAO,OAAgB;AAC9B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ACH;",
|
|
6
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/createFleetAuthority.ts", "../../src/fleetControl.ts", "../../src/fleetProjection.ts", "../../src/createXl1DataLakeSeed.ts", "../../src/configuration.ts"],
|
|
4
|
+
"sourcesContent": ["import type {\n ConfiguredSeed, FleetControlFact, FleetDeclarationFact, FleetFoldLimits, FoldedFleetView, ResolutionLimits,\n} from '@xyo-network/service-kit-protocol'\nimport {\n foldFleetControls, resolveFleetPayload, verifyFleetPayload,\n} from '@xyo-network/service-kit-protocol'\nimport type {\n FleetControl, FleetPayload, FleetPayloadFamily,\n} from '@xyo-network/service-kit-schemas'\nimport {\n AddressZod, FleetControlSchema, FleetMemberSchema, FleetPublicationScopeSchema, FleetPublicationScopeZod, FleetSchema, FleetZod, HashZod,\n} from '@xyo-network/service-kit-schemas'\nimport {\n createXl1FinalizedPublicationEvidence,\n type Xl1FinalizedPublicationAnchor,\n type Xl1FinalizedPublicationOccurrence,\n type Xl1FinalizedPublicationProfile,\n type Xl1FinalizedPublicationScan,\n type Xl1ScopedFinalizedPublicationScan,\n} from '@xyo-network/xl1-sdk/protocol-sdk/finalized-publication'\n\nimport {\n captureSignal, FleetAuthorityError, fleetNow, operationControl,\n} from './fleetControl.js'\nimport {\n type FleetPublisherProjectionRequest, type FleetPublisherProjectionResult, nextPublisherProjection,\n} from './fleetProjection.js'\n\nexport interface FleetAuthorityLimits {\n readonly maxBlocks: number\n readonly maxConcurrentCalls: number\n readonly maxConcurrentReads: number\n readonly maxFleets: number\n readonly maxOccurrences: number\n readonly maxPages: number\n readonly maxRootReads: number\n readonly totalTimeoutMs: number\n}\n/** Explicit single-ChainId local composition; no caller scan interface or imported control arrays. */\nexport interface FleetAuthorityProfile {\n readonly evidence: Xl1FinalizedPublicationProfile\n readonly foldLimits: FleetFoldLimits\n readonly limits: FleetAuthorityLimits\n readonly resolutionLimits: ResolutionLimits\n readonly seeds: readonly ConfiguredSeed[]\n}\nexport interface FleetAuthorityRequest {\n readonly anchor: Xl1FinalizedPublicationAnchor\n readonly fleetRoot?: string\n readonly owner: string\n readonly publicationBlock: number\n readonly signal?: AbortSignal\n}\nexport interface FleetPublisherAuthorityRequest extends Omit<FleetAuthorityRequest, 'fleetRoot'> {\n readonly publisherAddress: string\n readonly scopeRoot: string\n}\nexport interface AuthenticatedFleetView extends Omit<FoldedFleetView, 'assurance' | 'status'> {\n readonly assurance: 'source-trusted-finalized-replay'\n readonly status: 'complete'\n}\nexport interface FleetAuthorityContext {\n readonly anchor: Xl1FinalizedPublicationAnchor\n readonly assurance: 'source-trusted-finalized-replay'\n readonly chainId: string\n readonly genesisRoot: string\n readonly historyScope: 'verified-native-owner-and-B4-families'\n readonly network: string\n readonly owner: string\n readonly publicationBlock: number\n}\nexport interface CompleteFleetAuthority extends FleetAuthorityContext {\n readonly correspondence: 'native-sdk-verified'\n readonly coveredRange: { readonly fromBlockNumber: 0; readonly toBlockNumber: number }\n readonly history: 'complete-genesis-to-anchor'\n readonly status: 'complete'\n readonly views: readonly AuthenticatedFleetView[]\n}\nexport interface FleetAuthorityFailure extends FleetAuthorityContext {\n readonly code: string\n readonly status: 'incomplete' | 'unsupported' | 'conflict' | 'resource-limit' | 'cancelled' | 'deadline'\n}\nexport type FleetAuthorityResult = CompleteFleetAuthority | FleetAuthorityFailure\nexport interface ResolvedFleetPublisher extends FleetAuthorityContext {\n readonly controlRoot: string\n readonly correspondence: 'native-sdk-verified'\n readonly fleetRoot: string\n readonly history: 'complete-genesis-to-anchor'\n readonly memberRoot: string\n readonly publisherAddress: string\n readonly scopeRoot: string\n readonly status: 'authorized'\n}\nexport interface AbsentFleetPublisher extends FleetAuthorityContext {\n readonly correspondence: 'native-sdk-verified'\n readonly history: 'complete-genesis-to-anchor'\n readonly publisherAddress: string\n readonly scopeRoot: string\n readonly status: 'absent'\n}\nexport type FleetPublisherAuthorityResult = ResolvedFleetPublisher | AbsentFleetPublisher | FleetAuthorityFailure\nexport interface FleetAuthority {\n enumerate(request: FleetAuthorityRequest): Promise<FleetAuthorityResult>\n projectNextPublisher(request: FleetPublisherProjectionRequest): Promise<FleetPublisherProjectionResult>\n resolvePublisher(request: FleetPublisherAuthorityRequest): Promise<FleetPublisherAuthorityResult>\n}\n\nconst b4Families = Object.freeze([FleetSchema, FleetMemberSchema, FleetPublicationScopeSchema, FleetControlSchema])\n\ntype Control = ReturnType<typeof operationControl>\ninterface Work {\n readonly capacity: { limited: boolean }\n readonly control: Control\n readonly declarations: Map<string, FleetDeclarationFact>\n readonly roots: Map<string, Readonly<FleetPayload>>\n readonly seeds: readonly ConfiguredSeed[]\n}\n\nfunction ownRecord(input: unknown, required: readonly string[], optional: readonly string[] = []): Record<string, unknown> {\n if (input === null || typeof input !== 'object' || Object.getPrototypeOf(input) !== Object.prototype) throw new TypeError('Use a strict own-data profile/request')\n const keys = Reflect.ownKeys(input)\n if (keys.some(key => typeof key !== 'string'\n || ![...required, ...optional].includes(key))\n || required.some(key => !keys.includes(key))) throw new TypeError('Unexpected or missing profile/request fields')\n return Object.fromEntries(keys.map((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(input, key)\n if (descriptor?.enumerable !== true || !('value' in descriptor)) throw new TypeError('Profile/request accessors are unsupported')\n return [key, descriptor.value as unknown]\n }))\n}\nfunction finiteProfile<T>(input: T, keys: readonly string[]): T {\n const values = ownRecord(input, keys)\n if (Object.values(values).some(value => typeof value !== 'number'\n || !Number.isSafeInteger(value)\n || value <= 0\n || value > 2_147_483_647)) throw new RangeError('Every finite positive bound is required')\n return Object.freeze(values) as T\n}\nfunction pinProfile(input: FleetAuthorityProfile) {\n const profile = ownRecord(input, ['evidence', 'foldLimits', 'limits', 'resolutionLimits', 'seeds'])\n const evidence = ownRecord(profile.evidence, ['assurance', 'chainId', 'genesisRoot', 'limits', 'network', 'source'])\n const source = ownRecord(evidence.source, ['bodyBaseUrl', 'finalizedBaseUrl', 'headUrl'], ['fetch'])\n const evidenceLimits = finiteProfile(evidence.limits, ['maxAggregateBytes',\n 'maxBlocks',\n 'maxBodies',\n 'maxConcurrentReads',\n 'maxDecodedDepth',\n 'maxDecodedNodes',\n 'maxLineageBlocks',\n 'maxResponseBytes',\n 'maxRoots',\n 'maxSourceUrlBytes',\n 'perCallTimeoutMs',\n 'totalTimeoutMs'])\n const fixedEvidence = Object.freeze({\n ...evidence, limits: evidenceLimits, source: Object.freeze(source),\n }) as unknown as Xl1FinalizedPublicationProfile\n const limits = finiteProfile(profile.limits, ['maxBlocks',\n 'maxConcurrentCalls',\n 'maxConcurrentReads',\n 'maxFleets',\n 'maxOccurrences',\n 'maxPages',\n 'maxRootReads',\n 'totalTimeoutMs']) as FleetAuthorityLimits\n const foldLimits = finiteProfile(profile.foldLimits, ['maxBodyBytes', 'maxControls', 'maxDeclarations', 'maxDepth', 'maxGrants', 'maxMembers', 'maxNodes']) as FleetFoldLimits\n const resolutionLimits = finiteProfile(profile.resolutionLimits, ['attemptTimeoutMs',\n 'maxBodyBytes',\n 'maxCandidatesPerSeed',\n 'maxDepth',\n 'maxNodes',\n 'maxSeeds',\n 'totalTimeoutMs']) as ResolutionLimits\n return {\n evidence: fixedEvidence, limits, foldLimits, resolutionLimits, seeds: profile.seeds as readonly ConfiguredSeed[],\n }\n}\nfunction pinRequest(input: FleetAuthorityRequest, next = false): FleetAuthorityRequest {\n const values = ownRecord(input, ['anchor', 'owner', 'publicationBlock'], ['fleetRoot', 'signal'])\n const anchor = ownRecord(values.anchor, ['blockNumber', 'blockRoot']) as unknown as Xl1FinalizedPublicationAnchor\n HashZod.parse(anchor.blockRoot)\n AddressZod.parse(values.owner)\n if (values.fleetRoot !== undefined) HashZod.parse(values.fleetRoot)\n if (!Number.isSafeInteger(anchor.blockNumber) || anchor.blockNumber < 0 || anchor.blockNumber >= Number.MAX_SAFE_INTEGER\n\n || typeof values.publicationBlock !== 'number'\n || !Number.isSafeInteger(values.publicationBlock)\n || values.publicationBlock < 0\n || (next ? values.publicationBlock !== anchor.blockNumber + 1 : values.publicationBlock > anchor.blockNumber)) throw new RangeError('Select an exact publication height within the anchor')\n return Object.freeze({\n ...values, anchor: Object.freeze(anchor), signal: captureSignal(values.signal),\n }) as unknown as FleetAuthorityRequest\n}\nfunction pinReaders(seeds: readonly ConfiguredSeed[], profile: ReturnType<typeof pinProfile>): readonly ConfiguredSeed[] {\n if (!Array.isArray(seeds) || seeds.length === 0 || seeds.length > profile.resolutionLimits.maxSeeds) throw new RangeError('Explicit bounded root readers required')\n const ids = new Set<string>()\n return Object.freeze(Array.from({ length: seeds.length }, (_, index) => {\n const slot = Object.getOwnPropertyDescriptor(seeds, String(index))\n if (slot?.enumerable !== true || !('value' in slot)) throw new TypeError('Readers require dense own data slots')\n const seed = ownRecord(slot.value, ['id', 'reader'])\n if (typeof seed.id !== 'string' || seed.id.length === 0 || seed.id.length > 128 || seed.id.trim() !== seed.id || ids.has(seed.id)) throw new TypeError('Readers require unique bounded IDs')\n ids.add(seed.id)\n const reader = ownRecord(seed.reader, ['get'])\n if (typeof reader.get !== 'function') throw new TypeError('Readers require an own get method')\n const get = reader.get.bind(seed.reader) as ConfiguredSeed['reader']['get']\n return Object.freeze({ id: seed.id, reader: Object.freeze({ get }) })\n }))\n}\nfunction capacityReaders(seeds: readonly ConfiguredSeed[], state: { active: number }, maximum: number, capacity: { limited: boolean }): readonly ConfiguredSeed[] {\n return Object.freeze(seeds.map(seed => Object.freeze({\n id: seed.id,\n reader: Object.freeze({\n get: async (...args: Parameters<ConfiguredSeed['reader']['get']>) => {\n if (state.active >= maximum) {\n capacity.limited = true\n throw new FleetAuthorityError('resource-limit', 'reader-capacity')\n }\n state.active++\n try {\n return await seed.reader.get(...args)\n } finally {\n state.active--\n }\n },\n }),\n })))\n}\nfunction context(profile: ReturnType<typeof pinProfile>, request: FleetAuthorityRequest): FleetAuthorityContext {\n return Object.freeze({\n assurance: 'source-trusted-finalized-replay',\n historyScope: 'verified-native-owner-and-B4-families',\n network: profile.evidence.network,\n chainId: profile.evidence.chainId,\n genesisRoot: profile.evidence.genesisRoot,\n anchor: request.anchor,\n owner: request.owner,\n publicationBlock: request.publicationBlock,\n })\n}\nfunction positionAfter(left: Xl1FinalizedPublicationOccurrence, right: Xl1FinalizedPublicationOccurrence) {\n return left.blockNumber > right.blockNumber || (left.blockNumber === right.blockNumber && (left.transactionIndex > right.transactionIndex\n || (left.transactionIndex === right.transactionIndex && left.payloadOrdinal > right.payloadOrdinal)))\n}\nfunction nativeFailure(page: Xl1FinalizedPublicationScan) {\n const statuses: readonly string[] = ['cancelled', 'deadline', 'conflict', 'unsupported', 'resource-limit']\n const status = statuses.includes(page.status) ? page.status as FleetAuthorityError['status'] : 'incomplete'\n return new FleetAuthorityError(status, `native-${page.issues[0]?.code ?? page.status}`)\n}\nfunction validatePage(page: Xl1ScopedFinalizedPublicationScan, profile: ReturnType<typeof pinProfile>, request: FleetAuthorityRequest, from: number, to: number) {\n const actual = [page.network,\n page.chainId,\n page.genesisRoot,\n page.anchor.blockNumber,\n page.anchor.blockRoot,\n page.assurance,\n page.requestedRange.fromBlockNumber,\n page.requestedRange.toBlockNumber]\n const expected = [profile.evidence.network,\n profile.evidence.chainId,\n profile.evidence.genesisRoot,\n request.anchor.blockNumber,\n request.anchor.blockRoot,\n 'source-trusted-finalized-replay',\n from,\n to]\n if (actual.some((value, index) => value !== expected[index])) throw new FleetAuthorityError('conflict', 'scan-binding')\n if (page.scopeCompleteness !== 'verified-native-header-selection'\n || page.scope.authorizers?.length !== 1 || page.scope.authorizers[0] !== request.owner\n || page.scope.schemas?.length !== b4Families.length\n || page.scope.schemas.some((family, index) => family !== b4Families[index])) throw new FleetAuthorityError('conflict', 'scan-scope')\n if (page.status !== 'complete') throw nativeFailure(page)\n if (page.coveredRange?.fromBlockNumber !== from || page.coveredRange.toBlockNumber !== to || page.continuation !== undefined || page.issues.length > 0) {\n throw new FleetAuthorityError('incomplete', 'scan-coverage')\n }\n}\n\n/** Source-trusted complete B4 composition using the owning native evidence provider, never imported arrays. */\nexport function createFleetAuthority(input: FleetAuthorityProfile): FleetAuthority {\n const profile = pinProfile(input)\n const evidence = createXl1FinalizedPublicationEvidence(profile.evidence)\n const readState = { active: 0 }\n const seeds = pinReaders(profile.seeds, profile)\n let activeCalls = 0\n\n async function resolved(root: string, family: FleetPayloadFamily, work: Work): Promise<Readonly<FleetPayload>> {\n work.control.assertActive()\n const cached = work.roots.get(root)\n if (cached !== undefined) {\n if (cached.schema !== family) throw new FleetAuthorityError('unsupported', 'declaration-family')\n return cached\n }\n if (work.roots.size >= profile.limits.maxRootReads) throw new FleetAuthorityError('resource-limit', 'root-reads')\n const result = await resolveFleetPayload(root, family, {\n seeds: work.seeds,\n signal: work.control.signal,\n limits: { ...profile.resolutionLimits, totalTimeoutMs: Math.min(profile.resolutionLimits.totalTimeoutMs, work.control.remainingMs()) },\n })\n work.control.assertActive()\n if (work.capacity.limited) throw new FleetAuthorityError('resource-limit', 'reader-capacity')\n if (result.status !== 'verified') {\n if (result.status === 'aborted') throw new FleetAuthorityError('cancelled', 'root-cancelled')\n if (result.reason === 'resource-limit') throw new FleetAuthorityError('resource-limit', 'root-resource-limit')\n if (result.reason === 'deadline') throw new FleetAuthorityError('deadline', 'root-deadline')\n if (result.attempts.some(attempt => attempt.status === 'unsupported')) throw new FleetAuthorityError('unsupported', 'root-definition')\n throw new FleetAuthorityError('incomplete', 'root-unavailable')\n }\n work.roots.set(root, result.payload)\n if (family !== FleetControlSchema) work.declarations.set(root, Object.freeze({ root, payload: result.payload }))\n return result.payload\n }\n async function scan(request: FleetAuthorityRequest, control: Control) {\n if (request.anchor.blockNumber + 1 > profile.limits.maxBlocks) throw new FleetAuthorityError('resource-limit', 'history-blocks')\n const occurrences: Xl1FinalizedPublicationOccurrence[] = []\n let pages = 0\n for (let from = 0; from <= request.anchor.blockNumber;) {\n control.assertActive()\n if (++pages > profile.limits.maxPages) throw new FleetAuthorityError('resource-limit', 'scan-pages')\n const to = Math.min(request.anchor.blockNumber, from + profile.evidence.limits.maxBlocks - 1)\n const page = await evidence.scanScoped({\n anchor: request.anchor,\n fromBlockNumber: from,\n toBlockNumber: to,\n signal: control.signal,\n scope: { authorizers: [request.owner], schemas: b4Families },\n })\n control.assertActive()\n validatePage(page, profile, request, from, to)\n for (const fact of page.occurrences) {\n const previous = occurrences.at(-1)\n if (fact.network !== profile.evidence.network || fact.chainId !== profile.evidence.chainId || fact.genesisRoot !== profile.evidence.genesisRoot\n || fact.signer !== request.owner || !b4Families.includes(fact.schema as FleetPayloadFamily)\n || fact.blockNumber < from || fact.blockNumber > to || (previous !== undefined && !positionAfter(fact, previous))) throw new FleetAuthorityError('conflict', 'occurrence-binding-order')\n if (occurrences.length >= profile.limits.maxOccurrences) throw new FleetAuthorityError('resource-limit', 'occurrences')\n occurrences.push(fact)\n }\n from = to + 1\n }\n return occurrences\n }\n async function original(fact: Xl1FinalizedPublicationOccurrence, family: FleetPayloadFamily, control: Control) {\n const checked = await verifyFleetPayload(fact.payloadRoot, family, fact.body, profile.foldLimits)\n control.assertActive()\n if (checked.status !== 'verified') throw new FleetAuthorityError(checked.status === 'unsupported' ? 'unsupported' : 'incomplete', 'owner-definition')\n return checked.payload\n }\n async function discoverFleet(fact: Xl1FinalizedPublicationOccurrence, request: FleetAuthorityRequest, work: Work, roots: Set<string>) {\n if (fact.schema !== FleetSchema || request.fleetRoot !== undefined) return\n const checked = await verifyFleetPayload(fact.payloadRoot, FleetSchema, fact.body, profile.foldLimits)\n work.control.assertActive()\n if (checked.status !== 'verified') {\n if (fact.signer === request.owner) throw new FleetAuthorityError(checked.status === 'unsupported' ? 'unsupported' : 'incomplete', 'owner-declaration')\n return\n }\n if (FleetZod.parse(checked.payload).owner === request.owner) roots.add(fact.payloadRoot)\n }\n async function collect(request: FleetAuthorityRequest, work: Work, occurrences: readonly Xl1FinalizedPublicationOccurrence[]) {\n const roots = new Set<string>(request.fleetRoot === undefined ? [] : [request.fleetRoot])\n const controls: FleetControlFact[] = []\n for (const fact of occurrences) {\n work.control.assertActive()\n if (fact.blockNumber > request.publicationBlock) continue\n await discoverFleet(fact, request, work, roots)\n if (fact.schema !== FleetControlSchema || fact.signer !== request.owner || fact.blockNumber === request.publicationBlock) continue\n const payload = await original(fact, FleetControlSchema, work.control) as Readonly<FleetControl>\n if (request.fleetRoot !== undefined && payload.fleetRoot !== request.fleetRoot) continue\n // A verified immutable different owner makes this otherwise native-valid assertion\n // provably ineligible under B4's no-delegation contract. Unknown roots stay required.\n const fleet = FleetZod.parse(await resolved(payload.fleetRoot, FleetSchema, work))\n if (fleet.owner !== request.owner) continue\n roots.add(payload.fleetRoot)\n await resolved(fact.payloadRoot, FleetControlSchema, work)\n controls.push(Object.freeze({\n root: fact.payloadRoot,\n payload,\n authorizer: fact.signer,\n block: fact.blockNumber,\n chainId: fact.chainId,\n transactionIndex: fact.transactionIndex,\n payloadIndex: fact.payloadOrdinal,\n }))\n if ('memberRoot' in payload) await resolved(payload.memberRoot, FleetMemberSchema, work)\n if ('scopeRoot' in payload) await resolved(payload.scopeRoot, FleetPublicationScopeSchema, work)\n if (roots.size > profile.limits.maxFleets) throw new FleetAuthorityError('resource-limit', 'fleets')\n }\n if (roots.size > profile.limits.maxFleets) throw new FleetAuthorityError('resource-limit', 'fleets')\n return { roots, controls }\n }\n async function enumerateWork(request: FleetAuthorityRequest, work: Work): Promise<CompleteFleetAuthority> {\n const occurrences = await scan(request, work.control)\n const { roots, controls } = await collect(request, work, occurrences)\n const views: AuthenticatedFleetView[] = []\n for (const root of roots) {\n await resolved(root, FleetSchema, work)\n const selected = controls.filter(fact => fact.payload.fleetRoot === root)\n const needed = new Set<string>([root])\n for (const fact of selected) {\n if ('memberRoot' in fact.payload) needed.add(fact.payload.memberRoot)\n if ('scopeRoot' in fact.payload) needed.add(fact.payload.scopeRoot)\n }\n const folded = foldFleetControls({\n owner: request.owner,\n fleetRoot: root,\n chainId: profile.evidence.chainId,\n genesisRoot: profile.evidence.genesisRoot,\n publicationBlock: request.publicationBlock,\n controls: selected,\n declarations: [...needed].map((key) => {\n const declaration = work.declarations.get(key)\n if (declaration === undefined) throw new FleetAuthorityError('incomplete', 'missing-declaration')\n return declaration\n }),\n limits: profile.foldLimits,\n signal: work.control.signal,\n })\n work.control.assertActive()\n if (folded.status !== 'folded') {\n const status = folded.status === 'aborted' ? 'cancelled' : folded.reason === 'resource-limit' ? 'resource-limit' : folded.status\n throw new FleetAuthorityError(status, `fold-${folded.reason}`)\n }\n views.push(Object.freeze({\n ...folded, status: 'complete', assurance: 'source-trusted-finalized-replay',\n }))\n }\n return Object.freeze({\n ...context(profile, request),\n status: 'complete',\n correspondence: 'native-sdk-verified',\n history: 'complete-genesis-to-anchor',\n coveredRange: Object.freeze({ fromBlockNumber: 0, toBlockNumber: request.anchor.blockNumber }),\n views: Object.freeze(views),\n })\n }\n async function execute<T>(request: FleetAuthorityRequest, startedAt: number, operation: (work: Work) => Promise<T>): Promise<T | FleetAuthorityFailure> {\n const control = operationControl(request.signal, profile.limits.totalTimeoutMs, startedAt)\n let admitted = false\n try {\n control.assertActive()\n if (activeCalls >= profile.limits.maxConcurrentCalls) throw new FleetAuthorityError('resource-limit', 'composition-capacity')\n activeCalls++\n admitted = true\n const capacity = { limited: false }\n return await operation({\n control,\n roots: new Map(),\n declarations: new Map(),\n capacity,\n seeds: capacityReaders(seeds, readState, profile.limits.maxConcurrentReads, capacity),\n })\n } catch (error) {\n const failure = error instanceof FleetAuthorityError ? error : new FleetAuthorityError('incomplete', 'composition-source')\n return Object.freeze({\n ...context(profile, request), status: failure.status, code: failure.code,\n })\n } finally {\n if (admitted) activeCalls--\n control.dispose()\n }\n }\n async function publisherWork(request: FleetAuthorityRequest, scopeRoot: string, publisherAddress: string, work: Work): Promise<ResolvedFleetPublisher | AbsentFleetPublisher> {\n const scope = FleetPublicationScopeZod.parse(await resolved(scopeRoot, FleetPublicationScopeSchema, work))\n const result = await enumerateWork({ ...request, fleetRoot: scope.fleetRoot }, work)\n const view = result.views[0]\n const matches = view?.fleetActive ? view.grants.filter(grant => grant.scopeRoot === scopeRoot && grant.publisherAddress === publisherAddress) : []\n if (matches.length > 1) throw new FleetAuthorityError('conflict', 'publisher-ambiguity')\n const grant = matches[0]\n return grant === undefined\n ? Object.freeze({\n ...context(profile, request), status: 'absent', correspondence: 'native-sdk-verified', history: 'complete-genesis-to-anchor', scopeRoot, publisherAddress,\n })\n : Object.freeze({\n ...context(profile, request),\n status: 'authorized',\n correspondence: 'native-sdk-verified',\n history: 'complete-genesis-to-anchor',\n fleetRoot: scope.fleetRoot,\n memberRoot: grant.memberRoot,\n controlRoot: grant.controlRoot,\n scopeRoot,\n publisherAddress,\n })\n }\n return Object.freeze({\n async enumerate(inputRequest: FleetAuthorityRequest): Promise<FleetAuthorityResult> {\n const startedAt = fleetNow()\n const request = pinRequest(inputRequest)\n return await execute(request, startedAt, work => enumerateWork(request, work))\n },\n async resolvePublisher(inputRequest: FleetPublisherAuthorityRequest): Promise<FleetPublisherAuthorityResult> {\n const startedAt = fleetNow()\n const values = ownRecord(inputRequest, ['anchor', 'owner', 'publicationBlock', 'publisherAddress', 'scopeRoot'], ['signal'])\n const publisherAddress = AddressZod.parse(values.publisherAddress)\n const scopeRoot = HashZod.parse(values.scopeRoot)\n const request = pinRequest({\n anchor: values.anchor as Xl1FinalizedPublicationAnchor,\n owner: values.owner as string,\n publicationBlock: values.publicationBlock as number,\n ...(values.signal !== undefined && { signal: values.signal as AbortSignal }),\n })\n return await execute(request, startedAt, work => publisherWork(request, scopeRoot, publisherAddress, work))\n },\n async projectNextPublisher(inputRequest: FleetPublisherProjectionRequest): Promise<FleetPublisherProjectionResult> {\n const startedAt = fleetNow()\n const values = ownRecord(inputRequest, ['anchor', 'owner', 'publisherAddress', 'scopeRoot'], ['signal'])\n const anchor = ownRecord(values.anchor, ['blockNumber', 'blockRoot']) as unknown as Xl1FinalizedPublicationAnchor\n const publisherAddress = AddressZod.parse(values.publisherAddress)\n const scopeRoot = HashZod.parse(values.scopeRoot)\n const request = pinRequest({\n anchor,\n owner: values.owner as string,\n publicationBlock: anchor.blockNumber + 1,\n ...(values.signal !== undefined && { signal: values.signal as AbortSignal }),\n }, true)\n const result = await execute(request, startedAt, work => publisherWork(request, scopeRoot, publisherAddress, work))\n return nextPublisherProjection(result)\n },\n })\n}\n", "const abortedDescriptor = Object.getOwnPropertyDescriptor(AbortSignal.prototype, 'aborted')\nconst abortedGetter: unknown = Reflect.get(abortedDescriptor ?? {}, 'get')\nconst nativeEvents = EventTarget.prototype as unknown as { addEventListener: (this: void, ...args: unknown[]) => void; removeEventListener: (this: void, ...args: unknown[]) => void }\nconst addListener = nativeEvents.addEventListener\nconst removeListener = nativeEvents.removeEventListener\nconst apply = Reflect.apply\nconst now = performance.now.bind(performance)\n\nexport function captureSignal(value: unknown): AbortSignal | undefined {\n if (value === undefined) return\n if (typeof abortedGetter !== 'function') throw new TypeError('Native AbortSignal is required')\n apply(abortedGetter, value, [])\n return value as AbortSignal\n}\nexport function aborted(signal: AbortSignal): boolean {\n if (typeof abortedGetter !== 'function') throw new TypeError('Native AbortSignal is required')\n return apply(abortedGetter, signal, []) as boolean\n}\nexport function listenAbort(signal: AbortSignal | undefined, listener: () => void): () => void {\n if (signal === undefined) return () => { /* No caller cancellation. */ }\n apply(addListener, signal, ['abort', listener, { once: true }])\n return () => {\n apply(removeListener, signal, ['abort', listener])\n }\n}\nexport class FleetAuthorityError extends Error {\n readonly code: string\n readonly status: 'incomplete' | 'unsupported' | 'conflict' | 'resource-limit' | 'cancelled' | 'deadline'\n constructor(status: FleetAuthorityError['status'], code: string) {\n super(code)\n this.name = 'FleetAuthorityError'\n this.status = status\n this.code = code\n }\n}\nexport function operationControl(signal: AbortSignal | undefined, timeoutMs: number, startedAt: number) {\n const controller = new AbortController()\n const deadline = startedAt + timeoutMs\n let terminal: FleetAuthorityError | undefined\n const stop = (status: 'cancelled' | 'deadline') => {\n terminal ??= new FleetAuthorityError(status, status)\n controller.abort()\n }\n const unlisten = listenAbort(signal, () => stop('cancelled'))\n if (signal !== undefined && aborted(signal)) stop('cancelled')\n const timer = setTimeout(() => stop('deadline'), Math.max(1, Math.ceil(deadline - now())))\n return {\n signal: controller.signal,\n assertActive() {\n if (now() >= deadline) stop('deadline')\n if (terminal !== undefined) throw terminal\n },\n remainingMs: () => Math.max(1, Math.ceil(deadline - now())),\n dispose() {\n clearTimeout(timer)\n unlisten()\n controller.abort()\n },\n }\n}\nexport const fleetNow = now\n", "import type {\n FleetAuthorityContext, FleetAuthorityFailure, FleetPublisherAuthorityRequest, FleetPublisherAuthorityResult,\n} from './createFleetAuthority.js'\n\n/** Fixed pending N+1 projection; callers cannot name an arbitrary future publication height. */\nexport type FleetPublisherProjectionRequest = Omit<FleetPublisherAuthorityRequest, 'publicationBlock'>\nexport interface FleetPublisherProjectionContext extends Omit<FleetAuthorityContext, 'publicationBlock'> {\n readonly projection: 'pending-N+1'\n readonly projectionBlock: number\n}\ninterface CompleteProjection extends FleetPublisherProjectionContext {\n readonly correspondence: 'native-sdk-verified'\n readonly coveredRange: { readonly fromBlockNumber: 0; readonly toBlockNumber: number }\n readonly history: 'complete-genesis-to-anchor'\n readonly publisherAddress: string\n readonly scopeRoot: string\n}\nexport interface ProjectedFleetPublisher extends CompleteProjection {\n readonly controlRoot: string\n readonly fleetRoot: string\n readonly memberRoot: string\n readonly status: 'projected-granted'\n}\nexport interface AbsentProjectedFleetPublisher extends CompleteProjection {\n readonly status: 'projected-absent'\n}\nexport interface FleetPublisherProjectionFailure extends FleetPublisherProjectionContext {\n readonly code: FleetAuthorityFailure['code']\n readonly status: FleetAuthorityFailure['status']\n}\nexport type FleetPublisherProjectionResult = ProjectedFleetPublisher | AbsentProjectedFleetPublisher | FleetPublisherProjectionFailure\n\n/** A verified prefix's pending control view supplies no future carrying occurrence, Time or admission. */\nexport function nextPublisherProjection(result: FleetPublisherAuthorityResult): FleetPublisherProjectionResult {\n const { publicationBlock: projectionBlock, ...original } = result\n const context = {\n ...original, projection: 'pending-N+1' as const, projectionBlock,\n }\n if (result.status === 'authorized' || result.status === 'absent') {\n return Object.freeze({\n ...context,\n status: result.status === 'authorized' ? 'projected-granted' : 'projected-absent',\n coveredRange: Object.freeze({ fromBlockNumber: 0 as const, toBlockNumber: result.anchor.blockNumber }),\n }) as ProjectedFleetPublisher | AbsentProjectedFleetPublisher\n }\n return Object.freeze(context) as FleetPublisherProjectionFailure\n}\n", "import type { Hash } from '@ariestools/sdk'\nimport type { ConfiguredSeed } from '@xyo-network/service-kit-protocol'\nimport { createRestDataLakeViewer } from '@xyo-network/xl1-sdk/providers'\n\nimport {\n configuredSeed, type DataLakeSeedOptions, pinDataLakeSeedOptions, pinRead,\n} from './configuration.js'\n\nexport interface Xl1DataLakeSeedOptions extends DataLakeSeedOptions {}\n\n/** Create one explicitly configured public XL1 REST datalake seed. */\nexport async function createXl1DataLakeSeed(options: Xl1DataLakeSeedOptions): Promise<ConfiguredSeed> {\n const pinned = pinDataLakeSeedOptions(options)\n const native = await createRestDataLakeViewer(pinned.endpoint)\n return configuredSeed(pinned.id, async (hashes, readOptions) => {\n const read = pinRead(hashes, readOptions)\n return await native.get([read.hash as Hash], {\n credentials: 'omit',\n maxResponseBytes: read.maxResponseBytes,\n redirect: 'error',\n ...(pinned.fetcher !== undefined && { fetcher: pinned.fetcher }),\n ...(read.signal !== undefined && { signal: read.signal }),\n })\n })\n}\n", "import type {\n ConfiguredSeed, PublicObjectReader, PublicObjectReadOptions,\n} from '@xyo-network/service-kit-protocol'\nimport { DEFAULT_VERIFICATION_LIMITS } from '@xyo-network/service-kit-protocol'\n\nexport type DataLakeEndpointPolicy = 'explicit-local' | 'public-https'\n\nexport interface DataLakeSeedOptions {\n readonly endpoint: string\n readonly endpointPolicy: DataLakeEndpointPolicy\n readonly fetcher?: typeof fetch\n readonly id: string\n}\n\nexport interface PinnedDataLakeSeedOptions {\n readonly endpoint: string\n readonly fetcher?: typeof fetch\n readonly id: string\n}\n\ninterface PinnedRead {\n readonly hash: string\n readonly maxResponseBytes: number\n readonly signal?: AbortSignal\n}\n\nconst CONFIG_FIELDS = new Set(['endpoint', 'endpointPolicy', 'fetcher', 'id'])\nconst READ_FIELDS = new Set(['maxBodyBytes', 'signal'])\nconst HASH_PATTERN = /^[0-9a-f]{64}$/u\n\nfunction strictFields(value: unknown, fields: ReadonlySet<string>, required: readonly string[], label: string) {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new TypeError(label + ' must be a plain object')\n }\n const prototype: unknown = Object.getPrototypeOf(value)\n if (prototype !== null && prototype !== Object.prototype) {\n throw new TypeError(label + ' must be a plain object')\n }\n const descriptors = Object.getOwnPropertyDescriptors(value)\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== 'string' || !fields.has(key)) throw new TypeError(label + ' contains an unknown field')\n const descriptor = descriptors[key]\n if (descriptor?.enumerable !== true || !('value' in descriptor)) {\n throw new TypeError(label + ' fields must be enumerable own data properties')\n }\n }\n for (const key of required) {\n if (!Object.hasOwn(descriptors, key)) throw new TypeError(label + ' requires ' + key)\n }\n return descriptors\n}\n\nfunction seedId(value: unknown) {\n if (typeof value !== 'string' || value.length === 0 || value.length > 128 || value.trim() !== value) {\n throw new TypeError('Seed IDs must be nonempty trimmed strings of at most 128 characters')\n }\n return value\n}\n\nfunction hasDisallowedEndpointCharacter(value: string) {\n return [...value].some((character) => {\n const codePoint = character.codePointAt(0)\n return codePoint !== undefined && (codePoint <= 0x1F || codePoint === 0x7F\n || character === '\\\\' || character.trim() === '')\n })\n}\n\nfunction endpointText(value: unknown) {\n if (typeof value !== 'string' || value.length === 0 || value.length > 2048 || value.trim() !== value\n || hasDisallowedEndpointCharacter(value) || value.includes('?') || value.includes('#')) {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n return value\n}\n\nfunction endpointPolicy(value: unknown): DataLakeEndpointPolicy {\n if (value !== 'public-https' && value !== 'explicit-local') {\n throw new TypeError('endpointPolicy must be public-https or explicit-local')\n }\n return value\n}\n\nfunction parsedEndpoint(value: unknown, policyValue: unknown) {\n const text = endpointText(value)\n const policy = endpointPolicy(policyValue)\n let parsed: URL\n try {\n parsed = new URL(text)\n } catch {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n if ((parsed.protocol !== 'http:' && parsed.protocol !== 'https:') || parsed.hostname === ''\n || parsed.username !== '' || parsed.password !== '') {\n throw new TypeError('endpoint must be an unambiguous absolute HTTP(S) URL')\n }\n const inputWithoutTrailingSlashes = text.replace(/\\/+$/u, '')\n const parsedWithoutTrailingSlashes = parsed.href.replace(/\\/+$/u, '')\n if (parsedWithoutTrailingSlashes !== inputWithoutTrailingSlashes) {\n throw new TypeError('endpoint must not require URL normalization')\n }\n if (policy === 'public-https' && parsed.protocol !== 'https:') {\n throw new TypeError('public-https endpoints must use HTTPS')\n }\n parsed.pathname = parsed.pathname.replace(/\\/+$/u, '') || '/'\n return parsed\n}\n\nexport function pinDataLakeSeedOptions(options: DataLakeSeedOptions): PinnedDataLakeSeedOptions {\n const descriptors = strictFields(options, CONFIG_FIELDS, ['endpoint', 'endpointPolicy', 'id'], 'options')\n const fetcher: unknown = descriptors.fetcher?.value\n if (fetcher !== undefined && typeof fetcher !== 'function') throw new TypeError('fetcher must be a function')\n const endpoint = parsedEndpoint(descriptors.endpoint?.value as unknown, descriptors.endpointPolicy?.value as unknown)\n return Object.freeze({\n endpoint: endpoint.href.replace(/\\/+$/u, ''),\n id: seedId(descriptors.id?.value as unknown),\n ...(fetcher !== undefined && { fetcher: fetcher as typeof fetch }),\n })\n}\n\nfunction exactHash(hashes: string[]) {\n if (!Array.isArray(hashes) || hashes.length !== 1) throw new TypeError('Reader requires exactly one hash')\n const keys = Reflect.ownKeys(hashes)\n if (keys.some(key => typeof key !== 'string' || (key !== '0' && key !== 'length'))) {\n throw new TypeError('Hash input must be a dense one-element array')\n }\n const descriptor = Object.getOwnPropertyDescriptor(hashes, '0')\n const value: unknown = descriptor?.value\n if (typeof value !== 'string' || descriptor?.enumerable !== true || !('value' in descriptor)\n || !HASH_PATTERN.test(value)) {\n throw new TypeError('Hash must be canonical 64-character lowercase hexadecimal')\n }\n return value\n}\n\nfunction readPolicy(options: PublicObjectReadOptions | undefined) {\n if (options === undefined) return { maxResponseBytes: DEFAULT_VERIFICATION_LIMITS.maxBodyBytes }\n const descriptors = strictFields(options, READ_FIELDS, ['maxBodyBytes', 'signal'], 'read options')\n const maxResponseBytes: unknown = descriptors.maxBodyBytes?.value\n if (!Number.isSafeInteger(maxResponseBytes) || (maxResponseBytes as number) <= 0) {\n throw new RangeError('maxBodyBytes must be a positive safe integer')\n }\n const signal: unknown = descriptors.signal?.value\n if (typeof signal !== 'object' || signal === null || typeof (signal as AbortSignal).aborted !== 'boolean'\n || typeof (signal as AbortSignal).addEventListener !== 'function'\n || typeof (signal as AbortSignal).removeEventListener !== 'function'\n || typeof (signal as AbortSignal).throwIfAborted !== 'function') {\n throw new TypeError('signal must implement AbortSignal')\n }\n return { maxResponseBytes: maxResponseBytes as number, signal: signal as AbortSignal }\n}\n\nexport function pinRead(hashes: string[], options?: PublicObjectReadOptions): PinnedRead {\n return Object.freeze({ hash: exactHash(hashes), ...readPolicy(options) })\n}\n\nexport function configuredSeed(id: string, get: PublicObjectReader['get']): ConfiguredSeed {\n return Object.freeze({ id, reader: Object.freeze({ get }) })\n}\n"],
|
|
5
|
+
"mappings": ";AAGA;AAAA,EACE;AAAA,EAAmB;AAAA,EAAqB;AAAA,OACnC;AAIP;AAAA,EACE;AAAA,EAAY;AAAA,EAAoB;AAAA,EAAmB;AAAA,EAA6B;AAAA,EAA0B;AAAA,EAAa;AAAA,EAAU;AAAA,OAC5H;AACP;AAAA,EACE;AAAA,OAMK;;;ACnBP,IAAM,oBAAoB,OAAO,yBAAyB,YAAY,WAAW,SAAS;AAC1F,IAAM,gBAAyB,QAAQ,IAAI,qBAAqB,CAAC,GAAG,KAAK;AACzE,IAAM,eAAe,YAAY;AACjC,IAAM,cAAc,aAAa;AACjC,IAAM,iBAAiB,aAAa;AACpC,IAAM,QAAQ,QAAQ;AACtB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AA8B;AACvF;AAEO,SAAS,QAAQ,QAAkB,SAA+C;AACvF,SAAO,OAAO,OAAO,EAAE,MAAM,UAAU,MAAM,GAAG,GAAG,WAAW,OAAO,EAAE,CAAC;AAC1E;AAEO,SAAS,eAAe,IAAY,KAAgD;AACzF,SAAO,OAAO,OAAO,EAAE,IAAI,QAAQ,OAAO,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAC7D;;;ADlJA,eAAsB,sBAAsB,SAA0D;AACpG,QAAM,SAAS,uBAAuB,OAAO;AAC7C,QAAM,SAAS,MAAM,yBAAyB,OAAO,QAAQ;AAC7D,SAAO,eAAe,OAAO,IAAI,OAAO,QAAQ,gBAAgB;AAC9D,UAAM,OAAO,QAAQ,QAAQ,WAAW;AACxC,WAAO,MAAM,OAAO,IAAI,CAAC,KAAK,IAAY,GAAG;AAAA,MAC3C,aAAa;AAAA,MACb,kBAAkB,KAAK;AAAA,MACvB,UAAU;AAAA,MACV,GAAI,OAAO,YAAY,UAAa,EAAE,SAAS,OAAO,QAAQ;AAAA,MAC9D,GAAI,KAAK,WAAW,UAAa,EAAE,QAAQ,KAAK,OAAO;AAAA,IACzD,CAAC;AAAA,EACH,CAAC;AACH;",
|
|
6
|
+
"names": ["context", "grant"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ConfiguredSeed, FleetFoldLimits, FoldedFleetView, ResolutionLimits } from '@xyo-network/service-kit-protocol';
|
|
2
|
+
import { type Xl1FinalizedPublicationAnchor, type Xl1FinalizedPublicationProfile } from '@xyo-network/xl1-sdk/protocol-sdk/finalized-publication';
|
|
3
|
+
import { type FleetPublisherProjectionRequest, type FleetPublisherProjectionResult } from './fleetProjection.js';
|
|
4
|
+
export interface FleetAuthorityLimits {
|
|
5
|
+
readonly maxBlocks: number;
|
|
6
|
+
readonly maxConcurrentCalls: number;
|
|
7
|
+
readonly maxConcurrentReads: number;
|
|
8
|
+
readonly maxFleets: number;
|
|
9
|
+
readonly maxOccurrences: number;
|
|
10
|
+
readonly maxPages: number;
|
|
11
|
+
readonly maxRootReads: number;
|
|
12
|
+
readonly totalTimeoutMs: number;
|
|
13
|
+
}
|
|
14
|
+
/** Explicit single-ChainId local composition; no caller scan interface or imported control arrays. */
|
|
15
|
+
export interface FleetAuthorityProfile {
|
|
16
|
+
readonly evidence: Xl1FinalizedPublicationProfile;
|
|
17
|
+
readonly foldLimits: FleetFoldLimits;
|
|
18
|
+
readonly limits: FleetAuthorityLimits;
|
|
19
|
+
readonly resolutionLimits: ResolutionLimits;
|
|
20
|
+
readonly seeds: readonly ConfiguredSeed[];
|
|
21
|
+
}
|
|
22
|
+
export interface FleetAuthorityRequest {
|
|
23
|
+
readonly anchor: Xl1FinalizedPublicationAnchor;
|
|
24
|
+
readonly fleetRoot?: string;
|
|
25
|
+
readonly owner: string;
|
|
26
|
+
readonly publicationBlock: number;
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
}
|
|
29
|
+
export interface FleetPublisherAuthorityRequest extends Omit<FleetAuthorityRequest, 'fleetRoot'> {
|
|
30
|
+
readonly publisherAddress: string;
|
|
31
|
+
readonly scopeRoot: string;
|
|
32
|
+
}
|
|
33
|
+
export interface AuthenticatedFleetView extends Omit<FoldedFleetView, 'assurance' | 'status'> {
|
|
34
|
+
readonly assurance: 'source-trusted-finalized-replay';
|
|
35
|
+
readonly status: 'complete';
|
|
36
|
+
}
|
|
37
|
+
export interface FleetAuthorityContext {
|
|
38
|
+
readonly anchor: Xl1FinalizedPublicationAnchor;
|
|
39
|
+
readonly assurance: 'source-trusted-finalized-replay';
|
|
40
|
+
readonly chainId: string;
|
|
41
|
+
readonly genesisRoot: string;
|
|
42
|
+
readonly historyScope: 'verified-native-owner-and-B4-families';
|
|
43
|
+
readonly network: string;
|
|
44
|
+
readonly owner: string;
|
|
45
|
+
readonly publicationBlock: number;
|
|
46
|
+
}
|
|
47
|
+
export interface CompleteFleetAuthority extends FleetAuthorityContext {
|
|
48
|
+
readonly correspondence: 'native-sdk-verified';
|
|
49
|
+
readonly coveredRange: {
|
|
50
|
+
readonly fromBlockNumber: 0;
|
|
51
|
+
readonly toBlockNumber: number;
|
|
52
|
+
};
|
|
53
|
+
readonly history: 'complete-genesis-to-anchor';
|
|
54
|
+
readonly status: 'complete';
|
|
55
|
+
readonly views: readonly AuthenticatedFleetView[];
|
|
56
|
+
}
|
|
57
|
+
export interface FleetAuthorityFailure extends FleetAuthorityContext {
|
|
58
|
+
readonly code: string;
|
|
59
|
+
readonly status: 'incomplete' | 'unsupported' | 'conflict' | 'resource-limit' | 'cancelled' | 'deadline';
|
|
60
|
+
}
|
|
61
|
+
export type FleetAuthorityResult = CompleteFleetAuthority | FleetAuthorityFailure;
|
|
62
|
+
export interface ResolvedFleetPublisher extends FleetAuthorityContext {
|
|
63
|
+
readonly controlRoot: string;
|
|
64
|
+
readonly correspondence: 'native-sdk-verified';
|
|
65
|
+
readonly fleetRoot: string;
|
|
66
|
+
readonly history: 'complete-genesis-to-anchor';
|
|
67
|
+
readonly memberRoot: string;
|
|
68
|
+
readonly publisherAddress: string;
|
|
69
|
+
readonly scopeRoot: string;
|
|
70
|
+
readonly status: 'authorized';
|
|
71
|
+
}
|
|
72
|
+
export interface AbsentFleetPublisher extends FleetAuthorityContext {
|
|
73
|
+
readonly correspondence: 'native-sdk-verified';
|
|
74
|
+
readonly history: 'complete-genesis-to-anchor';
|
|
75
|
+
readonly publisherAddress: string;
|
|
76
|
+
readonly scopeRoot: string;
|
|
77
|
+
readonly status: 'absent';
|
|
78
|
+
}
|
|
79
|
+
export type FleetPublisherAuthorityResult = ResolvedFleetPublisher | AbsentFleetPublisher | FleetAuthorityFailure;
|
|
80
|
+
export interface FleetAuthority {
|
|
81
|
+
enumerate(request: FleetAuthorityRequest): Promise<FleetAuthorityResult>;
|
|
82
|
+
projectNextPublisher(request: FleetPublisherProjectionRequest): Promise<FleetPublisherProjectionResult>;
|
|
83
|
+
resolvePublisher(request: FleetPublisherAuthorityRequest): Promise<FleetPublisherAuthorityResult>;
|
|
84
|
+
}
|
|
85
|
+
/** Source-trusted complete B4 composition using the owning native evidence provider, never imported arrays. */
|
|
86
|
+
export declare function createFleetAuthority(input: FleetAuthorityProfile): FleetAuthority;
|
|
87
|
+
//# sourceMappingURL=createFleetAuthority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFleetAuthority.d.ts","sourceRoot":"","sources":["../../src/createFleetAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAA0C,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAC3G,MAAM,mCAAmC,CAAA;AAU1C,OAAO,EAEL,KAAK,6BAA6B,EAElC,KAAK,8BAA8B,EAGpC,MAAM,yDAAyD,CAAA;AAKhE,OAAO,EACL,KAAK,+BAA+B,EAAE,KAAK,8BAA8B,EAC1E,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AACD,sGAAsG;AACtG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,8BAA8B,CAAA;IACjD,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;IACrC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAA;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE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AE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;IACxE,oBAAoB,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAA;IACvG,gBAAgB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAA;CAClG;AA2KD,+GAA+G;AAC/G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,cAAc,CA+OjF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function captureSignal(value: unknown): AbortSignal | undefined;
|
|
2
|
+
export declare function aborted(signal: AbortSignal): boolean;
|
|
3
|
+
export declare function listenAbort(signal: AbortSignal | undefined, listener: () => void): () => void;
|
|
4
|
+
export declare class FleetAuthorityError extends Error {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly status: 'incomplete' | 'unsupported' | 'conflict' | 'resource-limit' | 'cancelled' | 'deadline';
|
|
7
|
+
constructor(status: FleetAuthorityError['status'], code: string);
|
|
8
|
+
}
|
|
9
|
+
export declare function operationControl(signal: AbortSignal | undefined, timeoutMs: number, startedAt: number): {
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
assertActive(): void;
|
|
12
|
+
remainingMs: () => number;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
};
|
|
15
|
+
export declare const fleetNow: () => DOMHighResTimeStamp;
|
|
16
|
+
//# sourceMappingURL=fleetControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleetControl.d.ts","sourceRoot":"","sources":["../../src/fleetControl.ts"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAKrE;AACD,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAGpD;AACD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAM7F;AACD,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAA;gBAC5F,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM;CAMhE;AACD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;EAwBrG;AACD,eAAO,MAAM,QAAQ,2BAAM,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FleetAuthorityContext, FleetAuthorityFailure, FleetPublisherAuthorityRequest, FleetPublisherAuthorityResult } from './createFleetAuthority.js';
|
|
2
|
+
/** Fixed pending N+1 projection; callers cannot name an arbitrary future publication height. */
|
|
3
|
+
export type FleetPublisherProjectionRequest = Omit<FleetPublisherAuthorityRequest, 'publicationBlock'>;
|
|
4
|
+
export interface FleetPublisherProjectionContext extends Omit<FleetAuthorityContext, 'publicationBlock'> {
|
|
5
|
+
readonly projection: 'pending-N+1';
|
|
6
|
+
readonly projectionBlock: number;
|
|
7
|
+
}
|
|
8
|
+
interface CompleteProjection extends FleetPublisherProjectionContext {
|
|
9
|
+
readonly correspondence: 'native-sdk-verified';
|
|
10
|
+
readonly coveredRange: {
|
|
11
|
+
readonly fromBlockNumber: 0;
|
|
12
|
+
readonly toBlockNumber: number;
|
|
13
|
+
};
|
|
14
|
+
readonly history: 'complete-genesis-to-anchor';
|
|
15
|
+
readonly publisherAddress: string;
|
|
16
|
+
readonly scopeRoot: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ProjectedFleetPublisher extends CompleteProjection {
|
|
19
|
+
readonly controlRoot: string;
|
|
20
|
+
readonly fleetRoot: string;
|
|
21
|
+
readonly memberRoot: string;
|
|
22
|
+
readonly status: 'projected-granted';
|
|
23
|
+
}
|
|
24
|
+
export interface AbsentProjectedFleetPublisher extends CompleteProjection {
|
|
25
|
+
readonly status: 'projected-absent';
|
|
26
|
+
}
|
|
27
|
+
export interface FleetPublisherProjectionFailure extends FleetPublisherProjectionContext {
|
|
28
|
+
readonly code: FleetAuthorityFailure['code'];
|
|
29
|
+
readonly status: FleetAuthorityFailure['status'];
|
|
30
|
+
}
|
|
31
|
+
export type FleetPublisherProjectionResult = ProjectedFleetPublisher | AbsentProjectedFleetPublisher | FleetPublisherProjectionFailure;
|
|
32
|
+
/** A verified prefix's pending control view supplies no future carrying occurrence, Time or admission. */
|
|
33
|
+
export declare function nextPublisherProjection(result: FleetPublisherAuthorityResult): FleetPublisherProjectionResult;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=fleetProjection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleetProjection.d.ts","sourceRoot":"","sources":["../../src/fleetProjection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,6BAA6B,EAC5G,MAAM,2BAA2B,CAAA;AAElC,gGAAgG;AAChG,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAA;AACtG,MAAM,WAAW,+BAAgC,SAAQ,IAAI,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;IACtG,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAA;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACjC;AACD,UAAU,kBAAmB,SAAQ,+BAA+B;IAClE,QAAQ,CAAC,cAAc,EAAE,qBAAqB,CAAA;IAC9C,QAAQ,CAAC,YAAY,EAAE;QAAE,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAA;IACtF,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAA;IAC9C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AACD,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;CACrC;AACD,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;CACpC;AACD,MAAM,WAAW,+BAAgC,SAAQ,+BAA+B;IACtF,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAC5C,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAA;CACjD;AACD,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,GAAG,6BAA6B,GAAG,+BAA+B,CAAA;AAEtI,0GAA0G;AAC1G,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,6BAA6B,GAAG,8BAA8B,CAa7G"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { DataLakeEndpointPolicy } from './configuration.js';
|
|
2
|
+
export * from './createFleetAuthority.js';
|
|
2
3
|
export type { Xl1DataLakeSeedOptions } from './createXl1DataLakeSeed.js';
|
|
3
4
|
export { createXl1DataLakeSeed } from './createXl1DataLakeSeed.js';
|
|
5
|
+
export type { AbsentProjectedFleetPublisher, FleetPublisherProjectionContext, FleetPublisherProjectionFailure, FleetPublisherProjectionRequest, FleetPublisherProjectionResult, ProjectedFleetPublisher, } from './fleetProjection.js';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,YAAY,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,cAAc,2BAA2B,CAAA;AACzC,YAAY,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,YAAY,EACV,6BAA6B,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,uBAAuB,GAC1L,MAAM,sBAAsB,CAAA"}
|