fasdk

package
v0.0.0-...-cf06ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: GPL-3.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Admin = "Admin"
	User  = "User1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FabricBlock

type FabricBlock struct {
	Number            uint64              `json:"number"`
	CurrentBlockHash  string              `json:"currentBlockHash"`
	PreviousBlockHash string              `json:"previousBlockHash"`
	Transactions      []FabricTransaction `json:"transactions"`
}

type FabricClient

type FabricClient struct {
	ConnectionFile []byte
	OrdererDomain  string
	Orgs           []string
	OrgAdmin       string
	UserName       string
	ChannelId      string
	GoPath         string
	// contains filtered or unexported fields
}

func NewFabricClient

func NewFabricClient(connectionFile []byte, channelId string, orgs []string, orderer string) *FabricClient

func (*FabricClient) Close

func (f *FabricClient) Close()

func (*FabricClient) CreateChannel

func (f *FabricClient) CreateChannel(channelTx string) error

func (*FabricClient) InstallChaincode

func (f *FabricClient) InstallChaincode(chaincodeId, chaincodePath, version string) error

func (*FabricClient) InstantiateChaincode

func (f *FabricClient) InstantiateChaincode(chaincodeId, chaincodePath, version string, policy string, args [][]byte) ([]byte, error)

func (*FabricClient) InvokeChaincode

func (f *FabricClient) InvokeChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)

func (*FabricClient) InvokeChaincodeWithEvent

func (f *FabricClient) InvokeChaincodeWithEvent(chaincodeId, fcn string, args [][]byte) ([]byte, error)

func (*FabricClient) JoinChannel

func (f *FabricClient) JoinChannel() error

func (*FabricClient) QueryBlock

func (f *FabricClient) QueryBlock(height uint64) (*FabricBlock, error)

func (*FabricClient) QueryBlockByHash

func (f *FabricClient) QueryBlockByHash(hash []byte) (*FabricBlock, error)

func (*FabricClient) QueryBlockByTxid

func (f *FabricClient) QueryBlockByTxid(txid string) (*FabricBlock, error)

func (*FabricClient) QueryChaincode

func (f *FabricClient) QueryChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)

func (*FabricClient) QueryLedger

func (f *FabricClient) QueryLedger() (*fab.BlockchainInfoResponse, error)

func (*FabricClient) Setup

func (f *FabricClient) Setup() error

func (*FabricClient) UpdateChannel

func (f *FabricClient) UpdateChannel(anchorsTx []string) error

func (*FabricClient) UpgradeChaincode

func (f *FabricClient) UpgradeChaincode(chaincodeId, chaincodePath, version string, policy string, args [][]byte) ([]byte, error)

type FabricTransaction

type FabricTransaction struct {
	No        int64                     `json:"no"`
	Status    string                    `json:"status"`
	Txid      string                    `json:"txid"`
	Channel   string                    `json:"channel"`
	Type      string                    `json:"type"`
	Subject   string                    `json:"subject"`
	Config    string                    `json:"config"`
	Timestamp int64                     `json:"timestamp"`
	Actions   []FabricTransactionAction `json:"actions"`
}

type FabricTransactionAction

type FabricTransactionAction struct {
	Endorsers []string                       `json:"endorsers"`
	RWSet     []FabricTransactionActionRWSet `json:"rwSet"`
}

type FabricTransactionActionRWSet

type FabricTransactionActionRWSet struct {
	Cc   string   `json:"cc"`
	RSet []string `json:"rSet"`
	WSet []string `json:"wSet"`
}

Jump to

Keyboard shortcuts

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