New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@noisekit/ipns-deploy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noisekit/ipns-deploy

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

ipns-deploy

ipns-deploy is a command-line utility for publishing IPFS content identifiers (CIDs) to IPNS keys. It is designed to work in conjunction with ipfs-deploy, which uploads files and returns the corresponding CID.

By using ipns-deploy together with ipfs-deploy, you can publish your uploaded files' CID to an IPNS key, making it easier to manage and share your content on IPFS.

Install

npm install -g @noisekit/ipns-deploy

ENV

Configure the environment variables with your IPFS cluster credentials and settings.

IPFS_HOST=ipfs.synthetix.io
IPFS_PORT=443
IPFS_PROTOCOL=https
IPFS_USER=
IPFS_PASS=

CLI

Usage and examples

# Publish a CID to an IPNS key
# Usage: ipns-deploy KEY CID

# Example: Publish the CID obtained from ipfs-deploy to the 'staking.synthetix.eth' IPNS key
ipns-deploy "staking.synthetix.eth" QmAbCdEf1234567890

# Publish a CID obtained from an `ipfs-deploy` execution to the 'staking.synthetix.eth' IPNS key
export IPFS_CID=$(ipfs-deploy ./public)
ipns-deploy "staking.synthetix.eth" "$IPFS_CID"

# DEBUG mode to view additional information
DEBUG=ipns-deploy ipns-deploy "staking.synthetix.eth" QmXyZaBc1234567890

IPNS Keys management

If the IPNS key was not added to the IPFS server it needs to be added first.

NOTE: This needs to be executed on the remote IPFS Cluster server

  1. Generate PEM PKCS8 key

    openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out staking.synthetix.eth -outform PEM
    
  2. Import the key

    ipfs key import staking.synthetix.eth --format=pem-pkcs8-cleartext staking.synthetix.eth
    
    # This returns the key ID (IPNS name)
    # k2k4r8jvf8qlg4ytq7y3ta749vkjzms0hisd9i92ohk0lsp0yestbhy3
    
  3. Check all the keys added

    ipfs key list
    
  4. Check the IPNS URL can be resolved

    curl http://k2k4r8jvf8qlg4ytq7y3ta749vkjzms0hisd9i92ohk0lsp0yestbhy3.ipns.localhost:8080/
    

FAQs

Package last updated on 05 May 2023

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