2018-12-21 09:32:18 +00:00
|
|
|
package rpc
|
|
|
|
|
2019-11-19 14:35:04 +00:00
|
|
|
import (
|
2019-11-25 17:39:11 +00:00
|
|
|
"github.com/CityOfZion/neo-go/pkg/core/entities"
|
2019-11-19 14:35:04 +00:00
|
|
|
"github.com/CityOfZion/neo-go/pkg/util"
|
|
|
|
)
|
2018-12-21 09:32:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Definition of types, helper functions and variables
|
|
|
|
required for calculation of transaction inputs using
|
|
|
|
NeoScan API.
|
|
|
|
*/
|
|
|
|
|
|
|
|
type (
|
2019-10-22 14:56:03 +00:00
|
|
|
// NeoScanServer stores NEOSCAN URL and API path.
|
2018-12-21 09:32:18 +00:00
|
|
|
NeoScanServer struct {
|
|
|
|
URL string // "protocol://host:port/"
|
|
|
|
Path string // path to API endpoint without wallet address
|
|
|
|
}
|
|
|
|
|
2019-09-03 14:51:37 +00:00
|
|
|
// Unspent stores Unspents per asset
|
2018-12-21 09:32:18 +00:00
|
|
|
Unspent struct {
|
2019-11-25 17:39:11 +00:00
|
|
|
Unspent entities.UnspentBalances
|
2018-12-21 09:32:18 +00:00
|
|
|
Asset string // "NEO" / "GAS"
|
|
|
|
Amount util.Fixed8 // total unspent of this asset
|
|
|
|
}
|
|
|
|
|
2019-09-03 14:51:37 +00:00
|
|
|
// NeoScanBalance is a struct of NeoScan response to 'get_balance' request
|
2018-12-21 09:32:18 +00:00
|
|
|
NeoScanBalance struct {
|
|
|
|
Balance []*Unspent
|
|
|
|
Address string
|
|
|
|
}
|
|
|
|
)
|