Skip to content

Commit

Permalink
Merge pull request #6 from drdgvhbh/geth-1.9-stubs
Browse files Browse the repository at this point in the history
Add stubs for conform to the accounts.Wallet interface
  • Loading branch information
miguelmota authored Jul 20, 2019
2 parents 2da794f + fda7869 commit 5f6b316
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion hdwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (w *Wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
// user used previously (based on the chain state), but ones that he/she did not
// explicitly pin to the wallet manually. To avoid chain head monitoring, self
// derivation only runs during account listing (and even then throttled).
func (w *Wallet) SelfDerive(base accounts.DerivationPath, chain ethereum.ChainStateReader) {
func (w *Wallet) SelfDerive(base []accounts.DerivationPath, chain ethereum.ChainStateReader) {
// TODO: self derivation
}

Expand Down Expand Up @@ -357,6 +357,26 @@ func (w *Wallet) Path(account accounts.Account) (string, error) {
return account.URL.Path, nil
}

// SignData is not implemented
func (w *Wallet) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error) {
return nil, errors.New("not implemented")
}

// SignDataWithPassphrase is not implemented
func (w *Wallet) SignDataWithPassphrase(account accounts.Account, passphrase, mimeType string, data []byte) ([]byte, error) {
return nil, errors.New("not implemented")
}

// SignText is not implemented
func (w *Wallet) SignText(account accounts.Account, text []byte) ([]byte, error) {
return nil, errors.New("not implemented")
}

// SignTextWithPassphrase is not implemented
func (w *Wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, hash []byte) ([]byte, error) {
return nil, errors.New("not implemented")
}

// ParseDerivationPath parses the derivation path in string format into []uint32
func ParseDerivationPath(path string) (accounts.DerivationPath, error) {
return accounts.ParseDerivationPath(path)
Expand Down

0 comments on commit 5f6b316

Please sign in to comment.