( opReturnData: string[], )
| 249 | } |
| 250 | |
| 251 | export function createOpReturnOutput( |
| 252 | opReturnData: string[], |
| 253 | ): Output { |
| 254 | const script = [ |
| 255 | Op.OP_RETURN, |
| 256 | ...opReturnData.map((output: string) => toBin(output)), |
| 257 | ]; |
| 258 | |
| 259 | return { to: encodeNullDataScript(script), amount: 0n }; |
| 260 | } |
| 261 | |
| 262 | function toBin(output: string): Uint8Array { |
| 263 | const data = output.replace(/^0x/, ''); |
no test coverage detected