21 lines
618 B
Rust
21 lines
618 B
Rust
use anyhow::Result;
|
|
|
|
use cardano_tx_builder::{
|
|
Credential,
|
|
Network,
|
|
Utxo,
|
|
BuildParameters,
|
|
};
|
|
|
|
pub trait CardanoConnect {
|
|
fn network(&self) -> Network;
|
|
fn health(&self) -> impl std::future::Future<Output = Result<String>> + Send;
|
|
fn build_parameters(&self) -> impl std::future::Future<Output = BuildParameters> + Send;
|
|
fn utxos_at(
|
|
&self,
|
|
payment: &Credential,
|
|
delegation: &Option<Credential>,
|
|
) -> impl std::future::Future<Output = Result<Vec<Utxo>>> + Send;
|
|
fn submit(&self, tx: Vec<u8>) -> impl std::future::Future<Output = Result<String>> + Send;
|
|
}
|