UNPKG

@btc-vision/transaction

Version:

OPNet transaction library allows you to create and sign transactions for the OPNet network.

6 lines (4 loc) 171 B
import { fromHex } from '@btc-vision/bitcoin'; export function stringToBuffer(str: string): Uint8Array { return fromHex(str.startsWith('0x') ? str.slice(2) : str); }