apis

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressPool added in v1.0.1

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

func AddressPools added in v1.0.1

func AddressPools(address qlctypes.Address) *AddressPool

func NewAddressPool added in v1.0.1

func NewAddressPool() *AddressPool

func (*AddressPool) Dequeue added in v1.0.1

func (pool *AddressPool) Dequeue() qlctypes.Address

func (*AddressPool) DequeueSync added in v1.0.1

func (pool *AddressPool) DequeueSync() qlctypes.Address

func (*AddressPool) Enqueue added in v1.0.1

func (pool *AddressPool) Enqueue(address qlctypes.Address)

func (*AddressPool) Front added in v1.0.1

func (pool *AddressPool) Front() qlctypes.Address

func (*AddressPool) IsEmpty added in v1.0.1

func (pool *AddressPool) IsEmpty() bool

func (*AddressPool) Search added in v1.0.1

func (pool *AddressPool) Search(address qlctypes.Address) qlctypes.Address

func (*AddressPool) SearchSync added in v1.0.1

func (pool *AddressPool) SearchSync(address qlctypes.Address) qlctypes.Address

func (*AddressPool) Size added in v1.0.1

func (pool *AddressPool) Size() int

type DebugAPI

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

func NewDebugAPI

func NewDebugAPI(ctx context.Context, cfg *config.Config, eth *eth.Transaction, neo *neo.Transaction, s *gorm.DB) *DebugAPI

func (*DebugAPI) SignData

func (d *DebugAPI) SignData(ctx context.Context, s *pb.String) (*pb.SignDataResponse, error)

type DepositAPI

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

func NewDepositAPI

func NewDepositAPI(ctx context.Context, cfg *config.Config, neo *neo.Transaction, e *eth.Transaction, bsc *eth.Transaction, signer *signer.SignerClient, s *gorm.DB) *DepositAPI

func (*DepositAPI) ChainTransactionConfirmed added in v1.0.1

func (d *DepositAPI) ChainTransactionConfirmed(ctx context.Context, h *pb.ChainTxRequest) (*pb.Boolean, error)

func (*DepositAPI) ChainTransactionID added in v1.0.1

func (d *DepositAPI) ChainTransactionID(ctx context.Context, hash *pb.Hash) (*pb.Hash, error)

func (*DepositAPI) ChainTransactionSent added in v1.0.1

func (d *DepositAPI) ChainTransactionSent(ctx context.Context, h *pb.ChainTransactionSentRequest) (*pb.Boolean, error)

func (*DepositAPI) GetChainOwnerSign added in v1.0.1

func (d *DepositAPI) GetChainOwnerSign(ctx context.Context, request *proto.Hash) (*proto.String, error)

func (*DepositAPI) NeoTransactionConfirmed added in v1.0.1

func (d *DepositAPI) NeoTransactionConfirmed(ctx context.Context, request *pb.NeoTxConfirmedResponse) (*pb.Boolean, error)

func (*DepositAPI) PackNeoTransaction added in v1.0.1

func (d *DepositAPI) PackNeoTransaction(ctx context.Context, request *pb.PackNeoTxRequest) (*pb.PackNeoTxResponse, error)

func (*DepositAPI) Refund added in v1.0.1

func (d *DepositAPI) Refund(ctx context.Context, h *pb.Hash) (*pb.Boolean, error)

eth transaction must fail or cancel first

func (*DepositAPI) SendNeoTransaction added in v1.0.1

func (d *DepositAPI) SendNeoTransaction(ctx context.Context, request *pb.SendNeoTxnRequest) (*pb.Boolean, error)

type InfoAPI

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

func NewInfoAPI

func NewInfoAPI(ctx context.Context, cfg *config.Config, neo *neo.Transaction, nep5Eth, qgasEth, bsc *eth.Transaction, s *gorm.DB) *InfoAPI

func (*InfoAPI) CheckEthTransaction added in v1.0.1

func (i *InfoAPI) CheckEthTransaction(ctx context.Context, Hash *pb.Hash) (*pb.Boolean, error)

func (*InfoAPI) CheckNeoTransaction added in v1.0.1

func (i *InfoAPI) CheckNeoTransaction(ctx context.Context, Hash *pb.Hash) (*pb.Boolean, error)

func (*InfoAPI) Config added in v1.0.1

func (i *InfoAPI) Config(ctx context.Context, empty *empty.Empty) (*pb.ConfigResponse, error)

func (*InfoAPI) Ping

func (i *InfoAPI) Ping(ctx context.Context, empty *empty.Empty) (*pb.PingResponse, error)

func (*InfoAPI) SwapAmountByAddress added in v1.0.1

func (i *InfoAPI) SwapAmountByAddress(ctx context.Context, address *pb.Address) (*pb.AmountByAddressResponse, error)

func (*InfoAPI) SwapAmountByState added in v1.0.1

func (i *InfoAPI) SwapAmountByState(ctx context.Context, empty *empty.Empty) (*pb.Map, error)

func (*InfoAPI) SwapCountByState added in v1.0.1

func (i *InfoAPI) SwapCountByState(ctx context.Context, empty *empty.Empty) (*pb.Map, error)

func (*InfoAPI) SwapInfoByTxHash added in v1.0.1

func (i *InfoAPI) SwapInfoByTxHash(ctx context.Context, h *pb.Hash) (*pb.SwapInfo, error)

func (*InfoAPI) SwapInfoList added in v1.0.1

func (i *InfoAPI) SwapInfoList(ctx context.Context, offset *pb.Offset) (*pb.SwapInfos, error)

func (*InfoAPI) SwapInfosByAddress added in v1.0.1

func (i *InfoAPI) SwapInfosByAddress(ctx context.Context, offset *pb.AddrAndOffset) (*pb.SwapInfos, error)

func (*InfoAPI) SwapInfosByState added in v1.0.1

func (i *InfoAPI) SwapInfosByState(ctx context.Context, offset *pb.StateAndOffset) (*pb.SwapInfos, error)

func (*InfoAPI) SwapUnconfirmeds added in v1.0.1

func (i *InfoAPI) SwapUnconfirmeds(ctx context.Context, empty *empty.Empty) (*pb.SwapPendings, error)

type QGasPledgeParam added in v1.0.1

type QGasPledgeParam struct {
	PledgeAddress     qlctypes.Address
	Amount            qlctypes.Balance
	Erc20ReceiverAddr string
}

type QGasSwapAPI added in v1.0.1

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

func NewQGasSwapAPI added in v1.0.1

func NewQGasSwapAPI(ctx context.Context, cfg *config.Config, q *qlc.Transaction, e *eth.Transaction, b *eth.Transaction, signer *signer.SignerClient, s *gorm.DB) *QGasSwapAPI

func (*QGasSwapAPI) GetChainOwnerSign added in v1.0.1

func (g *QGasSwapAPI) GetChainOwnerSign(ctx context.Context, param *pb.Hash) (*pb.String, error)

func (*QGasSwapAPI) GetPledgeSendBlock added in v1.0.1

func (g *QGasSwapAPI) GetPledgeSendBlock(ctx context.Context, params *pb.QGasPledgeRequest) (*pb.StateBlockHash, error)

func (*QGasSwapAPI) GetWithdrawRewardBlock added in v1.0.1

func (g *QGasSwapAPI) GetWithdrawRewardBlock(ctx context.Context, param *pb.Hash) (*pb.StateBlockHash, error)

func (*QGasSwapAPI) PledgeChainTxSent added in v1.0.1

func (g *QGasSwapAPI) PledgeChainTxSent(ctx context.Context, param *pb.EthTxSentRequest) (*pb.Boolean, error)

func (*QGasSwapAPI) ProcessBlock added in v1.0.1

func (g *QGasSwapAPI) ProcessBlock(ctx context.Context, params *pb.StateBlockSigned) (*pb.Hash, error)

func (*QGasSwapAPI) SwapInfoByTxHash added in v1.0.1

func (g *QGasSwapAPI) SwapInfoByTxHash(ctx context.Context, h *pb.Hash) (*pb.QGasSwapInfo, error)

func (*QGasSwapAPI) SwapInfoList added in v1.0.1

func (g *QGasSwapAPI) SwapInfoList(ctx context.Context, offset *pb.Offset) (*pb.QGasSwapInfos, error)

func (*QGasSwapAPI) SwapInfosAmount added in v1.0.1

func (g *QGasSwapAPI) SwapInfosAmount(ctx context.Context, empty *empty.Empty) (*pb.Map, error)

func (*QGasSwapAPI) SwapInfosByAddress added in v1.0.1

func (g *QGasSwapAPI) SwapInfosByAddress(ctx context.Context, offset *pb.AddrAndOffset) (*pb.QGasSwapInfos, error)

func (*QGasSwapAPI) SwapInfosByState added in v1.0.1

func (g *QGasSwapAPI) SwapInfosByState(ctx context.Context, offset *pb.StateAndOffset) (*pb.QGasSwapInfos, error)

func (*QGasSwapAPI) SwapInfosCount added in v1.0.1

func (g *QGasSwapAPI) SwapInfosCount(ctx context.Context, empty *empty.Empty) (*pb.Map, error)

func (*QGasSwapAPI) WithdrawChainTxSent added in v1.0.1

func (g *QGasSwapAPI) WithdrawChainTxSent(ctx context.Context, param *pb.QGasWithdrawRequest) (*pb.Boolean, error)

type SignerService

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

func NewSignerService

func NewSignerService(cfg *config.SignerConfig) *SignerService

func (*SignerService) Sign

func (s *SignerService) Sign(ctx context.Context, request *pb.SignRequest) (*pb.SignResponse, error)

type TokenService

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

func NewTokenService

func NewTokenService(cfg *config.SignerConfig) *TokenService

func (*TokenService) AddressList

func (t *TokenService) AddressList(ctx context.Context, request *pb.AddressRequest) (*pb.AddressResponse, error)

func (*TokenService) Refresh

func (t *TokenService) Refresh(ctx context.Context, request *pb.RefreshRequest) (*pb.RefreshResponse, error)

type WithdrawAPI

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

func NewWithdrawAPI

func NewWithdrawAPI(ctx context.Context, cfg *config.Config, neo *neo.Transaction, eth *eth.Transaction, bsc *eth.Transaction, s *gorm.DB) *WithdrawAPI

func (*WithdrawAPI) ChainTransactionConfirmed added in v1.0.1

func (w *WithdrawAPI) ChainTransactionConfirmed(ctx context.Context, request *pb.ChainTxRequest) (*pb.Boolean, error)

func (*WithdrawAPI) ChainTransactionSent added in v1.0.1

func (w *WithdrawAPI) ChainTransactionSent(ctx context.Context, request *pb.ChainTxRequest) (*pb.Boolean, error)

Jump to

Keyboard shortcuts

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