nip24 0.0.1 copy "nip24: ^0.0.1" to clipboard
nip24: ^0.0.1 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.

Features #

This package contains the extra metadata fields that can be added to a Nostr kind 0 event as described in the NIP-24. This includes the display name, website, banner, and bot fields.

Getting started #

Installation #

In your pubspec.yaml file add:

dependencies:
  nip24: ^0.0.1

Usage #

import 'package:nip24/nip24.dart';

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);

Additional information #

This package is part of the Dartstr monorepo, which contains a set of modular and compatible Dart packages of different Nostr NIPS and utilities. Import just the packages of NIPS you need and keep your project lightweight. See the Dartstr monorepo for all available packages.

1
likes
0
pub points
0%
popularity

Publisher

verified publisherkumuly.dev

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

License

unknown (license)

Dependencies

nip01

More

Packages that depend on nip24