Inscription #73429676#73,429,676htmltransfer100.pizza#71,181,312brc-20["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,518text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,517text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,516text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,515text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,514text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,513text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,512text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,511text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,510text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,509text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,508text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,507text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,506text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,505text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,504text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,503text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,502text["/content/5ac5662894624ebde8ce122739c5f00f7eedd7125617491ce3598e326273d924i0",{"p":"brc-20","op":"mint","tick":"cpos","amt":"40"},{"p":"ocf","op":"call","name":"forest_launch","params":["0"]}]#69,820,501textInscription #67395671#67,395,671htmlInscription #65802324#65,802,324pngInscription #65003769#65,003,769svg#64,399,714Inscription #56546610#56,546,610pngInscription #56546609#56,546,609pngInscription #49577453#49,577,453pngtoken-mint5.miner#46,123,498taptoken-mint5.miner#46,123,469taptoken-mint5.miner#46,123,446taptoken-mint5.miner#46,123,445taptoken-mint5.miner#46,118,950taptoken-mint5.miner#46,118,945tapuse { super::*, ord::subcommand::wallet::{inscriptions, receive, send}, }; #[test] fn inscriptions() { let rpc_server = test_bitcoincore_rpc::spawn(); create_wallet(&rpc_server); rpc_server.mine_blocks(1); let (inscription, reveal) = inscribe(&rpc_server); let output = CommandBuilder::new("wallet inscriptions") .rpc_server(&rpc_server) .run_and_deserialize_output::<Vec<inscriptions::Output>>(); assert_eq!(output.len(), 1); assert_eq!(output[0].inscription, inscription); assert_eq!(output[0].location, format!("{reveal}:0:0").parse().unwrap()); assert_eq!( output[0].explorer, format!("https://ordinals.com/inscription/{inscription}") ); let address = CommandBuilder::new("wallet receive") .rpc_server(&rpc_server) .run_and_deserialize_output::<receive::Output>() .address; let txid = CommandBuilder::new(format!( "wallet send --fee-rate 1 {} {inscription}", address.assume_checked() )) .rpc_server(&rpc_server) .expected_exit_code(0) .stdout_regex(".*") #44,997,397textuse {super::*, ord::subcommand::wallet::outputs::Output}; #[test] fn outputs() { let rpc_server = test_bitcoincore_rpc::spawn(); create_wallet(&rpc_server); let coinbase_tx = &rpc_server.mine_blocks_with_subsidy(1, 1_000_000)[0].txdata[0]; let outpoint = OutPoint::new(coinbase_tx.txid(), 0); let amount = coinbase_tx.output[0].value; let output = CommandBuilder::new("wallet outputs") .rpc_server(&rpc_server) .run_and_deserialize_output::<Vec<Output>>(); assert_eq!(output[0].output, outpoint); assert_eq!(output[0].amount, amount); } #[test] fn outputs_includes_locked_outputs() { let rpc_server = test_bitcoincore_rpc::spawn(); create_wallet(&rpc_server); let coinbase_tx = &rpc_server.mine_blocks_with_subsidy(1, 1_000_000)[0].txdata[0]; let outpoint = OutPoint::new(coinbase_tx.txid(), 0); let amount = coinbase_tx.output[0].value; rpc_server.lock(outpoint); let output = CommandBuilder::new("wallet outputs") .rpc_server(&rpc_server) .run_and_deserialize_output::<Vec<Output>>();#44,996,628textpub(crate) use { super::*, bitcoin::{ blockdata::{opcodes, script, script::PushBytesBuf}, ScriptBuf, Witness, }, pretty_assertions::assert_eq as pretty_assert_eq, std::iter, test_bitcoincore_rpc::TransactionTemplate, unindent::Unindent, }; macro_rules! assert_regex_match { ($value:expr, $pattern:expr $(,)?) => { let regex = Regex::new(&format!("^(?s){}$", $pattern)).unwrap(); let string = $value.to_string(); if !regex.is_match(string.as_ref()) { panic!( "Regex:\n\n{}\n\n…did not match string:\n\n{}", regex, string ); } }; } macro_rules! assert_matches { ($expression:expr, $( $pattern:pat_param )|+ $( if $guard:expr )? $(,)?) => { match $expression { $( $pattern )|+ $( if $guard )? => {} left => panic!( "assertion failed: (left ~= right)\n left: `{:?}`\n right: `{}`", left, stringify!($($pattern)|+ $(if $guard)?) ), } } } pub(crate) fn blockhash(n: u64) -> BlockHash { let hex = format!("{n:x}");#44,995,864text Timestamp, WalletTxInfo, }, jsonrpc_core::{IoHandler, Value}, jsonrpc_http_server::{CloseHandle, ServerBuilder}, serde::{Deserialize, Serialize}, server::Server, state::State, std::{ collections::{BTreeMap, BTreeSet, HashMap}, sync::{Arc, Mutex, MutexGuard}, thread, time::Duration, }, }; mod api; mod server; mod state; pub fn builder() -> Builder { Builder { fail_lock_unspent: false, network: Network::Bitcoin, version: 240000, } } pub struct Builder { fail_lock_unspent: bool, network: Network, version: usize, } impl Builder { pub fn fail_lock_unspent(self, fail_lock_unspent: bool) -> Self { Self { fail_lock_unspent, ..self } } pub fn network(self, network: Network) -> Self { Self { network, ..self } } pub fn version(self, version: usize) -> Self { Self { version, ..self } } pub fn build(self) -> Handle { let state = Arc::new(Mutex::new(State::new( self.network, self.version, self.fail_lock_unspent,#44,995,863textdmt-mint.nat#42,599,336tapdmt-mint.nat#42,599,295tapdmt-mint.nat#42,599,294tapmint20.mmss#41,875,776brc-20mint20.mmss#41,875,773brc-20mint20.mmss#41,875,757brc-20mint20.mmss#41,875,755brc-20mint20.mmss#41,875,754brc-20mint20.mmss#41,875,745brc-20mint20.mmss#41,875,742brc-20mint20.mmss#41,875,698brc-20mint20.mmss#41,875,690brc-20mint20.mmss#41,875,689brc-20reg118899.sats#8,314,388snsInscription #1242799#1,242,799png