Documentation ¶
Index ¶
- func RecoverJson(sig []byte, v interface{}) common.Address
- func VerifyJsonSig(mainAddr common.Address, sig []byte, v interface{}) bool
- func VerifySig(mainAddr common.Address, sig []byte, hash []byte) bool
- type SWallet
- func (sw *SWallet) Address() common.Address
- func (sw *SWallet) ExportEth(auth, eAuth, path string) error
- func (sw *SWallet) Open(auth string) bool
- func (sw *SWallet) PriKey() *ecdsa.PrivateKey
- func (sw *SWallet) SaveToPath(path string) error
- func (sw *SWallet) Sign(v []byte) ([]byte, error)
- func (sw *SWallet) SignJson(v interface{}) ([]byte, error)
- func (sw *SWallet) String() string
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoverJson ¶
Types ¶
type SWallet ¶
type SWallet struct { Version int `json:"version"` Addr common.Address `json:"address"` Crypto keystore.CryptoJSON `json:"crypto"` PrivateKey *ecdsa.PrivateKey `json:"-"` }
func (*SWallet) PriKey ¶
func (sw *SWallet) PriKey() *ecdsa.PrivateKey
func (*SWallet) SaveToPath ¶
type Wallet ¶
type Wallet interface { String() string Address() common.Address Open(auth string) bool SaveToPath(path string) error SignJson(v interface{}) ([]byte, error) Sign(v []byte) ([]byte, error) ExportEth(auth, eAuth, path string) error PriKey() *ecdsa.PrivateKey }
func WalletOfJson ¶
func WalletOfPath ¶
Click to show internal directories.
Click to hide internal directories.