diff --git a/app/modules/prover/index.ts b/app/modules/prover/index.ts index 3da0e1fb473d5380f828a873376e5ad048f0ccf3..6bf5ceef05f3db500be5391a32b155790374dbce 100644 --- a/app/modules/prover/index.ts +++ b/app/modules/prover/index.ts @@ -145,13 +145,13 @@ function generateAndSend(program:any, difficulty:string, server:Server, getGener return new Promise((resolve, reject) => { if (!program.submitLocal) { if (!program.submitHost) { - throw 'Option --submitHost is required.' + throw 'Option --submit-host is required.' } if (!program.submitPort) { - throw 'Option --submitPort is required.' + throw 'Option --submit-port is required.' } if (isNaN(parseInt(program.submitPort))) { - throw 'Option --submitPort must be a number.' + throw 'Option --submit-port must be a number.' } } async.waterfall([ diff --git a/doc/HTTP_API.md b/doc/HTTP_API.md index 8a4b818bd0196282ca13c4c5957ba03401db7297..af9f77429b9045505845e887ff32da5c092f37d8 100644 --- a/doc/HTTP_API.md +++ b/doc/HTTP_API.md @@ -8,7 +8,7 @@ * [API](#api) * [node/](#node) * [summary](#nodesummary) - * [sandboxes](#sandboxes) + * [sandboxes](#nodesandboxes) * [wot/](#wot) * [add](#wotadd) * [certify](#wotcertify) @@ -45,6 +45,7 @@ * [process](#txprocess) * [sources/[pubkey]](#txsourcespubkey) * [history/[pubkey]](#txhistorypubkey) + * [history/[pubkey]/pending](#txhistorypubkeypending) * [history/[pubkey]/blocks/[from]/[to]](#txhistorypubkeyblocksfromto) * [history/[pubkey]/times/[from]/[to]](#txhistorypubkeytimesfromto) * [ud/](#ud) @@ -1508,6 +1509,99 @@ The full transaction history for the given `pubkey` } ``` +#### `tx/history/[pubkey]pending` + +**Goal** + +Get the wallet transaction pending history + +**parameters** + +Name | Value | Method +---- | ----- | ------ +`pubkey` | Wallet public key. | URL + +**Returns** + +The pending transaction history for the given `pubkey` +```json +{ + "currency": "g1", + "pubkey": "8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD", + "history": { + "sending": [ + { + "version": 10, + "locktime": 0, + "blockstamp": "126087-000005A3F03F05E57D538265068948AFAC839B149FF6ABE1CFE62F3568EC2453", + "blockstampTime": 1528309130, + "issuers": [ + "8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD" + ], + "inputs": [ + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:124577", + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:124863", + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:125149" + ], + "outputs": [ + "3000:0:SIG(DfAT7wGnRG4c3vnCDSfF5CW8HkwLRL6bMb1ykQPiAgCX)", + "6:0:SIG(8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD)" + ], + "unlocks": [ + "0:SIG(0)", + "1:SIG(0)", + "2:SIG(0)" + ], + "signatures": [ + "ySMUI6qn1S2vCdXiLdDBKF8XgvzrCvgOUeMkrdDdkU2v2S0c0RhZrOrMxxq8iymx6i7k5EmA+6BRBIOPMa7mCg==" + ], + "comment": "merci pour les moufles et a mardi pour l apero monnaie libre", + "hash": "C7138CEFB2BF6C92C92EA809AF8C90DEC79B5E6F6C0A0E34434260EF706A1BF2", + "time": null, + "block_number": null, + "received": 1528311498 + } + ], + "received": [], + "receiving": [], + "sent": [], + "pending": [ + { + "version": 10, + "locktime": 0, + "blockstamp": "126087-000005A3F03F05E57D538265068948AFAC839B149FF6ABE1CFE62F3568EC2453", + "blockstampTime": 1528309130, + "issuers": [ + "8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD" + ], + "inputs": [ + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:124577", + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:124863", + "1002:0:D:8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD:125149" + ], + "outputs": [ + "3000:0:SIG(DfAT7wGnRG4c3vnCDSfF5CW8HkwLRL6bMb1ykQPiAgCX)", + "6:0:SIG(8MPJrxpkd8E5VeKTMrgD7ZjL8SYRPrC6hi2KeP4QFbaD)" + ], + "unlocks": [ + "0:SIG(0)", + "1:SIG(0)", + "2:SIG(0)" + ], + "signatures": [ + "ySMUI6qn1S2vCdXiLdDBKF8XgvzrCvgOUeMkrdDdkU2v2S0c0RhZrOrMxxq8iymx6i7k5EmA+6BRBIOPMa7mCg==" + ], + "comment": "merci pour les moufles et a mardi pour l apero monnaie libre", + "hash": "C7138CEFB2BF6C92C92EA809AF8C90DEC79B5E6F6C0A0E34434260EF706A1BF2", + "time": null, + "block_number": null, + "received": 1528311498 + } + ] + } +}⎠+``` + #### `tx/history/[PUBKEY]/blocks/[from]/[to]` **Goal**