sui_actions

package
v1.0.3-beta.rc0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultSuiRpcPortNumber     = 9000
	DefaultSuiMetricsPortNumber = 9184
)

Variables

View Source
var (
	GetLatestCheckpointSequenceNumberReq = JsonRpcReq{
		Jsonrpc: "2.0",
		Id:      1,
		Method:  "sui_getLatestCheckpointSequenceNumber",
		Params:  []interface{}{},
	}
	GetCheckpointReq = JsonRpcReq{
		Jsonrpc: "2.0",
		Id:      1,
		Method:  "sui_getCheckpoint",
		Params:  []interface{}{},
	}
	// GetCheckpointsReq https://docs.sui.io/sui-jsonrpc#sui_getCheckpoints
	GetCheckpointsReq = JsonRpcReq{
		Jsonrpc: "2.0",
		Id:      1,
		Method:  "sui_getCheckpoints",
		Params:  []interface{}{},
	}
)
View Source
var (
	GetChainId = JsonRpcReq{
		Jsonrpc: "2.0",
		Id:      1,
		Method:  "sui_getChainIdentifier",
		Params:  []interface{}{},
	}
)

Functions

This section is empty.

Types

type JsonRpcReq

type JsonRpcReq struct {
	Jsonrpc string        `json:"jsonrpc"`
	Id      int           `json:"id"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
}

type JsonRpcResult

type JsonRpcResult struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  string `json:"result"`
}

type SuiActionsClient

type SuiActionsClient struct {
	pods_client.PodsClient

	RpcPortNumber     int
	MetricsPortNumber int
	PrintPath         filepaths.Path
}

func (*SuiActionsClient) GetChainId

func (s *SuiActionsClient) GetChainId(ctx context.Context, cloudCtxNs zeus_common_types.CloudCtxNs) ([]JsonRpcResult, error)

func (*SuiActionsClient) GetCheckpoint

func (s *SuiActionsClient) GetCheckpoint(ctx context.Context, cloudCtxNs zeus_common_types.CloudCtxNs, ckpId string) ([]SuiCheckpointResponse, error)

func (*SuiActionsClient) GetCheckpoints

func (*SuiActionsClient) GetLatestCheckpointSeqNumber

func (s *SuiActionsClient) GetLatestCheckpointSeqNumber(ctx context.Context, cloudCtxNs zeus_common_types.CloudCtxNs) ([]JsonRpcResult, error)

func (*SuiActionsClient) GetLogs

func (*SuiActionsClient) GetMetrics

func (*SuiActionsClient) SendRpcPayload

func (s *SuiActionsClient) SendRpcPayload(ctx context.Context, cloudCtxNs zeus_common_types.CloudCtxNs, payload any) (zeus_pods_resp.ClientResp, error)

type SuiCheckpointResponse

type SuiCheckpointResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  struct {
		Epoch                      string `json:"epoch"`
		SequenceNumber             string `json:"sequenceNumber"`
		Digest                     string `json:"digest"`
		NetworkTotalTransactions   string `json:"networkTotalTransactions"`
		PreviousDigest             string `json:"previousDigest"`
		EpochRollingGasCostSummary struct {
			ComputationCost         string `json:"computationCost"`
			StorageCost             string `json:"storageCost"`
			StorageRebate           string `json:"storageRebate"`
			NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
		} `json:"epochRollingGasCostSummary"`
		TimestampMs           string        `json:"timestampMs"`
		Transactions          []string      `json:"transactions"`
		CheckpointCommitments []interface{} `json:"checkpointCommitments"`
		ValidatorSignature    string        `json:"validatorSignature"`
	} `json:"result"`
	Error struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error,omitempty"`
}

type SuiCheckpointsPageResponse

type SuiCheckpointsPageResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  struct {
		Data []struct {
			Epoch                      string `json:"epoch"`
			SequenceNumber             string `json:"sequenceNumber"`
			Digest                     string `json:"digest"`
			NetworkTotalTransactions   string `json:"networkTotalTransactions"`
			PreviousDigest             string `json:"previousDigest"`
			EpochRollingGasCostSummary struct {
				ComputationCost         string `json:"computationCost"`
				StorageCost             string `json:"storageCost"`
				StorageRebate           string `json:"storageRebate"`
				NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
			} `json:"epochRollingGasCostSummary"`
			TimestampMs           string        `json:"timestampMs"`
			Transactions          []string      `json:"transactions"`
			CheckpointCommitments []interface{} `json:"checkpointCommitments"`
			ValidatorSignature    string        `json:"validatorSignature"`
		} `json:"data"`
		NextCursor  string `json:"nextCursor"`
		HasNextPage bool   `json:"hasNextPage"`
	} `json:"result"`
	Error struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error,omitempty"`
}

type SuiCheckpointsRange

type SuiCheckpointsRange struct {
	Cursor          string `json:"cursor,omitempty"`
	Limit           int    `json:"limit,omitempty"`
	DescendingOrder bool   `json:"descendingOrder,omitempty"`
}

Jump to

Keyboard shortcuts

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