-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendrawtransaction tx decode failed #4
Comments
./ipchain-cli createrawtransaction "[{"txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.0999}" |
I don't know what do you want to? txid is exist in the block chain, why do you want to createrawtransaction use same id? why? If you want to get the tx information, you should use gettransaction RPC function. |
i just want to use that output to make the other transaction's input,I am assembling a transaction.So use this “ createrawtransaction”command to sign。 |
IPC is based on the UTXO model. So txid is needed to create new transactions. If ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu is yours, you can use "Vout": 0. If ZCBhQ9JkxMKDkUmsAVuaMdPGuNFBsFMXVUPh is yours, you can use "Vout": 1. |
Are you sure your wallet correct private key exist or offline to create transaction? (If you change your wallet keys?) This RPC need your wallet to sign use your private key! Otherwise, you couldn't get good information. |
@FlyLiuYan Could you provide a example to use "createrawtransaction" to Rui2guo? Thanks! |
If I am offline signing,using the “createrawtransactionForIsolation” what does the scriptPubKey mean? |
@FlyLiuYan yeah ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu is mine,and i use the "vout": 0.instead of"Vout": 0. |
@Rui2guo You should use "46c90258ad23c2db1b1bba2c7e89cde145494bb0" as your scriptPubKey if you use last TX vout 0 as your New Tx Input. Good luck! |
@xiaohq002 Thank you for your help, but it does not work !./ipchain-cli createrawtransactionForIsolation "[{"amount":1.10000000 ,"scriptPubKey":"46c90258ad23c2db1b1bba2c7e89cde145494bb0","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}" could you teil me that What is this script, and where can I get it? |
@Rui2guo :Hi! OP_DUP : 0x76 so script pubkey is :”76a946c90258ad23c2db1b1bba2c7e89cde145494bb088ac” |
Your transaction format is correct. If offline you need have a online node. |
@xiaohq002 oh god!! ./ipchain-cli createrawtransactionForIsolation "[{"amount":1.1,"scriptPubKey":"76a946c90258ad23c2db1b1bba2c7e89cde145494bb088ac","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}" I really don't know where there is the problem. |
See these: "Your transaction format is correct. If offline you need have a online node. |
@Rui2guo Have you solved your problem? Your scriptPubkey field is OK with the corresponding field in ListunpentNormal. |
it does not work ,Why didn’t your project party develop the sdk corresponding to the signature?It is much more convenient for others to use. |
@Rui2guo I'd like to know how you can create a transaction with the creatrawtranaction interface, because the hexstring you're sending is in the wrong format and parsed incorrectly。 |
Yes, I just want to know why hexstring is the wrong format.My hexstring is a string structure generated by bitcoinj (bitcoin's signature algorithm),and |
Sure。“02000000017d5ef292b16a02631ddf8322c70982c5f4e05c34a918387c1d48af27a2bd2000000000006a4730440220654e1346ccac668db898ffe7c2d11381825b0d60a9fafc47f0acf660d83a69780220539ea55ad134fd79db746ab41a60792aec5298b6018bc9b594ac203d04cee28801210244de9ab8e30fc4b311ae1f27e0fc0eb0e0d335041fae7d8f53937b7539c7d4ccfeffffff020010a5d4e800000000001976a9149838c6db130ca27dc19241252ad0071360e1eab988ac0060c549a9d101000000001976a91457ddaf97efe60bd0c7b985f52a9d0f17866235c088ac00964f1500”。 |
@Rui2guo Our signature algorithm is consistent with bitcoin, but there is an increase in transaction structure. |
@summerxue1992 |
@Rui2guo It is recommended that we first look at the transaction structure in the source code.The transaction structure is modified in part Vout. |
@summerxue1992 I wonder if you can help me to modify the ipc's SDK for offline signing.I really don't know what you serialized, when assembling txhash,I don't know much about c++ 。i can give you my git url : https://github.com/Rui2guo/IPCcoinj.git i already have modified the param, you can also watch it. |
@Rui2guo Sorry, I can't help you. I don't understand java. |
./ipchain-cli createrawtransaction "[{"txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a9
error code: -8
error message:
Invalid parameter, txid can't found
but,My txid is there in the exploer :http://exploer.qingdoutech.com/insight/address/ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu
i just want to known the reason.
The text was updated successfully, but these errors were encountered: