Documentation ¶
Index ¶
- func Check(options *RpcOptions) (bool, error)
- func Cmd(command string, options *RpcOptions, args ...interface{}) ([]byte, error)
- func CmdAsSingleResult(command string, options *RpcOptions, args ...interface{}) (interface{}, error)
- func GetRawMempool(options *RpcOptions) ([]string, error)
- func SendRawTransaction(rawTxn string, options *RpcOptions) (string, error)
- type MempoolRPCResult
- type RawTxIn
- type RawTxOut
- type RawTxn
- type RpcOptions
- type RpcRequest
- type SignedTx
- type SignedTxRPCResult
- type TxnBuf
- type UnspentTx
- type UnspentTxRPCResult
- type UnspentTxs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(options *RpcOptions) (bool, error)
func CmdAsSingleResult ¶
func CmdAsSingleResult(command string, options *RpcOptions, args ...interface{}) (interface{}, error)
func GetRawMempool ¶
func GetRawMempool(options *RpcOptions) ([]string, error)
func SendRawTransaction ¶
func SendRawTransaction(rawTxn string, options *RpcOptions) (string, error)
Types ¶
type MempoolRPCResult ¶
type MempoolRPCResult struct { RpcRequest Result []string `json:"result"` }
type RawTxn ¶
type RawTxn struct { Version uint32 `json:"version"` Locktime uint32 `json:"locktime"` Vin []RawTxIn `json:"vin"` Vout []RawTxOut `json:"vout"` }
func CreateRawTransaction ¶
func CreateRawTransaction(inputs UnspentTxs, outputs map[string]float32, options *RpcOptions) (RawTxn, error)
type RpcOptions ¶
type RpcRequest ¶
type SignedTx ¶
type SignedTx struct { Hex string `json:"hex"` Complete bool `json:"complete"` Errors []struct { Txid string `json:"txid"` Vout uint32 `json:"vout"` ScriptSig string `json:"scriptSig"` Sequence uint32 `json:"sequence"` Error string `json:"error"` } `json:"errors"` }
func SignRawTransaction ¶
func SignRawTransaction(txn RawTxn, prevTxns UnspentTxs, options *RpcOptions) (SignedTx, error)
type SignedTxRPCResult ¶
type SignedTxRPCResult struct { RpcRequest Result SignedTx `json:"result` }
type UnspentTx ¶
type UnspentTx struct { Txid string `json:"txid"` Vout int `json:"vout"` Address string `json:"address,omitempty"` ScriptPubKey string `json:"scriptPubKey,omitempty"` Amount float32 `json:"amount,omitempty"` Confirmations int64 `json:"confirmations,omitempty"` Spendable bool `json:"spendable,omitempty"` Solvable bool `json:"solvable,omitempty"` Priority float32 `json:"priority,omitempty"` }
type UnspentTxRPCResult ¶
type UnspentTxRPCResult struct { RpcRequest Result UnspentTxs `json:"result"` }
type UnspentTxs ¶
type UnspentTxs []UnspentTx
func ListUnspent ¶
func ListUnspent(options *RpcOptions) (UnspentTxs, error)
func (UnspentTxs) Len ¶
func (slice UnspentTxs) Len() int
func (UnspentTxs) Less ¶
func (slice UnspentTxs) Less(i, j int) bool
func (UnspentTxs) Swap ¶
func (slice UnspentTxs) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.