accountabstraction

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "any-ns.aa"

Variables

This section is empty.

Functions

func New

func New() app.Component

Types

type AccountAbstractionService

type AccountAbstractionService interface {
	GetOperation(ctx context.Context, operationID string) (info *OperationInfo, err error)

	// each EOA has an associated smart wallet address
	// even if it is not deployed yet - we can determine it
	GetSmartWalletAddress(ctx context.Context, eoa common.Address) (address common.Address, err error)
	IsScwDeployed(ctx context.Context, scw common.Address) (bool, error)
	GetNamesCountLeft(ctx context.Context, scw common.Address) (count uint64, err error)

	// will mint + approve tokens to the specified smart wallet
	AdminMintAccessTokens(ctx context.Context, scw common.Address, amount *big.Int) (operationID string, err error)
	// use it to register a name on behalf of a user
	AdminNameRegister(ctx context.Context, in *nsp.NameRegisterRequest) (operationID string, err error)
	AdminNameRenew(ctx context.Context, in *nsp.NameRenewRequest) (operationID string, err error)

	// get data to sign with your PK:
	GetDataNameRegister(ctx context.Context, in *nsp.NameRegisterRequest) (dataOut []byte, contextData []byte, err error)
	GetDataNameRegisterForSpace(ctx context.Context, in *nsp.NameRegisterForSpaceRequest) (dataOut []byte, contextData []byte, err error)

	// after data is signed - now you are ready to send it
	// contextData was received from functions like GetDataNameRegister and should be left intact
	SendUserOperation(ctx context.Context, contextData []byte, signedByUserData []byte) (operationID string, err error)

	app.Component
}

type OperationInfo

type OperationInfo struct {
	OperationState nsp.OperationState
}

Directories

Path Synopsis
Package mock_accountabstraction is a generated GoMock package.
Package mock_accountabstraction is a generated GoMock package.

Jump to

Keyboard shortcuts

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