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 BroadcastMsgsWithSeq(args BroadcastArgs, from sdk.AccAddress, seq uint64, 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 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)
- func TxHashBytesToHex(txHashBz []byte) (txHashHex string)
- func TxHashHexToBytes(txHashHex string) ([]byte, error)
- type AccountNumbers
- type BroadcastArgs
- type Broadcaster
- type BroadcasterGrpc
- type BroadcasterTmRpc
- type INibiruClient
- type NetworkInfo
- type NibiruClient
- func (nc *NibiruClient) BroadcastMsgs(from sdk.AccAddress, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (nc *NibiruClient) BroadcastMsgsGrpc(from sdk.AccAddress, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (nc *NibiruClient) BroadcastMsgsGrpcWithSeq(from sdk.AccAddress, seq uint64, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (nc *NibiruClient) BroadcastMsgsWithSeq(from sdk.AccAddress, seq uint64, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (nc *NibiruClient) ClientCtx(tmCfgRootDir string) sdkclient.Context
- func (nc *NibiruClient) GetAccountNumbers(address string) (nums AccountNumbers, err error)
- func (nc *NibiruClient) TxByHash(txHashHex string) (*cmtcoretypes.ResultTx, error)
- type Querier
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 ¶
func BroadcastMsgs ¶
func BroadcastMsgs( args BroadcastArgs, from sdk.AccAddress, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func BroadcastMsgsWithSeq ¶
func BroadcastMsgsWithSeq( args BroadcastArgs, from sdk.AccAddress, seq uint64, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func CreateSigner ¶
func CreateSignerFromPrivKey ¶
func EnsureNibiruPrefix ¶
func EnsureNibiruPrefix()
func GetGRPCConnection ¶
func NewRPCClient ¶
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 ¶
func PrivKeyFromMnemonic( kring keyring.Keyring, mnemonic string, keyName string, ) (cryptotypes.PrivKey, sdk.AccAddress, error)
func TxHashBytesToHex ¶
func TxHashHexToBytes ¶
Types ¶
type AccountNumbers ¶
func GetAccountNumbers ¶
func GetAccountNumbers( address string, grpcConn *grpc.ClientConn, encCfg app.EncodingConfig, ) (nums AccountNumbers, err error)
type BroadcastArgs ¶
type BroadcastArgs struct { Broadcaster Broadcaster // contains filtered or unexported fields }
type Broadcaster ¶
type Broadcaster interface {
BroadcastTxSync(txBytes []byte) (*sdk.TxResponse, error)
}
type BroadcasterGrpc ¶
type BroadcasterGrpc struct {
GRPC *grpc.ClientConn
}
func (BroadcasterGrpc) BroadcastTx ¶
func (b BroadcasterGrpc) BroadcastTx( txBytes []byte, mode sdktypestx.BroadcastMode, ) (*sdk.TxResponse, error)
func (BroadcasterGrpc) BroadcastTxAsync ¶
func (b BroadcasterGrpc) BroadcastTxAsync( txBytes []byte, ) (*sdk.TxResponse, error)
func (BroadcasterGrpc) BroadcastTxSync ¶
func (b BroadcasterGrpc) BroadcastTxSync( txBytes []byte, ) (*sdk.TxResponse, error)
type BroadcasterTmRpc ¶
func (BroadcasterTmRpc) BroadcastTxSync ¶
func (b BroadcasterTmRpc) BroadcastTxSync( txBytes []byte, ) (*sdk.TxResponse, error)
type INibiruClient ¶
type INibiruClient interface { BroadcastMsgs(from csdk.AccAddress, msgs ...csdk.Msg) (*csdk.TxResponse, error) ClientCtx(tmCfgRootDir string) sdkclient.Context GetAccountNumbers(address string) (nums AccountNumbers, err error) }
type NetworkInfo ¶
type NibiruClient ¶
type NibiruClient struct { ChainId string Keyring keyring.Keyring EncCfg app.EncodingConfig Querier Querier 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 ¶
func (nc *NibiruClient) BroadcastMsgs( from sdk.AccAddress, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func (*NibiruClient) BroadcastMsgsGrpc ¶
func (nc *NibiruClient) BroadcastMsgsGrpc( from sdk.AccAddress, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func (*NibiruClient) BroadcastMsgsGrpcWithSeq ¶
func (nc *NibiruClient) BroadcastMsgsGrpcWithSeq( from sdk.AccAddress, seq uint64, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func (*NibiruClient) BroadcastMsgsWithSeq ¶
func (nc *NibiruClient) BroadcastMsgsWithSeq( from sdk.AccAddress, seq uint64, msgs ...sdk.Msg, ) (*sdk.TxResponse, error)
func (*NibiruClient) ClientCtx ¶
func (nc *NibiruClient) ClientCtx( tmCfgRootDir string, ) sdkclient.Context
ClientCtx: Docs for args TODO
- tmCfgRootDir: /node0/simd
- Validator.Dir: /node0
- Validator.ClientCtx.KeyringDir: /node0/simcli
func (*NibiruClient) GetAccountNumbers ¶
func (nc *NibiruClient) GetAccountNumbers( address string, ) (nums AccountNumbers, err error)
func (*NibiruClient) TxByHash ¶
func (nc *NibiruClient) TxByHash(txHashHex string) (*cmtcoretypes.ResultTx, error)
type Querier ¶
type Querier struct { ClientConn *grpc.ClientConn Perp xperp.QueryClient Epoch xepochs.QueryClient Oracle xoracle.QueryClient Wasm xwasm.QueryClient }
func NewQueryClient ¶
func NewQueryClient( grpcConn *grpc.ClientConn, ) (Querier, error)
Click to show internal directories.
Click to hide internal directories.