Skip to main content
Works with
JSR Score
76%
Published
2 months ago (0.1.2)

Mostr Signer

Nostr HTTP signer program used by mostr.pub.

Usage

MOSTR_SECRET="123..." deno run -A jsr:@soapbox/mostr-signer/server

GET /mostr/:apId

Get pubkey for the given ActivityPub ID.

{
  "pubkey": "fb8ef9f5ec3e4eeb0987ab2907d5480c341345401468a3d64ef06a539971b1ba",
  "relays": {
    "wss://relay.mostr.pub/": {
      "read": true,
      "write": true
    }
  }
}

POST /mostr/:apId

Sign an event. POST an event template in the request body to get a signed event in the response body.

{
  "kind": 1,
  "content": "hello world",
  "tags": [],
  "created_at": 0,
  "id": "fad39840bcb9eabd4501e7def10bdea25480f26d18cfa61671cdad2b748fdf87",
  "pubkey": "fb8ef9f5ec3e4eeb0987ab2907d5480c341345401468a3d64ef06a539971b1ba",
  "sig": "02cdd12975b4d9b7aebb9de50d9a6eec9b94b5d4a1041f55f0fcf08f59baa79ed74216cb24132cac7860bfef2544e4e29d3d30e1c5417d83e0e54b46a148fefd"
}

Add Package

deno add @soapbox/mostr-signer

Import symbol

import * as mod from "@soapbox/mostr-signer";

Add Package

npx jsr add @soapbox/mostr-signer

Import symbol

import * as mod from "@soapbox/mostr-signer";

Add Package

yarn dlx jsr add @soapbox/mostr-signer

Import symbol

import * as mod from "@soapbox/mostr-signer";

Add Package

pnpm dlx jsr add @soapbox/mostr-signer

Import symbol

import * as mod from "@soapbox/mostr-signer";

Add Package

bunx jsr add @soapbox/mostr-signer

Import symbol

import * as mod from "@soapbox/mostr-signer";