mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
requested changes
This commit is contained in:
parent
ff50d243bc
commit
e74fb096fc
@ -58,7 +58,7 @@ Content-Type: application/json
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
TPLS['post-tx-request'] = """\
|
TPLS['post-tx-request'] = """\
|
||||||
POST /api/v1/transactions/ HTTP/1.1
|
POST /api/v1/transactions?mode=async HTTP/1.1
|
||||||
Host: example.com
|
Host: example.com
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
|
@ -124,22 +124,19 @@ Transactions
|
|||||||
:statuscode 400: The request wasn't understood by the server, e.g. the ``asset_id`` querystring was not included in the request.
|
:statuscode 400: The request wasn't understood by the server, e.g. the ``asset_id`` querystring was not included in the request.
|
||||||
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/transactions
|
.. http:post:: /api/v1/transactions?mode={mode}
|
||||||
|
|
||||||
Push a new transaction.
|
Tendermint offers a `broadcast API
|
||||||
|
<http://tendermint.readthedocs.io/projects/tools/en/master/using-tendermint.html#broadcast-api>`_ with three different modes to post transactions.
|
||||||
|
By setting the mode, a new transaction can be pushed with a different mode than the default. The default mode is ``async``, which
|
||||||
|
will return immediately and not wait to see if the transaction is valid. The ``sync`` mode will return after the transactions is validated, while ``commit``
|
||||||
|
returns after a transaction is committed to a block.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The posted `transaction
|
|
||||||
<https://docs.bigchaindb.com/projects/server/en/latest/data-models/transaction-model.html>`_
|
|
||||||
should be structurally valid and not spending an already spent output.
|
|
||||||
The steps to build a valid transaction are beyond the scope of this page.
|
|
||||||
One would normally use a driver such as the `BigchainDB Python Driver
|
|
||||||
<https://docs.bigchaindb.com/projects/py-driver/en/latest/index.html>`_
|
|
||||||
to build a valid transaction.
|
|
||||||
|
|
||||||
A generalization of the parameter follows:
|
This option is only available when using BigchainDB with Tendermint.
|
||||||
|
|
||||||
:param mode: (Optional) Set the broadcast method.
|
:query string mode: (Optional) One of the three supported modes to send a transaction: ``async``, ``sync``, ``commit``.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
@ -165,25 +162,19 @@ Transactions
|
|||||||
:statuscode 202: The pushed transaction was accepted in the ``BACKLOG``, but the processing has not been completed.
|
:statuscode 202: The pushed transaction was accepted in the ``BACKLOG``, but the processing has not been completed.
|
||||||
:statuscode 400: The transaction was malformed and not accepted in the ``BACKLOG``.
|
:statuscode 400: The transaction was malformed and not accepted in the ``BACKLOG``.
|
||||||
|
|
||||||
.. http:post:: /api/v1/transactions?mode={mode}
|
|
||||||
|
.. http:post:: /api/v1/transactions
|
||||||
|
|
||||||
|
The endpoint without any parameters will push a new transaction. If BigchainDB is used with Tendermint, the default mode ``async`` is used.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
The posted `transaction
|
||||||
This option is only available when using BigchainDB with Tendermint.
|
<https://docs.bigchaindb.com/projects/server/en/latest/data-models/transaction-model.html>`_
|
||||||
|
should be structurally valid and not spending an already spent output.
|
||||||
Tendermint offers a `broadcast API
|
The steps to build a valid transaction are beyond the scope of this page.
|
||||||
<http://tendermint.readthedocs.io/projects/tools/en/master/using-tendermint.html#broadcast-api>`_ with three different modes to send transactions.
|
One would normally use a driver such as the `BigchainDB Python Driver
|
||||||
By setting the mode, a new transaction can be pushed with a different mode than the default. The default mode is ``broadcast_tx_async``, which
|
<https://docs.bigchaindb.com/projects/py-driver/en/latest/index.html>`_
|
||||||
will return immediately and not wait to see if the transaction is valid.
|
to build a valid transaction.
|
||||||
|
|
||||||
:query string mode: (Optional) One of the three supported modes to send a transaction: ``broadcast_tx_async``, ``broadcast_tx_sync``, ``broadcast_tx_commit``.
|
|
||||||
|
|
||||||
The only change for a request, compared to the one above, is to set the mode
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/transactions?mode={mode} HTTP/1.1
|
|
||||||
|
|
||||||
|
|
||||||
Transaction Outputs
|
Transaction Outputs
|
||||||
-------------------
|
-------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user