Documentation ¶
Index ¶
- type Binance
- func (b *Binance) BroadcastTx(tx stypes.TxOutItem, hexTx []byte) (string, error)
- func (b *Binance) ConfirmationCountReady(txIn stypes.TxIn) bool
- func (b *Binance) GetAccount(pkey common.PubKey, height *big.Int) (common.Account, error)
- func (b *Binance) GetAccountByAddress(address string, height *big.Int) (common.Account, error)
- func (b *Binance) GetAddress(poolPubKey common.PubKey) string
- func (b *Binance) GetBlockScannerHeight() (int64, error)
- func (b *Binance) GetChain() common.Chain
- func (b *Binance) GetConfig() config.BifrostChainConfiguration
- func (b *Binance) GetConfirmationCount(txIn stypes.TxIn) int64
- func (b *Binance) GetHeight() (int64, error)
- func (b *Binance) GetLatestTxForVault(vault string) (string, string, error)
- func (b *Binance) IsBlockScannerHealthy() bool
- func (b *Binance) OnObservedTxIn(txIn stypes.TxInItem, blockHeight int64)
- func (b *Binance) ReportSolvency(bnbBlockHeight int64) error
- func (b *Binance) ShouldReportSolvency(height int64) bool
- func (b *Binance) SignTx(tx stypes.TxOutItem, thorchainHeight int64) ([]byte, []byte, *stypes.TxInItem, error)
- func (b *Binance) Start(globalTxsQueue chan stypes.TxIn, globalErrataQueue chan stypes.ErrataBlock, ...)
- func (b *Binance) Stop()
- type BinanceBlockScanner
- func (b *BinanceBlockScanner) BlockRequest(height int64) string
- func (c *BinanceBlockScanner) FetchMemPool(height int64) (stypes.TxIn, error)
- func (b *BinanceBlockScanner) FetchTxs(height, chainHeight int64) (stypes.TxIn, error)
- func (b *BinanceBlockScanner) GetHeight() (int64, error)
- func (b *BinanceBlockScanner) UnmarshalBlock(buf []byte) ([]string, error)
- type BinanceMetaDataStore
- type BinanceMetadata
- type SolvencyReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binance ¶
type Binance struct {
// contains filtered or unexported fields
}
Binance is a structure to sign and broadcast tx to binance chain used by signer mostly
func NewBinance ¶
func NewBinance(thorKeys *thorclient.Keys, cfg config.BifrostChainConfiguration, server *tssp.TssServer, thorchainBridge thorclient.ThorchainBridge, m *metrics.Metrics) (*Binance, error)
NewBinance create new instance of binance client
func (*Binance) BroadcastTx ¶
BroadcastTx is to broadcast the tx to binance chain
func (*Binance) ConfirmationCountReady ¶ added in v0.41.0
ConfirmationCountReady binance chain has almost instant finality , so doesn't need to wait for confirmation
func (*Binance) GetAccount ¶
func (*Binance) GetAccountByAddress ¶
func (*Binance) GetAddress ¶
GetAddress return current signer address, it will be bech32 encoded address
func (*Binance) GetBlockScannerHeight ¶ added in v1.125.0
GetBlockScannerHeight returns blockscanner height
func (*Binance) GetConfig ¶
func (b *Binance) GetConfig() config.BifrostChainConfiguration
GetConfig return the configuration used by Binance chain client
func (*Binance) GetConfirmationCount ¶ added in v0.41.0
GetConfirmationCount determinate how many confirmation it required
func (*Binance) GetLatestTxForVault ¶ added in v1.125.0
func (*Binance) IsBlockScannerHealthy ¶ added in v0.41.0
func (*Binance) OnObservedTxIn ¶ added in v0.73.0
func (*Binance) ReportSolvency ¶ added in v0.79.0
func (*Binance) ShouldReportSolvency ¶ added in v0.79.0
ShouldReportSolvency given block height , should chain client report solvency to THORNode
func (*Binance) SignTx ¶
func (b *Binance) SignTx(tx stypes.TxOutItem, thorchainHeight int64) ([]byte, []byte, *stypes.TxInItem, error)
SignTx sign the the given TxArrayItem
type BinanceBlockScanner ¶
type BinanceBlockScanner struct {
// contains filtered or unexported fields
}
BinanceBlockScanner is to scan the blocks
func NewBinanceBlockScanner ¶
func NewBinanceBlockScanner(cfg config.BifrostBlockScannerConfiguration, scanStorage blockscanner.ScannerStorage, isTestNet bool, bridge thorclient.ThorchainBridge, m *metrics.Metrics, solvencyReporter SolvencyReporter, ) (*BinanceBlockScanner, error)
NewBinanceBlockScanner create a new instance of BlockScan
func (*BinanceBlockScanner) BlockRequest ¶
func (b *BinanceBlockScanner) BlockRequest(height int64) string
func (*BinanceBlockScanner) FetchMemPool ¶ added in v0.41.0
func (c *BinanceBlockScanner) FetchMemPool(height int64) (stypes.TxIn, error)
func (*BinanceBlockScanner) FetchTxs ¶
func (b *BinanceBlockScanner) FetchTxs(height, chainHeight int64) (stypes.TxIn, error)
func (*BinanceBlockScanner) GetHeight ¶
func (b *BinanceBlockScanner) GetHeight() (int64, error)
func (*BinanceBlockScanner) UnmarshalBlock ¶
func (b *BinanceBlockScanner) UnmarshalBlock(buf []byte) ([]string, error)
type BinanceMetaDataStore ¶
type BinanceMetaDataStore struct {
// contains filtered or unexported fields
}
func NewBinanceMetaDataStore ¶
func NewBinanceMetaDataStore() *BinanceMetaDataStore
func (*BinanceMetaDataStore) Get ¶
func (b *BinanceMetaDataStore) Get(pk common.PubKey) BinanceMetadata
func (*BinanceMetaDataStore) GetByAccount ¶
func (b *BinanceMetaDataStore) GetByAccount(acct int64) BinanceMetadata
func (*BinanceMetaDataStore) SeqInc ¶
func (b *BinanceMetaDataStore) SeqInc(pk common.PubKey)
func (*BinanceMetaDataStore) Set ¶
func (b *BinanceMetaDataStore) Set(pk common.PubKey, meta BinanceMetadata)
type BinanceMetadata ¶
type SolvencyReporter ¶ added in v0.63.0
SolvencyReporter is to report solvency info to THORNode