Open altafan opened 2 years ago
We want this function available for the bytes built-in type. Ideally one could write for example:
const a = bytes(0xaabbcc) let b = a.substr(1,2)
At the moment I think this method could be implemented either in pure js or by making use of the OP_SUBSTR_LAZY opcode.
Still need to understand what's the preferred choice.
Always depends where the data is coming from: ie. from execution/computation or is is an hardcoded value (ie. PUSHDATA)
We want this function available for the bytes built-in type. Ideally one could write for example:
At the moment I think this method could be implemented either in pure js or by making use of the OP_SUBSTR_LAZY opcode.
Still need to understand what's the preferred choice.