Skip to main content

ImQuarkSubscriber

struct SellOrder {
// The order maker (the person selling the URI)
address payable seller;
// The "from" token contract address
address fromContractAddress;
// The token id whose entity URI will be sold
uint256 fromTokenId;
// The entity's id whose owner is selling the URI
uint256 entityId;
// The URI that will be sold
string slotUri;
// The price required for the URI
uint256 sellPrice;
// The salt used to generate the order hash
bytes salt;
}
struct BuyOrder {
// The order executer (the person buying the URI)
address buyer;
// The order maker (the person selling the URI)
address seller;
// The "from" token contract address
address fromContractAddress;
// The token id whose entity URI will be sold
uint256 fromTokenId;
// The "to" token contract address
address toContractAddress;
// The token id whose entity URI will be sold
uint256 toTokenId;
// The entity's id whose owner is selling the URI
uint256 entityId;
// The URI that will be bought
string slotUri;
// The price required for the URI
uint256 buyPrice;
// The salt used to generate the order hash
bytes salt;
}
  struct Collection {
// The ID of the entity associated with the collection.
uint256 entityId;
// The ID of the template.
uint256 templateId;
// Indicates if the collection is free.
bool free;
// Indicates if the collection is external.
bool isExternal;
// The address of the collection's contract.
address contractAddress;
}
  struct EntityConfig {
// The ID of the entity.
uint256 entityId;
// The subscription price for the entity.
uint256 subscriptionPrice;
// The address of the entity's signer.
address signer;
// The default URI for the entity's tokens.
string defaultURI;
// Indicates if the entity configuration is set.
bool set;
}
  function initializeEntity(
address contract_,
uint256 entityId,
address signer,
string calldata defaultURI,
uint256 price
) external;
  function setRegistryAddress(address registry) external;
  function setRoyalty(uint256 royalty) external;

  function setControllerAddress(address controller) external;

  function setImportedContractsAddress(address externalCollection) external;
  function setDefaultURI(uint256 entityId, string calldata defaultURI) external;

  function setSubscriptionPrice(uint256 entityId, uint256 price) external;
  function setSigner(uint256 entityId, address signer) external;
  function setCollection(
bool free,
bool external_,
uint256 entityId,
uint256 templateId,
address collectionAddress
) external;
  function subscribeToEntity(uint256 tokenId, address tokenContract, uint256 subscriptionId) external payable;

  function subscribeToEntities(
uint256 tokenId,
address tokenContract,
uint256[] calldata subscriptionIds
) external payable;
  function unlockToken(uint256 tokenId, address tokenContract) external payable;
  function transferTokenEntityURI(
SellOrder calldata seller,
BuyOrder calldata buyer,
bytes calldata sellerSignature,
bytes calldata buyerSignature
) external payable;
  function updateURISlot(bytes calldata signature, bytes calldata updateInfo) external;

  function getIsSubscribed(uint256 tokenId, address tokenContract, uint256 subscriptionId) external view returns (bool);

  function getEntityConfig(
uint256 entityId
)
external
view
returns (uint256 entityId_, uint256 subscriptionPrice, string memory defaultURI, bool uriSet, address signer);

  function getCollection(
address contractAddress
) external view returns (uint256 entityId, uint256 templateId, bool free, bool isExternal, address collectionAddress);

  function getIsUnlocked(uint256 tokenId, address tokenContract) external view returns (bool);

  function getEntityBalance(uint256 entityId) external view returns (uint256);

  function getIsAddressRegisteredAsEntity(address address_) external view returns (bool);


  function calculateBatchSubscriptionPrice(uint256[] calldata subscriptionIds) external view returns (uint256);

  function withdraw(uint256 entityId, uint256 amount) external;

  function withdrawProtocol(uint256 amount) external;