Versions in this module Expand all Collapse all v1 v1.1.1 Dec 17, 2019 Changes in this version type ELABlockScanner + func (bs *ELABlockScanner) DeleteUnscanRecordNotFindTX() error + func (bs *ELABlockScanner) GetLocalNewBlock() (uint64, string, error) + func (bs *ELABlockScanner) SaveLocalNewBlock(blockHeight uint64, blockHash string) error v1.1.0 Nov 19, 2019 Changes in this version type ELABlockScanner + func (bs *ELABlockScanner) DeleteUnscanRecord(height uint32) error + func (bs *ELABlockScanner) GetLocalBlock(height uint32) (*Block, error) + func (bs *ELABlockScanner) GetLocalBlockHead() (uint32, string, error) + func (bs *ELABlockScanner) GetUnscanRecords() ([]*openwallet.UnscanRecord, error) + func (bs *ELABlockScanner) SaveLocalBlock(blockHeader *Block) error + func (bs *ELABlockScanner) SaveLocalBlockHead(blockHeight uint32, blockHash string) error + func (bs *ELABlockScanner) SupportBlockchainDAI() bool v1.0.3 Jun 22, 2019 v1.0.2 Jun 21, 2019 v1.0.1 Jun 21, 2019 Changes in this version type WalletConfig + DataDir string v1.0.0 Jun 13, 2019 Changes in this version + const CurveType + const Decimals + const MasterKey + const RPCServerCore + const RPCServerExplorer + const Symbol + func BasicAuth(username, password string) string + func NewAddressDecoder(wm *WalletManager) *addressDecoder + type AddressDecoder interface + type Block struct + Confirmations uint64 + Fork bool + Hash string + Height uint64 + Merkleroot string + Previousblockhash string + Time uint64 + Version uint64 + func (b *Block) BlockHeader(symbol string) *openwallet.BlockHeader + type BlockchainInfo struct + Bestblockhash string + Blocks uint64 + Chain string + Chainwork string + Difficulty string + Headers uint64 + Mediantime uint64 + Pruned bool + Verificationprogress string + func NewBlockchainInfo(json *gjson.Result) *BlockchainInfo + type Client struct + BaseURL string + Debug bool + func NewClient(url string, debug bool) *Client + func (c *Client) Call(path string, request []interface{}) (*gjson.Result, error) + func (c *Client) NewBlock(json *gjson.Result) *Block + type ClientInterface interface + Call func(path string, request []interface{}) (*gjson.Result, error) + type ContractDecoder struct + func NewContractDecoder(wm *WalletManager) *ContractDecoder + type ELABlockScanner struct + CurrentBlockHeight uint64 + IsScanMemPool bool + IsSkipFailedBlock bool + RescanLastBlockCount uint64 + func NewELABlockScanner(wm *WalletManager) *ELABlockScanner + func (bs *ELABlockScanner) BatchExtractTransaction(blockHeight uint64, blockHash string, txs []string) error + func (bs *ELABlockScanner) ExtractTransaction(blockHeight uint64, blockHash string, txid string, ...) ExtractResult + func (bs *ELABlockScanner) ExtractTransactionData(txid string, scanTargetFunc openwallet.BlockScanTargetFunc) (map[string][]*openwallet.TxExtractData, error) + func (bs *ELABlockScanner) GetBalanceByAddress(address ...string) ([]*openwallet.Balance, error) + func (bs *ELABlockScanner) GetCurrentBlockHeader() (*openwallet.BlockHeader, error) + func (bs *ELABlockScanner) GetGlobalMaxBlockHeight() uint64 + func (bs *ELABlockScanner) GetScannedBlockHeader() (*openwallet.BlockHeader, error) + func (bs *ELABlockScanner) GetScannedBlockHeight() uint64 + func (bs *ELABlockScanner) GetTransactionsByAddress(offset, limit int, coin openwallet.Coin, address ...string) ([]*openwallet.TxExtractData, error) + func (bs *ELABlockScanner) RescanFailedRecord() + func (bs *ELABlockScanner) Run() error + func (bs *ELABlockScanner) SaveUnscanRecord(record *UnscanRecord) error + func (bs *ELABlockScanner) ScanBlock(height uint64) error + func (bs *ELABlockScanner) ScanBlockTask() + func (bs *ELABlockScanner) ScanTxMemPool() + func (bs *ELABlockScanner) SetRescanBlockHeight(height uint64) error + func (bs *ELABlockScanner) Stop() error + type ExtractResult struct + BlockHeight uint64 + Success bool + TxID string + type Response struct + Code int + Error interface{} + Id string + Message string + Result interface{} + type SaveResult struct + BlockHeight uint64 + Success bool + TxID string + type Transaction struct + BlockHash string + BlockHeight uint64 + Blocktime int64 + Confirmations uint64 + Decimals int32 + Fees string + Hex string + IsCoinBase bool + LockTime int64 + Size uint64 + TxID string + Type int32 + Version uint64 + Vins []*Vin + Vouts []*Vout + type TransactionDecoder struct + func NewTransactionDecoder(wm *WalletManager) *TransactionDecoder + func (decoder *TransactionDecoder) CreateELARawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateELASummaryRawTransaction(wrapper openwallet.WalletDAI, sumRawTx *openwallet.SummaryRawTransaction) ([]*openwallet.RawTransactionWithError, error) + func (decoder *TransactionDecoder) CreateRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateSummaryRawTransaction(wrapper openwallet.WalletDAI, sumRawTx *openwallet.SummaryRawTransaction) ([]*openwallet.RawTransaction, error) + func (decoder *TransactionDecoder) CreateSummaryRawTransactionWithError(wrapper openwallet.WalletDAI, sumRawTx *openwallet.SummaryRawTransaction) ([]*openwallet.RawTransactionWithError, error) + func (decoder *TransactionDecoder) GetRawTransactionFeeRate() (feeRate string, unit string, err error) + func (decoder *TransactionDecoder) SignELARawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) SignRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) SubmitRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) (*openwallet.Transaction, error) + func (decoder *TransactionDecoder) VerifyELARawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) VerifyRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + type UnscanRecord struct + BlockHeight uint64 + ID string + Reason string + TxID string + func NewUnscanRecord(height uint64, txID, reason string) *UnscanRecord + type Unspent struct + Address string + Amount string + Confirmations uint64 + HDAddress openwallet.Address + Key string + Solvable bool + Spendable bool + TxID string + Vout uint64 + func NewUnspent(json *gjson.Result) *Unspent + type UnspentSort struct + Comparator func(a, b *Unspent) int + Values []*Unspent + func (s UnspentSort) Len() int + func (s UnspentSort) Less(i, j int) bool + func (s UnspentSort) Swap(i, j int) + type User struct + Age int + Email string + Group string + Name string + UserKey string + type Vin struct + Addr string + Coinbase string + N uint64 + TxID string + Value string + Vout uint64 + type Vout struct + Addr string + AssetID string + Lock uint64 + N uint64 + Type string + Value string + type WalletConfig struct + BlockchainFile string + CertFileName string + CertsDir string + CoreWalletWatchOnly bool + CurveType uint32 + CycleSeconds time.Duration + Decimals int32 + DefaultConfig string + FixedFee string + MasterKey string + MaxTxInputs int + NodeInstallPath string + RpcPassword string + RpcUser string + ServerAPI string + SumAddress string + Symbol string + Threshold decimal.Decimal + UseFixedFee bool + WalletDataPath string + WalletPassword string + func NewConfig(symbol string, curveType uint32, decimals int32) *WalletConfig + func (wc *WalletConfig) InitConfig() + func (wc *WalletConfig) PrintConfig() error + type WalletManager struct + Blockscanner *ELABlockScanner + Config *WalletConfig + ContractDecoder openwallet.SmartContractDecoder + Decoder AddressDecoder + Log *log.OWLogger + Storage *hdkeystore.HDKeystore + TxDecoder openwallet.TransactionDecoder + WalletClient *Client + WalletsInSum map[string]*openwallet.Wallet + func NewWalletManager() *WalletManager + func (wm *WalletManager) BalanceModelType() openwallet.BalanceModelType + func (wm *WalletManager) CurveType() uint32 + func (wm *WalletManager) Decimal() int32 + func (wm *WalletManager) DeleteUnscanRecord(height uint64) error + func (wm *WalletManager) DeleteUnscanRecordNotFindTX() error + func (wm *WalletManager) EstimateFee(inputs, outputs, sigs int64, feeRate decimal.Decimal) (decimal.Decimal, error) + func (wm *WalletManager) EstimateFeeRate() (decimal.Decimal, error) + func (wm *WalletManager) FullName() string + func (wm *WalletManager) GetAddressDecode() openwallet.AddressDecoder + func (wm *WalletManager) GetAssetsLogger() *log.OWLogger + func (wm *WalletManager) GetBlock(hash string) (*Block, error) + func (wm *WalletManager) GetBlockHash(height uint64) (string, error) + func (wm *WalletManager) GetBlockHeight() (uint64, error) + func (wm *WalletManager) GetBlockScanner() openwallet.BlockScanner + func (wm *WalletManager) GetLocalBlock(height uint64) (*Block, error) + func (wm *WalletManager) GetLocalNewBlock() (uint64, string) + func (wm *WalletManager) GetSmartContractDecoder() openwallet.SmartContractDecoder + func (wm *WalletManager) GetTransaction(txid string) (*Transaction, error) + func (wm *WalletManager) GetTransactionDecoder() openwallet.TransactionDecoder + func (wm *WalletManager) GetTxIDsInMemPool() ([]string, error) + func (wm *WalletManager) GetTxOut(txid string, vout uint64) (*Vout, error) + func (wm *WalletManager) GetUnscanRecords() ([]*UnscanRecord, error) + func (wm *WalletManager) InitAssetsConfig() (config.Configer, error) + func (wm *WalletManager) ListUnspent(min uint64, addresses ...string) ([]*Unspent, error) + func (wm *WalletManager) LoadAssetsConfig(c config.Configer) error + func (wm *WalletManager) SaveLocalBlock(block *Block) + func (wm *WalletManager) SaveLocalNewBlock(blockHeight uint64, blockHash string) + func (wm *WalletManager) SendRawTransaction(txHex string) (string, error) + func (wm *WalletManager) Symbol() string