Gathering detailed insights and metrics for w3name
Gathering detailed insights and metrics for w3name
Gathering detailed insights and metrics for w3name
Gathering detailed insights and metrics for w3name
@tinyverse.space/web3storage
Tinyverse web3storage JavaScript API client
dearwebthree
A CLI tool to deploy web apps and save captured webpage to IPFS & Filecoin using web3.storage and Moralis
@tinyverse.space/web3messager
Tinyverse upser auth JavaScript sdk
@tinyverse.space/user-auth
Tinyverse upser auth JavaScript sdk
IPNS client and service for generating, updating, and tracking immutable names with signed updates
npm install w3name
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
45 Stars
138 Commits
12 Forks
4 Watching
35 Branches
13 Contributors
Updated on 23 Aug 2024
TypeScript (88.76%)
JavaScript (9.26%)
Shell (1.98%)
Cumulative downloads
Total Downloads
Last day
-6.3%
463
Compared to previous day
Last week
-10.3%
2,845
Compared to previous week
Last month
12.2%
14,932
Compared to previous month
Last year
-50.7%
197,392
Compared to previous year
Content addressing for a dynamic web.
w3name is a service and client library that implements IPNS, which is a protocol that uses public key cryptography to allow for updatable naming in an atomically verifiable way.
Naming is famously one of the few hard problems in computer science, the exact number of which vary depending on the computer scientist you're speaking with and their predisposition to off-by-one errors.
Naming can be especially difficult in distributed and decentralized systems, where you can't assume that everyone has the same view of the network, and there may not be any centralized "naming authorities" to resolve conflicts.
IPNS works by using public key cryptography to allow "self-issued" names which don't require any coodination or central authorities. The caveat is that the definition of "name" is somewhat constrained compared to general-purpose key/value storage systems.
A "name" in the IPNS context is an identifier for a public key, or in some cases, an encoding of the public key itself.
To associate a value with the name, the holder of the corresponding private key creates a record containing the value and signs it with their private key. They then publish that record to an IPNS name service, such as the IPFS DHT or the w3name service.
Anyone can query the service using the name and retrive the latest value, including everything needed to verify that the value was signed by the correct key and has not been altered since publication.
The w3name
JavaScript client library provides a simple interface to the service API, as well as everything you need to create signing keys and records.
The snippet below shows how to create an new w3name key with Name.create()
, add a revision with Name.v0({name}, {CID})
and publish the revision with Name.publish({revision}, {key})
To use the library in your project, use npm or yarn to install the w3name
module.
node.js
1import * as Name from 'w3name' 2 3const name = await Name.create() 4 5const value = '/ipfs/bafkreiem4twkqzsq2aj4shbycd4yvoj2cx72vezicletlhi7dijjciqpui' 6const revision = await Name.v0(name, value) 7 8await Name.publish(revision, name.key)
See https://github.com/web3-storage/w3name/blob/main/packages/client/README.md for a guide to using the js client for the first time.
Full API reference doc for the JS client are available at https://web3-storage.github.io/w3name
You can also find a how-to guide for working with the JS client included in the Web3.Storage documentation.
There is a rate limit of 30 requests per 10 seconds per IP.
You can easily get the current value for any name by sending an HTTP request to https://name.web3.storage/name/:key
, where :key
is the name string. This will return a JSON object with the following shape:
1{ 2 "value": "the current value, as a string", 3 "record": "the full IPNS record for the current value, encoded to a binary form and base64pad encoded" 4}
Try pasting this into a terminal with curl
installed:
1curl https://name.web3.storage/name/k51qzi5uqu5dlcuzv5xhg1zqn48gobcvn2mx13uoig7zfj8rz6zvqdxsugka9z
You should see output similar to this:
1{ 2 "value": "/ipfs/bafkreigbpn5osrexvl56ogyp5kivof2tmknkssk5odebqqeu23a22bcntu", 3 "record": "long base64 string, omitted for brevity..." 4}
There is a rate limit of 30 requests per 10 seconds per IP.
See https://github.com/web3-storage/w3name/tree/main/packages/api for documentation on other available API endpoints 📖🔍
Want to help us improve w3name? Great! This project uses node v16 and npm v7. It's a monorepo that use npm workspaces to handle resolving dependencies between the local packages/*
folders.
Install the deps with npm
1# install deps 2npm install
Run all the things with npm start
.
1# start the api 2npm start
This project is a monorepo that uses npm workspaces.
All npm
commands should be run from the root of the repo. To run a command for a specific package add the --workspace
or -w
flag
1# Start just the api 2npm run dev -w packages/api
To add a new workspace (aka package) to the monorepo
1# adds the path to the `website` package to the `workspaces` property in package.json 2npm init -w packages/website
To run an npm script in one or more workspaces
1# run test commmand in package `a` and `b` 2npm run test --workspace=packages/a --workspace=packages/b
Each workspace has its own suite of testing tools, which you can learn more about in the relevant packages/*
directory.
To learn more about the w3name service, or find detailed documentation for the JS client library and API, please head over to Web3.Storage documentation.
No vulnerabilities found.
No security vulnerabilities found.