Skip to main content

bark_bitcoin 0.27.0+bark-0.8.1 copy "bark_bitcoin: ^0.27.0+bark-0.8.1" to clipboard
bark_bitcoin: ^0.27.0+bark-0.8.1 copied to clipboard

An implementation of the Ark protocol on Bitcoin.

example/main.dart

import 'package:bark_bitcoin/bark_bitcoin.dart';

Future<void> main() async {
  // Store the mnemonic securely: you need it to reopen the wallet.
  final mnemonic = generateMnemonic();

  final config = Config(
    serverAddress: 'https://ark.signet.2nd.dev',
    esploraAddress: 'https://esplora.signet.2nd.dev',
  );

  // Opens the wallet in datadir, creating it on first launch.
  // In Flutter, use a directory from path_provider instead.
  final wallet = await Wallet.open(
    network: Network.signet,
    mnemonicOrSeed: mnemonic,
    config: config,
    args: WalletOpenArgs(datadir: './bark-data'),
  );

  await wallet.sync_();

  final balance = await wallet.balance();
  print('Spendable: ${balance.spendableSats} sats');

  final address = await wallet.newAddress();
  print('Ark address: $address');

  wallet.dispose();
}
1
likes
105
points
29
downloads

Documentation

API reference

Publisher

verified publishersecond.tech

Weekly Downloads

An implementation of the Ark protocol on Bitcoin.

Homepage
Repository (GitLab)
View/report issues

License

MIT (license)

Dependencies

ffi, hooks, native_toolchain_rust

More

Packages that depend on bark_bitcoin