Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "{"result":null,"error":{"code":-26,"message":"16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)"},"id":"4fc9c1f7f56843908b58ed671642dc11"}[n]"
- iprinttoconsole=1
- regtest=1
- rpcport=18332
- rpcuser=test
- rpcpassword=password
- walletnotify=curl -X GET "http://localhost:8080/notify/?tx=%s"
- txindex=1
- reindex=1
- dbcache=4000
- rpcallowip=::/0
- List<Output> outputList = client.listUnspent(100);
- Output output = outputList.get(0);
- List<OutputOverview> list = new ArrayList<OutputOverview>() {{
- add(new OutputOverview(output.getTxId(), output.getVOut()));
- }};
- Map<String, BigDecimal> map = new HashMap<String, BigDecimal>() {{
- put("bchreg:qznpsg5vdjwlms2pr2ju6e0tv34jnhuc0sesqeqnfk", output.getAmount().subtract(new BigDecimal("0.0001")));
- }};
- String rawTxHex = client.createRawTransaction(list, map);
- client.walletPassphrase("bchisbitcoin", 30);
- SignatureResult signatureResult = client.signRawTransaction(rawTxHex);
- if(!signatureResult.getComplete()) {
- System.out.println("---------------------");
- }
- String txHash = client.sendRawTransaction(signatureResult.getHex());
- System.out.println(txHash);
Add Comment
Please, Sign In to add comment