Midnight.js API Reference v1.0.0
Midnight.js API Reference / @midnight-ntwrk/midnight-js-testing / syncWallet
Function: syncWallet()
syncWallet(
wallet
,throttleTime
?):Promise
<bigint
>
Synchronizes the wallet with the network and waits for a non-zero balance.
Parameters
wallet
Wallet
The wallet to synchronize
throttleTime?
number
= 3_000
Throttle time in milliseconds
Returns
Promise
<bigint
>
A promise that resolves to the wallet balance when sync is close enough and balance is non-zero