Versions in this module Expand all Collapse all v1 v1.2.4 Dec 13, 2020 v1.2.3 Nov 27, 2020 v1.2.2 Nov 13, 2020 v1.2.1 Nov 12, 2020 v1.2.0 Sep 21, 2020 v1.1.2 Jun 10, 2020 v1.1.1 Jun 5, 2020 v1.1.0 Mar 23, 2020 Changes in this version type WalletManager + DecoderV2 openwallet.AddressDecoderV2 + func (wm *WalletManager) GetAddressDecoderV2() openwallet.AddressDecoderV2 v1.0.4 Nov 16, 2019 v1.0.3 Nov 15, 2019 Changes in this version type ETPBlockScanner + func (bs *ETPBlockScanner) GetScannedBlockHeader() (*openwallet.BlockHeader, error) v1.0.2 Nov 15, 2019 v1.0.1 Nov 15, 2019 v1.0.0 Nov 15, 2019 Changes in this version + const CurveType + const Decimals + const Symbol + func NewAddressDecoder(wm *WalletManager) *addressDecoder + type AssetAttachment struct + Quantity string + Symbol string + type Block struct + Fork bool + Hash string + Height uint64 + Merkleroot string + Previousblockhash string + Time uint64 + Version uint64 + func (b *Block) BlockHeader(symbol string) *openwallet.BlockHeader + type Client struct + BaseURL string + Debug bool + func NewClient(url string, debug bool) *Client + func (c *Client) Call(path string, request []interface{}) (*gjson.Result, *openwallet.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 ETPBalance struct + Address string + Available string + Confirmed string + Frozen string + Received string + Unspent string + func NewETPBalance(json *gjson.Result) *ETPBalance + type ETPBlockScanner struct + CurrentBlockHeight uint64 + IsScanMemPool bool + RescanLastBlockCount uint64 + func NewETPBlockScanner(wm *WalletManager) *ETPBlockScanner + func (bs *ETPBlockScanner) BatchExtractTransaction(blockHeight uint64, blockHash string, txs []*Transaction) error + func (bs *ETPBlockScanner) DeleteUnscanRecord(height uint64) error + func (bs *ETPBlockScanner) ExtractTransaction(blockHeight uint64, blockHash string, trx *Transaction, ...) ExtractResult + func (bs *ETPBlockScanner) ExtractTransactionData(txid string, scanTargetFunc openwallet.BlockScanTargetFunc) (map[string][]*openwallet.TxExtractData, error) + func (bs *ETPBlockScanner) GetBalanceByAddress(address ...string) ([]*openwallet.Balance, error) + func (bs *ETPBlockScanner) GetCurrentBlockHeader() (*openwallet.BlockHeader, error) + func (bs *ETPBlockScanner) GetGlobalMaxBlockHeight() uint64 + func (bs *ETPBlockScanner) GetLocalBlock(height uint64) (*Block, error) + func (bs *ETPBlockScanner) GetLocalBlockHead() (uint64, string, error) + func (bs *ETPBlockScanner) GetScannedBlockHeight() uint64 + func (bs *ETPBlockScanner) GetUnscanRecords() ([]*openwallet.UnscanRecord, error) + func (bs *ETPBlockScanner) RescanFailedRecord() + func (bs *ETPBlockScanner) SaveLocalBlock(blockHeader *Block) error + func (bs *ETPBlockScanner) SaveLocalBlockHead(blockHeight uint64, blockHash string) error + func (bs *ETPBlockScanner) SaveUnscanRecord(record *openwallet.UnscanRecord) error + func (bs *ETPBlockScanner) ScanBlock(height uint64) error + func (bs *ETPBlockScanner) ScanBlockTask() + func (bs *ETPBlockScanner) SetRescanBlockHeight(height uint64) error + func (bs *ETPBlockScanner) SupportBlockchainDAI() bool + type ExtractData map[string]*openwallet.TxExtractData + type ExtractInput map[string][]*openwallet.TxInput + type ExtractOutput map[string][]*openwallet.TxOutPut + type ExtractResult struct + BlockHeight uint64 + Success bool + TxID string + type SaveResult struct + BlockHeight uint64 + Success bool + TxID string + type TokenBalance struct + Address string + Decimals int32 + LockedQuantity string + Quantity string + Status string + Symbol string + func NewTokenBalance(json *gjson.Result) *TokenBalance + type Transaction struct + BlockHash string + BlockHeight uint64 + Blocktime int64 + Decimals int32 + IsCoinBase bool + LockTime int64 + RawHex string + TxID string + Version uint64 + Vins []*Vin + Vouts []*Vout + type TransactionDecoder struct + func NewTransactionDecoder(wm *WalletManager) *TransactionDecoder + func (decoder *TransactionDecoder) CreateETPRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateETPSummaryRawTransaction(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) CreateTokenRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) CreateTokenSummaryRawTransaction(wrapper openwallet.WalletDAI, sumRawTx *openwallet.SummaryRawTransaction) ([]*openwallet.RawTransactionWithError, error) + func (decoder *TransactionDecoder) GetRawTransactionFeeRate() (feeRate string, unit string, err error) + func (decoder *TransactionDecoder) SignETPRawTransaction(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) VerifyETPRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + func (decoder *TransactionDecoder) VerifyRawTransaction(wrapper openwallet.WalletDAI, rawTx *openwallet.RawTransaction) error + type Vin struct + Addr string + AssetAttachment *AssetAttachment + IsToken bool + LockScript string + N uint64 + TxID string + Value string + Vout uint64 + func NewTxInput(json *gjson.Result) *Vin + type Vout struct + Addr string + AssetAttachment *AssetAttachment + IsToken bool + LockScript string + LockedHeightRange int64 + N uint64 + Type string + Value string + func NewTxOut(json *gjson.Result) *Vout + type WalletConfig struct + CurveType uint32 + DBPath string + DataDir string + IsTestNet bool + MaxTxInputs int + MinFees decimal.Decimal + ServerAPI string + Symbol string + func NewConfig(symbol string) *WalletConfig + type WalletManager struct + Blockscanner openwallet.BlockScanner + Config *WalletConfig + ContractDecoder openwallet.SmartContractDecoder + Decoder openwallet.AddressDecoder + Log *log.OWLogger + TxDecoder openwallet.TransactionDecoder + WalletClient *Client + func NewWalletManager() *WalletManager + func (wm *WalletManager) BalanceModelType() openwallet.BalanceModelType + func (wm *WalletManager) CreateRawTx(sender []string, receivers map[string]string, change, fees, symbol string, ...) (string, *openwallet.Error) + func (wm *WalletManager) CurveType() uint32 + func (wm *WalletManager) Decimal() int32 + func (wm *WalletManager) DecodeRawTx(rawHex string) (*Transaction, *openwallet.Error) + func (wm *WalletManager) FillInputFields(tx *Transaction) *openwallet.Error + func (wm *WalletManager) FullName() string + func (wm *WalletManager) GetAddressAsset(address, symbol string) (*TokenBalance, *openwallet.Error) + func (wm *WalletManager) GetAddressDecode() openwallet.AddressDecoder + func (wm *WalletManager) GetAddressETP(address string) (*ETPBalance, *openwallet.Error) + func (wm *WalletManager) GetAssetsLogger() *log.OWLogger + func (wm *WalletManager) GetBlockByHeight(height uint64) (*Block, *openwallet.Error) + func (wm *WalletManager) GetBlockHeader(height ...uint64) (*openwallet.BlockHeader, *openwallet.Error) + func (wm *WalletManager) GetBlockScanner() openwallet.BlockScanner + func (wm *WalletManager) GetInfo() (*gjson.Result, error) + func (wm *WalletManager) GetSmartContractDecoder() openwallet.SmartContractDecoder + func (wm *WalletManager) GetTransaction(txid string) (*Transaction, *openwallet.Error) + func (wm *WalletManager) GetTransactionDecoder() openwallet.TransactionDecoder + func (wm *WalletManager) InitAssetsConfig() (config.Configer, error) + func (wm *WalletManager) LoadAssetsConfig(c config.Configer) error + func (wm *WalletManager) NewBlock(json *gjson.Result) *Block + func (wm *WalletManager) NewTransaction(json *gjson.Result) *Transaction + func (wm *WalletManager) SendRawTx(rawHex string) (string, *openwallet.Error) + func (wm *WalletManager) Symbol() string