endorser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAcceptView

func NewAcceptView(tx *Transaction, ids ...view.Identity) *endorseView

func NewCollectApprovesView

func NewCollectApprovesView(tx *Transaction, parties ...view.Identity) *collectEndorsementsView

func NewCollectEndorsementsView

func NewCollectEndorsementsView(tx *Transaction, parties ...view.Identity) *collectEndorsementsView

func NewEndorseView

func NewEndorseView(tx *Transaction, ids ...view.Identity) *endorseView

func NewEndorsementOnProposalResponderView

func NewEndorsementOnProposalResponderView(tx *Transaction) *endorsementsOnProposalResponderView

func NewFinalityFromView

func NewFinalityFromView(tx *Transaction, endpoints ...view.Identity) *finalityView

func NewFinalityView

func NewFinalityView(tx *Transaction) *finalityView

func NewFinalityWithTimeoutView

func NewFinalityWithTimeoutView(tx *Transaction, timeout time.Duration) *finalityView

NewFinalityWithTimeoutView runs the finality view for the passed transaction and timeout

func NewOrderingAndFinalityView

func NewOrderingAndFinalityView(tx *Transaction) *orderingView

func NewOrderingAndFinalityWithTimeoutView

func NewOrderingAndFinalityWithTimeoutView(tx *Transaction, timeout time.Duration) *orderingView

func NewOrderingView

func NewOrderingView(tx *Transaction) *orderingView

func NewParallelCollectEndorsementsOnProposalView

func NewParallelCollectEndorsementsOnProposalView(tx *Transaction, parties ...view.Identity) *parallelCollectEndorsementsOnProposalView

func NewReceiveTransactionView

func NewReceiveTransactionView() *receiveTransactionView

func NewTransaction

func NewTransaction(context view.Context) (*Builder, *Transaction, error)

func NewTransactionFromBytes

func NewTransactionFromBytes(context view.Context, bytes []byte) (*Builder, *Transaction, error)

func NewTransactionFromEnvelopeBytes

func NewTransactionFromEnvelopeBytes(sp view2.ServiceProvider, bytes []byte) (*Builder, *Transaction, error)

func NewTransactionWith

func NewTransactionWith(sp view2.ServiceProvider, network, channel string, id view.Identity) (*Builder, *Transaction, error)

func NewTransactionWithSigner

func NewTransactionWithSigner(context view.Context, network, channel string, id view.Identity) (*Builder, *Transaction, error)

Types

type Builder

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

func NewBuilder

func NewBuilder(context view.Context) *Builder

func NewBuilderWithServiceProvider

func NewBuilderWithServiceProvider(sp view2.ServiceProvider) *Builder

func (*Builder) NewTransaction

func (t *Builder) NewTransaction() (*Transaction, error)

func (*Builder) NewTransactionForChannel

func (t *Builder) NewTransactionForChannel(channel string) (*Transaction, error)

func (*Builder) NewTransactionFromBytes

func (t *Builder) NewTransactionFromBytes(bytes []byte) (*Transaction, error)

func (*Builder) NewTransactionFromEnvelopeBytes

func (t *Builder) NewTransactionFromEnvelopeBytes(bytes []byte) (*Transaction, error)

func (*Builder) NewTransactionWithIdentity

func (t *Builder) NewTransactionWithIdentity(id view.Identity) (*Transaction, error)

type Namespaces

type Namespaces []string

func (Namespaces) At

func (k Namespaces) At(i int) string

func (Namespaces) Count

func (k Namespaces) Count() int

func (Namespaces) Filter

func (k Namespaces) Filter(f func(k string) bool) Namespaces

func (Namespaces) Match

func (k Namespaces) Match(keys Namespaces) bool

type SerializableSigner

type SerializableSigner interface {
	Sign(message []byte) ([]byte, error)

	Serialize() ([]byte, error)
}

type Transaction

type Transaction struct {
	view2.ServiceProvider

	Transaction *fabric.Transaction
	// contains filtered or unexported fields
}

func ReceiveTransaction

func ReceiveTransaction(context view.Context) (*Transaction, error)

func (*Transaction) AppendParameter

func (t *Transaction) AppendParameter(p []byte)

func (*Transaction) AppendProposalResponse

func (t *Transaction) AppendProposalResponse(response *fabric.ProposalResponse) error

func (*Transaction) AppendVerifierProvider

func (t *Transaction) AppendVerifierProvider(vp VerifierProvider)

func (*Transaction) Bytes

func (t *Transaction) Bytes() ([]byte, error)

func (*Transaction) BytesNoTransient

func (t *Transaction) BytesNoTransient() ([]byte, error)

func (*Transaction) Chaincode

func (t *Transaction) Chaincode() (string, string)

func (*Transaction) Channel

func (t *Transaction) Channel() string

func (*Transaction) Close

func (t *Transaction) Close()

func (*Transaction) Creator

func (t *Transaction) Creator() view.Identity

func (*Transaction) Endorse

func (t *Transaction) Endorse() error

func (*Transaction) EndorseProposal

func (t *Transaction) EndorseProposal() error

func (*Transaction) EndorseProposalResponse

func (t *Transaction) EndorseProposalResponse() error

func (*Transaction) EndorseProposalResponseWithIdentity

func (t *Transaction) EndorseProposalResponseWithIdentity(identity view.Identity) error

func (*Transaction) EndorseProposalWithIdentity

func (t *Transaction) EndorseProposalWithIdentity(identity view.Identity) error

func (*Transaction) EndorseWithIdentity

func (t *Transaction) EndorseWithIdentity(identity view.Identity) error

func (*Transaction) EndorseWithSigner

func (t *Transaction) EndorseWithSigner(identity view.Identity, s fabric.Signer) error

func (*Transaction) ExistsTransientState

func (t *Transaction) ExistsTransientState(key string) bool

func (*Transaction) FabricNetworkService

func (t *Transaction) FabricNetworkService() *fabric.NetworkService

func (*Transaction) FunctionAndParameters

func (t *Transaction) FunctionAndParameters() (string, []string)

func (*Transaction) GetSignatureOf

func (t *Transaction) GetSignatureOf(party view.Identity) []byte

func (*Transaction) GetTransient

func (t *Transaction) GetTransient(key string) []byte

func (*Transaction) GetTransientState

func (t *Transaction) GetTransientState(key string, state interface{}) error

func (*Transaction) HasBeenEndorsedBy

func (t *Transaction) HasBeenEndorsedBy(parties ...view.Identity) error

HasBeenEndorsedBy returns nil if each passed party has signed this transaction

func (*Transaction) Hash

func (t *Transaction) Hash() ([]byte, error)

func (*Transaction) ID

func (t *Transaction) ID() string

func (*Transaction) Namespaces

func (t *Transaction) Namespaces() Namespaces

Namespaces returns the list of namespaces this transaction contains.

func (*Transaction) Network

func (t *Transaction) Network() string

func (*Transaction) Parameters

func (t *Transaction) Parameters() [][]byte

func (*Transaction) ProposalResponse

func (t *Transaction) ProposalResponse() ([]byte, error)

func (*Transaction) RWSet

func (t *Transaction) RWSet() (*fabric.RWSet, error)

func (*Transaction) Raw

func (t *Transaction) Raw() ([]byte, error)

func (*Transaction) Results

func (t *Transaction) Results() ([]byte, error)

func (*Transaction) SetFromBytes

func (t *Transaction) SetFromBytes(raw []byte) error

func (*Transaction) SetFromEnvelopeBytes

func (t *Transaction) SetFromEnvelopeBytes(raw []byte) error

func (*Transaction) SetParameterAt

func (t *Transaction) SetParameterAt(i int, p []byte) error

func (*Transaction) SetProposal

func (t *Transaction) SetProposal(chaincode string, version string, function string, params ...string)

func (*Transaction) SetTransient

func (t *Transaction) SetTransient(key string, raw []byte) error

func (*Transaction) SetTransientState

func (t *Transaction) SetTransientState(key string, state interface{}) error

type VerifierProvider

type VerifierProvider interface {
	GetVerifier(identity view.Identity) (view2.Verifier, error)
}

Jump to

Keyboard shortcuts

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