daemon

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NewBlock                  string = `new_block`
	TransactionAddedInMempool string = `transaction_added_in_mempool`
	TransactionExecuted       string = `transaction_executed`
	BlockOrdered              string = `block_ordered`
	PeerConnected             string = `peer_connected`
	PeerDisconnected          string = `peer_disconnect`
	PeerStateUpdated          string = `peer_state_updated`
)
View Source
const (
	GetVersion                       string = "get_version"
	GetInfo                          string = "get_info"
	GetHeight                        string = "get_height"
	GetTopoHeight                    string = "get_topoheight"
	GetStableHeight                  string = "get_stableheight"
	GetBlockTemplate                 string = "get_block_template"
	GetBlockAtTopoheight             string = "get_block_at_topoheight"
	GetBlocksAtHeight                string = "get_blocks_at_height"
	GetBlockByHash                   string = "get_block_by_hash"
	GetTopBlock                      string = "get_top_block"
	GetNonce                         string = "get_nonce"
	HasNonce                         string = "has_nonce"
	GetNonceAtTopoheight             string = "get_nonce_at_topoheight"
	GetBalance                       string = "get_balance"
	HasBalance                       string = "has_balance"
	GetBalanceAtTopoheight           string = "get_balance_at_topoheight"
	GetAsset                         string = "get_asset"
	GetAssets                        string = "get_assets"
	CountAssets                      string = "count_assets"
	CountTransactions                string = "count_transactions"
	CountAccounts                    string = "count_accounts"
	GetTips                          string = "get_tips"
	P2PStatus                        string = "p2p_status"
	GetDAGOrder                      string = "get_dag_order"
	SubmitBlock                      string = "submit_block"
	SubmitTransaction                string = "submit_transaction"
	GetMempool                       string = "get_mempool"
	GetTransaction                   string = "get_transaction"
	GetTransactions                  string = "get_transactions"
	GetBlocksRangeByHeight           string = "get_blocks_range_by_height"
	GetBlocksRangeByTopoheight       string = "get_blocks_range_by_topoheight"
	GetAccounts                      string = "get_accounts"
	GetAccountHistory                string = "get_account_history"
	GetAccountAssets                 string = "get_account_assets"
	GetPeers                         string = "get_peers"
	GetDevFeeThresholds              string = "get_dev_fee_thresholds"
	GetSizeOnDisk                    string = "get_size_on_disk"
	IsTxExecutedInBlock              string = "is_tx_executed_in_block"
	GetAccountRegistrationTopoheight string = "get_account_registration_topoheight"
	IsAccountRegistered              string = "is_account_registered"
	GetDifficulty                    string = "get_difficulty"
	ValidateAddress                  string = "validate_address"
	ExtractKeyFromAddress            string = "extract_key_from_address"
	CreateMinerWork                  string = "create_miner_work"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountHistory

type AccountHistory struct {
	Topoheight     uint64           `json:"topoheight"`
	BlockTimestamp uint64           `json:"block_timestamp"`
	Hash           string           `json:"hash"`
	Mining         *MiningHistory   `json:"mining"`
	Burn           *BurnHistory     `json:"burn"`
	Outgoing       *OutgoingHistory `json:"outgoing"`
	Incoming       *IncomingHistory `json:"incoming"`
	DevFee         *MiningHistory   `json:"dev_fee"`
}

type Asset

type Asset struct {
	Topoheight uint64 `json:"topoheight"`
	Decimals   int    `json:"decimals"`
}

type AssetWithData

type AssetWithData struct {
	Asset      string `json:"asset"`
	Topoheight uint64 `json:"topoheight"`
	Decimals   int    `json:"decimals"`
}

type BalanceType

type BalanceType string
var (
	BalanceInput  BalanceType = `input`
	BalanceOutput BalanceType = `output`
	BalanceBoth   BalanceType = `both`
)

type Block

type Block struct {
	BlockType            string   `json:"block_type"`
	CumulativeDifficulty string   `json:"cumulative_difficulty"`
	Difficulty           string   `json:"difficulty"`
	ExtraNonce           string   `json:"extra_nonce"`
	Hash                 string   `json:"hash"`
	Height               uint64   `json:"height"`
	Miner                string   `json:"miner"`
	Nonce                uint64   `json:"nonce"`
	Reward               *uint64  `json:"reward"` // full reward miner_reward + dev_reward
	MinerReward          *uint64  `json:"miner_reward"`
	DevReward            *uint64  `json:"dev_reward"`
	Supply               *uint64  `json:"supply"`
	Timestamp            uint64   `json:"timestamp"`
	Tips                 []string `json:"tips"`
	Topoheight           *uint64  `json:"topoheight"`
	TotalFees            *uint64  `json:"total_fees"`
	TotalSizeInBytes     uint64   `json:"total_size_in_bytes"`
	TxsHashes            []string `json:"txs_hashes"`
	Version              uint64   `json:"version"`
}

type Burn

type Burn struct {
	Asset  string `json:"asset"`
	Amount uint64 `json:"amount"`
}

type BurnHistory

type BurnHistory struct {
	Amount uint64 `json:"amount"`
}

type CallContract

type CallContract struct {
	Contract string `json:"contract"`
}

type CreateMinerWorkParams added in v0.2.9

type CreateMinerWorkParams struct {
	Template string  `json:"template"`
	Address  *string `json:"address,omitempty"`
}

type CreateMinerWorkResult added in v0.2.9

type CreateMinerWorkResult struct {
	MinerWork string `json:"miner_work"`
}

type EncryptedBalance

type EncryptedBalance struct {
	Commitment []byte `json:"commitment"`
	Handle     []byte `json:"handle"`
}

type EqProof

type EqProof struct {
	Y_0 []byte `json:"Y_0"`
	Y_1 []byte `json:"Y_1"`
	Y_2 []byte `json:"Y_2"`
	Z_R []byte `json:"z_r"`
	Z_S []byte `json:"z_s"`
	Z_X []byte `json:"z_x"`
}

type ExtractKeyFromAddressParams added in v0.2.9

type ExtractKeyFromAddressParams struct {
	Address string `json:"address"`
	TxAsHex bool   `json:"tx_as_hex"`
}

type Fee

type Fee struct {
	FeePercentage int    `json:"fee_percentage"`
	Height        uint64 `json:"height"`
}

type GetAccountsParams

type GetAccountsParams struct {
	Skip              uint64 `json:"skip"`
	Maximum           uint64 `json:"maximum"`
	MinimumTopoheight uint64 `json:"minimum_topoheight"`
	MaximumTopoheight uint64 `json:"maximum_topoheight"`
}

type GetAssetsParams

type GetAssetsParams = GetAccountsParams

type GetBalanceAtTopoheightParams

type GetBalanceAtTopoheightParams struct {
	Address    string `json:"address"`
	Asset      string `json:"asset"`
	Topoheight uint64 `json:"topoheight"`
}

type GetBalanceParams

type GetBalanceParams struct {
	Address string `json:"address"`
	Asset   string `json:"asset"`
}

type GetBalanceResult

type GetBalanceResult struct {
	Version    VersionedBalance `json:"version"`
	Topoheight uint64           `json:"topoheight"`
}

type GetBlockAtTopoheightParams

type GetBlockAtTopoheightParams struct {
	Topoheight uint64 `json:"topoheight"`
	IncludeTxs bool   `json:"include_txs"`
}

type GetBlockByHashParams

type GetBlockByHashParams struct {
	Hash       string `json:"hash"`
	IncludeTxs bool   `json:"include_txs"`
}

type GetBlockTemplateResult

type GetBlockTemplateResult struct {
	Template   string `json:"template"`
	Height     uint64 `json:"height"`
	Topoheight uint64 `json:"topoheight"`
	Difficulty string `json:"difficulty"`
}

type GetBlocksAtHeightParams

type GetBlocksAtHeightParams struct {
	Height     uint64 `json:"height"`
	IncludeTxs bool   `json:"include_txs"`
}

type GetDifficultyResult added in v0.2.9

type GetDifficultyResult struct {
	Difficulty        string `json:"difficulty"`
	Hashrate          string `json:"hashrate"`
	HashrateFormatted string `json:"hashrate_formatted"`
}

type GetHeightRangeParams

type GetHeightRangeParams struct {
	StartHeight uint64 `json:"start_height"`
	EndHeight   uint64 `json:"end_height"`
}

type GetInfoResult

type GetInfoResult struct {
	AverageBlocktime uint64 `json:"average_block_time"`
	BlockReward      uint64 `json:"block_reward"`
	BlockTimeTarget  uint64 `json:"block_time_target"`
	Difficulty       string `json:"difficulty"`
	Height           uint64 `json:"height"`
	MempoolSize      uint64 `json:"mempool_size"`
	NativeSupply     uint64 `json:"native_supply"`
	Network          string `json:"network"`
	PrunedTopoheight uint64 `json:"pruned_topoheight"`
	Stableheight     uint64 `json:"stableheight"`
	TopHash          string `json:"top_hash"`
	Topoheight       uint64 `json:"topoheight"`
	Version          string `json:"version"`
}

type GetNonceAtTopoheightParams

type GetNonceAtTopoheightParams struct {
	Address    string `json:"address"`
	Topoheight uint64 `json:"topoheight"`
}

type GetNonceResult

type GetNonceResult struct {
	Nonce              uint64  `json:"nonce"`
	PreviousTopoheight *uint64 `json:"previous_topoheight"`
	Topoheight         uint64  `json:"topoheight"`
}

type GetPeersResult

type GetPeersResult struct {
	Peers       []Peer `json:"peers"`
	TotalPeers  int    `json:"total_peers"`
	HiddenPeers int    `json:"hidden_peers"`
}

type GetTopBlockParams

type GetTopBlockParams struct {
	IncludeTxs bool `json:"include_txs"`
}

type GetTopoheightRangeParams

type GetTopoheightRangeParams struct {
	StartTopoheight uint64 `json:"start_topoheight"`
	EndTopoheight   uint64 `json:"end_topoheight"`
}

type GetTransactionsParams

type GetTransactionsParams struct {
	TxHashes []string `json:"tx_hashes"`
}

type IncomingHistory

type IncomingHistory struct {
	From string `json:"from"`
}

type IsAccountRegisteredParams added in v0.2.3

type IsAccountRegisteredParams struct {
	Address        string `json:"address"`
	InStableHeight bool   `json:"in_stable_height"`
}

type IsTxExecutedInBlockParams

type IsTxExecutedInBlockParams struct {
	TxHash    string `json:"tx_hash"`
	BlockHash string `json:"block_hash"`
}

type MiningHistory

type MiningHistory struct {
	Reward uint64 `json:"reward"`
}

type OutgoingHistory

type OutgoingHistory struct {
	To string `json:"to"`
}

type P2PStatusResult

type P2PStatusResult struct {
	BestTopoheight uint64 `json:"best_topoheight"`
	MaxPeers       uint64 `json:"max_peers"`
	OurTopoheight  uint64 `json:"our_topoheight"`
	PeerCount      uint64 `json:"peer_count"`
	PeerId         uint64 `json:"peer_id"`
	Tag            string `json:"tag"`
}

type Peer

type Peer struct {
	Id                   uint64                   `json:"id"`
	CumulativeDifficulty string                   `json:"cumulative_difficulty"`
	PrunedTopoheight     uint64                   `json:"pruned_topoheight"`
	ConnectedOn          uint64                   `json:"connected_on"`
	Height               uint64                   `json:"height"`
	LocalPort            int                      `json:"local_port"`
	TopBlockHash         string                   `json:"top_block_hash"`
	Addr                 string                   `json:"addr"`
	LastPing             uint64                   `json:"last_ping"`
	Tag                  string                   `json:"tag"`
	Topoheight           uint64                   `json:"topoheight"`
	Peers                map[string]PeerDirection `json:"peers"`
	Version              string                   `json:"version"`
}

type PeerDirection

type PeerDirection string
const (
	PeerIn   PeerDirection = "In"
	PeerOut  PeerDirection = "Out"
	PeerBoth PeerDirection = "Both"
)

type Proof

type Proof struct {
	Y_0 []byte `json:"Y_0"`
	Y_1 []byte `json:"Y_1"`
	Z_R []byte `json:"z_r"`
	Z_X []byte `json:"z_x"`
}

type RPC

type RPC struct {
	Client *jrpc2.Client
	// contains filtered or unexported fields
}

func NewRPC

func NewRPC(ctx context.Context, url string) (*RPC, error)

func (*RPC) CountAccounts

func (d *RPC) CountAccounts() (count uint64, err error)

func (*RPC) CountAssets

func (d *RPC) CountAssets() (count uint64, err error)

func (*RPC) CountTransactions

func (d *RPC) CountTransactions() (count uint64, err error)

func (*RPC) CreateMinerWork added in v0.2.9

func (d *RPC) CreateMinerWork(params CreateMinerWorkParams) (result CreateMinerWorkResult, err error)

func (*RPC) ExtractKeyFromAddress added in v0.2.9

func (d *RPC) ExtractKeyFromAddress(params ExtractKeyFromAddressParams) (key interface{}, err error)

func (*RPC) GetAccountAssets

func (d *RPC) GetAccountAssets(addr string) (assets []string, err error)

func (*RPC) GetAccountHistory

func (d *RPC) GetAccountHistory(addr string) (history []AccountHistory, err error)

func (*RPC) GetAccountRegistrationTopoheight added in v0.2.1

func (d *RPC) GetAccountRegistrationTopoheight(addr string) (topoheight uint64, err error)

func (*RPC) GetAccounts

func (d *RPC) GetAccounts(params GetAccountsParams) (addresses []string, err error)

func (*RPC) GetAsset

func (d *RPC) GetAsset(assetId string) (asset Asset, err error)

func (*RPC) GetAssets

func (d *RPC) GetAssets(params GetAssetsParams) (assets []AssetWithData, err error)

func (*RPC) GetBalance

func (d *RPC) GetBalance(params GetBalanceParams) (balance GetBalanceResult, err error)

func (*RPC) GetBalanceAtTopoheight

func (d *RPC) GetBalanceAtTopoheight(params GetBalanceAtTopoheightParams) (balance VersionedBalance, err error)

func (*RPC) GetBlockAtTopoheight

func (d *RPC) GetBlockAtTopoheight(params GetBlockAtTopoheightParams) (block Block, err error)

func (*RPC) GetBlockByHash

func (d *RPC) GetBlockByHash(params GetBlockByHashParams) (block Block, err error)

func (*RPC) GetBlockTemplate

func (d *RPC) GetBlockTemplate(addr string) (result GetBlockTemplateResult, err error)

func (*RPC) GetBlocksAtHeight

func (d *RPC) GetBlocksAtHeight(params GetBlocksAtHeightParams) (blocks []Block, err error)

func (*RPC) GetBlocksRangeByHeight

func (d *RPC) GetBlocksRangeByHeight(params GetHeightRangeParams) (blocks []Block, err error)

func (*RPC) GetBlocksRangeByTopoheight

func (d *RPC) GetBlocksRangeByTopoheight(params GetTopoheightRangeParams) (blocks []Block, err error)

func (*RPC) GetDAGOrder

func (d *RPC) GetDAGOrder(params GetTopoheightRangeParams) (hashes []string, err error)

func (*RPC) GetDevFeeThresholds

func (d *RPC) GetDevFeeThresholds() (fees []Fee, err error)

func (*RPC) GetDifficulty added in v0.2.9

func (d *RPC) GetDifficulty() (result GetDifficultyResult, err error)

func (*RPC) GetHeight

func (d *RPC) GetHeight() (height uint64, err error)

func (*RPC) GetInfo

func (d *RPC) GetInfo() (result GetInfoResult, err error)

func (*RPC) GetMempool

func (d *RPC) GetMempool() (txs []Transaction, err error)

func (*RPC) GetNonce

func (d *RPC) GetNonce(addr string) (nonce GetNonceResult, err error)

func (*RPC) GetNonceAtTopoheight

func (d *RPC) GetNonceAtTopoheight(params GetNonceAtTopoheightParams) (nonce VersionedNonce, err error)

func (*RPC) GetPeers

func (d *RPC) GetPeers() (result GetPeersResult, err error)

func (*RPC) GetSizeOnDisk

func (d *RPC) GetSizeOnDisk() (sizeOnDisk SizeOnDisk, err error)

func (*RPC) GetStableheight

func (d *RPC) GetStableheight() (stableheight uint64, err error)

func (*RPC) GetTips

func (d *RPC) GetTips() (tips []string, err error)

func (*RPC) GetTopBlock

func (d *RPC) GetTopBlock(params GetTopBlockParams) (block Block, err error)

func (*RPC) GetTopoheight

func (d *RPC) GetTopoheight() (topoheight uint64, err error)

func (*RPC) GetTransaction

func (d *RPC) GetTransaction(hash string) (tx Transaction, err error)

func (*RPC) GetTransactions

func (d *RPC) GetTransactions(params GetTransactionsParams) (txs []Transaction, err error)

func (*RPC) GetVersion

func (d *RPC) GetVersion() (version string, err error)

func (*RPC) HasBalance

func (d *RPC) HasBalance(params GetBalanceParams) (hasBalance bool, err error)

func (*RPC) HasNonce

func (d *RPC) HasNonce(addr string) (hasNonce bool, err error)

func (*RPC) IsAccountRegistered added in v0.2.3

func (d *RPC) IsAccountRegistered(params IsAccountRegisteredParams) (exists bool, err error)

func (*RPC) IsTxExecutedInBlock

func (d *RPC) IsTxExecutedInBlock(params IsTxExecutedInBlockParams) (executed bool, err error)

func (*RPC) P2PStatus

func (d *RPC) P2PStatus() (status P2PStatusResult, err error)

func (*RPC) SubmitBlock

func (d *RPC) SubmitBlock(params SubmitBlockParams) (result bool, err error)

func (*RPC) SubmitTransaction

func (d *RPC) SubmitTransaction(data string) (result bool, err error)

func (*RPC) ValidateAddress added in v0.2.9

func (d *RPC) ValidateAddress(params ValidateAddressParams) (valid bool, err error)

type Reference

type Reference struct {
	Hash       string `json:"hash"`
	Topoheight uint64 `json:"topoheight"`
}

type SizeOnDisk

type SizeOnDisk struct {
	SizeBytes     uint64 `json:"size_bytes"`
	SizeFormatted string `json:"size_formatted"`
}

type SourceCommitment

type SourceCommitment struct {
	Commitment []byte  `json:"commitment"`
	Proof      EqProof `json:"proof"`
	Asset      string  `json:"asset"`
}

type SubmitBlockParams added in v0.2.9

type SubmitBlockParams struct {
	BlockTemplate string  `json:"block_template"`
	MinerWork     *string `json:"miner_work,omitempty"`
}

type Transaction

type Transaction struct {
	Blocks            []string           `json:"blocks"`
	Hash              string             `json:"hash"`
	Data              TransactionData    `json:"data"`
	Fee               uint64             `json:"fee"`
	Nonce             uint64             `json:"nonce"`
	Source            string             `json:"source"`
	Reference         Reference          `json:"reference"`
	SourceCommitments []SourceCommitment `json:"source_commitments"`
	RangeProof        []byte             `json:"range_proof"`
	Signature         string             `json:"signature"`
	ExecutedInBlock   *string            `json:"executed_in_block"`
	Version           uint64             `json:"version"`
	FirstSeen         *uint64            `json:"first_seen"`
	InMempool         bool               `json:"in_mempool"`
}

type TransactionData

type TransactionData struct {
	Transfers []Transfer `json:"transfers"`
	Burn      *Burn      `json:"burn"`
}

type TransactionExecutedResult

type TransactionExecutedResult struct {
	BlockHash  string `json:"block_hash"`
	Topoheight uint64 `json:"topoheight"`
	TxHash     string `json:"tx_hash"`
}

type Transfer

type Transfer struct {
	Asset           string  `json:"asset"`
	ExtraData       *[]byte `json:"extra_data"`
	Destination     string  `json:"destination"`
	Commitment      []byte  `json:"commitment"`
	SenderHandle    []byte  `json:"sender_handle"`
	ReceiverHandle  []byte  `json:"receiver_handle"`
	CTValidityProof Proof   `json:"ct_validity_proof"`
}

type ValidateAddressParams added in v0.2.9

type ValidateAddressParams struct {
	Address         string `json:"address"`
	AllowIntegrated bool   `json:"allow_integrated"`
}

type VersionedBalance

type VersionedBalance struct {
	BalanceType        BalanceType       `json:"balance_type"`
	FinalBalance       EncryptedBalance  `json:"final_balance"`
	OutputBalance      *EncryptedBalance `json:"output_balance"`
	PreviousTopoheight *uint64           `json:"previous_topoheight"`
}

type VersionedNonce added in v0.2.11

type VersionedNonce struct {
	Nonce              uint64  `json:"nonce"`
	PreviousTopoheight *uint64 `json:"previous_topoheight"`
}

type WebSocket

type WebSocket struct {
	Prefix string
	WS     *rpc.WebSocket
}

func NewWebSocket

func NewWebSocket(endpoint string) (*WebSocket, error)

func (*WebSocket) BlockOrderedChannel added in v0.2.7

func (w *WebSocket) BlockOrderedChannel() (chan Block, chan error, error)

func (*WebSocket) BlockOrderedFunc

func (w *WebSocket) BlockOrderedFunc(onData func(Block, error)) error

func (*WebSocket) Close

func (w *WebSocket) Close() error

func (*WebSocket) CloseEvent

func (w *WebSocket) CloseEvent(event string) error

func (*WebSocket) ConnectionErr added in v0.2.8

func (w *WebSocket) ConnectionErr() chan error

func (*WebSocket) CountAccounts

func (w *WebSocket) CountAccounts() (count uint64, err error)

func (*WebSocket) CountAssets

func (w *WebSocket) CountAssets() (count uint64, err error)

func (*WebSocket) CountTransactions

func (w *WebSocket) CountTransactions() (count uint64, err error)

func (*WebSocket) CreateMinerWork added in v0.2.9

func (w *WebSocket) CreateMinerWork(params CreateMinerWorkParams) (result CreateMinerWorkResult, err error)

func (*WebSocket) ExtractKeyFromAddress added in v0.2.9

func (w *WebSocket) ExtractKeyFromAddress(params ExtractKeyFromAddressParams) (key interface{}, err error)

func (*WebSocket) GetAccountAssets

func (w *WebSocket) GetAccountAssets(addr string) (assets []string, err error)

func (*WebSocket) GetAccountHistory

func (w *WebSocket) GetAccountHistory(addr string) (history []AccountHistory, err error)

func (*WebSocket) GetAccountRegistrationTopoheight added in v0.2.1

func (w *WebSocket) GetAccountRegistrationTopoheight(addr string) (topoheight uint64, err error)

func (*WebSocket) GetAccounts

func (w *WebSocket) GetAccounts(params GetAccountsParams) (addresses []string, err error)

func (*WebSocket) GetAsset

func (w *WebSocket) GetAsset(assetId string) (asset Asset, err error)

func (*WebSocket) GetAssets

func (w *WebSocket) GetAssets(params GetAssetsParams) (assets []AssetWithData, err error)

func (*WebSocket) GetBalance

func (w *WebSocket) GetBalance(params GetBalanceParams) (balance GetBalanceResult, err error)

func (*WebSocket) GetBalanceAtTopoheight

func (w *WebSocket) GetBalanceAtTopoheight(params GetBalanceAtTopoheightParams) (balance VersionedBalance, err error)

func (*WebSocket) GetBlockAtTopoheight

func (w *WebSocket) GetBlockAtTopoheight(params GetBlockAtTopoheightParams) (block Block, err error)

func (*WebSocket) GetBlockByHash

func (w *WebSocket) GetBlockByHash(params GetBlockByHashParams) (block Block, err error)

func (*WebSocket) GetBlockTemplate

func (w *WebSocket) GetBlockTemplate(addr string) (result GetBlockTemplateResult, err error)

func (*WebSocket) GetBlocksAtHeight

func (w *WebSocket) GetBlocksAtHeight(params GetBlockAtTopoheightParams) (blocks []Block, err error)

func (*WebSocket) GetBlocksRangeByHeight

func (w *WebSocket) GetBlocksRangeByHeight(params GetHeightRangeParams) (blocks []Block, err error)

func (*WebSocket) GetBlocksRangeByTopoheight

func (w *WebSocket) GetBlocksRangeByTopoheight(params GetTopoheightRangeParams) (blocks []Block, err error)

func (*WebSocket) GetDAGOrder

func (w *WebSocket) GetDAGOrder(params GetTopoheightRangeParams) (hashes []string, err error)

func (*WebSocket) GetDevFeeThresholds

func (w *WebSocket) GetDevFeeThresholds() (fees []Fee, err error)

func (*WebSocket) GetDifficulty added in v0.2.9

func (w *WebSocket) GetDifficulty() (result GetDifficultyResult, err error)

func (*WebSocket) GetHeight

func (w *WebSocket) GetHeight() (height uint64, err error)

func (*WebSocket) GetInfo

func (w *WebSocket) GetInfo() (result GetInfoResult, err error)

func (*WebSocket) GetMempool

func (w *WebSocket) GetMempool() (txs []Transaction, err error)

func (*WebSocket) GetNonce

func (w *WebSocket) GetNonce(addr string) (nonce GetNonceResult, err error)

func (*WebSocket) GetNonceAtTopoheight

func (w *WebSocket) GetNonceAtTopoheight(params GetNonceAtTopoheightParams) (nonce VersionedNonce, err error)

func (*WebSocket) GetPeers

func (w *WebSocket) GetPeers() (result GetPeersResult, err error)

func (*WebSocket) GetSizeOnDisk

func (w *WebSocket) GetSizeOnDisk() (sizeOnDisk SizeOnDisk, err error)

func (*WebSocket) GetStableheight

func (w *WebSocket) GetStableheight() (stableheight uint64, err error)

func (*WebSocket) GetTips

func (w *WebSocket) GetTips() (tips []string, err error)

func (*WebSocket) GetTopBlock

func (w *WebSocket) GetTopBlock(params GetTopBlockParams) (block Block, err error)

func (*WebSocket) GetTopoheight

func (w *WebSocket) GetTopoheight() (topoheight uint64, err error)

func (*WebSocket) GetTransaction

func (w *WebSocket) GetTransaction(hash string) (tx Transaction, err error)

func (*WebSocket) GetTransactions

func (w *WebSocket) GetTransactions(params GetTransactionsParams) (txs []Transaction, err error)

func (*WebSocket) GetVersion

func (w *WebSocket) GetVersion() (version string, err error)

func (*WebSocket) HasBalance

func (w *WebSocket) HasBalance(params GetBalanceParams) (hasBalance bool, err error)

func (*WebSocket) HasNonce

func (w *WebSocket) HasNonce(addr string) (hasNonce bool, err error)

func (*WebSocket) IsAccountRegistered added in v0.2.3

func (w *WebSocket) IsAccountRegistered(params IsAccountRegisteredParams) (exists bool, err error)

func (*WebSocket) IsTxExecutedInBlock

func (w *WebSocket) IsTxExecutedInBlock(params IsTxExecutedInBlockParams) (executed bool, err error)

func (*WebSocket) NewBlockChannel added in v0.2.7

func (w *WebSocket) NewBlockChannel() (chan Block, chan error, error)

func (*WebSocket) NewBlockFunc

func (w *WebSocket) NewBlockFunc(onData func(Block, error)) error

func (*WebSocket) P2PStatus

func (w *WebSocket) P2PStatus() (status P2PStatusResult, err error)

func (*WebSocket) PeerConnectedChannel added in v0.2.7

func (w *WebSocket) PeerConnectedChannel() (chan Peer, chan error, error)

func (*WebSocket) PeerConnectedFunc

func (w *WebSocket) PeerConnectedFunc(onData func(Peer, error)) error

func (*WebSocket) PeerDisconnectedChannel added in v0.2.7

func (w *WebSocket) PeerDisconnectedChannel() (chan uint64, chan error, error)

func (*WebSocket) PeerDisconnectedFunc

func (w *WebSocket) PeerDisconnectedFunc(onData func(uint64, error)) error

func (*WebSocket) PeerStateUpdatedChannel added in v0.2.7

func (w *WebSocket) PeerStateUpdatedChannel() (chan Peer, chan error, error)

func (*WebSocket) PeerStateUpdatedFunc

func (w *WebSocket) PeerStateUpdatedFunc(onData func(Peer, error)) error

func (*WebSocket) SubmitBlock

func (w *WebSocket) SubmitBlock(params SubmitBlockParams) (result bool, err error)

func (*WebSocket) SubmitTransaction

func (w *WebSocket) SubmitTransaction(hexData string) (result bool, err error)

func (*WebSocket) TransactionAddedInMempoolChannel added in v0.2.7

func (w *WebSocket) TransactionAddedInMempoolChannel() (chan Transaction, chan error, error)

func (*WebSocket) TransactionAddedInMempoolFunc

func (w *WebSocket) TransactionAddedInMempoolFunc(onData func(Transaction, error)) error

func (*WebSocket) TransactionExecutedChannel added in v0.2.7

func (w *WebSocket) TransactionExecutedChannel() (chan TransactionExecutedResult, chan error, error)

func (*WebSocket) TransactionExecutedFunc

func (w *WebSocket) TransactionExecutedFunc(onData func(TransactionExecutedResult, error)) error

func (*WebSocket) ValidateAddress added in v0.2.9

func (w *WebSocket) ValidateAddress(params ValidateAddressParams) (valid bool, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL