Documentation ¶
Index ¶
- Constants
- Variables
- func IsOnCurve(p PublicKey) bool
- type PublicKey
- func CreateProgramAddress(seeds [][]byte, programId PublicKey) (PublicKey, error)
- func CreateWithSeed(from PublicKey, seed string, programID PublicKey) PublicKey
- func FindAssociatedTokenAddress(walletAddress, tokenMintAddress PublicKey) (PublicKey, uint8, error)
- func FindProgramAddress(seed [][]byte, programID PublicKey) (PublicKey, uint8, error)
- func PublicKeyFromBytes(b []byte) PublicKey
- func PublicKeyFromString(s string) PublicKey
Constants ¶
View Source
const ( PublicKeyLength = 32 MaxSeedLength = 32 MaxSeed = 16 )
Variables ¶
View Source
var ( SystemProgramID = PublicKeyFromString("11111111111111111111111111111111") ConfigProgramID = PublicKeyFromString("Config1111111111111111111111111111111111111") StakeProgramID = PublicKeyFromString("Stake11111111111111111111111111111111111111") VoteProgramID = PublicKeyFromString("Vote111111111111111111111111111111111111111") BPFLoaderProgramID = PublicKeyFromString("BPFLoader1111111111111111111111111111111111") Secp256k1ProgramID = PublicKeyFromString("KeccakSecp256k11111111111111111111111111111") TokenProgramID = PublicKeyFromString("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") MemoProgramID = PublicKeyFromString("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr") SPLAssociatedTokenAccountProgramID = PublicKeyFromString("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL") SPLNameServiceProgramID = PublicKeyFromString("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX") MetaplexTokenMetaProgramID = PublicKeyFromString("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s") ComputeBudgetProgramID = PublicKeyFromString("ComputeBudget111111111111111111111111111111") AddressLookupTableProgramID = PublicKeyFromString("AddressLookupTab1e1111111111111111111111111") Token2022ProgramID = PublicKeyFromString("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") BPFLoaderUpgradeableProgramID = PublicKeyFromString("BPFLoaderUpgradeab1e11111111111111111111111") )
View Source
var ( SysVarPubkey = PublicKeyFromString("Sysvar1111111111111111111111111111111111111") SysVarClockPubkey = PublicKeyFromString("SysvarC1ock11111111111111111111111111111111") SysVarRecentBlockhashsPubkey = PublicKeyFromString("SysvarRecentB1ockHashes11111111111111111111") SysVarRentPubkey = PublicKeyFromString("SysvarRent111111111111111111111111111111111") SysVarRewardsPubkey = PublicKeyFromString("SysvarRewards111111111111111111111111111111") SysVarStakeHistoryPubkey = PublicKeyFromString("SysvarStakeHistory1111111111111111111111111") SysVarInstructionsPubkey = PublicKeyFromString("Sysvar1nstructions1111111111111111111111111") SysVarSlotHashesPubkey = PublicKeyFromString("SysvarS1otHashes111111111111111111111111111") StakeConfigPubkey = PublicKeyFromString("StakeConfig11111111111111111111111111111111") )
Functions ¶
Types ¶
type PublicKey ¶
type PublicKey [PublicKeyLength]byte
func CreateProgramAddress ¶
func CreateWithSeed ¶
func FindProgramAddress ¶
func PublicKeyFromBytes ¶
func PublicKeyFromString ¶
func (PublicKey) MarshalJSON ¶
func (*PublicKey) UnmarshalJSON ¶ added in v1.27.0
Click to show internal directories.
Click to hide internal directories.