Macros§
- json
- Construct a
serde_json::Value
from a JSON literal.
Structs§
- H160
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- Handle
Result - The result when after handling the message or task.
- Method
Values - method & multiple values for Param, compatible with jsonrpc
- Network
Config - Network config informato, use EIP-3085
- Network
Currency - Network native currency config
- PeerId
- peer’s network id.
- Player
- Standard player from chain & pozk
Enums§
- Error
- Z4 error
- Network
- Network types
- Task
Message - Task message type
- Value
- Represents any valid JSON value.
Constants§
- DEFAULT_
NETWORK - Default network
- PLAYER_
BYTES_ LEN - Player bytes length
- ROOM_
MARKET_ ABI - SIMPLE_
GAME_ ABI - TOKEN_
ABI - Z4_
ROOM_ MARKET_ GROUP - Z4 init room id/tdn group id
Traits§
- Handler
- Handle message received from players
- Param
- Serialize & deserialize for params
- Task
- Timer tasks when game room started
Functions§
- address_
hex - Convert address to hex string
- address_
to_ peer - convert address to peer
- env_
value - Get value from env and parse it to T
- env_
values - Get value array from env and parse it to T
- generate_
keypair - Generate engine used keypair for player
- handle_
tasks - Handle and listening tasks
- hex_
address - Convert hex string to address
- merge_
json - Merge two values
- peer_
to_ address - convert peer to address
- sign
- Sign for zk-friendly
- simple_
game_ result - Helper for generate simple game result, for ranking
- verify
- Verify for zk-friendly