Documentation
¶
Index ¶
- Constants
- func RenderJSON(ctx *gin.Context, errCode int, err error, data interface{})
- func RenderSuccess(ctx *gin.Context, data interface{})
- type GetPaymasterDataResultV7
- type GetPaymasterStubDataResultV7
- type PaymasterJSONRPCRequest
- type PaymasterJSONRPCResponse
- type PaymasterUserOperationV7
- type RPCError
- type Response
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 ¶
RenderJSON renders response with json
func RenderSuccess ¶
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.
Click to show internal directories.
Click to hide internal directories.