account

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ValidatorTypeSudo       = "0x00"
	ValidatorTypeSecondary  = "0x01"
	ValidatorTypePermission = "0x02"
)
View Source
const (
	EcdsaValidatorAddress = "0x845ADb2C711129d4f3966735eD98a9F09fC4cE57"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountMetadata

type AccountMetadata struct {
	Fields            [1]byte        `json:"fields"`
	Name              string         `json:"name"`
	Version           string         `json:"version"`
	ChainId           *big.Int       `json:"chainId"`
	VerifyingContract common.Address `json:"verifyingContract"`
	Salt              [32]byte       `json:"salt"`
	Extensions        []*big.Int     `json:"extensions"`
}

func GetAccountMetadata

func GetAccountMetadata(client types.RPCClient, address common.Address) (*AccountMetadata, error)

type EcdsaValidator

type EcdsaValidator struct {
	Type    []byte
	Address common.Address
}

func NewEcdsaValidator

func NewEcdsaValidator() *EcdsaValidator

func (*EcdsaValidator) GetAddress

func (e *EcdsaValidator) GetAddress() common.Address

func (*EcdsaValidator) GetIdentifier

func (e *EcdsaValidator) GetIdentifier() []byte

func (*EcdsaValidator) GetType

func (e *EcdsaValidator) GetType() []byte

type SmartAccountPrivateKeySigner

type SmartAccountPrivateKeySigner struct {
	Client          types.RPCClient
	Address         common.Address
	PrivateKey      *ecdsa.PrivateKey
	Validator       Validator
	AccountMetadata *AccountMetadata
}

func NewSmartAccountPrivateKeySigner

func NewSmartAccountPrivateKeySigner(client types.RPCClient, address common.Address, privateKey *ecdsa.PrivateKey) (*SmartAccountPrivateKeySigner, error)

func (*SmartAccountPrivateKeySigner) GetAddress

func (*SmartAccountPrivateKeySigner) SignHash

func (s *SmartAccountPrivateKeySigner) SignHash(hash common.Hash) ([]byte, error)

func (*SmartAccountPrivateKeySigner) SignMessage

func (s *SmartAccountPrivateKeySigner) SignMessage(message []byte) ([]byte, error)

func (*SmartAccountPrivateKeySigner) SignTypedData

func (s *SmartAccountPrivateKeySigner) SignTypedData(typedData *signer.TypedData) ([]byte, error)

func (*SmartAccountPrivateKeySigner) SignUserOperationHash

func (s *SmartAccountPrivateKeySigner) SignUserOperationHash(hash common.Hash) ([]byte, error)

type Validator

type Validator interface {
	GetType() []byte
	GetAddress() common.Address
	GetIdentifier() []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL