Documentation
¶
Index ¶
- Constants
- Variables
- func AuxHelp(param Params) map[string]interface{}
- func CreateAuxBlock(param Params) map[string]interface{}
- func DiscreteMining(param Params) map[string]interface{}
- func FromReversedString(reversed string) ([]byte, error)
- func GenerateAuxBlock(addr string) (*Block, string, bool)
- func GetArbitratorGroupByHeight(param Params) map[string]interface{}
- func GetAssetByHash(param Params) map[string]interface{}
- func GetBalanceByAddr(param Params) map[string]interface{}
- func GetBalanceByAsset(param Params) map[string]interface{}
- func GetBestBlockHash(param Params) map[string]interface{}
- func GetBlockByHash(param Params) map[string]interface{}
- func GetBlockByHeight(param Params) map[string]interface{}
- func GetBlockCount(param Params) map[string]interface{}
- func GetBlockHash(param Params) map[string]interface{}
- func GetBlockHeight(param Params) map[string]interface{}
- func GetBlockTransactions(block *Block) interface{}
- func GetConnectionCount(param Params) map[string]interface{}
- func GetInfo(param Params) map[string]interface{}
- func GetNeighbors(param Params) map[string]interface{}
- func GetNodeState(param Params) map[string]interface{}
- func GetRawTransaction(param Params) map[string]interface{}
- func GetTransactionByHash(param Params) map[string]interface{}
- func GetTransactionPool(param Params) map[string]interface{}
- func GetTransactionsByHeight(param Params) map[string]interface{}
- func GetUnspendOutput(param Params) map[string]interface{}
- func GetUnspends(param Params) map[string]interface{}
- func ResponsePack(errCode ErrCode, result interface{}) map[string]interface{}
- func SendRawTransaction(param Params) map[string]interface{}
- func SetLogLevel(param Params) map[string]interface{}
- func SubmitAuxBlock(param Params) map[string]interface{}
- func ToReversedString(hash Uint256) string
- func ToggleMining(param Params) map[string]interface{}
- func VerifyAndSendTx(txn *Transaction) ErrCode
- type ArbitratorGroupInfo
- type AttributeInfo
- type BlockInfo
- type CoinbaseInfo
- type InputInfo
- type NodeInfo
- type OutputInfo
- type Params
- type PayloadInfo
- type ProgramInfo
- type RegisterAssetInfo
- type SideMiningInfo
- type TransactionInfo
- type TransferCrossChainAssetInfo
- type WithdrawAssetInfo
Constants ¶
View Source
const (
AUXBLOCK_GENERATED_INTERVAL_SECONDS = 60
)
View Source
const TlsPort = 443
Variables ¶
View Source
var LocalPow *pow.PowService
View Source
var NodeForServers Noder
View Source
var PreChainHeight uint64
View Source
var PreTime int64
Functions ¶
func CreateAuxBlock ¶
func DiscreteMining ¶
func FromReversedString ¶
func GenerateAuxBlock ¶
func GetBalanceByAddr ¶
func GetBalanceByAsset ¶
func GetBestBlockHash ¶
func GetBlockByHash ¶
func GetBlockByHeight ¶
func GetBlockCount ¶
func GetBlockHash ¶
func GetBlockHeight ¶
func GetBlockTransactions ¶
func GetBlockTransactions(block *Block) interface{}
func GetConnectionCount ¶
func GetNeighbors ¶
func GetNodeState ¶
func GetRawTransaction ¶
Input JSON string examples for getblock method as following:
func GetTransactionByHash ¶
Transaction
func GetTransactionPool ¶
func GetTransactionsByHeight ¶
func GetUnspendOutput ¶
func GetUnspends ¶
func ResponsePack ¶
func ResponsePack(errCode ErrCode, result interface{}) map[string]interface{}
func SendRawTransaction ¶
func SetLogLevel ¶
func SubmitAuxBlock ¶
func ToReversedString ¶
func ToReversedString(hash Uint256) string
func ToggleMining ¶
func VerifyAndSendTx ¶
func VerifyAndSendTx(txn *Transaction) ErrCode
Types ¶
type ArbitratorGroupInfo ¶
type AttributeInfo ¶
type AttributeInfo struct {
Usage AttributeUsage `json:"usage"`
Data string `json:"data"`
}
type BlockInfo ¶
type BlockInfo struct {
Hash string `json:"hash"`
Confirmations uint32 `json:"confirmations"`
StrippedSize uint32 `json:"strippedsize"`
Size uint32 `json:"size"`
Weight uint32 `json:"weight"`
Height uint32 `json:"height"`
Version uint32 `json:"version"`
VersionHex string `json:"versionhex"`
MerkleRoot string `json:"merkleroot"`
Tx []interface{} `json:"tx"`
Time uint32 `json:"time"`
MedianTime uint32 `json:"mediantime"`
Nonce uint32 `json:"nonce"`
Bits uint32 `json:"bits"`
Difficulty string `json:"difficulty"`
ChainWork string `json:"chainwork"`
PreviousBlockHash string `json:"previousblockhash"`
NextBlockHash string `json:"nextblockhash"`
AuxPow string `json:"auxpow"`
}
func GetBlockInfo ¶
type CoinbaseInfo ¶
type CoinbaseInfo struct {
CoinbaseData string
}
type NodeInfo ¶
type NodeInfo struct {
State uint // NodeForServers status
Port uint16 // The nodes's port
ID uint64 // The nodes's id
Time int64
Version uint32 // The network protocol the NodeForServers used
Services uint64 // The services the NodeForServers supplied
Relay bool // The relay capability of the NodeForServers (merge into capbility flag)
Height uint64 // The NodeForServers latest block height
TxnCnt uint64 // The transactions be transmit by this NodeForServers
RxTxnCnt uint64 // The transaction received by this NodeForServers
}
type OutputInfo ¶
type PayloadInfo ¶
type PayloadInfo interface{}
type ProgramInfo ¶
type RegisterAssetInfo ¶
type SideMiningInfo ¶
type SideMiningInfo struct {
SideBlockHash string
}
type TransactionInfo ¶
type TransactionInfo struct {
TxId string `json:"txid"`
Hash string `json:"hash"`
Size uint32 `json:"size"`
VSize uint32 `json:"vsize"`
Version uint32 `json:"version"`
LockTime uint32 `json:"locktime"`
Inputs []InputInfo `json:"vin"`
Outputs []OutputInfo `json:"vout"`
BlockHash string `json:"blockhash"`
Confirmations uint32 `json:"confirmations"`
Time uint32 `json:"time"`
BlockTime uint32 `json:"blocktime"`
TxType TransactionType `json:"type"`
PayloadVersion byte `json:"payloadversion"`
Payload PayloadInfo `json:"payload"`
Attributes []AttributeInfo `json:"attributes"`
Programs []ProgramInfo `json:"programs"`
}
func GetTransactionInfo ¶
func GetTransactionInfo(header *Header, tx *Transaction) *TransactionInfo
type WithdrawAssetInfo ¶
type WithdrawAssetInfo struct {
BlockHeight uint32
}
Click to show internal directories.
Click to hide internal directories.