0

I was wondering if anyone knew how I could use the spl-token library to create an associated token account that would then be able to sign a transaction?

For example if i used spl.getAssociatedTokenAddress() to create such an account it only returns the publicKey (is this because program derived addressed do not have a keypair?) But i wish to use this account to sign the execution of an instruction later on, but the call of my back end function only takes a keypair for the signer field...

Thank you!!

1 Answer 1

2

This isn't possible.

You are right in inferring that associated token accounts are PDAs (src). PDAs can only be used to sign instructions by their owner, which is in this case the associated token program.

What is possible is creating a regular keypair-controlled account, creating an associated token account for that account, and then signing other transactions with the keypair-controlled account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.