sui

package
v0.0.0-...-3ea1ddd Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

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 GetCheckpointResponse

type GetCheckpointResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  struct {
		Digest      string `json:"digest"`
		TimestampMs string `json:"timestampMs"`
		Checkpoint  string `json:"checkpoint"`
	} `json:"result"`
	ID int `json:"id"`
}

type MultipleBlockResult

type MultipleBlockResult struct {
	Jsonrpc string          `json:"jsonrpc"`
	Result  []TxBlockResult `json:"result"`
}

type RequestPayload

type RequestPayload struct {
	JSONRPC string     `json:"jsonrpc"`
	ID      int        `json:"id"`
	Method  string     `json:"method"`
	Params  [][]string `json:"params"`
}

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 SuiEventResponse

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

type SuiEventResponseData

type SuiEventResponseData struct {
	Data       []SuiResult `json:"data"`
	NextCursor struct {
		TxDigest string `json:"txDigest"`
		EventSeq string `json:"eventSeq"`
	} `json:"nextCursor"`
	HasNextPage bool `json:"hasNextPage"`
}

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 SuiResultInfo

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

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 TxBlockResult

type TxBlockResult struct {
	Digest      string `json:"digest"`
	TimestampMs string `json:"timestampMs"`
	Checkpoint  string `json:"checkpoint"`
}

type Watcher

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

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

func NewWatcher

func NewWatcher(
	suiRPC 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
	SuiMoveEventType string
}

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