sim

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthCmd

func NewAuthCmd() *cobra.Command

NewAuthCmd returns the `sim auth` command.

func NewSimCmd

func NewSimCmd() *cobra.Command

NewSimCmd returns the `sim` parent command.

Types

type SimClient

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

SimClient is a lightweight HTTP client for the Sim API.

func NewBareSimClient

func NewBareSimClient() *SimClient

NewBareSimClient creates a Sim API client without authentication. Use this for public endpoints that don't require an API key.

func NewSimClient

func NewSimClient(apiKey string) *SimClient

NewSimClient creates a new Sim API client with the given API key.

func SimClientFromCmd

func SimClientFromCmd(cmd *cobra.Command) *SimClient

SimClientFromCmd is a convenience helper that extracts and type-asserts the SimClient from the command context.

func (*SimClient) Get

func (c *SimClient) Get(ctx context.Context, path string, params url.Values) ([]byte, error)

Get performs a GET request to the Sim API and returns the raw JSON response body. The path should include the leading slash (e.g. "/v1/evm/supported-chains"). Query parameters are appended from params.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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