Class KIP13


  • public class KIP13
    extends Contract
    The KIP13 class allows you to easily check whether a Smart contract implements the KIP-13 standard. It provides the ability to query whether an interface id is implemented.
    • Constructor Detail

      • KIP13

        public KIP13​(Caver caver,
                     java.lang.String contractAddress)
              throws java.io.IOException
        Creates a KIP13 instance.
        Parameters:
        caver - A Caver instance.
        contractAddress - A contract address.
        Throws:
        java.io.IOException
    • Method Detail

      • sendQuery

        public boolean sendQuery​(java.lang.String interfaceId)
        Sends query to check whether interface is supported or not.

        If you want to execute this method alone, it recommended to execute isImplementedKIP13Interface() before.

        Example :
         
         String interfaceId = "0x{interface id}";
         boolean isImplemented = kip13.sendQuery(interfaceId);
         
         
        Parameters:
        interfaceId - The interface id to check.
        Returns:
        boolean
      • isImplementedKIP13Interface

        public boolean isImplementedKIP13Interface()
        Checks if the contract implements KIP-13.

        Example :
         
         boolean isImplemented = kip13.isImplementedKIP13Interface();
         
         
        Returns:
        boolean