Wallet Import
Last updated
Last updated
As defined in our core wallet module, a Wallaby wallet consists of three parts:
a set of (multiple) key pairs used to sign onchain transactions
a master seed phrase
assets associated with your wallet
In standard wallet creation, each of these parts are generated from scratch. However, since the Wallaby platform was designed with interoperability in mind, we allow you to import a seed phrase instead of generating a new one.
When importing a wallet, we do not generate a seed phrase for you. Instead we utilize the given seed phrase. This means that the underlying transaction signing keys and addresses associated with that seed phrase will be the same as the imported wallet. However, for blockchains where the given seed phrase {question for Eddy} is not compatible, we generate new keys that are accessible within our system with that same seed.
{image of key differences}
Import does not impact asset initialization so wallets that are imported will still have the same default associated assets as newly created wallets.
Both wallet recovery and wallet import require your seed phrase. However, wallet recovery retrieves the specific instance of that wallet which includes wallet data, wallet addresses, and user data.
Importing a wallet creates a new instance of that wallet even if another wallet with that seed phrase exists. Any wallet data would have to be recreated or fetched again from the blockchain. Wallet services that require approvals would need to be reverified.
Like most standard wallets, you can add the wallet import capability side-by-side to the new wallet creation flow.
{Wireframe Example}
However, if there are scenarios where you know a user will have a pre-existing wallet, you can create an import only flow for them.
{Wireframe Example}
With our SDK, you will always use the import function with a unique identifier from your system to represent the user. Implementation is described in more detail in in the developer docs: Importing a wallet with the SDK.
You should expect the following behavior when using this function:
If we detect that a user with this unique identifier does not already exist, then we will create a new account and import the wallet.
If we detect that a user with this unique identifier does already exist, but does not have a wallet, then we sign them in and import the wallet for that user.
If we detect that a user with this unique identifier does already exist and has a wallet, then we check if they already have a wallet with that seed phrase.
If they don't, sign them in and create an additional wallet for that user. **
If they do already have a wallet with that seed phrase, you will see an error telling you to recover the wallet instead.
** If you would like to restrict a user from having multiple wallets, you will need to create this restriction on your end.