Documentation
¶
Index ¶
- Variables
- func AddSignerToKeyring(kring keyring.Keyring, privKey cryptotypes.PrivKey, keyName string) error
- func BroadcastMsgs(args BroadcastArgs, from sdk.AccAddress, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func CreateSigner(mnemonic string, kring keyring.Keyring, keyName string) (kringRecord *keyring.Record, privKey cryptotypes.PrivKey, err error)
- func CreateSignerFromPrivKey(privKey cryptotypes.PrivKey, keyName string) (*keyring.Record, error)
- func EnsureNibiruPrefix()
- func GetGRPCConnection(grpcUrl string, grpcInsecure bool, timeoutSeconds int64) (*grpc.ClientConn, error)
- func NewClientCtx(args ClientCtxBuilder) sdkclient.Context
- func NewKeyring() keyring.Keyring
- func NewRPCClient(rpcEndpt string, websocket string) (*cmtrpchttp.HTTP, error)
- func PrivKeyFromMnemonic(kring keyring.Keyring, mnemonic string, keyName string) (cryptotypes.PrivKey, sdk.AccAddress, error)
- type AccountNumbers
- type BroadcastArgs
- type ClientCtxBuilder
- type GrpcBroadcastClient
- type NetworkInfo
- type NibiruClient
- type QueryClient
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",
}
)
View Source
var EncodingConfig = app.MakeEncodingConfig()
Functions ¶
func AddSignerToKeyring ¶ added in v0.0.4
func BroadcastMsgs ¶ added in v0.0.4
func BroadcastMsgs( args BroadcastArgs, from sdk.AccAddress, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func CreateSigner ¶ added in v0.0.4
func CreateSignerFromPrivKey ¶ added in v0.0.4
func EnsureNibiruPrefix ¶ added in v0.0.4
func EnsureNibiruPrefix()
func GetGRPCConnection ¶
func NewClientCtx ¶ added in v0.0.4
func NewClientCtx(args ClientCtxBuilder) sdkclient.Context
func NewKeyring ¶ added in v0.0.4
NewKeyring: Creates an empty, in-memory keyring
func NewRPCClient ¶ added in v0.0.4
func NewRPCClient(rpcEndpt string, websocket string) (*cmtrpchttp.HTTP, error)
NewRPCClient: A remote Comet-BFT RPC client. An error is returned on invalid remote. The function panics when remote is nil.
Args:
- rpcEndpt: endpoint in the form <protocol>://<host>:<port>
- websocket: websocket path (which always seems to be "/websocket")
func PrivKeyFromMnemonic ¶ added in v0.0.4
func PrivKeyFromMnemonic( kring keyring.Keyring, mnemonic string, keyName string, ) (cryptotypes.PrivKey, sdk.AccAddress, error)
Types ¶
type AccountNumbers ¶ added in v0.0.4
type BroadcastArgs ¶ added in v0.0.4
type BroadcastArgs struct {
GrpcBroadcaster GrpcBroadcastClient
// contains filtered or unexported fields
}
type ClientCtxBuilder ¶ added in v0.0.4
type ClientCtxBuilder struct {
KeyringDir string
Keyring keyring.Keyring
TmCfgRootDir string
ChainID string
AccountRetriever sdkclient.AccountRetriever
// app.EncodingConfig.InterfaceRegistry
InterfaceRegistry sdkcodectypes.InterfaceRegistry
// app.EncodingConfig.Codec
Codec sdkcodec.Codec
// app.EncodingConfig.TxConfig
TxConfig sdkclient.TxConfig
}
type GrpcBroadcastClient ¶ added in v0.0.4
type GrpcBroadcastClient struct {
cosmostx.ServiceClient
}
type NetworkInfo ¶
type NibiruClient ¶
type NibiruClient struct {
ChainId string
Keyring keyring.Keyring
EncCfg app.EncodingConfig
Tx GrpcBroadcastClient
Query QueryClient
CometRPC cmtrpcclient.Client
AccountRetriever authtypes.AccountRetriever
GrpcClient *grpc.ClientConn
}
func NewNibiruClient ¶
func NewNibiruClient(chainId string, grpcConn *grpc.ClientConn, rpcEndpt string) (NibiruClient, error)
func (*NibiruClient) BroadcastMsgs ¶ added in v0.0.4
func (nc *NibiruClient) BroadcastMsgs( from sdk.AccAddress, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func (*NibiruClient) ClientCtx ¶ added in v0.0.4
func (nc *NibiruClient) ClientCtx( keyringDir string, tmCfgRootDir string, ) sdkclient.Context
ClientCtx: Docs for args TODO
- tmCfgRootDir: /node0/simd
- Validator.Dir: /node0
- Validator.ClientCtx.KeyringDir: /node0/simcli
func (*NibiruClient) GetAccountNumbers ¶ added in v0.0.4
func (nc *NibiruClient) GetAccountNumbers(address string) (nums AccountNumbers, err 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)
Click to show internal directories.
Click to hide internal directories.