fun import(seed: ByteArray, previousWalletBirthday: WalletBirthday, clearCacheDb: Boolean = false, clearDataDb: Boolean = false): Array<String>
Initialize a new wallet with the imported seed and birthday. It creates the required database tables and loads and configures the rustBackend property for use by all other components.
seed
- the seed to use for the imported wallet.
previousWalletBirthday
- the birthday to use for the imported. Typically, this
corresponds to the height where this wallet was first created, allowing the wallet to be
optimized not to download or scan blocks from before the wallet existed.
clearCacheDb
- when true, this will delete cacheDb, if it exists, resulting in the fresh
download of all compact blocks. Otherwise, downloading resumes from the last fetched block.
clearDataDb
- when true, this will delete the dataDb, if it exists, resulting in the
fresh scan of all blocks. Otherwise, this function throws an exception when previous wallet
data exists to prevent accidental overwrites.
InitializerException.AlreadyInitializedException
- when the blocks table already exists
and clearDataDb is false.
Return
the account spending keys, corresponding to the accounts that get initialized in the
DB.
Return
the spending key(s) associated with this wallet, for convenience.