pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(
dst_uri: String,
macaroon_path: impl AsRef<Path>,
server_ca_cert_path: impl AsRef<Path>,
expected_server_domain: String,
) -> Result<Self>
pub async fn connect( dst_uri: String, macaroon_path: impl AsRef<Path>, server_ca_cert_path: impl AsRef<Path>, expected_server_domain: String, ) -> Result<Self>
Connects to a tapd instance.
§Arguments
dst_uri- The destination URI (e.g., “https://localhost:port”).macaroon_path- Path to the macaroon file.server_ca_cert_path- Path to the server’s root CA certificate file.expected_server_domain- The domain name to verify against the server’s certificate.
§Returns
A new Client instance.
Sourcepub async fn get_info(&mut self) -> Result<GetInfoResponse>
pub async fn get_info(&mut self) -> Result<GetInfoResponse>
Retrieves information about the tapd instance.
Sourcepub async fn list_assets(
&mut self,
with_witness: bool,
include_spent: bool,
include_leased: bool,
include_unconfirmed_mints: bool,
min_amount: u64,
max_amount: u64,
group_key: Vec<u8>,
script_key: Option<ScriptKey>,
anchor_outpoint: Option<OutPoint>,
script_key_type: Option<ScriptKeyTypeQuery>,
) -> Result<ListAssetsResponse>
pub async fn list_assets( &mut self, with_witness: bool, include_spent: bool, include_leased: bool, include_unconfirmed_mints: bool, min_amount: u64, max_amount: u64, group_key: Vec<u8>, script_key: Option<ScriptKey>, anchor_outpoint: Option<OutPoint>, script_key_type: Option<ScriptKeyTypeQuery>, ) -> Result<ListAssetsResponse>
Lists assets.
Sourcepub async fn export_proof(
&mut self,
asset_id: AssetID,
script_key: Vec<u8>,
outpoint: Option<OutPoint>,
) -> Result<ExportProofResponse>
pub async fn export_proof( &mut self, asset_id: AssetID, script_key: Vec<u8>, outpoint: Option<OutPoint>, ) -> Result<ExportProofResponse>
ExportProof exports the latest raw proof file anchored at the specified script_key.
pub async fn verify_proof( &mut self, raw_proof_file: Vec<u8>, genesis_point: Option<OutPoint>, ) -> Result<VerifyProofResponse>
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request