@xyo-network/xl1-protocol
v4.5.0
Published
XYO Layer One Protocol - All Protocol Packages
Keywords
Readme
@xyo-network/xl1-protocol
XL1 protocol models, interfaces, schemas, and validation in one package.
Description
XL1 is the XYO Layer One blockchain protocol. This package is the protocol surface for XL1: data models, provider and viewer contracts, network metadata, JSON schema exports, and validation utilities.
Use it when you need protocol-level types or runtime validation without pulling
in gateway construction, JSON-RPC transports, storage drivers, or React bindings.
For application and service development, start with @xyo-network/xl1-sdk.
Install
Using npm:
npm i --save @xyo-network/xl1-protocolUsing yarn:
yarn add @xyo-network/xl1-protocolUsing pnpm:
pnpm add @xyo-network/xl1-protocolUsing bun:
bun add @xyo-network/xl1-protocolUsage
Import the protocol layer from its explicit subpaths:
import { DefaultNetworks } from '@xyo-network/xl1-protocol/network-model'
import { BlockViewerMoniker } from '@xyo-network/xl1-protocol/protocol-lib'
import { asXL1BlockNumber } from '@xyo-network/xl1-protocol/protocol-model'
const sequence = DefaultNetworks.find(network => network.id === 'sequence')
const genesis = asXL1BlockNumber(0, true)
console.log(sequence?.name, BlockViewerMoniker, genesis)Available subpaths:
@xyo-network/xl1-protocol@xyo-network/xl1-protocol/network-model@xyo-network/xl1-protocol/protocol-lib@xyo-network/xl1-protocol/protocol-model@xyo-network/xl1-protocol/schema@xyo-network/xl1-protocol/validation@xyo-network/xl1-protocol/test
Documentation
- Use
protocol-modelfor Zod-first XL1 data structures and value guards. - Use
protocol-libfor provider, viewer, runner, gateway, and status contracts. - Use
network-modelfor network metadata and static REST path helpers. - Use
schemaandvalidationat serialization, storage, and chain-validation boundaries. - Use
@xyo-network/xl1-sdkwhen you need concrete gateway, RPC, or provider implementations.
AI Agent Skills
Install the recommended XL1/XYO skills with Skills.sh:
npx skills add XYOracleNetwork/xyo-skills --allIn XY toolchain repos, the equivalent convenience command is:
pnpm xy skills defaults
pnpm xy skills lint --fixFor XL1 work, ask your agent to use xyo-knowledge, xl1-knowledge, and
xl1-patterns. These skills cover XYO primitives, XL1 chain and gateway APIs,
and application patterns for XL1 dApps.
Building Locally
pnpm xy build @xyo-network/xl1-protocol
pnpm xy test @xyo-network/xl1-protocol
pnpm xy lint @xyo-network/xl1-protocolLicense
See the repository LICENSE file for license rights and limitations (LGPL-3.0-only).

