Raph and I have been working hard on
ord, the
ordinal block explorer and wallet, and
have just finished the initial version of the ord wallet send ORDINAL ADDRESS
command, which makes a transaction sending ORDINAL
to ADDRESS
.
Ordinal-aware Bitcoin transactions are rather tricky, and must attend to a number of considerations:
- Rare ordinals shouldn't accidentally be lost to the recipient or the fee.
- The ordinal being sent should be aligned to the beginning of the output going to the recipient.
- Additional postage should be added so that the ordinal can be sent onward without needing to merge in additional UTXOs.
- Excess sats should be stripped from the recipient's output.
- Inputs and outputs must be aligned so that the ordinal being sent actual makes it to the recipient.
This requires a great deal of stressful fiddling with transaction input and output size and order, and a great deal of checks for edge cases. You can see all the gory details in the transaction builder.
All that fiddling has paid off, and today we made three transactions on signet:
-
This transaction is simple send of
mvzwjdjcofe
. The first output is change, added to ensure thatmvzwjdjcofe
is the first ordinal in the output sent to the recipient:ord wallet send mvzwjdjcofe tb1qaykcryeds0kmz3azv5tn46dyt3wu5l5qc3djz0
-
This transaction sends ordinal
nphhwymyrjx
totb1qew25cz5603xqzkw66m5yq9ruflkkpgjyprcdc5
:ord wallet send nphhwymyrjx tb1qew25cz5603xqzkw66m5yq9ruflkkpgjyprcdc5
nphhwymyrjx
is first in the input, so no alignment output is needed to make it first in the recipient's output.However, the input is quite large, so an additional output is added that brings the size of the recipient's output down to 10,000 sats. We could reduce the size of recipient's output to the dust limit, however in that case, UTXOs would need to be merged in to pay for fees when sending the ordinal onwards.
-
This transaction sends ordinal
139761296637063
totb1q02yk08hkp9pkyhwdsdfd0ra437tjcdnrjs0sxv
:ord wallet send 139761296637063 tb1q02yk08hkp9pkyhwdsdfd0ra437tjcdnrjs0sxv
There's a lot going on here! Let's break down the inputs and outputs:
Inputs:
- Contains
139761296637063
at offset 7,500. - Needed to pay for all outputs
Outputs:
- Change containing 7,500 sats to make
139761296637063
the first ordinal of the recipient's output. - The recipient's output containing
139761296637063
at offset 0. Worth 10,000, so that the recipient can forward139761296637063
without needing to merge in additional UTXOs. - Change containing 16,006 sats, to reduce the recipient's output to 10,000 sats.
- Contains
ord wallet send
will hopefully be much easier to use compared to using
bitcoin-cli
to manually construct ordinal-aware
transactions. Give it a shot and let
us know what you think!