UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

8 lines (6 loc) 212 B
export function stringToBuffer(str: string): Buffer { return Buffer.from(str.replace('0x', ''), 'hex'); } export function stringBase64ToBuffer(str: string): Buffer { return Buffer.from(str, 'base64'); }