Skip to content
Ghostline

How it works

Four moves. Only two touch the chain.

A Ghostline channel is a deposit both sides can trust: the payer can’t take it back early, and the service can’t take more than the payer signed for.

  1. 01

    Open

    on chain

    Payer's wallet

    Locks a deposit in a channel output. The chain sees one transaction with the amount hidden; the fee is public.

    ≈ 15,919 µT

  2. 02

    Pay per call

    off-chain

    Agent → API

    Each call carries a signed voucher for the new running total. Nothing is published. It repeats as often as the agent calls.

    0 µT on chain

  3. 03

    Settle

    on chain

    Service

    Before expiry, the service spends the channel with the latest voucher: its payout, the 1% protocol fee, and the payer's change, all as hidden amounts.

    ≈ 28,808 µT

  4. 04

    Refund at expiry

    on chain

    Payer

    If the service never settles, the payer takes the whole deposit back once the expiry epoch is reached.

    ≈ 10,014 µT

Network fees measured on mainnet, 13 Nov 2026. Re-run the dry-run before you rely on them.

One paid call

Quote. Check. Sign. Call.

Ghostline speaks HTTP 402 Payment Required. The whole exchange happens between the agent and the API, in milliseconds, with no chain access.

  1. 1AgentCalls the API with no payment.
  2. 2APIAnswers HTTP 402 with a quote: price, channel id, the service's payout key, and how long the quote is valid.
  3. 3PolicyChecks the quote outside the agent: budget, per-call cap, vendor allowlist. New vendors and large spends wait for a human.
  4. 4AgentSigns a voucher for the new cumulative total and retries the call with it.
  5. 5APIVerifies the voucher, stores it as the latest, and serves the response.

Inside a voucher

A signed promise with a hidden number.

Each voucher replaces the last. Only the latest matters, so the service settles once no matter how many calls were made.

channel_id
Binds the network, payer key, deposit, spend conditions and a nonce. A voucher for one channel is useless on another.
service_output_key
The one-time key the payout will be locked to, so it lands in the service's wallet.
output_commitment
A commitment to the cumulative amount. The chain checks it; it never sees the number.
signature
The payer's signature over the three fields above, under a versioned domain.
amount + mask
The opening of the commitment. Only the service gets these, so it can verify the total and later find its payout.

Enforced by the channel template

Rules nobody can bend.

  • Settle works only before the expiry epoch. Refund works only at or after it.
  • A settle can pay out at most floor((deposit − 1) / 101) × 100 µT. The 1% fee and 1 µT of change are reserved.
  • The service accepts only a higher cumulative total than its last voucher, so replaying an old voucher pays nothing extra.
  • The protocol fee goes to the treasury key read from the on-chain fee config at settle time.