This method returns a SolanaInstruction. Add it to a transaction and use the
Transaction Service to execute it on-chain. See Instructions &
Transactions.
Allocate
Allocates a specific number of bytes of data space to an existing account. The account must be a signer. Use this before assigning the account to a program that requires specific data storage.Request
Base58-encoded public key (string)
required
The account to allocate space for. Must be a signer.
uint64
required
Number of bytes to allocate. Programs typically have fixed data layout sizes.
Response
SolanaInstruction (object)
The allocate instruction. Add this to a transaction and submit it via the Transaction Service.
Code Examples
AllocateWithSeed
Allocates space for a seed-derived account. The base key must sign the transaction — not the derived account address.Request
Base58-encoded public key (string)
required
The seed-derived account address to allocate space for.
Base58-encoded public key (string)
required
Base public key used to derive
account. Must be a signer.string
required
Seed string used to derive
account.uint64
required
Number of bytes to allocate.
Response
SolanaInstruction (object)
The allocate_with_seed instruction. Add this to a transaction and submit it via the Transaction Service.