Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAddresses(seed giota.Trytes, start, count, security int) (string, error)
- func GetWalletInfo(seed string) (giota.Address, []giota.Address, int64, error)
- func NewAddressesWithChecksum(seed giota.Trytes, start, count, security int) ([]giota.Address, error)
- func SendTransaction(seed string, address giota.Address, value int64, tag giota.Trytes) error
- func SummaryWallets(seed string, sumAddress giota.Address, tag giota.Trytes) error
- type Block
- type BlockchainInfo
- type Client
- type Response
- type UnscanRecord
- type Unspent
- type UnspentSort
- type User
- type Wallet
- type WalletManager
- func (w *WalletManager) BackupWalletFlow() error
- func (w *WalletManager) CreateAddressFlow() error
- func (w *WalletManager) CreateWalletFlow() error
- func (w *WalletManager) GetWalletList() error
- func (w *WalletManager) InitConfigFlow() error
- func (w *WalletManager) RestoreWalletFlow() error
- func (w *WalletManager) ShowConfig() error
- func (w *WalletManager) SummaryFollow() error
- func (w *WalletManager) TransferFlow() error
Constants ¶
View Source
const ( //币种 Symbol = "IOTA" MasterKey = "Iota seed" )
Variables ¶
View Source
var ( // 核心钱包是否只做监听 CoreWalletWatchOnly = true )
Functions ¶
func CreateAddresses ¶
func NewAddressesWithChecksum ¶
func NewAddressesWithChecksum(seed giota.Trytes, start, count, security int) ([]giota.Address, error)
NewAddresses generates new count addresses from seed with a checksum
func SendTransaction ¶
Types ¶
type Block ¶
type BlockchainInfo ¶
type BlockchainInfo struct { Chain string `json:"chain"` Blocks uint64 `json:"blocks"` Headers uint64 `json:"headers"` Bestblockhash string `json:"bestblockhash"` Difficulty string `json:"difficulty"` Mediantime uint64 `json:"mediantime"` Verificationprogress string `json:"verificationprogress"` Chainwork string `json:"chainwork"` Pruned bool `json:"pruned"` }
BlockchainInfo 本地节点区块链信息
func NewBlockchainInfo ¶
func NewBlockchainInfo(json *gjson.Result) *BlockchainInfo
type Client ¶
A Client is a iota RPC client. It performs RPCs over HTTP using JSON request and responses. A Client must be configured with a secret token to authenticate with other Cores on the network.
type UnscanRecord ¶
type UnscanRecord struct { ID string `storm:"id"` // primary key BlockHeight uint64 TxID string Reason string }
UnscanRecords 扫描失败的区块及交易
func NewUnscanRecord ¶
func NewUnscanRecord(height uint64, txID, reason string) *UnscanRecord
type Unspent ¶
type Unspent struct { /* { "txid" : "d54994ece1d11b19785c7248868696250ab195605b469632b7bd68130e880c9a", "vout" : 1, "address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe", "account" : "test label", "scriptPubKey" : "76a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac", "amount" : 0.00010000, "confirmations" : 6210, "spendable" : true, "solvable" : true } */ Key string `storm:"id"` TxID string `json:"txid"` Vout uint64 `json:"vout"` Address string `json:"address"` AccountID string `json:"account" storm:"index"` ScriptPubKey string `json:"scriptPubKey"` Amount string `json:"amount"` Confirmations uint64 `json:"confirmations"` Spendable bool `json:"spendable"` Solvable bool `json:"solvable"` HDAddress openwallet.Address }
Unspent 未花记录
func NewUnspent ¶
type UnspentSort ¶
type UnspentSort struct {
// contains filtered or unexported fields
}
func (UnspentSort) Len ¶
func (s UnspentSort) Len() int
func (UnspentSort) Less ¶
func (s UnspentSort) Less(i, j int) bool
func (UnspentSort) Swap ¶
func (s UnspentSort) Swap(i, j int)
type Wallet ¶
type Wallet struct { WalletID string `json:"rootid"` Alias string `json:"alias"` Balance string `json:"balance"` Password string `json:"password"` RootPub string `json:"rootpub"` KeyFile string }
Wallet 钱包模型
func (*Wallet) ToOpenWallet ¶
func (w *Wallet) ToOpenWallet() *openwallet.Wallet
ToOpenWallet 转为openwallet.Wallet
type WalletManager ¶
type WalletManager struct{}
func (*WalletManager) GetWalletList ¶
func (w *WalletManager) GetWalletList() error
GetWalletList 获取钱包列表
func (*WalletManager) RestoreWalletFlow ¶
func (w *WalletManager) RestoreWalletFlow() error
RestoreWalletFlow 恢复钱包流程
func (*WalletManager) SummaryFollow ¶
func (w *WalletManager) SummaryFollow() error
SummaryFollow 汇总流程
Click to show internal directories.
Click to hide internal directories.