opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

Unable to use transferAll

Open wholelott4 opened this issue 4 years ago • 4 comments

Hello, how can I use transferAll to generate a transaction to send to the frontend to be signed or something like this? I mean, is it possible to create a raw transaction through the transferAll endpoint or something like this? So I can send it to the frontend to be signed? Instead of writing the code in the frontend..

Because, what about if I have a wallet with the privateKey? how can I use it to sign the transfer

wholelott4 avatar Jun 09 '22 05:06 wholelott4

I think you are lost in the concept.

If you want your transactions to be signed via Metamask, you can attach to MetaMask Wallet Provider. In this case, you dont need to use private key to connect to the wallet. your app will connect with a wallet via metamask.

If you dont want to use Metamask ( user interaction), you can use HDWalletProvider. But then, you will need to access wallet via private key or mnemonic. If that is the case, you need to decouple your application's front-end with back-end. your secrets are needed to be in your backend.

simonare avatar Jun 09 '22 14:06 simonare

I think you are lost in the concept.

If you want your transactions to be signed via Metamask, you can attach to MetaMask Wallet Provider. In this case, you dont need to use private key to connect to the wallet. your app will connect with a wallet via metamask.

If you dont want to use Metamask ( user interaction), you can use HDWalletProvider. But then, you will need to access wallet via private key or mnemonic. If that is the case, you need to decouple your application's front-end with back-end. your secrets are needed to be in your backend.

Yes, but I want the user to transfer NFTS to one wallet, and then I have my own wallets with private key that I want to use this method too. Using the private key..

wholelott4 avatar Jun 09 '22 16:06 wholelott4

@simonare makes a good point. It depends on how you want your transactions to be signed. You can use web3.js or ethers.

esteban-OpenSea avatar Jun 09 '22 22:06 esteban-OpenSea

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar May 24 '23 04:05 github-actions[bot]