diff --git a/pisa-btc/apps/cli/PISA-API.md b/pisa-btc/apps/cli/PISA-API.md index 9048406..5369de5 100644 --- a/pisa-btc/apps/cli/PISA-API.md +++ b/pisa-btc/apps/cli/PISA-API.md @@ -2,9 +2,9 @@ ### Disclaimer: Everything in here is experimental and subject to change. -The PISA REST API consists, currently, of two endpoints: `\` and `\check_appointment` +The PISA REST API consists, currently, of two endpoints: `/` and `/check_appointment` -`\` is the default endpoint, and is where the appointments should be sent to. `\` accepts `HTTP POST` requests only, with json request body, where data must match the following format: +`/` is the default endpoint, and is where the appointments should be sent to. `/` accepts `HTTP POST` requests only, with json request body, where data must match the following format: {"locator": l, "start_time": s, "end_time": e, "dispute_delta": d, "encrypted_blob": eb, "cipher": @@ -46,7 +46,7 @@ The API will return a `text/plain` HTTP response code `200/OK` if the appointmen # Check appointment -`\check_appointment` is a testing endpoint provided to check the status of the appointments sent to PISA. The endpoint is accessible without any type of authentication for now. `\check_appointment` accepts `HTTP GET` requests only, where the data to be provided must be the locator of an appointment. The query must match the following format: +`/check_appointment` is a testing endpoint provided to check the status of the appointments sent to PISA. The endpoint is accessible without any type of authentication for now. `/check_appointment` accepts `HTTP GET` requests only, where the data to be provided must be the locator of an appointment. The query must match the following format: `http://pisa_server:pisa_port/check_appointment?locator=appointment_locator` diff --git a/pisa-btc/apps/cli/README.md b/pisa-btc/apps/cli/README.md index 1987621..ffc0139 100644 --- a/pisa-btc/apps/cli/README.md +++ b/pisa-btc/apps/cli/README.md @@ -43,11 +43,11 @@ This command is used to register appointments to the PISA server. Appointments * `tx_id` **must** match the **commitment transaction id**, and will be used to encrypt the **justice transaction** and **generate the locator**. `type(tx_id) = hex encoded str` -`s` is the time when the PISA server will start watching your transaction, and will normally match with whenever you will be offline. `s` is measured in block height, and must be **higher than the current block height** and not too close to it. `type(s) = int` +`s` is the time when the PISA server will start watching your transaction, and will normally match to whenever you will be offline. `s` is measured in block height, and must be **higher than the current block height** and not too close to it. `type(s) = int` `e` is the time where the PISA server will stop watching your transaction, and will normally match which whenever you should be back online. `e` is also measured in block height, and must be **higher than** `s`. `type(e) = int` -`d` is the time PISA would have to respond with the **justice transaction** once the **dispute transaction** is seen in the blockchain. `d` must match with the `OP_CSV` specified in the dispute transaction. If the dispute_delta does not match the `OP_CSV `, PISA would try to respond with the justice transaction anyway, but success is not guaranteed. `d` is measured in blocks and should be, at least, `20`. `type(d) = int` +`d` is the time PISA would have to respond with the **justice transaction** once the **dispute transaction** is seen in the blockchain. `d` must match with the `OP_CSV` specified in the dispute transaction. If the dispute_delta does not match the `OP_CSV `, PISA would try to respond with the justice transaction anyway, but success is not guaranteed. `d` is measured in blocks and should be at least `20`. `type(d) = int` The API will return a `text/plain` HTTP response code `200/OK` if the appointment is accepted, with the locator encoded in the response text, or a `400/Bad Request` if the appointment is rejected, with the rejection reason encoded in the response text.