You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was curious about why this library uses two dummy inputs as well. I think it's because if you only use one dummy input, the ordinal winds up being unaligned. Let's say we use one dummy and have a final transaction with inputs valued A, A, and B, and outputs valued 2 A and B, with the ordinal being sold on the first sat of the second A input:
A 2A
A -> B
B
The transaction value balances, however the ordinal will wind up in the middle of the first output.
If, on the other hand, we add an additional dummy:
A 2A
A A
A -> B
B
Then the ordinals winds up on the first sat of the second output.
And two dummy outputs are used because that's the number of dummy inputs required.
Firstly, thanks for putting this together!
I'm just a little confused about what the 2 new dummy outputs created are for. I see the code says:
https://github.com/magiceden-oss/msigner/blob/3de81d4aaac4d030b2fb2967d704a59070981777/src/signer.ts#L465
Is it to avoid having to create a new tx with 2 dummy inputs in a future purchase? Also, do they have any specific values?
The text was updated successfully, but these errors were encountered: