tx_committer

package
v0.0.0-...-4334f35 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tx_committer_proto protoreflect.FileDescriptor

Functions

func MarshalMsgs

func MarshalMsgs(msgs []sdk.Msg) [][]byte

func ParseMnemonic

func ParseMnemonic(mnemonic string) (sdk.AccAddress, *secp256k1.PrivKey)

func RegisterTxCommitterServer

func RegisterTxCommitterServer(s *grpc.Server, srv TxCommitterServer)

func SendCosmosTx

func SendCosmosTx(cosmosRpcAddr string, msgs []sdk.Msg, address sdk.AccAddress, priv crypto.PrivKey, cosmosConn *grpc.ClientConn, logger log.Logger, retry bool)

func UnmarshalMsgs

func UnmarshalMsgs(data [][]byte) ([]sdk.Msg, error)

Types

type AddressReply

type AddressReply struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*AddressReply) Descriptor deprecated

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

Deprecated: Use AddressReply.ProtoReflect.Descriptor instead.

func (*AddressReply) GetAddress

func (x *AddressReply) GetAddress() string

func (*AddressReply) ProtoMessage

func (*AddressReply) ProtoMessage()

func (*AddressReply) ProtoReflect

func (x *AddressReply) ProtoReflect() protoreflect.Message

func (*AddressReply) Reset

func (x *AddressReply) Reset()

func (*AddressReply) String

func (x *AddressReply) String() string

type AddressRequest

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

func (*AddressRequest) Descriptor deprecated

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

Deprecated: Use AddressRequest.ProtoReflect.Descriptor instead.

func (*AddressRequest) ProtoMessage

func (*AddressRequest) ProtoMessage()

func (*AddressRequest) ProtoReflect

func (x *AddressRequest) ProtoReflect() protoreflect.Message

func (*AddressRequest) Reset

func (x *AddressRequest) Reset()

func (*AddressRequest) String

func (x *AddressRequest) String() string

type CommitTxReply

type CommitTxReply struct {
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*CommitTxReply) Descriptor deprecated

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

Deprecated: Use CommitTxReply.ProtoReflect.Descriptor instead.

func (*CommitTxReply) GetCode

func (x *CommitTxReply) GetCode() int32

func (*CommitTxReply) ProtoMessage

func (*CommitTxReply) ProtoMessage()

func (*CommitTxReply) ProtoReflect

func (x *CommitTxReply) ProtoReflect() protoreflect.Message

func (*CommitTxReply) Reset

func (x *CommitTxReply) Reset()

func (*CommitTxReply) String

func (x *CommitTxReply) String() string

type CommitTxRequest

type CommitTxRequest struct {
	Msgs [][]byte `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs,omitempty"`
	// contains filtered or unexported fields
}

func (*CommitTxRequest) Descriptor deprecated

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

Deprecated: Use CommitTxRequest.ProtoReflect.Descriptor instead.

func (*CommitTxRequest) GetMsgs

func (x *CommitTxRequest) GetMsgs() [][]byte

func (*CommitTxRequest) ProtoMessage

func (*CommitTxRequest) ProtoMessage()

func (*CommitTxRequest) ProtoReflect

func (x *CommitTxRequest) ProtoReflect() protoreflect.Message

func (*CommitTxRequest) Reset

func (x *CommitTxRequest) Reset()

func (*CommitTxRequest) String

func (x *CommitTxRequest) String() string

type Server

type Server struct {
	UnimplementedTxCommitterServer
	// contains filtered or unexported fields
}

func RunServer

func RunServer(cosmosRpcAddr string, cosmosConn *grpc.ClientConn, cosmosMnemonic string, logger log.Logger) *Server

func (*Server) Address

func (s *Server) Address(_ context.Context, req *AddressRequest) (*AddressReply, error)

func (*Server) CommitTx

func (s *Server) CommitTx(_ context.Context, req *CommitTxRequest) (*CommitTxReply, error)

type TxCommitterClient

type TxCommitterClient interface {
	CommitTx(ctx context.Context, in *CommitTxRequest, opts ...grpc.CallOption) (*CommitTxReply, error)
	Address(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressReply, error)
}

TxCommitterClient is the client API for TxCommitter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TxCommitterServer

type TxCommitterServer interface {
	CommitTx(context.Context, *CommitTxRequest) (*CommitTxReply, error)
	Address(context.Context, *AddressRequest) (*AddressReply, error)
	// contains filtered or unexported methods
}

TxCommitterServer is the server API for TxCommitter service. All implementations must embed UnimplementedTxCommitterServer for forward compatibility

type UnimplementedTxCommitterServer

type UnimplementedTxCommitterServer struct {
}

UnimplementedTxCommitterServer must be embedded to have forward compatible implementations.

func (UnimplementedTxCommitterServer) Address

func (UnimplementedTxCommitterServer) CommitTx

type UnsafeTxCommitterServer

type UnsafeTxCommitterServer interface {
	// contains filtered or unexported methods
}

UnsafeTxCommitterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TxCommitterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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