Publication

Content

  1. Publish content

  function post(string memory content) external;

The prepared tokenId and the transaction hash on Arweave for the content to be published will be used to generate a SBT, with the actual content stored on Arweave. The transaction hash on Arweave is stored on the bloclchain as the content.

Parameters:

  • content: The transaction hash on Arweave relating to the content. One can access the original content via this hash.

The content uploaded to Arweave is structured as follows:

{
  "content": {
    "body": "${The body of content}",
    "title": "${The title of content}"
  }
}
  1. Lookup published content

  function contentOf(uint256 tokenId) external view returns (string memory content);

Lookup published content using tokenId:

Parameters:

  • tokenId

Return value:

  • content: The transaction hash on Arweave relating to the content. One can access the original content via this hash.

PrivacyContent

  1. Prepare a tokenId

The user is preparing a tokenId.

Return value:

  • tokenId: The prepared tokenId

  1. Lookup the tokenId prepared.

Parameters:

  • owner: The address to be looked up

Return value:

  • tokenId: The prepared tokenId

  1. Publish privacy content

The prepared tokenId and the transaction hash on Arweave for the content to be published will be used to generate a SBT, with the actual privacy content and its permissions stored on Arweave. The transaction hash on Arweave is stored on the blockchain as the content.

Parameters:

  • tokenId: The tokenId prepared.

  • content: The transaction hash on Arweave relating to the privacy content and its permissions. The hash can be used to access the original content.

The content uploaded to Arweave is structured as follows:

  1. Viewer permission

To check if a given address has access to the privacy content related to a tokenId.

Parameters:

  • viewer: The view's address

  • tokenId

Return value:

  • isViewer: true--has viewer permission; false--do not have viewer permission

  1. Lookup published content

Lookup published content according to tokenId.

parameters:

  • tokenId

Return value:

  • content: The Arweave transaction value related to the published content. One can access the original content using this hash.

Last updated