Core functions
Router.sol
// mint price to register a hash (excluding optional file verification)
uint public MINT_PRICE;
// ether price to verify a file URL
uint public VERIFICATION_PRICE;
/**
* @notice Generates the tProof for one (or more) given hashes. Each tProof will be in the form of an NFT
* @dev All the arrays must have same length and same order: all elements in pos-0 must refer to same hash, etc
* @param _hash list of hashes to verify
* @param _title list of titles for NFTs. If empty, a shorter version of the hash is used when generating TokenURI
* @param _withFileURL true if a public file upload will follow, false otherwise. Prepays the certification call
* @param _storageType id of the storage used to store the file. See docs for list. If _withFileUrl is false, this param is ignored (Set it ot 0)
* @param _to Who will receive the NFT(s)
* @param _delegateTo If we want to delegate another address to call for the verifyHashFileUrl call. Useful for better UX. Set to 0x for empty
*/
function createProofs(
bytes32[] calldata _hash,
string[] calldata _title,
bool[] calldata _withFileURL,
uint16[] calldata _storageType,
address _to, address _delegateTo)
external payable
/**
* @notice Allows NFT owner to edit the title of a given NFT
* @dev You can pass an array of NFTs, with corresponding titles, to change more titles at the same time
* @param _nftNum IDs on NFTs to operate on
* @param _title list of titles to assign to NFTs
*/
function editProofTitle(
uint[] calldata _nftNum,
string[] calldata _title)
external
/**
* @notice Uploads an URL and triggers the verification of hash connected to the given file
* @param _nft List of nft
* @param _url list of URLs to verify. See docs to understand the format of it, based on _storageType
* @param _storageType The type of storage for each given URL. Needed to verify they match the paid one
* @param _mimeType optional mime type for the given file. 0 to set undefined
*/
function verifyHashFileUrl(
uint[] calldata _nft,
string[] calldata _url,
uint16[] calldata _storageType,
uint32[] calldata _mimeType)
external
/**
* @notice Extend the verification period for an hash. Can be used also to verify an hash after a simple mint.
If NFT is verified, this function sets it as not verified, thus the verification must re-run again.
* @param _nft List of nft
* @param _storageType The type of storage for each given NFT where it's plan to upload the file
*/
function extendVerification(
uint[] calldata _nft,
uint16[] calldata _storageType)
external payable
HashRegistry.sol
/**
* @notice returns the url connected to a given hash
* @param _nft the nft to get the url stored
* @param _version the version of the URL to return. See docs based on storageType for the given file. 0 for the essential storage data, 1 for the fullUrl version. Other values may be possible
* @return a string representing the url, in the format required
**/
function getUrlFromNFT(
uint _nft,
uint _version)
public view returns(string memory)
NFTFactory.sol
/**
* @notice Update the title of the NFT
* @dev Only owner of NFT can update the title of the NFT
* @param _nftNum id of NFT to update
* @param _title The new title (can also be empty)
**/
function updateTitle(
uint[] calldata _nftNum,
string[] calldata _title)
external
/**
* @notice Set the optional description
* @dev Only owner of NFT can update the description of the NFT
* @param _nftNum list of NFT to set description
* @param _description List of description to associate
**/
function setDescription(
uint[] calldata _nftNum,
string[] calldata _description)
external
NFTTokenUriGenerator.sol
/**
* @notice Generates the token URI
* @param _tokenId the id of the NFT
* @return a string representing the TokenUri
**/
function getTokenUri(
uint256 _tokenId)
external view returns (string memory)
HashRegistryStorageType_ArweaveV1.sol
/**
* @notice get the string representing the url
* @param _nft the nft connected to the url
* @param _version the version of the URL to return. See docs based on storageType for the given file. Generally 0 for the essential storage data, 1 for the fullUrl version. Other values may be possible
* @return a string representing the url, in the format required
**/
function getUrlString(
uint _nft,
uint _version)
external view returns (string memory)
Last updated