testrpc

package
v0.0.0-...-1929ff6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BtcServer

type BtcServer struct {
	*Server
}

BtcServer represents httptest for Bitcoin RPC.

func NewBtcServer

func NewBtcServer(t *testing.T) (*BtcServer, config.BTCConfig)

NewBtcServer creates new BtcServer.

func (*BtcServer) SetBlockCount

func (s *BtcServer) SetBlockCount(count int)

type EVMServer

type EVMServer struct {
	*Server
	Endpoint string
}

EVMServer represents httptest for EVM RPC.

func NewEVMServer

func NewEVMServer(t *testing.T) *EVMServer

NewEVMServer creates a new EVMServer.

func (*EVMServer) SetBlockNumber

func (s *EVMServer) SetBlockNumber(n int)

type Server

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

Server represents JSON RPC mock with a "real" HTTP server allocated (httptest)

func New

func New(t *testing.T, name string) (*Server, string)

New constructs Server.

func (*Server) On

func (s *Server) On(method string, call func(params []any) (any, error))

On registers a handler for a given method.

type SolanaServer

type SolanaServer struct {
	*Server
}

SolanaServer represents httptest for SOL RPC.

func NewSolanaServer

func NewSolanaServer(t *testing.T) (*SolanaServer, config.SolanaConfig)

NewSolanaServer creates a new SolanaServer.

Jump to

Keyboard shortcuts

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