Repository navigation
Conversation
The default board template pins each deposit to the owner's renewal contract, so every deposit to one owner shares one address. board_to binds the same DelegatedBoarding artifact's renewalProgram to a variable and locks the boarded output with that program, so a service can hand out one deposit address per payment: each pays a different VTXO it already watches. Both variants are defaults. Given the renewal contract's program, board_to derives the board template's deposit address byte for byte, under arkd's signer and under a standalone emulator. The emulator variant also compiles on v0.0.6, under the same id.
|
No actionable comments were generated in the recent review. WalkthroughThe change adds ChangesBoard-to delegation
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Possibly related PRs
Suggested reviewers: Merge Risk:
|
Summary
This adds
board_to, a default template that boards an onchain deposit into a Taproot program chosen per delegation.The stock
boardtemplate pins every deposit to the owner's renewal contract, so one owner gets one deposit address.board_touses the sameDelegatedBoardingartifact, binds itsrenewalProgramto aprogramvariable, and locks the boarded output with5120<program>. A service can then give out one deposit address per payment, each paying into a VTXO it already watches.The first user is lnurl-server's onchain rail for LUD-21 verify. Each payment gets a deposit address that boards into that payment's covenant destination. The covenant already identifies the payment and forwards it to the receiver.
Template
templates/board_to.json05625281…(delegated_boarding)63fb368da79d2c664a1471946446c973b6b7789fd5ea8c984a2cbdb81969785btemplates/emulator/board_to.jsone3c0fa05…(emulator delegated_boarding)0f1f8e186fc25f449a8f7ecec9add809e247d6151a8448c2b076f0140f2e486aowner,boarding_exit_delay,program(bytes32) andmax_fee.board. The schedule ismin_confirmations: 1, and fees come from the deposit, capped atmax_fee.Why it is safe
board()is unchanged. It requires aregisterintent with no onchain outputs, whose output at the paired index pays the named v1 program and keepsvalue + maxFee >= input. The template only lets the registrant choose that program. Funds sent to the deposit can go only there, or to the owner'sforfeitandexitpaths.Tests
TestBoardToGivenTheRenewalProgramIsTheBoardDepositpasses for both variants. Given the renewal contract's witness program,board_toderives the same deposit script and address asboard, byte for byte.go test ./templates/... ./internal/core/... ./internal/interface/...andcd pkg/template && go test ./...pass.golangci-lintreports 0 issues on the changed packages, andgofmtreports no changes.templates/holds only the emulator defaults. It gets the same id there (0f1f8e18…), so an executor on v0.0.6 can take it through the admin port.Summary by CodeRabbit
board_tooption for directing a deposit to a Taproot program specified by the delegation. This allows deposits to pay different VTXOs.board_totemplate and its behavior.