Personal mirror, might delete later
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
irdest/sdk
Katharina Fey 0a28ecfe5c
Improve SDK/ example service documentation
3 years ago
..
libqaul-sdk Refactoring RPC components 3 years ago
qaul-sdk Refactoring RPC components 3 years ago
ratman-sdk Refactoring RPC components 3 years ago
README.md Improve SDK/ example service documentation 3 years ago

README.md

qaul SDKs

In order to develop applications for a qaul network, you need to include the software development kit libraries (SDK libs). Each component your application wants to interact with requires a separate library. For the official core components all SDKs can be found in this directory. For third-party components, you may have to source them from different development repositories.

SDK structure

Each SDK exposes a set of types used by the component, with an async/await API which uses a common RPC interface (called qrpc) to facilitate communication and reply data.

Currently the following qaul components have SDK libraries:

Writing a qaul service

You can find much more detailed instructions on how to develop a qaul service in the developer manual. Following is a very simple "hello world".

A small, but real-world example of a service can be found here.

// Requirue the RPC protocol core
use qrpc_sdk::{default_socket_path, RpcSocket, Service};

// Include the libqau component SDK
use libqaul_sdk::{QaulSdk, types::UserAuth};

#[async_std::main]
async fn main() {
    let mut serv = Service::new("net.qaul.test", 1, "A test service");
    
    // Get the default qrpc socket location
    let (addr, port) = default_socket_path();
    
    // Connect your service to the qrpc backend
    let id = serv
        .register(RpcSocket::connect(addr, port).await.unwrap())
        .await
        .unwrap();
        
    println!("My service ID is '{}'", id);
}