Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 942c181

Browse files
authored
Merge pull request #132 from Bitcoin-com/stage
Single raw tx.
2 parents cf2ab64 + f0ea37d commit 942c181

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/data/docs/bitbox/rawtransactions.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Submits raw transaction (serialized, hex-encoded) to local node and network. Als
129129

130130
#### Arguments
131131

132-
1. hexstrings `Array` required: Array of raw hex strings
132+
1. hex `String` required: raw hex string
133133

134134
#### Result
135135

@@ -140,19 +140,10 @@ hex `Array` Array of txids
140140
// single tx
141141
(async () => {
142142
try {
143-
let sendRawTransaction = await BITBOX.RawTransactions.sendRawTransaction(["01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000"]);
143+
let sendRawTransaction = await BITBOX.RawTransactions.sendRawTransaction("01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000");
144144
console.log(sendRawTransaction);
145145
} catch(error) {
146146
console.error(error)
147147
}
148148
})()
149149
// ['0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098']
150-
151-
// multiple txs
152-
(async () => {
153-
let hex1 = '020000000148735fcdac94c51459f7d8f787cf363c618125bc0f9092092ed2ebccd0f5557e0000000069463043021f4e3dd1fadb3e8fabdbd94b125d7e97932f72bb08118407e49cf505e7f5f63b022062eee3c5d94b4bc6b68ab0018876e9661b257f1e8487173876faccf7d3a2220541210313299e9ec7a9e62789094b850ab6f71df7c39af7c03568027c24d0bc9eda930dffffffff017b140000000000001976a914e11ed7fd6416d8f5c58a1cb3e1b0005c3cab092f88ac00000000';
154-
let hex2 = '0200000001a1b5849a5026642d5e28abdb4e98aa483adc20daab44c39e2f41acf72aa8c845000000006b483045022100994ab28c7df64852057c3ab965148ef2b5456233c12774087e88a62bbc27d4230220504d1096ac52915d32d2356ba5ae82f202543b88c24b4643800919e85da333984121039c48c06ce551810a2eeedf516c77995a922ca65c4e9e9a0a07288a6fae149eb2ffffffff013b1e0000000000001976a9140377597dd75d41398259c36d05a5a68ba0af782d88ac00000000';
155-
let sendRawTransaction = await BITBOX.RawTransactions.sendRawTransaction([hex1, hex2]);
156-
console.log(sendRawTransaction);
157-
})()
158-
// [ 'af9be699a4987286cbf8837d935f4f91b319271551163597e969bacc66b6565f', '6e841510f3e4c1a5fae618596241e8be12b1c24f73754f705f8973076afaa6fe' ]

0 commit comments

Comments
 (0)