rpctransact

package
v0.29.8-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 23 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpctransact        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpctransact          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRpctransact = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterTransactServer

func RegisterTransactServer(s *grpc.Server, srv TransactServer)

Types

type CallCodeParam

type CallCodeParam struct {
	FromAddress          github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=FromAddress,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"FromAddress"`
	Code                 []byte                                       `protobuf:"bytes,2,opt,name=Code,proto3" json:"Code,omitempty"`
	Data                 []byte                                       `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                     `json:"-"`
	XXX_unrecognized     []byte                                       `json:"-"`
	XXX_sizecache        int32                                        `json:"-"`
}

func (*CallCodeParam) Descriptor

func (*CallCodeParam) Descriptor() ([]byte, []int)

func (*CallCodeParam) GetCode

func (m *CallCodeParam) GetCode() []byte

func (*CallCodeParam) GetData

func (m *CallCodeParam) GetData() []byte

func (*CallCodeParam) Marshal

func (m *CallCodeParam) Marshal() (dAtA []byte, err error)

func (*CallCodeParam) MarshalTo

func (m *CallCodeParam) MarshalTo(dAtA []byte) (int, error)

func (*CallCodeParam) MarshalToSizedBuffer added in v0.30.0

func (m *CallCodeParam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallCodeParam) ProtoMessage

func (*CallCodeParam) ProtoMessage()

func (*CallCodeParam) Reset

func (m *CallCodeParam) Reset()

func (*CallCodeParam) Size

func (m *CallCodeParam) Size() (n int)

func (*CallCodeParam) String

func (m *CallCodeParam) String() string

func (*CallCodeParam) Unmarshal

func (m *CallCodeParam) Unmarshal(dAtA []byte) error

func (*CallCodeParam) XXX_DiscardUnknown added in v0.23.0

func (m *CallCodeParam) XXX_DiscardUnknown()

func (*CallCodeParam) XXX_Marshal added in v0.23.0

func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallCodeParam) XXX_Merge added in v0.23.0

func (m *CallCodeParam) XXX_Merge(src proto.Message)

func (*CallCodeParam) XXX_MessageName

func (*CallCodeParam) XXX_MessageName() string

func (*CallCodeParam) XXX_Size added in v0.23.0

func (m *CallCodeParam) XXX_Size() int

func (*CallCodeParam) XXX_Unmarshal added in v0.23.0

func (m *CallCodeParam) XXX_Unmarshal(b []byte) error

type TransactClient

type TransactClient interface {
	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
	// and wait for it to be included in block
	BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
	BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error)
	// Sign transaction server-side
	SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error)
	// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
	FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error)
	// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
	CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Formulate and sign a CallTx transaction signed server-side
	CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error)
	// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
	// and wait for the transaction to be included in a block
	CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
	CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
	SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Formulate and  SendTx transaction signed server-side
	SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error)
	// Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name
	NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
	// Formulate a NameTx signed server-side
	NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error)
}

TransactClient is the client API for Transact service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTransactClient

func NewTransactClient(cc *grpc.ClientConn) TransactClient

type TransactServer

type TransactServer interface {
	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
	// and wait for it to be included in block
	BroadcastTxSync(context.Context, *TxEnvelopeParam) (*exec.TxExecution, error)
	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
	BroadcastTxAsync(context.Context, *TxEnvelopeParam) (*txs.Receipt, error)
	// Sign transaction server-side
	SignTx(context.Context, *TxEnvelopeParam) (*TxEnvelope, error)
	// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
	FormulateTx(context.Context, *payload.Any) (*TxEnvelope, error)
	// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
	CallTxSync(context.Context, *payload.CallTx) (*exec.TxExecution, error)
	// Formulate and sign a CallTx transaction signed server-side
	CallTxAsync(context.Context, *payload.CallTx) (*txs.Receipt, error)
	// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
	// and wait for the transaction to be included in a block
	CallTxSim(context.Context, *payload.CallTx) (*exec.TxExecution, error)
	// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
	CallCodeSim(context.Context, *CallCodeParam) (*exec.TxExecution, error)
	// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
	SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error)
	// Formulate and  SendTx transaction signed server-side
	SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error)
	// Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name
	NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error)
	// Formulate a NameTx signed server-side
	NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error)
}

TransactServer is the server API for Transact service.

func NewTransactServer

func NewTransactServer(state acmstate.Reader, blockchain bcm.BlockchainInfo, transactor *execution.Transactor,
	txCodec txs.Codec, logger *logging.Logger) TransactServer

type TxEnvelope

type TxEnvelope struct {
	Envelope             *github_com_hyperledger_burrow_txs.Envelope `protobuf:"bytes,1,opt,name=Envelope,proto3,customtype=github.com/hyperledger/burrow/txs.Envelope" json:"Envelope,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
	XXX_unrecognized     []byte                                      `json:"-"`
	XXX_sizecache        int32                                       `json:"-"`
}

func (*TxEnvelope) Descriptor

func (*TxEnvelope) Descriptor() ([]byte, []int)

func (*TxEnvelope) Marshal

func (m *TxEnvelope) Marshal() (dAtA []byte, err error)

func (*TxEnvelope) MarshalTo

func (m *TxEnvelope) MarshalTo(dAtA []byte) (int, error)

func (*TxEnvelope) MarshalToSizedBuffer added in v0.30.0

func (m *TxEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxEnvelope) ProtoMessage

func (*TxEnvelope) ProtoMessage()

func (*TxEnvelope) Reset

func (m *TxEnvelope) Reset()

func (*TxEnvelope) Size

func (m *TxEnvelope) Size() (n int)

func (*TxEnvelope) String

func (m *TxEnvelope) String() string

func (*TxEnvelope) Unmarshal

func (m *TxEnvelope) Unmarshal(dAtA []byte) error

func (*TxEnvelope) XXX_DiscardUnknown added in v0.23.0

func (m *TxEnvelope) XXX_DiscardUnknown()

func (*TxEnvelope) XXX_Marshal added in v0.23.0

func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxEnvelope) XXX_Merge added in v0.23.0

func (m *TxEnvelope) XXX_Merge(src proto.Message)

func (*TxEnvelope) XXX_MessageName

func (*TxEnvelope) XXX_MessageName() string

func (*TxEnvelope) XXX_Size added in v0.23.0

func (m *TxEnvelope) XXX_Size() int

func (*TxEnvelope) XXX_Unmarshal added in v0.23.0

func (m *TxEnvelope) XXX_Unmarshal(b []byte) error

type TxEnvelopeParam

type TxEnvelopeParam struct {
	// An existing Envelope - either signed or unsigned - if the latter will be signed server-side
	Envelope *github_com_hyperledger_burrow_txs.Envelope `protobuf:"bytes,1,opt,name=Envelope,proto3,customtype=github.com/hyperledger/burrow/txs.Envelope" json:"Envelope,omitempty"`
	// If no Envelope provided then one will be generated from the provided payload and signed server-side
	Payload *payload.Any `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"`
	// The amount of time to wait for the transaction to be committed and the TxExecution to be returned (server-side).
	// If zero there wait is unbounded. Timed out transactions return SyncInfo state that may be helpful debugging
	// non-committed transactions - this timeout must be less than client timeout to see such information!
	Timeout              time.Duration `protobuf:"bytes,3,opt,name=Timeout,proto3,stdduration" json:"Timeout"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*TxEnvelopeParam) Descriptor

func (*TxEnvelopeParam) Descriptor() ([]byte, []int)

func (*TxEnvelopeParam) GetEnvelope

func (te *TxEnvelopeParam) GetEnvelope(chainID string) *txs.Envelope

func (*TxEnvelopeParam) GetPayload

func (m *TxEnvelopeParam) GetPayload() *payload.Any

func (*TxEnvelopeParam) GetTimeout added in v0.24.5

func (m *TxEnvelopeParam) GetTimeout() time.Duration

func (*TxEnvelopeParam) Marshal

func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error)

func (*TxEnvelopeParam) MarshalTo

func (m *TxEnvelopeParam) MarshalTo(dAtA []byte) (int, error)

func (*TxEnvelopeParam) MarshalToSizedBuffer added in v0.30.0

func (m *TxEnvelopeParam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxEnvelopeParam) ProtoMessage

func (*TxEnvelopeParam) ProtoMessage()

func (*TxEnvelopeParam) Reset

func (m *TxEnvelopeParam) Reset()

func (*TxEnvelopeParam) Size

func (m *TxEnvelopeParam) Size() (n int)

func (*TxEnvelopeParam) String

func (m *TxEnvelopeParam) String() string

func (*TxEnvelopeParam) Unmarshal

func (m *TxEnvelopeParam) Unmarshal(dAtA []byte) error

func (*TxEnvelopeParam) XXX_DiscardUnknown added in v0.23.0

func (m *TxEnvelopeParam) XXX_DiscardUnknown()

func (*TxEnvelopeParam) XXX_Marshal added in v0.23.0

func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxEnvelopeParam) XXX_Merge added in v0.23.0

func (m *TxEnvelopeParam) XXX_Merge(src proto.Message)

func (*TxEnvelopeParam) XXX_MessageName

func (*TxEnvelopeParam) XXX_MessageName() string

func (*TxEnvelopeParam) XXX_Size added in v0.23.0

func (m *TxEnvelopeParam) XXX_Size() int

func (*TxEnvelopeParam) XXX_Unmarshal added in v0.23.0

func (m *TxEnvelopeParam) XXX_Unmarshal(b []byte) error

type UnimplementedTransactServer added in v0.28.0

type UnimplementedTransactServer struct {
}

UnimplementedTransactServer can be embedded to have forward compatible implementations.

func (*UnimplementedTransactServer) BroadcastTxAsync added in v0.28.0

func (*UnimplementedTransactServer) BroadcastTxAsync(ctx context.Context, req *TxEnvelopeParam) (*txs.Receipt, error)

func (*UnimplementedTransactServer) BroadcastTxSync added in v0.28.0

func (*UnimplementedTransactServer) CallCodeSim added in v0.28.0

func (*UnimplementedTransactServer) CallTxAsync added in v0.28.0

func (*UnimplementedTransactServer) CallTxSim added in v0.28.0

func (*UnimplementedTransactServer) CallTxSync added in v0.28.0

func (*UnimplementedTransactServer) FormulateTx added in v0.28.0

func (*UnimplementedTransactServer) NameTxAsync added in v0.28.0

func (*UnimplementedTransactServer) NameTxSync added in v0.28.0

func (*UnimplementedTransactServer) SendTxAsync added in v0.28.0

func (*UnimplementedTransactServer) SendTxSync added in v0.28.0

func (*UnimplementedTransactServer) SignTx added in v0.28.0

Jump to

Keyboard shortcuts

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