Documentation ¶
Index ¶
- func DoSyncAllAccounts(exBal external.BalanceStorage, env string, stopCh chan struct{})
- type BNBSyncer
- type BTCSyncer
- type BTCTestNetSyncer
- type Balance
- type BlockchainInfoResponse
- type DaiSyncer
- type EthSyncer
- type ExternalSyncer
- type HERToken
- type HTokenSyncer
- type LTCSyncer
- type Syncer
- type TezosSyncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoSyncAllAccounts ¶
func DoSyncAllAccounts(exBal external.BalanceStorage, env string, stopCh chan struct{})
DoSyncAllAccounts syncs all assets of available accounts.
Types ¶
type BNBSyncer ¶
type BNBSyncer struct { RPC string // contains filtered or unexported fields }
BNBSyncer syncs all BNB external accounts
func (*BNBSyncer) GetExtBalance ¶
GetExtBalance syncs bnb account.
type BTCSyncer ¶
type BTCSyncer struct { RPC string // contains filtered or unexported fields }
BTCSyncer syncs all external BTC accounts.
type BTCTestNetSyncer ¶
type BTCTestNetSyncer struct { LastExtBalance map[string]*big.Int ExtBalance map[string]*big.Int BlockHeight map[string]*big.Int Nonce map[string]uint64 RPC string Account statedb.Account Storage external.BalanceStorage // contains filtered or unexported fields }
BTCTestNetSyncer syncs all external BTC accounts in btctestnet.
func (*BTCTestNetSyncer) GetExtBalance ¶
func (btc *BTCTestNetSyncer) GetExtBalance() error
GetExtBalance ...
func (*BTCTestNetSyncer) Update ¶
func (btc *BTCTestNetSyncer) Update()
Update updates accounts in cache as and when external balances external chains are updated.
type BlockchainInfoResponse ¶
type BlockchainInfoResponse struct { Hash160 string `json:"hash160"` Address string `json:"address"` NTx uint64 `json:"n_tx"` TotalReceived int `json:"total_received"` TotalSent int `json:"total_sent"` FinalBalance int64 `json:"final_balance"` Txs []struct { Ver int `json:"ver"` Inputs []struct { Sequence int64 `json:"sequence"` Witness string `json:"witness"` PrevOut struct { Spent bool `json:"spent"` SpendingOutpoints []struct { TxIndex int `json:"tx_index"` N int `json:"n"` } `json:"spending_outpoints"` TxIndex int `json:"tx_index"` Type int `json:"type"` Addr string `json:"addr"` Value int `json:"value"` N int `json:"n"` Script string `json:"script"` } `json:"prev_out"` Script string `json:"script"` } `json:"inputs"` Weight int `json:"weight"` BlockHeight int `json:"block_height"` RelayedBy string `json:"relayed_by"` Out []struct { Spent bool `json:"spent"` TxIndex int `json:"tx_index"` Type int `json:"type"` Addr string `json:"addr"` Value int `json:"value"` N int `json:"n"` Script string `json:"script"` } `json:"out"` LockTime int `json:"lock_time"` Result int `json:"result"` Size int `json:"size"` BlockIndex int `json:"block_index"` Time int `json:"time"` TxIndex int `json:"tx_index"` VinSz int `json:"vin_sz"` Hash string `json:"hash"` VoutSz int `json:"vout_sz"` } `json:"txs"` }
BlockchainInfoResponse ...
type DaiSyncer ¶
type DaiSyncer struct { RPC string TokenContractAddress string // contains filtered or unexported fields }
DaiSyncer syncs all DAI external accounts
type EthSyncer ¶
type EthSyncer struct { RPC string // contains filtered or unexported fields }
EthSyncer syncs all ETH external accounts
type ExternalSyncer ¶
type ExternalSyncer struct { LastExtBalance map[string]*big.Int ExtBalance map[string]*big.Int BlockHeight map[string]*big.Int Nonce map[string]uint64 RPC string Account statedb.Account Storage external.BalanceStorage // contains filtered or unexported fields }
ExternalSyncer syncs all asset external accounts
type HERToken ¶
type HERToken struct { LastExtBalance *big.Int ExtBalance *big.Int Account statedb.Account BlockHeight *big.Int Nonce uint64 Storage external.BalanceStorage TokenContractAddress string TokenSymbol string RPC string }
func (*HERToken) GetExtBalance ¶
GetExtBalance Gets Asset balance from main chain
type HTokenSyncer ¶
type HTokenSyncer struct { RPC string // contains filtered or unexported fields }
HTokenSyncer syncs all HToken external accounts
func (*HTokenSyncer) GetExtBalance ¶
func (hs *HTokenSyncer) GetExtBalance() error
GetExtBalance ...
func (*HTokenSyncer) Update ¶
func (hs *HTokenSyncer) Update()
Update updates accounts in cache as and when external balances external chains are updated.
type LTCSyncer ¶
type LTCSyncer struct { RPC string // contains filtered or unexported fields }
LTCSyncer syncs all XTZ external accounts
func (*LTCSyncer) GetExtBalance ¶
GetExtBalance syncs lite coin account.
type TezosSyncer ¶
type TezosSyncer struct { RPC string // contains filtered or unexported fields }
TezosSyncer syncs all XTZ external accounts
func (*TezosSyncer) Update ¶
func (ts *TezosSyncer) Update()
Update updates accounts in cache as and when external balances external chains are updated.