clientutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0, MIT Imports: 17 Imported by: 2

Documentation

Overview

Package clientutils provides utility functions for the storage client & client FSM

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommP

func CommP(ctx context.Context, pieceIO pieceio.PieceIO, rt abi.RegisteredSealProof, data *storagemarket.DataRef, storeID *multistore.StoreID) (cid.Cid, abi.UnpaddedPieceSize, error)

CommP calculates the commP for a given dataref

func LabelField added in v0.5.3

func LabelField(payloadCID cid.Cid) ([]byte, error)

LabelField makes a label field for a deal proposal as a CBOR encoded struct with the following structure:

{
	 "pcids": [payloadCID]
}

func VerifyResponse

func VerifyResponse(ctx context.Context, resp network.SignedResponse, minerAddr address.Address, tok shared.TipSetToken, verifier VerifyFunc) error

VerifyResponse verifies the signature on the given signed response matches the given miner address, using the given signature verification function

Types

type VerifyFunc

type VerifyFunc func(context.Context, crypto.Signature, address.Address, []byte, shared.TipSetToken) (bool, error)

VerifyFunc is a function that can validate a signature for a given address and bytes

Jump to

Keyboard shortcuts

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