-
Star
(178)
You must be signed in to star a gist -
Fork
(67)
You must be signed in to fork a gist
-
-
Save gavinandresen/3966071 to your computer and use it in GitHub Desktop.
| # Raw transaction API example work-through | |
| # Send coins to a 2-of-3 multisig, then spend them. | |
| # | |
| # For this example, I'm using these three keypairs (public/private) | |
| # 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU | |
| # 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk | |
| # 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw | |
| # First: combine the three keys into a multisig address: | |
| ./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874","048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213"]' | |
| { | |
| "address" : "3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC", | |
| "redeemScript" : "52410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353ae" | |
| } | |
| # Next, create a transaction to send funds into that multisig. Transaction d6f72... is | |
| # an unspent transaction in my wallet (which I got from the 'listunspent' RPC call): | |
| ./bitcoind createrawtransaction '[{"txid" : "d6f72aab8ff86ff6289842a0424319bf2ddba85dc7c52757912297f948286389","vout":0}]' '{"3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC":0.01}' | |
| 010000000189632848f99722915727c5c75da8db2dbf194342a0429828f66ff88fab2af7d60000000000ffffffff0140420f000000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e955108700000000 | |
| # ... and sign it: | |
| ./bitcoind signrawtransaction 010000000189632848f99722915727c5c75da8db2dbf194342a0429828f66ff88fab2af7d60000000000ffffffff0140420f000000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e955108700000000 | |
| { | |
| "hex" : "010000000189632848f99722915727c5c75da8db2dbf194342a0429828f66ff88fab2af7d6000000008b483045022100abbc8a73fe2054480bda3f3281da2d0c51e2841391abd4c09f4f908a2034c18d02205bc9e4d68eafb918f3e9662338647a4419c0de1a650ab8983f1d216e2a31d8e30141046f55d7adeff6011c7eac294fe540c57830be80e9355c83869c9260a4b8bf4767a66bacbd70b804dc63d5beeb14180292ad7f3b083372b1d02d7a37dd97ff5c9effffffff0140420f000000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e955108700000000", | |
| "complete" : true | |
| } | |
| # Now, create a transaction that will spend that multisig transaction. First, I need the txid | |
| # of the transaction I just created, so: | |
| ./bitcoind decoderawtransaction 010000000189632848f99722915727c5c75da8db2dbf194342a0429828f66ff88fab2af7d6000000008b483045022100abbc8a73fe2054480bda3f3281da2d0c51e2841391abd4c09f4f908a2034c18d02205bc9e4d68eafb918f3e9662338647a4419c0de1a650ab8983f1d216e2a31d8e30141046f55d7adeff6011c7eac294fe540c57830be80e9355c83869c9260a4b8bf4767a66bacbd70b804dc63d5beeb14180292ad7f3b083372b1d02d7a37dd97ff5c9effffffff0140420f000000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e955108700000000 | |
| { | |
| "txid" : "3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac", | |
| ... etc, rest omitted to make this shorter | |
| } | |
| # Create the spend-from-multisig transaction. Since the fund-the-multisig transaction | |
| # hasn't been sent yet, I need to give txid, scriptPubKey and redeemScript: | |
| ./bitcoind createrawtransaction '[{"txid":"3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac","vout":0,"scriptPubKey":"a914f815b036d9bbbce5e9f2a00abd1bf3dc91e9551087","redeemScript":"52410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353ae"}]' '{"1GtpSrGhRGY5kkrNz4RykoqRQoJuG2L6DS":0.01}' | |
| 0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c0000000000ffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000 | |
| # ... Now I can partially sign it using one private key: | |
| ./bitcoind signrawtransaction '0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c0000000000ffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000' '[{"txid":"3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac","vout":0,"scriptPubKey":"a914f815b036d9bbbce5e9f2a00abd1bf3dc91e9551087","redeemScript":"52410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353ae"}]' '["5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU"]' | |
| { | |
| "hex" : "0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c00000000fd15010048304502200187af928e9d155c4b1ac9c1c9118153239aba76774f775d7c1f9c3e106ff33c0221008822b0f658edec22274d0b6ae9de10ebf2da06b1bbdaaba4e50eb078f39e3d78014cc952410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353aeffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000", | |
| "complete" : false | |
| } | |
| # ... and then take the "hex" from that and complete the 2-of-3 signatures using one of | |
| # the other private keys (note the "hex" result getting longer): | |
| ./bitcoind signrawtransaction '0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c00000000fd15010048304502200187af928e9d155c4b1ac9c1c9118153239aba76774f775d7c1f9c3e106ff33c0221008822b0f658edec22274d0b6ae9de10ebf2da06b1bbdaaba4e50eb078f39e3d78014cc952410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353aeffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000' '[{"txid":"3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac","vout":0,"scriptPubKey":"a914f815b036d9bbbce5e9f2a00abd1bf3dc91e9551087","redeemScript":"52410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353ae"}]' '["5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw"]' | |
| { | |
| "hex" : "0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c00000000fd5d010048304502200187af928e9d155c4b1ac9c1c9118153239aba76774f775d7c1f9c3e106ff33c0221008822b0f658edec22274d0b6ae9de10ebf2da06b1bbdaaba4e50eb078f39e3d78014730440220795f0f4f5941a77ae032ecb9e33753788d7eb5cb0c78d805575d6b00a1d9bfed02203e1f4ad9332d1416ae01e27038e945bc9db59c732728a383a6f1ed2fb99da7a4014cc952410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353aeffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000", | |
| "complete" : true | |
| } | |
| # And I can send the funding and spending transactions: | |
| ./bitcoind sendrawtransaction 010000000189632848f99722915727c5c75da8db2dbf194342a0429828f66ff88fab2af7d6000000008b483045022100abbc8a73fe2054480bda3f3281da2d0c51e2841391abd4c09f4f908a2034c18d02205bc9e4d68eafb918f3e9662338647a4419c0de1a650ab8983f1d216e2a31d8e30141046f55d7adeff6011c7eac294fe540c57830be80e9355c83869c9260a4b8bf4767a66bacbd70b804dc63d5beeb14180292ad7f3b083372b1d02d7a37dd97ff5c9effffffff0140420f000000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e955108700000000 | |
| 3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac | |
| ./bitcoind sendrawtransaction 0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c00000000fd5d010048304502200187af928e9d155c4b1ac9c1c9118153239aba76774f775d7c1f9c3e106ff33c0221008822b0f658edec22274d0b6ae9de10ebf2da06b1bbdaaba4e50eb078f39e3d78014730440220795f0f4f5941a77ae032ecb9e33753788d7eb5cb0c78d805575d6b00a1d9bfed02203e1f4ad9332d1416ae01e27038e945bc9db59c732728a383a6f1ed2fb99da7a4014cc952410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353aeffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000 | |
| 837dea37ddc8b1e3ce646f1a656e79bbd8cc7f558ac56a169626d649ebe2a3ba | |
| # You can see these transactions at: | |
| # http://blockchain.info/address/3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC |
How do you obtain 'scriptPubKey' when you are the second party signing the transaction, and may not have known how the MultiSig address was originally created?
Found my answer --> "decoderawtransaction"
Hi there,
thank you for your great article.
I tried to do it step by step, but when submitting the transaction, I receive the following:
bitcoin-cli -regtest sendrawtransaction 0100000001e9c9a5c8d4a7e58e72b97e0d4ffc9dc6ff591af55d6751a6869d112097d6b9a300000000fdfd0000473044022019aabf229a168f5ef9610af1c2386ed4320fa66f78e4d77b0b5bd457484e8d8f02206b5bac92bf85bd03be96ea942d700e4a4c6f8f8dbfdf08c7848357ee14a5f88d01483045022100c6bcfb8d8018870140b48a2cac26ae777979dd403d9b0990b61a81385ddbf5a80220558248484224d9de8afab4fce376c43e59181611020480337254938db9f42983014c69522103cd316868fa25a0da24e75cbafe9e702da6c7171c59b1680464d4f8c1963e50ca21033bcdd9e06ab88647aad2e6d395d3f319d727cd5bd6c559711dbe3d7190b45dce210206c8411fdb01605a2394c7e8a336e6f93a9b28a38368eabf2cd42387ecaeec3253aeffffffff0100c2eb0b000000001976a914fa4ce907b496243ee5c1880a962f597c981ae80d88ac00000000
error: {"code":-25,"message":""}
However,
bitcoin-cli -regtest signrawtransaction '0100000001e9c9a5c8d4a7e58e72b97e0d4ffc9dc6ff591af55d6751a6869d112097d6b9a300000000fdfd0000473044022019aabf229a168f5ef9610af1c2386ed4320fa66f78e4d77b0b5bd457484e8d8f02206b5bac92bf85bd03be96ea942d700e4a4c6f8f8dbfdf08c7848357ee14a5f88d01483045022100c6bcfb8d8018870140b48a2cac26ae777979dd403d9b0990b61a81385ddbf5a80220558248484224d9de8afab4fce376c43e59181611020480337254938db9f42983014c69522103cd316868fa25a0da24e75cbafe9e702da6c7171c59b1680464d4f8c1963e50ca21033bcdd9e06ab88647aad2e6d395d3f319d727cd5bd6c559711dbe3d7190b45dce210206c8411fdb01605a2394c7e8a336e6f93a9b28a38368eabf2cd42387ecaeec3253aeffffffff0100c2eb0b000000001976a914fa4ce907b496243ee5c1880a962f597c981ae80d88ac00000000' '[{"txid":"a3b9d69720119d86a651675df51a59ffc69dfc4f0d7eb9728ee5a7d4c8a5c9e9","vout":0,"scriptPubKey":"a914e08d76f2616103e174d0c3184f5b7a22f55e6f9987","redeemScript":"522103cd316868fa25a0da24e75cbafe9e702da6c7171c59b1680464d4f8c1963e50ca21033bcdd9e06ab88647aad2e6d395d3f319d727cd5bd6c559711dbe3d7190b45dce210206c8411fdb01605a2394c7e8a336e6f93a9b28a38368eabf2cd42387ecaeec3253ae"}]' '[]'
{
"hex" : "0100000001e9c9a5c8d4a7e58e72b97e0d4ffc9dc6ff591af55d6751a6869d112097d6b9a300000000fdfd0000473044022019aabf229a168f5ef9610af1c2386ed4320fa66f78e4d77b0b5bd457484e8d8f02206b5bac92bf85bd03be96ea942d700e4a4c6f8f8dbfdf08c7848357ee14a5f88d01483045022100c6bcfb8d8018870140b48a2cac26ae777979dd403d9b0990b61a81385ddbf5a80220558248484224d9de8afab4fce376c43e59181611020480337254938db9f42983014c69522103cd316868fa25a0da24e75cbafe9e702da6c7171c59b1680464d4f8c1963e50ca21033bcdd9e06ab88647aad2e6d395d3f319d727cd5bd6c559711dbe3d7190b45dce210206c8411fdb01605a2394c7e8a336e6f93a9b28a38368eabf2cd42387ecaeec3253aeffffffff0100c2eb0b000000001976a914fa4ce907b496243ee5c1880a962f597c981ae80d88ac00000000",
"complete" : true
}
That is, the transaction seems to be valid.
Please would you mind providing some kind of help?
Thank you very much
Hello,
How can I create RAW TX and sign it with a few addresses
multisigAddress1
multisigAddress2
Any example ?
Hi, Before decoderawtransaction you need to sendrawtransaction and use the output for decoderawtransaction. It solves the error: {"code":-26,"message":"18: bad-txns-inputs-spent"} error.
Hi,
the above example does not work anymore. Can you please help.
-
multisig addresses when created do not start with 3 anymore
-
I can not sign the transaction no matter what I do
Please help, thanks.
As part of a class assignment I created a multi sig address and sent bitcoin to it but now I cannot find the transaction or the coin. Obvious novice error but it was not on test so ....Any help would be appreciated.
@lfcook11 try searching your bash history for the commands that created the address and redo them. You should get the same address.
@lfcook11 (and other people coming here in the future) If you remember the date and the amount you sent, you can use a block explorer search engine.
I Googled "search bitcoin transaction by date" and found this Stack Overflow answer:
Suppose I want to search for a transaction of exactly 445 BTC in the date range 27 July 2013 and Aug 3rd 2013 ... is there an (online?) tool that has this kind of search capabilities?
Blockchair allow you to query the bitcoin blockchain with lots of parameter such as date, BTC output amount, fee amount etc...
Here is your request: https://blockchair.com/bitcoin/transactions?q=time(2013-07-27..2013-08-03),output_total(44500000000)#
aymnb ash:
Docs: https://doc.termux.com
Community: https://community.termux.com
Working with packages:
- Search: pkg search
- Install: pkg install
- Upgrade: pkg upgrade
Report issues at https://bugs.termux.com
~/downloads $ cd ~/downloads/gold-wallet-firebase
bash: cd: /data/data/com.termux/files/home/downloads/gold-wallet-firebase: No such file or directory
~/downloads $ npm install firebase
npm error code ECONNRESET
npm error syscall read
npm error errno ECONNRESET
npm error network Invalid response body while trying to fetch https://registry.npmjs.org/@firebase%2fauth: read ECONNRESET
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help config'
npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2026-08-25T06_09_11_399Z-debug-0.log
~/downloads $ cd ~/downloads
~/downloads $ ls
'=3.0.0' binance-usdt-store
Lia-Cash-Demo.zip binance-usdt-store-market.html
Lia-Cash-Deploy-1.zip binance.USDT_Store_Demo.zip
Lia-Cash-One-File-Merged.html gold-ai
Lia-Cash-One-File.html gold-wallet-firebase.zip
SyriaAI gold-wallet-ui.zip
Syria_AI_v1_Flutter.zip index.html
'Tonstakers x Tonkeeper.xlsx' lia-cash
USD-Gold-Wallet-Firebase.zip style.css
access-capital-demo
~/downloads $ cd ~/downloads
unzip gold-wallet-firebase.zip -d gold-wallet-firebase
Archive: gold-wallet-firebase.zip
inflating: gold-wallet-firebase/firestore.indexes.json
creating: gold-wallet-firebase/public/
inflating: gold-wallet-firebase/README.md
inflating: gold-wallet-firebase/firebase.json
inflating: gold-wallet-firebase/firestore.rules
inflating: gold-wallet-firebase/public/style.css
inflating: gold-wallet-firebase/public/index.html
inflating: gold-wallet-firebase/public/firebase-config.js
inflating: gold-wallet-firebase/public/app.js
~/downloads $ command not found: unzip
The program not is not installed. Install it by executing:
pkg install llvm-tools
~/downloads $ pkg install unzip
date: /data/data/com.termux/cache/apt/pkgcache.bin: No such file or directory
Get:1 https://termux.net stable InRelease [1089 B]
Get:2 https://termux.net stable/main aarch64 Packages [254 kB]
Fetched 255 kB in 3s (73.8 kB/s)
All packages are up to date.
unzip is already the newest version (6.0-10).
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0
~/downloads $ unzip gold-wallet-firebase.zip -d gold-wallet-firebase
Archive: gold-wallet-firebase.zip
replace gold-wallet-firebase/firestore.indexes.json? [y]es, [n]o, [A]ll, [N]one, [r]ename: replace gold-wallet-firebase/firestore.indexes.json? [y]es, [n]o, [A]ll, [N]one, [r]ename:
new name: inflating: gold-wallet-firebase/old-wallet-firebase/firestore.indexes.json? [y]es, [n]o, [A]ll, [N]one, [r]ename:
replace gold-wallet-firebase/README.md? [y]es, [n]o, [A]ll, [N]one, [r]ename:
error: invalid response [{ENTER}]
replace gold-wallet-firebase/README.md? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: gold-wallet-firebase/README.md
inflating: gold-wallet-firebase/firebase.json
inflating: gold-wallet-firebase/firestore.rules
inflating: gold-wallet-firebase/public/style.css
inflating: gold-wallet-firebase/public/index.html
inflating: gold-wallet-firebase/public/firebase-config.js
inflating: gold-wallet-firebase/public/app.js
~/downloads $ cd ~/downloads/gold-wallet-firebase
~/downloads/gold-wallet-firebase $ ls
README.md firebase.json firestore.indexes.json firestore.rules old-wallet-firebase public
~/downloads/gold-wallet-firebase $ ~/downloads/gold-wallet-firebase
bash: /data/data/com.termux/files/home/downloads/gold-wallet-firebase: Is a directory
~/downloads/gold-wallet-firebase $ rm -rf old-wallet-firebase
~/downloads/gold-wallet-firebase $ ls
README.md firestore.indexes.json public
firebase.json firestore.rules
~/downloads/gold-wallet-firebase $ README.md
README.md: command not found
~/downloads/gold-wallet-firebase $ firebase.json
firebase.json: command not found
~/downloads/gold-wallet-firebase $ firestore.indexes.json
firestore.indexes.json: command not found
~/downloads/gold-wallet-firebase $ firestore.rules
firestore.rules: command not found
~/downloads/gold-wallet-firebase $ public
No command public found, did you mean:
Command curlie in package curlie
Command pic in package groff
Command polyc in package polyml
Command uic in package qt5-qtbase from the x11-repo repository
~/downloads/gold-wallet-firebase $ README.md: command not found
README.md:: command not found
~/downloads/gold-wallet-firebase $ firebase.json: command not found
firebase.json:: command not found
~/downloads/gold-wallet-firebase $ ~/downloads/gold-wallet-firebase $
bash: /data/data/com.termux/files/home/downloads/gold-wallet-firebase: Is a directory
~/downloads/gold-wallet-firebase $ firebase login
Already logged in as aynbasha3@gmail.com
~/downloads/gold-wallet-firebase $ README.md: command not found
README.md:: command not found
~/downloads/gold-wallet-firebase $ firebase.json: command not found
firebase.json:: command not found
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ Enable Gemini in Firebase features?
No command Enable found, did you mean:
Command babl in package babl
Command snake in package bsd-games
Command uname in package coreutils
Command gradle in package gradle
Command nala in package nala
Command nali in package nali
Command nimble in package nim
Command double in package plotutils from the x11-repo repository
Command vale in package vale
~/downloads/gold-wallet-firebase $ n
No command n found, did you mean:
Command nc in package busybox
Command [ in package coreutils
Command gn in package gn
Command k in package kona
Command nm in package llvm
Command sn in package mono
Command ne in package ne
Command nc in package netcat-openbsd
Command nc in package nmap
Command nu in package nushell
Command nx in package nxengine from the x11-repo repository
Command o in package orbiton
Command q in package q-dns-client
Command sn in package tin-summer
Command X in package xorg-server from the x11-repo repository
~/downloads/gold-wallet-firebase $ bcoin-wallet-5c2aa
bcoin-wallet-5c2aa: command not found
~/downloads/gold-wallet-firebase $ bcoin-wallet-f02bc
bcoin-wallet-f02bc: command not found
~/downloads/gold-wallet-firebase $ aymnbasha622@gmail.com
aymnbasha622@gmail.com: command not found
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ Already logged in as aymnbasha622@gmail.com
No command Already found, did you mean:
Command wdread in package wmaker from the x11-repo repository
~/downloads/gold-wallet-firebase $ ~/downloads/gold-wallet-firebase $
bash: /data/data/com.termux/files/home/downloads/gold-wallet-firebase: Is a directory
~/downloads/gold-wallet-firebase $ firebase projects:list
bcoin-wallet-f02bc
✔ Preparing the list of your Firebase projects
┌──────────────────────┬──────────────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID │ Project Number │ Resource Location ID │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ [Not specified] │ aymnbasha (current) │ 214454235155 │ [Not specified] │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ My First Project │ root-talon-464502-j1 │ 435974208430 │ [Not specified] │
└──────────────────────┴──────────────────────┴────────────────┴──────────────────────┘
2 project(s) total.
╭────────────────────────────────────────────────────────────────────╮
│ │
│ Update available 15.27.0 → 15.28.1 │
│ To update to the latest version using npm, run │
│ npm install -g firebase-tools │
│ For other CLI management options, visit the CLI documentation │
│ (https://firebase.google.com/docs/cli#update-cli) │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────╯
~/downloads/gold-wallet-firebase $ firebase projects:list
~/downloads/gold-wallet-firebase $
✔ Preparing the list of your Firebase projects
┌──────────────────────┬──────────────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID │ Project Number │ Resource Location ID │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ [Not specified] │ aymnbasha (current) │ 214454235155 │ [Not specified] │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ My First Project │ root-talon-464502-j1 │ 435974208430 │ [Not specified] │
└──────────────────────┴──────────────────────┴────────────────┴──────────────────────┘
2 project(s) total.
~/downloads/gold-wallet-firebase $ firebase projects:listfirebase logout
Error: projects:listfirebase is not a Firebase command
~/downloads/gold-wallet-firebase $ firebase login
Already logged in as aynbasha3@gmail.com
~/downloads/gold-wallet-firebase $ fayahdad@gmail.com
fayahdad@gmail.com: command not found
~/downloads/gold-wallet-firebase $ firebase projects:list
✔ Preparing the list of your Firebase projects
┌──────────────────────┬──────────────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID │ Project Number │ Resource Location ID │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ [Not specified] │ aymnbasha (current) │ 214454235155 │ [Not specified] │
├──────────────────────┼──────────────────────┼────────────────┼──────────────────────┤
│ My First Project │ root-talon-464502-j1 │ 435974208430 │ [Not specified] │
└──────────────────────┴──────────────────────┴────────────────┴──────────────────────┘
2 project(s) total.
~/downloads/gold-wallet-firebase $ firebase logout
✔ Logged out from aynbasha3@gmail.com
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ firebase login
i The Firebase CLI’s MCP server feature can optionally make use of Gemini in Firebase. Learn more about Gemini in Firebase and how it uses your data: https://firebase.google.com/docs/gemini-in-firebase#how-gemini-in-firebase-uses-your-data
✔ Enable Gemini in Firebase features? Yes
i Firebase optionally collects CLI and Emulator Suite usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
✔ Allow Firebase to collect CLI and Emulator Suite
usage and error reporting information? Yes
i To change your preferences at any time, run firebase logout and firebase login again.
Waiting for authentication...
✔ Success! Logged in as fayahdad@gmail.com
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ Already logged in as fayahdad@gmail.com
No command Already found, did you mean:
Command wdread in package wmaker from the x11-repo repository
~/downloads/gold-wallet-firebase $ firebase projects:list
⠹ Preparing the list of your Firebase projects
✔ Preparing the list of your Firebase projects
┌──────────────────────┬────────────────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID │ Project Number │ Resource Location ID │
├──────────────────────┼────────────────────────┼────────────────┼──────────────────────┤
│ Bcoin Wallet │ bcoin-wallet │ 410947966322 │ [Not specified] │
├──────────────────────┼────────────────────────┼────────────────┼──────────────────────┤
│ Bcoin Wallet │ bcoin-wallet-b73f7 │ 1035322192299 │ [Not specified] │
├──────────────────────┼────────────────────────┼────────────────┼──────────────────────┤
│ Bcoin Wallet │ bcoin-wallet-f02bc │ 839090712658 │ [Not specified] │
├──────────────────────┼────────────────────────┼────────────────┼──────────────────────┤
│ Planning With AI │ planning-with-ai-4ce14 │ 780335986791 │ [Not specified] │
└──────────────────────┴────────────────────────┴────────────────┴──────────────────────┘
4 project(s) total.
~/downloads/gold-wallet-firebase $ Bcoin Wallet
No command Bcoin found, did you mean:
Command join in package coreutils
~/downloads/gold-wallet-firebase $ bcoin-wallet-f02bc
bcoin-wallet-f02bc: command not found
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ ~/downloads/gold-wallet-firebase $
bash: /data/data/com.termux/files/home/downloads/gold-wallet-firebase: Is a directory
~/downloads/gold-wallet-firebase $ firebase use bcoin-wallet-f02bc
Now using project bcoin-wallet-f02bc
Now using project bcoin-wallet-f02bc
~/downloads/gold-wallet-firebase $ Now using project bcoin-wallet-f02bc
No command Now found, did you mean:
Command od in package coreutils
Command crow in package crow-translate from the x11-repo repository
Command eog in package eog from the x11-repo repository
Command eom in package eom from the x11-repo repository
Command eww in package eww from the x11-repo repository
Command glow in package glow
Command go in package golang
Command dot in package graphviz
Command gw in package gw from the x11-repo repository
Command iw in package iw from the root-repo repository
Command jo in package jo
Command joe in package joe
Command joe in package jupp
Command kew in package kew
Command not in package llvm-tools
Command forw in package mailutils
Command mod in package mono
Command mop in package mop
Command toe in package ncurses-utils
Command forw in package nmh
Command ol in package ol
Command o in package orbiton
Command moc in package qt5-qtbase from the x11-repo repository
Command rbw in package rbw
Command co in package rcs
Command sox in package sox
Command stow in package stow
Command top in package termux-tools
Command tor in package tor
Command col in package util-linux
Command wol in package wol
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ Now using project bcoin-wallet-f02bc
No command Now found, did you mean:
Command od in package coreutils
Command crow in package crow-translate from the x11-repo repository
Command eog in package eog from the x11-repo repository
Command eom in package eom from the x11-repo repository
Command eww in package eww from the x11-repo repository
Command glow in package glow
Command go in package golang
Command dot in package graphviz
Command gw in package gw from the x11-repo repository
Command iw in package iw from the root-repo repository
Command jo in package jo
Command joe in package joe
Command joe in package jupp
Command kew in package kew
Command not in package llvm-tools
Command forw in package mailutils
Command mod in package mono
Command mop in package mop
Command toe in package ncurses-utils
Command forw in package nmh
Command ol in package ol
Command o in package orbiton
Command moc in package qt5-qtbase from the x11-repo repository
Command rbw in package rbw
Command co in package rcs
Command sox in package sox
Command stow in package stow
Command top in package termux-tools
Command tor in package tor
Command col in package util-linux
Command wol in package wol
~/downloads/gold-wallet-firebase $ No command Bcoin...
No command No found, did you mean:
Command go in package golang
Command jo in package jo
Command o in package orbiton
Command co in package rcs
~/downloads/gold-wallet-firebase $ No command Now...
No command No found, did you mean:
Command go in package golang
Command jo in package jo
Command o in package orbiton
Command co in package rcs
~/downloads/gold-wallet-firebase $ ls
README.md firestore.indexes.json public
firebase.json firestore.rules
~/downloads/gold-wallet-firebase $ npm install firebase
⠹
npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/data/data/com.termux/files/home/downloads/gold-wallet-firebase/node_modules/@firebase/ai/dist'
npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/data/data/com.termux/files/home/downloads/gold-wallet-firebase/node_modules/@firebase/ai/dist'
npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/data/data/com.termux/files/home/downloads/gold-wallet-firebase/node_modules/@firebase/firestore/dist'
npm error code ECONNABORTED
npm error syscall read
npm error errno -103
npm error read ECONNABORTED
npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2026-08-25T07_55_38_105Z-debug-0.log
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ // Import the functions you need from the SDKs you need
bash: //: Is a directory
~/downloads/gold-wallet-firebase $ import { initializeApp } from "firebase/app";
The program import is not installed. Install it by executing:
pkg install imagemagick
~/downloads/gold-wallet-firebase $ import { getAnalytics } from "firebase/analytics";
The program import is not installed. Install it by executing:
pkg install imagemagick
~/downloads/gold-wallet-firebase $ // TODO: Add SDKs for Firebase products that you want to use
bash: //: Is a directory
~/downloads/gold-wallet-firebase $ // https://firebase.google.com/docs/web/setup#available-libraries
bash: //: Is a directory
~/downloads/gold-wallet-firebase $
~/downloads/gold-wallet-firebase $ // Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyDpb4okgPuFtK3qr-_4oIguwz7oRrdKmeM",
authDomain: "bcoin-wallet-f02bc.firebaseapp.com",
projectId: "bcoin-wallet-f02bc",
storageBucket: "bcoin-wallet-f02bc.firebasestorage.app",
messagingSenderId: "839090712658",
appId: "1:839090712658:web:eb04a141ae8ba75621ef8b",
measurementId: "G-DYNB00VBM0"
};// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
Bcoin Wallet
how can i import the multisign-addr to the qt wallet,or when the qt wallet will support the multisign-addr transaction?
I got a return:TX rejected (code -22) vwhen sendrawtransaction,what is the matter?