controller

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 30 Imported by: 0

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