neo-go/pkg/rpc/response/result/utxo.go

27 lines
776 B
Go
Raw Normal View History

2020-08-04 15:16:32 +00:00
package result
import "github.com/nspcc-dev/neo-go/pkg/util"
// UTXO represents single output for a single asset.
type UTXO struct {
Index uint32 `json:"block_index"`
Timestamp uint32 `json:"timestamp"`
TxHash util.Uint256 `json:"txid"`
Amount int64 `json:"amount,string"`
}
// AssetUTXO represents UTXO for a specific asset.
type AssetUTXO struct {
AssetHash util.Uint256 `json:"asset_hash"`
AssetName string `json:"asset"`
TotalAmount int64 `json:"total_amount,string"`
Transactions []UTXO `json:"transactions"`
}
// GetUTXO is a result of the `getutxotransfers` RPC.
type GetUTXO struct {
Address string `json:"address"`
Sent []AssetUTXO `json:"sent"`
Received []AssetUTXO `json:"received"`
}