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
The account to reassign. Must be a signer.
The new owner program address.
Response
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
The seed-derived account address to reassign.
Base public key used to derive
account. Must be a signer.Seed string used to derive
account.The new owner program address.
Response
The assign_with_seed instruction. Add this to a transaction and submit it via the Transaction Service.