sui

package
v0.0.0-...-7be3494 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldsData

type FieldsData struct {
	ConsistencyLevel *uint8  `json:"consistency_level"`
	Nonce            *uint64 `json:"nonce"`
	Payload          []byte  `json:"payload"`
	Sender           *string `json:"sender"`
	Sequence         *string `json:"sequence"`
	Timestamp        *string `json:"timestamp"`
}

type SuiCheckpointSN

type SuiCheckpointSN struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  string `json:"result"`
	ID      int    `json:"id"`
}

type SuiEventError

type SuiEventError struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

type SuiEventMsg

type SuiEventMsg struct {
	Jsonrpc string         `json:"jsonrpc"`
	Method  *string        `json:"method"`
	ID      *int64         `json:"id"`
	Error   *SuiEventError `json:"error"`
	Params  *struct {
		Subscription int64      `json:"subscription"`
		Result       *SuiResult `json:"result"`
	} `json:"params"`
}

type SuiResult

type SuiResult struct {
	ID struct {
		TxDigest *string `json:"txDigest"`
		EventSeq *string `json:"eventSeq"`
	} `json:"id"`
	PackageID         *string          `json:"packageId"`
	TransactionModule *string          `json:"transactionModule"`
	Sender            *string          `json:"sender"`
	Type              *string          `json:"type"`
	Bcs               *string          `json:"bcs"`
	Timestamp         *string          `json:"timestampMs"`
	Fields            *json.RawMessage `json:"parsedJson"`
}

type SuiTxnQuery

type SuiTxnQuery struct {
	Jsonrpc string      `json:"jsonrpc"`
	Result  []SuiResult `json:"result"`
	ID      int         `json:"id"`
}

type SuiTxnQueryError

type SuiTxnQueryError struct {
	Jsonrpc string `json:"jsonrpc"`
	Error   struct {
		Code    int     `json:"code"`
		Message *string `json:"message"`
	} `json:"error"`
	ID int `json:"id"`
}

type Watcher

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

Watcher is responsible for looking over Sui blockchain and reporting new transactions to the deltaswap contract

func NewWatcher

func NewWatcher(
	suiRPC string,
	suiWS string,
	suiMoveEventType string,
	unsafeDevMode bool,
	messageEvents chan<- *common.MessagePublication,
	obsvReqC <-chan *gossipv1.ObservationRequest,
) *Watcher

NewWatcher creates a new Sui appid watcher

func (*Watcher) Run

func (e *Watcher) Run(ctx context.Context) error

type WatcherConfig

type WatcherConfig struct {
	NetworkID        watchers.NetworkID // human readable name
	ChainID          vaa.ChainID        // ChainID
	Rpc              string
	Websocket        string
	SuiMoveEventType string
}

func (*WatcherConfig) Create

func (*WatcherConfig) GetChainID

func (wc *WatcherConfig) GetChainID() vaa.ChainID

func (*WatcherConfig) GetNetworkID

func (wc *WatcherConfig) GetNetworkID() watchers.NetworkID

func (*WatcherConfig) RequiredL1Finalizer

func (wc *WatcherConfig) RequiredL1Finalizer() watchers.NetworkID

func (*WatcherConfig) SetL1Finalizer

func (wc *WatcherConfig) SetL1Finalizer(l1finalizer interfaces.L1Finalizer)

Jump to

Keyboard shortcuts

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