Versions in this module Expand all Collapse all v1 v1.0.7 Jan 9, 2020 Changes in this version + func GetTxId(rawTx string) (string, error) v1.0.6 Jan 8, 2020 v1.0.5 Jan 8, 2020 v1.0.4 Jan 8, 2020 v1.0.3 Jan 3, 2020 Changes in this version type NEOBlockScanner + func (bs *NEOBlockScanner) DeleteUnscanRecord(height uint64) error + func (bs *NEOBlockScanner) GetLocalBlock(height uint64) (*Block, error) + func (bs *NEOBlockScanner) GetLocalNewBlock() (uint64, string, error) + func (bs *NEOBlockScanner) GetUnscanRecords() ([]*openwallet.UnscanRecord, error) + func (bs *NEOBlockScanner) Pause() error + func (bs *NEOBlockScanner) Restart() error + func (bs *NEOBlockScanner) SaveLocalBlock(block *Block) error + func (bs *NEOBlockScanner) SaveLocalNewBlock(blockHeight uint64, blockHash string) error + func (bs *NEOBlockScanner) SupportBlockchainDAI() bool v1.0.2 Dec 26, 2019 Changes in this version + const AssetSymbolGAS + const AssetSymbolNEO + const CurveType + const Decimals + const MasterKey + const RPCServerCore + const RPCServerExplorer + const Symbol + var MainNetAddressPrefix = neoTransaction.AddressPrefix + var NEO_mainnetAddressP2PKH = addressEncoder.AddressType + var NEO_mainnetPrivateWIFCompressed = addressEncoder.AddressType + var NEO_testnetAddressP2PKH = addressEncoder.AddressType + var NEO_testnetPrivateWIFCompressed = addressEncoder.AddressType + var TestNetAddressPrefix = neoTransaction.AddressPrefix + func BasicAuth(username, password string) string + func DecodeScript(script string) ([]byte, error) + func NewAddressDecoder(wm *WalletManager) *addressDecoder + func NewUnspentTxs(json []gjson.Result) *[]UnspentTx + type AddressDecoder interface + ScriptPubKeyToBech32Address func(scriptPubKey []byte) (string, error) + type Attribute struct + Data string + Length uint8 + Usage uint64 + 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 + AccessToken string + BaseURL string + Debug bool + func NewClient(url, token string, debug bool) *Client + func (c *Client) Call(path string, request []interface{}) (*gjson.Result, error) + type ClientInterface interface + Call func(path string, request []interface{}) (*gjson.Result, error) + type ContractDecoder struct + func NewContractDecoder(wm *WalletManager) *ContractDecoder + func (decoder *ContractDecoder) GetTokenBalanceByAddress(contract openwallet.SmartContract, address ...string) ([]*openwallet.TokenBalance, error) + type Explorer struct + AccessToken string + BaseURL string + Debug bool + func NewExplorer(url string, debug bool) *Explorer + func (b *Explorer) Call(path string, request interface{}, method string) (*gjson.Result, error) + type ExtractResult struct + BlockHeight uint64 + IsOmniTransfer bool + Success bool + TxID string + type ExtractTxOriginResult struct + Success bool + Tx *Transaction + type NEOBlockScanNotificationObject interface + NEOBlockScanNotify func(block *Block, txs []*Transaction) error + type NEOBlockScanner struct + CurrentBlockHeight uint64 + IsScanMemPool bool + IsSkipFailedBlock bool + NEOBlockObservers map[NEOBlockScanNotificationObject]bool + RescanLastBlockCount uint64 + func NewNEOBlockScanner(wm *WalletManager) *NEOBlockScanner + func (bs *NEOBlockScanner) AddBTCBlockObserver(obj NEOBlockScanNotificationObject) error + func (bs *NEOBlockScanner) BatchExtractTransaction(blockHeight uint64, blockHash string, txs []string) error + func (bs *NEOBlockScanner) BatchExtractTransactionOrigin(block *Block) error + func (bs *NEOBlockScanner) ExtractTransaction(blockHeight uint64, blockHash string, txid string, ...) ExtractResult + func (bs *NEOBlockScanner) ExtractTransactionData(txid string, scanTargetFunc openwallet.BlockScanTargetFunc) (map[string][]*openwallet.TxExtractData, error) + func (bs *NEOBlockScanner) GetBalanceByAddress(address ...string) ([]*openwallet.Balance, error) + func (bs *NEOBlockScanner) GetCurrentBlockHeader() (*openwallet.BlockHeader, error) + func (bs *NEOBlockScanner) GetGlobalMaxBlockHeight() uint64 + func (bs *NEOBlockScanner) GetScannedBlockHeader() (*openwallet.BlockHeader, error) + func (bs *NEOBlockScanner) GetScannedBlockHeaderOrigin() (*openwallet.BlockHeader, error) + func (bs *NEOBlockScanner) GetScannedBlockHeight() uint64 + func (bs *NEOBlockScanner) GetTransactionsByAddress(offset, limit int, coin openwallet.Coin, address ...string) ([]*openwallet.TxExtractData, error) + func (bs *NEOBlockScanner) NewBTCBlockNotify(block *Block, isFork bool) + func (bs *NEOBlockScanner) RemoveBTCBlockObserver(obj NEOBlockScanNotificationObject) error + func (bs *NEOBlockScanner) RescanFailedRecord() + func (bs *NEOBlockScanner) Run() error + func (bs *NEOBlockScanner) SaveUnscanRecord(record *UnscanRecord) error + func (bs *NEOBlockScanner) ScanBlock(height uint64) error + func (bs *NEOBlockScanner) ScanBlockTask() + func (bs *NEOBlockScanner) ScanBlockTaskOrigin() + func (bs *NEOBlockScanner) ScanTxMemPool() + func (bs *NEOBlockScanner) ScanTxMemPoolOrigin() + func (bs *NEOBlockScanner) SetRescanBlockHeight(height uint64) error + func (bs *NEOBlockScanner) SetScanBlockTaskOrigin() + func (bs *NEOBlockScanner) Stop() error + type OmniTransaction struct + Amount string + Block uint64 + BlockHash string + BlockTime int64 + Confirmations uint64 + Divisible bool + Fees string + IsMine string + PositionInBlock uint64 + PropertyId uint64 + ReferenceAddress string + SendingAddress string + TxID string + TypeInt uint64 + TypeStr string + Valid bool + Version uint64 + func NewOmniTx(json *gjson.Result) *OmniTransaction + 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 + Attributes *[]Attribute + BlockHash string + BlockHeight uint64 + Blocktime int64 + Confirmations uint64 + NetFee string + Size uint64 + SysFee string + TxID string + Type string + Version uint64 + Vins []*Vin + Vouts []*Vout + type TransactionDecoder struct + func NewTransactionDecoder(wm *WalletManager) *TransactionDecoder + func (decoder *TransactionDecoder) CreateNEORawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateNEOSummaryRawTransaction(wrapper openwallet.WalletDAI, sumRawTx *openwallet.SummaryRawTransaction) ([]*openwallet.RawTransactionWithError, error) + func (decoder *TransactionDecoder) CreateOmniRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateOmniSummaryRawTransaction(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) SignNEORawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) SignOmniRawTransaction(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) VerifyNEORawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) VerifyOmniRawTransaction(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 + Amount string + Asset string + AssetHash string + AssetSymbol string + UnspentTxs *[]UnspentTx + func NewUnspent(json *gjson.Result) *Unspent + type UnspentBalance struct + AccountID string + Address string + GASUnspent *Unspent + HDAddress openwallet.Address + Key string + NEOUnspent *Unspent + func NewUnspentBalance(json *gjson.Result) (*UnspentBalance, error) + type UnspentSort struct + Comparator func(a, b *UnspentBalance) int + Values []*UnspentBalance + func (s UnspentSort) Len() int + func (s UnspentSort) Less(i, j int) bool + func (s UnspentSort) Swap(i, j int) + type UnspentTx struct + N uint64 + TxID string + Value string + 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 + Asset string + N uint64 + ScriptPubKey string + Type string + Value string + type WalletConfig struct + BlockchainFile string + CertFileName string + CertsDir string + CoreWalletWatchOnly bool + CurveType uint32 + CycleSeconds time.Duration + DBPath string + DataDir string + Decimals int32 + DefaultConfig string + IsTestNet bool + MainNetAddressPrefix neoTransaction.AddressPrefix + MasterKey string + MaxTxInputs int + MinFees decimal.Decimal + NodeInstallPath string + OmniCoreAPI string + OmniRPCPassword string + OmniRPCUser string + OmniSupport bool + OmniTransferCost string + RPCServerType int + RpcPassword string + RpcUser string + ServerAPI string + SumAddress string + SupportSegWit bool + Symbol string + TestNetAddressPrefix neoTransaction.AddressPrefix + Threshold decimal.Decimal + 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 *NEOBlockScanner + Config *WalletConfig + ContractDecoder *ContractDecoder + Decoder AddressDecoder + ExplorerClient *Explorer + Log *log.OWLogger + OnmiClient *Client + Storage *hdkeystore.HDKeystore + TxDecoder openwallet.TransactionDecoder + WalletClient *Client + WalletsInSum map[string]*openwallet.Wallet + func NewWalletManager() *WalletManager + func (wm *WalletManager) AddMultiSigAddress(required uint64, addresses []string) (string, string, error) + func (wm *WalletManager) AddWalletInSummary(wid string, wallet *openwallet.Wallet) + func (wm *WalletManager) BackupWallet(walletID string) (string, error) + func (wm *WalletManager) BackupWalletData(dest string) error + func (wm *WalletManager) BackupWalletFlow() error + func (wm *WalletManager) BuildTransaction(utxos []*Unspent, to []string, change string, amount []decimal.Decimal, ...) (string, decimal.Decimal, error) + func (wm *WalletManager) ClaimGAS(address string) error + func (wm *WalletManager) CreateAddressFlow() error + func (wm *WalletManager) CreateBatchAddress(name, password string, count uint64) (string, []*openwallet.Address, error) + func (wm *WalletManager) CreateChangeAddress(walletID string, key *hdkeystore.HDKey) (*openwallet.Address, error) + func (wm *WalletManager) CreateNewPrivateKey(accountID string, key *owkeychain.ExtendedKey, derivedPath string, ...) (string, *openwallet.Address, error) + func (wm *WalletManager) CreateNewWallet(name, password string) (*openwallet.Wallet, string, error) + func (wm *WalletManager) CreateReceiverAddress(account string) (string, error) + func (wm *WalletManager) CreateWalletFlow() error + 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) DumpWallet(filename string) error + func (wm *WalletManager) EncryptWallet(password string) error + func (wm *WalletManager) EstimateFee(inputs, outputs int64, feeRate decimal.Decimal) (decimal.Decimal, error) + func (wm *WalletManager) EstimateFeeRate() (decimal.Decimal, error) + func (wm *WalletManager) FullName() string + func (wm *WalletManager) GenerateSeed() []byte + func (wm *WalletManager) GetAddressBalance(walletID, address string) string + func (wm *WalletManager) GetAddressDecode() openwallet.AddressDecoder + func (wm *WalletManager) GetAddressWithBalance(address ...*openwallet.Address) error + func (wm *WalletManager) GetAddressesByAccount(walletID string) ([]string, error) + func (wm *WalletManager) GetAssetsLogger() *log.OWLogger + func (wm *WalletManager) GetBestBlockHash() (string, error) + func (wm *WalletManager) GetBlock(hash string) (*Block, error) + func (wm *WalletManager) GetBlockByHeight(height uint64, format ...interface{}) (*Block, error) + func (wm *WalletManager) GetBlockChainInfo() (*BlockchainInfo, error) + func (wm *WalletManager) GetBlockHash(height uint64) (string, error) + func (wm *WalletManager) GetBlockHeight() (uint64, error) + func (wm *WalletManager) GetBlockScanner() openwallet.BlockScanner + func (wm *WalletManager) GetCoreWalletinfo() error + func (wm *WalletManager) GetLocalBlock(height uint64) (*Block, error) + func (wm *WalletManager) GetLocalNewBlock() (uint64, string) + func (wm *WalletManager) GetNetworkInfo() error + func (wm *WalletManager) GetOmniBalance(propertyId uint64, address string) (decimal.Decimal, error) + func (wm *WalletManager) GetOmniBestBlockHash() (string, error) + func (wm *WalletManager) GetOmniBlockHash(height uint64) (string, error) + func (wm *WalletManager) GetOmniBlockHeight() (uint64, error) + func (wm *WalletManager) GetOmniInfo() (*gjson.Result, error) + func (wm *WalletManager) GetOmniProperty(propertyId uint64) (*gjson.Result, error) + func (wm *WalletManager) GetOmniTransaction(txid string) (*OmniTransaction, error) + 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) GetWalletBalance(accountID string) string + func (wm *WalletManager) GetWalletInfo(walletID string) (*openwallet.Wallet, error) + func (wm *WalletManager) GetWalletList() error + func (wm *WalletManager) GetWallets() ([]*openwallet.Wallet, error) + func (wm *WalletManager) ImportAddress(address, account string) error + func (wm *WalletManager) ImportMulti(addresses []*openwallet.Address, keys []string, watchOnly bool) ([]int, error) + func (wm *WalletManager) ImportPrivKey(wif, walletID string) error + func (wm *WalletManager) ImportWallet(filename string) error + func (wm *WalletManager) ImportWatchOnlyAddress(address ...*openwallet.Address) error + func (wm *WalletManager) InitAssetsConfig() (config.Configer, error) + func (wm *WalletManager) InitConfigFlow() error + func (wm *WalletManager) InitNodeConfigFlow() error + func (wm *WalletManager) InstallNodeFlow() error + func (wm *WalletManager) IsHaveOmniAssets(address string) bool + func (wm *WalletManager) KeyPoolRefill(keyPoolSize uint64) error + func (wm *WalletManager) ListUnspent(min uint64, addresses ...string) ([]*UnspentBalance, error) + func (wm *WalletManager) ListUnspentFromLocalDB(walletID string) ([]*Unspent, error) + func (wm *WalletManager) LoadAssetsConfig(c config.Configer) error + func (wm *WalletManager) LoadConfig() error + func (wm *WalletManager) LockWallet() error + func (wm *WalletManager) NewBlock(json *gjson.Result) *Block + func (wm *WalletManager) RebuildWalletUnspent(walletID string) error + func (wm *WalletManager) RestartNodeFlow() error + func (wm *WalletManager) RestoreWallet(keyFile, dbFile, datFile, password string) error + func (wm *WalletManager) RestoreWalletFlow() error + func (wm *WalletManager) SaveLocalBlock(block *Block) + func (wm *WalletManager) SaveLocalNewBlock(blockHeight uint64, blockHash string) + func (wm *WalletManager) SendBatchTransaction(walletID string, to []string, amounts []decimal.Decimal, password string) (string, error) + func (wm *WalletManager) SendRawTransaction(txHex string) (string, error) + func (wm *WalletManager) SendToAddress(address string, amount uint64) (string, error) + func (wm *WalletManager) SendTransaction(walletID, to string, amount decimal.Decimal, password string, ...) ([]string, error) + func (wm *WalletManager) SetConfigFlow(subCmd string) error + func (wm *WalletManager) ShowConfig() error + func (wm *WalletManager) ShowConfigInfo(subCmd string) error + func (wm *WalletManager) ShowNodeInfo() error + func (wm *WalletManager) SignRawTransactionInCoreWallet(txHex, walletID string, key *hdkeystore.HDKey, utxos []*UnspentBalance) (string, error) + func (wm *WalletManager) StartNodeFlow() error + func (wm *WalletManager) StopNodeFlow() error + func (wm *WalletManager) SummaryFollow() error + func (wm *WalletManager) SummaryWallets() + func (wm *WalletManager) Symbol() string + func (wm *WalletManager) TransferFlow() error + func (wm *WalletManager) UnlockWallet(passphrase string, seconds int) error