Skip to content
File
loadCreatedDatatokenFiles

loadCreatedDatatokenFiles

Get a list of files which has been created as a data token.

Usage

await dataverseConnector.runOS({
  method: SYSTEM_CALL.loadCreatedDatatokenFiles,
});

Parameters

void

💡

This function automatically gets the current DID from the wallet and returns the files which has been created as a data token under this DID.

Returns

return a <fileId, content> map

{
  "kjzl6kcym7w8y8nftjplrm12dwy2uraluh6otswxporhmfukx1cythmnyfrimnf": {
    "content": {
      "text": "hello",
      "images": [
        "https://bafkreib76wz6wewtkfmp5rhm3ep6tf4xjixvzzyh64nbyge5yhjno24yl4.ipfs.w3s.link"
      ],
      "videos": [],
      "createdAt": "2023-11-02T06:26:10.909Z",
      "encrypted": "{\"text\":false,\"images\":false,\"videos\":false}",
      "updatedAt": "2023-11-02T06:27:29.121Z",
      "modelVersion": "0.0.1"
    },
    "fileId": "kjzl6kcym7w8y8nftjplrm12dwy2uraluh6otswxporhmfukx1cythmnyfrimnf",
    "controller": "did:pkh:eip155:1:0xb4D93398f6F3FB5EE4436D1aE93b32d65693a799",
    "fsVersion": "0.11",
    "contentId": "kjzl6kcym7w8yb6n5vq9fz4v1qs4yjaxh204pte2lcn3hclwil6q2cq0xbfxo15",
    "contentType": {
      "resource": "CERAMIC",
      "resourceId": "kjzl6hvfrbw6catek36h3pep09k9gymfnla9k6ojlgrmwjogvjqg8q3zpybl1yu"
    },
    "fileName": "create a file",
    "fileType": 2,
    "accessControl": {
      "encryptionProvider": {
        "protocol": "Lit",
        "encryptedSymmetricKey": "8dfbc36b93cbf92aea78deb1803e680a149119eb95a0b2a0778a156f4124d9aba1bc7cb9e3b90bfe793528ce54be9e11b0a966717c4de5bc23834e263590cd929fbf057ab4163d5333e6a94899155ca4e6ebd1680a243eafa69f623ef2f019805b511cecd8a17ef6f3ce7353d932ed3493794fe41a566c8befc1741f6a31a1c000000000000000206dba1130b64ea2e728af545e9f01df6cf5f4902642dc2fe7856dc7eb8ffba7cfab6ee30e3bec465143725e9a653304b0",
        "decryptionConditions": [
          ...
        ],
        "decryptionConditionsType": "UnifiedAccessControlCondition"
      },
      "monetizationProvider": {
        "protocol": "Profileless",
        "chainId": 80001,
        "datatokenId": "0x6293BA7114867Ee79751d36376B969168DFD01d2",
        "datatokenDetail": {
          "address": "0x6293BA7114867Ee79751d36376B969168DFD01d2",
          "collect_info": {
            "collect_nft_address": "0x6293BA7114867Ee79751d36376B969168DFD01d2",
            "sold_list": [
              {
                "owner": "0xb4D93398f6F3FB5EE4436D1aE93b32d65693a799",
                "token_id": "0"
              }
            ],
            "sold_num": "1",
            "total": "100",
            "price": {
              "amount": "0.0001",
              "currency": "WMATIC",
              "currency_addr": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
            }
          },
          "content_uri": "ipfs://bafkreihmexxlqm7fbhwcp6unahjr25hs465x7c4a6ugljx6gmvp2fl4joy",
          "owner": "0xb4D93398f6F3FB5EE4436D1aE93b32d65693a799",
          "source": "0x6431eBEfE13E87bde75585C6fd1ea5596161732f",
          "created_at": "2023-11-02 14:27:21.915329 +0800 CST"
        }
      }
    },
    "createdAt": "2023-11-02T06:26:15.166Z",
    "updatedAt": "2023-11-02T06:27:40.736Z",
    "fileKey": "4f744d4716610e29e43d3785659b6f029a2e09f5ea83b02349a1748e5ed328dc"
  },
  "kjzl6kcym7w8y8dhk0rihz71kvnrk3anvwafy10ef6pwf6v7bdunqrsthj0c3fb": {
    ...
  },
  ...
}