Quick start
Start with pure operations, then attach an approved signer and live endpoints when your app is ready.
Create a note without publishing
import { Nostr, Archive } from '@chaoticka/nsite-loopy-sdk';
const note = Nostr.textNote('First post');
console.log(note.kind, note.content); // 1, 'First post'
const data = Archive.writeZip({ 'index.html': '<h1>Hi</h1>' });
const restored = await Archive.readZip(data);
console.log(new TextDecoder().decode(restored['index.html']));
The note is unsigned. It is not a network event until the signer approves it and a relay accepts it.
Bind the facade
import { createNsiteSDK, Nostr } from '@chaoticka/nsite-loopy-sdk';
const sdk = createNsiteSDK({
relays: ['wss://relay.example.net'],
server: 'https://blossom.example.net',
signer: Nostr.browserSigner(window.nostr),
});
// sdk.publish(files) and sdk.query(filter) require real host capabilities.
The .example.net URLs are placeholders. They are not verified active relays or Blossom servers.
Learn the contracts
- Signing: NIP-07, NIP-46, and Android NIP-55.
- Relay discovery: discover, filter, publish, and read back.
- Nsite publishing: signed site manifests and exact-byte media.
- Full API index: 104 documented facade/namespace entries.