Stores a single Blob (or File) with NFT.Storage, without wrapping in a directory listing. If a File is provided, any filenames will be ignored and will not be preserved on IPFS.
a Blob or File object to store
CID string for the stored content
Stores a Content Archive (CAR) containing content addressed data.
the root CID of the CAR.
a CarReader that supplies CAR data. Must have a single root CID that matches the cid
param.
options to pass through to NFTStorage.storeCar
a Promise that resolves to the uploaded CID, as a CIDv1 string.
Stores one or more files with NFT.Storage, bundling them into an IPFS directory.
If the files
contain directory paths in their name
s, they MUST all share the same
parent directory. E.g. 'foo/hello.txt' and 'foo/thing.json' is fine,
but 'foo/hello.txt' and 'bar/thing.json' will fail.
an iterable of File objects to be uploaded
CID string of the IPFS directory containing all uploaded files.
Loads an NFT from disk and stores it with NFT.Storage. Node.js only!
Uses loadNFTFromFilesystem to load NFT data and stores with storePreparedNFT.
path to metadata.json file
optional path to image file. If not provided, the image will be located using the heuristics described in loadNFTFromFilesystem.
the hostname of an IPFS HTTP gateway to use in metadata links. Defaults to "nftstorage.link" if not set.
options to pass through to NFTStorage.storeCar
if true, validate the metadata against a JSON schema before processing. off by default
a StoreNFTResult object containing the CIDs and URLs for the stored NFT
Stores a PackagedNFT object with NFT.Storage.
Uploads the CARs contained in the PackagedNFT object and returns an object containing the root CID of each CAR and URLs to the uploaded NFT metadata.
See prepareMetaplexNFT for creating PackagedNFT instances from File objects, or loadNFTFromFilesystem for loading from disk (node.js only).
a PackagedNFT object containing NFT assets and metadata
options to pass through to NFTStorage.storeCar
a StoreNFTResult object containing the CIDs and URLs for the stored NFT
Stores a single Blob (or File) with NFT.Storage, without wrapping in a directory listing. If a File is provided, any filenames will be ignored and will not be preserved on IPFS.
information required to authenticate uploads
a Blob or File object to store
CID string for the stored content
Stores a Content Archive (CAR) containing content addressed data.
information required to authenticate uploads
the root CID of the CAR.
a CarReader that supplies CAR data. Must have a single root CID that matches the cid
param.
options to pass through to NFTStorage.storeCar
a Promise that resolves to the uploaded CID, as a CIDv1 string.
Stores one or more files with NFT.Storage, bundling them into an IPFS directory.
If the files
contain directory paths in their name
s, they MUST all share the same
parent directory. E.g. 'foo/hello.txt' and 'foo/thing.json' is fine,
but 'foo/hello.txt' and 'bar/thing.json' will fail.
information required to authenticate uploads
an iterable of File objects to be uploaded
CID string of the IPFS directory containing all uploaded files.
Loads an NFT from disk and stores it with NFT.Storage. Node.js only!
Uses loadNFTFromFilesystem to load NFT data and stores with storePreparedNFT.
information required to authenticate uploads
path to metadata.json file
optional path to image file. If not provided, the image will be located using the heuristics described in loadNFTFromFilesystem.
the hostname of an IPFS HTTP gateway to use in metadata links. Defaults to "nftstorage.link" if not set.
options to pass through to NFTStorage.storeCar
if true, validate the metadata against a JSON schema before processing. off by default
a StoreNFTResult object containing the CIDs and URLs for the stored NFT
Stores a PackagedNFT object with NFT.Storage.
Uploads the CARs contained in the PackagedNFT object and returns an object containing the root CID of each CAR and URLs to the uploaded NFT metadata.
See prepareMetaplexNFT for creating PackagedNFT instances from File objects, or loadNFTFromFilesystem for loading from disk (node.js only).
information required to authenticate uploads
a PackagedNFT object containing NFT assets and metadata
options to pass through to NFTStorage.storeCar
a StoreNFTResult object containing the CIDs and URLs for the stored NFT
Creates a new instance of NFTStorageMetaplexor using the given secret signing key.
an Ed25519 private key
an optional version of the mintingAgent
. See TagMintingAgentVersion for details.
the URL of the NFT.Storage API. defaults to 'https://api.nft.storage' if not provided.
the "user agent" or tool used to prepare the upload. See TagMintingAgent for details.
the Solana cluster that the uploaded NFTs are to be minted on. defaults to 'devnet' if not provided.
Creates a new instance of NFTStorageMetaplexor using the given Signer
, which is a function that accepts a
Uint8Array
to be signed and returns a Promise<Uint8Array>
containing the signature. The Signer
type is
compatible with the signMessage
method of
Solana wallet adapters that support signing arbitrary
messages.
a function that asynchronously returns a signature of an input message
the public key that can validate signatures produced by the signer
an optional version of the mintingAgent
. See TagMintingAgentVersion for details.
the URL of the NFT.Storage API. defaults to 'https://api.nft.storage' if not provided.
the "user agent" or tool used to prepare the upload. See TagMintingAgent for details.
the Solana cluster that the uploaded NFTs are to be minted on. defaults to 'devnet' if not provided.
Generated using TypeDoc
A bespoke client for NFT.Storage that uses Solana private keys to authenticate uploads of NFT assets and metadata for Metaplex NFT creators.
This client uses a metaplex-specific endpoint (https://api.nft.storage/metaplex/upload) that requires a request-specific JWT token. See SPEC.md in this repo for more details.