Pubkey class
Public Key
- Inheritance
-
- Object
- Serializable
- Pubkey
Constructors
- Pubkey.new(BigInt value)
-
Creates a Pubkey from an
ed25519
public keyvalue
.const - Pubkey.fromBase58(String pubkey)
-
Creates a Pubkey from a
base-58
encodedpubkey
.factory - Pubkey.fromBase64(String pubkey)
-
Creates a Pubkey from a
base-64
encodedpubkey
.factory - Pubkey.fromJson(String pubkey)
-
Creates a Pubkey from a
base-58
encodedpubkey
.factory - Pubkey.fromString(String pubkey)
-
Creates a Pubkey from a
base-58
encodedpubkey
.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< seeds, Pubkey programId) → Pubkeyint> > -
Derives a program address from the
seeds
andprogramId
. -
createWithSeed(
Pubkey pubkey, String seed, Pubkey programId) → Pubkey -
Derives a Pubkey from another
pubkey
,seed
, andprogramId
. -
findAssociatedTokenAddress(
Pubkey wallet, Pubkey tokenMint) → ProgramAddress -
Finds the associated token address for an existing
wallet
andtokenMint
. -
findProgramAddress(
List< List< seeds, Pubkey programId) → ProgramAddressint> > -
Finds a valid program address for the given
seeds
andprogramId
. -
isOnCurve(
Uint8List pubkey) → bool -
Returns true if
pubkey
falls on theed25519
curve. -
tryFromBase58(
String? pubkey) → Pubkey? -
Creates a Pubkey from a
base-58
encodedpubkey
. -
tryFromBase64(
String? pubkey) → Pubkey? -
Creates a Pubkey from a
base-64
encodedpubkey
. -
tryFromUint8List(
Iterable< int> ? pubkey) → Pubkey? -
Creates a Pubkey from a byte array
pubkey
.