@softcose/softchat - v0.1.0
    Preparing search index...

    Class SoftchatIdentity

    A local identity held by one WebAssembly instance.

    Import synchronously copies the supplied bytes into Wasm. Callers should clear their own Uint8Array after import. Keep the identity in an ordinary const; an internal finalizer reclaims the Wasm allocation.

    erase() is an optional security action for logout or early key removal. It is deterministic and idempotent; later operations fail with identity_erased.

    Index
    • Create one directly signed generic NIP-78 value.

      Parameters

      • createdAt: number
      • identifier: string
      • content: string

      Returns ApplicationData

    • Create one canonical private author-copy contact list.

      Parameters

      • createdAt: number
      • contacts: readonly Readonly<
            { localName?: string; publicKey: NostrPublicKey; relayHint?: string },
        >[]

      Returns FollowList

    • Create one signed challenge-bound NIP-42 AUTH event.

      Parameters

      • challenge: string
      • relayUrl: string
      • createdAt: number

      Returns SignedNostrEvent

    • Create one immutable NIP-98 authorization plan.

      Parameters

      • method: string
      • url: string
      • payload: Uint8Array<ArrayBufferLike> | undefined
      • createdAt: number

      Returns HttpAuthorizationPlan

    • Irreversibly erase native secret state and release the Wasm handle.

      Returns void

    • Return a description that never includes secret key material.

      Returns string