Documentation ¶
Index ¶
- Variables
- func RevertError(msg string) error
- func ValidateBtpAddress(ba BTPAddress) error
- type BMCLinkStatus
- type BTPAddress
- func (a BTPAddress) BlockChain() string
- func (a BTPAddress) ContractAddress() string
- func (a BTPAddress) NetworkAddress() string
- func (a BTPAddress) NetworkID() string
- func (a BTPAddress) Protocol() string
- func (a *BTPAddress) Set(v string) error
- func (a BTPAddress) String() string
- func (a BTPAddress) Type() string
- type Event
- type Message
- type Receipt
- type Receiver
- type RelayMessage
- type RelayReceipt
- type RelayTx
- type Relayer
- type Sender
- type SubscribeOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Common errors ErrInsufficientBalance = errors.New("InsufficientBalance") ErrGasLimitExceeded = errors.New("GasLimitExceeded") ErrBlockGasLimitExceeded = errors.New("BlockGasLimitExceeded") // BMC errors ErrBMCRevertLastOwner = errors.New("LastOwner") ErrBMCRevertUnauthroized = errors.New("Unauthorized") ErrBMCRevertInvalidAddress = errors.New("InvalidAddress") ErrBMCRevertNotExistsPermission = errors.New("NotExistsPermission") ErrBMCRevertAlreadyExistsBSH = errors.New("AlreadyExistsBSH") ErrBMCRevertNotExistsBSH = errors.New("NotExistsBSH") ErrBMCRevertAlreadyExistsLink = errors.New("AlreadyExistsLink") ErrBMCRevertNotExistsLink = errors.New("NotExistsLink") ErrBMCRevertInvalidParam = errors.New("InvalidParam") ErrBMCRevertAlreadyExistRoute = errors.New("AlreadyExistRoute") ErrBMCRevertNotExistRoute = errors.New("NotExistRoute") ErrBMCRevertInvalidSn = errors.New("InvalidSn") ErrBMCRevertParseFailure = errors.New("ParseFailure") ErrBMCRevertInvalidRxHeight = errors.New("InvalidRxHeight") ErrBMCRevertInvalidSeqNumber = errors.New("InvalidSeqNumber") ErrBMCRevertNotExistsInternalHandler = errors.New("NotExistsInternalHandler") ErrBMCRevertAlreadyExistsBMCPeriphery = errors.New("AlreadyExistsBMCPeriphery") ErrBMCRevertUnknownHandleBTPError = errors.New("UnknownHandleBTPError") ErrBMCRevertUnknownHandleBTPMessage = errors.New("UnknownHandleBTPMessage") ErrBMCRevertUnreachable = errors.New("Unreachable:") )
Functions ¶
func RevertError ¶
func ValidateBtpAddress ¶
func ValidateBtpAddress(ba BTPAddress) error
Types ¶
type BMCLinkStatus ¶
type BTPAddress ¶
type BTPAddress string
func (BTPAddress) BlockChain ¶
func (a BTPAddress) BlockChain() string
func (BTPAddress) ContractAddress ¶
func (a BTPAddress) ContractAddress() string
func (BTPAddress) NetworkAddress ¶
func (a BTPAddress) NetworkAddress() string
func (BTPAddress) NetworkID ¶
func (a BTPAddress) NetworkID() string
func (BTPAddress) Protocol ¶
func (a BTPAddress) Protocol() string
func (*BTPAddress) Set ¶
func (a *BTPAddress) Set(v string) error
func (BTPAddress) String ¶
func (a BTPAddress) String() string
func (BTPAddress) Type ¶
func (a BTPAddress) Type() string
type Event ¶
type Event struct { Next BTPAddress Sequence uint64 Message []byte }
type Message ¶
type Message struct { From BTPAddress Receipts []*Receipt }
type Receiver ¶
type Receiver interface { // Subscribe ... // subscribes to BTP messages and block headers on `msgCh` of the src chain // and returns an `errCh` that sends any error during subscription and terminates // the subscription by closing `errCh` Subscribe(ctx context.Context, msgCh chan<- *Message, opts SubscribeOptions) (errCh <-chan error, err error) }
type RelayReceipt ¶
type RelayTx ¶
type RelayTx interface { ID() interface{} Send(ctx context.Context) (err error) Receipt(ctx context.Context) (blockHeight uint64, err error) }
RelayTx ...
type Sender ¶
type Sender interface { // Status ... // returns current BMCLinkStatus of the dst chain Status(ctx context.Context) (link *BMCLinkStatus, err error) // Segment ... // returns a "tx" Tx object including events upto "txSizeLimit" bytes and // returns rest of the "msg" Message as "newMsg" Segment(ctx context.Context, msg *Message) (tx RelayTx, newMsg *Message, err error) // Returns the current relayer balance Balance(ctx context.Context) (balance, threshold *big.Int, err error) }
type SubscribeOptions ¶
Click to show internal directories.
Click to hide internal directories.