diff --git a/src/connection.js b/src/connection.js index fb31fbc..e462b58 100644 --- a/src/connection.js +++ b/src/connection.js @@ -24,6 +24,7 @@ export default class Connection { 'outputs': 'outputs', 'transactions': 'transactions', 'transactionsSync': 'transactions?mode=sync', + 'transactionsAsync': 'transactions?mode=async', 'transactionsCommit': 'transactions?mode=commit', 'transactionsDetail': 'transactions/%(transactionId)s', 'assets': 'assets', @@ -118,7 +119,7 @@ export default class Connection { * @param transaction */ postTransaction(transaction) { - return this._req(this.getApiUrls('transactions'), { + return this._req(this.getApiUrls('transactionsCommit'), { method: 'POST', jsonBody: transaction }) @@ -134,6 +135,18 @@ export default class Connection { }) } + + /** + * @param transaction + */ + postTransactionAsync(transaction) { + return this._req(this.getApiUrls('transactionsAsync'), { + method: 'POST', + jsonBody: transaction + }) + } + + /** * @param transaction */