We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); final String mnemonic = generateMnemonic(); final DescriptorSecretKey secretKey = await (await DescriptorSecretKey.create( network: Network.Regtest, mnemonic: await Mnemonic.fromString(mnemonic), )) .derive(await DerivationPath.create(path: "m/49'/0'/0'")); final Descriptor descriptorExternal = await Descriptor.newBip49( secretKey: secretKey, network: Network.Regtest, keychain: KeychainKind.External, ); final Descriptor descriptorInternal = await Descriptor.newBip49( secretKey: secretKey, network: Network.Regtest, keychain: KeychainKind.Internal, ); final Wallet wallet = await Wallet.create( descriptor: descriptorExternal, changeDescriptor: descriptorInternal, network: Network.Regtest, databaseConfig: const DatabaseConfig.memory(), ); final AddressInfo address = await wallet.getAddress(addressIndex: const AddressIndex.reset(index: 0)); print(address.address); final Blockchain blockchain = await Blockchain.create( config: const BlockchainConfig.rpc( config: RpcConfig( url: 'http://127.0.0.1:18443', network: Network.Regtest, authUserPass: UserPass( username: "your_username", password: "your_password", ), walletName: 'bdk_flutter', ), ), ); await wallet.sync(blockchain); await wallet.getBalance(); }
I catch error below on wallet.sync(...)
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Rpc(Transport(SocketError(Os { code: 35, kind: WouldBlock, message: "Resource temporarily unavailable" })))) #0 Wallet.sync (package:bdk_flutter/src/root.dart:1200:7) #1 main (package:bdk_flutter_test/main.dart:51:3)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I catch error below on wallet.sync(...)
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Rpc(Transport(SocketError(Os { code: 35, kind: WouldBlock, message: "Resource temporarily unavailable" }))))
#0 Wallet.sync (package:bdk_flutter/src/root.dart:1200:7)
#1 main (package:bdk_flutter_test/main.dart:51:3)
The text was updated successfully, but these errors were encountered: