Managing Names

IPNS (InterPlanetary Name System) is a naming system built on top of IPFS (InterPlanetary File System). It allows for mutable links in the otherwise immutable IPFS network. With IPNS, you can create a permanent address that can be updated to point to different IPFS CIDs (Content Identifiers) over time. This is particularly useful for content that changes frequently, such as websites, blogs, or any resource that may need to be updated regularly.

How Filebase Uses IPNS

Filebase Names leverages IPNS to provide users with a way to manage and update content dynamically on IPFS. By using IPNS with Filebase, you can create permanent names that can be updated to point to different IPFS CIDs as your content changes. This ensures that your users can always access the most up-to-date version of your content through a single, consistent address.

Filebase simplifies the management of IPNS names through an intuitive dashboard and powerful API, allowing you to seamlessly create, update, and remove IPNS names as needed.

Using the JavaScript SDK

Installation

First, you need to install the Filebase SDK. You can do this using npm:

npm install @filebase/sdk

Creating a Name

Once you have the SDK installed, you can use it to create an IPNS Name record. Here’s a simple example to get you started:

import { NameManager } from "@filebase/sdk";
const nameManager = new NameManager(S3_KEY, S3_SECRET);

const nameRecord = await nameManager.create(
  `create-name-example`,
  `QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm'
);

console.log(nameRecord);

API Reference

  • S3_KEY and S3_SECRET: Your Filebase API credentials.

  • nameManager.create(): Creates the IPNS Name record.

Last updated