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

Sense API

Sense allows other applications or users to use Pastel's state-of-the-art Duplication Detection service by paying a negligible fee.

Process

  1. Navigate to /openapi/sense/upload to upload the image and get image_id and estimated_fee

  2. You'll need to burn 20% of the estimated_fee to start sense 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/sense/start/<<image_id>> to start sense register task. Use the transaction id and your pastelid. Expect a task_id in response.

  4. Call /openapi/sense/start/<<task_id>>/state: connect with this Websocket to monitor the status of Sense 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/sense/<<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/sense/download?pid=<<pastel_id>>&txid=<<tx_id>> to download the duplication detection results for the provided image. tx_id is the RegistrationTXID or reg_txid you'll see in response of (4) and (5).

PreviousAPINextCascade API

Last updated 2 years ago

Was this helpful?