Add utility `postConditionToHex`
aryzing opened this issue · 1 comments
aryzing commented
Problem
In the wake of the increasingly adopted WebBTC standard, and from how the [Integration of WebBTC Request Standard for Stacks Wallets SIP](Integration of WebBTC Request Standard for Stacks Wallets) is evolving, it would be helpful to have hex conversion helpers for all values recommended by the SIP to be used as hex,
- [done] Clarity values (covered by
cvToHex
) - Post Conditions
- Transactions
Although user can 2-step this process by first serializing to bytes and then converting to hex, having a helper would make for a nicer DX.
Solution
Similar to the cvToHex
helper, it would be helpful to have postConditionToHex()
and txToHex()
helpers.
janniks commented
Good point, thanks! There might exist some helpers, but I'll add aliases or build out the missing functions.