controller

package
v0.0.9-rc7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 23 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

Overview

Package controller provides the admin API controller for managing policies and paymaster data.

Package controller provides the main controller for handling JSON-RPC requests in the Scroll paymaster service.

Package controller provides the ERC-7677 paymaster controller for handling JSON-RPC requests.

Package controller provides the PaymasterController for handling usage statistics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUsageStats added in v0.0.10

func GetUsageStats(c *gin.Context)

GetUsageStats handles GET /api/usage/:address/:policy_id requests

func InitAPI

func InitAPI(cfg *config.Config, db *gorm.DB)

InitAPI init api handler

func UnifiedHandler

func UnifiedHandler(c *gin.Context)

UnifiedHandler handles all JSON-RPC requests

Types

type AdminController

type AdminController struct {
	// contains filtered or unexported fields
}

AdminController handles admin API requests

func NewAdminController

func NewAdminController(cfg *config.Config, db *gorm.DB) *AdminController

NewAdminController creates a new AdminController

type PaymasterController

type PaymasterController struct {
	// contains filtered or unexported fields
}

PaymasterController the controller of paymaster

func NewPaymasterController

func NewPaymasterController(cfg *config.Config, db *gorm.DB) *PaymasterController

NewPaymasterController creates and initializes a new PaymasterController.

func (*PaymasterController) GetUsageStats added in v0.0.10

func (pc *PaymasterController) GetUsageStats(c *gin.Context, apiKey string, address string, policyID int64)

GetUsageStats returns usage statistics for a wallet and policy

Jump to

Keyboard shortcuts

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