To fulfill their functions as a user interface DeBots must be able to facilitate a number of interactions between the user, the user’s device and the target smart contract on the blockchain:
- receive input from users;
- query info about other smart contracts;
- query transactions and messages;
- receive data from external subsystems (like file system) and external devices (like NFC, camera and so on);
- call external function libraries that allow to do operations that are not supported by VM. For example, work with json, convert numbers to string and vice versa, encrypt/decrypt/sign data.
These needs are covered in various DeBot Interfaces (DInterfaces) which can be used in DeBots and which must be supported in DeBot Browsers.
To use an interface DeBot should import source file with DInterface declaration and call its methods as any other smart contract methods in TON – by sending internal messages to interface address, which is unique and explicitly defined for every interface.
Every DInterface must be discussed and accepted by DeBot Interface Specifications (DIS) Consortium before it can be used in DeBots. All accepted interfaces are published in the repo: