Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.
Business

json rpc – Bitcoin RPC createrawtransaction parsing error

I’m trying to create a raw transaction using Bitcoin Core RPC via curl.

Python script:

import requests

data="{"jsonrpc":"2.0","id":"curltext","method":"createrawtransaction", "params": ["[{"txid":"bffa31485fe5bfbb7e86463ff6c7ee4f084936d54d0471fba7763538e7fd0aa6","vout":0, "sequence":1}]' '{"2Mt1FE9NVXP7fRYuPEZBHrFgoCEc4TGb2ZY":0.01}']}'
print(data)
rawtx = requests.post("http://user:pass@127.0.0.1:18443", data=data).text
print(rawtx)

Output error:

{"jsonrpc":"2.0","id":"curltext","method":"createrawtransaction", "params": ['[{"txid":"bffa31485fe5bfbb7e86463ff6c7ee4f084936d54d0471fba7763538e7fd0aa6","vout":0, "sequence":1}]' '{"2Mt1FE9NVXP7fRYuPEZBHrFgoCEc4TGb2ZY":0.01}']}
{'result': None, 'error': {'code': -32700, 'message': 'Parse error'}, 'id': None}

I’ve tried escaping it multiple ways, but it doesn’t work.

Bitcoin CLI command:

bitcoin-cli -testnet createrawtransaction '[{"txid":"bffa31485fe5bfbb7e86463ff6c7ee4f084936d54d0471fba7763538e7fd0aa6","vout":0, "sequence":1}]' '{"2Mt1FE9NVXP7fRYuPEZBHrFgoCEc4TGb2ZY":0.01}'

Expected output (tx hex):

0200000001a60afde7383576a7fb71044dd53649084feec7f63f46867ebbbfe55f4831fabf0000000000010000000140420f000000000017a9140853562996d502a0abe2538657e5bf7bb261b6868700000000

json rpc – Bitcoin RPC createrawtransaction parsing error

Source link json rpc – Bitcoin RPC createrawtransaction parsing error

Related Articles

Back to top button
situs toto situs togel bo togel bo togel situs toto agen togel situs toto bo togel situs togel situs toto slot gacor toto slot