walletsvrresults.go raw
1 package btcjson
2
3 type (
4 // GetTransactionDetailsResult models the details data from the gettransaction command. This models the "short" version of the ListTransactionsResult type, which excludes fields common to the transaction. These common fields are instead part of the GetTransactionResult.
5 GetTransactionDetailsResult struct {
6 Account string `json:"account"`
7 Address string `json:"address,omitempty"`
8 Amount float64 `json:"amount"`
9 Category string `json:"category"`
10 InvolvesWatchOnly bool `json:"involveswatchonly,omitempty"`
11 Fee *float64 `json:"fee,omitempty"`
12 Vout uint32 `json:"vout"`
13 }
14 // GetTransactionResult models the data from the gettransaction command.
15 GetTransactionResult struct {
16 Amount float64 `json:"amount"`
17 Fee float64 `json:"fee,omitempty"`
18 Confirmations int64 `json:"confirmations"`
19 BlockHash string `json:"blockhash"`
20 BlockIndex int64 `json:"blockindex"`
21 BlockTime int64 `json:"blocktime"`
22 TxID string `json:"txid"`
23 WalletConflicts []string `json:"walletconflicts"`
24 Time int64 `json:"time"`
25 TimeReceived int64 `json:"timereceived"`
26 Details []GetTransactionDetailsResult `json:"details"`
27 Hex string `json:"hex"`
28 }
29 // InfoWalletResult models the data returned by the wallet server getinfo command.
30 InfoWalletResult struct {
31 Version int32 `json:"version"`
32 ProtocolVersion int32 `json:"protocolversion"`
33 WalletVersion int32 `json:"walletversion"`
34 Balance float64 `json:"balance"`
35 Blocks int32 `json:"blocks"`
36 TimeOffset int64 `json:"timeoffset"`
37 Connections int32 `json:"connections"`
38 Proxy string `json:"proxy"`
39 Difficulty float64 `json:"difficulty"`
40 TestNet bool `json:"testnet"`
41 KeypoolOldest int64 `json:"keypoololdest"`
42 KeypoolSize int32 `json:"keypoolsize"`
43 UnlockedUntil int64 `json:"unlocked_until"`
44 PaytxFee float64 `json:"paytxfee"`
45 RelayFee float64 `json:"relayfee"`
46 Errors string `json:"errors"`
47 }
48 // ListTransactionsResult models the data from the listtransactions command.
49 ListTransactionsResult struct {
50 Abandoned bool `json:"abandoned"`
51 Account string `json:"account"`
52 Address string `json:"address,omitempty"`
53 Amount float64 `json:"amount"`
54 // BIP125Replaceable string `json:"bip125-replaceable,omitempty"`
55 BlockHash string `json:"blockhash,omitempty"`
56 BlockIndex int64 `json:"blockindex,omitempty"`
57 BlockTime int64 `json:"blocktime,omitempty"`
58 Category string `json:"category"`
59 Confirmations int64 `json:"confirmations"`
60 Fee float64 `json:"fee,omitempty"`
61 Generated bool `json:"generated,omitempty"`
62 InvolvesWatchOnly bool `json:"involveswatchonly,omitempty"`
63 Time int64 `json:"time"`
64 TimeReceived int64 `json:"timereceived"`
65 Trusted bool `json:"trusted"`
66 TxID string `json:"txid"`
67 Vout uint32 `json:"vout"`
68 WalletConflicts []string `json:"walletconflicts"`
69 Comment string `json:"comment,omitempty"`
70 OtherAccount string `json:"otheraccount,omitempty"`
71 }
72 // ListReceivedByAccountResult models the data from the listreceivedbyaccount command.
73 ListReceivedByAccountResult struct {
74 Account string `json:"account"`
75 Amount float64 `json:"amount"`
76 Confirmations uint64 `json:"confirmations"`
77 }
78 // ListReceivedByAddressResult models the data from the listreceivedbyaddress command.
79 ListReceivedByAddressResult struct {
80 Account string `json:"account"`
81 Address string `json:"address"`
82 Amount float64 `json:"amount"`
83 Confirmations uint64 `json:"confirmations"`
84 TxIDs []string `json:"txids,omitempty"`
85 InvolvesWatchonly bool `json:"involvesWatchonly,omitempty"`
86 }
87 // ListSinceBlockResult models the data from the listsinceblock command.
88 ListSinceBlockResult struct {
89 Transactions []ListTransactionsResult `json:"transactions"`
90 LastBlock string `json:"lastblock"`
91 }
92 // ListUnspentResult models a successful response from the listunspent request.
93 ListUnspentResult struct {
94 TxID string `json:"txid"`
95 Vout uint32 `json:"vout"`
96 Address string `json:"address"`
97 Account string `json:"account"`
98 ScriptPubKey string `json:"scriptPubKey"`
99 RedeemScript string `json:"redeemScript,omitempty"`
100 Amount float64 `json:"amount"`
101 Confirmations int64 `json:"confirmations"`
102 Spendable bool `json:"spendable"`
103 }
104 // SignRawTransactionError models the data that contains script verification errors from the signrawtransaction
105 // request.
106 SignRawTransactionError struct {
107 TxID string `json:"txid"`
108 Vout uint32 `json:"vout"`
109 ScriptSig string `json:"scriptSig"`
110 Sequence uint32 `json:"sequence"`
111 Error string `json:"error"`
112 }
113 // SignRawTransactionResult models the data from the signrawtransaction command.
114 SignRawTransactionResult struct {
115 Hex string `json:"hex"`
116 Complete bool `json:"complete"`
117 Errors []SignRawTransactionError `json:"errors,omitempty"`
118 }
119 // ValidateAddressWalletResult models the data returned by the wallet server validateaddress command.
120 ValidateAddressWalletResult struct {
121 IsValid bool `json:"isvalid"`
122 Address string `json:"address,omitempty"`
123 IsMine bool `json:"ismine,omitempty"`
124 IsWatchOnly bool `json:"iswatchonly,omitempty"`
125 IsScript bool `json:"isscript,omitempty"`
126 PubKey string `json:"pubkey,omitempty"`
127 IsCompressed bool `json:"iscompressed,omitempty"`
128 Account string `json:"account,omitempty"`
129 Addresses []string `json:"addresses,omitempty"`
130 Hex string `json:"hex,omitempty"`
131 Script string `json:"script,omitempty"`
132 SigsRequired int32 `json:"sigsrequired,omitempty"`
133 }
134 // GetBestBlockResult models the data from the getbestblock command.
135 GetBestBlockResult struct {
136 Hash string `json:"hash"`
137 Height int32 `json:"height"`
138 }
139 )
140