vulpemventures / go-elements

Go support for Liquid/Elements transactions
MIT License
27 stars 12 forks source link

extend the txscript.ScriptBuilder from btcd #197

Open louisinger opened 2 years ago

louisinger commented 2 years ago

Elements tapscript update adds new introspections opcodes. It's totally ok to use the current btcd txscript.ScriptBuilder to build elements tapscript with introspection but the new opcodes adds some complexity (like asset or value encoding).

I'm thinking of extending ScriptBuilder from btcd with introspect functions specific to Elements (similar to what we did with javascript here)

The new extended ElementsScriptBuilder could be a new pkg of go-elements

related to: https://github.com/vulpemventures/go-elements/pull/195#issuecomment-1142129158