Documentation ¶
Index ¶
- func BlockRequest(rpcHost string, height int64) (string, string)
- func UnmarshalBlock(buf []byte) (string, []string, error)
- type AccountResp
- type BroadcastResult
- type ErrataBlock
- type ErrataTx
- type Msg
- type RPCBlock
- type Solvency
- type TxArrayItem
- type TxIn
- type TxInItem
- type TxInStatus
- type TxMode
- type TxOut
- type TxOutItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountResp ¶
type AccountResp struct { Height string `json:"height"` Result struct { Value struct { AccountNumber uint64 `json:"account_number,string"` Sequence uint64 `json:"sequence,string"` } `json:"value"` } `json:"result"` }
AccountResp the response from thorclient
type BroadcastResult ¶
type BroadcastResult struct { JSONRPC string `json:"jsonrpc"` Result coretypes.ResultBroadcastTxCommit `json:"result"` }
type ErrataBlock ¶
type Msg ¶
type Msg struct { Type string `json:"type"` Value stypes.MsgObservedTxIn `json:"value"` }
type Solvency ¶
Solvency structure is to hold all the information necessary to report solvency to DDNode
type TxArrayItem ¶
type TxArrayItem struct { Chain common.Chain `json:"chain,omitempty"` ToAddress common.Address `json:"to_address,omitempty"` VaultPubKey common.PubKey `json:"vault_pub_key,omitempty"` Coin common.Coin `json:"coin"` Memo string `json:"memo,omitempty"` MaxGas common.Gas `json:"max_gas"` GasRate int64 `json:"gas_rate,omitempty"` InHash common.TxID `json:"in_hash,omitempty"` OutHash common.TxID `json:"out_hash,omitempty"` Aggregator string `json:"aggregator,omitempty"` AggregatorTargetAsset string `json:"aggregator_target_asset,omitempty"` AggregatorTargetLimit *cosmos.Uint `json:"aggregator_target_limit,omitempty"` }
TxArrayItem used to represent the tx out item coming from THORChain, there is little difference between TxArrayItem and TxOutItem defined above , only Coin <-> Coins field are different. TxArrayItem from THORChain has Coin , which only have a single coin TxOutItem used in bifrost need to support Coins , because when Yggdrasil return , it send all the coins back to asgard using multisend
func (TxArrayItem) TxOutItem ¶
func (tx TxArrayItem) TxOutItem() TxOutItem
TxOutItem convert the information to TxOutItem
type TxIn ¶
type TxIn struct { Count string `json:"count"` Chain common.Chain `json:"chain"` TxArray []TxInItem `json:"txArray"` Filtered bool `json:"filtered"` MemPool bool `json:"mem_pool"` // indicate whether this item is in the mempool or not SentUnFinalised bool `json:"sent_un_finalised"` // indicate whehter unfinalised tx had been sent to THORChain Finalised bool `json:"finalised"` ConfirmationRequired int64 `json:"confirmation_required"` }
type TxInItem ¶
type TxInItem struct { BlockHeight int64 `json:"block_height"` Tx string `json:"tx"` Memo string `json:"memo"` Sender string `json:"sender"` To string `json:"to"` // to adddress Coins common.Coins `json:"coins"` Gas common.Gas `json:"gas"` ObservedVaultPubKey common.PubKey `json:"observed_vault_pub_key"` Aggregator string `json:"aggregator"` AggregatorTarget string `json:"aggregator_target"` AggregatorTargetLimit *cosmos.Uint `json:"aggregator_target_limit"` }
func NewTxInItem ¶
type TxOut ¶
type TxOut struct { Height int64 `json:"height"` TxArray []TxArrayItem `json:"tx_array"` }
TxOut represent the tx out information , bifrost need to sign and process
type TxOutItem ¶
type TxOutItem struct { Chain common.Chain `json:"chain"` ToAddress common.Address `json:"to"` VaultPubKey common.PubKey `json:"vault_pubkey"` Coins common.Coins `json:"coins"` Memo string `json:"memo"` MaxGas common.Gas `json:"max_gas"` GasRate int64 `json:"gas_rate"` InHash common.TxID `json:"in_hash"` OutHash common.TxID `json:"out_hash"` Aggregator string `json:"aggregator"` AggregatorTargetAsset string `json:"aggregator_target_asset,omitempty"` AggregatorTargetLimit *cosmos.Uint `json:"aggregator_target_limit,omitempty"` Checkpoint []byte `json:"-"` }
TxOutItem represent the information of a tx bifrost need to process
func (TxOutItem) CacheHash ¶
CacheHash return a hash that doesn't include VaultPubKey , thus this one can be used as cache key for txOutItem across different vaults