Skip to main content

integrity

import "github.com/bloock/bloock-sdk-go/v2/entity/integrity"

Index

Constants

InvalidRecordError
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"
)
NetworkToProto

func NetworkToProto

func NetworkToProto(network Network) *proto.Network
Anchor

type Anchor

Anchor represents information about an anchor.

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

func NewAnchorFromProto

func NewAnchorFromProto(a *proto.Anchor) Anchor
AnchorNetwork

type AnchorNetwork

AnchorNetwork represents information about an anchor network.

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

func MapAnchorNetworksFromProto

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

func NewAnchorNetworkFromProto

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

func (AnchorNetwork) ToProto

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

type AnchorParams

AnchorParams represents parameters for anchor-related operations.

type AnchorParams struct {
Timeout int64
}
NewAnchorParams

func NewAnchorParams

func NewAnchorParams() AnchorParams

NewAnchorParams creates a new AnchorParams instance with default values.

Network

type Network

Network represents a network.

type Network = proto.Network
NetworkParams

type NetworkParams

NetworkParams represents parameters for network-related operations.

type NetworkParams struct {
Network Network
}
NewNetworkParams

func NewNetworkParams

func NewNetworkParams() NetworkParams

NewNetworkParams creates a new NetworkParams instance with default values.

Proof

type Proof

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

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

func NewProofFromProto

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

func (Proof) ToProto

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

type ProofAnchor

ProofAnchor represents a proof anchor.

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

func NewProofAnchorFromProto

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

func (ProofAnchor) ToProto

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

type RecordReceipt

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

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

func NewRecordReceiptFromProto

func NewRecordReceiptFromProto(r *proto.RecordReceipt) RecordReceipt

Generated by gomarkdoc