Kwil features an extensions system that enables developers to run arbitrary applications alongside their database. This allows developers to build business logic, access control, and value accrual mechanisms directly into their decentralized database.
Extensions are currently in alpha, and are subject to change. We are actively looking for feedback on the extensions system.
To get started using extensions, check out one of the following resources:
- Step-by-step on building and running extensions
- Calling extensions in Kuneiform
What are extensions for?
Extensions were designed to allow developers to utilize arbitrary logic in their databases. Unlike traditional databases, there is often a need to directly couple certain logic to data when using a decentralized database (e.g. token gating). Due to the nature of decentralized networks, it is often difficult to enforce these restrictions at a separate layer. With extensions, developers are able to directly tie their logic and data, deploying them as one single protocol.
Token Gating - Developers can token gate access to federated Kwil databases using extensions. This can be done by building an extension to read data from another blockchain before a SELECT statement is processed.
Access Control - Developers can build access control measures that utilize external systems to authenticate users. This can be done by building an extension that reads data from an external system before some action is performed.
Stateless Functions - Developers can build stateless functions that can be called from within a Kwil database. This can be done by building an extension containing the desired functionality, and calling that from within a Kwil database.