npm.io
7.3.1 • Published 21h ago

@xyo-network/sdk

Licence
LGPL-3.0-only
Version
7.3.1
Deps
4
Size
2.3 MB
Vulns
0
Weekly
0

logo

@xyo-network/sdk

npm license

Self-contained all-in-one SDK for XYO Protocol 2.0 — foundation + modules runtime. The legacy @xyo-network/sdk-js package re-exports this package for backward compatibility.

Self-contained build

Unlike a traditional barrel that declares every child package as a runtime dependency, @xyo-network/sdk is self-contained: its published dist/ vendors the compiled output of each @xyo-network/* package in the closure (under dist/_pkg/), with cross-package imports rewritten to relative paths. At runtime it depends only on real externals (ethers, @xylabs/sdk, zod, etc.), declared as peerDependencies.

Import the whole SDK:

import { MemoryArchivist } from '@xyo-network/sdk'

…or a group via subpath export:

import { Archivist } from '@xyo-network/sdk/archivist'
import { ObjectHasher } from '@xyo-network/sdk/protocol'

The vendoring is performed by scripts/populate-dist.mjs, wired into the toolchain via a local package-compile script in package.json.

pnpm xy build                           # compiles all packages, then vendors the barrel
pnpm xy build @xyo-network/sdk          # vendors using already-compiled child dist

Install

npm install @xyo-network/sdk

License

See the LICENSE file for license rights and limitations (LGPL-3.0-only).

Credits

Made with and by XYO Foundation