utils

package
v0.0.0-...-20154b5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEventFilterRenames

func ApplyEventFilterRenames(exprs []query.Expression, renames map[string]string) []query.Expression

func BuildJsonPathExpr

func BuildJsonPathExpr(baseField string, path string) (string, error)

buildJsonPathExpr constructs a PostgreSQL JSON path expression for accessing nested fields Example: "Header.SourceChainSelector" becomes data->'Header'->>'SourceChainSelector'

func ExtractEventCreationNum

func ExtractEventCreationNum(resourceData map[string]any, eventFieldPath string) (string, error)

func ExtractTimestampFilter

func ExtractTimestampFilter(expressions []query.Expression) (uint64, bool)

func IsNumeric

func IsNumeric(value any) bool

func MaybeRenameFields

func MaybeRenameFields(jsonValue any, renames map[string]config.RenamedField) error

func RenameMapFields

func RenameMapFields(jsonData map[string]any, renames map[string]config.RenamedField) error

func UnwrapSlice

func UnwrapSlice(value any) ([]any, bool)

Types

type Any2AptosRampMessage

type Any2AptosRampMessage struct {
	Header       RampMessageHeader
	Sender       []byte
	Data         []byte
	Receiver     aptos.AccountAddress
	GasLimit     *big.Int
	TokenAmounts []Any2AptosTokenTransfer
}

type Any2AptosTokenTransfer

type Any2AptosTokenTransfer struct {
	SourcePoolAddress []byte
	DestTokenAddress  aptos.AccountAddress
	DestGasAmount     uint32
	ExtraData         []byte
	Amount            *big.Int
}

type ConfigSet

type ConfigSet struct {
	OcrPluginType byte
	ConfigDigest  []byte
	Signers       [][]byte
	Transmitters  []aptos.AccountAddress
	BigF          byte
}

type ExecutionReport

type ExecutionReport struct {
	SourceChainSelector uint64
	Message             Any2AptosRampMessage
	OffchainTokenData   [][]byte
	Proofs              [][]byte
}

func DeserializeExecutionReport

func DeserializeExecutionReport(data []byte) (*ExecutionReport, error)

type MessageHasherV1

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

func NewMessageHasherV1

func NewMessageHasherV1(lggr logger.Logger) *MessageHasherV1

func (*MessageHasherV1) Hash

func (h *MessageHasherV1) Hash(ctx context.Context, report *ExecutionReport, onRampAddress []byte) ([32]byte, error)

type RampMessageHeader

type RampMessageHeader struct {
	MessageID           []byte
	SourceChainSelector uint64
	DestChainSelector   uint64
	SequenceNumber      uint64
	Nonce               uint64
}

type SourceChainConfig

type SourceChainConfig struct {
	Router                    string
	IsEnabled                 bool
	MinSeqNr                  uint64
	IsRMNVerificationDisabled bool
	OnRamp                    []byte
}

type SourceChainConfigSet

type SourceChainConfigSet struct {
	SourceChainSelector uint64
	SourceChainConfig   SourceChainConfig
}

Jump to

Keyboard shortcuts

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