Documentation ¶
Index ¶
- Variables
- func AesCTRXOR(key, inText, iv []byte) ([]byte, error)
- func EncryptKey(account Account, auth string) ([]byte, error)
- type Account
- type Accounts
- type KeyStore
- type Wallet
- func (w *Wallet) Accounts() (Accounts, error)
- func (w *Wallet) Delete(account Account, passphrase string) error
- func (w *Wallet) ExportRawKey(addr utils.Address, passphrase string) (string, error)
- func (w *Wallet) Find(addr utils.Address, passphrase string) (Account, error)
- func (w *Wallet) ImportRawKey(privkey string, passphrase string) (utils.Address, error)
- func (w *Wallet) NewAccount(passphrase string) (Account, error)
- func (w *Wallet) SignHash(addr utils.Address, passphrase string, hash []byte) ([]byte, error)
- func (w *Wallet) SignTx(addr utils.Address, tx *types.Transaction, passphrase string) (*types.Transaction, error)
- func (w *Wallet) Update(account Account, passphrase, newPassphrase string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoMatch = errors.New("no key for given address or file") ErrDecrypt = errors.New("could not decrypt key with given passphrase") )
Functions ¶
Types ¶
type Account ¶
type Account struct { Address utils.Address `json:"address"` PrivateKey *ecdsa.PrivateKey `json:"privatekey,omitempty" ` FileName string `json:"filename"` }
Account represents an uranus account.
func DecryptKey ¶
DecryptKey returns the decrypted key via auth
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore definition
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet represents a software wallet.
func (*Wallet) ExportRawKey ¶
ExportRawKey returns key hex.
func (*Wallet) ImportRawKey ¶
ImportRawKey import key in to key store.
func (*Wallet) NewAccount ¶
NewAccount creates a new account
func (*Wallet) SignHash ¶
SignHash signs hash if the private key matching the given address can be decrypted with the given passphrase.
Click to show internal directories.
Click to hide internal directories.