Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MetricSignTransactionTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "signer_signtransaction_total", Help: ""}, []string{"client", "status", "error"}, ) )
Functions ¶
func NewAuthMiddleware ¶
func NewAuthMiddleware() oprpc.Middleware
Types ¶
type AuthConfig ¶
type AuthConfig struct { // ClientName DNS name of the client connecting to op-signer. ClientName string `yaml:"name"` // KeyName key resource name of the Cloud KMS KeyName string `yaml:"key"` // ChainID chain id of the op-signer to sign for ChainID uint64 `yaml:"chainID"` // FromAddress sender address that is sending the rpc request FromAddress common.Address `yaml:"fromAddress"` ToAddresses []string `yaml:"toAddresses"` MaxValue string `yaml:"maxValue"` }
func (AuthConfig) MaxValueToInt ¶
func (c AuthConfig) MaxValueToInt() *big.Int
type ClientInfo ¶
type ClientInfo struct {
ClientName string
}
func ClientInfoFromContext ¶
func ClientInfoFromContext(ctx context.Context) ClientInfo
type EthService ¶ added in v1.2.0
type EthService struct {
// contains filtered or unexported fields
}
func (*EthService) SignTransaction ¶ added in v1.2.0
func (s *EthService) SignTransaction(ctx context.Context, args signer.TransactionArgs) (hexutil.Bytes, error)
SignTransaction will sign the given transaction with the key configured for the authenticated client
type InvalidBlockPayloadError ¶ added in v1.2.0
type InvalidBlockPayloadError struct {
// contains filtered or unexported fields
}
func (*InvalidBlockPayloadError) Error ¶ added in v1.2.0
func (e *InvalidBlockPayloadError) Error() string
func (*InvalidBlockPayloadError) ErrorCode ¶ added in v1.2.0
func (e *InvalidBlockPayloadError) ErrorCode() int
type InvalidTransactionError ¶
type InvalidTransactionError struct {
// contains filtered or unexported fields
}
func (*InvalidTransactionError) Error ¶
func (e *InvalidTransactionError) Error() string
func (*InvalidTransactionError) ErrorCode ¶
func (e *InvalidTransactionError) ErrorCode() int
type OpsignerSerivce ¶ added in v1.2.0
type OpsignerSerivce struct {
// contains filtered or unexported fields
}
func (*OpsignerSerivce) SignBlockPayload ¶ added in v1.2.0
func (s *OpsignerSerivce) SignBlockPayload(ctx context.Context, args signer.BlockPayloadArgs) (hexutil.Bytes, error)
type SignerService ¶
type SignerService struct {
// contains filtered or unexported fields
}
func NewSignerService ¶
func NewSignerService(logger log.Logger, config SignerServiceConfig) *SignerService
func NewSignerServiceWithProvider ¶
func NewSignerServiceWithProvider( logger log.Logger, config SignerServiceConfig, provider provider.SignatureProvider, ) *SignerService
func (*SignerService) RegisterAPIs ¶
func (s *SignerService) RegisterAPIs(server *oprpc.Server)
type SignerServiceConfig ¶
type SignerServiceConfig struct {
Auth []AuthConfig `yaml:"auth"`
}
func ReadConfig ¶
func ReadConfig(path string) (SignerServiceConfig, error)
func (SignerServiceConfig) GetAuthConfigForClient ¶
func (s SignerServiceConfig) GetAuthConfigForClient(clientName string, fromAddress *common.Address) (*AuthConfig, error)
type UnauthorizedBlockPayloadError ¶ added in v1.2.0
type UnauthorizedBlockPayloadError struct {
// contains filtered or unexported fields
}
func (*UnauthorizedBlockPayloadError) Error ¶ added in v1.2.0
func (e *UnauthorizedBlockPayloadError) Error() string
func (*UnauthorizedBlockPayloadError) ErrorCode ¶ added in v1.2.0
func (e *UnauthorizedBlockPayloadError) ErrorCode() int
type UnauthorizedTransactionError ¶
type UnauthorizedTransactionError struct {
// contains filtered or unexported fields
}
func (*UnauthorizedTransactionError) Error ¶
func (e *UnauthorizedTransactionError) Error() string
func (*UnauthorizedTransactionError) ErrorCode ¶
func (e *UnauthorizedTransactionError) ErrorCode() int
Click to show internal directories.
Click to hide internal directories.