0.0.5 • Published 2 years ago

@nostr-ts/common v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nostr-ts Common

Nostr: A simple, open protocol that enables a truly censorship-resistant and global social network.

This package is part of nostr-ts.

  • @nostr-ts/common: common types and functions
  • @nostr-ts/node: client for usage with node ws library
  • @nostr-ts/web: client for usage with browser WebSocket API

Checkout the documentation for more information.

Installation

pnpm add @nostr-ts/common

Get started

This is mostly shared stuff, so checkout either

  • @nostr-ts/node for node usage
  • @nostr-ts/web for browser usage

for ex.

On Node.js use:

import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, RelayDiscovery, loadOrCreateKeypair, NUser } from '@nostr-ts/node'

In the browser use:

import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, loadOrCreateKeypair, NUser } from '@nostr-ts/web'