ocr

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Any2TVMRampMessage

type Any2TVMRampMessage struct {
	Header       RampMessageHeader                       `tlb:"."`
	Sender       common.CrossChainAddress                `tlb:"^"`
	Data         common.SnakeBytes                       `tlb:"^"`
	Receiver     *address.Address                        `tlb:"addr"`
	GasLimit     tlb.Coins                               `tlb:"."`
	TokenAmounts common.SnakedCell[Any2TVMTokenTransfer] `tlb:"maybe ^"`
}

Any2TVMRampMessage represents ramp message, which is part of the execute report.

type Any2TVMTokenTransfer

type Any2TVMTokenTransfer struct {
	SourcePoolAddress common.CrossChainAddress `tlb:"^"`
	DestPoolAddress   *address.Address         `tlb:"addr"`
	DestGasAmount     uint32                   `tlb:"## 32"`
	ExtraData         *cell.Cell               `tlb:"^"`
	Amount            *big.Int                 `tlb:"## 256"`
}

Any2TVMTokenTransfer represents a token transfer within a ramp message.

type CommitReport

type CommitReport struct {
	PriceUpdates *PriceUpdates                 `tlb:"maybe ^"`
	MerkleRoots  common.SnakedCell[MerkleRoot] `tlb:"^"`
}

CommitReport represents the top-level structure for a commit report.

type ExecuteReport

type ExecuteReport struct {
	SourceChainSelector uint64                          `tlb:"## 64"`
	Message             Any2TVMRampMessage              `tlb:"^"` // val message = Any2TVMRampMessage.fromCell(report.messages);
	OffChainTokenData   *cell.Cell                      `tlb:"^"` // vec<vec<u8>>
	Proofs              common.SnakedCell[common.Proof] `tlb:"^"` // vec<bytes32> - inline 256-bit proofs
	ProofFlagBits       *big.Int                        `tlb:"## 256"`
}

ExecuteReport represents CCIP execute report messages on the TON blockchain. Message: single message as cell reference OffChainTokenData: vec<vec<u8>> - currently unused cell reference as on-chain representation Proofs: vec<bytes32> - inline 256-bit proofs using SnakedCell with Proof wrapper (matches TypeScript asSnakeData)

type ExitCode

type ExitCode tvm.ExitCode
const (
	ErrorBigFMustBePositive ExitCode = iota + 54500 // Facility ID * 100
	ErrorStaticConfigCannotBeChanged
	ErrorTooManySigners
	ErrorBigFTooHigh
	ErrorTooManyTransmitters
	ErrorNoTransmitters
	ErrorRepeatedSigners
	ErrorRepeatedTransmitters
	ErrorConfigDigestMismatch
	ErrorUnauthorizedTransmitter
	ErrorWrongNumberOfSignatures
	ErrorUnauthorizedSigner
	ErrorNonUniqueSignatures
	ErrorInvalidSignature
	ErrorNonExistentOcrPluginType
	ErrorNoSigners
)

func (ExitCode) NewFrom

func (ExitCode) NewFrom(ec tvm.ExitCode) (ExitCode, error)

func (ExitCode) String

func (i ExitCode) String() string

type GasPriceUpdate

type GasPriceUpdate struct {
	DestChainSelector        uint64   `tlb:"## 64"`
	ExecutionGasPrice        *big.Int `tlb:"## 112"`
	DataAvailabilityGasPrice *big.Int `tlb:"## 112"`
}

GasPriceUpdate represents a gas price update for a chain.

type MerkleRoot

type MerkleRoot struct {
	SourceChainSelector uint64                   `tlb:"## 64"`
	OnRampAddress       common.CrossChainAddress `tlb:"."`
	MinSeqNr            uint64                   `tlb:"## 64"`
	MaxSeqNr            uint64                   `tlb:"## 64"`
	MerkleRoot          []byte                   `tlb:"bits 256"`
}

MerkleRoot represents a Merkle root for a chain's data.

type PriceUpdates

type PriceUpdates struct {
	TokenPriceUpdates common.SnakedCell[TokenPriceUpdate] `tlb:"^"`
	GasPriceUpdates   common.SnakedCell[GasPriceUpdate]   `tlb:"^"`
}

PriceUpdates holds token and gas price updates.

type RampMessageHeader

type RampMessageHeader struct {
	MessageID           []byte `tlb:"bits 256"`
	SourceChainSelector uint64 `tlb:"## 64"`
	DestChainSelector   uint64 `tlb:"## 64"`
	SequenceNumber      uint64 `tlb:"## 64"`
	Nonce               uint64 `tlb:"## 64"`
}

RampMessageHeader contains metadata for a ramp message.

type SignatureEd25519

type SignatureEd25519 struct {
	Data []byte `tlb:"bits 768"`
}

SignatureEd25519 represents a signature structure used in commit reports.

type TVM2AnyRampMessage

type TVM2AnyRampMessage struct {
	Header        RampMessageHeader      `tlb:"."`
	Sender        *address.Address       `tlb:"addr"`
	Body          TVM2AnyRampMessageBody `tlb:"^"`
	FeeValueJuels *big.Int               `tlb:"## 96"`
}

TVM2AnyRampMessage for execution context (includes onramp address in header)

type TVM2AnyRampMessageBody

type TVM2AnyRampMessageBody struct {
	Receiver       common.CrossChainAddress `tlb:"^"`
	Data           common.SnakeBytes        `tlb:"^"`
	ExtraArgs      *cell.Cell               `tlb:"^"`
	TokenAmounts   *cell.Cell               `tlb:"^"` // TODO: common.SnakeRef[TVM2AnyTokenTransfer] once defined
	FeeToken       *address.Address         `tlb:"addr"`
	FeeTokenAmount *big.Int                 `tlb:"## 256"`
}

type TokenPriceUpdate

type TokenPriceUpdate struct {
	SourceToken *address.Address `tlb:"addr"`
	UsdPerToken *big.Int         `tlb:"## 224"`
}

TokenPriceUpdate represents a price update for a token.

Jump to

Keyboard shortcuts

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