ghostline

Ghostline / Interfaces and tools

ONE RAIL · FOUR WAYS TO USE IT

Pick the interface.
Keep the keys.

Use Ghostline directly from a terminal, embed it in an agent, or run the reference HTTP 402 service. Signing stays with the payer; wallet and fee operations stay under the operator's control.

CLIRUST · TYPESCRIPTMCP · STDIOESMERALDA

01 / PAID HTTP

Quote. Approve. Call.

The payer requests a protected endpoint. The service returns an HTTP 402 quote with its channel terms and price. The payer checks the channel, recipient, expiry, and local policy, signs the next cumulative voucher, then retries with the payment headers.

REQUEST402 QUOTEPOLICY + SIGNPAID RESPONSE

Reference endpoints

/fortune demonstrates fixed-price requests. /meter prices by units. /metrics is optional service telemetry, not an on-chain receipt.

One channel, cumulative vouchers

The voucher total increases as calls are accepted. Calls do not each create a chain transaction; the channel is settled later as one cumulative amount.

Validate before signing. The payer must check the quoted channel and recipient against its intended terms. Never sign an unexpected quote.

02 / COMMAND LINE

Operate the channel yourself.

The CLI covers channel terms, payer keys, wallet output recovery, dry-run transaction construction, settlement, refund, and indexer checks. The landing page's command map lists the broader surface; the Esmeralda quickstart walks through one path.

INSPECT BEFORE A LIVE ACTION
ghostline channel status --file /secure/path/channel.json
ghostline channel settle --file /secure/path/channel.json --dry-run
ghostline indexer result --url <esmeralda-indexer-url> --transaction-id <settlement-transaction-id>

These commands inspect status, estimate the transaction, and check an already-submitted transaction. Replace placeholders with values from your deployment. A dry-run does not broadcast; adding a submit option can move funds. Review the fee cap first.

03 / SDKs

Embed signing and verification.

Rust

The workspace separates ghostline-core, ghostline-sdk, ghostline-policy, ghostline-paywall, and ghostline-net. Use the SDK and policy surfaces when building payer or service integrations.

TypeScript

@ghostline/sdk provides voucher encoding, signing, and verification with shared Rust test vectors. It requires Node.js 22 or later and does not perform wallet operations.

The source package lives in packages/ghostline. Check the repository's current release and package instructions before installing; this page does not assume a registry release is available.

04 / AGENT TOOLS

Connect over MCP stdio.

ghostline-mcp exposes tools to an MCP host over standard input and output. An agent can ask the server to make a policy-gated paid call or inspect channel and transaction state.

Calls and vouchers

ghostline_call_paid makes a paid request; ghostline_sign_voucher and ghostline_verify_voucher handle voucher operations.

Channel operations

ghostline_channel_status, ghostline_channel_file, ghostline_channel_list, and ghostline_channel_calls inspect operator state. Open and close tools require explicit broadcast configuration.

Secrets stay out of tool arguments. Configure signing material and channel paths in the MCP server process environment. When the configured policy requires human approval, the server requests it through MCP elicitation. Approval depends on the host displaying that prompt to a person; the library-level policy API trusts its caller.

05 / DATA BOUNDARY

Private from observers.
Not from the service.

Payer

Knows its own requests, channel details, and signed voucher totals. In ordinary individual flows the deposit mask stays in payer-controlled state.

Service

Sees every request, price, and accepted voucher, plus the declared deposit limit. It does not receive the payer's deposit mask in ordinary individual flows.

Chain observers

The tested claim-free settlement and expiry refund hide deposit and plaintext transfer amounts in the inspected fields. Fees, timing, output count, channel metadata, authorization data, and branch remain visible.

Fresh keys reduce reuse links, not transaction links. Use separate payer and service authorization keys per channel. An optional one-time payout key separates authorization from later payout spends, but both public keys appear in the same settlement. The pooled settlement prototype is not coordinator-private: its builder sees all deposit openings, and observers see the grouped channel inputs.

Funding patterns, timing, and fee payers can still create correlations. Ghostline does not promise anonymity or unlinkable channels. Call counts come from the service record; chain finality confirms settlement.