fromSeed
fromSeed(
seed,networkConfig,options?):Promise<ConnectedWallet>
Defined in: src/Wallet.ts:1268
Create a connected wallet from an HD seed.
Initializes the wallet, optionally syncs with the network (default: true),
and returns a ConnectedWallet handle.
Parameters
seed
string
64-character hex seed
networkConfig
Network configuration
options?
Options (sync: whether to wait for sync, default true)
Returns
Promise<ConnectedWallet>
Connected wallet handle
Throws
When initialization or sync fails
Example
const wallet = await Midday.Wallet.fromSeed(seed, networkConfig);const balance = await wallet.getBalance();const { walletProvider, midnightProvider } = wallet.providers();await wallet.close();Since
0.7.0