Versions in this module Expand all Collapse all v1 v1.0.0 Mar 14, 2022 Changes in this version + const ExternalAPIVersion + const InternalAPIVersion + var ApplicationClique = SigFormat + var DataTyped = SigFormat + var ErrRequestDenied = errors.New("request denied") + var IntendedValidator = SigFormat + var TextPlain = SigFormat + func SignTextValidator(validatorData ValidatorData) (hexutil.Bytes, string) + func StartClefAccountManager(ksLocation string, nousb, lightKDF bool, scpath string) *accounts.Manager + func ValidatePasswordFormat(password string) error + type AuditLogger struct + func NewAuditLogger(path string, api ExternalAPI) (*AuditLogger, error) + func (l *AuditLogger) EcRecover(ctx context.Context, data hexutil.Bytes, sig hexutil.Bytes) (common.Address, error) + func (l *AuditLogger) List(ctx context.Context) ([]common.Address, error) + func (l *AuditLogger) New(ctx context.Context) (common.Address, error) + func (l *AuditLogger) SignData(ctx context.Context, contentType string, addr common.MixedcaseAddress, ...) (hexutil.Bytes, error) + func (l *AuditLogger) SignGnosisSafeTx(ctx context.Context, addr common.MixedcaseAddress, gnosisTx GnosisSafeTx, ...) (*GnosisSafeTx, error) + func (l *AuditLogger) SignTransaction(ctx context.Context, args apitypes.SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + func (l *AuditLogger) SignTypedData(ctx context.Context, addr common.MixedcaseAddress, data TypedData) (hexutil.Bytes, error) + func (l *AuditLogger) Version(ctx context.Context) (string, error) + type CommandlineUI struct + func NewCommandlineUI() *CommandlineUI + 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) RegisterUIServer(api *UIServerAPI) + func (ui *CommandlineUI) ShowError(message string) + func (ui *CommandlineUI) ShowInfo(message string) + type ExternalAPI interface + EcRecover func(ctx context.Context, data hexutil.Bytes, sig hexutil.Bytes) (common.Address, error) + List func(ctx context.Context) ([]common.Address, error) + New func(ctx context.Context) (common.Address, error) + SignData func(ctx context.Context, contentType string, addr common.MixedcaseAddress, ...) (hexutil.Bytes, error) + SignGnosisSafeTx func(ctx context.Context, signerAddress common.MixedcaseAddress, ...) (*GnosisSafeTx, error) + SignTransaction func(ctx context.Context, args apitypes.SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + SignTypedData func(ctx context.Context, addr common.MixedcaseAddress, data TypedData) (hexutil.Bytes, error) + Version func(ctx context.Context) (string, error) + type GnosisSafeTx struct + BaseGas big.Int + Data *hexutil.Bytes + GasPrice math.Decimal256 + GasToken common.Address + InputExpHash common.Hash + Nonce big.Int + Operation uint8 + RefundReceiver common.Address + Safe common.MixedcaseAddress + SafeTxGas big.Int + SafeTxHash common.Hash + Sender common.MixedcaseAddress + Signature hexutil.Bytes + To common.MixedcaseAddress + Value math.Decimal256 + func (tx *GnosisSafeTx) ArgsForValidation() *apitypes.SendTxArgs + func (tx *GnosisSafeTx) ToTypedData() TypedData + type ListRequest struct + Accounts []accounts.Account + Meta Metadata + type ListResponse struct + Accounts []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 NameValueType struct + Name string + Typ string + Value interface{} + func (nvt *NameValueType) Pprint(depth int) string + type NewAccountRequest struct + Meta Metadata + type NewAccountResponse struct + Approved bool + type SigFormat struct + ByteVersion byte + Mime string + type SignDataRequest struct + Address common.MixedcaseAddress + Callinfo []apitypes.ValidationInfo + ContentType string + Hash hexutil.Bytes + Messages []*NameValueType + Meta Metadata + Rawdata []byte + type SignDataResponse struct + Approved bool + type SignTxRequest struct + Callinfo []apitypes.ValidationInfo + Meta Metadata + Transaction apitypes.SendTxArgs + type SignTxResponse struct + Approved bool + Transaction apitypes.SendTxArgs + type SignerAPI struct + UI UIClientAPI + func NewSignerAPI(am *accounts.Manager, chainID int64, noUSB bool, ui UIClientAPI, ...) *SignerAPI + func (api *SignerAPI) EcRecover(ctx context.Context, data hexutil.Bytes, sig hexutil.Bytes) (common.Address, error) + func (api *SignerAPI) List(ctx context.Context) ([]common.Address, error) + func (api *SignerAPI) New(ctx context.Context) (common.Address, error) + func (api *SignerAPI) SignData(ctx context.Context, contentType string, addr common.MixedcaseAddress, ...) (hexutil.Bytes, error) + func (api *SignerAPI) SignGnosisSafeTx(ctx context.Context, signerAddress common.MixedcaseAddress, ...) (*GnosisSafeTx, error) + func (api *SignerAPI) SignTransaction(ctx context.Context, args apitypes.SendTxArgs, methodSelector *string) (*ethapi.SignTransactionResult, error) + func (api *SignerAPI) SignTypedData(ctx context.Context, addr common.MixedcaseAddress, typedData TypedData) (hexutil.Bytes, error) + func (api *SignerAPI) Version(ctx context.Context) (string, error) + type StartupInfo struct + Info map[string]interface{} + type StdIOUI struct + func NewStdIOUI() *StdIOUI + 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) RegisterUIServer(api *UIServerAPI) + func (ui *StdIOUI) ShowError(message string) + func (ui *StdIOUI) ShowInfo(message string) + type Type struct + Name string + Type string + type TypePriority struct + Type string + Value uint + type TypedData struct + Domain TypedDataDomain + Message TypedDataMessage + PrimaryType string + Types Types + func (typedData *TypedData) Dependencies(primaryType string, found []string) []string + func (typedData *TypedData) EncodeData(primaryType string, data map[string]interface{}, depth int) (hexutil.Bytes, error) + func (typedData *TypedData) EncodePrimitiveValue(encType string, encValue interface{}, depth int) ([]byte, error) + func (typedData *TypedData) EncodeType(primaryType string) hexutil.Bytes + func (typedData *TypedData) Format() ([]*NameValueType, error) + func (typedData *TypedData) HashStruct(primaryType string, data TypedDataMessage) (hexutil.Bytes, error) + func (typedData *TypedData) Map() map[string]interface{} + func (typedData *TypedData) TypeHash(primaryType string) hexutil.Bytes + type TypedDataDomain struct + ChainId *math.HexOrDecimal256 + Name string + Salt string + VerifyingContract string + Version string + func (domain *TypedDataDomain) Map() map[string]interface{} + type TypedDataMessage = map[string]interface + type Types map[string][]Type + type UIClientAPI interface + 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) + RegisterUIServer func(api *UIServerAPI) + ShowError func(message string) + ShowInfo func(message string) + type UIServerAPI struct + func NewUIServerAPI(extapi *SignerAPI) *UIServerAPI + func (api *UIServerAPI) Import(ctx context.Context, keyJSON json.RawMessage, ...) (accounts.Account, error) + func (api *UIServerAPI) New(ctx context.Context) (common.Address, error) + func (s *UIServerAPI) ChainId() math.HexOrDecimal64 + func (s *UIServerAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) + func (s *UIServerAPI) Export(ctx context.Context, addr common.Address) (json.RawMessage, error) + func (s *UIServerAPI) ImportRawKey(privkey string, password string) (accounts.Account, error) + func (s *UIServerAPI) ListAccounts(ctx context.Context) ([]accounts.Account, error) + func (s *UIServerAPI) ListWallets() []rawWallet + func (s *UIServerAPI) OpenWallet(url string, passphrase *string) error + func (s *UIServerAPI) SetChainId(id math.HexOrDecimal64) math.HexOrDecimal64 + type UserInputRequest struct + IsPassword bool + Prompt string + Title string + type UserInputResponse struct + Text string + type Validator interface + ValidateTransaction func(selector *string, tx *apitypes.SendTxArgs) (*apitypes.ValidationMessages, error) + type ValidatorData struct + Address common.Address + Message hexutil.Bytes + func UnmarshalValidatorData(data interface{}) (ValidatorData, error)