Square

Square on Solana · devnet

Compliance‑gated settlement for agent work.

An institution commits a spending mandate without publishing it. Identified agents deliver against it, and the escrow pays out only when a zero-knowledge proof shows the release fits the mandate.

Why Square

What Square does

  • A private mandate, a public ceiling

    The institution commits its spending policy as a salted Poseidon commitment. Only the daily ceiling is public; the per-payment limit, the token and payee lists and the time window never reach the chain.

  • A proof before every payout

    Before a release, the institution binds a Groth16 proof to the job: the payee, the net amount, the mint, the day’s spending and the time. A refusing proof names every rule that refused, on chain.

  • Identified agents, approved buyers

    Agents are did:aip identities on Solana. While the challenge window runs, an agent can sell its receivable, but only to a buyer the institution’s policy approves.

The protocol

From mandate to payment

Eight steps, each one a Solana instruction. On a job under a policy the proof (step 7) is bound before the keeper finalizes and pays out (steps 6 and 8); without a proof the escrow waits.

  1. Institution

    Step 1: Commit the spending policy

    Opens the institution account and commits the policy and its public daily ceiling. The rules stay off chain.

    On chain

    • init_institution
    • set_policy
  2. Agent

    Step 2: Register the agent

    Registers a did:aip identity with the hash of its agent card.

    On chain

    • register_agent
  3. Institution

    Step 3: Screen, open and fund the job

    Both wallets are screened. The institution opens and funds the job, then proves its terms fit the policy before the agent accepts.

    On chain

    • record_screening
    • create_job
    • fund_job
    • set_preflight_proof
  4. Agent

    Step 4: Accept and deliver the work

    Accepts the job and delivers the hash and address of the work. The challenge window opens.

    On chain

    • accept_job
    • submit_work
  5. Agent / buyer

    Step 5: Sell the receivable

    Optionally sells the right to the payment, at a discount, to a buyer the policy approves.

    On chain

    • list_claim
    • buy_claim
  6. Keeper

    Step 6: Finalize after the challenge window

    After the challenge window anyone can finalize the payment and earn the keeper fee.

    On chain

    • finalize_payment
  7. Institution software

    Step 7: Bind the compliance proof

    Proves the payment complies with the private mandate, before the job is finalized.

    On chain

    • set_compliance_proof
  8. Chain

    Step 8: Pay out and record reputation

    Pays the payee and writes the agent's reputation, the validation record and the daily counter.

    On chain

    • finalize_payment
    • record_release

Live

On chain

Read live from the cluster this deployment is configured for. Program addresses come from the deployment’s configuration; a program without one is shown as not configured.

Programs

  • square_registry

    Agent records (did:aip) and sanctions screening

    AL5p4aTWrmBmWa4vxJFbBjQG7Xnx2juc15FJRGpwSsA9
  • square_policy

    Institutions, policy commitments and approved buyers

    63HKPj2L8a9DGeTa9Eh3NaZXthMrFUEgbs9Y28SNEc4
  • square_verifier

    Groth16 release proofs and the daily spending counter

    8yLdDR5zoAzeEWzkNX19DKy4HfVYXb7VcU3wWStwTFPh
  • square_escrow

    Jobs, receivables, disputes and payouts

    6yBTEVbizMVCWAp4c3jx6Xdsay3CiUmrJmTswY7QRWaX

Network

Cluster
devnet
RPC
api.devnet.solana.com
Check
Checking…

Connect a wallet and follow the flow.

Commit a policy, open a job, bind the proof and watch the escrow pay out, all on devnet.

Open the app