Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.58 KB

README.md

File metadata and controls

62 lines (40 loc) · 1.58 KB

@chainsafe/libp2p-quic

libp2p.io CI

A QUIC transport for libp2p

About

A libp2p transport based on the QUIC networking stack.

Example

import { createLibp2p } from 'libp2p'
import { quic } from '@chainsafe/libp2p-quic'
import { multiaddr } from '@multiformats/multiaddr'

const node = await createLibp2p({
  transports: [
    quic()
  ]
})

const ma = multiaddr('/ip4/123.123.123.123/udp/1234/quic-v1')

// dial a TCP connection, timing out after 10 seconds
const connection = await node.dial(ma, {
  signal: AbortSignal.timeout(10_000)
})

// use connection...

Install

$ npm i @chainsafe/libp2p-quic

API Docs

License

MIT (LICENSE / http://opensource.org/licenses/MIT)