{"id":13482491,"url":"https://github.com/libp2p/js-libp2p-bootstrap","last_synced_at":"2025-03-27T13:31:57.702Z","repository":{"id":35397124,"uuid":"39661220","full_name":"libp2p/js-libp2p-bootstrap","owner":"libp2p","description":"Rail a libp2p node through a bootstrap peer list","archived":true,"fork":false,"pushed_at":"2023-10-03T14:47:18.000Z","size":1581,"stargazers_count":30,"open_issues_count":0,"forks_count":21,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-09-25T12:58:02.968Z","etag":null,"topics":["libp2p"],"latest_commit_sha":null,"homepage":"https://libp2p.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libp2p.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-24T22:30:49.000Z","updated_at":"2023-10-03T14:47:29.000Z","dependencies_parsed_at":"2023-10-03T21:59:18.542Z","dependency_job_id":null,"html_url":"https://github.com/libp2p/js-libp2p-bootstrap","commit_stats":{"total_commits":210,"total_committers":28,"mean_commits":7.5,"dds":0.7142857142857143,"last_synced_commit":"33a638112e88151f72119cae5c05bf9ab73f23dd"},"previous_names":["diasdavid/node-ipfs-railing","libp2p/js-libp2p-railing"],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fjs-libp2p-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fjs-libp2p-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fjs-libp2p-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fjs-libp2p-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libp2p","download_url":"https://codeload.github.com/libp2p/js-libp2p-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871975,"owners_count":16554475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libp2p"],"created_at":"2024-07-31T17:01:02.512Z","updated_at":"2024-10-30T16:31:08.887Z","avatar_url":"https://github.com/libp2p.png","language":"TypeScript","funding_links":[],"categories":["Modules","TypeScript"],"sub_categories":[],"readme":"# 📁 Archived - this module has been merged into [js-libp2p](https://github.com/libp2p/js-libp2p/tree/master/packages/peer-discovery-bootstrap)\n\n# @libp2p/bootstrap \u003c!-- omit in toc --\u003e\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-bootstrap)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-bootstrap/js-test-and-release.yml?branch=master\\\u0026style=flat-square)](https://github.com/libp2p/js-libp2p-bootstrap/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)\n\n\u003e Node.js IPFS Implementation of the railing process of a Node through a bootstrap peer list\n\n## Table of contents \u003c!-- omit in toc --\u003e\n\n- [Install](#install)\n  - [Browser `\u003cscript\u003e` tag](#browser-script-tag)\n- [Usage](#usage)\n- [API Docs](#api-docs)\n- [License](#license)\n- [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/bootstrap\n```\n\n### Browser `\u003cscript\u003e` tag\n\nLoading this module through a script tag will make it's exports available as `Libp2pBootstrap` in the global namespace.\n\n```html\n\u003cscript src=\"https://unpkg.com/@libp2p/bootstrap/dist/index.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nThe configured bootstrap peers will be discovered after the configured timeout. This will ensure\nthere are some peers in the peer store for the node to use to discover other peers.\n\nThey will be tagged with a tag with the name `'bootstrap'` tag, the value `50` and it will expire\nafter two minutes which means the nodes connections may be closed if the maximum number of\nconnections is reached.\n\nClients that need constant connections to bootstrap nodes (e.g. browsers) can set the TTL to `Infinity`.\n\n```JavaScript\nimport { createLibp2p } from 'libp2p'\nimport { bootstrap } from '@libp2p/bootstrap'\nimport { tcp } from 'libp2p/tcp'\nimport { noise } from '@libp2p/noise'\nimport { mplex } from '@libp2p/mplex'\n\nlet options = {\n  transports: [\n    tcp()\n  ],\n  streamMuxers: [\n    mplex()\n  ],\n  connectionEncryption: [\n    noise()\n  ],\n  peerDiscovery: [\n    bootstrap({\n      list: [ // a list of bootstrap peer multiaddrs to connect to on node startup\n        \"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ\",\n        \"/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN\",\n        \"/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa\"\n      ],\n      timeout: 1000, // in ms,\n      tagName: 'bootstrap',\n      tagValue: 50,\n      tagTTL: 120000 // in ms\n    })\n  ]\n}\n\nasync function start () {\n  let libp2p = await createLibp2p(options)\n\n  libp2p.on('peer:discovery', function (peerId) {\n    console.log('found peer: ', peerId.toB58String())\n  })\n\n  await libp2p.start()\n\n}\n\nstart()\n```\n\n## API Docs\n\n- \u003chttps://libp2p.github.io/js-libp2p-bootstrap\u003e\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / \u003chttp://opensource.org/licenses/MIT\u003e)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fjs-libp2p-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibp2p%2Fjs-libp2p-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fjs-libp2p-bootstrap/lists"}