Skip to content

Commit

Permalink
Remove New Contract Documentation
Browse files Browse the repository at this point in the history
We intend to let the user generate their testing files
client side, instead of on the server(which would
botteneck everything). Instead we will let the user update
the number of files they have using the generation
scheme.
  • Loading branch information
super3 committed Jul 28, 2015
1 parent 2184066 commit 41b39d4
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,55 +144,6 @@ Success Examples:
1CgLoZT1ZuSHPBp3H4rLTXJvEUDV3kK7QK | Last Seen: 13 second(s) | Last Audit: 11 hour(s)
1QACy1Tx5JFzGDyPd8J3oU8SrjhkZkru4H | Last Seen: 14 second(s) | Last Audit: 11 hour(s)

New Contract
************

Farmer want to get a new contract. We want to give them a "proof of capacity" contract, also known as a state "0" contract.

::

GET /api/contract/new/<btc_address>

Success Example:

::

GET /api/contract/new/191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc/
RESPONSE:
Status Code: 200
Text:
{
"btc_addr": "191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc",
"byte_size": 10485760,
"contract_type": 0,
"file_hash": "d83c2384e8607e3f521eb00fa4866ceb6c8032983c31e8ab614d7bac5ff49475",
"seed": "102255e2105f2e6b4fe0579b"
}

Partial-Fail Example:

Generating state "0" contracts takes a little processing power on the node side. We have to use `RandomIO <https://github.com/Storj/RandomIO>`_ to first generate the file for ourselves. If the number of clients requesting data outstrips the nodes capacity to generate this data, you will get this error.

::

GET /api/contract/new/191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc/
Status Code: 102
Text: Contract Failed: Contract Capacity Limit Reached.

Fail Example:

::

GET /api/contract/new/notvalidaddress/
RESPONSE:
Status Code: 400
Text: Contract Failed: Invalid BTC Address.

GET /api/contract/new/1EawBV7n7f2wDbgxJfNzo1eHyQ9Gj77oJd/
RESPONSE:
Status Code: 404
Text: Contract Failed: Farmer not found.

List Contracts
**************

Expand Down

0 comments on commit 41b39d4

Please sign in to comment.