proof

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheReceipt = make(map[string][]*types.Receipt) // key -> chainId_blockHeight
)

Functions

func DeriveTire added in v1.2.0

func DeriveTire(rs DerivableList, tr *trie.Trie) *trie.Trie

func Get

func Get(receipts DerivableList, txIndex uint) ([][]byte, error)

func Oracle added in v1.2.2

func Oracle(blockNumber uint64, receipt *mapprotocol.TxReceipt, key []byte, prf [][]byte, fId msg.ChainId, method string, idx int,
	abi abi.ABI, orderId [32]byte, map2other bool) ([]byte, error)

func Pack added in v1.2.2

func Pack(fId msg.ChainId, method string, abi abi.ABI, params ...interface{}) ([]byte, error)

func SignOracle added in v1.2.2

func SignOracle(header *maptypes.Header, receipt *mapprotocol.TxReceipt, key []byte, prf [][]byte, fId msg.ChainId,
	idx int, method string, sign [][]byte, orderId [32]byte, map2other bool) ([]byte, error)

func V3Pack added in v1.2.2

func V3Pack(fId msg.ChainId, method string, abi abi.ABI, idx int, orderId [32]byte, map2other bool, params ...interface{}) ([]byte, error)

Types

type Data added in v1.2.0

type Data struct {
	BlockNum     *big.Int
	ReceiptProof ReceiptProof
}

type DerivableList

type DerivableList interface {
	Len() int
	EncodeIndex(int, *bytes.Buffer)
}

type NewData added in v1.2.2

type NewData struct {
	BlockNum     *big.Int
	ReceiptProof NewReceiptProof
}

type NewReceiptProof added in v1.2.2

type NewReceiptProof struct {
	TxReceipt   []byte
	ReceiptType *big.Int
	KeyIndex    []byte
	Proof       [][]byte
}

type ReceiptProof added in v1.2.0

type ReceiptProof struct {
	TxReceipt mapprotocol.TxReceipt
	KeyIndex  []byte
	Proof     [][]byte
}

type ReceiptRLP added in v1.2.0

type ReceiptRLP struct {
	PostStateOrStatus []byte
	CumulativeGasUsed uint64
	Bloom             types.Bloom
	Logs              []*types.Log
}

type SignData added in v1.2.2

type SignData struct {
	BlockNum     *big.Int
	ReceiptRoot  [32]byte
	Signatures   [][]byte
	ReceiptProof NewReceiptProof
}

Jump to

Keyboard shortcuts

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