@toon-protocol/git 1.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 +52 -0
- package/dist/chunk-4WFGAICZ.js +707 -0
- package/dist/chunk-4WFGAICZ.js.map +1 -0
- package/dist/chunk-KXXHAUXL.js +109 -0
- package/dist/chunk-KXXHAUXL.js.map +1 -0
- package/dist/chunk-LJA7PPZI.js +144 -0
- package/dist/chunk-LJA7PPZI.js.map +1 -0
- package/dist/chunk-M7O4SEVW.js +56 -0
- package/dist/chunk-M7O4SEVW.js.map +1 -0
- package/dist/chunk-R3JVS6SX.js +345 -0
- package/dist/chunk-R3JVS6SX.js.map +1 -0
- package/dist/chunk-SBMFWVCP.js +265 -0
- package/dist/chunk-SBMFWVCP.js.map +1 -0
- package/dist/cli/rig.d.ts +1 -0
- package/dist/cli/rig.js +1430 -0
- package/dist/cli/rig.js.map +1 -0
- package/dist/index.d.ts +742 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/publisher-VEIEQHl6.d.ts +254 -0
- package/dist/standalone/index.d.ts +272 -0
- package/dist/standalone/index.js +30 -0
- package/dist/standalone/index.js.map +1 -0
- package/dist/standalone-mode-UFMHGUOM.js +132 -0
- package/dist/standalone-mode-UFMHGUOM.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchRemoteState
|
|
3
|
+
} from "./chunk-R3JVS6SX.js";
|
|
4
|
+
import "./chunk-KXXHAUXL.js";
|
|
5
|
+
import {
|
|
6
|
+
StandalonePublisher
|
|
7
|
+
} from "./chunk-SBMFWVCP.js";
|
|
8
|
+
import "./chunk-LJA7PPZI.js";
|
|
9
|
+
import "./chunk-M7O4SEVW.js";
|
|
10
|
+
|
|
11
|
+
// src/cli/standalone-mode.ts
|
|
12
|
+
import { readFileSync } from "fs";
|
|
13
|
+
import { homedir } from "os";
|
|
14
|
+
import { join } from "path";
|
|
15
|
+
import { loadKeystore } from "@toon-protocol/client";
|
|
16
|
+
import {
|
|
17
|
+
GenesisPeerLoader,
|
|
18
|
+
decodeEventFromToon,
|
|
19
|
+
encodeEventToToon
|
|
20
|
+
} from "@toon-protocol/core";
|
|
21
|
+
var DEFAULT_KEYSTORE_PASSWORD = "toon-client-default";
|
|
22
|
+
var MissingMnemonicError = class extends Error {
|
|
23
|
+
constructor(configPath) {
|
|
24
|
+
super(
|
|
25
|
+
`standalone mode needs an identity: set TOON_CLIENT_MNEMONIC (BIP-39 seed phrase), or configure ${configPath} with a mnemonic or keystorePath (+ TOON_CLIENT_KEYSTORE_PASSWORD)`
|
|
26
|
+
);
|
|
27
|
+
this.name = "MissingMnemonicError";
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var MissingUplinkError = class extends Error {
|
|
31
|
+
constructor(configPath) {
|
|
32
|
+
super(
|
|
33
|
+
`standalone mode has no write uplink: set TOON_CLIENT_PROXY_URL (connector payment proxy) or TOON_CLIENT_BTP_URL, or add proxyUrl/btpUrl to ${configPath}`
|
|
34
|
+
);
|
|
35
|
+
this.name = "MissingUplinkError";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
function configDir(env) {
|
|
39
|
+
return env["TOON_CLIENT_HOME"] ?? join(homedir(), ".toon-client");
|
|
40
|
+
}
|
|
41
|
+
function readClientConfig(path) {
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
44
|
+
} catch (err) {
|
|
45
|
+
if (err.code === "ENOENT") return {};
|
|
46
|
+
throw new Error(
|
|
47
|
+
`failed to read client config at ${path}: ${err instanceof Error ? err.message : String(err)}`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function resolveMnemonic(env, file, configPath) {
|
|
52
|
+
const envMnemonic = env["TOON_CLIENT_MNEMONIC"];
|
|
53
|
+
if (envMnemonic) return envMnemonic.trim();
|
|
54
|
+
if (file.keystorePath) {
|
|
55
|
+
const password = env["TOON_CLIENT_KEYSTORE_PASSWORD"] ?? (file.keystoreAutoPassword ? DEFAULT_KEYSTORE_PASSWORD : void 0);
|
|
56
|
+
if (!password) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`keystorePath is set in ${configPath} but TOON_CLIENT_KEYSTORE_PASSWORD is not provided`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return loadKeystore(file.keystorePath, password);
|
|
62
|
+
}
|
|
63
|
+
if (file.mnemonic) return file.mnemonic.trim();
|
|
64
|
+
throw new MissingMnemonicError(configPath);
|
|
65
|
+
}
|
|
66
|
+
async function createStandaloneContext(env) {
|
|
67
|
+
const dir = configDir(env);
|
|
68
|
+
const configPath = join(dir, "config.json");
|
|
69
|
+
const file = readClientConfig(configPath);
|
|
70
|
+
const mnemonic = resolveMnemonic(env, file, configPath);
|
|
71
|
+
const proxyUrl = env["TOON_CLIENT_PROXY_URL"] ?? file.proxyUrl;
|
|
72
|
+
const btpUrl = env["TOON_CLIENT_BTP_URL"] ?? file.btpUrl;
|
|
73
|
+
if (!proxyUrl && !btpUrl) throw new MissingUplinkError(configPath);
|
|
74
|
+
const genesisSeed = GenesisPeerLoader.loadGenesisPeers()[0];
|
|
75
|
+
const relayUrl = env["TOON_CLIENT_RELAY_URL"] ?? file.relayUrl ?? genesisSeed?.relayUrl ?? "ws://localhost:7100";
|
|
76
|
+
const destination = env["TOON_CLIENT_DESTINATION"] ?? file.destination ?? genesisSeed?.ilpAddress ?? "g.proxy";
|
|
77
|
+
const publishDestination = env["TOON_CLIENT_PUBLISH_DESTINATION"] ?? file.publishDestination;
|
|
78
|
+
const storeDestination = env["TOON_CLIENT_STORE_DESTINATION"] ?? file.storeDestination;
|
|
79
|
+
const network = env["TOON_CLIENT_NETWORK"] ?? file.network;
|
|
80
|
+
const channelStorePath = file.channelStorePath ?? join(dir, "channels.json");
|
|
81
|
+
const eventFee = BigInt(file.feePerEvent ?? "1");
|
|
82
|
+
const clientConfig = {
|
|
83
|
+
// validateConfig requires connectorUrl OR proxyUrl; with BTP-only config a
|
|
84
|
+
// dummy connectorUrl satisfies it (unused at runtime — same convention as
|
|
85
|
+
// the daemon).
|
|
86
|
+
...proxyUrl ? { proxyUrl } : { connectorUrl: "http://127.0.0.1:1" },
|
|
87
|
+
mnemonic,
|
|
88
|
+
mnemonicAccountIndex: file.mnemonicAccountIndex ?? 0,
|
|
89
|
+
ilpInfo: {
|
|
90
|
+
pubkey: "00".repeat(32),
|
|
91
|
+
ilpAddress: "g.toon.client",
|
|
92
|
+
btpEndpoint: btpUrl ?? "",
|
|
93
|
+
assetCode: "USD",
|
|
94
|
+
assetScale: 6
|
|
95
|
+
},
|
|
96
|
+
toonEncoder: encodeEventToToon,
|
|
97
|
+
toonDecoder: decodeEventFromToon,
|
|
98
|
+
...btpUrl ? { btpUrl, btpAuthToken: "" } : {},
|
|
99
|
+
destinationAddress: destination,
|
|
100
|
+
relayUrl: "",
|
|
101
|
+
// remote state uses fetchRemoteState, not bootstrap discovery
|
|
102
|
+
knownPeers: [],
|
|
103
|
+
channelStorePath,
|
|
104
|
+
...network ? { network } : {},
|
|
105
|
+
...file.supportedChains ? { supportedChains: file.supportedChains } : {},
|
|
106
|
+
...file.settlementAddresses ? { settlementAddresses: file.settlementAddresses } : {},
|
|
107
|
+
...file.preferredTokens ? { preferredTokens: file.preferredTokens } : {},
|
|
108
|
+
...file.tokenNetworks ? { tokenNetworks: file.tokenNetworks } : {},
|
|
109
|
+
...file.chainRpcUrls ? { chainRpcUrls: file.chainRpcUrls } : {},
|
|
110
|
+
...file.solanaChannel ? { solanaChannel: file.solanaChannel } : {},
|
|
111
|
+
...file.minaChannel ? { minaChannel: file.minaChannel } : {}
|
|
112
|
+
};
|
|
113
|
+
const publisher = new StandalonePublisher({
|
|
114
|
+
clientConfig,
|
|
115
|
+
eventFee,
|
|
116
|
+
...publishDestination ? { publishDestination } : {},
|
|
117
|
+
...storeDestination ? { storeDestination } : {}
|
|
118
|
+
});
|
|
119
|
+
return {
|
|
120
|
+
ownerPubkey: publisher.getPublicKey(),
|
|
121
|
+
publisher,
|
|
122
|
+
defaultRelayUrls: [relayUrl],
|
|
123
|
+
fetchRemote: (args) => fetchRemoteState(args),
|
|
124
|
+
stop: () => publisher.stop()
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
MissingMnemonicError,
|
|
129
|
+
MissingUplinkError,
|
|
130
|
+
createStandaloneContext
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=standalone-mode-UFMHGUOM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/standalone-mode.ts"],"sourcesContent":["/**\n * Real standalone mode for `rig push`: build an embedded, nonce-guarded\n * {@link StandalonePublisher} from the caller's own identity and config.\n *\n * Config resolution DUPLICATES the toon-clientd conventions\n * (`packages/client-mcp/src/daemon/config.ts`) the same way\n * `../standalone/nonce-guard.ts` does — this package must not import\n * `@toon-protocol/client-mcp` (circular; see that module's doc). Keep in sync:\n *\n * - state dir: `TOON_CLIENT_HOME`, else `~/.toon-client`; config `config.json`\n * - mnemonic precedence: `TOON_CLIENT_MNEMONIC` env → encrypted keystore\n * (`keystorePath` + `TOON_CLIENT_KEYSTORE_PASSWORD`, auto-password\n * fallback for daemon-provisioned keystores) → `mnemonic` config field\n * - env overrides: `TOON_CLIENT_PROXY_URL`, `TOON_CLIENT_BTP_URL`,\n * `TOON_CLIENT_RELAY_URL`, `TOON_CLIENT_DESTINATION`,\n * `TOON_CLIENT_PUBLISH_DESTINATION`, `TOON_CLIENT_STORE_DESTINATION`,\n * `TOON_CLIENT_NETWORK`\n * - defaults bootstrap from the committed genesis peer seed\n * (`@toon-protocol/core` GenesisPeerLoader)\n *\n * This module statically imports the OPTIONAL `@toon-protocol/client` peer\n * dependency, so it must only ever be reached through the dynamic import in\n * `push.ts` (see `./standalone-context.ts`).\n */\n\nimport { readFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { loadKeystore } from '@toon-protocol/client';\nimport type { ToonClientConfig } from '@toon-protocol/client';\nimport {\n GenesisPeerLoader,\n decodeEventFromToon,\n encodeEventToToon,\n} from '@toon-protocol/core';\nimport { StandalonePublisher } from '../standalone/standalone-publisher.js';\nimport { fetchRemoteState } from '../remote-state.js';\nimport type { StandaloneContext } from './standalone-context.js';\n\n/** Duplicated daemon convention (see module doc): auto-keystore password. */\nconst DEFAULT_KEYSTORE_PASSWORD = 'toon-client-default';\n\n/** The subset of the shared client config file standalone mode consumes. */\ninterface ClientConfigFile {\n network?: 'mainnet' | 'testnet' | 'devnet' | 'custom';\n mnemonic?: string;\n mnemonicAccountIndex?: number;\n keystorePath?: string;\n keystoreAutoPassword?: boolean;\n btpUrl?: string;\n proxyUrl?: string;\n relayUrl?: string;\n destination?: string;\n publishDestination?: string;\n storeDestination?: string;\n feePerEvent?: string;\n channelStorePath?: string;\n supportedChains?: string[];\n settlementAddresses?: Record<string, string>;\n preferredTokens?: Record<string, string>;\n tokenNetworks?: Record<string, string>;\n chainRpcUrls?: Record<string, string>;\n solanaChannel?: ToonClientConfig['solanaChannel'];\n minaChannel?: ToonClientConfig['minaChannel'];\n}\n\n/** No mnemonic could be resolved for standalone mode. */\nexport class MissingMnemonicError extends Error {\n constructor(configPath: string) {\n super(\n 'standalone mode needs an identity: set TOON_CLIENT_MNEMONIC (BIP-39 ' +\n `seed phrase), or configure ${configPath} with a mnemonic or ` +\n 'keystorePath (+ TOON_CLIENT_KEYSTORE_PASSWORD)'\n );\n this.name = 'MissingMnemonicError';\n }\n}\n\n/** Standalone mode has an identity but no way to send paid writes. */\nexport class MissingUplinkError extends Error {\n constructor(configPath: string) {\n super(\n 'standalone mode has no write uplink: set TOON_CLIENT_PROXY_URL ' +\n '(connector payment proxy) or TOON_CLIENT_BTP_URL, or add ' +\n `proxyUrl/btpUrl to ${configPath}`\n );\n this.name = 'MissingUplinkError';\n }\n}\n\nfunction configDir(env: NodeJS.ProcessEnv): string {\n return env['TOON_CLIENT_HOME'] ?? join(homedir(), '.toon-client');\n}\n\nfunction readClientConfig(path: string): ClientConfigFile {\n try {\n return JSON.parse(readFileSync(path, 'utf8')) as ClientConfigFile;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') return {};\n throw new Error(\n `failed to read client config at ${path}: ${err instanceof Error ? err.message : String(err)}`\n );\n }\n}\n\nfunction resolveMnemonic(\n env: NodeJS.ProcessEnv,\n file: ClientConfigFile,\n configPath: string\n): string {\n const envMnemonic = env['TOON_CLIENT_MNEMONIC'];\n if (envMnemonic) return envMnemonic.trim();\n if (file.keystorePath) {\n const password =\n env['TOON_CLIENT_KEYSTORE_PASSWORD'] ??\n (file.keystoreAutoPassword ? DEFAULT_KEYSTORE_PASSWORD : undefined);\n if (!password) {\n throw new Error(\n `keystorePath is set in ${configPath} but TOON_CLIENT_KEYSTORE_PASSWORD is not provided`\n );\n }\n return loadKeystore(file.keystorePath, password);\n }\n if (file.mnemonic) return file.mnemonic.trim();\n throw new MissingMnemonicError(configPath);\n}\n\n/**\n * Assemble an embedded-client standalone context: resolved config →\n * ToonClientConfig → nonce-guarded StandalonePublisher (guard + client start\n * + channel open happen lazily on the first paid call, or eagerly via the\n * publisher's own `start`).\n */\nexport async function createStandaloneContext(\n env: NodeJS.ProcessEnv\n): Promise<StandaloneContext> {\n const dir = configDir(env);\n const configPath = join(dir, 'config.json');\n const file = readClientConfig(configPath);\n const mnemonic = resolveMnemonic(env, file, configPath);\n\n const proxyUrl = env['TOON_CLIENT_PROXY_URL'] ?? file.proxyUrl;\n const btpUrl = env['TOON_CLIENT_BTP_URL'] ?? file.btpUrl;\n if (!proxyUrl && !btpUrl) throw new MissingUplinkError(configPath);\n\n const genesisSeed = GenesisPeerLoader.loadGenesisPeers()[0];\n const relayUrl =\n env['TOON_CLIENT_RELAY_URL'] ??\n file.relayUrl ??\n genesisSeed?.relayUrl ??\n 'ws://localhost:7100';\n const destination =\n env['TOON_CLIENT_DESTINATION'] ??\n file.destination ??\n genesisSeed?.ilpAddress ??\n 'g.proxy';\n const publishDestination =\n env['TOON_CLIENT_PUBLISH_DESTINATION'] ?? file.publishDestination;\n const storeDestination =\n env['TOON_CLIENT_STORE_DESTINATION'] ?? file.storeDestination;\n const network = (env['TOON_CLIENT_NETWORK'] ?? file.network) as\n | ToonClientConfig['network']\n | undefined;\n const channelStorePath = file.channelStorePath ?? join(dir, 'channels.json');\n const eventFee = BigInt(file.feePerEvent ?? '1');\n\n const clientConfig: ToonClientConfig = {\n // validateConfig requires connectorUrl OR proxyUrl; with BTP-only config a\n // dummy connectorUrl satisfies it (unused at runtime — same convention as\n // the daemon).\n ...(proxyUrl ? { proxyUrl } : { connectorUrl: 'http://127.0.0.1:1' }),\n mnemonic,\n mnemonicAccountIndex: file.mnemonicAccountIndex ?? 0,\n ilpInfo: {\n pubkey: '00'.repeat(32),\n ilpAddress: 'g.toon.client',\n btpEndpoint: btpUrl ?? '',\n assetCode: 'USD',\n assetScale: 6,\n },\n toonEncoder: encodeEventToToon,\n toonDecoder: decodeEventFromToon,\n ...(btpUrl ? { btpUrl, btpAuthToken: '' } : {}),\n destinationAddress: destination,\n relayUrl: '', // remote state uses fetchRemoteState, not bootstrap discovery\n knownPeers: [],\n channelStorePath,\n ...(network ? { network } : {}),\n ...(file.supportedChains ? { supportedChains: file.supportedChains } : {}),\n ...(file.settlementAddresses\n ? { settlementAddresses: file.settlementAddresses }\n : {}),\n ...(file.preferredTokens ? { preferredTokens: file.preferredTokens } : {}),\n ...(file.tokenNetworks ? { tokenNetworks: file.tokenNetworks } : {}),\n ...(file.chainRpcUrls ? { chainRpcUrls: file.chainRpcUrls } : {}),\n ...(file.solanaChannel ? { solanaChannel: file.solanaChannel } : {}),\n ...(file.minaChannel ? { minaChannel: file.minaChannel } : {}),\n };\n\n const publisher = new StandalonePublisher({\n clientConfig,\n eventFee,\n ...(publishDestination ? { publishDestination } : {}),\n ...(storeDestination ? { storeDestination } : {}),\n });\n\n return {\n ownerPubkey: publisher.getPublicKey(),\n publisher,\n defaultRelayUrls: [relayUrl],\n fetchRemote: (args) => fetchRemoteState(args),\n stop: () => publisher.stop(),\n };\n}\n"],"mappings":"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","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@toon-protocol/git",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Git-to-TOON write path core — build git objects and NIP-34 events for the Rig control plane",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Jonathan Green",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/toon-protocol/toon-client.git",
|
|
10
|
+
"directory": "packages/git"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"git",
|
|
17
|
+
"nostr",
|
|
18
|
+
"nip-34",
|
|
19
|
+
"toon",
|
|
20
|
+
"arweave",
|
|
21
|
+
"ilp"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"bin": {
|
|
27
|
+
"rig": "./dist/cli/rig.js"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./standalone": {
|
|
35
|
+
"types": "./dist/standalone/index.d.ts",
|
|
36
|
+
"import": "./dist/standalone/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"README.md"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@toon-format/toon": "^1.0.0",
|
|
46
|
+
"@toon-protocol/core": "^1.6.0",
|
|
47
|
+
"@toon-protocol/arweave": "0.2.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@toon-protocol/client": "^0.15.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"@toon-protocol/client": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/node": "^20.0.0",
|
|
59
|
+
"@types/ws": "^8.18.1",
|
|
60
|
+
"tsup": "^8.0.0",
|
|
61
|
+
"typescript": "^5.3.0",
|
|
62
|
+
"vitest": "^1.0.0",
|
|
63
|
+
"ws": "^8.18.0",
|
|
64
|
+
"@toon-protocol/client": "0.15.0"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsup",
|
|
68
|
+
"test": "vitest run",
|
|
69
|
+
"test:coverage": "vitest run --coverage"
|
|
70
|
+
}
|
|
71
|
+
}
|