types

package
v0.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Success shows OK.
	Success = 0
	// InternalServerError shows a fatal error in the server
	InternalServerError = 500
)

Variables

This section is empty.

Functions

func RenderJSON

func RenderJSON(ctx *gin.Context, errCode int, err error, data interface{})

RenderJSON renders response with json

func RenderSuccess

func RenderSuccess(ctx *gin.Context, data interface{})

RenderSuccess renders success response with json

Types

type GetPaymasterDataResultV7

type GetPaymasterDataResultV7 struct {
	Paymaster     common.Address `json:"paymaster"`
	PaymasterData string         `json:"paymasterData"`
}

GetPaymasterDataResultV7 is the result for pm_getPaymasterData (EntryPoint v0.7).

type GetPaymasterStubDataResultV7

type GetPaymasterStubDataResultV7 struct {
	Paymaster                     common.Address `json:"paymaster"`
	PaymasterData                 string         `json:"paymasterData"`
	PaymasterVerificationGasLimit string         `json:"paymasterVerificationGasLimit,omitempty"` // Optional for v0.7
	PaymasterPostOpGasLimit       string         `json:"paymasterPostOpGasLimit"`                 // Required for v0.7, because paymaster cannot trust the wallet side to provide it
}

GetPaymasterStubDataResultV7 is the result for pm_getPaymasterStubData (EntryPoint v0.7).

type PaymasterJSONRPCRequest

type PaymasterJSONRPCRequest struct {
	JSONRPC string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"` // Method parameters, an array for ERC-7677.
	ID      interface{}     `json:"id,omitempty"`
	APIKey  string          `json:"apiKey"`
}

PaymasterJSONRPCRequest represents a JSON-RPC request specific to the paymaster service.

type PaymasterJSONRPCResponse

type PaymasterJSONRPCResponse struct {
	JSONRPC string      `json:"jsonrpc"`
	Result  interface{} `json:"result,omitempty"`
	Error   *RPCError   `json:"error,omitempty"` // Using the same RPCError struct
	ID      interface{} `json:"id"`
}

PaymasterJSONRPCResponse represents a JSON-RPC response specific to the paymaster service.

type PaymasterUserOperationV7

type PaymasterUserOperationV7 struct {
	Sender               common.Address `json:"sender"`
	Nonce                hexutil.Big    `json:"nonce"`
	InitCode             string         `json:"initCode"`
	CallData             string         `json:"callData"`
	CallGasLimit         hexutil.Big    `json:"callGasLimit"`
	VerificationGasLimit hexutil.Big    `json:"verificationGasLimit"`
	PreVerificationGas   hexutil.Big    `json:"preVerificationGas"`
	MaxFeePerGas         hexutil.Big    `json:"maxFeePerGas"`
	MaxPriorityFeePerGas hexutil.Big    `json:"maxPriorityFeePerGas"`
}

PaymasterUserOperationV7 defines the UserOperation structure sent to paymaster methods (unsigned), when the context implies an EntryPoint v0.7 interaction.

type RPCError

type RPCError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

RPCError represents a JSON-RPC error object.

type Response

type Response struct {
	ErrCode int         `json:"errcode"`
	ErrMsg  string      `json:"errmsg"`
	Data    interface{} `json:"data"`
}

Response the response schema

Jump to

Keyboard shortcuts

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