Skip to main content

Generate Wallet

POST 

/api/v2/:coin/wallet/generate

Generate a new wallet for a coin. If you want a wallet to hold tokens, generate a wallet for the native coin of the blockchain (e.g. generate an ETH wallet to hold ERC20 tokens).

Calling this endpoint does all of the following:

  1. Creates the user keychain locally on your machine and encrypts it with the provided passphrase (skipped if you pass a userKey).
  2. Creates the backup keychain locally on your machine.
  3. Uploads the encrypted user keychain and public backup keychain to MagFi.
  4. Creates the MagFi key (and the backup key if you pass backupXpubProvider) on the service.
  5. Creates the wallet on MagFi with the 3 public keys above.

ⓘ Ethereum wallets can only be created under an enterprise. Pass in the id of the enterprise to associate the wallet with. Your enterprise id can be seen by clicking on the “Manage Organization” link on the enterprise dropdown. Each enterprise has a fee address which will be used to pay for transaction fees on all Ethereum wallets in that enterprise. The fee address is displayed in the dashboard of the website, please fund it before creating a wallet.

ⓘ You cannot generate a wallet by passing in a subtoken as the coin. Subtokens share wallets with their parent coin and it is not possible to create a wallet specific to one token.

ⓘ This endpoint should be called through MagFi Express if used without the SDK, such as when using cURL.

ⓘ Many account-based assets, including Ethereum, require you to Fund Gas Tanks to initialize a new wallets on chain. Ensure your gas tank has a sufficient balance to cover this cost before generating a new wallet.

Request

Responses

OK

Environment: