relayer

package
v0.0.0-...-c1b05a4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRelayerRpcServer

func RegisterRelayerRpcServer(s *grpc.Server, srv RelayerRpcServer)

Types

type Bridge

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

func NewBridge

func NewBridge(
	mainchainClient *ethclient.Client,
	sidechainClient *ethclient.Client,
	sidechainAuth *bind.TransactOpts,
	sidechainAuthPrivateKey *ecdsa.PrivateKey,
) (*Bridge, error)

func (*Bridge) Start

func (b *Bridge) Start()

type RelayerRpcClient

type RelayerRpcClient interface {
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error)
}

RelayerRpcClient is the client API for RelayerRpc service.

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

func NewRelayerRpcClient

func NewRelayerRpcClient(cc grpc.ClientConnInterface) RelayerRpcClient

type RelayerRpcServer

type RelayerRpcServer interface {
	Withdraw(context.Context, *WithdrawRequest) (*WithdrawResponse, error)
}

RelayerRpcServer is the server API for RelayerRpc service.

type UnimplementedRelayerRpcServer

type UnimplementedRelayerRpcServer struct {
}

UnimplementedRelayerRpcServer can be embedded to have forward compatible implementations.

func (*UnimplementedRelayerRpcServer) Withdraw

type WithdrawManager

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

func NewWithdrawManager

func NewWithdrawManager(
	grpcPort int,
	mainchainClient *ethclient.Client,
	mainchainAuth *bind.TransactOpts,
	depositWithdrawManager *mainchain.DepositWithdrawManager,
	serializer *types.Serializer,
	stateMachine *statemachine.StateMachine,
	aggregatorDb rollupdb.DB,
) *WithdrawManager

func (*WithdrawManager) Start

func (m *WithdrawManager) Start()

func (*WithdrawManager) Withdraw

func (m *WithdrawManager) Withdraw(
	ctx context.Context, request *WithdrawRequest) (*WithdrawResponse, error)

type WithdrawRequest

type WithdrawRequest struct {
	Account              string   `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	RollupBlockNumber    int64    `protobuf:"varint,2,opt,name=rollupBlockNumber,proto3" json:"rollupBlockNumber,omitempty"`
	TransitionIndex      int64    `protobuf:"varint,3,opt,name=transitionIndex,proto3" json:"transitionIndex,omitempty"`
	Signature            []byte   `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WithdrawRequest) Descriptor

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

func (*WithdrawRequest) GetAccount

func (m *WithdrawRequest) GetAccount() string

func (*WithdrawRequest) GetRollupBlockNumber

func (m *WithdrawRequest) GetRollupBlockNumber() int64

func (*WithdrawRequest) GetSignature

func (m *WithdrawRequest) GetSignature() []byte

func (*WithdrawRequest) GetTransitionIndex

func (m *WithdrawRequest) GetTransitionIndex() int64

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) Reset

func (m *WithdrawRequest) Reset()

func (*WithdrawRequest) String

func (m *WithdrawRequest) String() string

func (*WithdrawRequest) XXX_DiscardUnknown

func (m *WithdrawRequest) XXX_DiscardUnknown()

func (*WithdrawRequest) XXX_Marshal

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

func (*WithdrawRequest) XXX_Merge

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

func (*WithdrawRequest) XXX_Size

func (m *WithdrawRequest) XXX_Size() int

func (*WithdrawRequest) XXX_Unmarshal

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

type WithdrawResponse

type WithdrawResponse struct {
	TransactionHash      string   `protobuf:"bytes,1,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WithdrawResponse) Descriptor

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

func (*WithdrawResponse) GetTransactionHash

func (m *WithdrawResponse) GetTransactionHash() string

func (*WithdrawResponse) ProtoMessage

func (*WithdrawResponse) ProtoMessage()

func (*WithdrawResponse) Reset

func (m *WithdrawResponse) Reset()

func (*WithdrawResponse) String

func (m *WithdrawResponse) String() string

func (*WithdrawResponse) XXX_DiscardUnknown

func (m *WithdrawResponse) XXX_DiscardUnknown()

func (*WithdrawResponse) XXX_Marshal

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

func (*WithdrawResponse) XXX_Merge

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

func (*WithdrawResponse) XXX_Size

func (m *WithdrawResponse) XXX_Size() int

func (*WithdrawResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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