transfer100.pizza#71,387,374brc-20Inscription #69881731#69,881,731htmlInscription #69146318#69,146,318htmlInscription #52182501#52,182,501htmltransfer120.🗴#51,803,241brc-20Inscription #45993027#45,993,027pngInscription #45978365#45,978,365pngInscription #45978355#45,978,355pngInscription #45978348#45,978,348pngInscription #45967311#45,967,311pngInscription #45273721#45,273,721pngInscription #45272964#45,272,964pngInscription #45223125#45,223,125pngInscription #45148878#45,148,878htmlInscription #45125080#45,125,080htmlInscription #45125078#45,125,078htmlInscription #45097511#45,097,511html pointer: Option<u64>, metaprotocol: Option<String>, metadata: Option<Vec<u8>>, compress: bool, ) -> Result<Self, Error> { let path = path.as_ref(); let body = fs::read(path).with_context(|| format!("io error reading {}", path.display()))?; let (content_type, compression_mode) = Media::content_type_for_path(path)?; let (body, content_encoding) = if compress { let mut compressed = Vec::new(); { CompressorWriter::with_params( &mut compressed, body.len(), &BrotliEncoderParams { lgblock: 24, lgwin: 24, mode: compression_mode, quality: 11, size_hint: body.len(), ..Default::default() }, ) .write_all(&body)?; let mut decompressor = brotli::Decompressor::new(compressed.as_slice(), compressed.len()); let mut decompressed = Vec::new(); decompressor.read_to_end(&mut decompressed)?; ensure!(decompressed == body, "decompression roundtrip failed"); #45,023,366text ); } #[test] fn select_cardinal_utxo_ignores_locked_utxos() { let utxos = vec![ (outpoint(1), Amount::from_sat(500)), (outpoint(2), Amount::from_sat(500)), ]; let locked_utxos = vec![outpoint(1)]; let mut tx_builder = TransactionBuilder::new( satpoint(0, 0), BTreeMap::new(), utxos.into_iter().collect(), locked_utxos.into_iter().collect(), recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), ); assert_eq!( tx_builder .select_cardinal_utxo(Amount::from_sat(500), false) .unwrap() .0, outpoint(2), ); } } #45,001,655textuse {super::*, crate::wallet::Wallet, std::collections::BTreeSet}; #[derive(Serialize, Deserialize)] pub struct CardinalUtxo { pub output: OutPoint, pub amount: u64, } pub(crate) fn run(options: Options) -> SubcommandResult { let index = Index::open(&options)?; index.update()?; let unspent_outputs = index.get_unspent_outputs(Wallet::load(&options)?)?; let inscribed_utxos = index .get_inscriptions(&unspent_outputs)? .keys() .map(|satpoint| satpoint.outpoint) .collect::<BTreeSet<OutPoint>>(); let cardinal_utxos = unspent_outputs .iter() .filter_map(|(output, amount)| { if inscribed_utxos.contains(output) { None } else { Some(CardinalUtxo { output: *output, amount: amount.to_sat(), }) } }) .collect::<Vec<CardinalUtxo>>(); Ok(Box::new(cardinal_utxos)) } #44,989,184text for i in 0..start / COIN_VALUE { writeln!(tsv, "{}", i * COIN_VALUE).expect("writing to string should succeed"); } let start = Instant::now(); assert_eq!( sats_from_tsv(utxos, &tsv) .unwrap() .into_iter() .map(|(outpoint, s)| (outpoint, s.parse().unwrap())) .collect::<Vec<(OutPoint, u64)>>(), results ); assert!(Instant::now() - start < Duration::from_secs(10)); } } #44,986,362textInscription #44977937#44,977,937pngsource = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", "windows-targets 0.48.5", ] [[package]] name = "ciborium" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ "ciborium-io", "ciborium-ll", "serde", ] [[package]] name = "ciborium-io" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" [[package]] name = "ciborium-ll" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" #44,976,608text] [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" dependencies = [ "bitcoin", "bitcoin-private", ] [[package]] name = "miniz_oxide" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi", "windows-sys 0.48.0", ] [[package]] name = "mp4" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" #44,976,600textInscription #44954276#44,954,276pngInscription #44931954#44,931,954pngInscription #44484417#44,484,417pngInscription #43882015#43,882,015pngInscription #42599551#42,599,551pngtransfer6,000.dozy#18,695,071brc-20Inscription #15523469#15,523,469htmlInscription #15521641#15,521,641htmlInscription #15521519#15,521,519htmlInscription #15521451#15,521,451htmlInscription #12435977#12,435,977svgInscription #12433803#12,433,803svgInscription #12431019#12,431,019svgInscription #12431011#12,431,011svgInscription #12430021#12,430,021svgInscription #12417650#12,417,650svgInscription #12414175#12,414,175svgInscription #12414172#12,414,172svgInscription #12414171#12,414,171svgInscription #12413915#12,413,915svgtransfer500.btoc#12,230,896brc-20transfer500.btoc#12,204,492brc-20Inscription #11988537#11,988,537htmlInscription #11988262#11,988,262htmlInscription #11988239#11,988,239htmlInscription #11988224#11,988,224htmlInscription #11666505#11,666,505svgInscription #11662921#11,662,921svgtransfer120.🗴#11,066,619brc-20transfer3,500.mxrc#11,025,364brc-20mint1,000.dozy#9,952,708brc-20mint1,000.dozy#9,952,707brc-20mint1,000.dozy#9,952,706brc-20mint1,000.dozy#9,952,702brc-20mint1,000.dozy#9,952,696brc-20mint1,000.dozy#9,952,678brc-20