Pubkey class

Public Key

Inheritance

Constructors

Pubkey.new(BigInt value)
Creates a Pubkey from an ed25519 public key value.
const
Pubkey.fromBase58(String pubkey)
Creates a Pubkey from a base-58 encoded pubkey.
factory
Pubkey.fromBase64(String pubkey)
Creates a Pubkey from a base-64 encoded pubkey.
factory
Pubkey.fromJson(String pubkey)
Creates a Pubkey from a base-58 encoded pubkey.
factory
Pubkey.fromString(String pubkey)
Creates a Pubkey from a base-58 encoded pubkey.
factory
Pubkey.fromUint8List(Iterable<int> pubkey)
Creates a Pubkey from a byte array pubkey.
factory
Pubkey.zero()
Creates a default Pubkey (0 => '11111111111111111111111111111111').
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(Pubkey other) int
Compares this Pubkey to other.
equals(Pubkey pubkey) bool
Returns true if this Pubkey is equal to the provided pubkey.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBase58() String
Returns this Pubkey as a base-58 encoded string.
toBase64() String
Returns this Pubkey as a base-64 encoded string.
toBuffer() ByteBuffer
Returns this Pubkey as a byte buffer.
toBytes() Uint8List
Returns this Pubkey as a byte array.
toJson() String
Returns this Pubkey as a base-58 encoded string.
override
toString() String
Returns this Pubkey as a base-58 encoded string.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

createProgramAddress(List<List<int>> seeds, Pubkey programId) Pubkey
Derives a program address from the seeds and programId.
createWithSeed(Pubkey pubkey, String seed, Pubkey programId) Pubkey
Derives a Pubkey from another pubkey, seed, and programId.
findAssociatedTokenAddress(Pubkey wallet, Pubkey tokenMint) ProgramAddress
Finds the associated token address for an existing wallet and tokenMint.
findProgramAddress(List<List<int>> seeds, Pubkey programId) ProgramAddress
Finds a valid program address for the given seeds and programId.
isOnCurve(Uint8List pubkey) bool
Returns true if pubkey falls on the ed25519 curve.
tryFromBase58(String? pubkey) Pubkey?
Creates a Pubkey from a base-58 encoded pubkey.
tryFromBase64(String? pubkey) Pubkey?
Creates a Pubkey from a base-64 encoded pubkey.
tryFromUint8List(Iterable<int>? pubkey) Pubkey?
Creates a Pubkey from a byte array pubkey.