0

I work at a gaming company and we are developing a Play2Earn game.

We want to make the UX as seamlessly as possible so we would to avoid having the players to open a wallet to initially receive their assets.

Is there a way of opening a wallet using a third party service or an API (not using an user interface, we want to do it on the backend) that may (initially) manage user accounts on their behalf (actually, I think that legally we should say that the wallets do not belong to the user in the first instance, I am not sure about this though) until they want to claim those assets as theirs? At that point they would need to open a wallet, provide KYC or whatever they must do to finally have their wallet set.

Any suggestions and ideas are welcome.

1 Answer 1

1

There are multiple 3rd party APIs to create custodial wallets for user but I would personally recommend you to use web3.js to create wallets for the user yourself and save extra charges you are going to pay to 3rd party APIs

Here's how you can do that

const web3 = new Web3('https://mainnet.infura.io/v3/<your-project-id>');

const account = web3.eth.accounts.create();
const privateKey = account.privateKey;
console.log(`Account address: ${account.address}`);
console.log(`Account private key: ${privateKey}`);


1
  • Thank you. Problem is I don't want to store private keys for all the users. Apr 19, 2023 at 0:07

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.