@toon-protocol/client 0.18.0 → 0.20.0

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 CHANGED
@@ -51,14 +51,11 @@ pnpm add mina-signer
51
51
  These coordinates go straight into the [`ToonClient` config](#quick-start) below.
52
52
 
53
53
  > **Local development (from a clone of this repo, not the npm package).** To try the client
54
- > end-to-end against a throwaway local network, start the monorepo's SDK E2E stack Anvil + two peer
55
- > nodes + relays. This script ships with the repo, **not** the published package:
56
- >
57
- > ```bash
58
- > ./scripts/sdk-e2e-infra.sh up # start (Ctrl-C-safe; `down` to stop)
59
- > curl http://localhost:19100/health # peer 1 health
60
- > ./scripts/sdk-e2e-infra.sh down # stop
61
- > ```
54
+ > end-to-end against a throwaway local network Anvil + two peer nodes + relays see
55
+ > [`packages/client/tests/e2e/README.md`](tests/e2e/README.md) for the service topology and manual
56
+ > testing snippet. Its automated setup steps assume the monorepo's `scripts/sdk-e2e-infra.sh`
57
+ > wrapper and a `docker-compose-sdk-e2e.yml`, neither of which ships in this extracted repo; treat
58
+ > those steps as a reference for provisioning the equivalent infrastructure yourself.
62
59
  >
63
60
  > | Service | Port | Purpose |
64
61
  > | ---------------- | ----- | --------------------------------------------------- |
@@ -275,38 +272,36 @@ pnpm test:coverage # Run with coverage report
275
272
 
276
273
  ### E2E Tests
277
274
 
278
- E2E tests require the SDK E2E infrastructure:
275
+ E2E tests require Docker Compose infrastructure. See
276
+ [tests/e2e/README.md](tests/e2e/README.md) for the service topology — note its automated setup
277
+ script isn't included in this extracted repo either (see the Prerequisites section above), so
278
+ provision the equivalent infrastructure manually, then run:
279
279
 
280
280
  ```bash
281
- # Start infrastructure
282
- ./scripts/sdk-e2e-infra.sh up
283
-
284
- # Run E2E tests
285
281
  cd packages/client
286
282
  pnpm test:e2e
287
283
  ```
288
284
 
289
- See [tests/e2e/README.md](tests/e2e/README.md) for detailed E2E setup.
290
-
291
285
  ---
292
286
 
293
287
  ## Examples
294
288
 
295
- See [examples/client-example/](../../examples/client-example/) for standalone client examples:
289
+ See [examples/](examples/) for standalone client examples:
296
290
 
297
- - **01 - Publish Event** (`01-publish-event.ts`): Full client lifecycle with self-describing claims
298
- - **02 - Payment Channel Lifecycle** (`02-payment-channel.ts`): Multiple events with incrementing balance proofs
299
- - **03 - Multi-Chain Publish** (`03-multi-chain-publish.ts`): Publishing with multiple settlement chains configured
300
- - **04 - Subscribe to Events** (`04-subscribe-events.ts`): Reading events back from the relay (free)
291
+ - **Basic Publish** (`basic-publish.ts`): Publish a Nostr event to the TOON network
292
+ - **Publish and Verify** (`publish-and-verify.ts`): Publish an event and verify via connector logs
293
+ - **Publish to Peer1** (`publish-to-peer1.ts`): Multi-hop ILP routing via a peer connector
294
+ - **Multi-Hop Routing** (`multi-hop-routing.ts`): Route an event through peer1 to the genesis relay
295
+ - **With Payment Channels** (`with-payment-channels.ts`): Configure EVM payment channels and publish with a signed balance proof
301
296
 
302
297
  ---
303
298
 
304
299
  ## Related Packages
305
300
 
306
- - **[@toon-protocol/core](../core/)** — Core protocol (peer discovery, bootstrap, `buildBlobStorageRequest`)
307
- - **[@toon-protocol/relay](../relay/)** — Operator product running the apex connector plus relay/swap/store nodes; also exports `encodeEventToToon` / `decodeEventFromToon` for event encoding
308
- - **[@toon-protocol/sdk](../sdk/)** — Higher-level helpers including `streamSwap()` for multi-chain swaps via a **swap**
309
- - **[@toon-protocol/bls](../bls/)** — Business Logic Server (pricing, validation, storage)
301
+ - **[@toon-protocol/core](https://www.npmjs.com/package/@toon-protocol/core)** — Core protocol (peer discovery, bootstrap, `buildBlobStorageRequest`)
302
+ - **[@toon-protocol/relay](https://www.npmjs.com/package/@toon-protocol/relay)** — Operator product running the apex connector plus relay/swap/store nodes; also exports `encodeEventToToon` / `decodeEventFromToon` for event encoding
303
+ - **[@toon-protocol/sdk](https://www.npmjs.com/package/@toon-protocol/sdk)** — Higher-level helpers including `streamSwap()` for multi-chain swaps via a **swap**
304
+ - **[@toon-protocol/bls](https://www.npmjs.com/package/@toon-protocol/bls)** — Business Logic Server (pricing, validation, storage)
310
305
 
311
306
  ---
312
307