Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorData ¶
AnchorData holds anchored data.
func ParseAnchorData ¶
func ParseAnchorData(data string) (*AnchorData, error)
ParseAnchorData will parse anchor string into anchor data model.
func (*AnchorData) GetAnchorString ¶
func (ad *AnchorData) GetAnchorString() string
GetAnchorString will create anchor string from anchor data.
type OperationHandler ¶
type OperationHandler struct {
// contains filtered or unexported fields
}
OperationHandler creates batch files(chunk, map, anchor) from batch operations.
func NewOperationHandler ¶
func NewOperationHandler(p protocol.Protocol, cas cas.Client, cp compressionProvider, parser OperationParser) *OperationHandler
NewOperationHandler returns new operations handler.
func (*OperationHandler) PrepareTxnFiles ¶
func (h *OperationHandler) PrepareTxnFiles(ops []*operation.QueuedOperation) (string, []*protocol.AnchorDocument, []*operation.Reference, error)
PrepareTxnFiles will create batch files(core index, core proof, provisional index, provisional proof and chunk) from batch operation and return anchor string, batch files information and operations.
type OperationParser ¶
type OperationParser interface { ParseOperation(namespace string, operationBuffer []byte, batch bool) (*model.Operation, error) ValidateSuffixData(suffixData *model.SuffixDataModel) error ValidateDelta(delta *model.DeltaModel) error ParseSignedDataForUpdate(compactJWS string) (*model.UpdateSignedDataModel, error) ParseSignedDataForDeactivate(compactJWS string) (*model.DeactivateSignedDataModel, error) ParseSignedDataForRecover(compactJWS string) (*model.RecoverSignedDataModel, error) }
OperationParser defines the functions for parsing operations.
type OperationProvider ¶
OperationProvider is an operation provider.
func NewOperationProvider ¶
func NewOperationProvider(p protocol.Protocol, parser OperationParser, cas DCAS, dp decompressionProvider) *OperationProvider
NewOperationProvider returns a new operation provider.
func (*OperationProvider) GetTxnOperations ¶
func (h *OperationProvider) GetTxnOperations(txn *txn.SidetreeTxn) ([]*operation.AnchoredOperation, error)
GetTxnOperations will read batch files(core/provisional index, proof files and chunk file) and assemble batch operations from those files.