SHOWING: First 60
pub(crate) cookie_file: Option<PathBuf>,
#[arg(long, help = "Store index in <DATA_DIR>.")]
pub(crate) data_dir: Option<PathBuf>,
#[arg(
long,
help = "Set index cache to <DB_CACHE_SIZE> bytes. By default takes 1/4 of available RAM."
)]
pub(crate) db_cache_size: Option<usize>,
#[arg(
long,
help = "Don't look for inscriptions below <FIRST_INSCRIPTION_HEIGHT>."
)]
pub(crate) first_inscription_height: Option<u32>,
#[arg(long, help = "Limit index to <HEIGHT_LIMIT> blocks.")]
pub(crate) height_limit: Option<u32>,
#[arg(long, help = "Use index at <INDEX>.")]
pub(crate) index: Option<PathBuf>,
#[arg(
long,
help = "Track location of runes. RUNES ARE IN AN UNFINISHED PRE-ALPHA STATE AND SUBJECT TO CHANGE AT ANY TIME."
)]
pub(crate) index_runes_pre_alpha_i_agree_to_get_rekt: bool,
#[arg(long, help = "Track location of all satoshis.")]
pub(crate) index_sats: bool,
#[arg(long, short, help = "Use regtest. Equivalent to `--chain regtest`.")]
pub(crate) regtest: bool,
#45,161,626text"सकते हैं।"
#: src/guides/inscriptions.md:186
msgid ""
"Once the reveal transaction has been mined, the inscription ID should be "
"printed when you run:"
msgstr ""
"एक बार प्रकट लेनदेन खनन हो जाने के बाद, जब आप अग्रसर होते हैं तो डिजिटल अभिलेख आईडी मुद्रित "
"होनी चाहिए:"
#: src/guides/inscriptions.md:189 src/guides/inscriptions.md:220
#: src/guides/inscriptions.md:246
msgid ""
"```\n"
"ord wallet inscriptions\n"
"```"
msgstr ""
#: src/guides/inscriptions.md:193
msgid ""
"And when you visit [the ordinals explorer](https://ordinals.com/) at "
"`ordinals.com/inscription/INSCRIPTION_ID`."
msgstr ""
"और जब आप [the ordinals explorer](https://ordinals.com/) पर "
"`ordinals.com/inscription/INSCRIPTION_ID` देखते हैं।"
#: src/guides/inscriptions.md:196
msgid "Sending Inscriptions"
msgstr "इंस्क्रीप्शंस (डिजिटल अभिलेख) प्रेषण"
#: src/guides/inscriptions.md:199
msgid "Ask the recipient to generate a new address by running:"
msgstr "प्राप्तकर्ता को निम्न संचालित कर एक नये पते का सृजन करने के लिए कहें:"
#: src/guides/inscriptions.md:205
#45,107,252text output: vec![TxOut {
script_pubkey: script::Builder::new()
.push_opcode(opcodes::all::OP_RETURN)
.push_slice(b"RUNE_TEST")
.push_slice([0, 1])
.push_opcode(opcodes::all::OP_VERIFY)
.push_slice([2, 3])
.into_script(),
value: 0,
}],
lock_time: locktime::absolute::LockTime::ZERO,
version: 0,
})
.unwrap()
.unwrap(),
Runestone {
edicts: vec![Edict {
id: 1,
amount: 2,
output: 3,
}],
..Default::default()
},
);
}
#[test]
fn deciphering_empty_runestone_is_successful() {
assert_eq!(
Runestone::decipher(&Transaction {
input: Vec::new(),
output: vec![TxOut {
script_pubkey: script::Builder::new()
.push_opcode(opcodes::all::OP_RETURN)
.push_slice(b"RUNE_TEST")
.into_script(),
value: 0
}],
lock_time: locktime::absolute::LockTime::ZERO,
#45,054,473textpub(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}");#45,054,461text
#[test]
fn unknown_preview() {
let server = TestServer::new_with_regtest();
server.mine_blocks(1);
let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate {
inputs: &[(1, 0, 0, inscription("text/foo", "hello").to_witness())],
..Default::default()
});
server.mine_blocks(1);
server.assert_response_csp(
format!("/preview/{}", InscriptionId { txid, index: 0 }),
StatusCode::OK,
"default-src 'self'",
fs::read_to_string("templates/preview-unknown.html").unwrap(),
);
}
#[test]
fn video_preview() {
let server = TestServer::new_with_regtest();
server.mine_blocks(1);
let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate {
inputs: &[(1, 0, 0, inscription("video/webm", "hello").to_witness())],
..Default::default()
});
let inscription_id = InscriptionId { txid, index: 0 };
server.mine_blocks(1);
server.assert_response_regex(
format!("/preview/{inscription_id}"),
StatusCode::OK,#45,022,459text