anchor

package
v6.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 6 Imported by: 0

Documentation

Index

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
	KeyMR           string
	RecordHeight    uint32 //the block height we intended to put the anchorrecod 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 {
	Address     string //0x30aa981f6d2fce81083e584c8ee2f822b548752f
	TXID        string //0x50ea0effc383542811a58704a6d6842ed6d76439a2d942d941896ad097c06a78
	BlockHeight int64  //293003
	BlockHash   string //0x3b504616495fc9cf7be9b5b776692a9abbfb95491fa62abf62dcdf4d53ff5979
	Offset      int64  //0
}

Jump to

Keyboard shortcuts

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