Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

How to Upload NFTs to DID Spaces Using the SDK

DID Spaces

Overview#

If you need to develop NFT Studio and want to upload NFT customizations to DID Spaces, you can call NFT Blender via the SDK.

Here's how to use /api/sdk/upload-to-did-spaces


How To Use#

  1. Mounting NFT Blender as a component, related information
    Of course, mounting NFT Maker also works: NFT Maker mounts NFT Blender
  2. For local development of top-level applications, you may need to fill in the Endpoint for DID Spaces, which can be added in the .env.development fileAPP_SPACE_ENDPOINT=https://<your-did-spaces-endpoint>
  3. In Top-Level Applications Mapping to the NFT Blender SDKconst component = require('@blocklet/sdk/lib/component');

    // ----------------- NFT Blender SDK -----------------

    const { data } = await component.call({
    name: 'nft-blender',
    path: '/api/sdk/upload-to-did-spaces',
    data: {
    fileName: '', // NFT Filename
    filePath: '', // NFT Filepath
    assetId: '', // NFT Address
    },
    });

    // ----------------- NFT Blender SDK -----------------
  4. Complete the logic of the top-level application and trigger the code to upload the NFT to DID Spaces
  5. You can check if the upload was successful by going to DID Spaces


Parameter Description#

Parameter Name

Required

Default / Enum

Tips

fileName

undefined

NFT display filename

filePath

undefined

NFT filepath

assetId

undefined

NFT address

你获得 0 积分