tesseract-protocol-test

Crates.iotesseract-protocol-test
lib.rstesseract-protocol-test
version0.5.6
sourcesrc
created_at2023-12-18 19:07:05.822
updated_at2023-12-18 20:34:48.635316
descriptionTesseract protocol for testing tessract, transports, etc. Useful when you don't want to handle real transactions yet.
homepagehttps://github.com/tesseract-one/
repositoryhttps://github.com/tesseract-one/Tesseract.rs
max_upload_size
id1073576
size8,387
Daniel Leping (dileping)

documentation

https://github.com/tesseract-one/Tesseract.rs

README

Test protocol

use tesseract::client::Tesseract;
use tesseract::client::delegate::SingleTransportDelegate;

use tesseract_protocol_test::Test;

let client_tesseract = Tesseract::new(client::delegate::SingleTransportDelegate::arc())
    .transport(your_transport_here);
    
let client_service = client_tesseract.service(Test::Protocol); //you can start calling methods of protocol

ID

tesseract_protocol_test::Test::Protocol

Definition

#[async_trait]
pub trait TestService {
    async fn sign_transaction(self: Arc<Self>, transaction: &str) -> Result<String>;
}

Methods

sign_transaction

Requests wallet to sign a string. Returns a signed string.

let signed = Arc::clone(&client_service).sign_transaction("testTransaction"); //signed is a Future<Result<String, Error>>
Commit count: 97

cargo fmt