Versions in this module Expand all Collapse all v0 v0.8.0 Nov 10, 2019 Changes in this version + const CodeIOError + const CodeInvalidDBPtr + const CodeInvalidIndex + const CodeInvalidWalletPtr + const MXONLOADDB + func CloseDB(dbptr Export_C_Int) + func MakeMsgHash(msg ...[]byte) []byte + func NewLevelDBHandler(dbpath *Export_C_Char) C.int + func NewWalletHandler(dbptr Export_C_Int, wltname *Export_C_Char) C.int + func NewWalletHandlerFromDB(dbptr Export_C_Int, wltname *Export_C_Char) C.int + func PreCheckWallet(wltptr Export_C_Int) C.int + func WalletAddress(wltptr Export_C_Int, idx Export_C_Int) unsafe.Pointer + func WalletExist(db *leveldb.DB, name string) (bool, error) + func WalletSign(wltptr Export_C_Int, idx Export_C_Int, msg unsafe.Pointer, ...) unsafe.Pointer + func WalletSignHash(wltptr Export_C_Int, idx Export_C_Int, msgHash unsafe.Pointer) unsafe.Pointer + func WalletVerifyByHash(wltptr Export_C_Int, idx Export_C_Int, signature unsafe.Pointer, ...) C.int + func WalletVerifyByRaw(wltptr Export_C_Int, idx Export_C_Int, signature unsafe.Pointer, ...) C.int + type Account struct + PrivateKey eddsa.PrivateKey + PublicKey eddsa.PublicKey + func NewAccount(seeds ...[]byte) *Account + func ReadAccount(PrivateKey []byte) *Account + func (acc *Account) Sign(msg ...[]byte) []byte + func (acc *Account) SignHash(msgHash []byte) []byte + func (acc *Account) VerifyByHash(signature []byte, msgHash []byte) bool + func (acc *Account) VerifyByRaw(signature []byte, msg ...[]byte) bool + type Export_C_Char C.char + type Export_C_Int C.int + type Wallet struct + Acc []*Account + func NewWallet(db *leveldb.DB, name string) *Wallet + func ReadWallet(db *leveldb.DB, name string) (*Wallet, error) + func (wlt *Wallet) AppendAccount(acc *Account) + func (wlt *Wallet) Save() error + func (wlt *Wallet) Sign(idx int, msg ...[]byte) []byte + func (wlt *Wallet) SignHash(idx int, msgHash []byte) []byte + func (wlt *Wallet) String() string + func (wlt *Wallet) VerifyByHash(idx int, signature []byte, msgHash []byte) bool + func (wlt *Wallet) VerifyByRaw(idx int, signature []byte, msg ...[]byte) bool