Decent Documentation
  • Welcome to the DecentSDK
  • Core Modules
    • DCNTSDK
  • NFT Release & Utility Mechanisms
    • Edition
    • ZKEdition
    • Rentable
    • Crescendo
    • Vault
    • Staking
    • VaultBackedNFT
  • Marketplace Modules
    • RentalMarket
  • Infrastructure Modules
    • Registry
    • MetadataRenderer
    • IPFS
Powered by GitBook
On this page
  • Getting Started
  • Module Methods
  • createMetadata
  1. Infrastructure Modules

IPFS

PreviousMetadataRenderer

Last updated 2 years ago

This module simplifies the process of uploading files and metadata to IPFS, allowing you to generate IPFS URLs for media files such as images, audio, and video, as well as metadata json files.

If you are utilizing on-chain metadata, the media file URLs can be passed directly as initialization data to the deploy methods of , , , as well as the function on .

*Note: This module is a lightweight wrapper utilzing the JavaScript client library.

Getting Started

To begin we'll import the IPFS module.

// Import the IPFS module
import { ipfs } from "@decent.xyz/sdk";

Module Methods

Create an IPFS URL for media files, metadata json files, optionally in a single operation.

createMetadata

Create an IPFS URL for media files, metadata json files, optionally in a single operation.

const ipfs = ipfs.createMetadata(metadata);

metadata (any) A media file, or an object containing both media files and metadata.

*Note: For further details refer to the method of the JavaScript client library.

Edition
Rentable
Crescendo
MetadataRenderer
nft.storage
store
nft.storage
Getting Started
Module Methods
createMetadata
bulkUpdate