📘
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
  • Flow with API key
  • Flow with a user token

Was this helpful?

Edit on GitHub
  1. Using TEOS API
  2. Dealing with blockchain transactions

Transaction creation and submission

Flow for signing transactions using user token authentication and using API key authentication

PreviousHow to get Ether for signing transactionsNextFirst transaction creation and submission for a new address on the private blockchain

Last updated 2 years ago

Was this helpful?

TEOS API consumers can submit signed transactions using the TEOS API. Each transaction mentioned in requires the same set of actions described in the diagrams below, using the asset creation process as an example.

Flow with API key

Prerequisite: The TEOS API user has access (direct or indirect) to the private keys of the public address for transaction signing.

Step 1. Post a transaction (for example creating an asset) with the specific public address which can sign the transaction afterward POST /odata/v0.8/Assets The TEOS API consumer interacts with the TEOS API to create an asset with the API key and provided asset data. The TEOS API prepares a blockchain transaction and returns a transaction object with signing parameters. Signing parameters can be retrieved again using received transaction id GET /odata/v0.8/Transactions({key})/GetSigningParameters

Step 2. Sign the transaction and submit it to POST /odata/v0.8/Transactions/{key}/Submit The TEOS API consumer signs the transaction with the private keys of the wallet address used for the transaction creation. The signed transaction must be submitted to the TEOS API with the API key

Flow with a user token

Step 1. TEOS authentication The TEOS API consumer interacts with AuthServer (TEOS Platform component representing TEOS Authentication service) to get a user token.

Step 2. Register user device at TxServer with user token and device id The TEOS API consumer interacts with TxServer to add the device to the list of authorized devices to make sure that all transactions created by the user can be pushed to this device and signed here. The TxServer returns a device token which must be used in further steps.

Step 3. Post transaction (for example, creating asset) with the public address of the selected wallet POST /odata/v0.8/Assets The TEOS API consumer interacts with the TEOS API to create an asset with the device token and the provided asset data by the user. The TEOS API prepares a blockchain transaction and returns the transaction object with signing parameters. Signing parameters can be retrieved again using received transaction id GET /odata/v0.8/Transactions({key})/GetSigningParameters

The signed transaction must be submitted to the TEOS API with the device token.

This is the flow for when the TEOS API consumer uses an API key to interact with the TEOS API.

This is the flow for when the TEOS authentication service is used for the user authentication and thus the TEOS API is called with a user token.

Step 4. Sign the transaction and submit it to TEOS API POST /odata/v0.8/Transactions/{key}/Submit The TEOS API consumer lets the user sign the transaction with the private keys of the wallet address used for creating the transaction. is a process of creating signature using transaction data and private keys of the signing address. There are libraries and utilities which are available for widely used code language, you can check the code of Autosigner, , as an example (ask your CoreLedger manager for the access if you don't have one).

Signing transaction
auto signing utility in C# provided by CoreLedger
Flow for submitting signed transaction with api key
Flow for submitting signed transaction with user token
Read more
Read more
Transaction types available in TEOS platform