Request for best practices re: wallet / account creation server side

Hi @lukehamilton,

Compared to the GoSDK it looks like you have all the steps figured out except the key generation.

The keys are generated using the ECDSA signing algorithm, on one of this 2 curves: P256 or secp256k1. SHA3 is used to keep the data fixed-length. If the JS SDK does not have a way to create keys you’ll need to import a JS crypto library.

IMO if you find that, there is no need to use the GoSDK for account creation.

I’ll let someone else answer the testnet/mainnet access request but in general if it works on the emulator it will work on the testnet.

The data you need to create an account:

  • a public key to manage the new account. private key is not needed in the creation but the user should have it otherwise he won’t be able to access his account
  • the code that the user wants to deploy under his account, if any
  • the address, public key and private key of an account that will pay for the transaction, in examples this account is the service account. If you don’t want to provide a private key to your code, you’ll need to create the payload for this transaction and have that signed externally and provide the public key and the signature.