# Generated by Scrape::ApiDefinitionsJob: 2018-09-25 01:15:43 UTC
# See: https://git.io/vx5CY
---
- name: Network Broadcast API
  description: |
    Used to broadcast transactions and blocks. **These AppBase API methods are
    still under development and subject to change.**

    Also see: [Blockchain Ops]({{ '/apidefinitions/broadcast-ops.html' | relative_url }})
  methods:
  - api_method: network_broadcast_api.broadcast_block
    purpose: Used to broadcast a block.
    parameter_json: '{"block":{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}}'
    expected_response_json: "{}"
    curl_examples:
    - '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_block", "params":{"block":{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}},
      "id":1}'
    expected_curl_responses:
    - attempting to push a block that is too old
    client_docs:
      - '[hive-js](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast-api)'
      - '[beem](https://beem.readthedocs.io/en/latest/beem.transactionbuilder.html)'
      - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/TransactionBuilder)'
  - api_method: network_broadcast_api.broadcast_transaction
    purpose: Used to broadcast a transaction.
    parameter_json: '{"trx":{"ref_block_num":0,"ref_block_prefix":0,"expiration":"1970-01-01T00:00:00","operations":[],"extensions":[],"signatures":[]},"max_block_age":-1}'
    expected_response_json: "{}"
    curl_examples:
    - '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"hiveio","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50},
      "id":1}'
    - '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}}],"extensions":[],"signatures":[]},"max_block_age":50},
      "id":1}'
    expected_curl_responses:
    - Internal Error
    - Internal Error
    client_docs:
      - '[hive-js](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast-api)'
      - '[beem](https://beem.readthedocs.io/en/latest/beem.transactionbuilder.html)'
      - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/TransactionBuilder)'
