api

package
v0.0.0-...-7c2dc49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetTransactionOptsReqType = byte(1)
	GetChainAPReqType         = byte(2)
	GetAuthAddrReqType        = byte(3)
	SetVerifierAddrReqType    = byte(4)
	GetVerifierAddrReqType    = byte(5)
	SetMsgStoreAddrReqType    = byte(6)
)

Variables

This section is empty.

Functions

func HandleGetAuthAddr

func HandleGetAuthAddr(data []byte) ([]byte, error)

HandleGetAuthAddr handles get auth addr.

func HandleGetChainAP

func HandleGetChainAP(data []byte) ([]byte, error)

HandleGetChainAP handles get chain ap request.

func HandleGetVerifierAddr

func HandleGetVerifierAddr(data []byte) ([]byte, error)

HandleGetVerifierAddr handles get verifier addr.

func HandleSetMsgStoreAddr

func HandleSetMsgStoreAddr(data []byte) ([]byte, error)

HandleSetMsgStoreAddr handles set msg store addr.

func HandleSetTransactionOpts

func HandleSetTransactionOpts(data []byte) ([]byte, error)

HandleSetTransactionOpts handles set transaction opts request.

func HandleSetVerifierAddr

func HandleSetVerifierAddr(data []byte) ([]byte, error)

HandleSetVerifierAddr handles set verifier addr.

func RequestGetAuthAddr

func RequestGetAuthAddr(addr string, chainID *big.Int) (common.Address, error)

RequestGetAuthAddr requests get auth addr.

func RequestGetChainAP

func RequestGetChainAP(addr string, chainID *big.Int) (string, error)

RequestGetChainAP requests get chain ap.

func RequestGetVerifierAddr

func RequestGetVerifierAddr(addr string, sourceChainID *big.Int, targetChainID *big.Int, contractAddr common.Address) (common.Address, error)

RequestGetVerifierAddr requests get verifier addr.

func RequestSetMsgStoreAddr

func RequestSetMsgStoreAddr(addr string, msgStoreURL string) (bool, error)

RequestSetMsgStoreAddr requests set msg store addr.

func RequestSetTransactionOpts

func RequestSetTransactionOpts(addr string, chainID *big.Int, chainAP string, key []byte) (bool, error)

RequestSetTransactionOpts requests set transaction opts.

func RequestSetVerifierAddr

func RequestSetVerifierAddr(addr string, sourceChainID *big.Int, sourceCbc string, targetChainID *big.Int,
	verifierAddr common.Address) (bool, error)

RequestSetVerifierAddr requests set verifier addr.

Types

type GetAuthAddrReq

type GetAuthAddrReq struct {
	ChainID string `json:"chain_id"`
}

GetAuthAddrReq is the request to get auth addr.

type GetAuthAddrResp

type GetAuthAddrResp struct {
	Addr string `json:"addr"`
}

GetAuthAddrResp is the response to get auth addr.

type GetChainAPReq

type GetChainAPReq struct {
	ChainID string `json:"chain_id"`
}

GetChainAPReq is the request to get chain ap.

type GetChainAPResp

type GetChainAPResp struct {
	ChainAP string `json:"chain_ap"`
}

GetChainAPResp is the response to get chain ap.

type GetVerifierAddrReq

type GetVerifierAddrReq struct {
	SourceChainID  string `json:"source_chain_id"`
	SourceChainCbc string `json:"source_chain_cbc"`
	TargetChainID  string `json:"target_chain_id"`
}

GetVerifierAddrReq is the request to get verifier addr.

type GetVerifierAddrResp

type GetVerifierAddrResp struct {
	VerifierContractAddr string `json:"verifier_contract_addr"`
}

GetVerifierAddrResp is the response to get verifier addr.

type SetMsgStoreAddrReq

type SetMsgStoreAddrReq struct {
	MsgStoreURL string `json:"msg_store_url"`
}

SetMsgStoreAddrReq is the request to set msg store addr.

type SetMsgStoreAddrResp

type SetMsgStoreAddrResp struct {
	Success bool `json:"success"`
}

SetMsgStoreAddrResp is the response to set msg store addr.

type SetTransactionOptsReq

type SetTransactionOptsReq struct {
	ChainID string `json:"chain_id"`
	ChainAP string `json:"chain_ap"`
	Key     []byte `json:"key"`
}

SetTransactionOptsReq is the request to set transaction opts.

type SetTransactionOptsResp

type SetTransactionOptsResp struct {
	Success bool `json:"success"`
}

SetTransactionOptsResp is the response to set transaction opts.

type SetVerifierAddrReq

type SetVerifierAddrReq struct {
	SourceChainID        string `json:"source_chain_id"`
	SourceChainCbc       string `json:"source_chain_cbc"`
	TargetChainID        string `json:"target_chain_id"`
	VerifierContractAddr string `json:"verifier_contract_addr"`
}

SetVerifierAddrReq is the request to set verifier addr.

type SetVerifierAddrResp

type SetVerifierAddrResp struct {
	Success bool `json:"success"`
}

SetVerifierAddrResp is the response to set verifier addr.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL