Documentation ¶
Index ¶
- Constants
- type Account
- type Balance
- type BlockTransactions
- type Client
- type Coins
- type Error
- type ExplorerClient
- type ExplorerResponse
- type ExplorerTransactionType
- type ExplorerTxs
- type Input
- type Msg
- type MsgValue
- type MultiTransfer
- type NodeInfo
- type Output
- type Platform
- func (p *Platform) Coin() coin.Coin
- func (p *Platform) CurrentBlockNumber() (int64, error)
- func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
- func (p *Platform) GetTokenListByAddress(address string) (blockatlas.TokenPage, error)
- func (p *Platform) GetTokenTxsByAddress(address, token string) (blockatlas.TxPage, error)
- func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
- type SubTx
- type SyncInfo
- type Token
- type TokenList
- type Transactions
- type Tx
- type TxHashRPC
- type TxHashTx
- type TxType
- type TxV2
- type Value
Constants ¶
View Source
const ( TxTransfer TxType = "TRANSFER" // e.g: BNB, TWT-8C2 SingleTransferOperation ExplorerTransactionType = "singleTransfer" // e.g: BNB, TWT-8C2 MultiTransferOperation ExplorerTransactionType = "multiTransfer" // e.g [BNB, BNB], [TWT-8C2, TWT-8C2] )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockTransactions ¶ added in v1.1.0
type Client ¶ added in v1.0.0
type Client struct {
blockatlas.Request
}
type ExplorerClient ¶ added in v1.1.0
type ExplorerClient struct {
blockatlas.Request
}
type ExplorerResponse ¶ added in v1.1.0
type ExplorerResponse struct { Nums int `json:"txNums"` Txs []ExplorerTxs `json:"txArray"` }
Transaction response from Explorer
type ExplorerTransactionType ¶ added in v1.1.0
type ExplorerTransactionType string
type ExplorerTxs ¶ added in v1.1.0
type ExplorerTxs struct { BlockHeight uint64 `json:"blockHeight"` Code int `json:"code"` FromAddr string `json:"fromAddr"` HasChildren int `json:"hasChildren"` Memo string `json:"memo"` MultisendTransfers []MultiTransfer `json:"subTxsDto"` // Not part of response, added from hash info tx for simplifying logic Timestamp int64 `json:"timeStamp"` ToAddr string `json:"toAddr"` TxFee float64 `json:"txFee"` TxHash string `json:"txHash"` TxType TxType `json:"txType"` Value float64 `json:"value"` TxAsset string `json:"txAsset"` }
type MultiTransfer ¶ added in v1.1.0
type Platform ¶ added in v1.0.0
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) CurrentBlockNumber ¶ added in v1.0.0
func (*Platform) GetBlockByNumber ¶ added in v1.0.0
func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
func (*Platform) GetTokenListByAddress ¶ added in v1.0.37
func (p *Platform) GetTokenListByAddress(address string) (blockatlas.TokenPage, error)
func (*Platform) GetTokenTxsByAddress ¶ added in v1.0.37
func (p *Platform) GetTokenTxsByAddress(address, token string) (blockatlas.TxPage, error)
func (*Platform) GetTxsByAddress ¶ added in v1.0.37
func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
type SyncInfo ¶ added in v1.1.0
type SyncInfo struct {
LatestBlockHeight int64 `json:"latest_block_height"`
}
type Transactions ¶ added in v1.1.0
type Tx ¶ added in v1.0.0
type Tx struct { Asset string `json:"txAsset"` BlockHeight uint64 `json:"blockHeight"` Code int `json:"code"` Data string `json:"data"` Fee string `json:"txFee"` FromAddr string `json:"fromAddr"` Memo string `json:"memo"` OrderID string `json:"orderId"` Sequence uint64 `json:"sequence"` Source int `json:"source"` Timestamp string `json:"timeStamp"` ToAddr string `json:"toAddr"` TxHash string `json:"txHash"` Type TxType `json:"txType"` Value string `json:"value"` }
type TxV2 ¶ added in v1.1.0
type TxV2 struct { Tx OrderID string `json:"orderId"` // Optional. Available when the transaction type is NEW_ORDER SubTransactions []SubTx `json:"subTransactions"` // Optional. Available when the transaction has sub-transactions, such as multi-send transaction or a transaction have multiple assets }
Click to show internal directories.
Click to hide internal directories.