local

package
v0.6.28-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Standard ports for the sonr grpc and rpc api endpoints.
	SonrGrpcPort = "0.0.0.0:9090"
	SonrRpcPort  = "0.0.0.0:26657"

	// CurrentChainID is the current chain ID.
	CurrentChainID = "sonrdevnet-1"
)

Variables

This section is empty.

Functions

func DecodeTxResponseData added in v0.6.6

func DecodeTxResponseData(d string, v proto.Unmarshaler) error

DecodeTxResponseData decodes the data from a transaction response

func ValidatorAddress added in v0.6.20

func ValidatorAddress() (string, bool)

Types

type BroadcastTxResponse added in v0.6.6

type BroadcastTxResponse = txtypes.BroadcastTxResponse

type LocalContext added in v0.6.6

type LocalContext struct {
	TlsCertPath  string
	TlsKeyPath   string
	HomeDir      string
	NodeHome     string
	IPFSRepoPath string
	OrbitDBPath  string
	Rendevouz    string
	BsMultiaddrs []string
	// contains filtered or unexported fields
}

LocalContext is a struct that holds the current context of the application.

func Context

func Context(opts ...Option) LocalContext

Context returns the current context of the Sonr blockchain application.

func (LocalContext) BroadcastTx added in v0.6.6

func (c LocalContext) BroadcastTx(txRawBytes []byte) (*BroadcastTxResponse, error)

BroadcastTx broadcasts a transaction on the Sonr blockchain network

func (LocalContext) ChainID added in v0.6.6

func (c LocalContext) ChainID() string

ChainID returns the chain id of the current context

func (LocalContext) FaucetEndpoint added in v0.6.6

func (c LocalContext) FaucetEndpoint() string

FaucetEndpoint returns the faucet endpoint of the current context

func (LocalContext) GrpcEndpoint added in v0.6.6

func (c LocalContext) GrpcEndpoint() string

GrpcEndpoint returns the grpc endpoint of the current context

func (LocalContext) HasTlsCert added in v0.6.6

func (c LocalContext) HasTlsCert() bool

HasTlsCert returns true if the current context has a TLS certificate

func (LocalContext) IsDev added in v0.6.6

func (c LocalContext) IsDev() bool

IsDev returns true if the current context is a development context

func (LocalContext) IsProd added in v0.6.6

func (c LocalContext) IsProd() bool

IsProd returns true if the current context is a production context

func (LocalContext) RpcEndpoint added in v0.6.6

func (c LocalContext) RpcEndpoint() string

RpcEndpoint returns the rpc endpoint of the current context

func (LocalContext) SimulateTx added in v0.6.6

func (c LocalContext) SimulateTx(txRawBytes []byte) (*txtypes.SimulateResponse, error)

SimulateTx simulates a transaction on the Sonr blockchain network

type Option added in v0.6.7

type Option func(LocalContext)

Option is a function that configures the local context

func SetProd added in v0.6.7

func SetProd() Option

SetProd sets the current context to production

Jump to

Keyboard shortcuts

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