synced

abstract fun synced(epochTimeinMsOrBlockHeight: Long = -1L): Boolean

Return whether this wallet is synced with its underlying blockchain. If it is not synced, properties like balance and balanceUnconfirmed express some previous state.

Return

true if the blockchain is synced up to the passed height or time

Parameters

epochTimeinMsOrBlockHeight

If a height is provided, this API returns true if the wallet is synced up to or beyond this height. If a height is not provided (or is -1), this API assumes you mean up to "now". This is special cased with an extra check that the blockchain's tip timestamp is within an hour of now. A time in epoch milliseconds may be provided, in which case this API returns true if the wallet is synced up to or beyond this time. (the function can distinguish between height and epoch time because the epoch time number will be much larger than any conceivable height) Of course, since blocks can be discovered at any time, and connected nodes can be slow at processing blocks one cannot ever absolutely know whether the wallet is really synced up to "now", so this function is more accurately described as "nearly synced" for any "now" call.