Skip to content

splicescript: Turn on bitcoin addresses in splice script#8991

Open
ddustin wants to merge 4 commits intoElementsProject:masterfrom
ddustin:ddustin/splice_to_address
Open

splicescript: Turn on bitcoin addresses in splice script#8991
ddustin wants to merge 4 commits intoElementsProject:masterfrom
ddustin:ddustin/splice_to_address

Conversation

@ddustin
Copy link
Copy Markdown
Collaborator

@ddustin ddustin commented Mar 25, 2026

Some work to enable bitcoin address support in splice script, with automatically empowers spliceout to receive an address as a destination. This (IMO super cool) feature allows people to pay onchain bitcoin addresses from their lightning balance.

While we were, we spotted a rare corner case involving a small memleak and fixed it.

We also fixed a few issues with how bitcoin addresses were handled in splice script.

Then we enabled bitcoin addresses in splice script and turned on the tests.

Super excited for this one!

ddustin added 4 commits March 25, 2026 17:14
This new test tests sending to a static amount in a bitcoin address inside splice script.
If we’re aborting a script attempt and that abort fails (for example if the connection is lost midway), we were leaving the callback payload `abort_pkg` attached to the plugin.

This fix releases the `abort_pkg` when the abort fails.
Some bugs were existing in the bitcoin addr handling, `strcmp`’s result was handled backwards.

The “Cannot fund from bitcoin address” check was also inverted, checking `in_sat` when it was meant to be checking `out_sat`. This value meaning sats going “in” to the action or “out” of the action.

Also I moved the bitcoin addr handling into its own function, and had it occur later in the process. In paticular we needed it to happen *after* ppm calculations were complete to support dynamic amounts on the bitcoin address.
And also enable the tests for bitcoin addresses

Changelog-Added: Added the ability to `spliceout` to a bitcoin address directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant