Cascade API

If you'd like to store files on the blockchain, but not necessarily make an NFT or perform dupe-detection, you can use the Cascade API interface.

To do so, use the /openapi/cascade section of Swagger:


  1. Navigate to /openapi/cascade/upload to upload the file and get file_id and estimated_fee

  2. You'll need to burn 20% of the estimated_fee to start cascade register task. Send 20% of the estimated burn fee (rounded up) to the burn address PtpasteLBurnAddressXXXXXXXXXXbJ5ndd (so if the estimated burn fee is 100 PSL, send 20). Note the response transaction id.

  3. Call /openapi/cascade/start/<<file_id>> to start cascade register task. Use the transaction id and your pastelid. Expect a task_id in response.

  4. Call /openapi/cascade/start/<<task_id>>/state: connect with this websocket to monitor the status of Cascade register task. This will, over time, allow you to see the state of the supernodes as they process it. When this yields "Task Completed" your art has been processed by the blockchain!

  5. Use /openapi/cascade/<<task_id>>/history` to see task status history and details because websocket mentioned in (4) will only remain active until the registration process is active.

  6. Use /openapi/cascade/download?pid=<<pastel_id>>&txid=<<tx_id>> to download the original file any time. tx_id is the RegistrationTXID or reg_txid you'll see in response of (4) and (5).

Last updated