There are 2 main objectives of Tezos API Gateway project:
- Interact with Tezos smart contract
- Follow up an operation
The diagrams shown in this documentation illustrate the asynchronous mode, where RabbitMQ is used to transfer messages between the web server and the workers (for the injection and send processes).
The synchronous mode doesn't use the workers or RabbitMQ : all actions are processed by the web server.
A job is created after a request to interact with Tezos smart contract sent to Tezos Api Gateway (through forge or send transactions)
JOB STATUS
The status of the job:
Status | Explanation |
---|---|
CREATED | The job is just created, which means a request to forge/send is just sent |
PUBLISHED | The request to interact with Tezos smart contract is published to Tezos (which means operation hash is formed) |
DONE | The job is done when the operation associated to it is confirmed on Tezos Block Chain |
There are 2 ways that user can interact with Tezos smart contract:
Tezos Api Gateway supports the Vault Signer.
If user want to perform the signing inside the Tezos Api Gateway using Vault, send transactions option is preferred. Send transactions will handle all the steps to submit the operation to Tezos Block Chain (forge, sign, pre-apply and inject).
SERVICES INVOLVE
- Generic/Generated API Web Server
- Send transactions worker
For any reasons that user does not want to use Vault Signer, or want to perform the signing process outside the system, he/she can choose forge and injection option. This process break the interaction into 2 steps:
- Forge: Using the parameters of the forge operation, a new raw transaction is created. The raw transaction requires the signature and can be sent to the blockchain at a later stage.
- Inject: Pre-apply the transactions and inject the operation using the signed raw transaction and signature.
SERVICES INVOLVE
- Generic/Generated API Web Server
- Injection worker
After submitting an operation to Tezos Blockchain, user might want to check the operation status (confirmed/failed) and build an alert system for that. Check operation status worker is built to serve this goal.
The worker will get the operation hash of the jobs with status PUBLISHED, then check the operation status by using Indexer Pool. If an operation is successfully confirmed on Tezos Blockhain, publish a message with the operation details.
SERVICES INVOLVE