Documentation ¶
Index ¶
- Constants
- Variables
- func Verify(addr Address, data, sig []byte) bool
- type Address
- type BMWallet
- func (bmw *BMWallet) Address() Address
- func (bmw *BMWallet) AeskeyOf(peerPub []byte) ([]byte, error)
- func (bmw *BMWallet) Close()
- func (bmw *BMWallet) IsOpen() bool
- func (bmw *BMWallet) MailAddress() string
- func (bmw *BMWallet) Open(auth string) error
- func (bmw *BMWallet) SaveToPath(path string) error
- func (bmw *BMWallet) Seeds() []byte
- func (bmw *BMWallet) SetMailName(mailName string)
- func (bmw *BMWallet) Sign(v []byte) []byte
- func (bmw *BMWallet) SignObj(v interface{}) ([]byte, error)
- func (bmw *BMWallet) String() string
- type Wallet
Constants ¶
View Source
const ( AccPrefix = "BM" AccIDLen = 40 )
Variables ¶
View Source
var BMWalletVersion = 1
Functions ¶
Types ¶
type BMWallet ¶
type BMWallet struct { Version int `json:"version"` Addr Address `json:"address"` MailAddr string `json:"bmail"` CipherTxt string `json:"cipher"` PriKey ed25519.PrivateKey `json:"-"` }
func (*BMWallet) MailAddress ¶
func (*BMWallet) SaveToPath ¶
func (*BMWallet) SetMailName ¶
type Wallet ¶
type Wallet interface { Address() Address MailAddress() string String() string IsOpen() bool Open(auth string) error Close() SaveToPath(path string) error Sign(v []byte) []byte SignObj(v interface{}) ([]byte, error) SetMailName(mailName string) AeskeyOf(peerPub []byte) ([]byte, error) Seeds() []byte }
func LoadWallet ¶
func LoadWalletByData ¶
Click to show internal directories.
Click to hide internal directories.