pub(crate) async fn find_transactions(
    client: &Client,
    uri: &str,
    options: FindTransactionsOptions,
) -> Result<Response, Error> {
    let mut body = json!({
        "command": "findTransactions",
    });

    if !options.bundles.is_empty() {
        body["bundles"] = json!(options.bundles);
    }
    if !options.addresses.is_empty() {
        body["addresses"] = json!(options.addresses);
    }
    if !options.tags.is_empty() {
        body["tags"] = json!(options.tags);
    }
    if !options.approvees.is_empty() {
        body["approvees"] = json!(options.approvees);
    }

    client
        .post(uri)
        .header("ContentType", "application/json")
        .header("X-IOTA-API-Version", "1")
        .body(body.to_string())
        .send()
        .await
}
/// Finds transactions the match any of the provided parameters
Finds transactions the match any of the provided parameters
Finds transactions the match any of the provided parameters
pub(crate) async fn find_transactions(
    client: &Client,
    uri: &str,
    options: FindTransactionsOptions,
) -> Result<Response, Error> {
    let mut body = json!({
        "command": "findTransactions",
    });
    if !options.bundles.is_empty() {
        body["bundles"] = json!(options.bundles);
    }
    if !options.addresses.is_empty() {
        body["addresses"] = json!(options.addresses);
    }
    if !options.tags.is_empty() {
        body["tags"] = json!(options.tags);
    }
    if !options.approvees.is_empty() {
        body["approvees"] = json!(options.approvees);
    }
    client
        .post(uri)
        .header("ContentType", "application/json")
        .header("X-IOTA-API-Version", "1")
        .body(body.to_string())
        .send()
        .await
}
pub ( crate ) async fn find_transactions ( client : & Client , uri : & str , options : FindTransactionsOptions , ) -> Result < Response , Error > { let mut body = json ! ( { " " " " } ) ; if ! options . bundles . is_empty ( ) { body [ " " ] = json ! ( options bundles ) ; } if ! options . addresses . is_empty ( ) { body [ " " ] = json ! ( options addresses ) ; } if ! options . tags . is_empty ( ) { body [ " " ] = json ! ( options tags ) ; } if ! options . approvees . is_empty ( ) { body [ " " ] = json ! ( options approvees ) ; } client . post ( uri ) . header ( " " , " " ) . header ( " " , " " ) . body ( body . to_string ( ) ) . send ( ) . await }
Finds transactions the match any of the provided parameters
Finds transactions the match any of the provided parameters
client
&Client
uri
&str
options
FindTransactionsOptions