OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb / skills / blind-relay / api-extract.json

62 lines · json ref:
{
  "repo": "blind-relay",
  "timestamp": "2026-01-16T23:55:54.934Z",
  "entryPoint": "index.js",
  "exports": {
    "packageJson": {
      "main": "index.js"
    }
  },
  "api": {
    "file": "index.js",
    "exports": [],
    "classes": [
      {
        "name": "BlindRelayServer"
      },
      {
        "name": "BlindRelaySession"
      },
      {
        "name": "BlindRelayPair"
      },
      {
        "name": "BlindRelayLink"
      },
      {
        "name": "BlindRelayClient"
      },
      {
        "name": "BlindRelayRequest"
      }
    ],
    "functions": [
      {
        "name": "token"
      },
      {
        "name": "noop"
      }
    ]
  },
  "readme": {
    "content": "# blind-relay\n\nBlind relay for [UDX](https://github.com/holepunchto/udx-native) over [Protomux](https://github.com/mafintosh/protomux) channels. By acting as a blind relay, a host may accept pairing requests from other hosts and relay UDX stream messages between them, similar to Traversal Using Relays around NAT (TURN).\n\n```sh\nnpm i blind-relay\n```\n\n## Protocol\n\n```mermaid\nsequenceDiagram\n    actor a as peer a\n    actor r as relay\n    actor b as peer b\n\n    par\n        a ->> r: pair { isInitiator: true, token, id, seq }\n    and\n        b ->> r: pair { isInitiator: false, token, id, seq }\n    end\n\n    note over r: The relay pairs peers a and b based on the token, allocates a new stream for both peers, and sends back the stream info\n\n    par\n        r -->> a: pair { isInitiator: true, token, id, seq }\n    and\n        r -->> b: pair { isInitiator: false, token, id, seq }\n    end\n\n    par\n        a ->> r: unpair { token }\n\n        note left of r: The relay deallocates the stream previously",
    "sections": [
      "intro",
      "protocol",
      "license"
    ],
    "hasApi": false,
    "hasExamples": true,
    "exampleCount": 1,
    "examples": [
      "## Protocol"
    ]
  },
  "patterns": [
    "stream-multiplexing",
    "binary-encoding",
    "cryptography",
    "streaming"
  ]
}