@toon-protocol/client-mcp 0.3.0 → 0.4.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/dist/daemon.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  ClientRunner,
5
5
  registerRoutes,
6
6
  scaffoldFirstRun
7
- } from "./chunk-QFHCXJ2V.js";
7
+ } from "./chunk-HDAH6TAT.js";
8
8
  import {
9
9
  ControlClient,
10
10
  ToonClient,
@@ -17,7 +17,7 @@ import {
17
17
  resolveConfig,
18
18
  spawnDaemonDetached,
19
19
  waitForReady
20
- } from "./chunk-CQ2QIZ6Z.js";
20
+ } from "./chunk-WGR4UZ34.js";
21
21
  import "./chunk-32QD72IL.js";
22
22
  import "./chunk-DLYE6U2Z.js";
23
23
  import "./chunk-LR7W2ISE.js";
package/dist/index.d.ts CHANGED
@@ -36,6 +36,10 @@ interface StatusResponse {
36
36
  ready: boolean;
37
37
  /** The active settlement chain for paid writes to the apex. */
38
38
  settlementChain: SettlementChain;
39
+ /** Per-event fee in base (micro) units, as a decimal string. */
40
+ feePerEvent: string;
41
+ /** Human-readable asset code for the fee (e.g. 'USDC'), when known. */
42
+ asset?: string;
39
43
  identity: {
40
44
  nostrPubkey: string;
41
45
  evmAddress?: string;
@@ -366,6 +370,29 @@ interface TargetsResponse {
366
370
  relays: RelayTargetStatus[];
367
371
  apexes: ApexTargetStatus[];
368
372
  }
373
+ /**
374
+ * `POST /fund-wallet` — drip devnet test funds to a chain address from the
375
+ * daemon's configured faucet. Both fields are optional: `chain` defaults to the
376
+ * active settlement chain and `address` to this client's own address on that
377
+ * chain, so a no-arg call funds the caller's own wallet.
378
+ */
379
+ interface FundWalletRequest {
380
+ /** Chain to fund (default: the active settlement chain). */
381
+ chain?: SettlementChain;
382
+ /** Address to fund (default: this client's own address for `chain`). */
383
+ address?: string;
384
+ }
385
+ /** `POST /fund-wallet` result. */
386
+ interface FundWalletResponse {
387
+ /** The chain that was funded. */
388
+ chain: SettlementChain;
389
+ /** The address that was funded. */
390
+ address: string;
391
+ /** The faucet base URL the drip was requested from. */
392
+ faucetUrl: string;
393
+ /** Raw parsed JSON body from the faucet (shape is faucet-defined). */
394
+ response: unknown;
395
+ }
369
396
  /** Uniform error envelope returned with non-2xx responses. */
370
397
  interface ErrorResponse {
371
398
  error: string;
@@ -440,6 +467,7 @@ declare class ControlClient {
440
467
  removeRelay(body: RemoveRelayRequest): Promise<TargetsResponse>;
441
468
  addApex(body: AddApexRequest): Promise<AddApexResponse>;
442
469
  removeApex(body: RemoveApexRequest): Promise<TargetsResponse>;
470
+ fundWallet(body?: FundWalletRequest): Promise<FundWalletResponse>;
443
471
  private request;
444
472
  }
445
473
 
@@ -954,6 +982,14 @@ declare class ClientRunner {
954
982
  isReady(): boolean;
955
983
  isBootstrapping(): boolean;
956
984
  getStatus(): StatusResponse;
985
+ /**
986
+ * Drip devnet test funds to a wallet from the configured faucet. Defaults the
987
+ * chain to the active settlement chain and the address to this client's own
988
+ * address on that chain, so a no-arg call funds the caller's own wallet
989
+ * (the typical "fund me before I open a channel" flow). The daemon holds the
990
+ * faucet URL + the keys, so the MCP caller never needs either.
991
+ */
992
+ fundWallet(req?: FundWalletRequest): Promise<FundWalletResponse>;
957
993
  /** Full registry of relay + apex targets with per-target status. */
958
994
  getTargets(): TargetsResponse;
959
995
  /** Pay-to-write a single event through the selected (or default) apex. */
@@ -1176,4 +1212,4 @@ interface JourneyResult {
1176
1212
  */
1177
1213
  declare function runJourney(plan: JourneyPlan, client: ControlClient): Promise<JourneyResult>;
1178
1214
 
1179
- export { type AddApexRequest, type AddApexResponse, type AddRelayRequest, type ApexNegotiationConfig, type ApexTargetStatus, type ChainStatus, type ChannelInfo, type ChannelsResponse, ClientRunner, type ClientRunnerDeps, ControlApiError, ControlClient, type ControlClientOptions, DEFAULT_KEYSTORE_PASSWORD, type DaemonConfigFile, DaemonUnreachableError, type DrainResult, type ErrorResponse, type EventsQuery, type EventsResponse, type HttpFetchPaidRequest, type HttpFetchPaidResponse, type JourneyPlan, type JourneyResult, type JourneyState, type JourneyStep, type JourneyStepResult, type MinimalWebSocket, type NostrFilter, NotReadyError, type OpenChannelRequest, PublishRejectedError, type PublishRequest, type PublishResponse, type PublishUnsignedRequest, type QueryRequest, type QueryResponse, RelaySubscription, type RelaySubscriptionOptions, type RelayTargetStatus, type RemoveApexRequest, type RemoveRelayRequest, type ResolvedDaemonConfig, type SettlementChain, type StatusResponse, type SubscribeRequest, type SubscribeResponse, type SwapClaim, type SwapRequest, type SwapResponse, TOOL_DEFINITIONS, type TargetsResponse, type ToolDefinition, type ToolResult, type ToonClientLike, type UploadMediaRequest, type UploadMediaResponse, type WebSocketFactory, acquireLock, configDir, defaultConfigPath, defaultKeystorePath, dispatchTool, hasConfiguredIdentity, isDaemonRunning, isProcessAlive, readConfigFile, readPid, registerRoutes, releaseLock, resolveConfig, resolveMnemonic, runJourney, scaffoldFirstRun, spawnDaemonDetached, waitForReady };
1215
+ export { type AddApexRequest, type AddApexResponse, type AddRelayRequest, type ApexNegotiationConfig, type ApexTargetStatus, type ChainStatus, type ChannelInfo, type ChannelsResponse, ClientRunner, type ClientRunnerDeps, ControlApiError, ControlClient, type ControlClientOptions, DEFAULT_KEYSTORE_PASSWORD, type DaemonConfigFile, DaemonUnreachableError, type DrainResult, type ErrorResponse, type EventsQuery, type EventsResponse, type FundWalletRequest, type FundWalletResponse, type HttpFetchPaidRequest, type HttpFetchPaidResponse, type JourneyPlan, type JourneyResult, type JourneyState, type JourneyStep, type JourneyStepResult, type MinimalWebSocket, type NostrFilter, NotReadyError, type OpenChannelRequest, PublishRejectedError, type PublishRequest, type PublishResponse, type PublishUnsignedRequest, type QueryRequest, type QueryResponse, RelaySubscription, type RelaySubscriptionOptions, type RelayTargetStatus, type RemoveApexRequest, type RemoveRelayRequest, type ResolvedDaemonConfig, type SettlementChain, type StatusResponse, type SubscribeRequest, type SubscribeResponse, type SwapClaim, type SwapRequest, type SwapResponse, TOOL_DEFINITIONS, type TargetsResponse, type ToolDefinition, type ToolResult, type ToonClientLike, type UploadMediaRequest, type UploadMediaResponse, type WebSocketFactory, acquireLock, configDir, defaultConfigPath, defaultKeystorePath, dispatchTool, hasConfiguredIdentity, isDaemonRunning, isProcessAlive, readConfigFile, readPid, registerRoutes, releaseLock, resolveConfig, resolveMnemonic, runJourney, scaffoldFirstRun, spawnDaemonDetached, waitForReady };
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  hasConfiguredIdentity,
9
9
  registerRoutes,
10
10
  scaffoldFirstRun
11
- } from "./chunk-QFHCXJ2V.js";
11
+ } from "./chunk-HDAH6TAT.js";
12
12
  import {
13
13
  PUBLISH_TOOL,
14
14
  TOOL_DEFINITIONS,
@@ -18,7 +18,7 @@ import {
18
18
  buildFollowListFilter,
19
19
  buildProfileFilter,
20
20
  dispatchTool
21
- } from "./chunk-XV52IHVR.js";
21
+ } from "./chunk-MAQ3UZPR.js";
22
22
  import {
23
23
  ControlApiError,
24
24
  ControlClient,
@@ -36,7 +36,7 @@ import {
36
36
  resolveMnemonic,
37
37
  spawnDaemonDetached,
38
38
  waitForReady
39
- } from "./chunk-CQ2QIZ6Z.js";
39
+ } from "./chunk-WGR4UZ34.js";
40
40
  import "./chunk-32QD72IL.js";
41
41
  import "./chunk-DLYE6U2Z.js";
42
42
  import "./chunk-LR7W2ISE.js";
package/dist/mcp.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  APP_RESOURCE_URI,
5
5
  TOOL_DEFINITIONS,
6
6
  dispatchTool
7
- } from "./chunk-XV52IHVR.js";
7
+ } from "./chunk-MAQ3UZPR.js";
8
8
  import {
9
9
  ControlClient,
10
10
  defaultConfigPath,
@@ -12,7 +12,7 @@ import {
12
12
  readConfigFile,
13
13
  spawnDaemonDetached,
14
14
  waitForReady
15
- } from "./chunk-CQ2QIZ6Z.js";
15
+ } from "./chunk-WGR4UZ34.js";
16
16
  import "./chunk-32QD72IL.js";
17
17
  import "./chunk-DLYE6U2Z.js";
18
18
  import "./chunk-LR7W2ISE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toon-protocol/client-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Always-on local daemon + MCP server letting a Claude agent (Desktop or Code) act as a TOON Protocol client: pay-to-write publishing, free reads, channel/balance management, and swaps.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Green",
@@ -48,8 +48,8 @@
48
48
  "tsx": "^4.19.2",
49
49
  "typescript": "^5.3.0",
50
50
  "vitest": "^1.0.0",
51
- "@toon-protocol/client": "0.12.0",
52
- "@toon-protocol/views": "0.1.0"
51
+ "@toon-protocol/client": "0.13.0",
52
+ "@toon-protocol/views": "0.1.2"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=20"