Documentation ¶
Index ¶
- Variables
- func SetWalletAccount(addressInfo *AddressInfo)
- type AddressInfo
- type Coin
- type CoinLinkedItem
- type CoinOwnership
- type CoinsCheckPoint
- func (ccp *CoinsCheckPoint) AppendCoin(owner string, op *types.OutPoint, coin *Coin)
- func (ccp *CoinsCheckPoint) DataExtension() string
- func (ccp *CoinsCheckPoint) Deserialize(r io.Reader) error
- func (ccp *CoinsCheckPoint) EffectivePeriod() uint32
- func (ccp *CoinsCheckPoint) Generator() func(buf []byte) checkpoint.ICheckPoint
- func (ccp *CoinsCheckPoint) GetCoin(owner string, op *types.OutPoint) (*Coin, bool)
- func (ccp *CoinsCheckPoint) GetHeight() uint32
- func (ccp *CoinsCheckPoint) Key() string
- func (ccp *CoinsCheckPoint) ListCoins(owner string) map[types.OutPoint]*Coin
- func (ccp *CoinsCheckPoint) LogError(err error)
- func (ccp *CoinsCheckPoint) OnBlockSaved(block *types.DposBlock)
- func (ccp *CoinsCheckPoint) OnInit()
- func (ccp *CoinsCheckPoint) OnRollbackTo(height uint32) error
- func (ccp *CoinsCheckPoint) Priority() checkpoint.Priority
- func (ccp *CoinsCheckPoint) SavePeriod() uint32
- func (ccp *CoinsCheckPoint) Serialize(w io.Writer) error
- func (ccp *CoinsCheckPoint) SetHeight(height uint32)
- func (ccp *CoinsCheckPoint) Snapshot() checkpoint.ICheckPoint
- func (ccp *CoinsCheckPoint) StartHeight() uint32
- type OwnedCoins
- type Wallet
- func (w *Wallet) ImportAddress(address string, enableUtxoDB bool) error
- func (w *Wallet) ImportPubkey(pubKey []byte, enableUtxoDB bool) error
- func (w *Wallet) ListUnspent(address string, enableUtxoDB bool) (map[common.Uint256][]*types.UTXO, error)
- func (w *Wallet) LoadAddresses() error
- func (w *Wallet) RescanWallet() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Store blockchain.IChainStore Chain *blockchain.BlockChain ChainParam *config.Params )
Functions ¶
func SetWalletAccount ¶
func SetWalletAccount(addressInfo *AddressInfo)
SetWalletAccount set an address information to wallet
Types ¶
type AddressInfo ¶
type AddressInfo struct {
// contains filtered or unexported fields
}
func GetWalletAccount ¶
func GetWalletAccount(address string) (*AddressInfo, bool)
GetWalletAccount retrieval an address information in wallet by address
type Coin ¶
type Coin struct { TxVersion types.TransactionVersion Output *types.Output Height uint32 }
type CoinLinkedItem ¶
type CoinLinkedItem struct {
// contains filtered or unexported fields
}
CoinLinkedItem as a value for OwnedCoins map to be a linked list item.
func (*CoinLinkedItem) Deserialize ¶
func (cl *CoinLinkedItem) Deserialize(r io.Reader) error
type CoinOwnership ¶
type CoinOwnership struct {
// contains filtered or unexported fields
}
CoinOwnership as a key for OwnedCoins map to represents the ownership between OutPoint and owner.
func (*CoinOwnership) Deserialize ¶
func (co *CoinOwnership) Deserialize(r io.Reader) error
type CoinsCheckPoint ¶
CoinsCheckPoint implement the ICheckPoint interface and store all coins which be subscribed.
func NewCoinCheckPoint ¶
func NewCoinCheckPoint() *CoinsCheckPoint
func (*CoinsCheckPoint) AppendCoin ¶
func (ccp *CoinsCheckPoint) AppendCoin(owner string, op *types.OutPoint, coin *Coin)
func (*CoinsCheckPoint) DataExtension ¶
func (ccp *CoinsCheckPoint) DataExtension() string
func (*CoinsCheckPoint) Deserialize ¶
func (ccp *CoinsCheckPoint) Deserialize(r io.Reader) error
func (*CoinsCheckPoint) EffectivePeriod ¶
func (ccp *CoinsCheckPoint) EffectivePeriod() uint32
func (*CoinsCheckPoint) Generator ¶
func (ccp *CoinsCheckPoint) Generator() func(buf []byte) checkpoint.ICheckPoint
func (*CoinsCheckPoint) GetHeight ¶
func (ccp *CoinsCheckPoint) GetHeight() uint32
func (*CoinsCheckPoint) Key ¶
func (ccp *CoinsCheckPoint) Key() string
func (*CoinsCheckPoint) ListCoins ¶
func (ccp *CoinsCheckPoint) ListCoins(owner string) map[types.OutPoint]*Coin
func (*CoinsCheckPoint) LogError ¶
func (ccp *CoinsCheckPoint) LogError(err error)
func (*CoinsCheckPoint) OnBlockSaved ¶
func (ccp *CoinsCheckPoint) OnBlockSaved(block *types.DposBlock)
func (*CoinsCheckPoint) OnInit ¶
func (ccp *CoinsCheckPoint) OnInit()
func (*CoinsCheckPoint) OnRollbackTo ¶
func (ccp *CoinsCheckPoint) OnRollbackTo(height uint32) error
func (*CoinsCheckPoint) Priority ¶
func (ccp *CoinsCheckPoint) Priority() checkpoint.Priority
func (*CoinsCheckPoint) SavePeriod ¶
func (ccp *CoinsCheckPoint) SavePeriod() uint32
func (*CoinsCheckPoint) SetHeight ¶
func (ccp *CoinsCheckPoint) SetHeight(height uint32)
func (*CoinsCheckPoint) Snapshot ¶
func (ccp *CoinsCheckPoint) Snapshot() checkpoint.ICheckPoint
func (*CoinsCheckPoint) StartHeight ¶
func (ccp *CoinsCheckPoint) StartHeight() uint32
type OwnedCoins ¶
type OwnedCoins map[CoinOwnership]CoinLinkedItem
OwnedCoins store the ownership between OutPoint and owner, and can traverse the OutPoint of an owner through a linked list.
func NewOwnedCoins ¶
func NewOwnedCoins() OwnedCoins
func (OwnedCoins) Deserialize ¶
func (oc OwnedCoins) Deserialize(r io.Reader) error
type Wallet ¶
type Wallet struct { *CoinsCheckPoint *account.Client }
func (*Wallet) ImportAddress ¶
func (*Wallet) ListUnspent ¶
func (*Wallet) LoadAddresses ¶
func (*Wallet) RescanWallet ¶
Click to show internal directories.
Click to hide internal directories.