pub async fn get_transation_status(
		&mut self,
		txid: StacksTxId,
	) -> anyhow::Result<TransactionStatus> {
		let res: anyhow::Result<Value> = self
			.send_request(|| {
				self.http_client
					.get(self.cachebust(self.get_transation_details_url(txid)))
					.header("Accept", "application/json")
					.build()
					.unwrap()
			})
			.await;

		let tx_status_str = match res {
			Ok(json) => json["tx_status"]
				.as_str()
				.map(|s| s.to_string())
				.expect("Could not get raw transaction from response"),
			// Stacks node sometimes returns 404 for pending transactions
			// :shrug:
			Err(err) if err.to_string().contains("404 Not Found") => {
				"pending".to_string()
			}
			err => panic!("Unknown transation status: {:?}", err),
		};

		Ok(match tx_status_str.as_str() {
			"pending" => TransactionStatus::Broadcasted,
			"success" => TransactionStatus::Confirmed,
			"abort_by_response" => TransactionStatus::Rejected,
			status => panic!("Unknown transation status: {}", status),
		})
	}
Get transaction status for a given txid
romeo/src/stacks_client.rs