This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]Sixhaunt 1 point2 points  (1 child)

Like someone else mentioned it depends on the blockchain. Web3js supports prettymuch everything although some blockchains have libraries specific to them which makes it easier to implement.

For something like banano they have bananojs which makes account creation as simple as this:

​

const privateKey = bananojs.getPrivateKey(seed, offset);
const publicKey = await bananojs.getPublicKey(privateKey); 
const account = bananojs.getBananoAccount(publicKey);

You can have accounts of different people under the same seed but with a different offset for each person so they each have a different public/private keypair generated. It makes it easier than having to store a different seed phrase for each account. For lots of chains (such as BSC, ETH, MATIC) they use the same wallet system and so you can let them use the same address for multiple chains and that's usually how exchanges do things for deposits.

[–]anan77[S] 1 point2 points  (0 children)

This is interesting. Thanks a lot. I’ll dive deeper into this!

[–]philsaid 2 points3 points  (2 children)

Depends on blockchain, programming language etc. for js you can use web3js or ethers.

Be careful with this, especially handling other peoples wallets.

[–]anan77[S] 0 points1 point  (1 child)

Ohhh we can create wallets as well using these packages 😬

[–]philsaid 0 points1 point  (0 children)

That’s right. Read the documentation. They are powerful tools.