integrity

package
v2.8.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidRecordError     = "Record error: Invalid record"
	RecordNotFoundError    = "Infrastructure error: Http Client error: Request error - API connected by HttpClient found an error: record not found"
	WaitAnchorTimeoutError = "Anchor error: Wait Anchor timed out"
	AnchorNotFoundError    = "Infrastructure error: Http Client error: API connected by HttpClient found an error: anchor not found"
)

Variables

This section is empty.

Functions

func ListOfNetworks

func ListOfNetworks() networks

ListOfNetworks returns a networks instance with predefined network values.

func NetworkToProto

func NetworkToProto(network Network) *proto.Network

Types

type Anchor

type Anchor struct {
	Id         int64
	BlockRoots []string
	Networks   []AnchorNetwork
	Root       string
	Status     string
}

Anchor represents information about an anchor.

func NewAnchorFromProto

func NewAnchorFromProto(a *proto.Anchor) Anchor

type AnchorNetwork

type AnchorNetwork struct {
	Name   string
	State  string
	TxHash string
	Root   *string
}

AnchorNetwork represents information about an anchor network.

func MapAnchorNetworksFromProto

func MapAnchorNetworksFromProto(n []*proto.AnchorNetwork) []AnchorNetwork

func NewAnchorNetworkFromProto

func NewAnchorNetworkFromProto(a *proto.AnchorNetwork) AnchorNetwork

func (AnchorNetwork) ToProto

func (a AnchorNetwork) ToProto() *proto.AnchorNetwork

type AnchorParams

type AnchorParams struct {
	Timeout int64
}

AnchorParams represents parameters for anchor-related operations.

func NewAnchorParams

func NewAnchorParams() AnchorParams

NewAnchorParams creates a new AnchorParams instance with default values.

type Network

type Network = proto.Network

Network represents a network.

type NetworkParams

type NetworkParams struct {
	Network Network
}

NetworkParams represents parameters for network-related operations.

func NewNetworkParams

func NewNetworkParams() NetworkParams

NewNetworkParams creates a new NetworkParams instance with default values.

type Proof

type Proof struct {
	Leaves []string
	Nodes  []string
	Depth  string
	Bitmap string
	Anchor ProofAnchor
}

Proof represents a proof, including leaves, nodes, depth, bitmap, and anchor information.

func NewProofFromProto

func NewProofFromProto(p *proto.Proof) Proof

func (Proof) ToProto

func (p Proof) ToProto() *proto.Proof

type ProofAnchor

type ProofAnchor struct {
	AnchorID int64
	Networks []AnchorNetwork
	Root     string
	Status   string
}

ProofAnchor represents a proof anchor.

func NewProofAnchorFromProto

func NewProofAnchorFromProto(p *proto.ProofAnchor) ProofAnchor

func (ProofAnchor) ToProto

func (p ProofAnchor) ToProto() *proto.ProofAnchor

type RecordReceipt

type RecordReceipt struct {
	Anchor int64
	Client string
	Record string
	Status string
}

RecordReceipt represents a receipt for a record, including anchor ID, client, record, and status information.

func NewRecordReceiptFromProto

func NewRecordReceiptFromProto(r *proto.RecordReceipt) RecordReceipt

Jump to

Keyboard shortcuts

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