Open JuanRdBO opened 2 years ago
Hey! Can you explain what your use case is? The SDK already has an NFT airdrop function which doesn't require the end-user to sign the transaction. The transaction is being signed via the mint
keypair and the payer
wallet
Update: The airdrop function's internal types have been changed in the latest version of the SDK. Here is the latest code on how to use the airdrop function - https://github.com/candypay/sdk#airdrop
Hey! I saw that one, but I was referring to the gasless mint of a candy machine. It would be awesome, if the gassless way would not require the end-user to sign the transaction
Gotcha! The latest update of the SDK doesn't require the end user to sign the transaction for minting the Candy Machine via the gasless method. You can take a look at the test suite for the candyMachine
module -- https://github.com/candypay/sdk/blob/main/packages/sdk/tests/candy-machine.test.ts. Under the test for the gasless
method, you can see that the transaction is only being signed by the payer wallet and the mint keypair.
Here is a transaction created via the gasless method's test -- 5c3V3sGLJEU3j3wjJnV1786hhJtLddEcGoikmtPTskXCyhUTkDx1Xxr5xWdi3mJTBWYGUJRhBVGidRnRSzPZ9ywq
via the following configuration:
3DzHJzPZGBwp7uN5NSMDgQjLAo2qAF78XEMwacmnFDMk
as the payer account2S9jKJEGKoVxR3xkEfFyGVrLwJj1H8xYjqtSP5LAX97x
as the end-user accountThe end-user account on the explorer doesn't show the "Signer" badge beside it, whereas the payer account has both the "Signer" and "Fee Payer" badges beside it
Would it be possible to have the end-user just receive the mint, instead of having to be a signer?