ethereum

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_ethereum_proto protoreflect.FileDescriptor

Functions

func NewEthereumEndpoints

func NewEthereumEndpoints() []*api.Endpoint

func RegisterEthereumHandler

func RegisterEthereumHandler(s server.Server, hdlr EthereumHandler, opts ...server.HandlerOption) error

Types

type BalanceRequest

type BalanceRequest struct {

	// address of wallet
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Get the balance of an ethereum wallet

func (*BalanceRequest) Descriptor deprecated

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

Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.

func (*BalanceRequest) GetAddress

func (x *BalanceRequest) GetAddress() 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 BalanceResponse

type BalanceResponse struct {

	// the account balance (in wei)
	Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetBalance

func (x *BalanceResponse) GetBalance() int64

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect

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

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type BroadcastRequest

type BroadcastRequest struct {

	// raw transaction data to broadcast
	Hex string `protobuf:"bytes,1,opt,name=hex,proto3" json:"hex,omitempty"`
	// contains filtered or unexported fields
}

Broadcast presigned transaction to ethereum network

func (*BroadcastRequest) Descriptor deprecated

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

Deprecated: Use BroadcastRequest.ProtoReflect.Descriptor instead.

func (*BroadcastRequest) GetHex

func (x *BroadcastRequest) GetHex() string

func (*BroadcastRequest) ProtoMessage

func (*BroadcastRequest) ProtoMessage()

func (*BroadcastRequest) ProtoReflect

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

func (*BroadcastRequest) Reset

func (x *BroadcastRequest) Reset()

func (*BroadcastRequest) String

func (x *BroadcastRequest) String() string

type BroadcastResponse

type BroadcastResponse struct {

	// the transaction hash
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastResponse) Descriptor deprecated

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

Deprecated: Use BroadcastResponse.ProtoReflect.Descriptor instead.

func (*BroadcastResponse) GetHash

func (x *BroadcastResponse) GetHash() string

func (*BroadcastResponse) ProtoMessage

func (*BroadcastResponse) ProtoMessage()

func (*BroadcastResponse) ProtoReflect

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

func (*BroadcastResponse) Reset

func (x *BroadcastResponse) Reset()

func (*BroadcastResponse) String

func (x *BroadcastResponse) String() string

type EthereumService

type EthereumService interface {
	Balance(ctx context.Context, in *BalanceRequest, opts ...client.CallOption) (*BalanceResponse, error)
	Broadcast(ctx context.Context, in *BroadcastRequest, opts ...client.CallOption) (*BroadcastResponse, error)
	Transaction(ctx context.Context, in *TransactionRequest, opts ...client.CallOption) (*TransactionResponse, error)
}

func NewEthereumService

func NewEthereumService(name string, c client.Client) EthereumService

type TransactionRequest

type TransactionRequest struct {

	// tx hash
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

Get transaction details by hash

func (*TransactionRequest) Descriptor deprecated

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

Deprecated: Use TransactionRequest.ProtoReflect.Descriptor instead.

func (*TransactionRequest) GetHash

func (x *TransactionRequest) GetHash() string

func (*TransactionRequest) ProtoMessage

func (*TransactionRequest) ProtoMessage()

func (*TransactionRequest) ProtoReflect

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

func (*TransactionRequest) Reset

func (x *TransactionRequest) Reset()

func (*TransactionRequest) String

func (x *TransactionRequest) String() string

type TransactionResponse

type TransactionResponse struct {

	// tx hash
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// the block hash
	BlockHash string `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	// the block number
	BlockNumber string `protobuf:"bytes,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// sent from
	FromAddress string `protobuf:"bytes,4,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
	// gas
	Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"`
	// gas price
	GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"`
	// max fee per gas
	MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"`
	// max priority fee per gas
	MaxPriorityFeePerGas string `` /* 127-byte string literal not displayed */
	// input
	Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"`
	// the nonce
	Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// to address
	ToAddress string `protobuf:"bytes,11,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	// transaction index
	TxIndex string `protobuf:"bytes,12,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
	// value of transaction
	Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"`
	// type of transaction
	Type string `protobuf:"bytes,14,opt,name=type,proto3" json:"type,omitempty"`
	// chain id
	ChainId string `protobuf:"bytes,15,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	V       string `protobuf:"bytes,16,opt,name=v,proto3" json:"v,omitempty"`
	R       string `protobuf:"bytes,17,opt,name=r,proto3" json:"r,omitempty"`
	S       string `protobuf:"bytes,18,opt,name=s,proto3" json:"s,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionResponse) Descriptor deprecated

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

Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.

func (*TransactionResponse) GetBlockHash

func (x *TransactionResponse) GetBlockHash() string

func (*TransactionResponse) GetBlockNumber

func (x *TransactionResponse) GetBlockNumber() string

func (*TransactionResponse) GetChainId

func (x *TransactionResponse) GetChainId() string

func (*TransactionResponse) GetFromAddress

func (x *TransactionResponse) GetFromAddress() string

func (*TransactionResponse) GetGas

func (x *TransactionResponse) GetGas() string

func (*TransactionResponse) GetGasPrice

func (x *TransactionResponse) GetGasPrice() string

func (*TransactionResponse) GetHash

func (x *TransactionResponse) GetHash() string

func (*TransactionResponse) GetInput

func (x *TransactionResponse) GetInput() string

func (*TransactionResponse) GetMaxFeePerGas

func (x *TransactionResponse) GetMaxFeePerGas() string

func (*TransactionResponse) GetMaxPriorityFeePerGas

func (x *TransactionResponse) GetMaxPriorityFeePerGas() string

func (*TransactionResponse) GetNonce

func (x *TransactionResponse) GetNonce() string

func (*TransactionResponse) GetR

func (x *TransactionResponse) GetR() string

func (*TransactionResponse) GetS

func (x *TransactionResponse) GetS() string

func (*TransactionResponse) GetToAddress

func (x *TransactionResponse) GetToAddress() string

func (*TransactionResponse) GetTxIndex

func (x *TransactionResponse) GetTxIndex() string

func (*TransactionResponse) GetType

func (x *TransactionResponse) GetType() string

func (*TransactionResponse) GetV

func (x *TransactionResponse) GetV() string

func (*TransactionResponse) GetValue

func (x *TransactionResponse) GetValue() string

func (*TransactionResponse) ProtoMessage

func (*TransactionResponse) ProtoMessage()

func (*TransactionResponse) ProtoReflect

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

func (*TransactionResponse) Reset

func (x *TransactionResponse) Reset()

func (*TransactionResponse) String

func (x *TransactionResponse) String() string

Jump to

Keyboard shortcuts

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