mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-24 09:25:21 +00:00
33 lines
757 B
Go
33 lines
757 B
Go
package rpc
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/core/state"
|
|
"github.com/CityOfZion/neo-go/pkg/util"
|
|
)
|
|
|
|
/*
|
|
Definition of types, helper functions and variables
|
|
required for calculation of transaction inputs using
|
|
NeoScan API.
|
|
*/
|
|
|
|
type (
|
|
// NeoScanServer stores NEOSCAN URL and API path.
|
|
NeoScanServer struct {
|
|
URL string // "protocol://host:port/"
|
|
Path string // path to API endpoint without wallet address
|
|
}
|
|
|
|
// Unspent stores Unspents per asset
|
|
Unspent struct {
|
|
Unspent state.UnspentBalances
|
|
Asset string // "NEO" / "GAS"
|
|
Amount util.Fixed8 // total unspent of this asset
|
|
}
|
|
|
|
// NeoScanBalance is a struct of NeoScan response to 'get_balance' request
|
|
NeoScanBalance struct {
|
|
Balance []*Unspent
|
|
Address string
|
|
}
|
|
)
|