📘
TEOS User Guides
Contact CoreLedgerPrivacy Policy
TEOS API
TEOS API
  • 👋Welcome to TEOS API
  • Get started
  • TEOS API overview
    • Terms and concepts
      • Asset
      • Spark
      • Wallet
      • Supply
      • Warp
      • Invoice
      • Transaction
    • Architecture note
      • Tenant setup options
    • Authentication
    • Versioning
  • Using TEOS API
    • Postman examples
    • Rate limits
    • Dealing with blockchain transactions
      • How to get Ether for signing transactions
      • Transaction creation and submission
        • First transaction creation and submission for a new address on the private blockchain
    • Handling errors
      • 1xxxx codes
      • 2xxxx codes
      • 3xxxx codes
    • TEOS Events
    • Warp search
  • TEOS API references
    • TEOS API Swagger (OpenAPI)
  • Using additional APIs of TEOS Platform
    • User authentication flow with TEOS Authentication service and TMS
    • Device authorization flow with TxServer and TEOS Authentication service
    • Adding wallet to the TEOS Platform flow with TxServer and TEOS API
    • Using TxServer API
      • TxServer API (OpenAPI)
      • Key Pair Generation. Transaction Signing
      • Device Restoration
    • Using TEOS Authentication service
      • TEOS Authentication Service API
    • Using TMS API
      • TMS API Swagger (OpenAPI)
      • Handling errors
      • Changelog
    • Using Discovery Service
  • FAQ
  • Changelog
    • v0.9
    • Non-versioned changes
    • Previous versions (not supported)
  • Troubleshooting
Powered by GitBook
On this page
  • WarpFound
  • WarpSearchSummary

Was this helpful?

Edit on GitHub
  1. Using TEOS API

Warp search

PreviousTEOS EventsNextTEOS API references

Last updated 1 year ago

Was this helpful?

From client application perspective, warp search consists of two major steps: initiate a search, using http request, which returns the search identifier, and then subscribe to warp search results, using the provided search id. Details are provided below.

  1. Initiate a warp search.

    Warp search is initiated, using the corresponding endpoint (/warps/search). Please refer to for details.

  2. Subscription to search results.

    Search results are returned as RabbitMQ events (Please refer to for details about connection to RabbitMQ of TEOS Api).

    After receiving the search Id in the step 1, the client needs to subscribe to events from the queue named "warps-{searchId}" ({searchId} must be replaced by the actual identifier of the search, retrieved in step 1). TEOS Api guarantees, that the queue exists by the time of returning the response in step 1. The queue exists for 5 minutes.

There are two types of messages, that can arrive from the queue:

WarpFound

Contains the details of the warp. Example of the message:

{
  "Type": "WarpFound",
  "SearchId": "2fa2b214-93d4-4391-8071-c629e16cc5a4",
  "GrossProbabilityFactor": 0.95,
  "InputAssetId": "0827cb8534cfaba240cc90001",
  "InputAmount": "4",
  "OutputAssetId": "0c271bf2bec1796539ab20001",
  "OutputAmount": "1",
  "SupplyIds": [
    "0x827CB8534CFABA240CC90001C271BF2BEC1796539AB2000168E4D1DC000007C7"
  ],
  "EstimatedGasCost": "200386",
  "Length": 1,
  "MaxPossibleOutputAmount": "97",
  "DetailedSteps": [
    {
      "Supply": "0x827CB8534CFABA240CC90001C271BF2BEC1796539AB2000168E4D1DC000007C7",
      "IncomingAssetId": "0827cb8534cfaba240cc90001",
      "OutgoingAssetId": "0c271bf2bec1796539ab20001",
      "IncomingAmount": "4",
      "OutgoingAmount": "1",
      "RemainingSupplyAmount": "97",
      "MaximalPossibleAmount": "1",
      "SupplyExtRef": "0x68e4d1dc"
    }
  ],
  "RequestCharacteristic": "Ok",
  "ExchangeRate": {
    "Mantissa": "25",
    "Exponent": -2
  }
}

WarpSearchSummary

Contains the summary of warp search. Please be aware that due to async nature of the warp search, this message does not necessarily arrive after all the result have arrived. The FoundWarpCount property shows, how many WarpFound messages must arrive within this search.

{
  "Type": "WarpSearchSummary",
  "SearchId": "2fa2b214-93d4-4391-8071-c629e16cc5a4",
  "FoundWarpCount": 1
}
Developer Reference
this section