endorser

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 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, identities ...view.Identity) *endorsementsOnProposalResponderView

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, opts ...fabric.TransactionOption) (*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(opts ...fabric.TransactionOption) (*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 Finality added in v0.4.0

type Finality struct {
	TxID    driver2.TxID
	Network driver2.Network
	Channel driver2.Channel
}

type FinalityViewFactory added in v0.4.0

type FinalityViewFactory struct{}

func (*FinalityViewFactory) NewView added in v0.4.0

func (p *FinalityViewFactory) NewView(in []byte) (view.View, 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 Response added in v0.2.0

type Response struct {
	ProposalResponses [][]byte
}

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 fabric.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) Envelope added in v0.2.0

func (t *Transaction) Envelope() (*fabric.Envelope, 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, error)

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) ProposalResponses added in v0.2.0

func (t *Transaction) ProposalResponses() ([][]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

Jump to

Keyboard shortcuts

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