| 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
flowchart LR owner(["所有者
一个人"]) subgraph pad["平板(新设备)"] padapp["平板应用
一个浏览器页面
持有身份的密钥"] end subgraph console["Console(浏览器)"] devices["设备扩展
在扩展标签页里,权限 wallet: authorize
待批请求、上限、撤销"] end phone["手机钱包
imToken、MetaMask、AlphaWallet
签交易"] subgraph chain["Base Sepolia"] a["合约 A
ServiceAuthorization"] dir["ServiceDirectory"] end subgraph wp["Woodpecker 服务(Cloudflare Workers)"] svc["一个服务
网关 + 后端"] runner["运行器"] sub["submitter 密钥
在服务内部"] end owner -- "扫平板的二维码" --> devices padapp -. "二维码:身份、代币、上限" .-> devices devices -- "WalletConnect:签 authorize(identity, token, cap)" --> phone phone -- "交易" --> a padapp -- "轮询 authorizationOf" --> a padapp -- "登录挑战,然后带 Intent 的调用
由身份签名" --> svc padapp -- "对话" --> runner svc -- "身份是否被授权?额度?" --> a sub -- "settle(intent, actual)" --> a svc -- "价格文档的哈希" --> 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
sequenceDiagram
autonumber
actor Owner as 所有者
participant Pad as 平板应用(身份密钥)
participant Console as Console(设备扩展)
participant Phone as 手机钱包
participant A as 合约 A
participant Svc as 服务(网关 + 后端)
participant Sub as submitter(服务内部)
Pad->>Pad: 生成身份密钥
Pad-->>Owner: 显示二维码:链、身份、代币和上限
Owner->>Console: 扫码,确认上限
loop 每个代币一笔交易
Console->>Phone: wallet.request → 签名面板 → WalletConnect:签 authorize(identity, token, cap)
Phone-->>Owner: 弹出确认
Owner->>Phone: 同意
Phone->>A: authorize(identity, token, cap)
end
loop 直到上限大于 0
Pad->>A: authorizationOf(wallet, identity, token)
end
Pad->>Svc: 登录挑战,由身份签名
Svc->>A: authorizationOf:上限是否高于已用?
A-->>Svc: 是
Svc-->>Pad: 会话凭证
Pad->>Svc: 带 Intent 的调用(金额不超过额度),由身份签名
Svc->>Svc: 干活,写收据(实际用量)
Svc-->>Pad: 结果和收据
Note over Svc,Sub: 批次按 N 次调用或时间 T 关闭
Sub->>A: settle(intent, actual)
Owner->>Console: 撤销平板
Console->>Phone: 签 authorize(identity, token, used)
Phone->>A: 上限等于已用:额度为 0
n5w3fd
| # | ||
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 |
q7d3xm
| # | |||
|---|---|---|---|
| 1 | r4j7mq | ||
| 2 | k2d7qp | ||
| 3 | v5m3hs |