You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
317 B
13 lines
317 B
"use strict";
|
|
|
|
import { arrayify, BytesLike } from "@ethersproject/bytes";
|
|
|
|
|
|
export function decode(textData: string): Uint8Array {
|
|
return arrayify(new Uint8Array(Buffer.from(textData, "base64")));
|
|
};
|
|
|
|
export function encode(data: BytesLike): string {
|
|
return Buffer.from(arrayify(data)).toString("base64");
|
|
}
|