Versions in this module Expand all Collapse all v1 v1.8.21 Jan 21, 2019 Changes in this version + const CRIT + const INFO + const WARN + var ErrRequestDenied = errors.New("Request denied") + var Printable7BitAscii = regexp.MustCompile("^[A-Za-z0-9!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ]+$") + func MethodSelectorToAbi(selector string) ([]byte, error) + func SignHash(data []byte) ([]byte, string) + func ValidatePasswordFormat(password string) error + type AbiDb struct + func NewAbiDBFromFile(path string) (*AbiDb, error) + func NewAbiDBFromFiles(standard, custom string) (*AbiDb, error) + func NewEmptyAbiDB() (*AbiDb, error) + func (db *AbiDb) AddSignature(selector string, data []byte) error + func (db *AbiDb) LookupMethodSelector(id []byte) (string, error) + func (db *AbiDb) Size() int + type Account struct + Address common.Address + Typ string + URL accounts.URL + func (a Account) String() string + type Accounts []Account + func (as Accounts) String() string + type AuditLogger struct + func NewAuditLogger(path string, api ExternalAPI) (*AuditLogger, error) + func (l *AuditLogger) Export(ctx context.Context, addr common.Address) (json.RawMessage, error) + func (l *AuditLogger) List(ctx context.Context) ([]common.Address, error) + func (l *AuditLogger) New(ctx context.Context) (accounts.Account, error) + func (l *AuditLogger) Sign(ctx context.Context, addr common.MixedcaseAddress, data hexutil.Bytes) (hexutil.Bytes, error) + func (l *AuditLogger) SignTransaction(ctx context.Context, args SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + type CommandlineUI struct + func NewCommandlineUI() *CommandlineUI + func (ui *CommandlineUI) ApproveExport(request *ExportRequest) (ExportResponse, error) + func (ui *CommandlineUI) ApproveImport(request *ImportRequest) (ImportResponse, error) + func (ui *CommandlineUI) ApproveListing(request *ListRequest) (ListResponse, error) + func (ui *CommandlineUI) ApproveNewAccount(request *NewAccountRequest) (NewAccountResponse, error) + func (ui *CommandlineUI) ApproveSignData(request *SignDataRequest) (SignDataResponse, error) + func (ui *CommandlineUI) ApproveTx(request *SignTxRequest) (SignTxResponse, error) + func (ui *CommandlineUI) OnApprovedTx(tx ethapi.SignTransactionResult) + func (ui *CommandlineUI) OnInputRequired(info UserInputRequest) (UserInputResponse, error) + func (ui *CommandlineUI) OnSignerStartup(info StartupInfo) + func (ui *CommandlineUI) ShowError(message string) + func (ui *CommandlineUI) ShowInfo(message string) + type ExportRequest struct + Address common.Address + Meta Metadata + type ExportResponse struct + Approved bool + type ExternalAPI interface + Export func(ctx context.Context, addr common.Address) (json.RawMessage, error) + List func(ctx context.Context) ([]common.Address, error) + New func(ctx context.Context) (accounts.Account, error) + Sign func(ctx context.Context, addr common.MixedcaseAddress, data hexutil.Bytes) (hexutil.Bytes, error) + SignTransaction func(ctx context.Context, args SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + type ImportRequest struct + Meta Metadata + type ImportResponse struct + Approved bool + NewPassword string + OldPassword string + type ListRequest struct + Accounts []Account + Meta Metadata + type ListResponse struct + Accounts []Account + type Message struct + Text string + type Metadata struct + Local string + Origin string + Remote string + Scheme string + UserAgent string + func MetadataFromContext(ctx context.Context) Metadata + func (m Metadata) String() string + type NewAccountRequest struct + Meta Metadata + type NewAccountResponse struct + Approved bool + Password string + type PasswordRequest struct + Prompt string + type PasswordResponse struct + Password string + type SendTxArgs struct + Data *hexutil.Bytes + From common.MixedcaseAddress + Gas hexutil.Uint64 + GasPrice hexutil.Big + Input *hexutil.Bytes + Nonce hexutil.Uint64 + To *common.MixedcaseAddress + Value hexutil.Big + func (args SendTxArgs) String() string + type SignDataRequest struct + Address common.MixedcaseAddress + Hash hexutil.Bytes + Message string + Meta Metadata + Rawdata hexutil.Bytes + type SignDataResponse struct + Approved bool + Password string + type SignTxRequest struct + Callinfo []ValidationInfo + Meta Metadata + Transaction SendTxArgs + type SignTxResponse struct + Approved bool + Password string + Transaction SendTxArgs + type SignerAPI struct + UI SignerUI + func NewSignerAPI(chainID int64, ksLocation string, noUSB bool, ui SignerUI, abidb *AbiDb, ...) *SignerAPI + func (api *SignerAPI) Export(ctx context.Context, addr common.Address) (json.RawMessage, error) + func (api *SignerAPI) Import(ctx context.Context, keyJSON json.RawMessage) (Account, error) + func (api *SignerAPI) List(ctx context.Context) ([]common.Address, error) + func (api *SignerAPI) New(ctx context.Context) (accounts.Account, error) + func (api *SignerAPI) Sign(ctx context.Context, addr common.MixedcaseAddress, data hexutil.Bytes) (hexutil.Bytes, error) + func (api *SignerAPI) SignTransaction(ctx context.Context, args SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + type SignerUI interface + ApproveExport func(request *ExportRequest) (ExportResponse, error) + ApproveImport func(request *ImportRequest) (ImportResponse, error) + ApproveListing func(request *ListRequest) (ListResponse, error) + ApproveNewAccount func(request *NewAccountRequest) (NewAccountResponse, error) + ApproveSignData func(request *SignDataRequest) (SignDataResponse, error) + ApproveTx func(request *SignTxRequest) (SignTxResponse, error) + OnApprovedTx func(tx ethapi.SignTransactionResult) + OnInputRequired func(info UserInputRequest) (UserInputResponse, error) + OnSignerStartup func(info StartupInfo) + ShowError func(message string) + ShowInfo func(message string) + type StartupInfo struct + Info map[string]interface{} + type StdIOUI struct + func NewStdIOUI() *StdIOUI + func (ui *StdIOUI) ApproveExport(request *ExportRequest) (ExportResponse, error) + func (ui *StdIOUI) ApproveImport(request *ImportRequest) (ImportResponse, error) + func (ui *StdIOUI) ApproveListing(request *ListRequest) (ListResponse, error) + func (ui *StdIOUI) ApproveNewAccount(request *NewAccountRequest) (NewAccountResponse, error) + func (ui *StdIOUI) ApproveSignData(request *SignDataRequest) (SignDataResponse, error) + func (ui *StdIOUI) ApproveTx(request *SignTxRequest) (SignTxResponse, error) + func (ui *StdIOUI) OnApprovedTx(tx ethapi.SignTransactionResult) + func (ui *StdIOUI) OnInputRequired(info UserInputRequest) (UserInputResponse, error) + func (ui *StdIOUI) OnSignerStartup(info StartupInfo) + func (ui *StdIOUI) ShowError(message string) + func (ui *StdIOUI) ShowInfo(message string) + type UserInputRequest struct + IsPassword bool + Prompt string + Title string + type UserInputResponse struct + Text string + type ValidationInfo struct + Message string + Typ string + type ValidationMessages struct + Messages []ValidationInfo + type Validator struct + func NewValidator(db *AbiDb) *Validator + func (v *Validator) ValidateTransaction(txArgs *SendTxArgs, methodSelector *string) (*ValidationMessages, error)