0.0.9 • Published 11 months ago

nosdav-cli v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago


GitHub license npm npm Github Stars

Introduction

nosdav-cli is a set of scripts that can be used with nostr and nosdav on the command line

send.js

send.js sends events to a server using the Nostr protocol.

The code initializes an event object and signs it using a private key, then sends the signed event to a Nostr server using a WebSocket connection.

If the server accepts the event, a message is logged to the console. The script then waits for 500 milliseconds before closing the WebSocket connection.

This script can be used as a starting point for building more complex applications that use the Nostr protocol for secure communication.

Usage Sending an Event

To send an event to a Nostr relay, run the send.js script. The script accepts the following command-line options:

-u <url>: The URL to include in the event (required).
-k <private_key>: Your private key (required).
-r <relay>: The Nostr relay URL (optional, defaults to wss://nostr-pub.wellorder.net).

put.js

Uploading a File

To upload a file to a NoSDAV server, run the put.js script. The script accepts the following command-line options:

-f <file_path>: The path to the file you want to upload (required).
-k <private_key>: Your private key (optional, defaults to a sample private key).
-s <server>: The NoSDAV server URL (optional, defaults to https://example-nosdav-server.com).

License

  • MIT
0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago