fabricutils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEndorserSignedTX

func CreateEndorserSignedTX(signer SerializableSigner, proposal driver.Proposal, resps ...driver.ProposalResponse) (*common.Envelope, error)

CreateEndorserSignedTX assembles an Envelope message from proposal, endorsements, and a signer. This function should be called by a client when it has collected enough endorsements for a proposal to create a transaction and submit it to peers for ordering

func CreateEndorserTX

func CreateEndorserTX(signer SerializableSigner, proposal driver.Proposal, resps ...driver.ProposalResponse) (*common.Header, []byte, error)

CreateEndorserTX creates header and payload for an endorser transaction

func CreateEnvelope

func CreateEnvelope(signer SerializableSigner, hdr *common.Header, data []byte) (*common.Envelope, error)

CreateEnvelope creates a signed envelope from the passed header and data

Types

type SerializableSigner

type SerializableSigner interface {
	Sign(message []byte) ([]byte, error)

	Serialize() ([]byte, error)
}

type UnpackedProposalResponse

type UnpackedProposalResponse struct {
	ChaincodeAction *pb.ChaincodeAction
	TxRwSet         *rwsetutil.TxRwSet
}

UnpackedProposalResponse contains the interesting artifacts from inside the proposal.

func UnpackProposalResponse

func UnpackProposalResponse(payload []byte) (*UnpackedProposalResponse, error)

UnpackProposalResponse creates an an *UnpackedProposalResponse which is guaranteed to have no zero-ed fields or it returns an error.

func (*UnpackedProposalResponse) Results

func (p *UnpackedProposalResponse) Results() []byte

Jump to

Keyboard shortcuts

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