Open reference implementation · Apache-2.0

Verifiable data custody and relay settlement on BSV

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

Pick the path that fits you

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

A real run, start to finish, in about a minute

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.

  1. npm test 228 passing, offline, deterministic
  2. npm run demo the whole pipeline over the simulator
  3. make spike real tc netem links, a 3s 100%-loss blackout, all 19 chunks survive
  4. make r2 real BPv7 (µD3TN), bundles held in storage across a contact gap
  5. make live delivery bound to a real BSV settlement, root anchored on chain
  6. make bpv7-block-all receipts inside the bundle, carried intact by µD3TN, NASA HDTN, JPL ION and Aalyria Hardy

At scale, on mainnet

4,032 satellites, 30,502 receipts, all on Bitcoin BSV 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

Trust what comes out of a link no one is watching

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.

Verify without a round-trip

Content-addressed, signed data is checked locally, later, with nobody on the other end. No callback to the source.

Custody across relays

Each hop leaves a signed, content-addressed receipt, forming a verifiable chain across parties you do not operate.

Paid and provenanced

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

Standard BPv7 for transport, custody and payment on top

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.

chunk + Merkle BPv7 custody hops gap across blackout out-of-order verify settle + anchor sourcedestination
  1. Source chunks the data and builds a Merkle root
  2. BPv7 custody hops each sign a receipt into the bundle
  3. Gap across a blackout: bundles wait in storage, the gap is recorded
  4. Out-of-order verify: each chunk checks against the root
  5. Destination settles and anchors the root on chain

Rail- and medium-agnostic

The same content-addressing route as @bsvkey/x402-bsv-client. It works over any link and any settlement rail; the reference uses BSV.

Not the physical layer

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

Not a diagram, it runs

The reference implementation runs end to end against real systems, one command each.

LayerWhat runs
make spikeReal Linux tc netem links with a real 100%-loss link blackout; the payload survives and reassembles.
make r2Real Bundle Protocol v7 (µD3TN), bundles held in µD3TN storage across a scheduled contact gap, genuine DTN bundle custody.
make liveDelivery bound to a real on-chain BSV settlement, and the manifest root anchored on chain in an OP_RETURN.
make bpv7-block-allReceipts 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-allA standard BPSec payload signature (RFC 9172/9173) still verifies after every receipt is appended, through all four implementations.
make bpv7-keyring-allOffline 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 flightThe 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-voyagerJPL 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 ssiAn 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 modelSimulated, 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).
teratestnetOn 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).
gatewayIP 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).
mainnetOn 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).

On-chain settlement

5,942 sats to the seller, confirmed.

77030c61…ec83c6

Provenance anchor

Manifest root committed in an OP_RETURN, confirmed.

733dcc21…b51207

The boundary

What it proves, and what it does not

Authentic evidence can still be insufficient for the claim asked of it. The boundary is stated per field.

EvidenceProvesDoes not prove
content addressthe record is intact and addressed by its contentthat the numbers describe a real event
signature recoverythe signer authored these exact bytesthat the payload is correct
Merkle branchthis chunk belongs at this position under the rootthat the whole payload is complete on its own
custody chainthe record passed this ordered set of hopswhat happened between the observed hops
hop counthow many plain forwarders handled it between two signed hopswho those forwarders were
key recordthe operator's root key authorized this key for this node, for this timethat the key was not stolen before anyone revoked it
settlement on chainmoney moved from that payer to that payeethat it was your payment, until you bind it

Where it is useful

Any intermittent, multi-hop, untrusted-relay link

Delay-tolerant networking was designed for exactly these regimes, including deep space, where the same constraints appear in the extreme.

Subsea sensors and an AUV relaying to a surface buoy and satellite

Ocean

  • Subsea sensors and AUVs over acoustic links
  • Offshore energy telemetry provenance
  • Maritime cargo and cold-chain custody
A drone relaying through a satellite and ground station across contact windows

Sky

  • BVLOS and swarm drone relay + delivery proof
  • Stratospheric / HAPS relay networks
  • Aviation data provenance across custodians
A store-and-forward mesh of relay nodes across remote terrain

Earth

  • Disaster and remote store-and-forward mesh
  • Evidence and audit chain-of-custody
  • Environmental MRV and content provenance

Quickstart

Clone it and run the proofs

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

Questions, answered plainly

What this is, what it proves, and where the honest edges are.

What is this, in one sentence?
A layer that lets you move data across intermittent, multi-hop links you do not control, and prove later, offline, that it arrived intact, in the right order, through a known chain of custody, and was paid for. It rides delay-tolerant networking and settles on BSV.
Do I really need a blockchain just to move data?
No, and it does not move the data for you. The transport is standard Bundle Protocol v7. What BSV adds is the settlement and provenance: delivery is bound to a real payment, and the data's root is anchored on chain so anyone can later verify what was delivered and paid, without trusting the relays or a central server.
What does this add that DTN itself doesn't?
The Bundle Protocol standardizes how data moves through intermittent networks, but it defines no native payment, incentive, or economic model, and its security extension, BPSec, protects the integrity and confidentiality of the bundle's contents rather than recording who held it along the way. It does not answer who paid for a delivery, or how you prove offline, a session later, the custody chain the data passed through. That settlement and verifiable-custody layer is exactly what this adds, on top of the standard, not instead of it.
How does a node a light-day away know which keys to trust?
It holds only its operators' root keys. Every other key arrives inside ordinary bundles as a record signed by the operator, with a role and a validity window, and revocations ride along the same way, so news of a lost key travels as fast as the traffic. A stolen key cannot fake the past either: each receipt commits to the ones before it, so a backdated signature is refused unless an honest node saw it in time. No online authority is involved (how it works).
Does it replace the radio, satellite, or sonar?
No. The physical link (RF, optical, acoustic, coding, FEC) is explicitly out of scope. This is the trust, custody, and settlement layer that sits on top of whatever carries the bits. That boundary is the point, it makes the layer rail- and medium-agnostic.
What does a verifier actually check?
Four things, and it refuses if any fail: the content address recomputes, the signature recovers to the expected key, each delivered chunk verifies against the Merkle root, and delivery is bound to the settlement you paid. That last part matters: a receipt is a bearer object until you check its settlementRef against the transaction you actually paid. An unbound check refuses rather than passing.
How is this different from BPv7 custody transfer?
BPv7 (RFC 9171) has no custody transfer of its own; reliable hop-by-hop transfer is handled separately (bundle-in-bundle encapsulation, BIBE). Custody transfer answers "who must retransmit now". These receipts answer a different question: "who can prove they held this bundle, and when". Each custodian signs a receipt that travels with the bundle and can be checked by anyone, later, offline. They are not BPv7 administrative records and they complement custody transfer rather than replace it.
Is it only for space?
No. Delay-tolerant networking was built for intermittent, disrupted links generally. The same constraints appear in the ocean (subsea and AUVs), the sky (drones and stratospheric relay), and on Earth (disaster mesh, evidence chain-of-custody, environmental measurement). Deep space is just the extreme case.
What does the on-chain anchor prove?
That a specific data root existed and was committed at a point in time, tamper-evidently, independent of every relay the data crossed. Re-derive the Merkle root from the delivered payload and it matches the value in the transaction's OP_RETURN. It does not prove the data is correct, only that it is the data that was anchored.
How much does settlement cost?
A few satoshis to a few tens of satoshis in miner fees. In our mainnet run at 100 sat/kB, a paid receipt in its own transaction cost about 29 satoshis in fees (897,665 for all 30,502); batching 100 payments into one transaction brings that to roughly 7 satoshis each by size. That low floor is what makes per-hop settlement practical, which is not feasible when a single transfer costs more than the data is worth.
Which DTN stack does it use?
Any BPv7 stack. The receipts travel in an extension block that stacks which do not know it forward unchanged, tested through µD3TN, NASA HDTN, JPL ION and Aalyria Hardy, and along one path through µD3TN and then HDTN. The custody agent runs beside whichever stack you use.
Is this a standard?
It is written up as an individual IETF Internet-Draft, draft-bsvkey-dtn-custody-receipt-block, with this repository as the reference implementation. An individual draft is a public proposal, not an IETF standard and not adopted by a working group.
Is DTN a real standard, or just research?
Both, and it is deployed. The term was coined by Kevin Fall in 2002, growing out of Vint Cerf's Interplanetary Internet work with ARPA/DARPA lineage. Bundle Protocol v7 is an IETF standard: RFC 9171, with BPSec security (RFC 9172), default security contexts (RFC 9173), and the TCP convergence layer (RFC 9174), updated by RFC 9713 (2025); BPv6 was RFC 5050 and the architecture RFC 4838. It runs operationally on the International Space Station (the DTNME engine), first flew in space on UK-DMC in 2008, was demonstrated deep-space by NASA JPL's DINET (Deep Impact / EPOXI), and is used by NASA's PACE mission. This layer sits on top of that standard.
Is it production-ready?
It is a reference implementation, proven end to end on real infrastructure, not an audited production system. Review it and run your own assessment before relying on it. You hold your own keys and funds; nothing here custodies keys or broadcasts on your behalf.
How do I try it?
Clone the repo and run the proofs (see Quickstart). 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

Open protocol, hosted rail

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.