propsigner

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDealSignerService

func NewDealSignerService(h host.Host, authToken string, wallet Wallet) error

NewDealSignerService configures a stream handler for the proposal signer protocol.

func RequestDealProposalSignatureV1

func RequestDealProposalSignatureV1(
	ctx context.Context,
	h host.Host,
	authToken string,
	proposal market.DealProposal,
	rwPeerID peer.ID) (*crypto.Signature, error)

RequestDealProposalSignatureV1 request a signature for a deal proposal to a remote wallet.

func RequestDealStatusSignatureV1

func RequestDealStatusSignatureV1(
	ctx context.Context,
	h host.Host,
	authToken string,
	walletAddr string,
	propCid cid.Cid,
	rwPeerID peer.ID) (*crypto.Signature, error)

RequestDealStatusSignatureV1 request a signature for a deal status request to a remote wallet.

func ValidateDealProposalSignature

func ValidateDealProposalSignature(proposal market.DealProposal, sig *crypto.Signature) error

ValidateDealProposalSignature validates that the signature is valid for the provided deal proposal.

func ValidateDealStatusSignature

func ValidateDealStatusSignature(walletAddr string, propCid cid.Cid, sig *crypto.Signature) error

ValidateDealStatusSignature validates that the signature is valid for the proposal cid.

Types

type Wallet

type Wallet interface {
	Has(addr string) (bool, error)
	Sign(addr string, payload []byte) (*crypto.Signature, error)
}

Wallet contains private keys for Filecoin addresses.

Jump to

Keyboard shortcuts

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