pub fn datalog(
    remote: String,
    address: String,
) -> Result<impl Stream<Item = Result<Vec<(u64, Vec<u8>)>>>> {
    let robot_account =
        AccountId::from_ss58check(address.as_str()).map_err(|_| Error::Ss58CodecError)?;

    let (mut sender, receiver) = mpsc::unbounded();
    task::spawn(async move {
        sender.send(robot_account).await.unwrap();
    });
    let data = receiver.then(move |robot_account: AccountId| {
        datalog::fetch(robot_account.clone(), remote.clone()).map(|r| r.map_err(Into::into))
    });
    Ok(data)
}
/// Read data records from blockchain.
///
/// Returns datalog data objects.
Read data records from blockchain.
Returns datalog data objects.
Read data records from blockchain . Returns datalog data objects .
pub fn datalog(
    remote: String,
    address: String,
) -> Result<impl Stream<Item = Result<Vec<(u64, Vec<u8>)>>>> {
    let robot_account =
        AccountId::from_ss58check(address.as_str()).map_err(|_| Error::Ss58CodecError)?;
    let (mut sender, receiver) = mpsc::unbounded();
    task::spawn(async move {
        sender.send(robot_account).await.unwrap();
    });
    let data = receiver.then(move |robot_account: AccountId| {
        datalog::fetch(robot_account.clone(), remote.clone()).map(|r| r.map_err(Into::into))
    });
    Ok(data)
}
pub fn datalog ( remote : String , address : String , ) -> Result < impl Stream < Item = Result < Vec < ( u64 , Vec < u8 > ) > > > > { let robot_account = AccountId :: from_ss58check ( address . as_str ( ) ) . map_err ( | _ | Error :: Ss58CodecError ) ? ; let ( mut sender , receiver ) = mpsc :: unbounded ( ) ; task :: spawn ( async move { sender . send ( robot_account ) . await . unwrap ( ) ; } ) ; let data = receiver . then ( move | robot_account : AccountId | { datalog :: fetch ( robot_account . clone ( ) , remote . clone ( ) ) . map ( | r | r . map_err ( Into :: into ) ) } ) ; Ok ( data ) }
Read data records from blockchain.
Read data records from blockchain .
remote
String
address
String