gonibi

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 16 Imported by: 2

README

gonibi

A Golang client for interacting with the Nibiru blockchain.


Dev Notes

Mini Sprint
  • feat: add in transaction broadcasting
    • initialize with mnemonic
    • initialize with priv key
    • write a test that sends a bank transfer.
    • write a test that submits a text gov proposal.
  • refactor: DRY improvements on the QueryClient initialization
  • ci: Add go tests to CI
  • ci: Add code coverage to CI
  • ci: Add linting to CI
  • docs: for grpc.go
  • docs: for clients.go
  • epic: storing transaction history storage
Brain-dumped Questions
  • Q: Which functionality warrants localnet testing?
  • Q: Should there be a way to run queries with JSON-RPC 2 instead of GRPC?

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultNetworkInfo = NetworkInfo{
		GrpcEndpoint:      "localhost:9090",
		LcdEndpoint:       "http://localhost:1317",
		TmRpcEndpoint:     "http://localhost:26657",
		WebsocketEndpoint: "ws://localhost:26657/websocket",
		ChainID:           "nibiru-localnet-0",
	}
)

Functions

func GetGRPCConnection

func GetGRPCConnection(
	grpcUrl string, grpcInsecure bool, timeoutSeconds int64,
) (*grpc.ClientConn, error)

Types

type BroadcastClient

type BroadcastClient struct {
	cosmostx.ServiceClient
}

func (*BroadcastClient) BroadcastMsgs

func (txclient *BroadcastClient) BroadcastMsgs()

type NetworkInfo

type NetworkInfo struct {
	GrpcEndpoint      string
	LcdEndpoint       string
	TmRpcEndpoint     string
	WebsocketEndpoint string
	ChainID           string
}

type NibiruClient

type NibiruClient struct {
	ChainId string
	Keyring keyring.Keyring

	Tx    BroadcastClient
	Query QueryClient
	// contains filtered or unexported fields
}

func NewNibiruClient

func NewNibiruClient(chainId string, grpcConn *grpc.ClientConn) (NibiruClient, error)

type QueryClient

type QueryClient struct {
	ClientConn *grpc.ClientConn
	Perp       xperp.QueryClient
	Epoch      xepochs.QueryClient
	Oracle     xoracle.QueryClient
	Wasm       xwasm.QueryClient
}

func NewQueryClient

func NewQueryClient(
	grpcConn *grpc.ClientConn,
) (QueryClient, error)

Jump to

Keyboard shortcuts

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