Documentation ¶
Index ¶
- Constants
- func DecodeTxResponseData(d string, v proto.Unmarshaler) error
- func ValidatorAddress() (string, bool)
- type BroadcastTxResponse
- type LocalContext
- func (c LocalContext) BroadcastTx(txRawBytes []byte) (*BroadcastTxResponse, error)
- func (c LocalContext) ChainID() string
- func (c LocalContext) CheckAlias(ctx context.Context, alias string) (bool, *identitytypes.Identity, error)
- func (c LocalContext) FaucetEndpoint() string
- func (c LocalContext) FiberListenAddress() string
- func (c LocalContext) GetAllDIDs(ctx context.Context) ([]*identitytypes.Identity, error)
- func (c LocalContext) GetAllServices(ctx context.Context) ([]*servicetypes.ServiceRecord, error)
- func (c LocalContext) GetDID(ctx context.Context, id string) (*identitytypes.Identity, error)
- func (c LocalContext) GetDIDByAlias(ctx context.Context, alias string) (*identitytypes.Identity, error)
- func (c LocalContext) GetDIDByOwner(ctx context.Context, owner string) (*identitytypes.Identity, error)
- func (c LocalContext) GetService(ctx context.Context, origin string) (*servicetypes.ServiceRecord, error)
- func (c LocalContext) GetUnclaimedWallet(ctx context.Context, id uint64) (*identitytypes.ClaimableWallet, error)
- func (c LocalContext) GrpcEndpoint() string
- func (c LocalContext) HasTlsCert() bool
- func (c LocalContext) HighwayPort() string
- func (c LocalContext) IsDev() bool
- func (c LocalContext) IsHighwayConnect() bool
- func (c LocalContext) IsHighwayFiber() bool
- func (c LocalContext) IsProd() bool
- func (c LocalContext) RpcEndpoint() string
- func (c LocalContext) SigningKey() []byte
- func (c LocalContext) SimulateTx(txRawBytes []byte) (*txtypes.SimulateResponse, error)
- type Option
Constants ¶
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
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 GlobalKvKsStore string GlobalInboxDocsStore string GlobalInboxEventsStore string HighwayMode 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) CheckAlias ¶ added in v0.6.10
func (c LocalContext) CheckAlias(ctx context.Context, alias string) (bool, *identitytypes.Identity, error)
CheckAlias checks if the alias is available and returns the existing DID if it's not
func (LocalContext) FaucetEndpoint ¶ added in v0.6.6
func (c LocalContext) FaucetEndpoint() string
FaucetEndpoint returns the faucet endpoint of the current context
func (LocalContext) FiberListenAddress ¶ added in v0.6.6
func (c LocalContext) FiberListenAddress() string
FiberListenAddress returns the fiber listen address of the current context
func (LocalContext) GetAllDIDs ¶ added in v0.6.6
func (c LocalContext) GetAllDIDs(ctx context.Context) ([]*identitytypes.Identity, error)
GetAllDIDs returns all DID documents
func (LocalContext) GetAllServices ¶ added in v0.6.6
func (c LocalContext) GetAllServices(ctx context.Context) ([]*servicetypes.ServiceRecord, error)
GetAllServices returns all services
func (LocalContext) GetDID ¶ added in v0.6.6
func (c LocalContext) GetDID(ctx context.Context, id string) (*identitytypes.Identity, error)
GetDID returns the DID document with the given id
func (LocalContext) GetDIDByAlias ¶ added in v0.6.15
func (c LocalContext) GetDIDByAlias(ctx context.Context, alias string) (*identitytypes.Identity, error)
GetDIDByAlias returns the DID document with the given alias
func (LocalContext) GetDIDByOwner ¶ added in v0.6.16
func (c LocalContext) GetDIDByOwner(ctx context.Context, owner string) (*identitytypes.Identity, error)
GetDIDByAlias returns the DID document with the given alias
func (LocalContext) GetService ¶ added in v0.6.6
func (c LocalContext) GetService(ctx context.Context, origin string) (*servicetypes.ServiceRecord, error)
GetService returns the service with the given id
func (LocalContext) GetUnclaimedWallet ¶ added in v0.6.23
func (c LocalContext) GetUnclaimedWallet(ctx context.Context, id uint64) (*identitytypes.ClaimableWallet, error)
OldestUnclaimedWallet returns the oldest unclaimed wallet
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) HighwayPort ¶ added in v0.6.6
func (c LocalContext) HighwayPort() string
HighwayPort returns the highway port of the current context
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) IsHighwayConnect ¶ added in v0.6.6
func (c LocalContext) IsHighwayConnect() bool
IsHighwayConnect returns true if the current context is a highway connect context
func (LocalContext) IsHighwayFiber ¶ added in v0.6.6
func (c LocalContext) IsHighwayFiber() bool
IsHighwayFiber returns true if the current context is a highway fiber 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) SigningKey ¶ added in v0.6.14
func (c LocalContext) SigningKey() []byte
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