manager

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONRPC_2 = "2.0"

	ISSUED_ECASH_REQUEST   = "issued_ecash"
	REDEEMED_ECASH_REQUEST = "redeemed_ecash"
	TOTAL_BALANCE          = "total_balance"
	LIST_KEYSETS           = "list_keysets"
	ROTATE_KEYSET          = "rotate_keyset"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type IssuedEcashResponse

type IssuedEcashResponse struct {
	Keysets     []KeysetIssued `json:"keysets"`
	TotalIssued uint64         `json:"total_issued"`
}

type KeysetIssued

type KeysetIssued struct {
	Id           string `json:"id"`
	AmountIssued uint64 `json:"amount_issued"`
}

type KeysetRedeemed

type KeysetRedeemed struct {
	Id             string `json:"id"`
	AmountRedeemed uint64 `json:"amount_redeemed"`
}

type RedeemedEcashResponse

type RedeemedEcashResponse struct {
	Keysets       []KeysetRedeemed `json:"keysets"`
	TotalRedeemed uint64           `json:"total_redeemed"`
}

type Request

type Request struct {
	JsonRPC string   `json:"jsonrpc"`
	Method  string   `json:"method"`
	Params  []string `json:"params,omitempty"`
	Id      int      `json:"id"`
}

type Response

type Response struct {
	JsonRPC string          `json:"jsonrpc"`
	Result  json.RawMessage `json:"result"`
	Error   Error           `json:"error,omitempty"`
	Id      int             `json:"id"`
}

func NewErrorResponse

func NewErrorResponse(code int, message string, id int) Response

func NewResponse

func NewResponse(result json.RawMessage, id int) Response

type Server

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

func SetupServer

func SetupServer(mint *mint.Mint) (*Server, error)

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start() error

type TotalBalanceResponse

type TotalBalanceResponse struct {
	TotalIssued        IssuedEcashResponse   `json:"total_issued"`
	TotalRedeemed      RedeemedEcashResponse `json:"total_redeemed"`
	TotalInCirculation uint64                `json:"total_circulation"`
}

Jump to

Keyboard shortcuts

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