从 UINT8Array 转换 Solana public 键
Convert Solana public key from UINT8Array
我已经使用 Solana CLI 生成了帐户,但我得到的是 public 和私钥
publicKey: Uint8Array(32) [
102, 255, 46, 44, 90, 176, 207, 98,
251, 66, 136, 190, 240, 59, 198, 177,
169, 35, 153, 3, 163, 68, 188, 214,
225, 46, 55, 111, 159, 157, 182, 111
],
但我想要可读格式来支持下一次交易的密钥。
你可以试试这个
console.log(wallet.publicKey.toBase58());
我已经使用 Solana CLI 生成了帐户,但我得到的是 public 和私钥
publicKey: Uint8Array(32) [
102, 255, 46, 44, 90, 176, 207, 98,
251, 66, 136, 190, 240, 59, 198, 177,
169, 35, 153, 3, 163, 68, 188, 214,
225, 46, 55, 111, 159, 157, 182, 111
],
但我想要可读格式来支持下一次交易的密钥。
你可以试试这个
console.log(wallet.publicKey.toBase58());