Documentation ¶
Index ¶
- func ComputeTxnID(nonce, creator []byte, hash key.HashProvider) (string, error)
- func ConvertBlockToJson(block *common.Block) (string, error)
- func ConvertToBlock(blockData string) (*common.Block, error)
- func ConvertToTran(transData string) (*pb.ProcessedTransaction, error)
- func ConvertTransToJson(tx *pb.ProcessedTransaction) (string, error)
- func CreateRequest(user *msp.UserData, request *TransRequest) (data string, proposal *fab.TransactionProposal, err error)
- func GetProposalTxId(data []byte) (string, error)
- func NewEnvelope(user *msp.UserData, proposal *fab.TransactionProposal, ...) (*common.Envelope, error)
- func NewTranHeader(channelID string, usre *msp.UserData) (fab.TransactionHeader, error)
- func NewTransaction(proposal *fab.TransactionProposal, resps []*fab.TransactionProposalResponse) (*peer.Transaction, error)
- func ParseRequest(data string) error
- type TransRequest
- type TransactionHeader
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 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 NewEnvelope ¶ added in v1.2.0
func NewEnvelope(user *msp.UserData, proposal *fab.TransactionProposal, resps []*fab.TransactionProposalResponse) (*common.Envelope, error)
func NewTranHeader ¶
func NewTransaction ¶ added in v1.2.0
func NewTransaction(proposal *fab.TransactionProposal, resps []*fab.TransactionProposalResponse) (*peer.Transaction, error)
func ParseRequest ¶
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.
Click to show internal directories.
Click to hide internal directories.