SystemInstruction class
Create new accounts, allocate account data, assign accounts to owning programs, transfer lamports from System Program owned accounts and pay transaction fees.
- Inheritance
-
- Object
- Instruction
- SystemInstruction
- Available extensions
Constructors
- SystemInstruction.advanceNonceAccount({required Ed25519HDPublicKey nonce, required Ed25519HDPublicKey nonceAuthority})
-
Consumes a stored
nonce, replacing it with a successor.factory - SystemInstruction.allocate({required Ed25519HDPublicKey account, required int space})
-
Allocate
spacein a (possibly new)accountwithout funding.factory - SystemInstruction.allocateWithSeed({required Ed25519HDPublicKey account, required Ed25519HDPublicKey base, required String seed, required int space, required Ed25519HDPublicKey owner})
-
Allocate
spacefor and assign anaccountat an address derived from abasepublic key and aseed.factory - SystemInstruction.assign({required Ed25519HDPublicKey assignedAccount, required Ed25519HDPublicKey owner})
-
Assign account
assignedAccountto a programowner.factory - SystemInstruction.assignWithSeed({required Ed25519HDPublicKey account, required Ed25519HDPublicKey base, required String seed, required Ed25519HDPublicKey owner})
-
Assign
accountto a program based on aseed.factory -
Change the entity authorized to execute nonce instructions on the account.
factory
- SystemInstruction.createAccount({required Ed25519HDPublicKey fundingAccount, required Ed25519HDPublicKey newAccount, required int lamports, required int space, required Ed25519HDPublicKey owner})
-
Create a new account.
factory
- SystemInstruction.createAccountWithSeed({required Ed25519HDPublicKey fundingAccount, required Ed25519HDPublicKey newAccount, required Ed25519HDPublicKey base, required String seed, required int lamports, required int space, required Ed25519HDPublicKey owner})
-
Create a new account at an address derived from a
basepubkey and aseed.factory - SystemInstruction.initializeNonceAccount({required Ed25519HDPublicKey nonce, required Ed25519HDPublicKey nonceAuthority})
-
Drive state of Uninitialized
nonceaccount to Initialized, setting the nonce value.factory - SystemInstruction.transfer({required Ed25519HDPublicKey fundingAccount, required Ed25519HDPublicKey recipientAccount, required int lamports})
-
Transfer
lamportsfromfundingAccounttorecipientAccount.factory - SystemInstruction.transferWithSeed({required Ed25519HDPublicKey fundingAccount, required Ed25519HDPublicKey base, required String seed, required Ed25519HDPublicKey owner, required Ed25519HDPublicKey recipientAccount, required int lamports})
-
Transfer
lamportsfrom a derived address.factory - SystemInstruction.withdrawNonceAccount({required Ed25519HDPublicKey nonce, required Ed25519HDPublicKey nonceAuthority, required Ed25519HDPublicKey recipient, required int lamports})
-
Withdraw funds from a
nonceaccount.factory
Properties
-
accounts
→ List<
AccountMeta> -
finalinherited
- data → ByteArray
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- programId → Ed25519HDPublicKey
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compile(
Map< Ed25519HDPublicKey, int> accountIndexesMap) → CompiledInstruction -
Compiles instruction according to the instruction format.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Available on Instruction, provided by the InstructionJson extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
inherited
Static Methods
-
createAndInitializeNonceAccount(
{required Ed25519HDPublicKey fromPubKey, required Ed25519HDPublicKey noncePubKey, required Ed25519HDPublicKey noceAuthorityPubKey, required int lamports}) → List< Instruction>