mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
parent
74f0019df2
commit
77296f6481
6 changed files with 74 additions and 15 deletions
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue