Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPersonalSignAccount is returned when the account passed to // personal_sign isn't equal to the currently selected account. ErrInvalidPersonalSignAccount = errors.New("invalid account as only the selected one can generate a signature") )
Functions ¶
This section is empty.
Types ¶
type PublicAPI ¶
type PublicAPI struct {
// contains filtered or unexported fields
}
PublicAPI represents a set of APIs from the `web3.personal` namespace.
func (*PublicAPI) Recover ¶
func (api *PublicAPI) Recover(rpcParams RecoverParams) (addr common.Address, err error)
Recover is an implementation of `personal_ecRecover` or `web3.personal.ecRecover` API
func (*PublicAPI) Sign ¶
func (api *PublicAPI) Sign(rpcParams SignParams, verifiedAccount *account.SelectedExtKey) (result hexutil.Bytes, err error)
Sign is an implementation of `personal_sign` or `web3.personal.sign` API
type RecoverParams ¶ added in v0.11.0
RecoverParams are for calling `personal_ecRecover`
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents out own implementation of personal sign operations.
type SignParams ¶ added in v0.11.0
type SignParams struct { Data interface{} `json:"data"` Address string `json:"account"` Password string `json:"password"` }
SignParams required to sign messages
Click to show internal directories.
Click to hide internal directories.