mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-27 10:53:42 +02:00
api/README.md: update.
This commit is contained in:
parent
83d57a09c4
commit
4c843f16bf
1 changed files with 40 additions and 43 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The api is designed with callback functions that are called when messages arrive
|
The api is designed with go channels.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ func main() {
|
||||||
ChainID: "1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4", // Wax mainnet.
|
ChainID: "1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4", // Wax mainnet.
|
||||||
})
|
})
|
||||||
|
|
||||||
// Create client
|
// Create thalos client
|
||||||
codec, err := message.GetCodec("json")
|
codec, err := message.GetCodec("json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Failed to get json codec")
|
fmt.Println("Failed to get json codec")
|
||||||
|
|
@ -81,9 +81,6 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Message channels and types
|
## Message channels and types
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue