1. Implement the contract
Start fromexamples/minimal-adapter/MemoAdapter.ts — the complete IProtocolAdapter contract against an in-memory wallet, in about 170 dependency-free lines. It is the smallest thing that satisfies the contract and is meant to be copied.
& IRgbOperations) gives you required rather than optional methods, so the compiler catches a half-implemented group.
2. Describe it in the manifest
Add one entry toPROTOCOL_CAPABILITIES in src/capabilities/index.ts, and one to PROTOCOL_OPERATIONS in operations.ts.
When you find yourself wanting a new method on
IProtocolAdapter for your protocol alone, you want a capability flag here instead.3. Teach the classifier your address format
If your protocol introduces a destination format the engine can’t recognise, add it tosrc/router/destination.ts with the protocols capable of paying it:
candidates is the possible set. Whether a candidate is a direct route is then verified against the manifest, so a protocol never claims it can settle something its flags say it can’t.
4. Register it
createWdkRegistry if it is WDK-backed.
What you get for free
Once those three files are in place, with no further changes:CrossProtocolRouterconsiders your protocol for every compatible destination, and ranks it against the others by the user’s route preference.buildUnifiedReceiveURIcan carry your rail in the same QR as the rest.aggregateForLitefolds your BTC balance into the single lite “BTC” figure.- Every screen in a consuming wallet renders your protocol using the manifest flags.
Verify it
Pure modules — router, disclosure, receive, capabilities — must stay fully covered by tests. See CONTRIBUTING.md and AGENTS.md, the latter being the invariant list for coding agents working in the repo.