Documentation ¶
Index ¶
- Variables
- func UintToHash(i uint32) interfaces.IHash
- type AnchorData
- func (e *AnchorData) DatabasePrimaryIndex() interfaces.IHash
- func (e *AnchorData) DatabaseSecondaryIndex() interfaces.IHash
- func (e *AnchorData) GetChainID() interfaces.IHash
- func (e *AnchorData) GetDatabaseHeight() uint32
- func (c *AnchorData) IsComplete() bool
- func (e *AnchorData) JSONBuffer(b *bytes.Buffer) error
- func (e *AnchorData) JSONByte() ([]byte, error)
- func (e *AnchorData) JSONString() (string, error)
- func (e *AnchorData) MarshalBinary() ([]byte, error)
- func (c *AnchorData) New() interfaces.BinaryMarshallableAndCopyable
- func (e *AnchorData) String() string
- func (e *AnchorData) UnmarshalBinary(data []byte) (err error)
- func (e *AnchorData) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- type AnchorDataBase
- type AnchorDatabaseOverlay
- func (db *AnchorDatabaseOverlay) FetchAnchorData(dbHeight uint32) (*AnchorData, error)
- func (db *AnchorDatabaseOverlay) FetchAnchorDataHead() (*AnchorData, error)
- func (db *AnchorDatabaseOverlay) FetchProgramState() (*ProgramState, error)
- func (db *AnchorDatabaseOverlay) InsertAnchorData(data *AnchorData, isHead bool) error
- func (db *AnchorDatabaseOverlay) InsertProgramState(data *ProgramState) error
- func (db *AnchorDatabaseOverlay) UpdateAnchorDataHead() error
- type ProgramState
- func (e *ProgramState) JSONBuffer(b *bytes.Buffer) error
- func (e *ProgramState) JSONByte() ([]byte, error)
- func (e *ProgramState) JSONString() (string, error)
- func (e *ProgramState) MarshalBinary() ([]byte, error)
- func (e *ProgramState) String() string
- func (e *ProgramState) UnmarshalBinary(data []byte) (err error)
- func (e *ProgramState) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- type ProgramStateBase
Constants ¶
This section is empty.
Variables ¶
View Source
var AnchorDataStr []byte = []byte("AnchorData")
View Source
var CHAIN_HEAD = []byte("ChainHead")
View Source
var ProgramStateStr []byte = []byte("ProgramState")
Functions ¶
func UintToHash ¶
func UintToHash(i uint32) interfaces.IHash
Types ¶
type AnchorData ¶
type AnchorData struct {
AnchorDataBase
}
func (*AnchorData) DatabasePrimaryIndex ¶
func (e *AnchorData) DatabasePrimaryIndex() interfaces.IHash
func (*AnchorData) DatabaseSecondaryIndex ¶
func (e *AnchorData) DatabaseSecondaryIndex() interfaces.IHash
func (*AnchorData) GetChainID ¶
func (e *AnchorData) GetChainID() interfaces.IHash
func (*AnchorData) GetDatabaseHeight ¶
func (e *AnchorData) GetDatabaseHeight() uint32
func (*AnchorData) IsComplete ¶
func (c *AnchorData) IsComplete() bool
func (*AnchorData) JSONBuffer ¶
func (e *AnchorData) JSONBuffer(b *bytes.Buffer) error
func (*AnchorData) JSONByte ¶
func (e *AnchorData) JSONByte() ([]byte, error)
func (*AnchorData) JSONString ¶
func (e *AnchorData) JSONString() (string, error)
func (*AnchorData) MarshalBinary ¶
func (e *AnchorData) MarshalBinary() ([]byte, error)
func (*AnchorData) New ¶
func (c *AnchorData) New() interfaces.BinaryMarshallableAndCopyable
func (*AnchorData) String ¶
func (e *AnchorData) String() string
func (*AnchorData) UnmarshalBinary ¶
func (e *AnchorData) UnmarshalBinary(data []byte) (err error)
func (*AnchorData) UnmarshalBinaryData ¶
func (e *AnchorData) UnmarshalBinaryData(data []byte) (newData []byte, err error)
type AnchorDataBase ¶
type AnchorDataBase struct { DBlockKeyMR string DBlockHeight uint32 BitcoinRecordHeight uint32 BitcoinRecordEntryHash string EthereumRecordHeight uint32 EthereumRecordEntryHash string Bitcoin struct { Address string //"1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1", TXID string //"9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5", BTC Hash - in reverse byte order BlockHeight int64 //345678, BlockHash string //"00000000000000000cc14eacfc7057300aea87bed6fee904fd8e1c1f3dc008d4", BTC Hash - in reverse byte order Offset int64 //87 } Ethereum struct { Address string //0x30aa981f6d2fce81083e584c8ee2f822b548752f TXID string //0x50ea0effc383542811a58704a6d6842ed6d76439a2d942d941896ad097c06a78 BlockHeight int64 //293003 BlockHash string //0x3b504616495fc9cf7be9b5b776692a9abbfb95491fa62abf62dcdf4d53ff5979 Offset int64 //0 } }
type AnchorDatabaseOverlay ¶
type AnchorDatabaseOverlay struct {
databaseOverlay.Overlay
}
func NewAnchorOverlay ¶
func NewAnchorOverlay(db interfaces.IDatabase) *AnchorDatabaseOverlay
func NewBoltDB ¶
func NewBoltDB(boltPath string) (*AnchorDatabaseOverlay, error)
func NewLevelDB ¶
func NewLevelDB(ldbpath string) (*AnchorDatabaseOverlay, error)
func NewMapDB ¶
func NewMapDB() *AnchorDatabaseOverlay
func (*AnchorDatabaseOverlay) FetchAnchorData ¶
func (db *AnchorDatabaseOverlay) FetchAnchorData(dbHeight uint32) (*AnchorData, error)
func (*AnchorDatabaseOverlay) FetchAnchorDataHead ¶
func (db *AnchorDatabaseOverlay) FetchAnchorDataHead() (*AnchorData, error)
func (*AnchorDatabaseOverlay) FetchProgramState ¶
func (db *AnchorDatabaseOverlay) FetchProgramState() (*ProgramState, error)
func (*AnchorDatabaseOverlay) InsertAnchorData ¶
func (db *AnchorDatabaseOverlay) InsertAnchorData(data *AnchorData, isHead bool) error
func (*AnchorDatabaseOverlay) InsertProgramState ¶
func (db *AnchorDatabaseOverlay) InsertProgramState(data *ProgramState) error
func (*AnchorDatabaseOverlay) UpdateAnchorDataHead ¶
func (db *AnchorDatabaseOverlay) UpdateAnchorDataHead() error
type ProgramState ¶
type ProgramState struct {
ProgramStateBase
}
func (*ProgramState) JSONBuffer ¶
func (e *ProgramState) JSONBuffer(b *bytes.Buffer) error
func (*ProgramState) JSONByte ¶
func (e *ProgramState) JSONByte() ([]byte, error)
func (*ProgramState) JSONString ¶
func (e *ProgramState) JSONString() (string, error)
func (*ProgramState) MarshalBinary ¶
func (e *ProgramState) MarshalBinary() ([]byte, error)
func (*ProgramState) String ¶
func (e *ProgramState) String() string
func (*ProgramState) UnmarshalBinary ¶
func (e *ProgramState) UnmarshalBinary(data []byte) (err error)
func (*ProgramState) UnmarshalBinaryData ¶
func (e *ProgramState) UnmarshalBinaryData(data []byte) (newData []byte, err error)
type ProgramStateBase ¶
Click to show internal directories.
Click to hide internal directories.