@toon-protocol/sdk 2.1.0 → 3.0.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 +5 -5
- package/dist/{chunk-7LBYFU4L.js → chunk-RAZRWSJF.js} +493 -33
- package/dist/chunk-RAZRWSJF.js.map +1 -0
- package/dist/index.d.ts +32 -6
- package/dist/index.js +65 -7
- package/dist/index.js.map +1 -1
- package/dist/{swap-Oub-0vqU.d.ts → swap-PFQTJZA7.d.ts} +335 -2
- package/dist/swap.d.ts +1 -1
- package/dist/swap.js +21 -1
- package/package.json +2 -2
- package/dist/chunk-7LBYFU4L.js.map +0 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ const result = await node.start();
|
|
|
60
60
|
console.log(`Connected to ${result.peerCount} peers`);
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
> **Easier path:** If you just want to run a relay, use [`@toon-protocol/
|
|
63
|
+
> **Easier path:** If you just want to run a relay, use [`@toon-protocol/relay`](https://github.com/toon-protocol/relay) — it wraps the SDK with sensible defaults and runs out of the box. The SDK is for building custom services where you control the full pipeline.
|
|
64
64
|
|
|
65
65
|
## Where It Sits
|
|
66
66
|
|
|
@@ -100,17 +100,17 @@ The SDK is the framework layer. You bring handlers; it handles the protocol.
|
|
|
100
100
|
| **Self-write bypass** | Events from your own pubkey skip pricing |
|
|
101
101
|
| **Dev mode** | Skip verification and pricing for testing |
|
|
102
102
|
| **[TOON](https://github.com/toon-format/toon) encoding** | Events encoded in compact text format, not JSON |
|
|
103
|
-
| **Address assignment** | ILP addresses are derived from peering topology — your upstream peer assigns your address automatically based on your pubkey. A node with multiple upstream peers has multiple addresses. See [Protocol — ILP Address Hierarchy](
|
|
103
|
+
| **Address assignment** | ILP addresses are derived from peering topology — your upstream peer assigns your address automatically based on your pubkey. A node with multiple upstream peers has multiple addresses. See [Protocol — ILP Address Hierarchy](https://github.com/toon-protocol/toon-meta/blob/main/docs/protocol.md#ilp-address-hierarchy) |
|
|
104
104
|
| **Invisible fee calculation** | The SDK computes multi-hop fees internally. Each intermediary advertises a fee-per-byte; the SDK sums them along the route so `publishEvent()` callers pay one total amount |
|
|
105
105
|
|
|
106
106
|
## Full Documentation
|
|
107
107
|
|
|
108
|
-
See the [SDK Guide](
|
|
108
|
+
See the [SDK Guide](https://github.com/toon-protocol/toon-meta/blob/main/docs/sdk-guide.md) for the complete API reference, handler patterns, verification pipeline details, publishing events, and error handling.
|
|
109
109
|
|
|
110
110
|
## Requirements
|
|
111
111
|
|
|
112
|
-
- Node.js >=
|
|
113
|
-
- `@toon-protocol/connector` >=
|
|
112
|
+
- Node.js >= 22
|
|
113
|
+
- `@toon-protocol/connector` >= 3.3.3 (peer dependency, optional)
|
|
114
114
|
|
|
115
115
|
## License
|
|
116
116
|
|