1
Matthew Spaeth 3 weeks ago

error: Error validating transaction: Sum of inputs 9820000 lesser than outputs 10000000

When I run ‘node test.js’, I’m getting this error. I’m having trouble understanding what it means. Is the result not coming through the api call? 

{ error: 'Error validating transaction: Sum of inputs 9820000 lesser than outputs 10000000.' }
/mnt/c/Users/matts/Documents/blockgeeks/bitcoin101/src/webapi.js:89
                resolve(result.tx.hash);
                                  ^

TypeError: Cannot read property 'hash' of undefined
    at Request.request.post [as _callback] (/mnt/c/Users/matts/Documents/blockgeeks/bitcoin101/src/webapi.js:89:35)
    at Request.self.callback (/mnt/c/Users/matts/Documents/blockgeeks/bitcoin101/node_modules/request/request.js:185:22)
    at Request.emit (events.js:159:13)
    at Request.<anonymous> (/mnt/c/Users/matts/Documents/blockgeeks/bitcoin101/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:159:13)
    at IncomingMessage.<anonymous> (/mnt/c/Users/matts/Documents/blockgeeks/bitcoin101/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:254:19)
    at IncomingMessage.emit (events.js:164:20)
    at endReadableNT (_stream_readable.js:1054:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
  1. 1
    Jack Wu
    Jack Wu 2 weeks ago
    Based on the error, it’s saying that you’re trying to send more Bitcoin than you actually have. Make sure you get some testnet Bitcoin from a faucet online first.