This is a newbie question. Such as address like - zGmof8SeyvHKnSEWv4i2mVv7MYe85D3zZqsTBjsKXSV
Is it base64?
Solana Stack Exchange is a question and answer site for Solana software users and developers. It only takes a minute to sign up.
Sign up to join this communityAddresses are base58 encoded
From the doc:
const { Keypair } = require("@solana/web3.js")
let kp = Keypair.generate();
console.log(kp.publicKey.toBase58());
console.log(kp.secretKey);
// 2DVaHtcdTf7cm18Zm9VV8rKK4oSnjmTkKE6MiXe18Qsb
// Uint8Array(64) [152, 43, 116, ... 118]
A solana address is the public key part of a keypair that is generated with ed25519 algorithm. These are just bytes, but often you will also see it as encoded in base58.
Any 256-bit value is a valid Solana address. By convention, these are stringified with base58
.
While any 256-bit value is valid, they cannot be arbitrarily reserved for use. There are three ways to reserve an address,
SystemInstruction::CreateAccount
instruction which reserves the public key bit value. These addresses occupy the 256-bit values corresponding the Ed25519 curve points.*WithSeed
instructions to reserve addresses derived from a valid Ed25519 public key and a user-specified 32-byte utf-8 string. These can occupy both on- and off-curve bit value addresses. 1
and 2
should be preferred to this method