({{, (RefLink[BlockchainTransactionSubmit, paclet:ref/BlockchainTransactionSubmit])[obj]
submits the transaction specified in the (RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction]) object obj to a blockchain.}})

OpenersNotesSection(Spacer1)Details

(RefLink[BlockchainTransactionSubmit, paclet:ref/BlockchainTransactionSubmit])[obj] sends obj to a node of the appropriate blockchain, submitting it for inclusion in a future block.

(RefLink[BlockchainTransactionSubmit, paclet:ref/BlockchainTransactionSubmit]) uses the "BlockchainBase" property of the provided (RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction]) object to connect to the appropriate blockchain.

(RefLink[BlockchainTransactionSubmit, paclet:ref/BlockchainTransactionSubmit]) will return a (RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction]) object with the added property "TransactionID".

(RefLink[BlockchainTransactionData, paclet:ref/BlockchainTransactionData]) can be applied to the result from (RefLink[BlockchainTransactionSubmit, paclet:ref/BlockchainTransactionSubmit]) to determine if the submitted transaction has yet been added to the blockchain.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create a Bitcoin Pay-to-Public-Key-Hash (RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction]):

btcTX=BlockchainTransaction[<|
"Inputs"->{
<|"TransactionID"->"79bd95a5c087cfc33904020b3cd31b11b97be7751c8a1ca57c5313d4ac848830","Index"->0|>},
"Outputs"->{
<|"Amount"->(QuantityPrefix[0.005`, "฿" , bitcoins, "Bitcoins"]),"Address"->"mgPhDaCzXcm4gmkxfz9sZKvpabmNGdLj52"|>,
<|"Amount"->(QuantityPrefix[0.044`, "฿" , bitcoins, "Bitcoins"]),"Address"->"mkHGstoUaDWzGxag29MEnp8WJPpfA45omK"|>},
"BlockchainBase"->{"Bitcoin", "Testnet"}|>]

Sign the transaction object using a WIF-encoded private key:

btcTXSigned=BlockchainTransactionSign[btcTX,"cVN2fsWXoxMkPGx5EL7X6grykQ3VSDfHPUg3CJhD8AC9pJ5y8Nhi"]

Send the signed transaction to the Bitcoin blockchain:

BlockchainTransactionSubmit[btcTXSigned]

Create an Ethereum (RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction]):

ethTX=BlockchainTransaction[<|"BlockchainBase"->{"Ethereum","Testnet"},"TransactionCount"->304,"Address"->"3535353535353535353535353535353535353535","Amount"->Quantity[0.002,"Ether"],"GasPrice"->Quantity[1,"GWei"]|>]

Sign the transaction object:

ethTXSign=BlockchainTransactionSign[ethTX, "CAAB89C53A5C8344E7AD79C4EE99B764DDA09F7B1083779470F6C14CA919757D"]

Send the signed transaction to the Ethereum blockchain:

ethTXSubmit = BlockchainTransactionSubmit[ethTXSign]

Verify the transaction using its "TransactionID":

txdata = BlockchainTransactionData[ethTXSubmit["TransactionID"],BlockchainBase->{"Ethereum","Testnet"}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[BlockchainTransaction, paclet:ref/BlockchainTransaction])  ▪  (RefLink[BlockchainTransactionSign, paclet:ref/BlockchainTransactionSign])  ▪  (RefLink[GenerateAsymmetricKeyPair, paclet:ref/GenerateAsymmetricKeyPair])  ▪  (RefLink[BlockchainKeyEncode, paclet:ref/BlockchainKeyEncode])  ▪  (RefLink[GenerateDigitalSignature, paclet:ref/GenerateDigitalSignature])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Working with Blockchains, paclet:guide/Blockchain])}})}})