filehandler

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorFile

type AnchorFile struct {
	// BatchFileHash is encoded hash of the batch file
	BatchFileHash string `json:"batchFileHash"`

	// MerkleRoot is encoded root hash of the Merkle tree constructed from
	// the operations included in the batch file
	MerkleRoot string `json:"merkleRoot"`
}

AnchorFile defines the schema of a Anchor File and its related operations.

type BatchFile

type BatchFile struct {
	// operations included in this batch file, each operation is an encoded string
	Operations []string `json:"operations"`
}

BatchFile defines the schema of a Batch File and its related operations.

type Handler

type Handler struct{}

Handler creates batch/anchor files from operations

func New

func New() *Handler

New returns new operations handler

func (*Handler) CreateAnchorFile

func (h *Handler) CreateAnchorFile(operations [][]byte, batchAddress string, multihashCode uint) ([]byte, error)

CreateAnchorFile will create anchor file for Sidetree transaction returns anchor file bytes

func (*Handler) CreateBatchFile

func (h *Handler) CreateBatchFile(operations [][]byte) ([]byte, error)

CreateBatchFile will combine all operations into batch file returns batch file bytes

Jump to

Keyboard shortcuts

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