Skip to content
LeDentiPublic

About

Agentic payroll escrow on the XRP Ledger: the AI reads, the code computes, a human signs on a Ledger device, a named oracle releases, Mastercard AP4M pays in dollars. XRPL Commons hackathon NYC 2026.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dareskro — agentic payroll escrow on the XRP Ledger, signed on a Ledger device

Encode Solana Hackathon 2026 (12 Oct – 8 Nov) — the Solana rail lives in solana/: an escrow program with no owner, the sealed payslip, measured on devnet; final demo video, 3 min 56. Only that folder is this hackathon's work.

PayPal AI Hackathon, 1 October – 12 November 2026 — the PayPal rail lives in paypal/: the same desk with PayPal's verbs (authorize = lock, capture = release, void = refund, payout = pay), the seven shapes measured on the three ledgers, and the first language model in dareskro — the AI seat that reads through PayPal's Agent Toolkit and has no tool that moves money. Only that folder (and the desk's PayPal tab) is this hackathon's work; diff: tag pre-paypal → tag paypal-submission. Hosted demo: dareskro-paypal.onrender.com (mock PayPal, no credentials; render.yaml).

Casper 2.x — the Casper rail lives in casper/: the escrow as an Odra 2.10 contract, deployed on casper-test on 7 November 2026, package hash-daff0600705aad5ca85b7a653043eeae2a5de7d743fe90d4abf9a95166933de6 (install transaction), 14 Odra tests on OdraVM and CasperVM, a Node client on the Casper JS SDK v5 (TransactionV1, Odra's proxy caller for the payable create), and the testnet run measured in that README. Nothing on mainnet.

NEAR Hackathon, 1–14 November 2026 — the NEAR integration lives in near/, plus the NEAR tab of the pay desk (app/src/NearDesk.tsx, app/src/near.ts). Only that work is built in the NEAR window; the rest of this repository is the XRPL product of the New York hackathon below, baseline for NEAR judging (disclosed as rule Q-002 asks). Diff: tag pre-hackathon → tag hackathon-submission.

AI & Fintech XRP Ledger Hackathon, New York, 24–25 October 2026. Demo video (3 min 49, English): dareskro explainer v2 — La Linea, with the one-day contract, URSSAF, and the oracle's real loop typed on its card · earlier cut with the terminal logs: split screen · release v0.1-hackathon-nyc. The spoken pitch: PITCH.md (full, with the Q&A) and PITCH_3MIN.md (the 3-minute track version). Track: Agentic Finance. Partner prizes targeted: Ledger (Agentic Finance), Mastercard.

The agent reads the evidence. The code computes the amount. A human signs on a Ledger device. The XRP Ledger pays at the date. Nobody holds the funds in between.

The problem

Every month a small business pays people whose work it cannot fully verify: a pharmacist's Sunday shift, a freelancer, a real-estate agent on commission. The evidence is scattered (schedules, badge logs, CRM), the rules are long (collective agreements), and someone always ends up chasing a payment.

What dareskro does

  1. Evidence. The schedule qualifies the hours (Sunday shift, shutters open, after 35 h already worked). The badge log proves presence. A badge never qualifies an hour: that is the schedule's job, and only the schedule's.
  2. Calculation, by code only. officine.garde applies the French pharmacy collective agreement (IDCC 1996, art. 11; agreement of 23/03/2000, art. 4), line by line, replayable to the cent. No model in the loop: a payroll must be auditable three years later.
  3. Human validation. A named person validates the statement. Nothing is locked while it is a PROPOSITION (GDPR art. 22: no fully automated decision on pay).
  4. Signature on a Ledger device. The employer signs EscrowCreate on the device: amount, destination, pay date and the statement's SHA-256 are on a screen the agent cannot touch. Nothing moves before that signature.
  5. Payment by the ledger. FinishAfter only — no Condition, no CancelAfter. After the date, anyone can finish the escrow; the employer has no transaction to take the money back. One possible outcome.

What was built during the 36 hours

Only this counts for judging, and we say so.

Piece Where Status
Evidence → statement agent (schedule + badge → lines, total, SHA-256); since Sunday morning the statement is a one-day fixed-term contract: end-of-contract bonus and paid-leave allowance (10 % + 10 %), the contributions (rates bought from the rules service), the income tax withheld at source (personalised rate from DGFiP), the net paid, the employer cost agent/bulletin_garde.py done: shift 466.57, gross 564.56, net 440.35, tax 33.03, paid 407.32, 361.31 to URSSAF (USD; --devise EUR for euros)
Pay desk web app: statement, human validation, Ledger connect, EscrowCreate signed on device, proofs, third-party release app/ done, run end to end on Speculos (Nano X, XRP app 2.8.1) and on a real Nano S Plus (XRP app 2.8.2), Saturday 19:40 UTC
Ledger integration: Device Management Kit + device-signer-kit-xrp (pre-release), USB / Bluetooth / Speculos app/src/ledger.ts done
Escrow builder for the device, memo with statement hash, early-finish / cancel / release proofs app/src/xrpl.ts done
Ledger developer-experience feedback LEDGER_FEEDBACK.md done
XRPL developer feedback (trustline at finish, RLUSD not escrowable, XLS-89 warning, crisp refusals) XRPL_FEEDBACK.md done, 02/11
Delivery oracle (example 3): conditional escrow, proof = URL + SHA-256 read online by the oracle, secret revealed on match, refund at the deadline oracle/oracle.mjs, oracle/demo_livraison.mjs done, run on testnet 24/10 18:35 UTC
Four payers on one desk (examples 1, 3, 4): the oracle gains the "presence" shape (influencer: the post must be live at the end of the period) and the "affiliate" shape (the merchant's sales system confirms the order; the release carries the order hash); the pay desk gets a case selector, a contract desk signed on the same device path, and a registry of every escrow oracle/oracle.mjs (KINDS), app/src/ContractDesk.tsx, oracle/demo_influenceur.mjs, oracle/demo_affiliation.mjs done, measured 21:38–21:56 UTC
Privacy: the salary invisible to the public, visible to the administration — a fresh payee account per period, the statement sealed for two readers (employee, administration), a zero-knowledge compliance proof (Noir, UltraHonk in wasm) bound to the escrow by hash and commitment, a privacy service behind the desk's Privacy card
One signature, three transactions: the net paid (escrow), the contributions as a Check URSSAF cashes itself, the income tax to DGFiP (escrow), inside one Batch (XLS-56, all or nothing) signed once on the device app/src/xrpl.ts (prepareCheckCreate, cashCheck, prepareBatch), app/src/App.tsx, oracle/demo_confidentialite.mjs done, measured 25/10
Mastercard Agent Pay for Machines (AP4M): the agent buys its evidence over x402 in RLUSD on XRPL EVM testnet, inside a cap the employer approved ap4m/agent.mjs, ap4m/merchant.mjs done, run live 24/10 17:44 UTC: channel, 402, voucher, redemption, RLUSD settlement, receipt verified on-chain

Measured on testnet, 24/10/2026, signed on the Ledger XRP app (2.8.1, Nano X emulated by Speculos)

Step Signed by Result
EscrowCreate, 466.57 XRP, FinishAfter +90 s, memos = statement SHA-256 + id — 19A03F2C… the device, after 15 review screens tesSUCCESS
EscrowFinish by a third party before the date — 48136EE8… a fresh faucet account tecNO_PERMISSION
EscrowCancel by the employer — 1E08B209… the device (it signs; the ledger refuses) tecNO_PERMISSION
EscrowFinish by a third party after the date — 79C97E6B… a fresh faucet account tesSUCCESS, employee credited 466.57 XRP

What the device showed, screen by screen, is in LEDGER_FEEDBACK.md: the pay date as a readable UTC date, both memos in full, no blind signing.

On real hardware — Ledger Nano S Plus, XRP app 2.8.2, 24/10/2026 19:35–19:43 UTC

Same page, Chrome, WebHID. The employer pressed the device's buttons; nobody else touched the keys. The first attempt, with the XRP app 2.2.2 that shipped on the device, was refused before any review screen (status 6800, see LEDGER_FEEDBACK.md); after updating the app in Ledger Live it signed.

Step Signed by Result
EscrowCreate 405.219732 XRP = 466.57 € at 1.1514 EUR/XRP, FinishAfter +240 s, memos sha256 + eur + oracle — 5FF67E32… the Nano S Plus tesSUCCESS, escrow #21793983
EscrowFinish by a third party before the date — EA6790A1… a fresh faucet account tecNO_PERMISSION
EscrowCancel by the employer — 71E227E5… the Nano S Plus (it signs; the ledger refuses) tecNO_PERMISSION
EscrowFinish by the oracle, 13 s after the date — F61DBCD3… rUuvu1XPgd5GtTgrXQKiwrHq3fb2xiHZMW tesSUCCESS, employee credited

A first device-signed escrow a few minutes earlier (8C2AD66C…, 90 s delay) was finished by a third party after its date (3BAC99BF…, tesSUCCESS) while we were still clicking: the "anyone can finish after the date" rule, demonstrated by accident.

Second run, 24/10/2026 15:54 UTC — the oracle releases by itself

Step Signed by Result
EscrowCreate with a third memo citing the oracle (17 screens on the device, Memo Data [3]: rUuvu1X…) — F4029046… the device tesSUCCESS
EscrowFinish by a third party before the date — 013744BE… a fresh faucet account tecNO_PERMISSION
EscrowFinish by the oracle, 12 s after the date, nobody clicked — 2F94E2BE… rUuvu1XPgd5GtTgrXQKiwrHq3fb2xiHZMW tesSUCCESS, employee credited 466.57 XRP
EscrowCancel by the employer, signed on the device after the oracle had paid — 31771004… the device tecNO_TARGET: already paid, nothing left to cancel

Oracle log of that run:

15:54:36 watching escrow #21789941 of rGJsjkfm…: 466.57 XRP to r3kiDtPb…, payable at ripple time 846172520
15:55:27 escrow #21789941: date passed, submitting EscrowFinish…
15:55:32 escrow #21789941: finished — 466.57 XRP to r3kiDtPb… — https://testnet.xrpl.org/transactions/2F94E2BE…

What existed before (not for judging)

Escrow core on XRPL testnet with xrpl-py, payroll rules (the officine.garde engine the agent imports), PDF dossiers. That prior work lives in a sources/ folder that is not part of this repository: only the weekend's code is published here. Two lessons from that work are reused as-is: the beneficiary must open a trustline before a third party can finish a token escrow (tecNO_LINE otherwise), and RLUSD could not be escrowed when measured on 08/09/2026 because its issuer had not set lsfAllowTrustLineLocking.

A one-day contract, and the contributions paid by the ledger too. A Sunday shift by an outside pharmacist is a fixed-term contract of one day, so the statement carries, on top of the four shift lines (466.57), the end-of-contract bonus (10 %, Code du travail L1243-8: 46.66) and the paid-leave allowance (10 % of the gross including that bonus, L1242-16: 51.32): gross 564.56. Then the contributions, at aggregated indicative rates bought from the rules service with the point value (fixed_term, contributions in the resource; the DSN computes line by line in production): employee 22 % (124.20), employer 42 % (237.12). Net before tax 440.36; 361.32 to URSSAF, due the 15th of the next month; employer cost 801.68. Then the income tax withheld at source at the employee's personalised rate, transmitted by DGFiP through the DSN (7.5 % here, in the schedule file): 33.03 to DGFiP, net paid 407.33.

Three transactions leave the pay desk for one validated shift, and the ledger carries each to the right place:

Leg To whom How When
the net paid, 407.33 the employee (a fresh account per period) an escrow, FinishAfter only, released by the oracle the pay date
the contributions, 361.32 URSSAF a Check (XLS-18) with the statement hash as InvoiceID: the employer signs once, URSSAF cashes it itself (CheckCash) for the amount due before it expires — the ledger's direct-debit mandate whenever URSSAF wants, before the due date + grace
the income tax, 33.03 DGFiP an escrow, released by the oracle the due date

Rounding, fixed at 10:45 NY on Sunday. The four shift lines are printed rounded to the cent (250.51 + 83.50 + 94.99 + 37.58 = 466.58) but the engine rounded their exact sum once (466.5714 → 466.57): the statement did not add up on paper. Since then each line is rounded, then added: shift 466.58, gross 564.56, net 440.36, URSSAF 361.32, DGFiP 33.03, net paid 407.33, employer cost 801.68 (rates labelled "10 %", no more "1E+1 %"). The Noir circuit rounds line by line too (replayed on 20 000 random combinations: identical whenever the week held at most 43 h before the shift), the statement was regenerated (sha256 384ec59c…), proven again (commitment 0x20613f4b…, 4 compatible triples instead of 11) and sealed. Every run measured before that moment carried the previous statement (ede5c5fd…, one cent apart on four lines); the runs after it are marked.

Where the money is, and when it must be there. At EscrowCreate the XRP leave the employer's spendable balance and sit in an Escrow object of the ledger — owner the employer, Destination the employee, Amount, FinishAfter — that no account can spend: not the employer (no cancel date), not the employee (not before the date), not the oracle (it never holds anything, it only submits the finish). The ledger refuses the lock if the account cannot fund it on top of its reserve (tecUNFUNDED_ESCROW, tecINSUFFICIENT_RESERVE), so the pay and the income tax are provisioned at the moment of the lock: when the human validates the statement, before the pay date — and, for the freelancer, the influencer and the affiliate, before the work is judged. The desk checks the balance first and says "too low: N XRP needed for the escrows, the reserve and the fees". The Check is the honest exception: a Check is a right to pull, not a lock. The 361.32 for URSSAF stay in the employer's balance until CheckCash; if they are not there at that moment the cash fails (tecUNFUNDED). We kept the Check to show the ledger's native direct debit; a payroll in production would lock that leg too, and the desk already carries the form (kind: "escrow" on the URSSAF leg gives it the DGFiP treatment, one line).

One signature. The three are inner transactions of one Batch (XLS-56, tfAllOrNothing): the employer approves once on the device, the ledger applies all three or none. Measured on testnet 25/10/2026: a Batch with two inner payments, one signature, tesSUCCESS (5BAB5020…), then the three legs of the pay in one Batch (table below). The desk keeps "one approval per transaction" as a switch, for a device whose XRP app does not know Batch yet. Nobody can forget the contributions or the tax, nobody can divert them: they were locked the day the shift was validated. The zero-knowledge proof binds the gross; the pay escrow's dareskro/gross memo states gross, net, the contribution rate, the tax rate and what is paid, and the verifier checks net = gross − contributions and paid = net − tax. URSSAF and DGFiP are stand-in accounts on testnet; in production the euro leg does the last mile to their bank accounts with the DSN reference, the way the dollar leg works today.

Dollars owed, XRP locked, and the employee chooses how to be paid. The statement is in dollars: that is what the employee is owed (--devise EUR for euros). The escrow is in XRP, converted at the rate of the moment of signing (Kraken XRP/USD, CoinGecko as fallback), and the memo dareskro/fiat carries the amount and the rate, so the device shows both: "466.57 USD @ 2.61 USD/XRP". Then two options, chosen on the pay desk before the lock:

  • crypto: the employee keeps the XRP the ledger releases at the date;
  • dollars: once the ledger has released the escrow — and only then, the payout script re-reads the validated EscrowFinish on XRPL before doing anything — the oracle settles RLUSD, a dollar stablecoin, to the employee's payout wallet through Mastercard Agent Pay for Machines (ap4m/payout.mjs): a one-shot "payslip settlement" merchant priced at the pay, the agent answers the 402 inside the employer's budget, VoucherRedeemed on XRPL EVM, RLUSD settled, receipt. The sandbox budget is 20 RLUSD, so the demo settles at 1/100 of the pay (4.67 RLUSD for $466.57) and says so in the resource and the receipt. The payout reads the budget before it prices anything: when 1/100 of the pay no longer fits in the unassigned allocation nor in an open Channel, it settles one notch smaller (1/1000, then 1/10000), writes the scale it used in the record, and only then gives up with "ask the organizer to fund the team". ap4m/channels-close.mjs closes the near-empty Channels so their unused cap is unassigned again; in production the scale is 1 and none of this exists.

The first runs below, before 18:55 UTC, locked 466.57 XRP as a stand-in; from then on the page converts at the day's rate. Run from a terminal at 18:56 UTC (app/scripts/demo-terminal.mjs, DMK in Node, Speculos Nano X): rate 1.1474, 466.57 € = 406.632386 XRP, the device showed Memo Data [3]: 466.57 EUR @ 1.1474 EUR/XRP Kraken 2026-10-24T18:56Z, escrow 9D59BC76… tesSUCCESS, early finish by a stranger 7C2A9FDB… tecNO_PERMISSION, released by the oracle 12 s after the date 0356E36B….

The oracle — the nerve of the whole thing

The oracle is the named third party that executes what the ledger already decided. It is an XRPL account with a name, a birth certificate on-chain and one job: watch the escrows it is cited in, and submit EscrowFinish once the ledger allows it. It pays the fee of that transaction. That is all it ever pays.

Name dareskro payroll oracle v1
Address (testnet) rUuvu1XPgd5GtTgrXQKiwrHq3fb2xiHZMW
Birth certificate AF5C74C8…: an AccountSet that changes nothing, with a memo saying what the account is
Created 24/10/2026 15:51 UTC, during the hackathon, with node oracle/oracle.mjs create
Cited in every escrow the pay desk builds: memo dareskro/oracle → its address, read on the Ledger device before signing

What it cannot do, by construction, not by promise. It never holds the funds: the money sits in the ledger and goes to the Destination written at creation, whoever submits the finish. It cannot pay early: EscrowFinish before FinishAfter is tecNO_PERMISSION. It cannot redirect: EscrowFinish has no destination field. It cannot cancel: the payroll escrow has no CancelAfter, so nobody can. For a payroll escrow the oracle's whole power is punctuality. If it dies, anyone else — the employee included — can finish the escrow and the money still goes where it was written.

Where an oracle does get power. In a conditional escrow (the freelance case, example 3 below), the oracle holds the preimage of a PREIMAGE-SHA-256 condition and reveals it when delivery is proven. There the oracle decides whether; here it only decides when, and even that is bounded below by the ledger. Same account, same code path, different escrow shape: the shape of the escrow is the policy.

The oracle, case by case

The question that sorts oracles is not "can it disappear?" but "is it a party to the dispute?" An oracle with a stake in the outcome is not an oracle, it is a party. Each of our four cases gives the oracle a different shape, and the shape of the escrow decides how much the oracle can do.

Case Escrow shape Who observes what The oracle decides What bounds it
Pharmacist's Sunday shift (the demo) FinishAfter only Before the lock: the schedule qualifies the hours, the badge proves presence, code computes, a named human validates. After the lock: the payroll oracle rUuvu1X… watches the date when, and only once the ledger allows it cannot pay early (tecNO_PERMISSION), cannot redirect (no such field), cannot cancel (no CancelAfter). Anyone can replace it
Real-estate agent conditional: Condition + CancelAfter two steps: the notary's signature on the deed, then the official publication of the sale (land records, DVF). Nothing is owed at the compromis (loi Hoguet art. 6) whether: the signature releases the secret; the publication confirms it for anyone neither the notary nor the public record is a party. The publication is a proof, not the trigger. CancelAfter refunds the agency if the sale falls through
Freelancer in Lagos, client in Paris conditional: Condition + CancelAfter the oracle holds the secret and reads a public fact by itself: the file at the agreed URL has the agreed SHA-256 (built this weekend, see below). The signer is interchangeable; the oracle is not whether, from a fact anyone can check it cannot steal: the funds go to the destination written at creation. It can only block, and blocking ends at CancelAfter: the oracle itself submits the refund
Influencer product placement conditional + FinishAfter the oracle reads the platform: the post is live at the agreed address, and still live at the date (30 days) whether, from a public page deleted post, no pay; the platform is party to nothing; CancelAfter refunds the brand
Affiliate commissions (five expected) model A: one conditional escrow per expected commission; model B: no escrow oracle at all A: the merchant's sales system confirms the attributed sale and the end of the return window; automatic. B: the customer pays through dareskro and the commission is split at source A: whether, with no human. B: nothing, the payment proves itself A: the merchant is a party, so the money is locked before the sale, every release carries the order hash, and unreleased escrows are cancelled at the end of the campaign. B removes the oracle entirely

Three remarks the jury should hear:

  • The payroll case moves the judgement before the lock. The evidence is read by the agent and judged by a named person while the money is still the employer's. Once signed on the device, nothing is left to judge: only a date. That is why its oracle can be a machine with no power.
  • The conditional cases put the judgement after the lock. The money is already out of the payer's hands, so whoever reveals the secret decides. The remedy is never trust: it is the CancelAfter deadline, after which the ledger refunds the payer and the oracle has nothing left to decide.
  • Same account, same code. The payroll oracle finishes with EscrowFinish alone; the conditional oracle finishes with EscrowFinish + Fulfillment (tickDelivery in oracle/oracle.mjs). The difference is in the escrow, not in the oracle.

Example 3, live: the oracle verifies the delivery online

Built Saturday afternoon on the same oracle account. The client asks the oracle for a condition against an agreed proof — a URL and a SHA-256 — and locks the fee behind it with a CancelAfter. The oracle polls the URL. Nobody clicks.

Step (24/10/2026, 18:39 UTC, testnet) Result
Client locks 40 XRP behind the condition, memos = proof + oracle — 26A28B94… tesSUCCESS
Freelancer publishes the wrong file oracle: "published sha256 19d309b9… ≠ agreed 3be52427…", pays nothing
A third party tries EscrowFinish without the secret — 4C585D08… tecCRYPTOCONDITION_ERROR: the ledger refuses
Freelancer publishes the right file oracle: "match (75 bytes)", reveals the secret, EscrowFinish + Fulfillment 3AA9B66D… tesSUCCESS, freelancer 100 → 140 XRP
Second escrow, nothing ever published — A15F4497… after CancelAfter, the oracle submits EscrowCancel 3CDE5B05…: client refunded, 59.99 XRP

Same account, two shapes: on a payroll escrow the oracle decides when; on a delivery escrow it decides whether, from a fact anyone can re-check with a browser and a hash. In the demo the "publication" is a tiny HTTP server on the laptop; point PROOF_URL at any public address and nothing else changes.

A site, later. Online verification covers code, files, sites and APIs — anything that reduces to a URL and a hash. For deliverables that need a judgement (a logo, a text), two more oracles are possible, and both deserve a site: a client-acceptance portal with an explicit silence rule (past the deadline, either refund or release, written in the escrow and said before signing), and a panel of named arbiters, party to nothing, paid a small share. Neither is built; both plug into the same account and the same EscrowFinish.

How it runs. oracle/oracle.mjs — create (faucet account + birth memo), watch (an HTTP service on 127.0.0.1:8787 that the pay desk registers escrows with, plus a loop that finishes them at the date, retrying while the ledger's close time is not yet past the date), status. Its seed lives in oracle/.oracle.json (0600, never committed); what it watches is in oracle/registry.json, public.

Examples 4 and 5, live: the influencer and the affiliate — four payers on one desk

The same oracle account, the same desk, four shapes of escrow. The pay desk (app/) now opens with a case selector — Employee · Freelancer · Influencer · Affiliate — and the three contract cases share one ContractDesk: ask the oracle for a condition, lock the fee on the device, hand the escrow to the oracle, watch what it sees. A registry card lists every escrow of every kind.

Shape Who decides, and what the oracle can do
presence (influencer, product placement): Condition + FinishAfter + CancelAfter the oracle decides whether the post is still there at the end of the period: it reads the agreed URL, checks the agreed text is in it (#ad @dareskro), and only then reveals the secret. Before the date it only watches, and says so when the page appears or disappears. Deleted post, no pay: refund at the deadline.
affiliate (commission on a merchant's sale): Condition + CancelAfter the oracle decides nothing. The merchant's sales system — a party — confirms the sale with a token given once (POST /affiliate/confirm, the oracle keeps only its hash). The oracle only guarantees that the money was locked before the sale and that the release carries the SHA-256 of the order record in a memo (dareskro/order-sha256), so the payout can be matched to the order forever. No sale, refund at the deadline.

Measured on testnet, 24/10/2026 21:38–21:56 UTC (oracle/demo_influenceur.mjs, oracle/demo_affiliation.mjs, captures in presentation/demo-terminal/capture/):

Step Proof
Influencer, escrow 1: 20 XRP locked behind the condition, FinishAfter = the end of the period F88D1196…
A bystander tries to finish 38 s before the date tecNO_PERMISSION 9779DC7D…
The post is live at the date: the oracle reveals the secret and pays tesSUCCESS D906F9CC…
Influencer, escrow 2: the post is deleted before the date (HTTP 404, logged as a transition) lock 0851C4BE…
Deadline passed with the post gone: the oracle refunds the brand EscrowCancel tesSUCCESS E1BA776B…
Affiliate, escrow 1: 20 XRP locked for order ORD-2026-1045 before any sale CE7BFECE…
The merchant's system confirms with a wrong token HTTP 403 {"error":"bad token"}, escrow still waiting
Right token, order record hashed (8fb00a23…): the oracle finishes with the order hash in a memo, decoded back from the ledger and equal to the record's SHA-256 tesSUCCESS A9A9370A…
Affiliate, escrow 2: no sale before the deadline, the oracle refunds the merchant 87A22223…
Freelance regression on the same code: wrong file, stranger without the secret tecCRYPTOCONDITION_ERROR EEE21FE0…, right file paid, nothing published refunded D4FF12DA…, 7DE73379…

What changed in the oracle to carry four shapes: a KINDS table (what /condition agrees to, which /watch fields are required, how to probe, how to decide, what memo to add), one conditional handler for the three conditional shapes, and a registry that merges the entries a pass touched instead of overwriting the file — /affiliate/confirm and /watch write it while a finish is in flight. The payroll branch is the one measured on the real device, untouched.

Product placement for BottomRadar — the first real use

The lesson of the winning submissions (read 31/10): a reusable brick, a real case, every step measured with its hashes, an app one can click. The real case is the author's own site, BottomRadar (crypto oversold alerts), which wants to pay creators — X accounts, YouTube channels, newsletters — to talk about it. The influencer shape of example 4 becomes a product:

  • placements/ — the campaign model (campaign.mjs), a hardened presence verifier for real platforms (presence.mjs), the campaign service and the creator's page (server.mjs, 127.0.0.1:8789), a one-shot verifier (verify.mjs) and the measurement script (demo_bottomradar.mjs).
  • The oracle reads presence through that verifier and keeps every look as evidence: oracle/observations/<deliveryId>.jsonl, one JSON line per look (time, method, HTTP status, final URL, SHA-256 of the bytes read, verdict), served by GET /observations/<id>. A real campaign is looked at every 5 min (probeEveryS), a rehearsal every 20 s. The XRPL node is XRPL_WSS (xrpl-labs testnet by default: Ripple's answered 503 on 25/10).
  • The desk gets a fifth case, Placement · BottomRadar (app/src/PlacementDesk.tsx): create the campaign, look at the URL now, lock on the device, follow what the oracle sees, and a link to give the creator.
  • The creator's page (/c/<id>, French, no login): what to publish, the required text, the amount, the date it is checked, where the money is (the escrow on the explorer), what the oracle saw, the contract JSON and its hash.
  • BottomRadar's side: a page Parlez de BottomRadar et soyez payé (/partenaires, FR/EN) and a footer link, on a local branch of the private BottomRadar repository, not deployed until its owner says so (the site is in production with subscribers; its button points at PLACEMENT_DESK_URL).

The contract, and what the ledger carries

A campaign is a contract — advertiser, creator (handle and XRPL address), publication URL, its platform, the required text (bottomradar.com), the amount, the end of the period (FinishAfter), the deadline (CancelAfter), the oracle — canonicalised as JSON and hashed. The escrow is the presence shape (Condition + FinishAfter + CancelAfter) with these memos:

Memo Content
dareskro/case placement
dareskro/placement-sha256 SHA-256 of the contract JSON (the creator's page shows the JSON; anyone can recompute it)
dareskro/proof url:<url>;must:<text> — or, until the publication exists, url-sha256:<hash>;must:<text>, so the creator and the slot are not announced on-chain before the post (publicUrl: false). Absent on a real device (three memos, the contract hash binds it)
dareskro/oracle the oracle's address

Names and handles never go on the ledger.

What the verifier can and cannot see (measured 31/10/2026, read-only)

Platform How it is read, without any key Deleted / missing Not verifiable
X (…/status/<id>) three doors in order: the syndication JSON (cdn.syndication.twimg.com/tweet-result), oEmbed (publish.x.com), the post page's <meta og:description>. Links shortened to t.co are matched through their expanded and display URLs, so bottomradar.com is found. The post's identity is its id: the handle in the URL is only reported 404 on all three doors (ids 1, 1600000000000000000); a tombstone is reported as such protected accounts, replies hidden by the author, anything X renders only in the app
YouTube oEmbed (title, channel), then the watch page with the EU consent cookie: shortDescription and playabilityStatus oEmbed 400/404, page says ERROR (id zzzzzzzzzzz); private → LOGIN_REQUIRED pinned comments, publication time, views (Data API key needed): put the link in the description
Any page GET with redirects followed and recorded; scripts and styles dropped, entities decoded, text searched in the visible text and in the raw HTML (meta tags count) HTTP ≠ 2xx; a redirect that leaves the agreed site is not live (bottomradar.com/nope-nope → www.… 404 reported as such) a page that ships an empty shell and draws itself in JavaScript: reported as not verifiable server-side (the desk's own Vite page: 19 chars of text), never as "absent"

node placements/verify.mjs <url> "<text>" prints one observation.

Measured on testnet, 31/10/2026 — a real public URL, a real deletion

The publications are two HTML files in this repository, read through raw.githubusercontent.com like any creator's page (placements/demo/). The second one is deleted by a real commit during the period. The advertiser is a faucet account standing in for BottomRadar; the oracle is the same rUuvu1XPgd5GtTgrXQKiwrHq3fb2xiHZMW as every other case. Period 15 min instead of 30 days, refund 10 min after the date: the escrow shape is the same.

Step (UTC) Proof
08:34 — campaign 7f2042e960 (post stays), 25 XRP, contract 6a461b1c…: EscrowCreate with Condition, FinishAfter 08:49:48, CancelAfter 08:59:48, URL in clear in the memo 2C22F6DC… tesSUCCESS
08:34 — campaign bdc64bb8ad (post deleted), same terms, second publication 0E66240D… tesSUCCESS
08:34:59 — the oracle's first look at both: live with "bottomradar.com" (625 and 498 chars), SHA-256 of the bytes kept oracle/observations/97cc03d14287.jsonl, …/de57a47a1c8a.jsonl
08:35:29 — the second publication is deleted from the repository commit 343a96c
08:40:00 — the oracle sees the deletion (HTTP 404; the CDN caches 300 s) and logs the transition; the escrow stays locked: before the date it only watches observations file
08:49:48 — the date. Post stays: the oracle reads it once more, reveals the secret, EscrowFinish + Fulfillment EscrowFinish tesSUCCESS 46F60DEA… at 08:50:07, creator 100 → 125 XRP, 16 looks kept
Post deleted: at the date HTTP 404, nothing released; after CancelAfter the oracle submits the refund EscrowCancel tesSUCCESS 52F498E1… at 09:00:03, advertiser back to 99.99 XRP, 25 looks kept (live ×5, then 404 ×20)
From the desk (test wallet), campaign e9ca65ff35, URL hashed in the memo, 120 s rehearsal: created on the screen, locked, handed over, released lock 6EEC6A72…, release D8E87FF0…, creator 105 → 130 XRP (screen: placements/measurements/desk-rehearsal.jpg)
Dress rehearsal on github.com/LeDenti/dareskro containing dareskro (campaign cc6b6b874a, 5 XRP) lock 7B9075C7…, release 34C9232B…, creator 100 → 105 XRP

Every campaign, with its contract and escrow, is in placements/campaigns.json; the full traces are in placements/measurements/*.json.

What is still a stand-in. The advertiser signs with a faucet account here; BottomRadar's real campaigns will be signed on the owner's Ledger from the desk, in XRP on mainnet, only on an explicit decision after this measurement. The creator pages are served from the laptop (127.0.0.1:8789): a hosted desk is the next step, and the BottomRadar button goes live only then.

Run it. cd placements && npm install && node server.mjs next to the oracle and the desk; node demo_bottomradar.mjs --url <public URL> --must bottomradar.com --period 900 --grace 600 for a measurement of your own.

L'avance sur facture — the invoice advance, in two versions

The seventh case, and the first that is a lending business: a supplier holds an invoice on a final client due in 30–90 days and wants the money now; a pool advances 90 %; at the due date the client pays the pool, which keeps a fee and hands the balance to the supplier. Everything lives in facture/ (French). Two versions were built and measured on 01/11/2026, because the ledger's own lending objects (XLS-65 Single Asset Vault, XLS-66 Lending Protocol) are enabled on devnet but not on mainnet (21 / 35 and 19 / 35 validators, threshold 28, no date — feature command and xrpscan, same day).

Version 1, usable today (testnet). The pool is an account under a 2-of-3 signer list on the model of the rental deposit: the AI proposer (reads the supplier's and the client's history on the ledger, checks the documents by hash, writes an analysis memo, hashes it and anchors the hash in an AccountSet before anything is signed — a deterministic stand-in writes the memo here, no language model is called), the risk policy (deterministic code: 30 % of the pool's capital per debtor, 100 XRP absolute, advance ≤ 90 %, due ≤ 90 days, an anchored analysis required; it signs only when it says yes; 14 self-checks), and the human operator. The invoice is a one-unit MPT (XLS-33) issued by the supplier with the dossier's SHA-256 in its metadata, handed to the pool when the advance is paid (the receivable assigned) and returned to its issuer when extinguished. The advance and the repayment are ordinary Payments; the repayment can be locked in an escrow in XRP only (no euro token is escrowable, measured 08/09 and 27/10). Caps are held by a signer, not the ledger — and the run proves it: the policy refused the second invoice (54 / 160 = 33.8 % > 30 %), the AI alone got tefBAD_QUORUM, and AI + operator overrode the policy with a tesSUCCESS. Nothing in the ledger knows the cap.

Step (UTC, 01/11/2026, script facture/demo_avance_facture.mjs, node xrpl-labs) Proof
20:57 — pool r6YuFKaUWWUfk9g8ZpK8gnpcQp5rDrC8L: funded, SignerListSet quorum 2 (AI, policy, operator), master disabled; two lenders bring 80 + 80 XRP E42DFD11… tesSUCCESS, 93BB5DF3…
F-001 (client 1, 50 XRP): invoice token issued by the supplier (MPTokenIssuanceCreate, metadata = id + dossier SHA-256 + amount + due date) D8719C22…
The AI's analysis anchored (AccountSet, memo dareskro/analyse-sha256), recommends avancer; the policy says yes 511B7764…
The pool accepts the token (2/3), the supplier assigns it, the advance of 45 XRP is paid, signed AI + policy 1A46D683… tesSUCCESS
The client locks the repayment: EscrowCreate 50 XRP to the pool, FinishAfter = due date; the operator tries to cash it early 1C750D3D…; EscrowFinish tecNO_PERMISSION FFED265B…
F-002 (client 1 again, 10 XRP): analysis anchored; the risk policy refuses (concentration 33.8 % > 30 %); the AI alone submits tefBAD_QUORUM (refused at the door, no ledger)
Counter-proof: AI + operator override the policy tesSUCCESS 3622B6D3… — a signer's refusal, not the ledger's
F-003 (client 2, 40 XRP, advance 36): accepted, nothing locked 3DF1D98A…
21:00 — due dates. F-001: EscrowFinish by the operator → 50 XRP reach the pool; 4 XRP balance to the supplier (policy + operator); token back to the issuer 4A32AD5A…, A76664E6…
F-002: the client pays by an ordinary Payment (nothing forced it) B99BE239…
F-003: nothing received. Default written by the pool (AccountSet 2/3, memo); the ledger lets it do nothing else against the client; recourse: the supplier buys the receivable back DAF3A7F0…, 710F169F…
From the desk (app/, case Invoice advance · pool 2/3, service facture/service.mjs): pool rhc7g7H7c1UzSxdnJxjzcRM5rHWqRG9ERN, P-001 analysed, accepted, advanced 2/3, locked, cashed early → refused, cashed at the date, settled; P-002 refused by the policy, 1 signature → tefBAD_QUORUM, overridden 2/3 advance 1BD70410…, early finish 816828A8… tecNO_PERMISSION, finish 8712573B…, override D0568DB1…; screens in facture/sortie/captures/

Version 2, the ledger's own objects (devnet only). The pool is a closed-ended Vault (with LendingProtocolV1_1 a broker only attaches to a vault that has a subscription, an investment and a redemption phase — measured: an open-ended vault answers tecNO_PERMISSION); the lenders deposit and receive shares; dareskro is the Loan Broker with DebtMaximum = the concentration cap, held by the ledger; an advance is a LoanSet signed by the broker and counter-signed by the borrower (xrpl.js 5.3.0 signLoanSetByCounterparty), with the invoice's hash as Data.

Step (UTC, 01/11/2026, facture/devnet_xls65_66.mjs, devnet rippled 3.4.1) Proof
21:17:11 — VaultCreate — XRP, public, closed-ended (subscription 40 s, investment 420 s), Data = the pool charter's SHA-256; vault E98C01AC…, shares MPT 000000012C7C… tesSUCCESS 56773F9F…
21:17:22 — Lender A and lender B deposit 80 XRP each (VaultDeposit, subscription phase): AssetsTotal 160 tesSUCCESS C6A14BF0…
21:17:31 — LoanBrokerSet: dareskro broker, DebtMaximum 48 XRP (30 % of 160) held by the ledger; LoanBrokerCoverDeposit 10 XRP first-loss cover tesSUCCESS 3565AE94…
21:18:00 — Lender B tries to deposit during the investment phase tecEXPIRED FFEA78AA…
21:18:10 — Loan 1 — LoanSet 45 XRP to the supplier, Data = invoice F-001's hash, one payment, signed broker + counter-signed borrower; supplier 100 → 145 XRP, broker DebtTotal 45 / 48 tesSUCCESS BEFF1D00…
21:18:12 — A stranger tries LoanPay on loan 1 tecNO_PERMISSION 0BF26A3C…
21:18:21 — Loan 2 — LoanSet 9 XRP: 45 + 9 = 54 > DebtMaximum 48 tecLIMIT_EXCEEDED A1C24C3E…
21:18:30 — Loan 1 — LoanPay with tfLoanFullPayment on a one-payment loan (the last payment must be regular) tecKILLED 97CEB758…
21:18:32 — Loan 1 — regular LoanPay of the scheduled 45.000001 XRP: vault whole again, DebtTotal 0 tesSUCCESS E77468AF…
21:18:41 — Loan 3 — LoanSet 36 XRP, nothing will be paid; LoanManage tfLoanDefault before due + grace tesSUCCESS CB36CDEB…
21:18:50 — Default attempt before the date tecTOO_SOON 28405135…
21:21:40 — After due + grace: LoanManage tfLoanDefault — the ledger realises the loss: vault 160.000001 → 124.001801 XRP, broker cover 10 → 9.9982 XRP tesSUCCESS 68D2D637…
21:21:42 — Lender A tries VaultWithdraw during the investment phase tecTOO_SOON A4027106…
21:25:02 — Redemption phase: both lenders withdraw their 80 000 000 shares, each gets 62.0009 XRP back of 80 (the 36 XRP loss pro rata); vault AssetsTotal 0 tesSUCCESS F20CEAEE…

What a signer refused in version 1, the ledger refuses in version 2 (tecLIMIT_EXCEEDED, no second signature can override); what the ledger could not do in version 1 (hold the date without an escrow, write off a loss) it does in version 2 (tecTOO_SOON before due + grace, then the loss realised on the broker's cover and the shares). What version 2 does not have: the final client — the borrower is the supplier, and only the borrower may LoanPay (a stranger: tecNO_PERMISSION).

Not done, said plainly. This is lending: in France advancing an invoice against its assignment is factoring, a credit operation reserved to licensed institutions save narrow exceptions; the licence question is not settled and nothing here is an opinion. The assignment of the receivable is a legal act the token only traces. No KYC. Amounts are XRP standing for euros; the AI is a script; the three seats' keys are test keys held by one machine (on mainnet: one seat, one machine, the operator on a Ledger — multisigning from the XRP app was not tried). Mainnet: never here; version 2 cannot run there before the amendments are enabled.

Privacy — invisible to the public, visible to the administration

The founder's rule for a salary: nobody in the street may read it, every administration (tax, social security) must be able to. An XRPL escrow is transparent by construction — the two accounts and the XRP amount are public — so privacy is a layer on top, in three mechanisms that stack, each hiding a different thing. All three are real code, run and measured tonight; the long version with every measurement is in zk/README.md.

Layer Hides from the public Leaves visible
A. Unlinkable payee — the employee is paid to a fresh account per pay period, derived from the employee's own Ledger (44'/144'/<period>'/0/0, agent/compte_periode.mjs) who is paid: no account carries a person's pay history that an escrow exists between two addresses
B. Selective disclosure — agent/confidentiel.mjs seals the statement with AES-256-GCM (padded to a 1 kB class), the content key wrapped with X25519 + HKDF for the named readers of agent/lecteurs.json only: the employee, the administration and, since 31/10, the pension fund (statement only). On the chain, hashes. agent/divulgation.mjs --role administration decrypts, recomputes the SHA-256, compares it with the escrow's memo and prints the statement; --role public shows what anyone sees and fails to open anything; --role employee the same as the administration, with the employee's key what: the name, the hours, the lines, the total in dollars a 3 072-byte opaque file and an empreinte
C. Zero-knowledge compliance proof — zk/circuit/src/main.nr (Noir, compiled and proven in WebAssembly with @noir-lang/noir_wasm and @aztec/bb.js 5.2.1, no binary installed) proves that the total is exactly the collective agreement's formula for some admissible hours, coefficient and seniority, and that the prover knows them behind a Pedersen commitment that also binds the statement's SHA-256; the commitment rides in the escrow as a memo (dareskro/zk-commitment) why it is right, without the payer disclosing anything: the proof itself reveals nothing but "lawful under IDCC 1996" the total, the Sunday/shutters context, the point value — all public already

Measured, 24/10/2026 (arm64 Mac, Node 26, one wasm thread): compile 0.42 s, witness 33 ms, prove 0.9 s, verify 15 ms; proof 14 656 bytes, verification key 3 680 bytes; node prove.mjs 2.0 s wall clock, node verify.mjs --escrow … 0.3 s plus the testnet read. Tampering with the public total, the statement hash, one hex digit of the proof or of the key: rejected, exit 1. One character of the ciphertext: GCM refuses. The circuit's integer arithmetic was replayed against the payroll engine on 1.1 million cases (two independent reimplementations) and agrees on every statement with at most 43 h already worked in the week; beyond that the engine's overtime rule differs and prove.mjs refuses rather than guess.

The honest measurement, said before the jury asks. With a public amount and a public formula, the proof cannot hide the inputs from arithmetic: verify.mjs counts the (hours, coefficient, seniority) triples that give 466.57 — 11 — and a readable statement id in the memo (garde-2026-10-25-coef600, what the first escrows carried) left 1. So: the proof guarantees compliance and binds the person's commitment; the amount is the leak, not the proof. Two fixes, both done tonight: the statement id written in the memo is now opaque (stmt-<12 hex>), and the proof binds to the escrow by the statement hash and the commitment memo, not by amount alone. The amount itself disappears with XLS-0096 Confidential Transfers (spec Final, 10/09/2026; EC-ElGamal on secp256k1, Pedersen commitments, Bulletproofs; the issuer registers an AuditorEncryptionKey, so every hidden amount is also encrypted to the auditor — "visible to the administration" natively): the amendment ConfidentialTransfer is in rippled but not yet active on mainnet or testnet (22 validators of 29 in mid-October), and its first version excludes escrow. Until then, pooling several periods into one payment is the other way to make a total uninformative.

Measured end to end on testnet, 24/10/2026 22:10 UTC (oracle/demo_confidentialite.mjs, capture in presentation/demo-terminal/capture/confidentialite_v1.log): a pay escrow of 361.127881 XRP (466.57 USD at 1.29198) to a fresh employee account, whose memos leak nothing.

Step Proof
EscrowCreate #21797423: statement SHA-256, opaque id stmt-ffff3dd0e216, fiat at rate, oracle, zk commitment 0x26ab993a… 7ED9282F…
The statement sealed for the employee and the administration, bound to that escrow: 2 987 bytes → 5 837-byte file, ciphertext 3 072 bytes, two wrapped keys agent/sortie/bulletin.chiffre.json
The public reads the file and the chain: two addresses, the amount, five memos, an opaque ciphertext; a random key is refused RESULT: OK, the file and the escrow show the public nothing private
Anyone verifies the proof against the chain: statement memo = the proof's public hash, zk-commitment memo = the proof's commitment, 361.13 XRP × rate = 466.57 proof VERIFIED in 15 ms, RESULT: OK, 11 candidate triples printed
The administration opens it with its key: hash recomputed = memo, statement printed (employee, hours, four lines, 466.57 USD) bound to escrow 7ED9282F…: MATCH
The oracle releases at the date: the employee holds 461.127881 XRP C38552EE…

Re-run on Sunday 25/10/2026 09:45 UTC with the one-day contract and the contributions (presentation/demo-terminal/capture/confidentialite_v2.log; the Saturday run is kept as confidentialite_v1.log): gross 564.55, two escrows locked together, both released by the oracle.

Step Proof
Pay escrow #21810200: the net 440.35 USD = 341.565765 XRP to a fresh employee account; memos: statement SHA-256 (b0c852de…), opaque id, fiat at rate, dareskro/gross = gross 564.55, net 440.35, employee rate 0.22, oracle, zk commitment 0x02d19cac… 19321151…
Contributions escrow #21810201: 361.31 USD = 280.256902 XRP to a stand-in account for URSSAF, due 2026-11-15 (here 30 s after the pay); memos: statement hash, dareskro/urssaf (employee 124.20 + employer 237.11, period 2026-10, due date), fiat at rate, oracle 954CF856…
The public reads both files and the chain: nothing private; the proof verifies and binds by hash, by commitment, and by amount through gross − 22 % = net RESULT: OK twice
The administration opens the statement: hash = memo, fiat memo = net, gross memo = gross and net, six lines, net, URSSAF bound to escrow 19321151…: MATCH
The oracle releases the pay at the date, then the contributions at the due date A0FF2CAF…, 89EAB200…

And the same run from the pay desk, Sunday 09:51 UTC, test wallet, one signature session for two escrows, the employee paid in dollars: pay escrow #21810279 33823638… released by the oracle 1F93F19B… then 4.40 RLUSD settled through Mastercard AP4M (1/100 of the net 440.35: 0x1a5506ad…); contributions escrow #21810280 7780DEBB… released to the URSSAF stand-in 30 s later CFD2DE92…. The statement was sealed for the two readers, bound to the pay escrow, from the desk's Privacy card.

Re-run on Sunday 25/10/2026 10:23 UTC with the income tax and one signature for the three legs (presentation/demo-terminal/capture/confidentialite.log; the one-approval-per-transaction run of 10:15 UTC is kept as confidentialite_v3_pertx.log):

Step Proof
Batch, one signature, three inner transactions, all or nothing (XLS-56, tfAllOrNothing) tesSUCCESS 80BBBB36…
inner 1 — pay escrow #21810889: the net paid 407.32 USD = 315.14 XRP to a fresh employee account; memos: statement hash (ede5c5fd…), opaque id, fiat at rate, dareskro/gross = gross 564.55, net 440.35, employee rate 0.22, tax rate 0.075, paid 407.32, oracle, zk commitment 0x29534add… 1FE4BFC0…
inner 2 — Check #21810890 for URSSAF: up to 361.31 USD = 279.55 XRP, InvoiceID = the statement hash, expires 10 min after the due date E4AAF2B8…
inner 3 — tax escrow #21810891: the income tax withheld, 33.03 USD = 25.56 XRP to DGFiP, FinishAfter = the due date 44CA07EA…
The public reads the file and the chain: nothing private; the proof verifies and binds by hash, by commitment, and by amount through gross − 22 % = net, net − 7.5 % = paid RESULT: OK twice
The administration opens the statement: hash = memo, fiat memo = net paid, gross memo = gross, net, paid; six lines, contributions, tax, URSSAF, DGFiP bound to escrow 1FE4BFC0…: MATCH
URSSAF cashes its check itself at the due date, with its own key (CheckCash) AF896B56…
The oracle releases the pay at the date, then the income tax to DGFiP at the due date D7CADBD4…, 148B533C…

From the pay desk, same morning, test wallet: one click on "Sign once on the Ledger (Batch)", Batch CEF73AAD… tesSUCCESS with the pay escrow, the Check and the tax escrow inside, then the button "URSSAF cashes its check": CheckCash 31C16FFF…. Second desk run at 10:28 UTC, after the inner sequences were renumbered (the first run had watched the Batch's own sequence): Batch 9E38E027… with pay escrow #21810938, Check #21810939 and tax escrow #21810940 inside; CheckCash by URSSAF E9B92D54…; the oracle released the pay at 10:29:24 3D7B3308… and the income tax to DGFiP at 10:29:55 65248360…. The dollar leg of that run met the sandbox budget: at 10:29 the payout found 2.82 RLUSD unassigned for 4.08 needed and stopped ("ask the organizer to fund the team"); the payout was then taught to read the budget first and settle one notch smaller, and POST /payout/retry at 10:37 settled 0.41 RLUSD at 1/1000, written in the record, on the existing Channel 0xe2c30cf9…: VoucherRedeemed 0x24374e5e…, settlement 0x22e123b7…, payout 0xf8da93b8…, receipt claims/0xbe2ede57…/0xadbf78e6… verified with verify-receipt.mjs (verified: true, amount 0.41, payout wallet 0x1f9265e1…; presentation/demo-terminal/capture/recu_pupitre_batch.log). Then channels-close.mjs --keep 0xe2c30cf9 closed the two near-empty Channels (0x125490fb… at 9.34 redeemed, 0x32b199da… at 4.40 redeemed: 0x5434ac29…, 0x9323e003…), giving 1.44 RLUSD back: 20 allocated, 14.30 spent, 1.44 held, 4.26 free for one more payout at 1/100.

Sunday afternoon, 25/10 — the pitch and the partner stands

The Ripple testnet node (s.altnet.rippletest.net) answered 503 from 18:45 UTC; the desk and the oracle were switched to wss://testnet.xrpl-labs.com (commit below) and the oracle restarted.

Pitch run, 18:51 UTC (test wallet, "Paid in dollars"). Batch of three from the desk: pay escrow #21820140, Check #21820141 (cashed by URSSAF), tax escrow #21820142; the oracle released the pay DD3B6ABC… and the tax BCD9C10F… while the pitch was being spoken.

Ledger stand, 19:36 UTC (Nano S Plus, XRP app 2.8.2). The device connected, the Batch was prepared, and the signature came back XrpAppCommandError … Rejected by user (status 6985) — twice, Batch and single EscrowCreate alike. Said as it is: the XRP app did not sign this afternoon, where it had signed EscrowCreate and EscrowCancel on Saturday (5FF67E32…, 71E227E5…). Not reproduced in calm conditions yet; logged for LEDGER_FEEDBACK.md.

Mastercard stand, 19:46 UTC (test wallet, "Paid in dollars"). Pay escrow #21821137, Check #21821138 (cashed), tax escrow #21821139; the oracle released the pay 60DB928B… and the tax 489D35E2…. The dollar leg needed three attempts, each one stopping without signing anything new: the merchant answered 503 payment_pending_or_unavailable on the first, the outcome fetch failed on the second after the voucher was signed, and the third resumed that voucher at its own price and settled 0.41 RLUSD at 1/1000: VoucherRedeemed 0x992d4024…. Budget after: allocation still 20 RLUSD, the announced top-up did not reach the team's allocation during the day.

Live with the Mastercard engineer, 15:38 UTC — the dollar leg at 1/100, and a resume

Run from the terminal in front of the Mastercard engineer, on the pay escrow of the 14:35 run (EscrowFinish 235B2CF8…, 407.33 USD): the payout read the budget (20 allocated, 14.30 spent, 1.44 held, 4.26 free), opened Channel 0xa4b92b60… with a 4.26 RLUSD cap and paid 4.07 RLUSD at 1/100. The voucher was redeemed on chain at once (0xbe6bc867…) but the purchase outcome came back 503: the script stopped without signing anything else. The first retry exposed a flaw: it re-read the budget (now 0 free), scaled to 1/1000 and clashed with the first attempt's merchant store (409). Fixed on the spot (commit de8ef6d): a pending attempt is read before the budget and resumed at the price it was signed for. The second retry resumed — "its voucher is already redeemed on chain: collecting the result, nothing is paid twice" — and collected the resource. The settle call then failed to fetch (the laptop changed Wi-Fi), so the settlement was read back from the chain: claim paid 0x718dd5df…, settlement recorded 0x60a28968…, receipt claims/0x0f424d47…/0xf37082fc… verified with verify-receipt.mjs (verified: true, 4.07 RLUSD to 0x1f9265e1…; presentation/demo-terminal/capture/recu_live_mastercard.log). Budget after: 18.37 of 20 RLUSD spent, 0.19 + 1.44 held in two open Channels, nothing free — the next payout settles at 1/1000 by itself, unless the team allocation is topped up.

Run with the regenerated statement, 14:35 UTC (script, after the rounding fix)

Same script (oracle/demo_confidentialite.mjs, capture presentation/demo-terminal/capture/confidentialite_arrondi.log), statement 384ec59c… (shift 466.58, gross 564.56, net 440.36, net paid 407.33, URSSAF 361.32, DGFiP 33.03), commitment 0x20613f4b…, 4 compatible triples:

Step Result
Batch, one signature, three inner transactions, all or nothing tesSUCCESS 443DBC60…
inner 1 — pay escrow: the net paid 407.33 USD = 315.500441 XRP at 1.29106; memos: statement hash 384ec59c…, opaque id, fiat, dareskro/gross = gross 564.56, net 440.36, employee rate 0.22, tax rate 0.075, paid 407.33, oracle, zk commitment 0x20613f4b… 99DBC2B3…
inner 2 — Check for URSSAF: 361.32 USD, InvoiceID = the statement hash 7AF31E37…
inner 3 — tax escrow: 33.03 USD to DGFiP, FinishAfter = the due date C1C3720B…
Public verification: hash, commitment and amount bound (gross − 22 % = net, net − 7.5 % = paid) RESULT: OK
The administration opens the statement: hash = memo, fiat memo = net paid, gross memo = gross, net, paid MATCH
URSSAF cashes its check itself at the due date (CheckCash) A2B3CAF0…
The oracle releases the pay, then the income tax to DGFiP 235B2CF8…, A96035DF…

One more thing said plainly: this repository publishes the demo statement itself (agent/sortie/bulletin.json, served by the desk as /bulletin.json), because it is the input of every demo and the employer — who is the prover — reads it on the desk. The privacy layer is about what leaves the employer's machine: the chain and the sealed file. In a deployment the statement stays with the employer, the employee and the administration; the repository would carry a fictional one, as this one is.

The desk's Privacy card (card 6 of the employee flow) talks to agent/service_confidentialite.mjs (127.0.0.1:8788): it seals the statement bound to the escrow just created, and shows, in the three readers' own words, what the public sees, what the administration opens, what the employee opens, and the proof verified against the chain.

La paie, transmise à la caisse — the payslip transmitted to the pension fund (31/10/2026)

The question asked on 31/10: a copy of the payslip on the chain, sent to the pension fund, invisible to everyone, visible to the competent administrations — an NFT? The answer built and measured here: the payslip never goes on the chain, in clear or encrypted. What goes on the chain is an act of transmission — the hashes of the statement and of its sealed copy, the address where the sealed copy sits, the period, the employer — followed by the fund's acknowledgement. Both are 1-drop Payments in the fund's account history: anyone can see that an employer transmitted something to the fund on a given day and that the fund acknowledged it; nobody can read what. The sealed copy itself is in a store off the chain, addressed by its own hash, readable by three named keys only. Two reasons the document stays off the ledger, even sealed: a memo holds 1 kB and the sealed statement is 9.5 kB; and a ledger is immutable, so a ciphertext posted today is a ciphertext exposed forever, to every future attack on its cipher — and a ciphertext of personal data is still personal data (below).

What was added to the privacy layer

  • A third reader and a directory. agent/lecteurs.json names who can read: role, name, X25519 public key, key id (first 16 hex of the key's SHA-256), since, revoked, scope. Employee and administration keep their keys; the pension fund (Agirc-Arrco / CNAV) is the third. confidentiel.mjs --chiffre wraps the content key for every active reader; the zero-knowledge opening is sealed under a second key wrapped for the employee and the administration only: the fund's scope is the statement, zk/ouvrir.mjs --role retraite is refused. --revoke retraite retires the current key (kept on disk under its key id) and issues a new one; a sealed file names the key id it was wrapped for, so the reader knows which key to use.
  • A content-addressed deposit. The sealed file goes to agent/depots/<sealed-sha256>.json, served over HTTPS by GitHub; its IPFS CIDv1 (raw leaf, SHA-256) is computed and written in the memos, so any pinning service gives the same address. Nothing is pinned by us: the store is the employer's or the fund's choice, and it may be emptied when the retention period ends.
  • The act of transmission. A Payment of 1 drop from the employer to the fund, InvoiceID = the statement's SHA-256 (a native 256-bit field, indexable), memos dareskro/payslip-sha256, dareskro/sealed-sha256, dareskro/sealed-uri, dareskro/sealed-cid, dareskro/period, dareskro/employer (the employer's SIRET, a legal person's public identifier).
  • The acknowledgement. The fund fetches the URI, checks the bytes against sealed-sha256, opens with its key, recomputes the statement hash, and pays 1 drop back with memos dareskro/ack = the statement hash, dareskro/ack-sealed, dareskro/ack-of = the transmission's hash. The desk's Privacy card (GET /transmission on the privacy service) shows "transmitted on…, acknowledged on…" with both hashes, and a fourth button, Open as the pension fund.
  • The NFT variant, measured for the comparison below: NFTokenMint with the URI, flag tfBurnable only (not transferable), Destination = the fund and Amount 0 (amendment NFTokenMintOffer, active on testnet), accepted by the fund, then burnt by the issuer.

All of it is node agent/demo_transmission_retraite.mjs (seal, then transmit once the deposit is pushed; revocation for the key measurement), captures in presentation/demo-terminal/capture/transmission_*.log, record in agent/sortie/transmission.json.

Measured on testnet, 31/10/2026 09:39 UTC (wss://testnet.xrpl-labs.com)

Statement 384ec59c… (the shipped one, bound to its pay escrow 99DBC2B3…), employer r9qWKQMe…, pension fund rwxybaKR…, both testnet accounts created by the script.

Step Result
Sealed for three readers: 4 845 bytes plain → 9 557-byte file, ciphertext 5 120 bytes, key ids employee 5b8f038c…, administration b7559188…, retraite cb820535…; zk opening (400 bytes) under a second key for employee and administration only agent/depots/1ec596cc…json, sha256 1ec596cc4733277c10c69401cab4df5c10b1b5a5b1d3ffc8e1a1e5706aa49653, CID bafkreia6ywlmyrzte56bbruuahfljx24ccy3ljnr2p74rynb4vygvjewkm
Deposit fetched from its HTTPS URI before transmitting: 9 557 bytes, same hash fetched, sha256 = the record's
Transmission: Payment 1 drop, fee 12 drops, InvoiceID = statement hash, six memos, validated 09:39:32 UTC, ledger 21959605 3EE8D4BD…
The fund fetches the URI: hash = memo dareskro/sealed-sha256; opens with its key (divulgation.mjs --role retraite): hash recomputed = dareskro/payslip-sha256 = the pay escrow's memo, fiat and gross memos match, the statement printed exit 0, bound to escrow 99DBC2B3…: MATCH
The fund asks for the zk opening exit 1, not a reader of the zk opening (its scope is the statement only)
The public reads the same file and the chain: sizes, hashes, three key ids; a random key refused on all three blocks exit 0, RESULT: OK, the file and the escrow show the public nothing private
A stranger with a fresh X25519 key claims to be the fund exit 1, the GCM tag does not authenticate
Acknowledgement: Payment 1 drop from the fund, memos ack = 384ec59c…, ack-sealed = 1ec596cc…, ack-of = 3EE8D4BD…, validated 09:39:52 UTC 618A6ED2…
The fund's history (account_tx), as anyone reads it transmitted 2026-10-31T09:39:32Z 3EE8D4BD… / acknowledged 2026-10-31T09:39:52Z 618A6ED2…, ack = the hash transmitted; no employee, no hours, no lines, no amount
NFT variant — NFTokenMint, tfBurnable, URI 155 bytes, offered to the fund for 0 0E3F84F0…, NFTokenID 00010000…014F1384, sell offer F21DB79A… to the fund only
— the fund accepts (NFTokenAcceptOffer): its account_nfts lists the token with the URI; OwnerCount 0 → 1, 0.2 XRP of reserve locked on the fund's account 8678A995…
— the employer burns it (NFTokenBurn, Owner = the fund) without the fund's signature: the fund's account_nfts no longer lists it F1CB0BFA…

Signed as an institution (01/11/2026 22:08 UTC, demo_transmission_retraite.mjs multisig, transmission_multisig.log). A pension fund does not sign with one key in one person's drawer. The fund's account received a signer list of three (director, accounting officer, head of career records), quorum 2, by SignerListSet 8D38AF0F…, then its master key was disabled (AccountSet asfDisableMaster 25E8A1BF…). The same acknowledgement was then sent three ways: signed by the master key alone, refused, tefMASTER_DISABLED; signed by one of the three, refused, tefBAD_QUORUM; signed by two, accepted, fee 36 drops (12 × (1 + 2 signers)), Signers array of two in the transaction 7FA4F980…, same three memos. account_info shows anyone lsfDisableMaster and the list, quorum 2 of 3: who may sign for the fund is public, nobody can sign alone. From then on the script multisigns every acknowledgement by itself. The employer's side works the same (pharmacist + accountant, 2 of 2): a Payment is a Payment, whoever signs it. The three signer seeds are in agent/cles/ (0600, gitignored) because the script plays the three people; in reality each keeps their own key, on their own device. The two refusals took about 70 s each to be reported: a tef result is not applied, so the client waits for the transaction's last ledger to pass before giving up — the cost of being sure.

Said as it happened: the first run (09:36 UTC, transmission_retraite_v1_escrow1F1F.log) bound the seal to the escrow of 25/10 19:46 (1F1FE2C7…), which cites the same statement hash but whose fiat and gross memos say paid=440.36 — the net before tax, the pay desk's figure before the bug fixed the same morning in paie/. The chain part passed (transmission AF17F5EF…, NFT AD3E431C… accepted and burnt, acknowledgement 9D11F9DF…), and the fund's opening reported MISMATCH on those two memos and exited 1 — the reader doing its job on a wrong escrow. The run was repeated bound to the 14:35 escrow; both deposits stay in agent/depots/, since both were transmitted.

Revocation (demo_transmission_retraite.mjs revocation, scratch keys, transmission_revocation.log): statement A sealed while the fund holds key 1; key 1 revoked and retired, key 2 issued and listed; statement B sealed. B with key 1: exit 1, the GCM tag refuses. B with key 2: opens. A with key 1 (the directory points the fund to its retired key): still opens — what was given before the revocation stays readable, nothing can be un-sent; revocation protects what is sealed afterwards. Without the retired key on disk, the directory says plainly a key issued after the sealing does not open it.

Memo or NFT — which form is the right one

Payment 1 drop + memos (+ InvoiceID) NFTokenMint (XLS-20), URI, tfBurnable, offered to the fund
What the chain carries hashes, URI, period, employer: ≤ 1 kB of memos, in the transaction the URI (≤ 256 bytes) in a ledger object, plus the same memos on the mint
Cost measured 1 drop + 12 drops fee each way: 26 drops for transmission and acknowledgement 12 drops to mint + 12 for the fund to accept + 12 to burn, and 0.2 XRP of reserve locked on the fund's account per NFT page (up to 32 tokens a page) as long as it holds them
Who must act the employer sends; the fund answers when it wants the employer mints an offer; the fund must sign an acceptance before anything sits in its account (the acceptance doubles as an acknowledgement, with no room for a memo of its own on what was opened)
Revocability none: history is history. A correction is a new transmission citing the old one the issuer burns the fund's copy without the fund's signature (measured): convenient for a withdrawn payslip, wrong for evidence — the record the fund relies on can vanish from the ledger state at the sender's will
Where it is readable the account's history (account_tx): kept by full-history servers, pruned by most others; the explorer shows the memos decoded the ledger state (account_nfts): visible from any server while the token exists; the explorer shows an NFT page with the URI; after a burn, only the history
Readability for a human testnet.xrpl.org prints the six memos as text the URI is hex in the object; the explorer decodes it; "an NFT" reads as a collectible, not as a filing

Conclusion: the transmission is a Payment with memos, the InvoiceID carrying the statement hash, answered by a Payment with the ack memo. It costs nothing, needs no reserve, needs nothing from the fund but its answer, and cannot be made to disappear. The NFT form is the right shape for something the fund should hold and that the issuer may legitimately withdraw — a credential, an entitlement — not for the proof of a filing; the XLS-70 Credentials amendment (active on testnet) is the closer native fit for "the fund attests it holds this statement" and is a follow-up, not done here. If a server without full history is a concern, the NFT variant kept unburnt gives state visibility at 0.2 XRP of the fund's reserve; the act itself stays the Payment.

The legal channel, named

In France the payslip's data reaches the pension funds through the DSN, the déclaration sociale nominative, monthly, on net-entreprises, the only legal declaration; Agirc-Arrco and the CNAV take their contributions and the career records from it. Nothing here produces a DSN (a certified payroll software's job, said in paie/README.md). This act anchors the hash of what was declared and proves the transmission and its acknowledgement, dated by the ledger: it is an evidence layer next to the DSN, not a substitute, and the fund's acknowledgement here is a testnet account played by the script, not an institution's signature.

GDPR, said in the README because the ledger is immutable

  • A ciphertext of personal data is personal data (CNIL, EDPB): pseudonymised or encrypted, it remains attributable to a person by whoever holds a key. So the sealed statement never goes on the chain, where nothing can be erased: it goes to a store that can be emptied. The chain keeps a hash, which names nobody as long as the plaintext stays unpublished (a hash of a known document is verifiable, a hash of an unknown one is 32 opaque bytes). The memos add the period and the employer's SIRET: the fund's address receives every employer's transmissions, so a period alone designates no employee.
  • Retention. The store (agent/depots/, or the IPFS pin, or the employer's server) can delete the sealed file when the payroll retention period ends (5 years for the employer's copy of the payslip, longer for the fund's career records); the hash on the ledger then points to nothing, as a receipt number does after the archive is shredded. Right to erasure applies to the store, and is satisfiable there.
  • Keys. The fund's X25519 private key is the fund's: generated by it, kept by it, its public half listed in agent/lecteurs.json with a date, revocable. In this demo the three private keys sit in agent/cles/ on one machine (0600, never committed), because the script plays the three parties; the directory is honest about it (note). Nothing here holds the fund's key for it, and nothing should.
  • Who sees what. Public: two addresses, 1 drop, hashes, a URI, a period, a SIRET. The fund: the statement. The administration and the employee: the statement and the proof's opening. The employer: everything, it wrote it.

Mastercard — the agent pays for its evidence (Agent Pay for Machines)

The salary goes through the XRPL escrow. But before the engine can price the shift, the agent needs the current collective-agreement parameters: point value, seniority tiers, Sunday allowance, overtime thresholds. That is data a provider keeps current and sells per query. On AP4M the agent pays for it by itself, inside a budget a human set:

  1. Channel. The employer funds the team budget from the funding wallet and the agent opens a Channel with a cap (2 RLUSD here). The cap is the employer's decision; the agent cannot exceed it.
  2. 402. The agent calls the rules service (ap4m/merchant.mjs, GET /resource). The service answers 402 Payment Required with a PAYMENT-REQUIRED challenge.
  3. Voucher. The agent signs an EIP-712 Voucher for the cumulative amount (0.05 RLUSD a query) and retries with PAYMENT-SIGNATURE. No human clicks.
  4. Redemption. The service redeems the Voucher on the PaymentLedger contract (XRPL EVM testnet, chain 1449000): VoucherRedeemed is on the explorer. The agent verifies the exact redemption before trusting the resource.
  5. Settlement. AP4M moves RLUSD from the escrow vault to the merchant payout wallet and issues a verifiable receipt.
  6. Load-bearing. The agent writes what it bought to agent/sortie/regles_achetees.json; bulletin_garde.py prices the shift with the purchased point value and records the purchase in the statement (rules_source), which the pay desk shows next to the lines. With --exige-achat the engine refuses to compute without a purchase.

Boundaries: the agent spends only inside the cap; the agent never touches the salary (that is the device-signed escrow); every purchase leaves an on-chain event and a receipt. Team dareskro, agent wallet (MetaMask, registered by the staff) 0xC3027DE9…aC7, merchant payout 0x1f9265e1…f323. Keys live in ap4m/.env (0600, never committed).

cd ap4m
# the Mastercard AP4M hackathon SDK is "for hackathon use only" and is not redistributed here:
# download it from the portal into ap4m/ (and the package into ap4m/vendor/), then install
curl -sO https://hackathon.ap4m.build/sdk/ap4m-hackathon-sdk.js && mv ap4m-hackathon-sdk.js ap4m-hackathon-sdk.cjs
curl -sO https://hackathon.ap4m.build/sdk/ap4m-x402.mjs && curl -sO https://hackathon.ap4m.build/sdk/verify-receipt.mjs
mkdir -p vendor && curl -so vendor/sdk_ap4m-sdk.tgz https://hackathon.ap4m.build/sdk/ap4m-sdk.tgz
npm install                            # ethers 6.17 + @ap4m/sdk from vendor/
node merchant.mjs                      # the rules service, 127.0.0.1:4308
node agent.mjs                         # sign in, Channel, 402, Voucher, settle
../.venv/bin/python ../agent/bulletin_garde.py --exige-achat   # price the shift with what was bought (needs the private engine; the shipped bulletin.json already carries this purchase)

Measured on XRPL EVM testnet, 24/10/2026 17:43–17:45 UTC, nobody clicked

Step Proof
Team dareskro active, 20 RLUSD allocated by the organizer; merchant registered on-chain registerMerchant 0xb3be482d…
Gas for both wallets bridged from the XRP Ledger testnet through Axelar (the EVM faucet was gated) XRPL A1F72873…, A98D843B…: 43 XRP each after 40 s
Channel opened by the agent, cap 2 RLUSD (the employer's budget for this agent) 0xe2c30cf9c897c60e8a6e9d471f4d6a9da1fe9264b482dfc4c6317bbc3813ccb0
GET /resource → 402 → EIP-712 Voucher signed by the agent → redeemed by the merchant, VoucherRedeemed 0xf6b37003…, 0.05 RLUSD
Settlement: RLUSD from the vault to the merchant payout wallet, balance now 0.05 RLUSD settlement 0xe87d84aa…, payout 0xf6fc32f8…
Verifiable receipt (ap4m.claim-receipt.v1), checked on-chain with verify-receipt.mjs claims/0xeca2dabf…/0x234af26d….json
The purchase in the pay statement (rules_source): the point value used is the one that was bought agent/sortie/bulletin.json, shown on the pay desk next to the lines

The dollar leg, triggered by the oracle — 24/10/2026 20:28 UTC

The employee of escrow #21789944 (employer rGJsjkfmASA2ezXYDpTQJZDp9tRgCJAPhw, 466.57 USD = 361.141858 XRP at 1.29193) had chosen dollars. The oracle finished the escrow at the date, then ran ap4m/payout.mjs by itself.

Step Proof
The ledger releases: EscrowFinish by the oracle, tesSUCCESS D749E538…
payout.mjs re-reads that transaction on XRPL (tx, validated, EscrowFinish, tesSUCCESS) before anything else; a one-shot "payslip settlement" merchant is priced at 4.67 RLUSD (1/100 of the pay, sandbox budget) with the finish hash in its content the merchant's content, returned with the purchase: resource in agent/sortie/payout.json
The agent answers the 402 with a signed Voucher inside the employer's channel, the merchant redeems it: VoucherRedeemed, 4.67 RLUSD 0x7e124666…
Settlement and payout: RLUSD to the employee's payout wallet, 4.77 → 9.44 RLUSD settlement 0x2e10a168…, payout 0x83310afd…
Mastercard receipt (ap4m.claim-receipt.v1), with the payout observation claims/0xf4470eea…/0x6764e0ad….json
The oracle's own log and registry (payoutResult), shown on the pay desk 20:28:03 escrow #21789944: 4.67 RLUSD settled via AP4M
The payout receipt checked on chain with Mastercard's verify-receipt.mjs: verified: true, amount 4.67, payout 0x83310afd…, settlement 0x2e10a168…, against ledger 0xcAB42800…, vault 0x83DD9cD0…, RLUSD 0x27b57a9D… presentation/demo-terminal/capture/recu_paie.log

The spend limit, enforced — 25/10/2026 00:28 UTC, two over-cap attempts refused

Mastercard's own demo blueprint asks for an over-cap attempt rejected. ap4m/plafond.mjs stages two, on purpose, and pays nothing (presentation/demo-terminal/capture/plafond.log):

Attempt Refused by Words
Pay the payslip, 4.67 RLUSD, on the channel 0x125490fb… that has 0.66 RLUSD left (cap 10.00, redeemed 9.34) the Merchant (payee facilitator), reading the channel on chain: it issues no 402 challenge for a price the channel cannot cover HTTP 503: payment_pending_or_unavailable — and had a challenge been issued, the kit refuses to sign a Voucher above cap: settled ≤ redeemed ≤ cap, 9.34 + 4.67 = 14.01 > 10.00
Open a new channel with a 52.82 RLUSD cap while the team's limit is 20.00 and 2.82 is unassigned the platform (the Authorized Spend Limit) channel request failed (400): cap exceeds the unassigned deposit (2.82 RLUSD available)

The agent cannot spend beyond what the employer funded, at either layer, and no signature exists that could.

One honest detail, and the rule it produced. The first attempt (20:12 UTC) was redeemed on chain, but the script died before collecting the proof, leaving the kit's purchase.json unresolved; the kit then refuses any other purchase until that one is "resumed with its original arguments". payout.mjs now reads the chain first: if the channel's redeemed amount already covers the pending voucher, it resumes and collects — nothing is signed, nothing is paid twice; if the voucher was never redeemed and its channel can no longer hold it, it is set aside on disk (abandoned-*.json) and a fresh one is signed. Idempotence is the whole safety of a payout agent, and the chain, not a local file, is the source of truth for it.

Run it

# 1. the statement — already computed: agent/sortie/bulletin.json and app/public/bulletin.json
#    ship with the repo. agent/bulletin_garde.py is the agent's code; it imports the payroll
#    engine (officine.garde), prior work that is not in this repository, and says so if run.

# 2. the oracle (Node 22+): create it once, then let it watch
cd oracle && npm install && node oracle.mjs create && node oracle.mjs watch

# 3. the pay desk (Node 22+, Chrome/Edge/Brave for WebHID), in another terminal
cd app && npm install && npm run dev            # http://localhost:5173

# 4. Mastercard AP4M (optional): download the SDK as shown in the AP4M section above, then
cd ap4m && npm install && node merchant.mjs     # and node agent.mjs, node payout.mjs …

# 5. the privacy layer: keys for the three readers, the proof, the service behind the Privacy card
node agent/confidentiel.mjs --init && (cd zk && npm install && node prove.mjs)
node agent/service_confidentialite.mjs            # 127.0.0.1:8788
node oracle/demo_confidentialite.mjs              # the whole layer end to end on testnet, no device

# 6. the payslip transmitted to the pension fund: seal and deposit, push the branch, then transmit and acknowledge
node agent/demo_transmission_retraite.mjs seal && git add agent/depots && git commit -m "deposit" && git push
node agent/demo_transmission_retraite.mjs transmit    # Payment + memos, NFT variant, the fund opens, the public fails, ack
node agent/demo_transmission_retraite.mjs revocation  # a revoked key opens nothing sealed afterwards
node agent/demo_transmission_retraite.mjs multisig    # the fund signs 2 of 3, master key disabled; one signature refused, two accepted

On the page: validate the statement with your name → connect the Ledger (USB) with the XRP app open → get the employer's address → fund it from the faucet (the page asks the faucet until it holds enough: about 100 XRP per call) → create a test employee → Prepare → Sign on the Ledger → Submit → run the three proofs. "Test wallet (no device)" is a rehearsal mode signed by xrpl.js; it is not what the bounty asks for.

No device? Clone Ledger's workshop, git clone https://github.com/LedgerHQ/device-management-kit-ts-workshop ledger-workshop, run ledger-workshop/xrpl-hackathon/speculos/run-speculos.sh stax (needs Docker; colima on a Mac) and choose the Speculos transport. The terminal demo (app/scripts/demo-terminal.mjs) drives the same emulator with nanox.

La paie de garde, en vrai — the Sunday shift, paid for real (31/10/2026)

After New York the employee case was taken one step towards a real replacement pharmacist paid by a real pharmacy, in paie/ (its README has every hash). What changed, measured on testnet:

  • The statement is in euros. The engine always computed in euros (point value 5.277 €); the demo labelled it USD for the dollar leg. paie/en_euros.py writes the same statement with currency = EUR and nothing else (sha256 268a8a78…; bulletin_garde.py --devise EUR gives the same amounts to the cent, only computed_at differs). The desk serves both files (?bulletin=bulletin_eur.json).
  • An official payslip comes out of the same JSON as the escrow memo: paie/bulletin_officiel.py lays the statement out with the French mandatory mentions, prints the statement's SHA-256 on it, re-checks every line (base × rate, gross = sum, net, tax, paid, cost) and refuses otherwise, and is deterministic (two runs, one PDF hash ec75f4ce…). The sheet says in red what it is not yet: the contribution rates are aggregated and indicative until real rates are entered, and no DSN exists — the DSN is a certified payroll software's job. The list of what is missing for it to be opposable is in paie/README.md.
  • The desk has a real mode. With a Ledger device as the signer the default is one approval per transaction (the XRP app refuses a Batch, 6985); a "what leaves, to whom, when" table built from the very transactions to be signed sits between Prepare and Sign, with the button-by-button instructions for the Nano; the balance check now counts the tax escrow; the node is configurable (VITE_XRPL_URL). The test wallet stays for rehearsals.
  • The first rehearsal of that mode caught a bug: since 25/10 the desk locked the net before tax (440.36) in the employee's escrow while displaying the net paid (407.33) — the employee would have received the income tax that the DGFiP escrow pays too. Measured (B315748F…, 395.25 XRP = 440.36 €), fixed, measured again: pay escrow #21958572 AAB51E89… 365.167733 XRP = 407.33 €, Check #21958573 950EFC44… cashed by URSSAF 23259B6B…, tax escrow #21958574 C4C8D970…; the oracle released the pay at 08:49:48 UTC C5919A57… and the tax 30 s later ED906AD3…. The script runs of 25/10 were right (they used the net paid); the desk runs of that day locked the net before tax.
  • The last mile is a bank transfer, written and not sent. paie/ordre_sepa.py produces the ISO 20022 pain.001 order (one SEPA credit transfer, purpose SALA, 407.33 €, remittance carrying the statement id and hash) from the euro statement, deterministic, "executed": false. URSSAF and DGFiP do not cash XRP and are not paid by transfer either: the DSN triggers their direct debit; the Check and the tax escrow stay the ledger's proof that the money was set aside. RLUSD → euros would need an exchange or a payment institution: named, not built.
  • The fingerprint is anchored, never the document. paie/ancrer.mjs writes the statement's and the PDF's SHA-256 in the memos of a fee-only AccountSet: testnet 8427D2E4… (ledger 21958530, verifier: MATCH, MATCH), then mainnet, on the maintainer's decision, 31/10 09:50 UTC: offline key in a 0600 file written by him, account funded by him, --mainnet-je-confirme written in full — 4C8F8BB7… tesSUCCESS, ledger 108020762, read back MATCH, MATCH. The fingerprint of a fictional payslip, on the public ledger, for 12 drops.
  • The run on the Nano S Plus, three approvals, 31/10 09:29 UTC. The first attempt expired (tefMAX_LEDGER: three reviews read screen by screen outlast a 150-ledger window; nothing applied), the window was widened to 600 ledgers, and the second attempt signed the three legs on the device: pay escrow #21793985 D732477B… 364.994310 XRP = 407.33 €, Check #21793986 7722EF6F… cashed by URSSAF 076D6ED3…, tax escrow #21793987 2B51B60A…; the oracle released the pay at 09:38:35 UTC 956F34F6… and the tax at 09:39:10 UTC 8BDE169A…. Captures and the press-by-press account in paie/README.md.
  • The sealed payslip as an NFT in the employee's wallet. paie/sceller.mjs seals the statement and the official PDF for four readers (employee, URSSAF, DGFiP, pension fund; X25519 envelopes, the hackathon's scheme), keeps the file off-chain, and mints a non-transferable, non-burnable NFToken whose URI is the sealed file's hash and whose memos are the statement's, the PDF's and the file's SHA-256; offered to the employee for nothing, accepted with their key. Measured: mint 80885B0C…, accept F74B0BEE…; the public reads hashes and ciphertext, the pension fund opens the byte-identical PDF, a stranger's key is refused. An archive the employee keeps for life, not a declaration: the DSN remains the declaration.

Honest limits, said before the jury asks

  • In France an employee's pay must go through a payslip and a bank transfer (C. trav. L3241-1). For employees dareskro is the proof layer: timekeeping, replayable calculation, named validation, on-chain anchoring. For non-employees (freelancers, agents, affiliates) it is the payment channel itself.
  • The badge proves presence, not the nature of the hour. Anything the schedule does not cover goes to "to decide", for a human.
  • RLUSD escrow waits for its issuer's flag. XRP, or any issuer with the flag, works today.

Disclosure

Prior work and third-party software, per the rules: XRPL escrow core and payroll rules written before the event (see above, not in this repository); Ledger Device Management Kit, XRP signer kit, and Ledger's workshop app https://github.com/LedgerHQ/device-management-kit-ts-workshop (Apache-2.0: the files copied or derived are listed in THIRD_PARTY_NOTICES.md, license copy in LICENSE-APACHE); Mastercard's AP4M hackathon SDK (not redistributed); xrpl.js; React/Vite. This repository is under the MIT license (LICENSE). Built with AI assistance (Claude), used as a tool by the team.

About

Agentic payroll escrow on the XRP Ledger: the AI reads, the code computes, a human signs on a Ledger device, a named oracle releases, Mastercard AP4M pays in dollars. XRPL Commons hackathon NYC 2026.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages