fromBrowser
fromBrowser(
networkId):Promise<ConnectedWallet>
Defined in: src/Wallet.ts:1296
Create a connected wallet from the Lace browser extension.
Connects to the Lace wallet and returns a ConnectedWallet handle
with the same interface as fromSeed.
Parameters
networkId
string = 'testnet'
Network to connect to (default: ‘testnet’)
Returns
Promise<ConnectedWallet>
Connected wallet handle
Throws
When connection fails or wallet not found
Example
const wallet = await Midday.Wallet.fromBrowser('testnet');const balance = await wallet.getBalance();const { walletProvider, midnightProvider } = wallet.providers();Since
0.7.0