Documentation ¶
Index ¶
- Constants
- func FromNibbles(data []byte) []byte
- func ResolveProof(proofBytes []byte) (id int, key []byte, proof [][]byte, err error)
- func ToNibbles(data []byte) []byte
- func VerifyProof(root *helper.UInt256, id int, key []byte, proof [][]byte) ([]byte, error)
- type IKVReadOnlyDb
- type Node
- func (n *Node) Deserialize(br *io.BinaryReader)
- func (n *Node) GetHash() *helper.UInt256
- func (n *Node) GetNodeType() NodeType
- func (n *Node) IsEmpty() bool
- func (n *Node) Serialize(bw *io.BinaryWriter)
- func (n *Node) SerializeAsChild(bw *io.BinaryWriter)
- func (n *Node) SetDirty()
- func (n *Node) Size() int
- func (n *Node) SizeAsChild() int
- func (n *Node) ToArrayWithoutReference() []byte
- type NodeType
- type ProofDb
- type StateRoot
- func (sr *StateRoot) Deserialize(br *io.BinaryReader)
- func (sr *StateRoot) DeserializeUnsigned(br *io.BinaryReader)
- func (sr *StateRoot) GetHash() *helper.UInt256
- func (sr *StateRoot) GetScriptHashesForVerifying() []helper.UInt160
- func (sr *StateRoot) GetSize() int
- func (sr *StateRoot) GetWitnesses() []tx.Witness
- func (sr *StateRoot) Serialize(bw *io.BinaryWriter)
- func (sr *StateRoot) SerializeUnsigned(bw *io.BinaryWriter)
- func (sr *StateRoot) SetWitnesses(data []tx.Witness)
- type Trie
Constants ¶
View Source
const BranchChildCount int = 17
View Source
const MaxKeyLength = (64 + 4) * 2
View Source
const MaxValueLength = 3 + 65535 + 1
Variables ¶
This section is empty.
Functions ¶
func FromNibbles ¶
func ResolveProof ¶
ResolveProof get key and proofs from proofdata
Types ¶
type IKVReadOnlyDb ¶
IKVReadOnlyDb to store data
type Node ¶
type Node struct { Reference int // BranchNode Children []Node // ExtensionNode Key []byte Next *Node // LeafNode Value []byte // contains filtered or unexported fields }
func NewBranchNode ¶
func NewBranchNode() *Node
func NewExtensionNode ¶
func NewHashNode ¶
func NewLeafNode ¶
func (*Node) Deserialize ¶
func (n *Node) Deserialize(br *io.BinaryReader)
func (*Node) GetNodeType ¶
func (*Node) Serialize ¶
func (n *Node) Serialize(bw *io.BinaryWriter)
func (*Node) SerializeAsChild ¶
func (n *Node) SerializeAsChild(bw *io.BinaryWriter)
func (*Node) SizeAsChild ¶
func (*Node) ToArrayWithoutReference ¶
type ProofDb ¶
type ProofDb struct {
// contains filtered or unexported fields
}
ProofDb a db to use for verify
func NewProofDb ¶
NewProofDb new instance of ProofDb from a string list
type StateRoot ¶
type StateRoot struct { Version byte `json:"version"` Index uint32 `json:"index"` RootHash string `json:"roothash"` Witnesses []models.RpcWitness `json:"witnesses"` }
StateRoot truct of StateRoot message
func (*StateRoot) Deserialize ¶
func (sr *StateRoot) Deserialize(br *io.BinaryReader)
func (*StateRoot) DeserializeUnsigned ¶
func (sr *StateRoot) DeserializeUnsigned(br *io.BinaryReader)
func (*StateRoot) GetScriptHashesForVerifying ¶
func (*StateRoot) GetWitnesses ¶
func (*StateRoot) Serialize ¶
func (sr *StateRoot) Serialize(bw *io.BinaryWriter)
func (*StateRoot) SerializeUnsigned ¶
func (sr *StateRoot) SerializeUnsigned(bw *io.BinaryWriter)
func (*StateRoot) SetWitnesses ¶
Click to show internal directories.
Click to hide internal directories.