Documentation ¶
Index ¶
- Constants
- func HandleAddRouteToStore(data []byte) ([]byte, error)
- func HandleGetAddr(data []byte) ([]byte, error)
- func HandleSetKey(data []byte) ([]byte, error)
- func RequestGetAddr(addr string, chainID *big.Int, contractAddr common.Address) (byte, common.Address, error)
- func RequestSetKey(addr string, chainID *big.Int, contractAddr common.Address, keyType byte, ...) (bool, error)
- type GetAddrReq
- type GetAddrResp
- type RouteApiResponse
- type SetKeyReq
- type SetKeyResp
Constants ¶
View Source
const ( SetKeyReqType = byte(1) GetAddrReqType = byte(2) RegisterRouteToStore = byte(3) )
Variables ¶
This section is empty.
Functions ¶
func HandleAddRouteToStore ¶
func HandleGetAddr ¶
HandleGetAddr handles get addr request.
func HandleSetKey ¶
HandleSetKey handles set key request.
Types ¶
type GetAddrReq ¶
type GetAddrReq struct { ChainID string `json:"chain_id"` ContractAddr string `json:"contract_addr"` }
GetAddrReq is the request to get signer addr and type.
type GetAddrResp ¶
GetAddrResp is the response to get addr.
type RouteApiResponse ¶
type SetKeyReq ¶
type SetKeyReq struct { ChainID string `json:"chain_id"` ContractAddr string `json:"contract_addr"` KeyType byte `json:"key_type"` Key []byte `json:"key"` }
SetKeyReq is the request to set key.
type SetKeyResp ¶
type SetKeyResp struct {
Success bool `json:"success"`
}
SetKeyResp is the reponse to set key.
Click to show internal directories.
Click to hide internal directories.