add allowPDAOwnerAddress option to resolveOrCreateATA(s)
getAssociatedTokenAddressSync has allowOwnerOffCurve option and its default value is false.
If allowOwnerOffCurve is set to false, owner of ATA must be NOT PDA.
Multi-sig wallet makes owner a PDA. To allow use by multisig wallets, add an option to accept PDA for owner.
Although I considered always allowing this option, I decided to make it optional like spl-token to avoid unintentional use of PDA.
add wrappedSolAccountCreateMethod option to resolveOrCreateATA(s)
its value is one of ["keypair", "withSeed"].
keypair: Using Keypair.generate() in the conventional way
withSeed: Using CreateAccountWithSeed ix with randomly generated 32-bytes seed string
Multi-sig wallets are incompatible with transactions requiring signatures other than the wallet address; the addition of withSeed, which does not use Keypair, will facilitate the use of multi-sig wallets.
Asana
parent: https://app.asana.com/0/1202413563699470/1204997759596564/f
subtask1: https://app.asana.com/0/0/1204997759596568/f subtask2: https://app.asana.com/0/0/1204997759596569/f
Overview of the changes
add
allowPDAOwnerAddress
option toresolveOrCreateATA(s)
getAssociatedTokenAddressSync
hasallowOwnerOffCurve
option and its default value isfalse
. IfallowOwnerOffCurve
is set tofalse
,owner
of ATA must be NOT PDA.Multi-sig wallet makes owner a PDA. To allow use by multisig wallets, add an option to accept PDA for owner.
Although I considered always allowing this option, I decided to make it optional like spl-token to avoid unintentional use of PDA.
see also: getAssociatedTokenAddressSync
add
wrappedSolAccountCreateMethod
option toresolveOrCreateATA(s)
its value is one of ["keypair", "withSeed"].
Multi-sig wallets are incompatible with transactions requiring signatures other than the wallet address; the addition of withSeed, which does not use Keypair, will facilitate the use of multi-sig wallets.