Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

This is out of date. #2

Open
Fonta1n3 opened this issue Jul 23, 2019 · 0 comments
Open

This is out of date. #2

Fonta1n3 opened this issue Jul 23, 2019 · 0 comments

Comments

@Fonta1n3
Copy link

If any others followed this and had issues you can see this code which works. An amount field needs to be added and the order of the arguments is 'unsignedTx' [privateKeys] [prevTx]

curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransactionwithkey", "params":["0200000001f19aed4a275e9557778fcedffef11721dba3e8ad55eecab00954072ad2b3de610000000000010000000200e1f5050000000017a914753fb5395547d92c86447ef75d2eab46b3f47fc88730fb154e0200000017a9143c6d367277a9deed4119b3f7eb63dea807881d988700000000", ''["cRYhEC98686RyVJt7CPcZy5JwK27Lv1DFRVemrb7cWsJi4CY1MtK"]'', ''[{ "txid": "61deb3d22a075409b0caee55ade8a3db2117f1fedfce8f7757955e274aed9af1", "vout": 0, "scriptPubKey": "a9143c6d367277a9deed4119b3f7eb63dea807881d9887", "redeemScript": "532102254aba14091e45a9067fbe5b225b3863d1c49650226d583dcede06a7c33f86132102ad64a03b7fc53c02f68eac04743b819bfeeabe6ca7007f473dbaf7c3570f5dc92103f8af80bf1a98b5828473a757c26d8e1949e65b8d2d6fcd94bf71f640b212632653ae", "amount": 100 }]''] }' -H 'content-type: text/plain;' http://user:[email protected]:18443/
result = Optional({
    error = "<null>";
    id = curltest;
    result =     {
        complete = 0;
        errors =         (
                        {
                error = "Unable to sign input, invalid stack size (possibly missing key)";
                scriptSig = 00473044022050cf7497e9ddfda12a0f24583e6a27925c5a1d2f0164a674bc6e48074fd650e00220104d6c7872a7c9ab7c9962d971f2e55c87a83eb051c74528afafe397298caa6f01004c69532102254aba14091e45a9067fbe5b225b3863d1c49650226d583dcede06a7c33f86132102ad64a03b7fc53c02f68eac04743b819bfeeabe6ca7007f473dbaf7c3570f5dc92103f8af80bf1a98b5828473a757c26d8e1949e65b8d2d6fcd94bf71f640b212632653ae;
                sequence = 1;
                txid = 61deb3d22a075409b0caee55ade8a3db2117f1fedfce8f7757955e274aed9af1;
                vout = 0;
                witness =                 (
                );
            }
        );
        hex = 0200000001f19aed4a275e9557778fcedffef11721dba3e8ad55eecab00954072ad2b3de6100000000b500473044022050cf7497e9ddfda12a0f24583e6a27925c5a1d2f0164a674bc6e48074fd650e00220104d6c7872a7c9ab7c9962d971f2e55c87a83eb051c74528afafe397298caa6f01004c69532102254aba14091e45a9067fbe5b225b3863d1c49650226d583dcede06a7c33f86132102ad64a03b7fc53c02f68eac04743b819bfeeabe6ca7007f473dbaf7c3570f5dc92103f8af80bf1a98b5828473a757c26d8e1949e65b8d2d6fcd94bf71f640b212632653ae010000000200e1f5050000000017a914753fb5395547d92c86447ef75d2eab46b3f47fc88730fb154e0200000017a9143c6d367277a9deed4119b3f7eb63dea807881d988700000000;
    };
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant