nostr_bunker 1.3.0 copy "nostr_bunker: ^1.3.0" to clipboard
nostr_bunker: ^1.3.0 copied to clipboard

With this package your app can act as a bunker and will be able to sign events from others Nostr apps.

example/nostr_bunker_example.dart

import 'package:ndk/ndk.dart';
import 'package:ndk/shared/nips/nip01/bip340.dart';
import 'package:nostr_bunker/nostr_bunker.dart';

void main() async {
  final userKeyPair = Bip340.generatePrivateKey();
  final bunker = Bunker(privateKeys: [userKeyPair.privateKey!]);

  final bunkerUrl = bunker.getBunkerUrl(userPubkey: userKeyPair.publicKey);

  final ndkClient = Ndk.defaultConfig();

  final connection = await ndkClient.bunkers.connectWithBunkerUrl(bunkerUrl);

  print("Connected: ${connection != null}");
}
0
likes
150
points
343
downloads

Publisher

unverified uploader

Weekly Downloads

With this package your app can act as a bunker and will be able to sign events from others Nostr apps.

Repository

Documentation

API reference

License

MIT (license)

Dependencies

ndk

More

Packages that depend on nostr_bunker