BlockchainTransactionSubmit (for Litecoin)
BlockchainTransactionSubmit[obj]
将 obj 所指定的 BlockchainTransaction 对象提交到莱特币区块链.
更多信息
- BlockchainTransactionSubmit[obj] 将交易提交至莱特币节点,以便后续被打包进区块中.
- BlockchainTransactionSubmit 将返回一个包含新增属性 "TransactionID" 的 BlockchainTransaction 对象 .
- BlockchainTransactionData 可以应用于 BlockchainTransactionSubmit 的结果,以确定提交的交易是否已被添加到莱特币区块链中.
- BlockchainTransactionSubmit 可以向莱特币主网(默认)和测试网提交交易. 这些网络是在 BlockchainTransaction 对象中指定的.
范例
打开所有单元 关闭所有单元基本范例 (1)
创建一个莱特币支付到公钥哈希的 BlockchainTransaction:
ltcTX = BlockchainTransaction[<|"Inputs" -> {<|"TransactionID" -> "5f38f453a3a36b540fd11480f9e07ae02ed14206e4a21ff351898b16b1615a79", "Index" -> 1|>}, "Outputs" -> {<|"Amount" -> Quantity[0.0001, "Litecoins"], "Address" -> "munDTMqa9V9Uhi3P21FpkY8UfYzvQqpmoQ"|>,
<|"Amount" -> Quantity[0.09977, "Litecoins"], "Address" -> "n2oz9uoyx2i5uj9wwPkj1sXN6dm8efe7n9"|>}|>, BlockchainBase -> {"Litecoin", "Testnet"}]ltcTXSigned = BlockchainTransactionSign[ltcTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{48067351049682456848332087651486245083783305555783485878336439165336160262912,
86265118836901232199742833912280553529588413604147325207 ... 2189122391110402380266844823627587263308329834036977,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A2pFKBWbemeSGJyOJDDf0PAYeiCFpELJhS6mPqd8f1sA"],
"PrivateByteArray" -> ByteArray["0fZvlotEk+koVRcqSixTrj5axlqRQV1AcEBeNPVUvvE="]]]]BlockchainTransactionSubmit[ltcTXSigned]可能存在的问题 (1)
不完整的多重签名 (1)
尝试提交部分签名的多重签名交易将返回一个 $Failed 输出:
ltcTX = BlockchainTransaction[<|"BlockchainBase" -> {"Litecoin", "Testnet"},
"Inputs" -> {
<|"TransactionID" -> "ded9b3f34da247e883e4242af710f5aa7439b2d39f47f7fcb6ba08d9abcf7e73", "Index" -> 0|>
},
"Outputs" -> {
<|"Amount" -> Quantity[0.00004, "Litecoins"], "Address" -> "QbGkcbSC5Y3e6cP87eLGS7EM9csQQujj9U"|>
}|>]ltcTXPartiallySigned = BlockchainTransactionSign[ltcTX, <|"PrivateKeys" -> {PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{107979500881536671708232537632503185481996798629419440902689565824755056043672,
2637454808094502922642620609608402222690883176095857765 ... 9932546330509479197220801016216185613865467267293385,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["Au66O1At9hyzPrP7jrH8x3+0Eu+iockh1KM1MemGIOaY"],
"PrivateByteArray" -> ByteArray["Kdbwgcvp8l5y34qidpHOP/qLecxBydEn97nfCKKcoMk="]]]}, "PublicKeys" -> {PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["A3JbPdNVSP2qOQQGZ8L356XoOXtca+x0yN/eJRFyZsSb"],
"PublicCurvePoint" ->
{51724874525444673739416721101123148946820313131304153131265018986533336040603,
48268731188414227634929888133357578613956172980857119866702680060264360725427}]], PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["Au66O1At9hyzPrP7jrH8x3+0Eu+iockh1KM1MemGIOaY"],
"PublicCurvePoint" ->
{107979500881536671708232537632503185481996798629419440902689565824755056043672,
26374548080945029226426206096084022226908831760958577652142947530277320333564}]], PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["A2oN92oQNAuhAQWLabDZHbQ8kuwIEtlRPlY5sRPfB66R"],
"PublicCurvePoint" ->
{47969838552476767063979266372986347156581982326487605026895634402235021504145,
106239829386092594197652494795106677088067962409072619345894133053834318874239}]]}, "RequiredKeys" -> 2|>]BlockchainTransactionSubmit[ltcTXPartiallySigned]相关指南
历史
2024年引入 (14.0)
文本
Wolfram Research (2024),BlockchainTransactionSubmit,Wolfram 语言函数,https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Litecoin.html.
CMS
Wolfram 语言. 2024. "BlockchainTransactionSubmit." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Litecoin.html.
APA
Wolfram 语言. (2024). BlockchainTransactionSubmit. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Litecoin.html 年
BibTeX
@misc{reference.wolfram_2026_blockchaintransactionsubmit, author="Wolfram Research", title="{BlockchainTransactionSubmit}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Litecoin.html}", note=[Accessed: 26-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaintransactionsubmit, organization={Wolfram Research}, title={BlockchainTransactionSubmit}, year={2024}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Litecoin.html}, note=[Accessed: 26-August-2026]}