Documentation
¶
Index ¶
- type Address
- type BSCAddressResponse
- type BSCBalanceResponse
- type BSCBase
- type BSCResponse
- type BSCSwapInfo
- type BSCSwapResponse
- type BSCTxInfoResponse
- type BSCWithdrawInput
- type BSCWithdrawResponse
- type BlockBook
- func (b *BlockBook) FindDepositTxId(address string, amount int64) (string, error)
- func (b *BlockBook) GetAddress(address string) (response Address, err error)
- func (b *BlockBook) GetEthAddress(addr string) (response EthAddr, err error)
- func (b *BlockBook) GetFee(nBlocks string) (response Fee, err error)
- func (b *BlockBook) GetTx(txid string) (response Tx, err error)
- func (b *BlockBook) GetTxEth(txid string) (response EthTx, err error)
- func (b *BlockBook) GetUtxo(xpub string, confirmed bool) (response []Utxo, err error)
- func (b *BlockBook) GetXpub(xpub string) (response Xpub, err error)
- func (b *BlockBook) SendTx(rawTx string) (response string, err error)
- func (b *BlockBook) SendTxWithMessage(rawTx string) (string, error, string)
- type BroadcastRequest
- type BscScan
- func (b *BscScan) FindDepositTxId(address string, amount int64) (string, error)
- func (b *BscScan) GetAddress(address string) (response Address, err error)
- func (b *BscScan) GetEthAddress(addr string) (response EthAddr, err error)
- func (b *BscScan) GetFee(nBlocks string) (response Fee, err error)
- func (b *BscScan) GetTx(txid string) (response Tx, err error)
- func (b *BscScan) GetTxEth(txid string) (response EthTx, err error)
- func (b *BscScan) GetUtxo(xpub string, confirmed bool) (response []Utxo, err error)
- func (b *BscScan) GetXpub(xpub string) (response Xpub, err error)
- func (b *BscScan) SendTx(rawTx string) (response string, err error)
- func (b *BscScan) SendTxWithMessage(rawTx string) (string, error, string)
- type EthAddr
- type EthTokens
- type EthTx
- type EthTxVin
- type EthTxVout
- type Explorer
- type ExplorerFactory
- type Fee
- type NulsBalanceData
- type NulsBroadcast
- type NulsCalculatedFee
- type NulsError
- type NulsErrorData
- type NulsExplorer
- func (b *NulsExplorer) FindDepositTxId(address string, amount int64) (string, error)
- func (b *NulsExplorer) GetAddress(address string) (response Address, err error)
- func (b *NulsExplorer) GetEthAddress(addr string) (response EthAddr, err error)
- func (b *NulsExplorer) GetFee(nBlocks string) (response Fee, err error)
- func (b *NulsExplorer) GetTx(txid string) (response Tx, err error)
- func (b *NulsExplorer) GetTxEth(txid string) (response EthTx, err error)
- func (b *NulsExplorer) GetUtxo(xpub string, confirmed bool) (response []Utxo, err error)
- func (b *NulsExplorer) GetXpub(xpub string) (response Xpub, err error)
- func (b *NulsExplorer) SendTx(rawTx string) (response string, err error)
- func (b *NulsExplorer) SendTxWithMessage(rawTx string) (string, error, string)
- type NulsFee
- type NulsFeeRequest
- type NulsFrom
- type NulsInfo
- type NulsInfoModel
- type NulsTo
- type NulsTx
- type NulsTxDetail
- type NulsTxResponse
- type RpcRequest
- type RpcTxResponse
- type SendTx
- type Status
- type TokenTransfer
- type Tokens
- type Tx
- type TxListResponse
- type TxVin
- type TxVout
- type Utxo
- type Xpub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Page int `json:"page"` TotalPages int `json:"totalPages"` ItemsOnPage int `json:"itemsOnPage"` Address string `json:"address"` Balance string `json:"balance"` TotalReceived string `json:"totalReceived"` TotalSent string `json:"totalSent"` UnconfirmedBalance string `json:"unconfirmedBalance"` UnconfirmedTxs int `json:"unconfirmedTxs"` Txs int `json:"txs"` Txids []string `json:"txids"` }
type BSCAddressResponse ¶ added in v1.1.9
type BSCBalanceResponse ¶ added in v1.1.9
type BSCBase ¶ added in v1.1.9
BSC API Models hosted at https://pp-bsc-api.herokuapp.com/
type BSCResponse ¶ added in v1.1.8
type BSCResponse struct { JsonRPC string `json:"jsonrpc"` ID int `json:"id"` Error struct { Code int `json:"code"` Message string `json:"message"` } `json:"error"` Result string `json:"result"` }
BSC Scan Models
type BSCSwapInfo ¶ added in v1.1.9
type BSCSwapResponse ¶ added in v1.1.9
type BSCTxInfoResponse ¶ added in v1.1.9
type BSCTxInfoResponse struct { BSCBase Data struct { TxInfo struct { Block int64 `json:"block"` Confirmations int64 `json:"confirmations"` IsServiceTx bool `json:"service_tx"` TransactionHash string `json:"tx_hash"` ReceivedAmount float64 `json:"received_amount"` } `json:"tx_info"` } `json:"data"` }
type BSCWithdrawInput ¶ added in v1.1.9
type BSCWithdrawResponse ¶ added in v1.1.9
type BlockBook ¶
type BlockBook struct { Url string // contains filtered or unexported fields }
func NewBlockBookWrapper ¶
func (*BlockBook) FindDepositTxId ¶
utils
func (*BlockBook) GetAddress ¶
func (*BlockBook) GetEthAddress ¶
type BroadcastRequest ¶
type BroadcastRequest struct {
TxHex string `json:"txHex"`
}
type BscScan ¶ added in v1.1.8
type BscScan struct { Url string // contains filtered or unexported fields }
func NewBscScanWrapper ¶ added in v1.1.8
func (*BscScan) FindDepositTxId ¶ added in v1.1.8
utils
func (*BscScan) GetAddress ¶ added in v1.1.8
func (*BscScan) GetEthAddress ¶ added in v1.1.8
type EthAddr ¶
type EthAddr struct { Address string `json:"address"` Balance string `json:"balance"` ItemsOnPage int `json:"itemsOnPage"` NonTokenTxs int `json:"nonTokenTxs"` Nonce string `json:"nonce"` Page int `json:"page"` Tokens []EthTokens `json:"tokens"` TotalPages int `json:"totalPages"` Transactions []EthTx `json:"transactions"` Txs int `json:"txs"` UnconfirmedBalance string `json:"unconfirmedBalance"` UnconfirmedTxs int `json:"unconfirmedTxs"` }
type EthTx ¶
type EthTx struct { BlockHash string `json:"blockHash"` BlockHeight int `json:"blockHeight"` BlockTime int `json:"blockTime"` Confirmations int `json:"confirmations"` EthereumSpecific struct { GasLimit int `json:"gasLimit"` GasPrice string `json:"gasPrice"` GasUsed int `json:"gasUsed"` Nonce int `json:"nonce"` Status int `json:"status"` } `json:"ethereumSpecific"` Fees string `json:"fees"` TokenTransfers []struct { Decimals int `json:"decimals"` From string `json:"from"` Name string `json:"name"` Symbol string `json:"symbol"` To string `json:"to"` Token string `json:"token"` Type string `json:"type"` Value string `json:"value"` } `json:"tokenTransfers"` Txid string `json:"txid"` Value string `json:"value"` Vin []EthTxVin `json:"vin"` Vout []EthTxVout `json:"vout"` }
type Explorer ¶
type Explorer interface { GetXpub(xpub string) (response Xpub, err error) GetAddress(address string) (response Address, err error) GetEthAddress(addr string) (response EthAddr, err error) GetUtxo(xpub string, confirmed bool) (response []Utxo, err error) GetTx(txid string) (response Tx, err error) GetTxEth(txid string) (response EthTx, err error) GetFee(nBlocks string) (response Fee, err error) SendTx(rawTx string) (response string, err error) SendTxWithMessage(rawTx string) (string, error, string) FindDepositTxId(address string, amount int64) (string, error) }
type ExplorerFactory ¶
type ExplorerFactory struct{}
func NewExplorerFactory ¶
func NewExplorerFactory() *ExplorerFactory
func (*ExplorerFactory) GetExplorerByCoin ¶
func (e *ExplorerFactory) GetExplorerByCoin(coin coins.Coin) (Explorer, error)
type NulsBalanceData ¶
type NulsBroadcast ¶
type NulsCalculatedFee ¶
type NulsError ¶
type NulsError struct { Success bool `json:"success"` Data NulsErrorData `json:"data"` }
type NulsErrorData ¶
type NulsExplorer ¶
type NulsExplorer struct { Url string // contains filtered or unexported fields }
func NewNulsWrapper ¶
func NewNulsWrapper(url string) *NulsExplorer
func (*NulsExplorer) FindDepositTxId ¶
func (b *NulsExplorer) FindDepositTxId(address string, amount int64) (string, error)
utils
func (*NulsExplorer) GetAddress ¶
func (b *NulsExplorer) GetAddress(address string) (response Address, err error)
func (*NulsExplorer) GetEthAddress ¶
func (b *NulsExplorer) GetEthAddress(addr string) (response EthAddr, err error)
func (*NulsExplorer) GetFee ¶
func (b *NulsExplorer) GetFee(nBlocks string) (response Fee, err error)
func (*NulsExplorer) GetTxEth ¶
func (b *NulsExplorer) GetTxEth(txid string) (response EthTx, err error)
func (*NulsExplorer) GetUtxo ¶
func (b *NulsExplorer) GetUtxo(xpub string, confirmed bool) (response []Utxo, err error)
func (*NulsExplorer) GetXpub ¶
func (b *NulsExplorer) GetXpub(xpub string) (response Xpub, err error)
func (*NulsExplorer) SendTx ¶
func (b *NulsExplorer) SendTx(rawTx string) (response string, err error)
func (*NulsExplorer) SendTxWithMessage ¶
func (b *NulsExplorer) SendTxWithMessage(rawTx string) (string, error, string)
type NulsFeeRequest ¶
type NulsInfo ¶
type NulsInfo struct { Success bool `json:"success"` Data NulsBalanceData `json:"data"` }
api models
type NulsInfoModel ¶
type NulsTx ¶
type NulsTx struct { TxHash string `json:"txHash"` Address string `json:"address"` Type int `json:"type"` CreateTime int `json:"createTime"` Height int `json:"height"` ChainId int `json:"chainId"` AssetId int `json:"assetId"` Symbol string `json:"symbol"` Values int `json:"values"` Fee NulsFee `json:"fee"` Balance int `json:"balance"` TransferType int `json:"transferType"` Status int `json:"status"` }
type NulsTxDetail ¶
type NulsTxDetail struct { Hash string `json:"hash"` Type int `json:"type"` Time string `json:"time"` Timestamp int `json:"timestamp"` BlockHeight int `json:"blockHeight"` BlockHash string `json:"blockHash"` Remark string `json:"remark"` TransactionSignature string `json:"transactionSignature"` TxDataHex string `json:"txDataHex"` Status int `json:"status"` Size int `json:"size"` InBlockIndex int `json:"inBlockIndex"` From []NulsFrom `json:"from"` To []NulsTo `json:"to"` }
type NulsTxResponse ¶
type NulsTxResponse struct { Success bool `json:"success"` Data NulsTxDetail `json:"data"` }
type RpcRequest ¶
type RpcTxResponse ¶
type RpcTxResponse struct { JsonRpc string `json:"jsonrpc"` Id string `json:"id"` Result TxListResponse `json:"result"` }
type Status ¶
type Status struct { Backend struct { BestBlockHash string `json:"bestBlockHash"` Blocks int `json:"blocks"` Chain string `json:"chain"` Difficulty string `json:"difficulty"` Headers int `json:"headers"` ProtocolVersion string `json:"protocolVersion"` SizeOnDisk int `json:"sizeOnDisk"` Subversion string `json:"subversion"` Version string `json:"version"` } `json:"backend"` Blockbook struct { About string `json:"about"` BestHeight int `json:"bestHeight"` BuildTime string `json:"buildTime"` Coin string `json:"coin"` DbSize int `json:"dbSize"` Decimals int `json:"decimals"` GitCommit string `json:"gitCommit"` Host string `json:"host"` InSync bool `json:"inSync"` InSyncMempool bool `json:"inSyncMempool"` InitialSync bool `json:"initialSync"` LastBlockTime string `json:"lastBlockTime"` LastMempoolTime string `json:"lastMempoolTime"` MempoolSize int `json:"mempoolSize"` SyncMode bool `json:"syncMode"` Version string `json:"version"` } `json:"blockbook"` }
type TokenTransfer ¶
type Tx ¶
type Tx struct { BlockHash string `json:"blockHash"` BlockHeight int `json:"blockHeight"` BlockTime int `json:"blockTime"` Confirmations int `json:"confirmations"` Fees string `json:"fees"` Hex string `json:"hex"` LockTime int `json:"lockTime"` Txid string `json:"txid"` Value string `json:"value"` ValueIn string `json:"valueIn"` Version int `json:"version"` Vin []TxVin `json:"vin"` Vout []TxVout `json:"vout"` TokenTransfers []TokenTransfer `json:"tokenTransfers"` }
type TxListResponse ¶
type Xpub ¶
type Xpub struct { Address string `json:"address"` Balance string `json:"balance"` ItemsOnPage int `json:"itemsOnPage"` Page int `json:"page"` Tokens []Tokens `json:"tokens"` TotalPages int `json:"totalPages"` TotalReceived string `json:"totalReceived"` TotalSent string `json:"totalSent"` Transactions []Tx `json:"transactions"` Txs int `json:"txs"` UnconfirmedBalance string `json:"unconfirmedBalance"` UnconfirmedTxs int `json:"unconfirmedTxs"` UsedTokens int `json:"usedTokens"` }
Click to show internal directories.
Click to hide internal directories.