msg

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainId

type ChainId uint64

type Message

type Message struct {
	Idx         int
	Source      ChainId         // Source where message was initiated
	Destination ChainId         // Destination chain of message
	Type        TransferType    // type of bridge transfer
	Payload     []interface{}   // data associated with event sequence
	DoneCh      chan<- struct{} // notify message is handled
}

Message is used as a generic format to communicate between chains

func NewSwapWithMapProof

func NewSwapWithMapProof(fromChainID, toChainID ChainId, payloads []interface{}, ch chan<- struct{}) Message

func NewSwapWithMerlin added in v1.2.0

func NewSwapWithMerlin(fromChainID, toChainID ChainId, payloads []interface{}, ch chan<- struct{}) Message

func NewSwapWithProof

func NewSwapWithProof(fromChainID, toChainID ChainId, payloads []interface{}, ch chan<- struct{}) Message

func NewSyncFromMap

func NewSyncFromMap(mapChainID, toChainID ChainId, payloads []interface{}, ch chan<- struct{}) Message

func NewSyncToMap

func NewSyncToMap(fromChainID, toChainID ChainId, payloads []interface{}, ch chan<- struct{}) Message

type TransferType

type TransferType string
var (
	SyncToMap        TransferType = "SyncToMap"
	SwapWithProof    TransferType = "SwapWithProof"
	SyncFromMap      TransferType = "SyncFromMap"
	SwapWithMapProof TransferType = "SwapWithMapProof"
	SwapWithMerlin   TransferType = "SwapWithMerlin"
)

Jump to

Keyboard shortcuts

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