tcc

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: 15 Imported by: 0

Documentation

Overview

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	InvokeFunction            = "invoke"
	QueryPublicParamsFunction = "queryPublicParams"
	AddCertifierFunction      = "addCertifier"
	QueryTokensFunctions      = "queryTokens"
	AreTokensSpent            = "areTokensSpent"

	PublicParamsPathVarEnv = "PUBLIC_PARAMS_FILE_PATH"
)
View Source
const Params = ``

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	EmitKey(val float32, event ...string)
}

type ChaincodeStubInterface

type ChaincodeStubInterface interface {
	shim.ChaincodeStubInterface
}

ChaincodeStubInterface is used by deployable chaincode apps to access and modify their ledgers

type GetTokenView

type GetTokenView struct {
	Network   string
	Channel   string
	Namespace string
	IDs       []*token2.ID
}

func NewGetTokensView

func NewGetTokensView(channel string, namespace string, ids ...*token2.ID) *GetTokenView

func (*GetTokenView) Call

func (r *GetTokenView) Call(context view.Context) (interface{}, error)

type PublicParameters added in v0.3.0

type PublicParameters interface {
	GraphHiding() bool
}

type SetupAction

type SetupAction struct {
	SetupParameters []byte
}

func (*SetupAction) GetSetupParameters

func (a *SetupAction) GetSetupParameters() ([]byte, error)

type TokenChaincode

type TokenChaincode struct {
	LogLevel         string
	Validator        Validator
	PublicParameters PublicParameters

	PPDigest             []byte
	TokenServicesFactory func([]byte) (PublicParameters, Validator, error)

	MetricsEnabled bool
	MetricsServer  string
	// contains filtered or unexported fields
}

func (*TokenChaincode) AreTokensSpent

func (cc *TokenChaincode) AreTokensSpent(idsRaw []byte, stub shim.ChaincodeStubInterface) pb.Response

func (*TokenChaincode) GetValidator

func (cc *TokenChaincode) GetValidator(builtInParams string) (Validator, error)

func (*TokenChaincode) Init

func (*TokenChaincode) Initialize

func (cc *TokenChaincode) Initialize(builtInParams string) error

func (*TokenChaincode) Invoke

func (cc *TokenChaincode) Invoke(stub shim.ChaincodeStubInterface) (res pb.Response)

func (*TokenChaincode) Params

func (cc *TokenChaincode) Params(builtInParams string) ([]byte, error)

func (*TokenChaincode) ProcessRequest

func (cc *TokenChaincode) ProcessRequest(raw []byte, stub shim.ChaincodeStubInterface) pb.Response

func (*TokenChaincode) QueryPublicParams

func (cc *TokenChaincode) QueryPublicParams(stub shim.ChaincodeStubInterface) pb.Response

func (*TokenChaincode) QueryTokens

func (cc *TokenChaincode) QueryTokens(idsRaw []byte, stub shim.ChaincodeStubInterface) pb.Response

func (*TokenChaincode) ReadParamsFromFile

func (cc *TokenChaincode) ReadParamsFromFile() string

type Validator

type Validator interface {
	UnmarshallAndVerify(ledger token.Ledger, binding string, raw []byte) ([]interface{}, error)
}

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