diff options
| author | 2023-04-18 03:02:17 +0800 | |
|---|---|---|
| committer | 2023-04-18 03:02:17 +0800 | |
| commit | 4919f028c884a041da7ff098abb02389b4eac598 (patch) | |
| tree | b0f482568c4b8c8a680ce6e2e70a7b7ca87dc190 /envshare/util | |
| parent | b135aac8531c1e1488147ad8c6f98eddbdbe0c99 (diff) | |
| download | HydroRoll-4919f028c884a041da7ff098abb02389b4eac598.tar.gz HydroRoll-4919f028c884a041da7ff098abb02389b4eac598.zip | |
✨add envshare docs
Diffstat (limited to 'envshare/util')
| -rw-r--r-- | envshare/util/base58.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/envshare/util/base58.ts b/envshare/util/base58.ts new file mode 100644 index 0000000..7eeee95 --- /dev/null +++ b/envshare/util/base58.ts @@ -0,0 +1,7 @@ +import baseX from "base-x"; + +const alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; + +export const toBase58 = (b: Uint8Array) => baseX(alphabet).encode(b); + +export const fromBase58 = (s: string) => baseX(alphabet).decode(s); |
