Crates.io | colink |
lib.rs | colink |
version | 0.3.10 |
source | src |
created_at | 2022-04-02 09:37:38.961655 |
updated_at | 2023-06-27 08:47:21.408436 |
description | CoLink Rust SDK |
homepage | https://github.com/CoLearn-Dev |
repository | https://github.com/CoLearn-Dev/colink-sdk-rust-dev |
max_upload_size | |
id | 560765 |
size | 305,632 |
CoLink SDK helps both application and protocol developers access the functionalities provided by the CoLink server.
Add this to your Cargo.toml:
[dependencies]
colink = "0.3.10"
Enable more features in your Cargo.toml
# if you use storage macro dbc
colink = { version = "0.3.10", features = ["storage_macro_dbc"] }
You can use this SDK to run protocols, update storage, developing protocol operators. Here is a tutorial for you about how to start a greetings task between two users.
cargo run --example host_import_user <address> <host_jwt> <expiration_timestamp> # <expiration_timestamp> is optional
cargo run --example host_import_users <address> <host_jwt> <number> <expiration_timestamp> # <expiration_timestamp> is optional
cargo run --example host_import_users_and_exchange_guest_jwts <address> <host_jwt> <number> <expiration_timestamp> # <expiration_timestamp> is optional
cargo run --example host_import_users_and_set_registry <address> <host_jwt> <number> <expiration_timestamp> # <expiration_timestamp> is optional
cargo run --example user_confirm_task <address> <user_jwt> <task_id> <action> # <action>: approve(default)/reject/ignore
cargo run --example user_import_guest_jwt <address> <user_jwt> <guest_jwt>
cargo run --example user_generate_token <address> <user_jwt>
cargo run --example user_run_local_task <address> <user_jwt>
cargo run --example user_run_task <address> <user_jwt A> <user_jwt B> <message> # <message> is optional
cargo run --example user_greetings_to_multiple_users <address> <initiator_jwt> <receiver_jwt A> <receiver_jwt B> <receiver_jwt...
cargo run --example auto_confirm <address> <user_jwt> <protocol_name>
cargo run --example get_next_greeting_message <address> <user_jwt> <start_timestamp> # <start_timestamp> is optional
cargo run --example mtls_request_info <address> <ca_certificate> <client_cert> <client_key>
cargo run --example user_lock <address> <user_jwt>
cargo run --example user_policy_module <address> <user_jwt>
cargo run --example user_remote_storage <address> <user_jwt A> <user_jwt B> <message> # <message> is optional
cargo run --example user_start_protocol_operator <address> <user_jwt> <protocol_name>
cargo run --example user_stop_protocol_operator <address> <user_jwt> <instance_id>
cargo run --example user_wait_task <address> <user_jwt> <target_user_id>
cargo run --example storage_macro_chunk <address> <user_jwt> <payload_size>
cargo run --example protocol_greetings -- --addr <address> --jwt <user_jwt>
cargo run --example protocol_greetings -- --addr <address> --jwt <user_jwt> --ca <ca_cert> --cert <client_cert> --key <client_key>
cargo run --example protocol_variable_transfer -- --addr <address> --jwt <user_jwt>