4

i want to use authority delegation so a user can delegate his tokens and later a transaction can be created to transfer those tokens. can this be done without a smart contract and can the authority be delegated to a publickey that only the app has access to and can perform transactions on the users behalf? if so how would i go about implementing this?

1 Answer 1

1

Yes, the delegate can be any Pubkey, the only requirement to achieve the transfer is for that key to be able to "sign", so adding a signature as an on curve keypair, or signing as a PDA using invoke_signed.

However, it doesn't seem very correct to delegate to anything else than a program as the user does not get any guarantee (the code).

1
  • when i try to delegate to a non program PubKey i get this error WalletSendTransactionError: failed to send transaction: Transaction simulation failed: This program may not be used for executing instructions Commented Aug 4, 2022 at 13:59

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.