relayer

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 22 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, ethRelayers map[string]*ethereum.Relayer4Ethereum, db dbm.DB) *Manager

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

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) BurnAsyncFromChain33

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

func (*Manager) BurnWithIncreaseAsyncFromChain33 added in v1.66.2

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

func (*Manager) CfgWithdraw added in v1.66.0

func (manager *Manager) CfgWithdraw(cfgWithdrawReq *relayerTypes.CfgWithdrawReq, result *interface{}) error

func (*Manager) ChangePassphase

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

ChangePassphase ...

func (*Manager) CreateLockEventManually added in v1.66.3

func (manager *Manager) CreateLockEventManually(createLockEventReq *relayerTypes.CreateLockEventReq, result *interface{}) error

func (*Manager) EthGeneralQuery added in v1.67.0

func (manager *Manager) EthGeneralQuery(query *relayerTypes.QueryReq, result *interface{}) error

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) GetCfgWithdraw added in v1.67.0

func (manager *Manager) GetCfgWithdraw(cfgWithdrawReq *relayerTypes.CfgWithdrawReq, result *interface{}) error

func (*Manager) GetChain33MultiSignAddr added in v1.67.0

func (manager *Manager) GetChain33MultiSignAddr(chainName string, result *interface{}) error

func (*Manager) GetDecimals

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

GetDecimals ...

func (*Manager) GetEthMultiSignAddr added in v1.67.0

func (manager *Manager) GetEthMultiSignAddr(chainName string, result *interface{}) error

func (*Manager) ImportChain33RelayerPrivateKey

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

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

func (*Manager) ImportEthereumPrivateKey4EthRelayer

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

func (*Manager) Lock

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

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

func (*Manager) LockBTYAssetAsync

func (manager *Manager) LockBTYAssetAsync(lockEthErc20Asset *relayerTypes.LockBTY, result *interface{}) error

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) ReGetEthereumEvent added in v1.66.3

func (manager *Manager) ReGetEthereumEvent(param *relayerTypes.RegetEthereumEventReq, result *interface{}) error

func (*Manager) ResendChain33Event added in v1.66.0

func (manager *Manager) ResendChain33Event(param *relayerTypes.ResendChain33EventReq, result *interface{}) error

func (*Manager) ResendEthereumLockEvent added in v1.66.3

func (manager *Manager) ResendEthereumLockEvent(param *relayerTypes.ResendEthereumEventReq, result *interface{}) error

func (*Manager) SafeTransfer4Chain33

func (manager *Manager) SafeTransfer4Chain33(para *relayerTypes.SafeTransfer, result *interface{}) error

func (*Manager) SafeTransfer4Eth

func (manager *Manager) SafeTransfer4Eth(para *relayerTypes.SafeTransfer, result *interface{}) error

func (*Manager) SetChain33MultiSignAddr

func (manager *Manager) SetChain33MultiSignAddr(multiSignAddr string, result *interface{}) error

func (*Manager) SetEthMultiSignAddr

func (manager *Manager) SetEthMultiSignAddr(multiSignAddr *relayerTypes.CfgMultiSignAddr, result *interface{}) error

func (*Manager) SetPassphase

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

SetPassphase ...

func (*Manager) SetupOwner4Chain33

func (manager *Manager) SetupOwner4Chain33(setupMulSign *relayerTypes.SetupMulSign, result *interface{}) error

func (*Manager) ShowBalanceLocked added in v1.66.0

func (manager *Manager) ShowBalanceLocked(BalanceLockedReq *relayerTypes.BalanceLockedReq, result *interface{}) error

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) ShowBridgeRegistryAddr4chain33

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

ShowBridgeRegistryAddr4chain33 ...

func (*Manager) ShowChain33RelayerValidator

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

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

func (*Manager) ShowETHLockTokenAddress

func (manager *Manager) ShowETHLockTokenAddress(token2show *relayerTypes.TokenAddress, result *interface{}) error

func (*Manager) ShowEthRelayerValidator

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

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

func (*Manager) ShowMultiBalance

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

func (*Manager) ShowTokenAddress

func (manager *Manager) ShowTokenAddress(token2show *relayerTypes.TokenAddress, result *interface{}) error

ShowTokenAddress ...

func (*Manager) ShowTokenStatics

func (manager *Manager) ShowTokenStatics(request *relayerTypes.TokenStaticsRequest, result *interface{}) error

ShowTokenStatics ShowEthRelayer2Chain33Txs ...

func (*Manager) ShowTxReceipt

func (manager *Manager) ShowTxReceipt(txReceiptReq *relayerTypes.TxReceiptReq, result *interface{}) error

ShowTxReceipt ...

func (*Manager) SimBurnFromEth

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

SimBurnFromEth : 模拟从eth销毁资产,提币回到chain33,使用LockBTY仅为测试使用

func (*Manager) SimLockFromEth

func (manager *Manager) SimLockFromEth(lock *relayerTypes.LockEthErc20, result *interface{}) error

SimLockFromEth : 模拟从eth锁住eth/erc20,转移到chain33

func (*Manager) TransferEth

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

TransferEth ...

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操作

func (*Manager) WithdrawFromChain33 added in v1.66.0

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

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