███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗ ██████╗ ███╗ ██╗██████╗ ██╗ ██╗ ██████╗████████╗ ██████╗ ██████╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██╔═══██╗████╗ ██║██╔══██╗██║ ██║██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ██║ ██║██╔██╗ ██║██║ ██║██║ ██║██║ ██║ ██║ ██║██████╔╝
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██║ ██║██║╚██╗██║██║ ██║██║ ██║██║ ██║ ██║ ██║██╔══██╗
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗╚██████╔╝██║ ╚████║██████╔╝╚██████╔╝╚██████╗ ██║ ╚██████╔╝██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
-
Simple. Clean. OO.
- Java 22
- Spring WebSocketSession 3.2.2
- Spring Boot 3.3.1
- Event/Message nostr-java library by tcheeric
-
core SOLID OO principles, providing ease of:
- understandability
- extensibility / modularization (HOW-TO: creating relay event-handlers)
- customization
- testing
- NIP-01 (Basic protocol & Standard Tags)
- NIP-02 (Contact List and Petnames)
- NIP-10 (Marked "e" tags)
- NIP-11 (Relay Information Document)
- NIP-12 (Generic Tag Queries)
- NIP-14 (Subject tag in Text events)
- NIP-16 (Event treatment)
- NIP-19 (Bech-32 encoded entities)
- NIP-20 (Command Results)
- NIP-21 (URI scheme)
- NIP-22 (Event "created_at" limits)
- NIP-31 (Unknown event kinds)
- NIP-33 (Parameterized Replaceable Events)
- NIP-57 (Lightning Zaps)
- NIP-99 (Classified Listings)
- used by Barchetta Smart-Contract Negotiation Protocol (in progress) atop Bitcoin Lightning-Network RGB
- NIP-15 (Nostr Marketplace)
- used by Barchetta Smart-Contract Negotiation Protocol (in progress) atop Bitcoin Lightning-Network RGB
$ java -version
openjdk version "22" 2024-03-19 OpenJDK Runtime Environment (build 22+36-2370) OpenJDK 64-Bit Server VM (build 22+36-2370, mixed mode, sharing)
$ mvn -version
Apache Maven 4.0.0-beta-3 (e92f645c2749eb2a4f5a8843cf01e7441e4b559f) Java version: 22, vendor: Oracle Corporation Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-112-generic", arch: "amd64", family: "unix"
note: below java22 nostr-java variant (of tcheeric's java19 nostr-java library) supports virtual threads. reversion to his library will occur upon its upgrade to java22.
$ cd <your_git_home_dir>
$ git clone git@github.com:avlo/nostr-java-avlo-fork.git
$ cd nostr-java-avlo-fork
$ git checkout java22
$ mvn clean install
$ cd <your_git_home_dir>
$ git clone https://github.com/avlo/superconductor
$ cd superconductor
$ mvn clean install
$ cd <your_git_home_dir>/superconductor
$ java -jar target/superconductor-1.6.3.war
$ cd <your_git_home_dir>/superconductor
$ mvn spring-boot:run
$ cp <your_git_home_dir>/superconductor/target/superconductor-1.6.3.war <your_container/instance/deployment_directory>
for full/debug developer console logging:
$ cd <your_git_home_dir>/superconductor
$ mvn spring-boot:run -Dspring-boot.run.arguments=--logging.level.org.springframework=TRACE
ws://localhost:5555
localhost:5555/h2-console/
user: sa
password: // blank
Display all framework table contents (case-sensitive quoted fields/tables when querying):
select id, event_id_string, kind, nip, created_at, pub_key, content from event;
select id, event_id, event_tag_id from "event-event_tag-join";
select id, event_id_string, recommended_relay_url, marker from event_tag;
select id, event_id, pubkey_id from "event-pubkey_tag-join";
select id, public_key, main_relay_url, pet_name from pubkey_tag;
select id, event_id, subject_tag_id from "event-subject_tag-join";
select id, subject from subject_tag;
select id, hashtag_tag from hashtag_tag;
select id, location from geohash_tag;
select id, event_id, geohash_tag_id from "event-geohash_tag-join";
select id, event_id, hash_tag_id from "event-hashtag_tag-join";
select id, event_id, generic_tag_id FROM "event-generic_tag-join";
select id, code from generic_tag;
select id, generic_tag_id, element_attribute_id from "generic_tag-element_attribute-join";
select id, name, "value" from element_attribute;
select id, event_id, price_tag_id from "event-price_tag-join";
select id, uri from relays_tag;
select id, event_id, relays_id from "event-relays_tag-join";
select id, number, currency, frequency from price_tag;
http://localhost:5555/NIP01.html
http://localhost:5555/NIP57.html
http://localhost:5555/NIP99.html
http://localhost:5555/REQ.html
For Nostr clients generating canonical Nostr JSON (as defined in NIP01 spec: Basic protocol flow description, Events, Signatures and Tags), SuperConductor will automatically recognize those JSON events- including their database storage, retrieval and subscriber notification. No additional work or customization is necessary.
SuperConductor supports any generic tags automatically. Otherwise, if custom tag structure is required, simply implement the TagPlugin
interface (an example can be seen here) and your tag will automatically get included by SuperConductor after rebuilding and redeploying.