@xyo-network/service-kit-schemas
v0.2.1
Published
Strict shared service and datalake descriptors
Keywords
Readme
@xyo-network/service-kit-schemas
Initially published at 0.0.1; the current public release is 0.1.0, published October 1, 2026 and registry rechecked October 5. These shared service-discovery schemas validate declarative content. They do not authenticate a provider or operator, establish finalized publication, select a current revision, grant access, or prove service or datalake availability.
The checkout declares Node ^26, matching the selected SDK Protocol 8.0.1
dependency. Development/CI and current qualification use Node 26.9.0; other
Node 26 versions require their own recorded qualification. Published 0.1.0
metadata remains unchanged until release. Environment-neutral/browser outputs
retain their current contract.
Contracts
ObjectReferenceZod: strict{ schema, dataHash }, using the canonical XYO data hash rather than storage metadata or an arbitrary URL.ServiceIdentityZod: strict{ authorizationChainId, provider, serviceId }. Chain IDs and addresses are 40 lowercase hexadecimal characters without0x; service IDs are 32 lowercase hexadecimal characters.ServiceAdvertisementZod: schemanetwork.xyo.service.advertisement, the flattened identity fields,profile,descriptor,dataLakes, and lifecycle fields. The descriptor and datalake entries are immutable object references.DataLakeLocatorZod: schemanetwork.xyo.service.datalake.locator,authorizationChainId,operator,dataLakeId,transportProfile,endpoints, and lifecycle fields. Datalake IDs are 32 lowercase hexadecimal characters. A storage operator need not be the advertised service's provider.
Both payloads carry revision, optional supersedes, validFromBlock, and
optional expiresAtBlock. Revision 1 omits its predecessor; later revisions
require its data hash. Expiry is exclusive and must follow activation. Numbers
must be nonnegative safe integers, with revision at least 1. These are local
shape rules; predecessor existence, authority, finality, and current status
require independent evidence and a later lifecycle adapter.
The schema and inferred type share each *Zod stem. isServiceAdvertisement,
toServiceAdvertisement, isDataLakeLocator, and toDataLakeLocator provide
convenient guards and optional parsers. Parsers reject unknown fields and never
default, coerce, or rewrite values. Do not treat parsing as hash verification.
Bounds and endpoint syntax
| Constant | Value | Meaning |
| --- | --- | --- |
| MAX_SCHEMA_IDENTIFIER_LENGTH | 255 | Service Kit schema/profile identifier characters |
| MAX_ADVERTISEMENT_DATA_LAKES | 16 | Datalake references; minimum 1 |
| MAX_LOCATOR_ENDPOINTS | 8 | Endpoint URLs; minimum 1 |
| MAX_LOCATOR_ENDPOINT_LENGTH | 2048 | Characters per endpoint URL |
Schema/profile syntax follows the SDK's SchemaRegEx. The length limit is
specific to these contracts. Hashes are 64 lowercase hexadecimal characters.
Duplicate (schema, dataHash) datalake references are rejected.
Endpoints must be absolute HTTP(S) URLs without userinfo (including empty
userinfo), fragments (including an empty fragment), whitespace, control
characters, or backslashes. Duplicate endpoints are compared through WHATWG
URL.href, so host case and default-port variants do not create separate
entries. The original strings are retained unchanged; this is a duplicate
comparison, not a transform of committed content.
URL validation is syntax only. Private, loopback and local hostnames can be syntactically valid. These schemas do not enforce DNS, port, redirect, credential-forwarding, response-size or network destination policies. Parsing a locator is not authorization to fetch it. Readers must be explicitly configured; a future HTTP adapter must apply its own network policy.
No enrollment, pricing, domains, encryption negotiation or receiver delivery protocols are introduced by this package. Existing Event Kit behavior is unchanged.
