daemon

package
v0.0.0-...-4b2a75f Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port      string
	Network   string
	RPCURL    string
	AuthToken string
}

Config holds daemon configuration

type DebugTransactionRequest

type DebugTransactionRequest struct {
	Hash string `json:"hash"`
}

DebugTransactionRequest represents the debug_transaction RPC request

type DebugTransactionResponse

type DebugTransactionResponse struct {
	Hash         string `json:"hash"`
	Network      string `json:"network"`
	EnvelopeSize int    `json:"envelope_size"`
	Status       string `json:"status"`
}

DebugTransactionResponse represents the debug_transaction RPC response

type GetContractCodeRequest

type GetContractCodeRequest struct {
	ContractID string `json:"contract_id"`
	TxHash     string `json:"tx_hash"`
}

GetContractCodeRequest represents the get_contract_code RPC request

type GetContractCodeResponse

type GetContractCodeResponse struct {
	ContractID string `json:"contract_id"`
	WasmHash   string `json:"wasm_hash"`
	Wasm       string `json:"wasm"`
}

GetContractCodeResponse represents the get_contract_code RPC response

type GetTraceRequest

type GetTraceRequest struct {
	Hash string `json:"hash"`
}

GetTraceRequest represents the get_trace RPC request

type GetTraceResponse

type GetTraceResponse struct {
	Hash   string                   `json:"hash"`
	Traces []map[string]interface{} `json:"traces"`
}

GetTraceResponse represents the get_trace RPC response

type Server

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

Server represents the JSON-RPC daemon server

func NewServer

func NewServer(config Config) (*Server, error)

NewServer creates a new JSON-RPC server

func (*Server) DebugTransaction

func (s *Server) DebugTransaction(r *http.Request, req *DebugTransactionRequest, resp *DebugTransactionResponse) error

DebugTransaction handles debug_transaction RPC calls

func (*Server) GetContractCode

func (s *Server) GetContractCode(r *http.Request, req *GetContractCodeRequest, resp *GetContractCodeResponse) error

GetContractCode handles get_contract_code RPC calls to fetch historical WASM bytecode

func (*Server) GetTrace

func (s *Server) GetTrace(r *http.Request, req *GetTraceRequest, resp *GetTraceResponse) error

GetTrace handles get_trace RPC calls

func (*Server) Start

func (s *Server) Start(ctx context.Context, port string) error

Start starts the JSON-RPC server

Jump to

Keyboard shortcuts

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