@toon-protocol/client 0.7.0 → 0.8.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 +4 -4
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ curl http://localhost:19110/health # Peer 2 BLS
|
|
|
49
49
|
## Quick Start
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
|
-
import {
|
|
52
|
+
import { ToonClient } from '@toon-protocol/client';
|
|
53
53
|
import { generateSecretKey, getPublicKey, finalizeEvent } from 'nostr-tools/pure';
|
|
54
54
|
import { encodeEventToToon, decodeEventFromToon } from '@toon-protocol/relay';
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ const secretKey = generateSecretKey();
|
|
|
58
58
|
const pubkey = getPublicKey(secretKey);
|
|
59
59
|
|
|
60
60
|
// 2. Create client
|
|
61
|
-
const client = new
|
|
61
|
+
const client = new ToonClient({
|
|
62
62
|
connectorUrl: 'http://localhost:8080',
|
|
63
63
|
secretKey,
|
|
64
64
|
ilpInfo: {
|
|
@@ -102,7 +102,7 @@ The client supports EVM-based payment channels for off-chain settlement. Your EV
|
|
|
102
102
|
To use payment channels, add chain configuration. The client already has your EVM identity from `secretKey`:
|
|
103
103
|
|
|
104
104
|
```typescript
|
|
105
|
-
const client = new
|
|
105
|
+
const client = new ToonClient({
|
|
106
106
|
connectorUrl: 'http://localhost:8080',
|
|
107
107
|
secretKey,
|
|
108
108
|
ilpInfo: { pubkey, ilpAddress: `g.toon.${pubkey.slice(0, 8)}`, btpEndpoint: 'ws://localhost:3000' },
|
|
@@ -141,7 +141,7 @@ await client.publishEvent(event, { claim });
|
|
|
141
141
|
If you need a different EVM identity than your Nostr key (e.g., hardware wallet or custodial key), pass `evmPrivateKey` explicitly:
|
|
142
142
|
|
|
143
143
|
```typescript
|
|
144
|
-
const client = new
|
|
144
|
+
const client = new ToonClient({
|
|
145
145
|
// ... required config ...
|
|
146
146
|
evmPrivateKey: '0x...', // Overrides the default derivation from secretKey
|
|
147
147
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toon-protocol/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TOON client for ILP-gated Nostr publishing with multi-hop routing and payment channels",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Green",
|
|
@@ -41,11 +41,19 @@
|
|
|
41
41
|
"test:coverage": "vitest run --coverage"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@noble/ed25519": "^2.0.0",
|
|
45
|
+
"@noble/hashes": "^1.4.0",
|
|
46
|
+
"@scure/bip32": "^1.4.0",
|
|
47
|
+
"@scure/bip39": "^1.3.0",
|
|
44
48
|
"@toon-protocol/connector": "^2.2.0",
|
|
45
49
|
"@toon-protocol/core": "workspace:*",
|
|
46
50
|
"nostr-tools": "^2.20.0",
|
|
47
51
|
"viem": "^2.0.0"
|
|
48
52
|
},
|
|
53
|
+
"optionalDependencies": {
|
|
54
|
+
"@solana/web3.js": "^1.90.0",
|
|
55
|
+
"mina-signer": "^3.0.0"
|
|
56
|
+
},
|
|
49
57
|
"devDependencies": {
|
|
50
58
|
"@toon-protocol/relay": "workspace:*",
|
|
51
59
|
"@types/node": "^20.0.0",
|