Skip to main content

IStorage.uploadMetadata() method

Uploads JSON metadata to IPFS

Signature:

uploadMetadata(metadata: JsonObject, contractAddress?: string, signerAddress?: string, options?: {
onProgress: (event: UploadProgressEvent) => void;
}): Promise<string>;

Parameters

ParameterTypeDescription
metadataJsonObjectThe metadata to be uploaded.
contractAddressstring(Optional) Optional. The contract address the data belongs to.
signerAddressstring(Optional) Optional. The address of the signer.
options{ onProgress: (event: UploadProgressEvent) => void; }(Optional) Optional. Upload progress callback.

Returns:

Promise<string>