diff --git a/01-wallet/index.ts b/01-wallet/index.ts index 6626f95..eab4139 100644 --- a/01-wallet/index.ts +++ b/01-wallet/index.ts @@ -18,9 +18,9 @@ console.log("钱包私钥(base64):", Buffer.from(secretKey).toString("base64")); fs.writeFileSync("wallet.json", JSON.stringify(Array.from(secretKey))); // 导入钱包 -// const secretKey = Uint8Array.from(JSON.parse(fs.readFileSync("wallet.json"))); +// const secretKey = Uint8Array.from(JSON.parse(fs.readFileSync("wallet.json", "utf-8"))); // const wallet = Keypair.fromSecretKey(secretKey); // console.log("钱包公钥:", wallet.publicKey.toString()); // console.log("钱包私钥:", wallet.secretKey); -// console.log("钱包私钥(base64):", Buffer.from(secretKey).toString("base64")); \ No newline at end of file +// console.log("钱包私钥(base64):", Buffer.from(secretKey).toString("base64"));