Documentation
¶
Index ¶
- Constants
- Variables
- func AuxHelp(param map[string]interface{}) map[string]interface{}
- func CreateAuxBlock(param map[string]interface{}) map[string]interface{}
- func GenerateAuxBlock(addr string) (*ledger.Block, string, bool)
- func GetAssetByHash(param map[string]interface{}) map[string]interface{}
- func GetBalanceByAddr(param map[string]interface{}) map[string]interface{}
- func GetBalanceByAsset(param map[string]interface{}) map[string]interface{}
- func GetBlockByHash(param map[string]interface{}) map[string]interface{}
- func GetBlockByHeight(param map[string]interface{}) map[string]interface{}
- func GetBlockHash(param map[string]interface{}) map[string]interface{}
- func GetBlockHeight(param map[string]interface{}) map[string]interface{}
- func GetBlockTransactions(block *ledger.Block) interface{}
- func GetConnectionCount(param map[string]interface{}) map[string]interface{}
- func GetCurrentHeight(param map[string]interface{}) map[string]interface{}
- func GetInfo(param map[string]interface{}) map[string]interface{}
- func GetNeighbors(param map[string]interface{}) map[string]interface{}
- func GetNodeState(param map[string]interface{}) map[string]interface{}
- func GetRawTransaction(param map[string]interface{}) map[string]interface{}
- func GetTransactionByHash(param map[string]interface{}) map[string]interface{}
- func GetTransactionPool(param map[string]interface{}) map[string]interface{}
- func GetTransactionsByHeight(param map[string]interface{}) map[string]interface{}
- func GetUnspendOutput(param map[string]interface{}) map[string]interface{}
- func GetUnspends(param map[string]interface{}) map[string]interface{}
- func ManualMining(param map[string]interface{}) map[string]interface{}
- func ResponsePack(errCode ErrCode, result interface{}) map[string]interface{}
- func SendRawTransaction(param map[string]interface{}) map[string]interface{}
- func SetLogLevel(param map[string]interface{}) map[string]interface{}
- func SubmitAuxBlock(param map[string]interface{}) map[string]interface{}
- func SubmitBlock(param map[string]interface{}) map[string]interface{}
- func ToggleMining(param map[string]interface{}) map[string]interface{}
- func VerifyAndSendTx(txn *tx.Transaction) ErrCode
- type AmountMap
- type AuxInfo
- type BalanceTxInputInfo
- type BlockHead
- type BlockInfo
- type CoinbaseInfo
- type NodeInfo
- type PayloadInfo
- type ProgramInfo
- type RegisterAssetInfo
- type SideMiningInfo
- type Transactions
- type TxAttributeInfo
- type TxoutputInfo
- type TxoutputMap
- type UTXOTxInputInfo
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
View Source
var PreTransactionCount int
Functions ¶
func CreateAuxBlock ¶
func GetAssetByHash ¶
Asset
func GetBalanceByAddr ¶
func GetBalanceByAsset ¶
func GetBlockByHash ¶
func GetBlockByHeight ¶
func GetBlockHash ¶
func GetBlockHeight ¶
func GetBlockTransactions ¶
func GetConnectionCount ¶
func GetCurrentHeight ¶
Block
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 ManualMining ¶
func ResponsePack ¶
func ResponsePack(errCode ErrCode, result interface{}) map[string]interface{}
func SendRawTransaction ¶
func SetLogLevel ¶
func SubmitAuxBlock ¶
func SubmitBlock ¶
A JSON example for submitblock method as following:
{"jsonrpc": "2.0", "method": "submitblock", "params": ["raw block in hex"], "id": 0}
func ToggleMining ¶
func VerifyAndSendTx ¶
func VerifyAndSendTx(txn *tx.Transaction) ErrCode
Types ¶
type BalanceTxInputInfo ¶
type BlockInfo ¶
type BlockInfo struct {
Hash string
BlockData *BlockHead
Transactions []*Transactions
Confirmations uint32
MinerInfo string
}
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 string // node's version
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
Mining bool // Is this node mining or not
}
type PayloadInfo ¶
type PayloadInfo interface{}
func TransPayloadToHex ¶
func TransPayloadToHex(p Payload) PayloadInfo
type ProgramInfo ¶
type RegisterAssetInfo ¶
type SideMiningInfo ¶
type SideMiningInfo struct {
SideBlockHash string
}
type Transactions ¶
type Transactions struct {
TxType TransactionType
PayloadVersion byte
Payload PayloadInfo
Attributes []TxAttributeInfo
UTXOInputs []UTXOTxInputInfo
BalanceInputs []BalanceTxInputInfo
Outputs []TxoutputInfo
LockTime uint32
Programs []ProgramInfo
AssetOutputs []TxoutputMap
AssetInputAmount []AmountMap
AssetOutputAmount []AmountMap
Timestamp uint32 `json:",omitempty"`
Confirmations uint32 `json:",omitempty"`
TxSize uint32 `json:",omitempty"`
Hash string
}
func TransArrayByteToHexString ¶
func TransArrayByteToHexString(ptx *tx.Transaction) *Transactions
type TxAttributeInfo ¶
type TxAttributeInfo struct {
Usage TransactionAttributeUsage
Data string
}
type TxoutputInfo ¶
type TxoutputMap ¶
type TxoutputMap struct {
Key Uint256
Txout []TxoutputInfo
}
Click to show internal directories.
Click to hide internal directories.