teleport

package
v1.13.21 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TeleportEngine

type TeleportEngine struct {
	// contains filtered or unexported fields
}

TeleportEngine manages omnichain asset transfers via burn/mint

func NewTeleportEngine

func NewTeleportEngine(vm *VM) *TeleportEngine

NewTeleportEngine creates a new teleport engine

func (*TeleportEngine) GetMetrics added in v1.13.21

func (te *TeleportEngine) GetMetrics() (uint64, *big.Int)

GetMetrics returns teleport metrics

func (*TeleportEngine) GetTransfer

func (te *TeleportEngine) GetTransfer(id ids.ID) (*TeleportTransfer, bool)

GetTransfer returns a transfer by ID

func (*TeleportEngine) ProcessIntent

func (te *TeleportEngine) ProcessIntent(ctx context.Context, intent *TeleportIntent) (*TeleportTransfer, error)

ProcessIntent processes a teleport intent

type TeleportIntent

type TeleportIntent struct {
	ID          ids.ID
	SourceChain ids.ID
	DestChain   ids.ID
	AssetID     ids.ID
	Amount      uint64
	Sender      ids.ShortID
	Recipient   common.Address // Can be on any chain
	Deadline    time.Time
	Signature   []byte
	Metadata    []byte
}

TeleportIntent represents a user's intent to transfer assets cross-chain

func (*TeleportIntent) Hash added in v1.13.21

func (ti *TeleportIntent) Hash() []byte

Hash returns the hash of a teleport intent

type TeleportTransfer

type TeleportTransfer struct {
	Intent      *TeleportIntent
	Status      TransferStatus
	BurnTxID    ids.ID
	MintTxID    ids.ID
	CreatedAt   time.Time
	CompletedAt time.Time
}

TeleportTransfer tracks an active cross-chain transfer

type TransferStatus

type TransferStatus uint8
const (
	TransferStatusPending TransferStatus = iota
	TransferStatusBurning
	TransferStatusMinting
	TransferStatusCompleted
	TransferStatusFailed
)

Jump to

Keyboard shortcuts

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