I am trying to recreate the transfer sol --allow-unfunded-recipient in other sdks. But confused on how this works https://github.com/solana-labs/solana/blob/b8b3d723da8b2d35b948c5e0abb4c37d6d862710/cli/src/wallet.rs#L703. What is the seed used when transferring to an unfunded account? I know the address I want to transfer to, its just not funded until I transfer to it
1 Answer
To put it quickly, just don't worry about seeds at all and transfer to the address.
They are used for TransferWithSeed
, which is a pre-cursor to program-derived addresses. The concept is that with your pubkey, you can prove the derivation to some other address with some seed, and get control over the account at that pubkey. So when you provide a derived_address_seed
and derived_program_id
, you can use TransferWithSeed
.
Very important note: these are not program-derived addresses! If you're working with PDAs, don't use any of the *WithSeed
instructions.