mirror of
https://github.com/edufeed-org/nostr-clj.git
synced 2025-12-10 08:44:47 +00:00
add fetch-events
This commit is contained in:
commit
0cc04aa611
14 changed files with 883 additions and 0 deletions
63
README.md
Normal file
63
README.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# nostr-clj
|
||||
|
||||
Do nostr stuff with Clojure.
|
||||
|
||||
Heavy WIP.
|
||||
|
||||
## Usage
|
||||
|
||||
FIXME: write usage documentation!
|
||||
|
||||
### Connection
|
||||
|
||||
- `url`: a string
|
||||
- `on-message-handler`: a function
|
||||
- `on-open-handler`: a function
|
||||
|
||||
```clojure
|
||||
(ns.nostr.core)
|
||||
|
||||
(connect { :uri "wss://relay.org"
|
||||
:on-message-handler (fn [res] (println (nth res 2)))})
|
||||
```
|
||||
|
||||
|
||||
|
||||
Invoke a library API function from the command-line:
|
||||
|
||||
$ clojure -X nostr-clj.nostr-clj/foo :a 1 :b '"two"'
|
||||
{:a 1, :b "two"} "Hello, World!"
|
||||
|
||||
Run the project's tests (they'll fail until you edit them):
|
||||
|
||||
$ clojure -T:build test
|
||||
|
||||
Run the project's CI pipeline and build a JAR (this will fail until you edit the tests to pass):
|
||||
|
||||
$ clojure -T:build ci
|
||||
|
||||
This will produce an updated `pom.xml` file with synchronized dependencies inside the `META-INF`
|
||||
directory inside `target/classes` and the JAR in `target`. You can update the version (and SCM tag)
|
||||
information in generated `pom.xml` by updating `build.clj`.
|
||||
|
||||
Install it locally (requires the `ci` task be run first):
|
||||
|
||||
$ clojure -T:build install
|
||||
|
||||
Deploy it to Clojars -- needs `CLOJARS_USERNAME` and `CLOJARS_PASSWORD` environment
|
||||
variables (requires the `ci` task be run first):
|
||||
|
||||
$ clojure -T:build deploy
|
||||
|
||||
Your library will be deployed to net.clojars.nostr-clj/nostr-clj on clojars.org by default.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2024 Laoc
|
||||
|
||||
_EPLv1.0 is just the default for projects generated by `deps-new`: you are not_
|
||||
_required to open source this project, nor are you required to use EPLv1.0!_
|
||||
_Feel free to remove or change the `LICENSE` file and remove or update this_
|
||||
_section of the `README.md` file!_
|
||||
|
||||
Distributed under the Eclipse Public License version 1.0.
|
||||
Loading…
Add table
Add a link
Reference in a new issue