KRNL Platform Guidebook
KRNL Platformkrnl.xyz
  • Introduction
    • Introduction
    • How Does kOS Work?
  • Setup
    • Getting Started with KRNL
    • Quick Start (CLI)
    • Quick Start (Online IDE)
      • Quick Start (Remix IDE)
      • Quick Start (Atlas IDE)
    • create-krnl-app
    • Platform Registration
  • Kernel
    • What are Kernels?
    • Kernel Registration
      • Kernel Registration (on-chain)
      • Kernel Registration (off-chain)
    • Supported OpenAPI (Off-chain Kernel)
    • Staking
  • Smart Contract
    • Steps for Smart Contract Developers
    • Choosing Kernel(s)
    • Token Authority
      • What is a Token Authority?
      • How to Build a Token Authority?
      • Generic Token Authority
      • How to Deploy a Token Authority on Oasis?
    • Decoding Kernel Responses in Solidity
    • How to Integrate Your Smart Contract with kOS?
    • Smart Contract Registration
  • DApp
    • dApp Registration
    • KRNL SDK Installation
    • Usage
    • KRNL Node RPC
  • Miscellaneous
    • Overview
    • What is the KRNL Platform?
    • What are You Trying to BUIDL?
    • Smart Contract Fundamentals
      • Why Do I Have to Register a Smart Contract?
      • How to Deploy a Smart Contract?
    • Recommended Kernels List
  • Helpful Resources
    • New to Web3?
    • Dictionary
    • Testnet Faucets
    • How to Get Etherscan API Key?
  • Litepaper
    • Litepaper
      • Overview
      • Problem Statement
      • Current State Does Not Solve the Problem
      • Introducing Kernels
      • Ecosystem of Kernels
      • The KRNL Operating System (kOS)
      • Decentralization and Security Considerations
      • Use Cases for KRNL
  • Appendices
    • FAQ
    • Bounty Program
    • Social Medias
    • Thank You
  • Workshop
    • KRNL Workshop
    • Speed's Workshop
Powered by GitBook
On this page
  • On-chain Kernel
  • Off-chain Kernel
  • How to Register Kernels?

Was this helpful?

  1. Kernel

What are Kernels?

Kernels can be either on-chain view functions on smart contracts, or off-chain Web2 APIs

The KRNL Operating System, kOS, transforms any on-chain or off-chain function into execution shards, called kernels. Kernels are stateless, lightweight, resilient, and independently deployable, allowing them to reside on different chains, or entirely off-chain. This is akin to npm, where developers can access pre-built libraries and integrate them seamlessly.

This ensures:

  • Kernels are not confined to any specific infrastructure, instead, they can migrate across environments through the KRNL Protocol.

  • Application decomposition into discrete kernels, improving modularity and allowing permissionless sharing across multiple applications.

  • A reduction in time to market for builders by simplifying deployment and improving responsiveness.


On-chain Kernel

Any smart contract view function that is already deployed on a blockchain network can be registered as a kernel.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

contract OnChainKernelExample {
//...
    function getScore(address input) public view returns (uint256) {
        // logic here
    }
//...
}

Example: From the provided code above, the function of getScore(...) can be registered as on-chain kernel.


Off-chain Kernel

A single endpoint API is compatible with the GET or POST request method can be registered as an off-chain kernel.


How to Register Kernels?

In the following section, we will show you how to register your kernel.

If you are an on-chain service provider and wish to register your smart contract to be an on-chain kernel, select the on-chain portal.

On the other hand, if you are an off-chain service provider and wish to register your API as an off-chain kernel, select the off-chain portal.

PreviousPlatform RegistrationNextKernel Registration

Last updated 15 days ago

Was this helpful?

Cover

Kernel Registration

(on-chain)

Cover

Kernel Registration

(off-chain)