relayer

package
v1.67.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Locked        = int32(1)
	Unlocked      = int32(99)
	EncryptEnable = int64(1)
)

status ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager ...

func NewRelayerManager

func NewRelayerManager(chain33Relayer *chain33.Relayer4Chain33, ethRelayer *ethereum.Relayer4Ethereum, db dbm.DB) *Manager

NewRelayerManager ... 1.验证人的私钥需要通过cli命令行进行导入,且chain33和ethereum两种不同的验证人需要分别导入 2.显示或者重新替换原有的私钥首先需要通过passpin进行unlock的操作

func (*Manager) ApproveAllowance

func (manager *Manager) ApproveAllowance(approveAllowance relayerTypes.ApproveAllowance, result *interface{}) error

ApproveAllowance ...

func (*Manager) Burn

func (manager *Manager) Burn(burn relayerTypes.Burn, result *interface{}) error

Burn ...

func (*Manager) BurnAsync

func (manager *Manager) BurnAsync(burn relayerTypes.Burn, result *interface{}) error

BurnAsync ...

func (*Manager) ChangePassphase

func (manager *Manager) ChangePassphase(setPasswdReq relayerTypes.ReqChangePasswd, result *interface{}) error

ChangePassphase ...

func (*Manager) CreateBridgeToken

func (manager *Manager) CreateBridgeToken(symbol string, result *interface{}) error

CreateBridgeToken ...

func (*Manager) CreateERC20Token

func (manager *Manager) CreateERC20Token(symbol string, result *interface{}) error

CreateERC20Token ...

func (*Manager) DeployContrcts

func (manager *Manager) DeployContrcts(param interface{}, result *interface{}) error

DeployContrcts ...

func (*Manager) GenerateEthereumPrivateKey

func (manager *Manager) GenerateEthereumPrivateKey(param interface{}, result *interface{}) error

GenerateEthereumPrivateKey 生成以太坊私钥

func (*Manager) GetBalance

func (manager *Manager) GetBalance(balanceAddr relayerTypes.BalanceAddr, result *interface{}) error

GetBalance ...

func (*Manager) GetDecimals

func (manager *Manager) GetDecimals(tokenAddr string) (int64, error)

GetDecimals ...

func (*Manager) ImportChain33PrivateKey4EthRelayer

func (manager *Manager) ImportChain33PrivateKey4EthRelayer(privateKey string, result *interface{}) error

ImportChain33PrivateKey4EthRelayer 为ethrelayer导入chain33私钥,为向chain33发送交易时进行签名使用

func (*Manager) ImportChain33RelayerPrivateKey

func (manager *Manager) ImportChain33RelayerPrivateKey(importKeyReq relayerTypes.ImportKeyReq, result *interface{}) error

ImportChain33RelayerPrivateKey 导入chain33relayer验证人的私钥,该私钥实际用于向ethereum提交验证交易时签名使用

func (*Manager) IsProphecyPending

func (manager *Manager) IsProphecyPending(claimID [32]byte, result *interface{}) error

IsProphecyPending ...

func (*Manager) IsValidatorActive

func (manager *Manager) IsValidatorActive(vallidatorAddr string, result *interface{}) error

IsValidatorActive ...

func (*Manager) Lock

func (manager *Manager) Lock(param interface{}, result *interface{}) error

Lock 锁定操作,该操作一旦执行,就不能替换验证人的私钥,需要重新unlock之后才能修改

func (*Manager) LockEthErc20Asset

func (manager *Manager) LockEthErc20Asset(lockEthErc20Asset relayerTypes.LockEthErc20, result *interface{}) error

LockEthErc20Asset ...

func (*Manager) LockEthErc20AssetAsync

func (manager *Manager) LockEthErc20AssetAsync(lockEthErc20Asset relayerTypes.LockEthErc20, result *interface{}) error

LockEthErc20AssetAsync ...

func (*Manager) MintErc20

func (manager *Manager) MintErc20(mintToken relayerTypes.MintToken, result *interface{}) error

MintErc20 ...

func (*Manager) SetPassphase

func (manager *Manager) SetPassphase(setPasswdReq relayerTypes.ReqSetPasswd, result *interface{}) error

SetPassphase ...

func (*Manager) ShowBridgeBankAddr

func (manager *Manager) ShowBridgeBankAddr(para interface{}, result *interface{}) error

ShowBridgeBankAddr ...

func (*Manager) ShowBridgeRegistryAddr

func (manager *Manager) ShowBridgeRegistryAddr(para interface{}, result *interface{}) error

ShowBridgeRegistryAddr ...

func (*Manager) ShowChain33Relayer2EthTxs

func (manager *Manager) ShowChain33Relayer2EthTxs(param interface{}, result *interface{}) error

ShowChain33Relayer2EthTxs ...

func (*Manager) ShowChain33RelayerValidator

func (manager *Manager) ShowChain33RelayerValidator(param interface{}, result *interface{}) error

ShowChain33RelayerValidator 显示在chain33中以验证人validator身份进行登录的地址

func (*Manager) ShowDepositStatics

func (manager *Manager) ShowDepositStatics(token relayerTypes.TokenStatics, result *interface{}) error

ShowDepositStatics ...

func (*Manager) ShowEthRelayer2Chain33Txs

func (manager *Manager) ShowEthRelayer2Chain33Txs(param interface{}, result *interface{}) error

ShowEthRelayer2Chain33Txs ...

func (*Manager) ShowEthRelayer2EthTxs

func (manager *Manager) ShowEthRelayer2EthTxs(param interface{}, result *interface{}) error

ShowEthRelayer2EthTxs ...

func (*Manager) ShowEthRelayerValidator

func (manager *Manager) ShowEthRelayerValidator(param interface{}, result *interface{}) error

ShowEthRelayerValidator 显示在Ethereum中以验证人validator身份进行登录的地址

func (*Manager) ShowLockStatics

func (manager *Manager) ShowLockStatics(token relayerTypes.TokenStatics, result *interface{}) error

ShowLockStatics ...

func (*Manager) ShowOperator

func (manager *Manager) ShowOperator(param interface{}, result *interface{}) error

ShowOperator ...

func (*Manager) ShowTokenAddrBySymbol

func (manager *Manager) ShowTokenAddrBySymbol(token relayerTypes.TokenStatics, result *interface{}) error

ShowTokenAddrBySymbol ...

func (*Manager) ShowTxReceipt

func (manager *Manager) ShowTxReceipt(txhash string, result *interface{}) error

ShowTxReceipt ...

func (*Manager) ShowTxsChain33ToEthTxBurn

func (manager *Manager) ShowTxsChain33ToEthTxBurn(param interface{}, result *interface{}) error

ShowTxsChain33ToEthTxBurn ...

func (*Manager) ShowTxsChain33ToEthTxLock

func (manager *Manager) ShowTxsChain33ToEthTxLock(param interface{}, result *interface{}) error

ShowTxsChain33ToEthTxLock ...

func (*Manager) ShowTxsEth2chain33TxBurn

func (manager *Manager) ShowTxsEth2chain33TxBurn(param interface{}, result *interface{}) error

ShowTxsEth2chain33TxBurn ...

func (*Manager) ShowTxsEth2chain33TxLock

func (manager *Manager) ShowTxsEth2chain33TxLock(param interface{}, result *interface{}) error

ShowTxsEth2chain33TxLock ...

func (*Manager) TransferToken

func (manager *Manager) TransferToken(transfer relayerTypes.TransferToken, result *interface{}) error

TransferToken ...

func (*Manager) Unlock

func (manager *Manager) Unlock(passphase string, result *interface{}) error

Unlock 进行unlok操作

type Store

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

Store 钱包通用数据库存储类,实现对钱包账户数据库操作的基本实现

func NewStore

func NewStore(db db.DB) *Store

NewStore 新建存储对象

func (*Store) Close

func (store *Store) Close()

Close 关闭数据库

func (*Store) Get

func (store *Store) Get(key []byte) ([]byte, error)

Get 取值

func (*Store) GetDB

func (store *Store) GetDB() db.DB

GetDB 获取数据库操作接口

func (*Store) GetEncryptionFlag

func (store *Store) GetEncryptionFlag() int64

GetEncryptionFlag 获取加密方式

func (*Store) NewBatch

func (store *Store) NewBatch(sync bool) db.Batch

NewBatch 新建批处理操作对象接口

func (*Store) NewListHelper

func (store *Store) NewListHelper() *db.ListHelper

NewListHelper 新建列表复制操作对象

func (*Store) Set

func (store *Store) Set(key []byte, value []byte) (err error)

Set 设置值

func (*Store) SetEncryptionFlag

func (store *Store) SetEncryptionFlag(batch db.Batch) error

SetEncryptionFlag 设置加密方式标志

func (*Store) SetPasswordHash

func (store *Store) SetPasswordHash(password string, batch db.Batch) error

SetPasswordHash 保存密码哈希

func (*Store) VerifyPasswordHash

func (store *Store) VerifyPasswordHash(password string) bool

VerifyPasswordHash 检查密码有效性

Directories

Path Synopsis
transceiver/sync
Package sync ...
Package sync ...

Jump to

Keyboard shortcuts

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