Pastel Network
  • Introduction
    • Pastel Overview
    • Pastel Token (PSL)
    • PSL Token Economics
    • Pastel Consensus Protocol
    • Key Features
  • Basics
    • Smart Ticket Structure
    • Fees and Burn
    • SuperNodes
      • SuperNode Staking
      • SuperNode States & Implications for Stake
      • SuperNode Operator Selection
      • SuperNode Fees
    • Governance
    • Accounts
  • Development Guide
    • Types of Pastel installations
      • Pastel Network Architecture
    • Requirements
      • Default directories
    • QuickStart: Running a Node
    • WalletNode
      • API
        • Sense API
        • Cascade API
        • NFT API
      • GRPC Interface
    • SuperNode
      • GRPC Interface
    • Pasteld Daemon
      • Pasteld CLI Implementation
      • Pasteld JSON-RPC API
    • Pastel-CLI
    • Understanding Smart Tickets
      • NFT Tickets
      • PastelID Tickets
    • Testing
    • Tutorials
      • Pastel Wallet App
    • Public Endpoints & Resources
    • Configurations
  • Sense Protocol
    • Sense Overview
    • Sense Basics
    • Building with Sense API
  • Cascade Protocol
    • Cascade Overview
    • Cascade Basics
    • Building with Cascade API
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Development Guide
  2. WalletNode
  3. API

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:

Process

  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).

PreviousSense APINextNFT API

Last updated 2 years ago

Was this helpful?