Versions in this module Expand all Collapse all v0 v0.0.1 Oct 11, 2024 Changes in this version + const ExternalAPIVersion + const InternalAPIVersion + var ErrRequestDenied = errors.New("request denied") + func SignTextValidator(validatorData apitypes.ValidatorData) (hexutil.Bytes, string) + func StartClefAccountManager(ksLocation string, nousb, lightKDF bool, scpath string) *accounts.Manager + func UnmarshalValidatorData(data interface{}) (apitypes.ValidatorData, error) + 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 apitypes.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 apitypes.TypedData) (hexutil.Bytes, error) + Version func(ctx context.Context) (string, error) + type GnosisSafeTx struct + BaseGas big.Int + ChainId *math.HexOrDecimal256 + 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() apitypes.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 NewAccountRequest struct + Meta Metadata + type NewAccountResponse struct + Approved bool + type SignDataRequest struct + Address common.MixedcaseAddress + Callinfo []apitypes.ValidationInfo + ContentType string + Hash hexutil.Bytes + Messages []*apitypes.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, ...) (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 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) ChainId() math.HexOrDecimal64 + func (api *UIServerAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) + func (api *UIServerAPI) Export(ctx context.Context, addr common.Address) (json.RawMessage, error) + func (api *UIServerAPI) Import(ctx context.Context, keyJSON json.RawMessage, ...) (accounts.Account, error) + func (api *UIServerAPI) ImportRawKey(privkey string, password string) (accounts.Account, error) + func (api *UIServerAPI) ListAccounts(ctx context.Context) ([]accounts.Account, error) + func (api *UIServerAPI) ListWallets() []rawWallet + func (api *UIServerAPI) New(ctx context.Context) (common.Address, error) + func (api *UIServerAPI) OpenWallet(url string, passphrase *string) error + func (api *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)