Package-level declarations

Identity and external signing; NIP-44; Softchat chat/account event writers and classifiers; relay sessions and persistence results; Noise and Negentropy state; attachment metadata and streams; NIP-42/NIP-98 plans; version metadata, redacted diagnostics, and stable public failures.

Types

Link copied to clipboard

Accepted kind-30079 contexts.

Link copied to clipboard
data class AppDataSync(val event: SignedNostrEvent, val context: AppDataContext, val json: String)

Authenticated and self-decrypted kind-30079 application data.

Link copied to clipboard
data class ApplicationData(val event: SignedNostrEvent, val identifier: String, val content: String)

Direct generic NIP-78 application data.

Link copied to clipboard

Bounded compatibility crypto for released-client attachment values.

Link copied to clipboard

Incremental authenticated decryption for a private staged destination.

Link copied to clipboard

Incremental encryption compatible with released clients.

Link copied to clipboard
data class AttachmentMetadata(val url: String, val mimeType: String? = null, val sha256: String? = null, val originalSha256: String? = null, val byteSize: ULong? = null, val dimensions: String? = null, val name: String? = null, val magnet: String? = null, val infohash: String? = null, val blurhash: String? = null, val thumbnailUrl: String? = null, val imageUrl: String? = null, val summary: String? = null, val alt: String? = null, val fallbackUrls: List<String> = emptyList(), val service: String? = null, val encryption: String? = null, val unknownFields: List<String> = emptyList())

Canonical Softchat imeta metadata; HTTP and files remain platform-owned.

Link copied to clipboard
data class AttachmentTransformFinal(val authenticationTag: ByteArray, val plaintextSha256: String, val encryptedSha256: String, val byteCount: ULong)

Final authentication and hash values for one staged attachment transform.

Link copied to clipboard
data class ChatMessage(val rumor: NostrRumor, val participants: List<NostrPublicKey>, val relation: ChatRelation?, val attachments: List<AttachmentMetadata>, val emojiTags: List<List<String>>, val extensionTags: List<List<String>>)

Typed complete kind-14 message with exact raw rumor retained.

Link copied to clipboard
data class ChatMessageDraft(val createdAt: Long, val participants: List<NostrPublicKey>, val content: String, val relation: ChatRelation = ChatRelation.None, val attachments: List<AttachmentMetadata> = emptyList(), val emojiTags: List<List<String>> = emptyList(), val extensionTags: List<List<String>> = emptyList())

Complete canonical kind-14 writer input.

Link copied to clipboard
sealed interface ChatRelation

Canonical message relation.

Link copied to clipboard
data class Contact(val publicKey: NostrPublicKey, val relayHint: String = "", val localName: String = "")

One private contact-backup entry.

Link copied to clipboard
data class Deletion(val rumor: NostrRumor, val eventIds: List<NostrEventId>, val reason: String)

Typed authorized deletion request.

Link copied to clipboard
data class Edit(val rumor: NostrRumor, val originalEventId: NostrEventId, val participants: List<NostrPublicKey>, val content: String, val emojiTags: List<List<String>>, val compatibilityTags: List<List<String>>)

Typed text-and-emoji edit.

Link copied to clipboard
data class EncryptedMessage

An immutable language-owned encrypted message.

Link copied to clipboard

The encryption profile represented by EncryptedMessage.

Link copied to clipboard

Immutable fields passed to a host signer.

Link copied to clipboard
data class ExternalSignerCapabilities(val signEvents: Boolean, val nip44Encrypt: Boolean, val nip44Decrypt: Boolean)

Independently advertised capabilities of a host or hardware signer.

Link copied to clipboard
data class FollowList(val rumor: NostrRumor, val contacts: List<Contact>, val containedDuplicates: Boolean)

Parsed private author-copy follow list.

Link copied to clipboard
data class HttpAuthorizationPlan(val method: String, val url: String, val payloadSha256: String?, val authorizationHeader: String, val event: SignedNostrEvent, val allowAuthorizationOnRedirect: Boolean)

Signed NIP-98 plan; create a fresh plan after every redirect.

Link copied to clipboard
class NegentropyClient(items: List<NegentropyItem>, frameSizeLimit: ULong) : AutoCloseable

Bounded stateful NIP-77 client.

Link copied to clipboard
data class NegentropyItem(val createdAt: Long, val eventId: NostrEventId)

One item in a local NIP-77 set.

Link copied to clipboard
data class NegentropyStep(val outgoing: ByteArray?, val haveEventIds: List<NostrEventId>, val needEventIds: List<NostrEventId>, val complete: Boolean)

One stateful NIP-77 client result.

Link copied to clipboard

A bounded, encoded NIP-44 payload with redacted diagnostics.

Link copied to clipboard
class NoiseClientHandshake(relayStaticPublicKey: ByteArray, requestChunking: Boolean = true) : AutoCloseable

Single-use exact deployed Noise NK handshake.

Link copied to clipboard

Serialized authenticated Noise transport; native code owns the WebSocket.

Link copied to clipboard
data class Reaction(val rumor: NostrRumor, val eventId: NostrEventId, val eventAuthors: List<NostrPublicKey>, val eventKind: NostrEventKind, val value: String, val customEmojiUrl: String?)

Typed reaction.

Link copied to clipboard

Serialized relay protocol state machine; native code owns socket lifecycle.

Link copied to clipboard
data class RelaySessionAction(val kind: RelaySessionAction.Kind, val frame: String, val value: String, val event: SignedNostrEvent?, val delayMillis: ULong)

Platform action emitted by the pure relay session.

Link copied to clipboard
data class RelaySessionSnapshot(val state: RelaySessionSnapshot.State, val subscriptions: List<String>, val readySubscriptions: List<String>, val deliveryEventIds: List<NostrEventId>, val pendingIngestionIds: List<NostrEventId>, val reconnectAttempt: UInt)

Redacted state snapshot for host diagnostics and restoration policy.

Link copied to clipboard
object Softchat

Metadata for the loaded Softchat artifact.

Link copied to clipboard
data class SoftchatBuildFingerprint(val version: String, val revision: String, val protocolProfile: Int, val targetArchitecture: String, val targetOperatingSystem: String)

Stable, redacted build metadata safe for logs and crash reports.

Link copied to clipboard
data class SoftchatDiagnosticsSnapshot(val nip44Encryptions: ULong, val nip44Decryptions: ULong, val verifiedEvents: ULong, val signedEvents: ULong, val wrappedEnvelopes: ULong, val unwrappedEnvelopes: ULong, val rejectedOperations: ULong, val inputBytes: ULong, val outputBytes: ULong)

Monotonic process-local counters containing no keys or protocol contents.

Link copied to clipboard

Stable machine-readable Softchat failures.

Link copied to clipboard

Rust-validated typed readers for binding-owned rumors.

Link copied to clipboard

Safe, stable failures from the public Kotlin API.

Link copied to clipboard

A local Nostr identity backed by Rust-owned secret material.

Link copied to clipboard
data class Subject(val rumor: NostrRumor, val participants: List<NostrPublicKey>, val text: String, val iconUrl: String?, val iconDimensions: String?, val emojiTags: List<List<String>>, val extensionTags: List<List<String>>)

Typed group-subject update.

Link copied to clipboard
data class SubjectDraft(val createdAt: Long, val participants: List<NostrPublicKey>, val subject: String, val emojiTags: List<List<String>> = emptyList(), val icon: AttachmentMetadata? = null, val extensionTags: List<List<String>> = emptyList())

Canonical group-subject writer input.

Link copied to clipboard
data class Typing(val rumor: NostrRumor, val participants: List<NostrPublicKey>)

Typed ephemeral typing notification.

Link copied to clipboard
data class UserMetadata(val rumor: NostrRumor, val name: String?, val displayName: String?, val about: String?, val picture: String?, val website: String?, val banner: String?, val bot: Boolean?, val unknownJson: String)

Parsed private metadata.

Link copied to clipboard
data class UserMetadataDraft(val createdAt: Long, val name: String? = null, val displayName: String? = null, val about: String? = null, val picture: String? = null, val website: String? = null, val banner: String? = null, val bot: Boolean? = null, val unknownJson: String = "{}")

Private user-metadata writer fields with retained unknown JSON.

Functions

Link copied to clipboard

Create directly signed and self-encrypted kind-30079 data.

Link copied to clipboard

Create one directly signed generic NIP-78 value.

Link copied to clipboard

Create a complete canonical message through the retained identity.

Link copied to clipboard
fun SoftchatIdentity.createDeletion(participants: List<NostrPublicKey>, eventIds: List<NostrEventId>, reason: String = "", createdAt: Long): Deletion

Create a canonical private deletion request.

Link copied to clipboard
fun SoftchatIdentity.createEdit(participants: List<NostrPublicKey>, originalEventId: NostrEventId, content: String, emojiTags: List<List<String>> = emptyList(), createdAt: Long): Edit

Create a canonical text-and-emoji edit.

Link copied to clipboard

Create one canonical private author-copy contact list.

Link copied to clipboard

Create a NIP-42 authentication event bound to one relay challenge.

Link copied to clipboard

Create a NIP-98 authorization plan bound to one exact HTTP request.

Link copied to clipboard
fun SoftchatIdentity.createReaction(participants: List<NostrPublicKey>, parentId: NostrEventId, parentAuthor: NostrPublicKey, parentKind: NostrEventKind, reaction: String, customEmojiUrl: String? = null, createdAt: Long): Reaction

Create a canonical private reaction.

Link copied to clipboard

Create a canonical group-subject update.

Link copied to clipboard
fun SoftchatIdentity.createTyping(participants: List<NostrPublicKey>, createdAt: Long): Typing

Create an ephemeral typing notification.

Link copied to clipboard

Create canonical private kind-0 user metadata.

Link copied to clipboard

Authenticate and decrypt one self-authored kind-30079 event.