nip24 0.2.0 copy "nip24: ^0.2.0" to clipboard
nip24: ^0.2.0 copied to clipboard

This package contains the extra metadata fields that can be added to a Nostr kind 0 event as described in the NIP-24.

example/nip24_example.dart

import 'package:nip24/nip24.dart';

void main() {
  var metadata = Kind0ExtraMetadata(
    name: 'John Doe',
    about: 'A developer',
    picture: 'https://example.com/picture.png',
    displayName: 'JD',
    website: 'https://johndoe.dev',
    banner: 'https://example.com/banner.png',
    bot: true,
  );

  print(metadata.content);

  metadata = Kind0ExtraMetadata.fromContent(metadata.content);

  print(metadata.name);
  print(metadata.about);
  print(metadata.picture);
  print(metadata.displayName);
  print(metadata.website);
  print(metadata.banner);
  print(metadata.bot);
}
1
likes
150
points
12
downloads

Publisher

verified publisherkumuly.dev

Weekly Downloads

This package contains the extra metadata fields that can be added to a Nostr kind 0 event as described in the NIP-24.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

nip01

More

Packages that depend on nip24