contract

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0, MIT Imports: 3 Imported by: 3

Documentation

Overview

Package contract implements the client-side FPC protocol

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContract

func GetContract(p Provider, chaincodeID string) *contractImpl

GetContract is the factory method for creating FPC Contract objects.

Parameters:
network is an initialized Fabric network object
chaincodeID is the ID of the target chaincode

Returns:
The contractImpl object

func New

func New(fpc Contract, ercc Contract, peerEndpoints []string, ep crypto.EncryptionProvider) *contractImpl

Types

type Contract

type Contract interface {
	Name() string
	EvaluateTransaction(name string, args ...string) ([]byte, error)
	SubmitTransaction(name string, args ...string) ([]byte, error)
	CreateTransaction(name string, peerEndpoints ...string) (Transaction, error)
}

Contract interface

type Provider

type Provider interface {
	GetContract(id string) Contract
}

type Transaction

type Transaction interface {
	Evaluate(args ...string) ([]byte, error)
}

Transaction interface that is needed by the FPC contract implementation

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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