mirror of
https://github.com/eosswedenorg/thalos-docs
synced 2026-06-16 04:34:55 +02:00
Initial Commit
This commit is contained in:
commit
f81ec14da7
21 changed files with 1781 additions and 0 deletions
8
docs/api/clients.md
Normal file
8
docs/api/clients.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Clients
|
||||
|
||||
List of officially supported client libraries
|
||||
|
||||
| Name | Language |
|
||||
| ------------------------------------------------------------------- | -------- |
|
||||
| [thalos-go](https://github.com/eosswedenorg/thalos/tree/master/api) | Golang |
|
||||
| [thalos-nodejs](https://github.com/eosswedenorg/thalos-nodejs) | Nodejs |
|
||||
62
docs/api/messages.md
Normal file
62
docs/api/messages.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# Messages
|
||||
|
||||
This document describes the different messages that are sent
|
||||
|
||||
## Encoding
|
||||
|
||||
All messages are encoded in `json` format
|
||||
|
||||
## Types
|
||||
|
||||
### HeartBeat
|
||||
|
||||
Heartbeat messages are posted to the heartbeat channel periodically.
|
||||
|
||||
| Field | Datatype | Description |
|
||||
| -------------------------- | -------- | ------------------------------------------- |
|
||||
| blocknum | int | Current block number |
|
||||
| head_blocknum | int | Head block number |
|
||||
| last_irreversible_blocknum | int | block number of the last irreversible block |
|
||||
|
||||
### Transaction
|
||||
|
||||
|
||||
### ActionTrace
|
||||
|
||||
| Field | Datatype | Description |
|
||||
| -------------- | ----------------- | ----------------------------------------------------------------- |
|
||||
| tx_id | string | Transaction ID |
|
||||
| blocknum | int | Block number where this action trace (and transaction) belongs to |
|
||||
| blocktimestamp | time | Block timestamp |
|
||||
| receipt | ActionReceipt | Action receipt |
|
||||
| receiver | string | Receiver account |
|
||||
| contract | string | Contract account |
|
||||
| action | string | What action was executed on the contract |
|
||||
| data | any | Contract specific data (decoded using the contracts abi) |
|
||||
| authorization | PermissionLevel[] | Authorization |
|
||||
|
||||
### ActionReceipt
|
||||
|
||||
| Field | Datatype | Description |
|
||||
| --------------- | --------------------- | ------------------ |
|
||||
| receiver | string | Actor account name |
|
||||
| act_digest | string | Action digest |
|
||||
| global_sequence | int | Global sequence |
|
||||
| recv_sequence | int | Receive sequence |
|
||||
| auth_sequence | AccountAuthSequence[] | Auth sequence |
|
||||
| code_sequence | int | Code sequence |
|
||||
| abi_sequence | int | ABI sequence |
|
||||
|
||||
### PermisssionLevel
|
||||
|
||||
| Field | Datatype | Description |
|
||||
| ---------- | -------- | -------------------------------- |
|
||||
| actor | string | Actor account name |
|
||||
| permission | string | Permission (for example: active) |
|
||||
|
||||
### AccountAuthSequence
|
||||
|
||||
| Field | Datatype | Description |
|
||||
| -------- | -------- | ------------ |
|
||||
| account | string | Account name |
|
||||
| sequence | int | Sequence |
|
||||
38
docs/api/redis-channels.md
Normal file
38
docs/api/redis-channels.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Redis channels
|
||||
|
||||
This document describes the redis channels used by thalos to deliver messages.
|
||||
|
||||
## Namespace
|
||||
|
||||
First. all channels have a namespace attached to them. this is done to prevent other application to clash with the keys.
|
||||
|
||||
The namespace have the following format: `<prefix>::<chain_id>`
|
||||
|
||||
* `prefix` is per default `ship` but can be configured to be something else.
|
||||
* `chain_id` is the chain's id and is used to separate transactions if multiple chains are setup in the same redis database.
|
||||
|
||||
## Transactions
|
||||
|
||||
All transactions are posted to the following channel:
|
||||
|
||||
`<namespace>::transactions`
|
||||
|
||||
## Actions
|
||||
|
||||
there is 4 types of channels for actions.
|
||||
|
||||
The channel where all actions are posted is:
|
||||
|
||||
`<namespace>::actions`
|
||||
|
||||
Channel where only specific actions are posted:
|
||||
|
||||
`<namespace>::actions/name/<action>`
|
||||
|
||||
Channel where only actions on a specific `<contract>` is posted:
|
||||
|
||||
`<namespace>::actions/contract/<contract>`
|
||||
|
||||
Channel where only `<action>` on a specific `<contract>` is posted:
|
||||
|
||||
`<namespace>::actions/contract/<contract>/name/<action>`
|
||||
Loading…
Add table
Add a link
Reference in a new issue