msg

package
v1.0.7-0...-138de50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: LGPL-3.0 Imports: 2 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 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
	Nonce       Nonce        // Nonce for the message transfer
	ResourceId  ResourceId
	Payload     []interface{} // data associated with event sequence
}

Message is used as a generic format to communicate between chains

func NewAckTransfer

func NewAckTransfer(source, dest ChainId, nonce Nonce, resourceId ResourceId, ackData []byte) Message

func NewFungibleTransfer

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

func NewGenericTransfer

func NewGenericTransfer(source, dest ChainId, nonce Nonce, resourceId ResourceId, metadata []byte) Message

func NewNonFungibleTransfer

func NewNonFungibleTransfer(source, dest ChainId, nonce Nonce, resourceId ResourceId, tokenId *big.Int, recipient, metadata []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 AckTransfer TransferType = "AckTransfer"
var FungibleTransfer TransferType = "FungibleTransfer"
var GenericTransfer TransferType = "GenericTransfer"
var NonFungibleTransfer TransferType = "NonFungibleTransfer"

Jump to

Keyboard shortcuts

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