alchemysdk

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func New

func New() app.Component

Types

type AlchemyAAService

type AlchemyAAService interface {
	// if factoryAddr is non-null -> will set init code
	CreateRequestGasAndPaymasterData(callData []byte, sender common.Address, senderScw common.Address, nonce uint64, policyID string, entryPointAddr common.Address, factoryAddr common.Address, id int) (asdk.JSONRPCRequestGasAndPaymaster, error)
	CreateRequestAndSign(callData []byte, rgap asdk.JSONRPCResponseGasAndPaymaster, chainID int64, entryPointAddr common.Address, sender common.Address, senderScw common.Address, nonce uint64, id int, myPK string, factoryAddr common.Address, appendEntryPoint bool) ([]byte, error)

	// can be used to send any type of request to Alchemy
	SendRequest(apiKey string, jsonDATA []byte) ([]byte, error)
	DecodeResponseSendRequest(response []byte) (opHash string, err error)

	CreateRequestGetUserOperationReceipt(operationHash string, id int) ([]byte, error)
	DecodeResponseGetUserOperationReceipt(response []byte) (ret *asdk.JSONRPCResponseGetOp, err error)

	// creates a UserOperation and data to sign with user's private key
	CreateRequestStep1(callData []byte, rgap asdk.JSONRPCResponseGasAndPaymaster, chainID int64, entryPointAddr common.Address, sender common.Address, nonce uint64) (dataToSign []byte, uo asdk.UserOperation, err error)
	// adds signature to UserOperation and creates final JSONRPCRequest that can be sent with 'SendRequest'
	CreateRequestStep2(alchemyRequestId int, signedByUserData []byte, uo asdk.UserOperation, entryPointAddr common.Address) ([]byte, error)

	app.Component
}

A simple wrapper around github.com/anyproto/alchemy-aa-sdk/alchemysdk We need it to mock the library

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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