2020-11-17 07:07:24 +03:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2021-03-08 02:24:04 +03:00
|
|
|
exports.encode = exports.decode = void 0;
|
2020-11-17 07:07:24 +03:00
|
|
|
var bytes_1 = require("@ethersproject/bytes");
|
|
|
|
function decode(textData) {
|
|
|
|
return bytes_1.arrayify(new Uint8Array(Buffer.from(textData, "base64")));
|
|
|
|
}
|
|
|
|
exports.decode = decode;
|
|
|
|
;
|
|
|
|
function encode(data) {
|
|
|
|
return Buffer.from(bytes_1.arrayify(data)).toString("base64");
|
|
|
|
}
|
|
|
|
exports.encode = encode;
|
|
|
|
//# sourceMappingURL=base64.js.map
|