What is KRNL Platform?
Last updated
Was this helpful?
Last updated
Was this helpful?
In short, KRNL Platform is a dApp which connects to the registries so that users can register more easily. It helps users to be able to simply connect their wallets using interactive interfaces, browsing kernels, and clicking around.
From the figure above, this is how KRNL Platform works in a nut shell. It is a dApp that can call registry smart contracts from each category.
First example would be when Tom and Jerry, on-chain kernel provider and off-chain kernel provider respectively, try to register on KRNL Platform. The metadata like OpenAPI Specifications, function return types, and more will be registered on Kernel Registry smart contract.
The next example is when Bob who is a smart contract developer has already deployed his Token Authority and his minting ABCcoin smart contract. He can register his smart contract on KRNL Platform, then his smart contract details will be registered on Smart Contract Registry smart contract.
Another case is as expected, dApp developer like Alice can register on KRNL Platform. Similar to the above examples, metadata from her dApp registration is stored on dApp Registry smart contract.
On the current stage, we have all the registries on Sepolia network.
The addresses of registry contracts can be found on the bottom-left corner of our KRNL Platform.
The reason why we are using registry smart contracts with kOS is because we aim for the goal of decentralized platform where users can register their kernels, smart contracts, or dApp on the on-chain smart contracts.
It also leads to the architecture of kOS where KRNL node can use the metadata from calling the registry smart contracts. Read more on the following section for more details.
On the right side, we can see that the diagram looks similar to what you probably have seen on How Does kOS work? page. It shows that when user submit the executeKernels(...) request to KRNL node, the node will fetch the metadata from registry smart contracts.
In simple terms, we can say on a high-level that the following steps will occur:
The node receives entry ID from KRNL SDK
KRNL node will get information of that entry ID from dApp Registry
The fetched information from no.2 contains smart contract ID
Comparing the smart contract ID in Smart Contract Registry will give out the kernel ID(s)
At this point, the node will know the details of kernel(s) from kernel ID(s)
It is important to note here that, this process of KRNL node fetching metadata from registries could be considered as step 1.5 from How Does kOS work? page.