ecash-lib
Version:
Library for eCash transaction building
18 lines • 660 B
JavaScript
;
// Copyright (c) 2024 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Object.defineProperty(exports, "__esModule", { value: true });
exports.strToBytes = strToBytes;
exports.bytesToStr = bytesToStr;
const encoder = new TextEncoder();
const decoder = new TextDecoder();
/** Turn a UTF-8 encoded string into a Uint8Array */
function strToBytes(str) {
return encoder.encode(str);
}
/** Turn a Uint8Array into a UTF-8 encoded string */
function bytesToStr(bytes) {
return decoder.decode(bytes);
}
//# sourceMappingURL=str.js.map