KeyPair class

Holds a Stellar keypair.

Constructors

KeyPair(Uint8List _mPublicKey, Uint8List? privateKey)
Creates a new KeyPair from the given publicKey and privateKey.

Properties

accountId String
Returns the human readable account ID of this key pair.
no setter
hashCode int
The hash code for this object.
no setterinherited
privateKey Uint8List?
no setter
publicKey Uint8List
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretSeed String
Returns the human readable secret seed of this key pair.
no setter
signatureHint XdrSignatureHint
no setter
xdrMuxedAccount XdrMuxedAccount
no setter
xdrPublicKey XdrPublicKey
no setter
xdrSignerKey XdrSignerKey
no setter

Methods

canSign() bool
Returns true if this Keypair is capable of signing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(Uint8List data) Uint8List
Sign the provided data with the keypair's private key data.
signDecorated(Uint8List data) XdrDecoratedSignature
Sign the provided data with the keypair's private key.
signPayloadDecorated(Uint8List signerPayload) XdrDecoratedSignature
Sign the provided payload data for payload signer where the input is the data being signed. Per the <a href="https://github.com/stellar/stellar-protocol/blob/master/core/cap-0040.md#signature-hint" CAP-40 Signature spec
toString() String
A string representation of this object.
inherited
verify(Uint8List data, Uint8List signature) bool
Verify the provided data and signature match this keypair's public key.

Operators

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

Static Methods

fromAccountId(String accountId) KeyPair
Creates a new KeyPair object from a stellar accountId.
fromPublicKey(Uint8List publicKey) KeyPair
Creates a new KeyPair object from a 32 byte publicKey address.
fromSecretSeed(String seed) KeyPair
Creates a new KeyPair object from a Stellar secret seed ("S...").
fromSecretSeedList(Uint8List seed) KeyPair
Creates a new KeyPair object from a raw 32 byte secret seed.
fromXdrPublicKey(XdrPublicKey key) KeyPair
fromXdrSignerKey(XdrSignerKey key) KeyPair
random() KeyPair
Generates a random Stellar KeyPair object.