starcoin

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SPARSE_MERKLE_PLACEHOLDER_HASH, _ = types.CreateLiteralHash("SPARSE_MERKLE_PLACEHOLDER_HASH")

Functions

func AddressKeyHash

func AddressKeyHash(address types.AccountAddress) (types.HashValue, error)

func Bytes2Bits

func Bytes2Bits(data []byte) []int

func GetCrossChainEventRawData

func GetCrossChainEventRawData(ccEvtData []byte) ([]byte, error)

func HashSha

func HashSha(data []byte) []byte

func IsInstanceOf

func IsInstanceOf(objectPtr, typePtr interface{}) bool

func VerifyEventProof

func VerifyEventProof(proof *TransactionInfoProof, txnAccumulatorRoot types.HashValue, address []byte) (*types.ContractEventV0, error)

Types

type AccumulatorProof

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

type ContractEvent

type ContractEvent struct {
	V Event `json:"V0"`
}

type CrossChainEvent

type CrossChainEvent struct {
	Sender               []byte
	TxId                 []byte
	ProxyOrAssetContract []byte
	ToChainId            uint64
	ToContract           []byte
	RawData              []byte
}

func BcsDeserializeCrossChainEvent

func BcsDeserializeCrossChainEvent(input []byte) (CrossChainEvent, error)

func DeserializeCrossChainEvent

func DeserializeCrossChainEvent(deserializer serde.Deserializer) (CrossChainEvent, error)

func (*CrossChainEvent) BcsSerialize

func (obj *CrossChainEvent) BcsSerialize() ([]byte, error)

func (*CrossChainEvent) Serialize

func (obj *CrossChainEvent) Serialize(serializer serde.Serializer) error

type Event

type Event struct {
	Key            string         `json:"key"`
	SequenceNumber int            `json:"sequence_number"`
	TypeTag        TypeTag_Struct `json:"type_tag"`
	EventData      []byte         `json:"event_data"`
}

type EventWithProof

type EventWithProof struct {
	Event string   `json:"event"`
	Proof Siblings `json:"proof"`
}

type Handler

type Handler struct {
}

Handler ...

func NewHandler

func NewHandler() *Handler

NewHandler ...

func (*Handler) MakeDepositProposal

func (h *Handler) MakeDepositProposal(service *native.NativeService) (*scom.MakeTxParam, error)

MakeDepositProposal ...

type Leaf

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

type Siblings

type Siblings struct {
	Sibling []string `json:"siblings"`
}

type SparseMerkleProof

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

type SparseMerkleProofJson

type SparseMerkleProofJson struct {
	Leaf     []string `json:"leaf"`
	Siblings []string `json:"siblings"`
}

type StarcoinToPolyHeaderOrCrossChainMsg

type StarcoinToPolyHeaderOrCrossChainMsg struct {
	EventIndex *int    `json:"event_index,omitempty"`
	AccessPath *string `json:"access_path,omitempty"`
}

type StateProof

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

type StateProofJson

type StateProofJson struct {
	AccountState      []byte                `json:"account_state"`
	AccountProof      SparseMerkleProofJson `json:"account_proof"`
	AccountStateProof SparseMerkleProofJson `json:"account_state_proof"`
}

type StateWithProof

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

type StateWithProofJson

type StateWithProofJson struct {
	State []byte         `json:"state"`
	Proof StateProofJson `json:"proof"`
}

type StructTag

type StructTag struct {
	Address    string   `json:"address"`
	Module     string   `json:"module"`
	Name       string   `json:"name"`
	TypeParams []string `json:"type_params"`
}

type TransactionInfoProof

type TransactionInfoProof struct {
	TransactionInfo stc.TransactionInfo `json:"transaction_info"`
	Proof           Siblings            `json:"proof"`
	EventWithProof  EventWithProof      `json:"event_proof"`
	StateWithProof  StateWithProofJson  `json:"state_proof"`
	AccessPath      *string             `json:"access_path,omitempty"`
	EventIndex      *int                `json:"event_index,omitempty"`
}

type TypeTag_Struct

type TypeTag_Struct struct {
	Value StructTag `json:"Struct"`
}

Jump to

Keyboard shortcuts

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