Catalog npm
Back to packageRELEASE DETAILS

1.5.0

npm

1-z-2

1-z-2 relay SDK — one file, zero dependencies, browsers and Node 22+. Published as an integrity mirror: at matching versions client.js is byte-identical to GET /sdk.js on any 1-z-2 relay.

app-to-appclaude-codecursorgenerated-appslovablepersonal-softwarerelayschema-translationshare-between-appsvibe-coding
Published20 Sept 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

1-z-2

The SDK for the 1-z-2 relay network — one file, zero dependencies, runs in browsers and Node 22+.

Why this package exists

You don't normally install this. A 1-z-2 app vendors the SDK straight from its relay:

curl -fsSL https://YOUR-RELAY/sdk.js -o relay-client.js

This package is the integrity mirror: at matching versions, its client.js is byte-identical to what any 1-z-2 relay serves at GET /sdk.js. Because npm is a registry neither you nor the relay operator controls, a vendored copy can be checked against it.

Verify a vendored copy

V=$(grep -m1 SDK_VERSION relay-client.js | cut -d'"' -f2)
npm pack 1-z-2@$V
tar -xOf 1-z-2-$V.tgz package/client.js | diff - relay-client.js

No output means the bytes match.

Use

import { RelayClient } from "./relay-client.js";

const relay = await RelayClient.connect({
  handle: "you",
  relayUrl: "https://YOUR-RELAY",
});
await relay.publish({
  name: "recipe",
  direction: "send",
  description: "a cooking recipe with ingredients and steps",
  example: { title: "Pancakes", ingredients: ["2 cups flour"], steps: ["Mix", "Fry"] },
});
const result = await relay.send("jane", "recipe", payload);
relay.onReceive((msg) => {
  // msg.payload arrives already translated into YOUR shape
});

The full integration guide is served by every relay at GET /integrate.md. An app that is not JavaScript needs no SDK at all: GET /integrate-http.md gives the same steps as plain, signed web requests. The operator's claims — each paired with a way to check it — are at 1-z-2.com/trust.

Types

client.d.ts ships in this package and declares the whole public surface of client.js. Every relay also serves it beside the SDK, so a vendored copy can have types without npm:

curl -fsSL https://YOUR-RELAY/sdk.d.ts -o relay-client.d.ts

Saved next to relay-client.js, TypeScript picks it up by name.

License

In one sentence: use this file and embed it in your own application, free of charge and without asking, as long as you do not modify it or republish it as a separate work. This package is the one stated exception to "no republishing", because it exists to verify vendored copies. Full terms in LICENSE. © 2026 Zugaba Limited.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "80da7930bad9913d58acdbc9fb8ae17c3f385191",
  "tarball": "https://registry.npmjs.org/1-z-2/-/1-z-2-1.5.0.tgz",
  "fileCount": 5,
  "integrity": "sha512-pRji3Hxr9LJT4iaireLBsJaxt3mz+4jenqivI496y3EBzESGarYrm5KRulwz2mSBuIobZ8vM3TbmKV4i72zIug==",
  "signatures": [
    {
      "sig": "MEUCIQCB73ijIBIxZi9xk+D7WyWQARXNVfGnyjl7KD1mSh2yYAIgfKX5GnoBHpYs0lk7r1aFNuL8N5ru2oavo8mWASBgQMU=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    },
    {
      "sig": "MEUCIQCj04N4cGY4ctjVmfbbVlWOQkLgvM22biNc3w9OFlTv/QIgOq19NPrxC9RyGrCUHf+oz/AYpLGW1C+LuyssQNlrf2o=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 71171
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:56 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:d3d9ecd4646c51cefb2ee2952c9795f3e6443ca28a951e4fe7ef9ba22810213e

Other collected versions

1.6.022 Sept1.5.121 Sept1.4.013 Sept1.3.09 Sept1.2.08 Sept1.1.17 SeptView all collected versions →