Documentation ¶
Index ¶
- Constants
- type AuthTransport
- type BalanceChangedResult
- type BuildTransactionParams
- type BuildTransactionResult
- type Coinbase
- type EstimateFeesParams
- type FeeBuilder
- type GetAddressParams
- type GetAssetPrecisionParams
- type GetBalanceParams
- type GetTransactionParams
- type Incoming
- type ListTransactionsParams
- type Outgoing
- type RPC
- func (d *RPC) BuildTransaction(params BuildTransactionParams) (result BuildTransactionResult, err error)
- func (d *RPC) EstimateFees(params EstimateFeesParams) (amount uint64, err error)
- func (d *RPC) GetAddress(params GetAddressParams) (address string, err error)
- func (d *RPC) GetAssetPrecision(params GetAssetPrecisionParams) (decimals int, err error)
- func (d *RPC) GetBalance(params GetBalanceParams) (balance uint64, err error)
- func (d *RPC) GetNetwork() (network string, err error)
- func (d *RPC) GetNonce() (nonce uint64, err error)
- func (d *RPC) GetTopoheight() (topoheight uint64, err error)
- func (d *RPC) GetTrackedAssets() (assets []string, err error)
- func (d *RPC) GetTransaction(params GetTransactionParams) (transaction TransactionEntry, err error)
- func (d *RPC) GetVersion() (version string, err error)
- func (d *RPC) HasBalance(params GetBalanceParams) (exists bool, err error)
- func (d *RPC) IsOnline() (online bool, err error)
- func (d *RPC) ListTransactions(params ListTransactionsParams) (txs []TransactionEntry, err error)
- func (d *RPC) Rescan(params RescanParams) (success bool, err error)
- func (d *RPC) SetOfflineMode() (success bool, err error)
- func (d *RPC) SetOnlineMode() (success bool, err error)
- func (d *RPC) SignData(data interface{}) (signature string, err error)
- func (d *RPC) SplitAddress(params SplitAddressParams) (result SplitAddressResult, err error)
- type RescanParams
- type SplitAddressParams
- type SplitAddressResult
- type TransactionData
- type TransactionEntry
- type Transfer
- type TransferIn
- type TransferOut
- type WebSocket
- func (w *WebSocket) BalanceChangedChannel() (chan BalanceChangedResult, chan error, error)
- func (w *WebSocket) BalanceChangedFunc(onData func(BalanceChangedResult, error)) error
- func (w *WebSocket) BuildTransaction(params BuildTransactionParams) (result BuildTransactionResult, err error)
- func (w *WebSocket) Close() error
- func (w *WebSocket) CloseEvent(event string) error
- func (w *WebSocket) ConnectionErr() chan error
- func (w *WebSocket) EstimateFees(params EstimateFeesParams) (amount uint64, err error)
- func (w *WebSocket) GetAddress(params GetAddressParams) (address string, err error)
- func (w *WebSocket) GetAssetPrecision(params GetAssetPrecisionParams) (decimals int, err error)
- func (w *WebSocket) GetBalance(params GetBalanceParams) (balance uint64, err error)
- func (w *WebSocket) GetNetwork() (network string, err error)
- func (w *WebSocket) GetNonce() (nonce uint64, err error)
- func (w *WebSocket) GetTopoheight() (topoheight uint64, err error)
- func (w *WebSocket) GetTrackedAssets() (assets []string, err error)
- func (w *WebSocket) GetTransaction(params GetTransactionParams) (transaction TransactionEntry, err error)
- func (w *WebSocket) GetVersion() (version string, err error)
- func (w *WebSocket) HasBalance(params GetBalanceParams) (exists bool, err error)
- func (w *WebSocket) IsOnline() (online bool, err error)
- func (w *WebSocket) ListTransactions(params ListTransactionsParams) (txs []TransactionEntry, err error)
- func (w *WebSocket) NewAssetChannel() (chan daemon.AssetWithData, chan error, error)
- func (w *WebSocket) NewAssetFunc(onData func(daemon.AssetWithData, error)) error
- func (w *WebSocket) NewTopoheightChannel() (chan uint64, chan error, error)
- func (w *WebSocket) NewTopoheightFunc(onData func(uint64, error)) error
- func (w *WebSocket) NewTransactionChannel() (chan TransactionEntry, chan error, error)
- func (w *WebSocket) NewTransactionFunc(onData func(TransactionEntry, error)) error
- func (w *WebSocket) OfflineChannel() (chan bool, chan error, error)
- func (w *WebSocket) OfflineFunc(onData func()) error
- func (w *WebSocket) OnlineChannel() (chan bool, chan error, error)
- func (w *WebSocket) OnlineFunc(onData func()) error
- func (w *WebSocket) Rescan(params RescanParams) (success bool, err error)
- func (w *WebSocket) RescanChannel() (chan uint64, chan error, error)
- func (w *WebSocket) RescanFunc(onData func(uint64, error)) error
- func (w *WebSocket) SetOfflineMode() (success bool, err error)
- func (w *WebSocket) SetOnlineMode() (success bool, err error)
- func (w *WebSocket) SignData(data interface{}) (signature string, err error)
- func (w *WebSocket) SplitAddress(params SplitAddressParams) (result SplitAddressResult, err error)
Constants ¶
View Source
const ( GetVersion string = "get_version" GetNetwork string = "get_network" GetNonce string = "get_nonce" GetTopoheight string = "get_topoheight" GetAddress string = "get_address" SplitAddress string = "split_address" Rescan string = "rescan" GetBalance string = "get_balance" HasBalance string = "has_balance" GetTrackedAssets string = "get_tracked_assets" GetAssetPrecision string = "get_asset_precision" GetTransaction string = "get_transaction" BuildTransaction string = "build_transaction" ListTransactions string = "list_transactions" IsOnline string = "is_online" SetOnlineMode string = "set_online_mode" SetOfflineMode string = "set_offline_mode" SignData string = "sign_data" EstimateFees string = "estimate_fees" // Interact with wallet encrypted database GetMatchingKeys string = "get_matching_keys" GetValueFromKey string = "get_value_from_key" Store string = "store" Delete string = "delete" HasKey string = "has_key" QueryDB string = "query_db" )
Methods
View Source
const ( NewTopoheight string = `new_topo_height` NewAsset string = `new_asset` NewTransaction string = `new_transaction` BalanceChanged string = `balance_changed` //Rescan string = `rescan` Online string = `online` Offline string = `offline` )
Events
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTransport ¶
type AuthTransport struct { Transport http.RoundTripper Username string Password string }
type BalanceChangedResult ¶ added in v0.2.6
type BuildTransactionParams ¶
type BuildTransactionParams struct { Transfers []TransferOut `json:"transfers"` Burn *daemon.Burn `json:"burn,omitempty"` Broadcast bool `json:"broadcast"` TxAsHex bool `json:"tx_as_hex"` Fee *FeeBuilder `json:"fee,omitempty"` }
type BuildTransactionResult ¶
type BuildTransactionResult struct { Data TransactionData `json:"data"` Fee uint64 `json:"fee"` Hash string `json:"hash"` Nonce uint64 `json:"nonce"` RangeProof []byte `json:"range_proof"` Reference daemon.Reference `json:"reference"` Signature string `json:"signature"` Source []byte `json:"source"` SourceCommitments []daemon.SourceCommitment `json:"source_commitments"` TxAsHex string `json:"tx_as_hex"` Version uint64 `json:"version"` }
type EstimateFeesParams ¶
type EstimateFeesParams struct { Transfers *[]TransferOut `json:"transfers"` Burn *daemon.Burn `json:"burn"` }
type FeeBuilder ¶ added in v0.2.4
type GetAddressParams ¶
type GetAddressParams struct {
IntegratedData *interface{} `json:"integrated_data,omitempty"`
}
type GetAssetPrecisionParams ¶
type GetAssetPrecisionParams struct {
Asset string `json:"asset"`
}
type GetBalanceParams ¶
type GetBalanceParams struct {
Asset string `json:"asset"`
}
type GetTransactionParams ¶
type GetTransactionParams struct {
Hash string `json:"hash"`
}
type Incoming ¶
type Incoming struct { From string `json:"from"` Transfers []TransferIn `json:"transfers"` }
type ListTransactionsParams ¶
type ListTransactionsParams struct { MinTopoheight *uint64 `json:"min_topoheight"` MaxTopoheight *uint64 `json:"max_topoheight"` Address *string `json:"address"` AcceptIncoming bool `json:"accept_incoming"` AcceptOutgoing bool `json:"accept_outgoing"` AcceptCoinbase bool `json:"accept_coinbase"` AcceptBurn bool `json:"accept_burn"` }
type Outgoing ¶
type Outgoing struct { Fee uint64 `json:"fee"` Nonce uint64 `json:"nonce"` Transfers []TransferOut `json:"transfers"` }
type RPC ¶
func (*RPC) BuildTransaction ¶
func (d *RPC) BuildTransaction(params BuildTransactionParams) (result BuildTransactionResult, err error)
func (*RPC) EstimateFees ¶
func (d *RPC) EstimateFees(params EstimateFeesParams) (amount uint64, err error)
func (*RPC) GetAddress ¶
func (d *RPC) GetAddress(params GetAddressParams) (address string, err error)
func (*RPC) GetAssetPrecision ¶
func (d *RPC) GetAssetPrecision(params GetAssetPrecisionParams) (decimals int, err error)
func (*RPC) GetBalance ¶
func (d *RPC) GetBalance(params GetBalanceParams) (balance uint64, err error)
func (*RPC) GetNetwork ¶
func (*RPC) GetTopoheight ¶
func (*RPC) GetTrackedAssets ¶
func (*RPC) GetTransaction ¶
func (d *RPC) GetTransaction(params GetTransactionParams) (transaction TransactionEntry, err error)
func (*RPC) GetVersion ¶
func (*RPC) HasBalance ¶
func (d *RPC) HasBalance(params GetBalanceParams) (exists bool, err error)
func (*RPC) ListTransactions ¶
func (d *RPC) ListTransactions(params ListTransactionsParams) (txs []TransactionEntry, err error)
func (*RPC) SetOfflineMode ¶
func (*RPC) SetOnlineMode ¶
func (*RPC) SplitAddress ¶
func (d *RPC) SplitAddress(params SplitAddressParams) (result SplitAddressResult, err error)
type RescanParams ¶
type RescanParams struct {
UntilTopoheight uint64 `json:"until_topoheight"`
}
type SplitAddressParams ¶
type SplitAddressParams struct {
Address string `json:"address"`
}
type SplitAddressResult ¶
type SplitAddressResult struct { Address string `json:"address"` IntegratedData interface{} `json:"integrated_data"` }
type TransactionData ¶ added in v0.2.4
type TransactionEntry ¶
type Transfer ¶ added in v0.2.4
type Transfer struct { Asset string `json:"asset"` ExtraData *[]byte `json:"extra_data"` Destination []byte `json:"destination"` Commitment []byte `json:"commitment"` SenderHandle []byte `json:"sender_handle"` ReceiverHandle []byte `json:"receiver_handle"` CTValidityProof daemon.Proof `json:"ct_validity_proof"` }
!!! not the same as daemon.Transfer the destination is []byte and the other it's string
type TransferIn ¶
type TransferOut ¶
type WebSocket ¶
func NewWebSocket ¶
func (*WebSocket) BalanceChangedChannel ¶ added in v0.2.7
func (w *WebSocket) BalanceChangedChannel() (chan BalanceChangedResult, chan error, error)
func (*WebSocket) BalanceChangedFunc ¶ added in v0.2.6
func (w *WebSocket) BalanceChangedFunc(onData func(BalanceChangedResult, error)) error
func (*WebSocket) BuildTransaction ¶
func (w *WebSocket) BuildTransaction(params BuildTransactionParams) (result BuildTransactionResult, err error)
func (*WebSocket) CloseEvent ¶
func (*WebSocket) ConnectionErr ¶ added in v0.2.8
func (*WebSocket) EstimateFees ¶
func (w *WebSocket) EstimateFees(params EstimateFeesParams) (amount uint64, err error)
func (*WebSocket) GetAddress ¶
func (w *WebSocket) GetAddress(params GetAddressParams) (address string, err error)
func (*WebSocket) GetAssetPrecision ¶
func (w *WebSocket) GetAssetPrecision(params GetAssetPrecisionParams) (decimals int, err error)
func (*WebSocket) GetBalance ¶
func (w *WebSocket) GetBalance(params GetBalanceParams) (balance uint64, err error)
func (*WebSocket) GetNetwork ¶
func (*WebSocket) GetTopoheight ¶
func (*WebSocket) GetTrackedAssets ¶
func (*WebSocket) GetTransaction ¶
func (w *WebSocket) GetTransaction(params GetTransactionParams) (transaction TransactionEntry, err error)
func (*WebSocket) GetVersion ¶
func (*WebSocket) HasBalance ¶
func (w *WebSocket) HasBalance(params GetBalanceParams) (exists bool, err error)
func (*WebSocket) ListTransactions ¶
func (w *WebSocket) ListTransactions(params ListTransactionsParams) (txs []TransactionEntry, err error)
func (*WebSocket) NewAssetChannel ¶ added in v0.2.7
func (w *WebSocket) NewAssetChannel() (chan daemon.AssetWithData, chan error, error)
func (*WebSocket) NewAssetFunc ¶ added in v0.2.6
func (w *WebSocket) NewAssetFunc(onData func(daemon.AssetWithData, error)) error
func (*WebSocket) NewTopoheightChannel ¶ added in v0.2.7
func (*WebSocket) NewTopoheightFunc ¶ added in v0.2.6
func (*WebSocket) NewTransactionChannel ¶ added in v0.2.7
func (w *WebSocket) NewTransactionChannel() (chan TransactionEntry, chan error, error)
func (*WebSocket) NewTransactionFunc ¶ added in v0.2.6
func (w *WebSocket) NewTransactionFunc(onData func(TransactionEntry, error)) error
func (*WebSocket) OfflineChannel ¶ added in v0.2.7
func (*WebSocket) OfflineFunc ¶ added in v0.2.6
func (*WebSocket) OnlineChannel ¶ added in v0.2.7
func (*WebSocket) OnlineFunc ¶ added in v0.2.6
func (*WebSocket) Rescan ¶
func (w *WebSocket) Rescan(params RescanParams) (success bool, err error)
func (*WebSocket) RescanChannel ¶ added in v0.2.7
func (*WebSocket) RescanFunc ¶ added in v0.2.6
func (*WebSocket) SetOfflineMode ¶
func (*WebSocket) SetOnlineMode ¶
func (*WebSocket) SplitAddress ¶
func (w *WebSocket) SplitAddress(params SplitAddressParams) (result SplitAddressResult, err error)
Click to show internal directories.
Click to hide internal directories.