ethereum

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name() string

Types

type BalanceReply

type BalanceReply struct {
	Address chain.Address `json:"address"`
	Amount  *big.Int      `json:"amount"`
}

type BalanceRequest

type BalanceRequest struct {
	Address chain.Address `json:"address"`
}

type ETHLockRawTX

type ETHLockRawTX struct {
	UnsignedRawTx []byte `json:"unsignedRawTx"`
}

type ETHLockRequest

type ETHLockRequest struct {
	UserAddress common.Address `json:"userETHAddress"`
	Amount      *big.Int       `json:"amount"`
}

type OLTERC20LockRequest added in v0.14.0

type OLTERC20LockRequest struct {
	RawTx   []byte `json:"rawTx"`
	Address keys.Address
	Fee     action.Amount `json:"fee"`
	Gas     int64         `json:"gas"`
}

type OLTERC20RedeemRequest added in v0.14.0

type OLTERC20RedeemRequest struct {
	UserOLTaddress action.Address `json:"userOLTAddress"`
	UserETHaddress common.Address `json:"userETHAddress"`
	ETHTxn         []byte         `json:"ethTxn"`
	Fee            action.Amount  `json:"fee"`
	Gas            int64          `json:"gas"`
}

type OLTLockRequest

type OLTLockRequest struct {
	// RawTransaction of a Lock call from the user to the smart contract
	// This should be signed and RLP encoded with the ethereum address of the user
	//OLTAddress common.Address  `json:"oltAddress"`
	RawTx   []byte `json:"rawTx"`
	Address keys.Address
	Fee     action.Amount `json:"fee"`
	Gas     int64         `json:"gas"`
}

type OLTReply added in v0.14.0

type OLTReply struct {
	RawTX []byte `json:"rawTx"`
}

type RedeemRequest

type RedeemRequest struct {
	UserOLTaddress action.Address `json:"userOLTAddress"`
	UserETHaddress common.Address `json:"userETHAddress"`
	ETHTxn         []byte         `json:"ethTxn"`
	Fee            action.Amount  `json:"fee"`
	Gas            int64          `json:"gas"`
}

type Service

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

func NewService

func NewService(

	config *config.EthereumChainDriverConfig,
	router action.Router,
	accounts accounts.Wallet,
	nodeCtx node.Context,
	validators *identity.ValidatorStore,
	trackerStore *ethTracker.TrackerStore,

	logger *log.Logger,
) *Service

Returns a new Service, should be passed as an RPC handler

func (*Service) CreateRawExtERC20Redeem added in v0.14.0

func (svc *Service) CreateRawExtERC20Redeem(req RedeemRequest, out *OLTReply) error

func (*Service) CreateRawExtLock

func (svc *Service) CreateRawExtLock(req OLTLockRequest, out *OLTReply) error

func (*Service) CreateRawExtRedeem

func (svc *Service) CreateRawExtRedeem(req RedeemRequest, out *OLTReply) error

func (*Service) GetFailedTrackerStatus added in v0.14.0

func (svc *Service) GetFailedTrackerStatus(req TrackerStatusRequest, out *TrackerStatusReply) error

func (*Service) GetRawLockTX

func (svc *Service) GetRawLockTX(req ETHLockRequest, out *ETHLockRawTX) error

Expects users ethereum address , and creates an unsigned TX to send to wallet . Wallet signs and then calls onlinelock

func (*Service) GetSuccessTrackerStatus added in v0.14.0

func (svc *Service) GetSuccessTrackerStatus(req TrackerStatusRequest, out *TrackerStatusReply) error

func (*Service) GetTrackerStatus added in v0.14.0

func (svc *Service) GetTrackerStatus(req TrackerStatusRequest, out *TrackerStatusReply) error

func (*Service) PrepareOLTERC20Lock added in v0.14.0

func (svc *Service) PrepareOLTERC20Lock(req *OLTERC20LockRequest, out *OLTReply) error

type SignReply

type SignReply struct {
	TxHash common.Hash `json:"txTash"`
}

type SignRequest

type SignRequest struct {
	Wei       *big.Int       `json:"wei"`
	Recipient common.Address `json:"recipient"`
}

type TrackerStatusReply added in v0.14.0

type TrackerStatusReply struct {
	Status string `json:"status"`
}

type TrackerStatusRequest added in v0.14.0

type TrackerStatusRequest struct {
	TrackerName chain.TrackerName `json:"trackerName"`
}

Jump to

Keyboard shortcuts

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