Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ataraxia-hyperswarm

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ataraxia-hyperswarm

Hyperswarm transport for Ataraxia P2P messaging

  • 0.12.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ataraxia-hyperswarm

npm version Dependencies Typedoc

Hyperswarm transport for Ataraxia. This transport discovers and connects to peers using a specific topic via the public Internet using Hyperswarm.

Installation

npm install ataraxia-hyperswarm

Usage

Create a transport that will connect to and discover peers based on a specific topic:

import { Network, AnonymousAuth } from 'ataraxia';
import { HyperswarmTransport } from 'ataraxia-hyperswarm';

// Setup a network over Hyperswarm
const net = new Network({
  name: 'name-of-your-app-or-network',

  transports: [

    new HyperswarmTransport({
      // Topic used to find peers
      topic: 'Unique Topic',

      // Setup anonymous authentication
      authentication: [
        new AnonymousAuth()
      ]
    })

  ]
});

// Join the network
await net.join();

API

  • new HyperswarmTransport(options)

    Create a new instance of this transport.

    • options
      • topic: string, topic used to discover peers. The transport will attempt to connect to other peers using the same topic so making it unique to your app or use case is important.
      • authentication: AuthProvider[], providers to use for authentication of found peers.

FAQs

Package last updated on 18 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc