Versions in this module Expand all Collapse all v0 v0.0.2 Feb 16, 2024 Changes in this version + const Collect + const CollectOwn + const CollectSend + const Receive + const ReceiveOther + const Send + const Trc10 + const Trc20 + const Trx + var IsMulti bool + var RPC = struct{ ... } + func AesDecrypt(crypted, key []byte) ([]byte, error) + func AesEncrypt(origData, key []byte) ([]byte, error) + func GenerateRandomNumber(start int, end int, count int) []int + func Init() + func InitAddressDB(dsn string) + func InitAllContarctServer(ctx context.Context, exit chan<- struct{}) + func InitAllNode(url []string) + func InitConfig() + func InitContract(contracts []Contract) + func InitDB() + func InitLog() + func InitMainAndFee() + func InitMainNode(url string) + func InitSeed() + func InitWalletInfo() + func IsContract(contract string) bool + func NewPrivateKey() (int, *ecdsa.PrivateKey, error) + func PKCS7Padding(ciphertext []byte, blockSize int) []byte + func PKCS7UnPadding(origData []byte) []byte + func RunCollect() + func RunTransaction() + func Serv(ctx context.Context, rpcSev Service) *http.Server + type Account struct + Address string + Amount int64 + Ctime int64 + ID int64 + Index int + PrivateKey string + PublicKey string + User string + func SearchAccount(addr string) (*Account, error) + func (fh Account) TableName() string + type Balance struct + Address string + Amount int64 + Contract string + ID int64 + func (fh Balance) TableName() string + type Client struct + Count int64 + DBAddr string + DBAddrMulti string + Feelimit int64 + IsMulti bool + KeyStore string + LogLevel string + MainAddr string + MainAddr1 string + MainPri string + MainPri1 string + MinFee decimal.Decimal + NodeTrx string + NodeUrl []string + Password string + Password1 string + PerFee decimal.Decimal + Port string + Seed string + SeedPri string + type Collection struct + MinAmount decimal.Decimal + TimeIntervalMin int64 + type Contract struct + CollectionMinAmount decimal.Decimal + Contract string + Decimal int32 + Issuer string + Name string + Port string + Type string + type DB struct + func NewDB(url string) (*DB, error) + func (db *DB) Close() + func (db *DB) GetAccount(from int) ([]Account, error) + func (db *DB) GetAccountMaxIndex() int + func (db *DB) GetAccountWithAddr(addr string) (*Account, error) + func (db *DB) GetAccountWithBalance(startid int64, count int) ([]Account, error) + func (db *DB) GetAccountWithContractBalance(contract string, minAmount, startid int64, count int) ([]Balance, error) + func (db *DB) GetCollestTransactions(sTime, eTime int64, contract string) ([]Transactions, error) + func (db *DB) GetSumContractBalance(contract string) (map[string]int64, error) + func (db *DB) GetTransactions(contract, addr string, count, skip int) ([]Transactions, error) + func (db *DB) InsertAccount(account *Account) (int64, error) + func (db *DB) InsertBalance(account *Balance) (int64, error) + func (db *DB) InsertLastBlockHeight(num int64) (err error) + func (db *DB) InsertTransactions(transactions *Transactions) (int64, error) + func (db *DB) LoadLastBlockHeight() (int64, error) + func (db *DB) SearchBalance(contract, address string) (*Balance, error) + func (db *DB) SearchTransactions(txid string) (*Transactions, error) + func (db *DB) Session() *xorm.Session + func (db *DB) Sync() error + func (db *DB) UpdateAccount(account *Account) (int64, error) + type GlobalConf struct + Contracts []Contract + type OtherParam struct + Key string + Value string + func (fh OtherParam) TableName() string + type Scantraderecord struct + GoroutineNum int64 + MinScanBlock int64 + TimeIntervalSec int64 + type Service struct + Contract string + Port string + func (Service) SMD() smd.ServiceInfo + func (as Service) GetNewAddress() (string, error) + func (as Service) GetRecords(sTime, eTime int64) ([]util.SummaryData, error) + func (as Service) Getinfo() util.Info + func (as Service) ListTransactions(addr string, count, skip int) ([]util.Transactions, error) + func (as Service) SendToAddress(addr string, amount json.Number) (string, error) + func (as Service) ValidateAddress(addr string) util.ValidateAddress + func (s Service) Invoke(ctx context.Context, method string, params json.RawMessage) zenrpc.Response + type Transactions struct + Address string + Amount string + BlockHeight int64 + Contract string + Fee string + FromAddress string + ID int64 + PublicKey string + Timestamp int64 + TxID string + Type string