Overview
Providers are used to interact with the blockchain. They are responsible for sending and receiving RPC requests. There are following builtin providers:
- GRPCProvider - connects to a remote gRPC based server
Kwil now support Ethereum private key to sign transaction. This key is also associated with an Ethereum account which needed to be funded to use Kwil.
Kwil.generate_dbi(owner_addr, dataset_name)
Kwil.load_wallet(private_key)
kwil.deploy_database(payload)
- deploys a new database, payload is compiled bytes of schemakwil.get_database(dataset_name, OPTIONAL[owner_address])
- returns the database objectkwil.list_database(OPTIONAL[owner_address])
- returns the list of databases under current accountkwil.drop_database(dataset_name)
- drops the database under current accountkwil.execute_action(dataset_name, action_name, inputs)
- executes the action on the databasekwil.query(dataset_name, query)
- executes query(ad-hoc SQL) on the database
Kwil.kwild.ping()
Kwil.kwild.get_config()
- returns the configuration of the nodeKwil.kwild.get_schema(DBIdentifier)
- returns the dataset schema infoKwil.kwild.get_account(Adddress)
- returns the account info(nonce, balance, etc)Kwil.kwild.estimate_price(TxParams)
- returns the estimated price for the transactionKwil.kwild.query(DBIdentifier, Query)
- returns the query(ad-hoc SQL) resultKwil.kwild.list_database()
- returns the list of databases under current account
Kwil.kwild.broadcast(TxParams)
- broadcasts the transaction to the network
Last modified 1mo ago