Import wallet
In this example we can see that we define a callback for the fourth parameter of the constructor of WalletService. This callback will be called when a synchronization finishes. You could also set up a fifth parameter which would be another callback called when a synchronization starts.
The third parameter (null in the example) corresponds of the WalletState. This is useful when you do not want to do full synchronization every time as it saves the state of the wallet at a given point so the next synchronization takes less time.
The mnemonic provided here is the one we used to test and contains lots of transactions. This also means that the synchronization will last a lot. If you want you can create a new wallet and send you ckb through the faucet.
Last updated