This method returns a SolanaInstruction. Add it to a transaction and use the
Transaction Service to execute it on-chain. See Instructions &
Transactions.
Assign
Changes the owner program of an account. Only the account’s current owner program or System Program can assign a new owner. The account must be a signer.Request
Base58-encoded public key (string)
required
The account to reassign. Must be a signer.
Base58-encoded public key (string)
required
The new owner program address.
Response
SolanaInstruction (object)
The assign instruction. Add this to a transaction and submit it via the Transaction Service.
Code Examples
AssignWithSeed
Reassigns the owner of 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 reassign.
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.Base58-encoded public key (string)
required
The new owner program address.
Response
SolanaInstruction (object)
The assign_with_seed instruction. Add this to a transaction and submit it via the Transaction Service.