Small fixes (#117)

* small fixes

* gofmt
This commit is contained in:
Anastasia Prasolova 2019-01-22 15:14:40 +03:00 committed by Anthony De Meulemeester
parent 74f0019df2
commit 77296f6481
6 changed files with 74 additions and 15 deletions

View file

@ -1,5 +1,7 @@
package rpc
import "github.com/CityOfZion/neo-go/pkg/core/transaction"
type InvokeScriptResponse struct {
responseHeader
Error *Error `json:"error,omitempty"`
@ -73,3 +75,48 @@ type response struct {
Error *Error `json:"error"`
Result interface{} `json:"result"`
}
type SendToAddressResponse struct {
responseHeader
Error *Error `json:"error"`
Result *TxResponse
}
// struct represents verbose output of `getrawtransaction` RPC call
type GetRawTxResponse struct {
responseHeader
Error *Error `json:"error"`
Result *RawTxResponse `json: "result"`
}
type RawTxResponse struct {
TxResponse
BlockHash string `json: "blockhash"`
Confirmations uint `json: "confirmations"`
BlockTime uint `json: "blocktime"`
}
type TxResponse struct {
TxID string `json: "txid"`
Size int `json: "size"`
Type string `json: "type"` // todo: convert to TransactionType
Version int `json: "version"`
Attributes []transaction.Attribute `json: "attributes"`
Vins []Vin `json: "vin"`
Vouts []Vout `json: "vout"`
SysFee int `json: "sys_fee"`
NetFee int `json: "net_fee"`
Scripts []transaction.Witness `json: "scripts"`
}
type Vin struct {
TxId string `json: "txid"`
Vout int `json: "vout"`
}
type Vout struct {
N int `json: "n"`
Asset string `json: "asset"`
Value int `json: "value"`
Address string `json: "address"`
}