initializeWalletAndWaitForInitialized

suspend fun initializeWalletAndWaitForInitialized(keyType: KeyType, signingPublicKey: String): Flow<Wallet>

Initializes a wallet in the Lightspark infrastructure and syncs it to the Bitcoin network and triggers updates as state changes. This is an asynchronous operation, which will continue sending the wallet state updates until the Wallet status changes to READY (or FAILED).

Return

A flow of Wallet updates.

Parameters

keyType

The type of key to use for the wallet.

signingPublicKey

The base64-encoded public key to use for signing transactions.

Throws

if there is no valid authentication.