fabric

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeTxnID added in v1.2.0

func ComputeTxnID(nonce, creator []byte, hash key.HashProvider) (string, error)

func ConvertBlockToJson added in v1.1.3

func ConvertBlockToJson(block *common.Block) (string, error)

func ConvertToBlock added in v1.1.3

func ConvertToBlock(blockData string) (*common.Block, error)

func ConvertToTran added in v1.2.0

func ConvertToTran(transData string) (*pb.ProcessedTransaction, error)

func ConvertTransToJson added in v1.2.0

func ConvertTransToJson(tx *pb.ProcessedTransaction) (string, error)

func CreateRequest

func CreateRequest(user *msp.UserData, request *TransRequest) (data string, proposal *fab.TransactionProposal, err error)

func GetProposalTxId added in v1.2.0

func GetProposalTxId(data []byte) (string, error)

func NewEnvelope added in v1.2.0

func NewEnvelope(user *msp.UserData, proposal *fab.TransactionProposal, resps []*fab.TransactionProposalResponse) (*common.Envelope, error)

func NewTranHeader

func NewTranHeader(channelID string, usre *msp.UserData) (fab.TransactionHeader, error)

func NewTransaction added in v1.2.0

func NewTransaction(proposal *fab.TransactionProposal, resps []*fab.TransactionProposalResponse) (*peer.Transaction, error)

func ParseRequest

func ParseRequest(data string) error

Types

type TransRequest

type TransRequest struct {
	ChannelId    string
	ChaincodeId  string
	Fcn          string
	Args         [][]byte
	TransientMap map[string][]byte
}

func (*TransRequest) GetRequest

func (t *TransRequest) GetRequest() *fab.ChaincodeInvokeRequest

type TransactionHeader

type TransactionHeader struct {
	// contains filtered or unexported fields
}

TransactionHeader contains metadata for a transaction created by the SDK.

func (*TransactionHeader) ChannelID

func (th *TransactionHeader) ChannelID() string

ChannelID returns the transaction's target channel identifier.

func (*TransactionHeader) Creator

func (th *TransactionHeader) Creator() []byte

Creator returns the transaction creator's identity bytes.

func (*TransactionHeader) Nonce

func (th *TransactionHeader) Nonce() []byte

Nonce returns the transaction's generated nonce.

func (*TransactionHeader) TransactionID

func (th *TransactionHeader) TransactionID() fab.TransactionID

TransactionID returns the transaction's computed identifier.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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