msg

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: GPL-3.0 Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainId

type ChainId uint8

type Message

type Message struct {
	Source       ChainId      // Source where message was initiated
	Destination  ChainId      // Destination chain of message
	Type         TransferType // type of bridge transfer
	DepositNonce Nonce        // Nonce for the deposit
	ResourceId   ResourceId
	Payload      []interface{} // data associated with event sequence
}

Message is used as a generic format to communicate between chains

func NewFungibleTransfer

func NewFungibleTransfer(source, dest ChainId, nonce Nonce, amount *big.Int, resourceId ResourceId, recipient []byte) Message

type Nonce

type Nonce uint64

func (Nonce) Big

func (n Nonce) Big() *big.Int

type ResourceId

type ResourceId [32]byte

func ResourceIdFromSlice

func ResourceIdFromSlice(in []byte) ResourceId

func (ResourceId) Hex

func (r ResourceId) Hex() string

type TransferType

type TransferType string
var FungibleTransfer TransferType = "FungibleTransfer"

Jump to

Keyboard shortcuts

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