From 1343baa12d65ec14effb4c197548c3b075e2b984 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Thu, 18 Sep 2025 23:29:05 +0800 Subject: [PATCH] feat: add base58 --- single-scripts/base58.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 single-scripts/base58.ts diff --git a/single-scripts/base58.ts b/single-scripts/base58.ts new file mode 100755 index 0000000..770778e --- /dev/null +++ b/single-scripts/base58.ts @@ -0,0 +1,12 @@ +#!/usr/bin/env runts -- + +import { encodeBase58, decodeBase58 } from "jsr:@std/encoding/base58"; +import { toArrayBuffer } from "https://deno.land/std@0.203.0/streams/mod.ts"; + +const input = await toArrayBuffer(Deno.stdin.readable); +const encoded = encodeBase58(input); + +console.log(encoded); + +// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250918T232829+08:00.MEQCIDTK7w2cMsnuSeOTG6Ea +// IuYKaueP/nmuNLrphCzropKdAiAy5bIcH2mMdo9cXo6zojqoz2p9gOe/HXapjJgGLUvpMg==