Closed tiagolr closed 6 months ago
For people who use the OP_RETURN script template, this may prove useful. But as it's template-specific, I think it makes more sense to have as a static method on the script template within the templates repository, rather than shipping it in the core library itself.
I've spoken with people within the BSV Association and received the necessary approvals, so I'll be creating the new templates repository very soon. In the initial version, I'll be sure to incorporate this within the OP_RETURN template.
Template classes have the lock
and unlock
methods, but I think they can definitely incorporate other functionality as well, such as decoding scripts.
Implemented within the new Templates repository:
Small util to decode op_return scripts to UTF-8.
I notice this PR has some differences in documentation, I only ran
npm run lint
andnpm run doc
before submitting, strange. The doc changes come from adding this line to Utils.jsimport Script from '../script/Script.js'
and then running doc.