Open reference implementation · Apache-2.0
A layer for moving data across intermittent, multi-hop links you do not control, and proving, later and offline, that it arrived intact, in order, through a known chain of custody, and was paid for. Built on delay-tolerant networking, settled on BSV.
Start here
Clone the repo and run the proofs against µD3TN, HDTN, ION or Hardy. One command each.
Go to Quickstart →Send plain UDP in one side and get it out the other, carried as BPv7 bundles with signed receipts.
See the IP gateway →Hand a signed Bitcoin BSV payment to another phone by QR code, sound or text message.
Open Pay offline →Also: plan contact windows from real orbits in the Contact Plan Studio, or explore a 72-hour Solar System Internet run with five operators.
See it run
Nothing staged: the acceptance suite, the full pipeline, a real Linux netem blackout, real Bundle Protocol v7 custody across a contact gap, and delivery bound to a real on-chain settlement. It closes by reading the anchor transaction live from the chain.
At scale, on mainnet
A narrated walkthrough, under six minutes. Real Starlink orbits, one paid receipt per satellite per contact: 30,502 transactions, 0 rejected, all mined in blocks 971,658 to 971,665, and 100 of 100 sampled bundles proven custodied and paid from the chain alone. Every txid is in RUNS.md.
The problem
Between a sensor and a server, data often crosses relays, store-and-forward hops, and links that go dark. You still need to trust what comes out the other end.
Content-addressed, signed data is checked locally, later, with nobody on the other end. No callback to the source.
Each hop leaves a signed, content-addressed receipt, forming a verifiable chain across parties you do not operate.
Delivery is bound to a real on-chain BSV settlement, and the data's root is anchored on chain for tamper-evident provenance.
How it works
Bundle Protocol v7 carries the bundles. DTN standardizes how bundles move, but not who paid or how you prove custody later, and that is the gap this layer fills. Nodes that choose to be custodians sign a receipt into a BPv7 extension block, using an optional agent beside the bundle protocol agent. Plain BPv7 nodes forward the block unchanged and never sign or read the payload.
The same content-addressing route as @bsvkey/x402-bsv-client. It works over any link and any settlement rail; the reference uses BSV.
By design it does not touch RF, optical, coding, or FEC. It is the trust and settlement layer over whatever carries the bits.
Proven on real infrastructure
The reference implementation runs end to end against real systems, one command each.
| Layer | What runs |
|---|---|
| make spike | Real Linux tc netem links with a real 100%-loss link blackout; the payload survives and reassembles. |
| make r2 | Real Bundle Protocol v7 (µD3TN), bundles held in µD3TN storage across a scheduled contact gap, genuine DTN bundle custody. |
| make live | Delivery bound to a real on-chain BSV settlement, and the manifest root anchored on chain in an OP_RETURN. |
| make bpv7-block-all | Receipts carried inside the bundle as a BPv7 extension block, byte-identical through four independent implementations (µD3TN, NASA HDTN, JPL ION, Aalyria Hardy) and along one path through two of them, each holding the bundle across a scheduled gap. |
| make bpv7-bpsec-all | A standard BPSec payload signature (RFC 9172/9173) still verifies after every receipt is appended, through all four implementations. |
| make bpv7-keyring-all | Offline key management: signed key and revocation records travel inside the bundle, and a destination holding only the operator's root key learns every other key, and a revocation, from the bundle itself, then verifies the chain. Through all four implementations and the mixed path (spec). |
| make flight | The same key rules onboard, in C with no heap: about 3 KB of code on an ARM Cortex-M4, the same answers as the reference on 30 test queries (results). |
| make ion-voyager | JPL ION over LTP at Voyager's data rates, 160 bps down and 16 bps up, with a 240-second light time (the emulator's limit), every chunk and custody handoff verified (results). |
| make ssi | An accountable Solar System Internet, simulated over 72 hours: five operators, contacts computed from the positions of Earth stations, the Moon, Mars and relay orbiters, receipts at every signing hop, a relay key stolen and revoked mid-run, forged billing refused, and settlement between operators from receipts alone (explore the run). The same network also runs on ten real Hardy BPAs that sign receipts and pass revocations along inside the BPA (explore that run). |
| voyager model | Simulated, at the real light-day: Voyager 1 and 2 both ways over a signed antenna schedule, with bit errors and resends. Voyager 2 can only be commanded from one dish, which shows: 112 hours from command to signed receipt, against 88 for Voyager 1 (results). |
| teratestnet | On BSV's public Teranode test network: 30,502 paid receipts from a 4,032-satellite constellation, all mined, and 100 of 100 sampled bundles proven custodied and paid at every hop from the chain alone (results). |
| gateway | IP to DTN: plain UDP in, BPv7 bundles through NASA HDTN (TCPCLv4, also over TLS 1.3) and JPL ION (TCPCLv3), plain UDP out. Each DTN node was killed mid-stream and restarted; all 20 frames arrived once and in order, held on disk meanwhile, with 20 of 20 signed receipts valid (about the gateway, results). |
| mainnet | On Bitcoin BSV mainnet: the same 30,502 receipts, each paying the relaying satellite 100 sats, all mined with every merkle proof matching a block header whose proof of work was checked, and 100 of 100 bundles proven (results, every run). |
The boundary
Authentic evidence can still be insufficient for the claim asked of it. The boundary is stated per field.
| Evidence | Proves | Does not prove |
|---|---|---|
| content address | the record is intact and addressed by its content | that the numbers describe a real event |
| signature recovery | the signer authored these exact bytes | that the payload is correct |
| Merkle branch | this chunk belongs at this position under the root | that the whole payload is complete on its own |
| custody chain | the record passed this ordered set of hops | what happened between the observed hops |
| hop count | how many plain forwarders handled it between two signed hops | who those forwarders were |
| key record | the operator's root key authorized this key for this node, for this time | that the key was not stolen before anyone revoked it |
| settlement on chain | money moved from that payer to that payee | that it was your payment, until you bind it |
Where it is useful
Delay-tolerant networking was designed for exactly these regimes, including deep space, where the same constraints appear in the extreme.
Quickstart
Node 18+. The core is dependency-free; Docker is only needed for the real BPv7 and netem runs.
# clone
git clone https://github.com/BSVKey/dtn-custody-demo
cd dtn-custody-demo
npm test # acceptance criteria, offline, deterministic
npm run demo # the full pipeline over the in-process simulator
make spike # real veths + tc netem + a real link blackout (Docker)
make r2 # custody chain over real µD3TN BPv7 (Docker)
make live # delivery bound to a real on-chain BSV settlement
make bpv7-block-all # receipts inside the bundle, through four BPv7 stacks (Docker)
FAQ
What this is, what it proves, and where the honest edges are.
settlementRef against the transaction you actually paid. An unbound check refuses rather than passing.npm test and npm run demo need only Node; make spike, make r2, and make live exercise the real netem, real BPv7, and real on-chain paths.Open core
The protocol, agent library, DTN adapters, verifiers, and on-chain checks are open under Apache-2.0. A hosted BSV settlement facilitator and relay marketplace, managed key custody, and the BSVKey brand are operated separately. The open core settles on BSV; running a production relay-payment service on top of it is the hosted offering.