v1

package
v0.0.0-...-a308a5f Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Wallet_GetBalance_FullMethodName      = "/wallet.v1.Wallet/GetBalance"
	Wallet_SendTransaction_FullMethodName = "/wallet.v1.Wallet/SendTransaction"
	Wallet_SuggestGasPrice_FullMethodName = "/wallet.v1.Wallet/SuggestGasPrice"
	Wallet_TxCost_FullMethodName          = "/wallet.v1.Wallet/TxCost"
	Wallet_DepositWallet_FullMethodName   = "/wallet.v1.Wallet/DepositWallet"
	Wallet_WithdrawWallet_FullMethodName  = "/wallet.v1.Wallet/WithdrawWallet"
)
View Source
const OperationWalletDepositWallet = "/wallet.v1.Wallet/DepositWallet"
View Source
const OperationWalletGetBalance = "/wallet.v1.Wallet/GetBalance"
View Source
const OperationWalletSendTransaction = "/wallet.v1.Wallet/SendTransaction"
View Source
const OperationWalletSuggestGasPrice = "/wallet.v1.Wallet/SuggestGasPrice"
View Source
const OperationWalletTxCost = "/wallet.v1.Wallet/TxCost"
View Source
const OperationWalletWithdrawWallet = "/wallet.v1.Wallet/WithdrawWallet"

Variables

View Source
var File_wallet_v1_wallet_proto protoreflect.FileDescriptor
View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wallet.v1.Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBalance",
			Handler:    _Wallet_GetBalance_Handler,
		},
		{
			MethodName: "SendTransaction",
			Handler:    _Wallet_SendTransaction_Handler,
		},
		{
			MethodName: "SuggestGasPrice",
			Handler:    _Wallet_SuggestGasPrice_Handler,
		},
		{
			MethodName: "TxCost",
			Handler:    _Wallet_TxCost_Handler,
		},
		{
			MethodName: "DepositWallet",
			Handler:    _Wallet_DepositWallet_Handler,
		},
		{
			MethodName: "WithdrawWallet",
			Handler:    _Wallet_WithdrawWallet_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wallet/v1/wallet.proto",
}

Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWalletHTTPServer

func RegisterWalletHTTPServer(s *http.Server, srv WalletHTTPServer)

func RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

Types

type BalanceReply

type BalanceReply struct {
	Account        string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Balance        string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"`
	PendingBalance string `protobuf:"bytes,3,opt,name=pending_balance,json=pendingBalance,proto3" json:"pending_balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceReply) Descriptor deprecated

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

Deprecated: Use BalanceReply.ProtoReflect.Descriptor instead.

func (*BalanceReply) GetAccount

func (x *BalanceReply) GetAccount() string

func (*BalanceReply) GetBalance

func (x *BalanceReply) GetBalance() string

func (*BalanceReply) GetPendingBalance

func (x *BalanceReply) GetPendingBalance() string

func (*BalanceReply) ProtoMessage

func (*BalanceReply) ProtoMessage()

func (*BalanceReply) ProtoReflect

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

func (*BalanceReply) Reset

func (x *BalanceReply) Reset()

func (*BalanceReply) String

func (x *BalanceReply) String() string

type BalanceRequest

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

func (*BalanceRequest) Descriptor deprecated

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

Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.

func (*BalanceRequest) GetAccount

func (x *BalanceRequest) GetAccount() string

func (*BalanceRequest) ProtoMessage

func (*BalanceRequest) ProtoMessage()

func (*BalanceRequest) ProtoReflect

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

func (*BalanceRequest) Reset

func (x *BalanceRequest) Reset()

func (*BalanceRequest) String

func (x *BalanceRequest) String() string

type Deposit

type Deposit struct {
	SenderAccount string `protobuf:"bytes,1,opt,name=sender_account,json=senderAccount,proto3" json:"sender_account,omitempty"`
	Password      string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	WalletAddress string `protobuf:"bytes,3,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"`
	// contains filtered or unexported fields
}

func (*Deposit) Descriptor deprecated

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

Deprecated: Use Deposit.ProtoReflect.Descriptor instead.

func (*Deposit) GetPassword

func (x *Deposit) GetPassword() string

func (*Deposit) GetSenderAccount

func (x *Deposit) GetSenderAccount() string

func (*Deposit) GetWalletAddress

func (x *Deposit) GetWalletAddress() string

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) ProtoReflect

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

func (*Deposit) Reset

func (x *Deposit) Reset()

func (*Deposit) String

func (x *Deposit) String() string

type DepositResult

type DepositResult struct {
	Success         bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message         string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	TransactionHash string `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*DepositResult) Descriptor deprecated

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

Deprecated: Use DepositResult.ProtoReflect.Descriptor instead.

func (*DepositResult) GetMessage

func (x *DepositResult) GetMessage() string

func (*DepositResult) GetSuccess

func (x *DepositResult) GetSuccess() bool

func (*DepositResult) GetTransactionHash

func (x *DepositResult) GetTransactionHash() string

func (*DepositResult) ProtoMessage

func (*DepositResult) ProtoMessage()

func (*DepositResult) ProtoReflect

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

func (*DepositResult) Reset

func (x *DepositResult) Reset()

func (*DepositResult) String

func (x *DepositResult) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GasPrice

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

func (*GasPrice) Descriptor deprecated

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

Deprecated: Use GasPrice.ProtoReflect.Descriptor instead.

func (*GasPrice) GetGas

func (x *GasPrice) GetGas() string

func (*GasPrice) ProtoMessage

func (*GasPrice) ProtoMessage()

func (*GasPrice) ProtoReflect

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

func (*GasPrice) Reset

func (x *GasPrice) Reset()

func (*GasPrice) String

func (x *GasPrice) String() string

type TxCostReply

type TxCostReply struct {
	IsPending bool   `protobuf:"varint,1,opt,name=isPending,proto3" json:"isPending,omitempty"`
	TxCost    string `protobuf:"bytes,2,opt,name=tx_cost,json=txCost,proto3" json:"tx_cost,omitempty"`
	// contains filtered or unexported fields
}

func (*TxCostReply) Descriptor deprecated

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

Deprecated: Use TxCostReply.ProtoReflect.Descriptor instead.

func (*TxCostReply) GetIsPending

func (x *TxCostReply) GetIsPending() bool

func (*TxCostReply) GetTxCost

func (x *TxCostReply) GetTxCost() string

func (*TxCostReply) ProtoMessage

func (*TxCostReply) ProtoMessage()

func (*TxCostReply) ProtoReflect

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

func (*TxCostReply) Reset

func (x *TxCostReply) Reset()

func (*TxCostReply) String

func (x *TxCostReply) String() string

type TxCostRequest

type TxCostRequest struct {
	TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*TxCostRequest) Descriptor deprecated

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

Deprecated: Use TxCostRequest.ProtoReflect.Descriptor instead.

func (*TxCostRequest) GetTxHash

func (x *TxCostRequest) GetTxHash() string

func (*TxCostRequest) ProtoMessage

func (*TxCostRequest) ProtoMessage()

func (*TxCostRequest) ProtoReflect

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

func (*TxCostRequest) Reset

func (x *TxCostRequest) Reset()

func (*TxCostRequest) String

func (x *TxCostRequest) String() string

type TxReply

type TxReply struct {
	Success         bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message         string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	TransactionHash string `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*TxReply) Descriptor deprecated

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

Deprecated: Use TxReply.ProtoReflect.Descriptor instead.

func (*TxReply) GetMessage

func (x *TxReply) GetMessage() string

func (*TxReply) GetSuccess

func (x *TxReply) GetSuccess() bool

func (*TxReply) GetTransactionHash

func (x *TxReply) GetTransactionHash() string

func (*TxReply) ProtoMessage

func (*TxReply) ProtoMessage()

func (*TxReply) ProtoReflect

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

func (*TxReply) Reset

func (x *TxReply) Reset()

func (*TxReply) String

func (x *TxReply) String() string

type TxRequest

type TxRequest struct {
	SenderAccount    string `protobuf:"bytes,1,opt,name=sender_account,json=senderAccount,proto3" json:"sender_account,omitempty"`
	Password         string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	RecipientAccount string `protobuf:"bytes,3,opt,name=recipient_account,json=recipientAccount,proto3" json:"recipient_account,omitempty"`
	Amount           string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // big.Int is not directly supported
	// contains filtered or unexported fields
}

func (*TxRequest) Descriptor deprecated

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

Deprecated: Use TxRequest.ProtoReflect.Descriptor instead.

func (*TxRequest) GetAmount

func (x *TxRequest) GetAmount() string

func (*TxRequest) GetPassword

func (x *TxRequest) GetPassword() string

func (*TxRequest) GetRecipientAccount

func (x *TxRequest) GetRecipientAccount() string

func (*TxRequest) GetSenderAccount

func (x *TxRequest) GetSenderAccount() string

func (*TxRequest) ProtoMessage

func (*TxRequest) ProtoMessage()

func (*TxRequest) ProtoReflect

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

func (*TxRequest) Reset

func (x *TxRequest) Reset()

func (*TxRequest) String

func (x *TxRequest) String() string

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) DepositWallet

func (UnimplementedWalletServer) GetBalance

func (UnimplementedWalletServer) SendTransaction

func (UnimplementedWalletServer) SuggestGasPrice

func (UnimplementedWalletServer) TxCost

func (UnimplementedWalletServer) WithdrawWallet

type UnsafeWalletServer

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

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

type WalletClient

type WalletClient interface {
	GetBalance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceReply, error)
	SendTransaction(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*TxReply, error)
	SuggestGasPrice(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GasPrice, error)
	TxCost(ctx context.Context, in *TxCostRequest, opts ...grpc.CallOption) (*TxCostReply, error)
	DepositWallet(ctx context.Context, in *Deposit, opts ...grpc.CallOption) (*DepositResult, error)
	WithdrawWallet(ctx context.Context, in *Withdrawal, opts ...grpc.CallOption) (*WithdrawalResult, error)
}

WalletClient is the client API for Wallet 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.

func NewWalletClient

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletHTTPClient

type WalletHTTPClient interface {
	DepositWallet(ctx context.Context, req *Deposit, opts ...http.CallOption) (rsp *DepositResult, err error)
	GetBalance(ctx context.Context, req *BalanceRequest, opts ...http.CallOption) (rsp *BalanceReply, err error)
	SendTransaction(ctx context.Context, req *TxRequest, opts ...http.CallOption) (rsp *TxReply, err error)
	SuggestGasPrice(ctx context.Context, req *Empty, opts ...http.CallOption) (rsp *GasPrice, err error)
	TxCost(ctx context.Context, req *TxCostRequest, opts ...http.CallOption) (rsp *TxCostReply, err error)
	WithdrawWallet(ctx context.Context, req *Withdrawal, opts ...http.CallOption) (rsp *WithdrawalResult, err error)
}

func NewWalletHTTPClient

func NewWalletHTTPClient(client *http.Client) WalletHTTPClient

type WalletHTTPClientImpl

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

func (*WalletHTTPClientImpl) DepositWallet

func (c *WalletHTTPClientImpl) DepositWallet(ctx context.Context, in *Deposit, opts ...http.CallOption) (*DepositResult, error)

func (*WalletHTTPClientImpl) GetBalance

func (c *WalletHTTPClientImpl) GetBalance(ctx context.Context, in *BalanceRequest, opts ...http.CallOption) (*BalanceReply, error)

func (*WalletHTTPClientImpl) SendTransaction

func (c *WalletHTTPClientImpl) SendTransaction(ctx context.Context, in *TxRequest, opts ...http.CallOption) (*TxReply, error)

func (*WalletHTTPClientImpl) SuggestGasPrice

func (c *WalletHTTPClientImpl) SuggestGasPrice(ctx context.Context, in *Empty, opts ...http.CallOption) (*GasPrice, error)

func (*WalletHTTPClientImpl) TxCost

func (*WalletHTTPClientImpl) WithdrawWallet

func (c *WalletHTTPClientImpl) WithdrawWallet(ctx context.Context, in *Withdrawal, opts ...http.CallOption) (*WithdrawalResult, error)

type WalletHTTPServer

type WalletHTTPServer interface {
	DepositWallet(context.Context, *Deposit) (*DepositResult, error)
	GetBalance(context.Context, *BalanceRequest) (*BalanceReply, error)
	SendTransaction(context.Context, *TxRequest) (*TxReply, error)
	SuggestGasPrice(context.Context, *Empty) (*GasPrice, error)
	TxCost(context.Context, *TxCostRequest) (*TxCostReply, error)
	WithdrawWallet(context.Context, *Withdrawal) (*WithdrawalResult, error)
}

type WalletServer

type WalletServer interface {
	GetBalance(context.Context, *BalanceRequest) (*BalanceReply, error)
	SendTransaction(context.Context, *TxRequest) (*TxReply, error)
	SuggestGasPrice(context.Context, *Empty) (*GasPrice, error)
	TxCost(context.Context, *TxCostRequest) (*TxCostReply, error)
	DepositWallet(context.Context, *Deposit) (*DepositResult, error)
	WithdrawWallet(context.Context, *Withdrawal) (*WithdrawalResult, error)
	// contains filtered or unexported methods
}

WalletServer is the server API for Wallet service. All implementations must embed UnimplementedWalletServer for forward compatibility

type Withdrawal

type Withdrawal struct {
	WalletAddress    string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"`
	Password         string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	RecipientAccount string `protobuf:"bytes,3,opt,name=recipient_account,json=recipientAccount,proto3" json:"recipient_account,omitempty"`
	// contains filtered or unexported fields
}

func (*Withdrawal) Descriptor deprecated

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

Deprecated: Use Withdrawal.ProtoReflect.Descriptor instead.

func (*Withdrawal) GetPassword

func (x *Withdrawal) GetPassword() string

func (*Withdrawal) GetRecipientAccount

func (x *Withdrawal) GetRecipientAccount() string

func (*Withdrawal) GetWalletAddress

func (x *Withdrawal) GetWalletAddress() string

func (*Withdrawal) ProtoMessage

func (*Withdrawal) ProtoMessage()

func (*Withdrawal) ProtoReflect

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

func (*Withdrawal) Reset

func (x *Withdrawal) Reset()

func (*Withdrawal) String

func (x *Withdrawal) String() string

type WithdrawalResult

type WithdrawalResult struct {
	Success         bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message         string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	TransactionHash string `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*WithdrawalResult) Descriptor deprecated

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

Deprecated: Use WithdrawalResult.ProtoReflect.Descriptor instead.

func (*WithdrawalResult) GetMessage

func (x *WithdrawalResult) GetMessage() string

func (*WithdrawalResult) GetSuccess

func (x *WithdrawalResult) GetSuccess() bool

func (*WithdrawalResult) GetTransactionHash

func (x *WithdrawalResult) GetTransactionHash() string

func (*WithdrawalResult) ProtoMessage

func (*WithdrawalResult) ProtoMessage()

func (*WithdrawalResult) ProtoReflect

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

func (*WithdrawalResult) Reset

func (x *WithdrawalResult) Reset()

func (*WithdrawalResult) String

func (x *WithdrawalResult) String() string

Jump to

Keyboard shortcuts

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