bitcoind

package
v0.0.0-...-3050db6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Address string
View Source
var AllowInvalidServerCertificate bool
View Source
var Password string
View Source
var Username string

Functions

func GetBlock

func GetBlock(hash string) (*Block, *Result, error)

func GetID

func GetID() int64

func GetInfo

func GetInfo() (*GetInfoResult, *Result, error)

func GetRawTransactionWithVerbose

func GetRawTransactionWithVerbose(txid string) (*DetailedTransaction, *Result, error)

func GetTransaction

func GetTransaction(txid string) (*Transaction, *Result, error)

func ListSinceBlock

func ListSinceBlock(blockHash string, targetConfirmations int64) (*ListSinceBlockResponse, *Result, error)

func ListTransactions

func ListTransactions(data []interface{}) ([]Transaction, *Result, error)

func ListTransactionsFull

func ListTransactionsFull(account string, count int64, from int64) ([]Transaction, *Result, error)

func ListUnspent

func ListUnspent() ([]UnspentOutput, *Result, error)

func ListUnspentFull

func ListUnspentFull(minConf, maxConf int64) ([]UnspentOutput, *Result, error)

func ListUnspentMinConf

func ListUnspentMinConf(minConf int64) ([]UnspentOutput, *Result, error)

func SetAddress

func SetAddress(newAddress string, newUsername string, newPassword string)

func SignRawTransaction

func SignRawTransaction(raw string) (*SignRawTransactionResp, *Result, error)

Types

type Block

type Block struct {
	Hash          string   `json:"hash"`
	Confirmations int64    `json:"confirmations"`
	StrippedSize  int64    `json:"strippedsize"`
	Size          int64    `json:"size"`
	Weight        int64    `json:"weight"`
	Height        int64    `json:"height"`
	Version       int64    `json:"version"`
	VersionHex    string   `json:"versionHex"`
	MerkleRoot    string   `json:"merkleroot"`
	Tx            []string `json:"tx"`
	Time          int64    `json:"time"`
	MedianTime    int64    `json:"mediantime"`
	Nonce         int64    `json:"nonce"`
	Bits          string   `json:"bits"`

	ChainWork         string `json:"chainwork"`
	PreviousBlockHash string `json:"previousblockhash"`
	NextBlockHash     string `json:"nextblockhash"`
	// contains filtered or unexported fields
}

func (*Block) String

func (r *Block) String() string

type DetailedTransaction

type DetailedTransaction struct {
	Hex           string `json:"hex"`
	TxID          string `json:"txid"`
	Hash          string `json:"hash"`
	Size          int64  `json:"size"`
	VSize         int64  `json:"vsize"`
	Version       int64  `json:"version"`
	LockTime      int64  `json:"locktime"`
	VIn           []VIn  `json:"vin"`
	VOut          []VOut `json:"vout"`
	BlockHash     string `json:"blockhash"`
	Confirmations int64  `json:"confirmations"`
	Time          int64  `json:"time"`
	Blocktime     int64  `json:"blocktime"`
}

func (*DetailedTransaction) String

func (r *DetailedTransaction) String() string

type Error

type Error struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

func (*Error) String

func (r *Error) String() string

type GetInfoResult

type GetInfoResult struct {
	Version         int64   `json:"version"`
	ProtocolVersion int64   `json:"protocolversion"`
	WalletVersion   int64   `json:"walletversion"`
	Balance         float64 `json:"balance"`
	Blocks          int64   `json:"blocks"`
	TimeOffset      int64   `json:"timeoffset"`
	Connections     int64   `json:"connections"`
	Proxy           string  `json:"proxy"`
	Difficulty      float64 `json:"difficulty"`
	Testnet         bool    `json:"testnet"`
	KeyPoolOldest   int64   `json:"keypoololdest"`
	KeyPoolSize     int64   `json:"keypoolsize"`
	UnlockedUntil   int64   `json:"unlocked_until"`
	PayTxFee        float64 `json:"paytxfee"`
	RelayFee        float64 `json:"relayfee"`
	Errors          string  `json:"errors"`
}

func (*GetInfoResult) String

func (r *GetInfoResult) String() string

type ListSinceBlockResponse

type ListSinceBlockResponse struct {
	Transactions []Transaction `json:"transactions"`
	LastBlock    string        `json:"lastblock"`
}

type RawTransactionInput

type RawTransactionInput struct {
	TxID string `json:"txid"`
	VOut int64  `json:"vout"`
}

type Result

type Result struct {
	Result json.RawMessage `json:"result"`
	Error  *Error          `json:"error,omitempty"`
	ID     interface{}     `json:"id"`
}

func BackupWallet

func BackupWallet(destination []interface{}) (*Result, error)

func CallWithBasicAuth

func CallWithBasicAuth(method string, params []interface{}) (*Result, error)

func CallWithBasicAuthSingleParam

func CallWithBasicAuthSingleParam(method string, params interface{}) (*Result, error)

func CreateRawTransaction

func CreateRawTransaction(inputs []RawTransactionInput, outputs map[string]interface{}) (string, *Result, error)

func DecodeRawTransaction

func DecodeRawTransaction(data string) (*Result, error)

func EncryptWallet

func EncryptWallet(passphrase []interface{}) (*Result, error)

func EstimateFee

func EstimateFee(blocks int64) (float64, *Result, error)

func GetAccount

func GetAccount(bitcoinaddress []interface{}) (*Result, error)

func GetAccountAddress

func GetAccountAddress(account []interface{}) (*Result, error)

func GetAddressesByAccount

func GetAddressesByAccount(account []interface{}) (*Result, error)

func GetBalance

func GetBalance(data []interface{}) (*Result, error)

func GetBlockCount

func GetBlockCount() (*Result, error)

func GetBlockHash

func GetBlockHash(index []interface{}) (*Result, error)

func GetBlockNumber

func GetBlockNumber() (*Result, error)

func GetConnectionCount

func GetConnectionCount() (*Result, error)

func GetDifficulty

func GetDifficulty() (*Result, error)

func GetGenerate

func GetGenerate() (*Result, error)

func GetHashesPerSec

func GetHashesPerSec() (*Result, error)

func GetMemoryPool

func GetMemoryPool(data []interface{}) (*Result, error)

func GetNewAddress

func GetNewAddress(account []interface{}) (*Result, error)

func GetRawTransaction

func GetRawTransaction(txid string) (string, *Result, error)

func GetReceivedByAccount

func GetReceivedByAccount(data []interface{}) (*Result, error)

func GetReceivedByAddress

func GetReceivedByAddress(data []interface{}) (*Result, error)

func GetWork

func GetWork(data []interface{}) (*Result, error)

func Help

func Help(command string) (*Result, error)

func KeyPoolRefill

func KeyPoolRefill() (*Result, error)

func ListAccounts

func ListAccounts(minconf interface{}) (*Result, error)

func ListReceivedByAccount

func ListReceivedByAccount(data []interface{}) (*Result, error)

func ListReceivedByAddress

func ListReceivedByAddress(data []interface{}) (*Result, error)

func Move

func Move(data []interface{}) (*Result, error)

func SendFrom

func SendFrom(data []interface{}) (*Result, error)

func SendMany

func SendMany(data []interface{}) (*Result, error)

func SendRawTransaction

func SendRawTransaction(tx string) (string, *Result, error)

func SendToAddress

func SendToAddress(address string, amount float64) (string, *Result, error)

func SetAccount

func SetAccount(data []interface{}) (*Result, error)

func SetGenerate

func SetGenerate(data []interface{}) (*Result, error)

func SetTxFee

func SetTxFee(amount []interface{}) (*Result, error)

func SignMessage

func SignMessage(bitcoinaddress, message interface{}) (*Result, error)

func SignRawMessage

func SignRawMessage(raw string) (*Result, error)

func Stop

func Stop() (*Result, error)

func ValidateAddress

func ValidateAddress(bitcoinaddress interface{}) (*Result, error)

func VerifyMessage

func VerifyMessage(bitcoinaddress, signature, message interface{}) (*Result, error)

func WalletLock

func WalletLock() (*Result, error)

func WalletPassPhrase

func WalletPassPhrase(passphrase, timeout interface{}) (*Result, error)

func WalletPassPhraseChange

func WalletPassPhraseChange(data []interface{}) (*Result, error)

func (*Result) ParseResult

func (r *Result) ParseResult(dst interface{}) error

func (*Result) String

func (r *Result) String() string

type ScriptPubKey

type ScriptPubKey struct {
	ASM       string   `json:"asm"`
	Hex       string   `json:"hex"`
	ReqSigs   int64    `json:"reqSigs"`
	Type      string   `json:"type"`
	Addresses []string `json:"addresses"`
}

type ScriptSig

type ScriptSig struct {
	ASM string `json:"asm"`
	Hex string `json:"hex"`
}

type SignRawTransactionResp

type SignRawTransactionResp struct {
	Hex      string `json:"hex"`
	Complete bool   `json:"complete"`
}

type Transaction

type Transaction struct {
	Account           string        `json:"account"`
	Address           string        `json:"address"`
	Category          string        `json:"category"`
	Amount            float64       `json:"amount"`
	Label             string        `json:"label"`
	Vout              int64         `json:"vout"`
	Fee               float64       `json:"fee"`
	Confirmations     int64         `json:"confirmations"`
	BlockHash         string        `json:"blockhash"`
	BlockIndex        int64         `json:"blockindex"`
	BlockTime         int64         `json:"blocktime"`
	TxID              string        `json:"txid"`
	Walletconflicts   []interface{} `json:"walletconflicts"`
	Time              int64         `json:"time"`
	Timereceived      int64         `json:"timereceived"`
	BIP125Replaceable string        `json:"bip125-replaceable"`
	Abandoned         bool          `json:"abandoned"`
}

func (*Transaction) String

func (r *Transaction) String() string

type UnspentOutput

type UnspentOutput struct {
	TXId          string  `json:"txid"`
	VOut          int64   `json:"vout"`
	Address       string  `json:"address"`
	ScriptPubKey  string  `json:"scriptPubKey"`
	Amount        float64 `json:"amount"`
	Confirmations int64   `json:"confirmations"`
	Spendable     bool    `json:"spendable"`
	Solvable      bool    `json:"solvable"`
}

type VIn

type VIn struct {
	TxID      string    `json:"txid"`
	VOut      int64     `json:"vout"`
	ScriptSig ScriptSig `json:"scriptSig"`
	Sequence  int64     `json:"sequence"`
}

type VOut

type VOut struct {
	Value        float64      `json:"value"`
	N            int64        `json:"n"`
	ScriptPubKey ScriptPubKey `json:"scriptPubKey"`
}

Jump to

Keyboard shortcuts

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