SHOWING: First 60
cdkf.btc#73,031,776textcdkf.btc#73,031,767textcdkf.btc#73,031,758textcdkf.btc#73,031,749textcdkf.btc#73,031,740textcdkf.btc#73,031,731text0101.pizza#73,021,020text0101.pizza#73,021,014text0101.pizza#73,021,008text0101.pizza#73,021,002text0101.pizza#73,020,996text0101.pizza#73,020,990text0101.pizza#73,020,984texttransfer100.pizza#72,704,416brc-20transfer100.pizza#71,275,311brc-20use {super::*, crate::wallet::Wallet};
#[derive(Debug, Parser)]
pub(crate) struct Sats {
#[arg(
long,
help = "Find satoshis listed in first column of tab-separated value file <TSV>."
)]
tsv: Option<PathBuf>,
}
#[derive(Serialize, Deserialize)]
pub struct OutputTsv {
pub sat: String,
pub output: OutPoint,
}
#[derive(Serialize, Deserialize)]
pub struct OutputRare {
pub sat: Sat,
pub output: OutPoint,
pub offset: u64,
pub rarity: Rarity,
}
impl Sats {
pub(crate) fn run(&self, options: Options) -> SubcommandResult {
let index = Index::open(&options)?;
if !index.has_sat_index() {
bail!("sats requires index created with `--index-sats` flag");
}
index.update()?;
let utxos = index.get_unspent_output_ranges(Wallet::load(&options)?)?;
if let Some(path) = &self.tsv {
let mut output = Vec::new();
for (outpoint, sat) in sats_from_tsv(
utxos,
&fs::read_to_string(path)
.with_context(|| format!("I/O error reading `{}`", path.display()))?,#44,992,964text