SHOWING: First 60
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
dependencies = [
"libc",
"windows-sys 0.48.0",
]
[[package]]
name = "spin"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
dependencies = [
"strum_macros",
]
[[package]]
name = "strum_macros"
version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"#44,987,862textmsgstr "総供給量"
#: src/overview.md:176
msgid "`common`: 2.1 quadrillion"
msgstr "`普通`: 2千100万亿"
#: src/overview.md:177
msgid "`uncommon`: 6,929,999"
msgstr "`普通ではない`: 6,929,999"
#: src/overview.md:178
msgid "`rare`: 3437"
msgstr "`珍しく`: 3437"
#: src/overview.md:179
msgid "`epic`: 32"
msgstr "`史詩`: 32"
#: src/overview.md:180
msgid "`legendary`: 5"
msgstr "`伝奇`: 5"
#: src/overview.md:181 src/overview.md:190
msgid "`mythic`: 1"
msgstr "`神話`: 1"
#: src/overview.md:183
msgid "Current Supply"
msgstr "現有の供給量"
#: src/overview.md:185
msgid "`common`: 1.9 quadrillion"
msgstr "`普通`: 1千900万亿"
#: src/overview.md:186
msgid "`uncommon`: 745,855"
msgstr "`普通ではない`: 745,855"
#: src/overview.md:187
msgid "`rare`: 369"
msgstr "`珍しく`: 369"
#: src/overview.md:188
msgid "`epic`: 3"
msgstr "`史詩`: 3"
#: src/overview.md:189
msgid "`legendary`: 0"
msgstr "`伝奇`: 0"
#: src/overview.md:192
msgid ""
"At the moment, even uncommon satoshis are quite rare. As of this writing, "
"745,855 uncommon satoshis have been mined - one per 25.6 bitcoin in "
#44,987,844textuse {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,987,838text"mediawiki) for the technical details, and the [ord repo](https://github.com/"
"ordinals/ord) for the `ord` wallet and block explorer."
msgstr ""
"关于序数理论的更多信息,请查阅[FAQ](./faq.md) 来获取概述;查阅[BIP](https://"
"github.com/ordinals/ord/blob/master/bip.mediawiki) 来获取技术细节查阅[ord "
"repo](https://github.com/ordinals/ord)来获取`ord`钱包和浏览器的信息."
#: src/bounties.md:14
msgid ""
"Satoshi was the original developer of ordinal theory. However, he knew that "
"others would consider it heretical and dangerous, so he hid his knowledge, "
"and it was lost to the sands of time. This potent theory is only now being "
"rediscovered. You can help by researching rare satoshis."
msgstr ""
"中本聪是序数理论的原始开发者。然而,他知道其他人可能会认为这是异端邪说并且危"
"险,因此他隐藏了自己的知识,使其在时间的沙漠里失传。现在,这个强大的理论被重"
"新发现。您可以通过研究稀有的聪来帮助我们。"
#: src/bounties.md:19
msgid "Good luck and godspeed!"
msgstr "祝您一切顺利,好运!"
#: src/bounty/0.md:1
msgid "Ordinal Bounty 0"
msgstr "赏金任务 0"
#: src/bounty/0.md:4 src/bounty/1.md:4 src/bounty/2.md:4 src/bounty/3.md:4
msgid "Criteria"
msgstr "标准"
#: src/bounty/0.md:7
#44,987,817text"alteradas ou excluídas pelo proprietário do contrato NFT."
#: src/faq.md:121
msgid ""
"In order to make sure that a particular Ethereum NFT is immutable, the "
"contract code must be audited, which requires detailed knowledge of the EVM "
"and Solidity semantics."
msgstr ""
"Para garantir que uma determinada NFT no Ethereum seja imutável, o código "
"do contrato deve ser auditado, o que requer conhecimento detalhado de semântica "
"EVM e Solidity."
#: src/faq.md:125
msgid ""
"It is very hard for a non-technical user to determine whether or not a given "
"Ethereum NFT is mutable or immutable, and Ethereum NFT platforms make no "
"effort to distinguish whether an NFT is mutable or immutable, and whether "
"the contract source code is available and has been audited."
msgstr ""
"É muito difícil para um usuário não técnico determinar se uma determinada "
"NFT no Ethereum é mutável ou imutável, e as plataformas daquele ecosistema "
"não fazem nenhum esforço para distinguir se uma NFT é mutável ou imutável, "
"e se o código-fonte do contrato está disponível e foi auditado."
#44,987,816textuse super::*;
fn target_as_block_hash(target: bitcoin::Target) -> BlockHash {
BlockHash::from_raw_hash(Hash::from_byte_array(target.to_le_bytes()))
}
#[derive(Boilerplate)]
pub(crate) struct BlockHtml {
hash: BlockHash,
target: BlockHash,
best_height: Height,
block: Block,
height: Height,
inscription_count: usize,
featured_inscriptions: Vec<InscriptionId>,
}
impl BlockHtml {
pub(crate) fn new(
block: Block,
height: Height,
best_height: Height,
inscription_count: usize,
featured_inscriptions: Vec<InscriptionId>,
) -> Self {
Self {
hash: block.header.block_hash(),
target: target_as_block_hash(block.header.target()),
block,
height,
best_height,
inscription_count,
featured_inscriptions,
}
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BlockJson {
pub hash: BlockHash,
pub target: BlockHash,
pub best_height: u32,
pub height: u32,
pub inscriptions: Vec<InscriptionId>,
}
impl BlockJson {
pub(crate) fn new(#44,986,783text .outputs
.last_mut()
.expect("No output to deduct fee from");
assert!(
total_output_amount.checked_sub(fee).unwrap() > Amount::from_sat(sat_offset),
"invariant: deducting fee does not consume sat",
);
assert!(
*last_output_amount >= fee,
"invariant: last output can pay fee: {} {}",
*last_output_amount,
fee,
);
*last_output_amount -= fee;
self
}
/// Estimate the size in virtual bytes of the transaction under construction.
/// We initialize wallets with taproot descriptors only, so we know that all
/// inputs are taproot key path spends, which allows us to know that witnesses
/// will all consist of single Schnorr signatures.
fn estimate_vbytes(&self) -> usize {
Self::estimate_vbytes_with(
self.inputs.len(),
self
.outputs
.iter()
.map(|(address, _amount)| address)
.cloned()
.collect(),
)
}
fn estimate_vbytes_with(inputs: usize, outputs: Vec<Address>) -> usize {
#44,986,782text .*
<h2>0 Inscriptions</h2>
<div class=thumbnails>
</div>
<h2>1 Transaction</h2>
<ul class=monospace>
<li><a href=/tx/[[:xdigit:]]{64}>[[:xdigit:]]{64}</a></li>
</ul>
"
.unindent()
);
}
#[test]
fn next_active_when_not_last() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(0),
Height(1),
0,
Vec::new()
),
r"<h1>Block 0</h1>.*prev\s*<a class=next href=/block/1>next</a>.*"
);
}
#[test]
fn prev_active_when_not_first() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(1),
Height(1),
0,
Vec::new()
),
r"<h1>Block 1</h1>.*<a class=prev href=/block/0>prev</a>\s*next.*",
);
}
#[test]
fn block_hash_serializes_as_hex_string() {
assert_eq!(
serde_json::to_string(&BlockHash::all_zeros()).unwrap(),
"\"0000000000000000000000000000000000000000000000000000000000000000\""
#44,986,781text "2222222222222222222222222222222222222222222222222222222222222222"
.parse()
.unwrap()
),
(
1260001,
"1111111111111111111111111111111111111111111111111111111111111111"
.parse()
.unwrap()
),
(
1260000,
"0000000000000000000000000000000000000000000000000000000000000000"
.parse()
.unwrap()
)
],
feature_blocks,
)
.to_string()
.unindent(),
"<h1>Blocks</h1>
<div class=block>
<h2><a href=/block/1260002>Block 1260002</a></h2>
<div class=thumbnails>
<a href=/inscription/1{64}i1><iframe .* src=/preview/1{64}i1></iframe></a>
<a href=/inscription/2{64}i2><iframe .* src=/preview/2{64}i2></iframe></a>
</div>
</div>
<ol start=1260001 reversed class=block-list>
<li><a href=/block/1{64}>1{64}</a></li>
<li><a href=/block/0{64}>0{64}</a></li>
#44,986,780textuse super::*;
#[derive(Boilerplate)]
pub(crate) struct InscriptionsBlockHtml {
pub(crate) block: u32,
pub(crate) inscriptions: Vec<InscriptionId>,
pub(crate) prev_block: Option<u32>,
pub(crate) next_block: Option<u32>,
pub(crate) prev_page: Option<usize>,
pub(crate) next_page: Option<usize>,
}
impl InscriptionsBlockHtml {
pub(crate) fn new(
block: u32,
current_blockheight: u32,
inscriptions: Vec<InscriptionId>,
page_index: usize,
) -> Result<Self> {
let num_inscriptions = inscriptions.len();
let start = page_index * 100;
let end = usize::min(start + 100, num_inscriptions);
if start > num_inscriptions || start > end {
return Err(anyhow!("page index {page_index} exceeds inscription count"));
}
let inscriptions = inscriptions[start..end].to_vec();
Ok(Self {
block,
inscriptions,
prev_block: block.checked_sub(1),
next_block: if current_blockheight > block {
Some(block + 1)
} else {
None
},
prev_page: if page_index > 0 {
#44,986,776textuse super::*;
#[derive(Boilerplate)]
pub(crate) struct CollectionsHtml {
pub(crate) inscriptions: Vec<InscriptionId>,
pub(crate) prev: Option<usize>,
pub(crate) next: Option<usize>,
}
impl PageContent for CollectionsHtml {
fn title(&self) -> String {
"Collections".into()
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn without_prev_and_next() {
assert_regex_match!(
CollectionsHtml {
inscriptions: vec![inscription_id(1), inscription_id(2)],
prev: None,
next: None,
},
"
<h1>Collections</h1>
<div class=thumbnails>
<a href=/inscription/1{64}i1><iframe .* src=/preview/1{64}i1></iframe></a>
<a href=/inscription/2{64}i2><iframe .* src=/preview/2{64}i2></iframe></a>
</div>
.*
prev
next
.*
"
.unindent()
);
}
#[test]
fn with_prev_and_next() {
assert_regex_match!(
CollectionsHtml {
inscriptions: vec![inscription_id(1), inscription_id(2)],
#44,986,775text )
.select_outgoing()
.unwrap()
.align_outgoing()
.add_value()
.unwrap()
.strip_value()
.deduct_fee()
.build()
.unwrap();
}
#[test]
#[should_panic(expected = "invariant: sat is at first position in recipient output")]
fn invariant_sat_is_aligned() {
let utxos = vec![(outpoint(1), Amount::from_sat(10_000))];
TransactionBuilder::new(
satpoint(1, 3_333),
BTreeMap::new(),
utxos.into_iter().collect(),
BTreeSet::new(),
recipient(),
[change(0), change(1)],
FeeRate::try_from(1.0).unwrap(),
Target::Postage,
)
.select_outgoing()
.unwrap()
.strip_value()
.deduct_fee()
.build()
.unwrap();
}
#[test]
#[should_panic(expected = "invariant: fee estimation is correct")]
fn invariant_fee_is_at_least_target_fee_rate() {
let utxos = vec![(outpoint(1), Amount::from_sat(10_000))];
TransactionBuilder::new(
satpoint(1, 0),
BTreeMap::new(),
utxos.into_iter().collect(),
#44,986,772text
match (self.file, self.batch) {
(Some(file), None) => {
parent_info = Inscribe::get_parent_info(self.parent, &index, &utxos, &client, chain)?;
postage = self.postage.unwrap_or(TransactionBuilder::TARGET_POSTAGE);
inscriptions = vec![Inscription::from_file(
chain,
file,
self.parent,
None,
self.metaprotocol,
metadata,
self.compress,
)?];
mode = Mode::SeparateOutputs;
destinations = vec![match self.destination.clone() {
Some(destination) => destination.require_network(chain.network())?,
None => get_change_address(&client, chain)?,
}];
}
(None, Some(batch)) => {
let batchfile = Batchfile::load(&batch)?;
parent_info = Inscribe::get_parent_info(batchfile.parent, &index, &utxos, &client, chain)?;
postage = batchfile
.postage
.map(Amount::from_sat)
.unwrap_or(TransactionBuilder::TARGET_POSTAGE);
#44,986,771text"to do normal bitcoin transactions, and keep your inscriptions wallet "
"separate."
msgstr ""
"sparrowスズメの銘文財布を使って非銘文ビットコインを送らないでください。通常の"
"ビットコイン取引が必要な場合は、はスズメの中に別の財布を設置して、銘文財布を"
"独立させることができます。"
#: src/guides/collecting/sparrow-wallet.md:108
msgid "Bitcoin's UTXO model"
msgstr "ビットコインのUTXO模型"
#: src/guides/collecting/sparrow-wallet.md:109
msgid ""
"Before sending any transaction it's important that you have a good mental "
"model for bitcoin's Unspent Transaction Output (UTXO) system. The way "
"Bitcoin works is fundamentally different to many other blockchains such as "
"Ethereum. In Ethereum generally you have a single address in which you store "
"ETH, and you cannot differentiate between any of the ETH - it is just all a "
"single value of the total amount in that address. Bitcoin works very "
"differently in that we generate a new address in the wallet for each "
"receive, and every time you receive sats to an address in your wallet you "
"are creating a new UTXO. Each UTXO can be seen and managed individually. You "
#44,985,977text