identity
cap
Intent
submitter

h4m8qt

100%
flowchart LR
  owner(["Owner
a person"]) subgraph pad["Pad (new device)"] padapp["Pad app
a browser page
holds the identity key"] end subgraph console["Console (browser)"] devices["Devices extension
in the Extensions tab, permission wallet: authorize
pending requests, caps, revoke"] end phone["Phone wallet
imToken, MetaMask, AlphaWallet
signs transactions"] subgraph chain["Base Sepolia"] a["Contract A
ServiceAuthorization"] dir["ServiceDirectory"] end subgraph wp["Woodpecker services (Cloudflare Workers)"] svc["A service
gateway + backend"] runner["Runner"] sub["Submitter key
inside the service"] end owner -- "scans the pad's QR code" --> devices padapp -. "QR code: identity, tokens, caps" .-> devices devices -- "WalletConnect: sign authorize(identity, token, cap)" --> phone phone -- "transaction" --> a padapp -- "poll authorizationOf" --> a padapp -- "sign-in challenge, then calls with Intents
signed by the identity" --> svc padapp -- "conversations" --> runner svc -- "is the identity authorized? room?" --> a sub -- "settle(intent, actual)" --> a svc -- "price document hash" --> dir

r2k6vb

100%
sequenceDiagram
  autonumber
  actor Owner
  participant Pad as Pad app (identity key)
  participant Console as Console (Devices extension)
  participant Phone as Phone wallet
  participant A as Contract A
  participant Svc as Service (gateway + backend)
  participant Sub as Submitter (inside the service)

  Pad->>Pad: generate the identity key
  Pad-->>Owner: show a QR code: chain, identity, tokens and caps
  Owner->>Console: scan the QR code, confirm the caps
  loop one transaction per token
    Console->>Phone: wallet.request → the signing panel → WalletConnect: sign authorize(identity, token, cap)
    Phone-->>Owner: prompt
    Owner->>Phone: approve
    Phone->>A: authorize(identity, token, cap)
  end
  loop until cap > 0
    Pad->>A: authorizationOf(wallet, identity, token)
  end
  Pad->>Svc: sign-in challenge signed by the identity
  Svc->>A: authorizationOf: cap above used?
  A-->>Svc: yes
  Svc-->>Pad: session credential
  Pad->>Svc: call with an Intent (amount ≤ room), signed by the identity
  Svc->>Svc: do the work, write the receipt (actual)
  Svc-->>Pad: result + receipt
  Note over Svc,Sub: the batch closes by N calls or time T
  Sub->>A: settle(intent, actual)
  Owner->>Console: revoke the pad
  Console->>Phone: sign authorize(identity, token, used)
  Phone->>A: cap = used: the room is 0
        

n5w3fd

#
1
2
3
4
5
6

q7d3xm

#
1r4j7mq
2k2d7qp
3v5m3hs