Kwil Concepts
Because Kwil database networks are sovereign blockchains, there are a few concepts that are unique or borrowed from other blockchain platforms. These concepts are transversal across Kwil (frontends, SDKs, Nodes, etc.).

Accounts
Accounts are public / private keypairs that represent a single user or entity on a Kwil Network. Accounts hold a balance of tokens, and are used to identify the sender of a transaction. Accounts can also be assigned privileges, allowing them to modify and interact with the database in different ways.
Unlike other blockchains, Kwil allows accounts with many different types of keypairs (e.g. Secp256k1, ED25519, etc). Because of this, accounts in Kwil are identified by a combination of:
- the accounts "native" identifier (e.g. an
0x
address for Ethereum keys, or a public key for validators). - a key type (e.g.
secp256k1
ored25519
).
For example, an end user with the Ethereum address 0x99659fdA2aF37FbD2c6abEf9Fb9161129F159E0f
would have a user identifier of:
0x99659fdA2aF37FbD2c6abEf9Fb9161129F159E0f
(the native identifier)secp256k1
(the key type)
Transactions
Transactions are messages that are signed by a private key and sent to the network. Transactions are the only way to change the state of the database, and therefore are used for operations like creating tables, inserting data, and calling actions. Transactions are executed deterministically on each node.
Actions
Actions are the primary way in which SQL Smart Contracts are defined. They are pre-defined functions that can be executed by end users. Since end users likely will not have permissions to execute arbitrary INSERT/UPDATE/DELETE statements against your database, they will need to execute pre-defined actions that you have created. Using actions, you can define the SQL statements and associated logic that end users can execute.
View Actions
View actions are the primary way of reading data from a database. View actions are called from a single node. They typically do not require a signature, however they may if the node is storing private data and requires a signature to access it.
The advantage of view actions is that they can be executed without the need to wait for consensus.
Kwil Network
A Kwil Network is a sovereign blockchain that manages a SQL database. Kwil Networks are composed of one or more Kwil Nodes.
Kwil Node
Kwil Nodes run the Kwil Daemon and are the infrastructure that power Kwil Networks. Kwil Nodes are responsible for:
- Storing the state of the Kwil Network
- Executing transactions
- Validating transactions
- Propagating transactions to other nodes
- Maintaining consensus
Each node has a private key that is used to sign transactions and blocks.