Documentation ¶
Index ¶
- type AnchorRecord
- func CreateAnchorRecordFromDBlock(dBlock interfaces.IDirectoryBlock) *AnchorRecord
- func UnmarshalAnchorRecord(data []byte) (*AnchorRecord, error)
- func UnmarshalAndValidateAnchorEntryAnyVersion(entry interfaces.IEBEntry, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
- func UnmarshalAndValidateAnchorRecord(data []byte, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
- func UnmarshalAndValidateAnchorRecordV2(data []byte, extIDs [][]byte, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
- func (e *AnchorRecord) JSONByte() ([]byte, error)
- func (e *AnchorRecord) JSONString() (string, error)
- func (ar *AnchorRecord) Marshal() (rval []byte, err error)
- func (ar *AnchorRecord) MarshalAndSign(priv interfaces.Signer) ([]byte, error)
- func (ar *AnchorRecord) MarshalAndSignV2(priv interfaces.Signer) ([]byte, []byte, error)
- func (e *AnchorRecord) String() string
- func (ar *AnchorRecord) Unmarshal(data []byte) error
- type BitcoinStruct
- type EthereumStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorRecord ¶
type AnchorRecord struct { AnchorRecordVer int DBHeight uint32 `json:",omitempty"` // The only directory block height included in this anchor KeyMR string `json:",omitempty"` // Merkle root of the only directory block included in this anchor DBHeightMax uint32 `json:",omitempty"` // The highest directory block height included in this anchor window DBHeightMin uint32 `json:",omitempty"` // The lowest directory block height included in this anchor window WindowMR string `json:",omitempty"` // Merkle root of all directory block KeyMRs from DBHeightMin to DBHeightMax RecordHeight uint32 // Directory block height we intended to put the AnchorRecord into Bitcoin *BitcoinStruct `json:",omitempty"` Ethereum *EthereumStruct `json:",omitempty"` }
AnchorRecord is used to construct anchor chain
func CreateAnchorRecordFromDBlock ¶
func CreateAnchorRecordFromDBlock(dBlock interfaces.IDirectoryBlock) *AnchorRecord
func UnmarshalAnchorRecord ¶
func UnmarshalAnchorRecord(data []byte) (*AnchorRecord, error)
func UnmarshalAndValidateAnchorEntryAnyVersion ¶
func UnmarshalAndValidateAnchorEntryAnyVersion(entry interfaces.IEBEntry, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
func UnmarshalAndValidateAnchorRecord ¶
func UnmarshalAndValidateAnchorRecord(data []byte, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
func UnmarshalAndValidateAnchorRecordV2 ¶
func UnmarshalAndValidateAnchorRecordV2(data []byte, extIDs [][]byte, publicKeys []interfaces.Verifier) (*AnchorRecord, bool, error)
func (*AnchorRecord) JSONByte ¶
func (e *AnchorRecord) JSONByte() ([]byte, error)
func (*AnchorRecord) JSONString ¶
func (e *AnchorRecord) JSONString() (string, error)
func (*AnchorRecord) Marshal ¶
func (ar *AnchorRecord) Marshal() (rval []byte, err error)
func (*AnchorRecord) MarshalAndSign ¶
func (ar *AnchorRecord) MarshalAndSign(priv interfaces.Signer) ([]byte, error)
func (*AnchorRecord) MarshalAndSignV2 ¶
func (ar *AnchorRecord) MarshalAndSignV2(priv interfaces.Signer) ([]byte, []byte, error)
func (*AnchorRecord) String ¶
func (e *AnchorRecord) String() string
func (*AnchorRecord) Unmarshal ¶
func (ar *AnchorRecord) Unmarshal(data []byte) error
type BitcoinStruct ¶
type BitcoinStruct struct { Address string //"1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1", TXID string //"9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5", BTC Hash - in reverse byte order BlockHeight int32 //345678, BlockHash string //"00000000000000000cc14eacfc7057300aea87bed6fee904fd8e1c1f3dc008d4", BTC Hash - in reverse byte order Offset int32 //87 }
type EthereumStruct ¶
type EthereumStruct struct { ContractAddress string // Address of the Ethereum anchor contract TxID string // Transaction ID of this particular anchor BlockHeight int64 // Ethereum block height that this anchor was included in BlockHash string // Hash of the Ethereum block that this anchor was included in TxIndex int64 // Where the anchor tx is located within that block }
Click to show internal directories.
Click to hide internal directories.