Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCidLink(hash []byte) cidlink.Link
- func Decode(proto datamodel.NodePrototype, src string) (datamodel.Node, error)
- func DecodeCBOR(proto datamodel.NodePrototype, src []byte) (datamodel.Node, error)
- func Encode(n datamodel.Node) (string, error)
- func EncodeCBOR(n datamodel.Node) ([]byte, error)
- func GetDagCBORLinkPrototype() ipld.LinkPrototype
- func GetDagEthereumLinkPrototype(codec string) ipld.LinkPrototype
- func GetDagJOSELinkPrototype() ipld.LinkPrototype
- func GetDagJSONLinkPrototype() ipld.LinkPrototype
- func GetLinkPrototype() ipld.LinkPrototype
- func GetRawLinkPrototype() ipld.LinkPrototype
- func ParseCidLink(hash string) (cidlink.Link, error)
- func ReadFromStore(s Storage, hash string, path string) (string, error)
- func ValueToJSON(val ref.Val) string
- type Storage
- func (s *Storage) InitGenesis(moniker []byte)
- func (k *Storage) Load(linkCtx ipld.LinkContext, link datamodel.Link) (datamodel.Node, error)
- func (s *Storage) LoadGenesis(cid string)
- func (k *Storage) Store(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
- func (k *Storage) StoreDagCBOR(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
- func (k *Storage) StoreDagEth(linkCtx ipld.LinkContext, node datamodel.Node, codecFormat string) datamodel.Link
- func (k *Storage) StoreRaw(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
Constants ¶
const (
LINK_PROTO_VERSION = 1
)
Variables ¶
eth-block ipld 0x90 permanent Ethereum Header (RLP) eth-block-list ipld 0x91 permanent Ethereum Header List (RLP) eth-tx-trie ipld 0x92 permanent Ethereum Transaction Trie (Eth-Trie) eth-tx ipld 0x93 permanent Ethereum Transaction (MarshalBinary) eth-tx-receipt-trie ipld 0x94 permanent Ethereum Transaction Receipt Trie (Eth-Trie) eth-tx-receipt ipld 0x95 permanent Ethereum Transaction Receipt (MarshalBinary) eth-state-trie ipld 0x96 permanent Ethereum State Trie (Eth-Secure-Trie) eth-account-snapshot ipld 0x97 permanent Eth ereum Account Snapshot (RLP) eth-storage-trie ipld 0x98 permanent Ethereum Contract Storage Trie (Eth-Secure-Trie) eth-receipt-log-trie ipld 0x99 draft Ethereum Transaction Receipt Log Trie (Eth-Trie) eth-reciept-log ipld 0x9a draft Ethereum Transaction Receipt Log (RLP)
Functions ¶
func CreateCidLink ¶
CreateCidLink takes a hash eg ethereum hash and converts it to cid multihash
func DecodeCBOR ¶
func GetDagCBORLinkPrototype ¶
func GetDagCBORLinkPrototype() ipld.LinkPrototype
func GetDagEthereumLinkPrototype ¶
func GetDagEthereumLinkPrototype(codec string) ipld.LinkPrototype
func GetDagJOSELinkPrototype ¶
func GetDagJOSELinkPrototype() ipld.LinkPrototype
func GetDagJSONLinkPrototype ¶
func GetDagJSONLinkPrototype() ipld.LinkPrototype
func GetLinkPrototype ¶
func GetLinkPrototype() ipld.LinkPrototype
func GetRawLinkPrototype ¶
func GetRawLinkPrototype() ipld.LinkPrototype
func ParseCidLink ¶
ParseCidLink parses a string cid multihash into a cidLink
func ValueToJSON ¶
From: https://github.com/google/cel-go/blob/master/codelab/solution/codelab.go valueToJSON converts the CEL type to a protobuf JSON representation and marshals the result to a string.
Types ¶
type Storage ¶
func NewStorage ¶
func (*Storage) InitGenesis ¶ added in v0.4.1
func (*Storage) LoadGenesis ¶ added in v0.4.1
func (*Storage) StoreDagCBOR ¶
Store node as dag-cbor