Documentation ¶
Index ¶
- Constants
- func DecodeTxResponseData(d string, v proto.Unmarshaler) error
- type Client
- func (c *Client) BroadcastTx(txRawBytes []byte) (*txtypes.BroadcastTxResponse, error)
- func (c *Client) CheckBalance(address string) (types.Coins, error)
- func (c *Client) GetAPIAddress() string
- func (c *Client) GetFaucetAddress() string
- func (c *Client) GetIPFSAddress() string
- func (c *Client) GetIPFSApiAddress() string
- func (c *Client) GetRPCAddress() string
- func (c *Client) QueryWhatIsByController(creator string, did string) (*st.WhatIs, error)
- func (c *Client) QueryWhoIs(did string) (*rt.WhoIs, error)
- func (c *Client) QueryWhoIsByAlias(alias string) (*rt.WhoIs, error)
- func (c *Client) QueryWhoIsByController(controller string) (*rt.WhoIs, error)
- func (c *Client) RequestFaucet(address string) error
- func (c *Client) SimulateTx(txRawBytes []byte) (*txtypes.SimulateResponse, error)
- type ConnEndpointType
- type Cosmos
- func (cc *Cosmos) AccountName() string
- func (cc *Cosmos) Address() string
- func (cc *Cosmos) BroadcastBuyAlias(msg *rt.MsgBuyAlias) (*rt.MsgBuyAliasResponse, error)
- func (cc *Cosmos) BroadcastBuyNameAlias(msg *rt.MsgBuyAlias) (*rt.MsgBuyAliasResponse, error)
- func (cc *Cosmos) BroadcastCreateSchema(msg *st.MsgCreateSchema) (*st.MsgCreateSchemaResponse, error)
- func (cc *Cosmos) BroadcastCreateWhoIs(msg *rt.MsgCreateWhoIs) (*rt.MsgCreateWhoIsResponse, error)
- func (cc *Cosmos) BroadcastDeactivateWhoIs(msg *rt.MsgDeactivateWhoIs) (*rt.MsgDeactivateWhoIsResponse, error)
- func (cc *Cosmos) BroadcastSellAlias(msg *rt.MsgSellAlias) (*rt.MsgSellAliasResponse, error)
- func (cc *Cosmos) BroadcastTransferAlias(msg *rt.MsgTransferAlias) (*rt.MsgTransferAliasResponse, error)
- func (cc *Cosmos) BroadcastUpdateWhoIs(msg *rt.MsgUpdateWhoIs) (*rt.MsgUpdateWhoIsResponse, error)
- func (cc *Cosmos) NameExists(name string) bool
- func (cc *Cosmos) QueryAllWhoIs() ([]rt.WhoIs, error)
- func (cc *Cosmos) QuerySchema(creator string, schemaDID string) (*st.QuerySchemaResponse, error)
- func (cc *Cosmos) QueryWhatIsAll(queryReq *st.QueryAllWhatIsRequest) (*st.QueryAllWhatIsResponse, error)
- func (cc *Cosmos) QueryWhoIs(did string) (*rt.WhoIs, error)
- func (cc *Cosmos) QueryWhoIsAlias(alias string) (*rt.WhoIs, error)
- func (cc *Cosmos) QueryWhoIsController(controller string) (*rt.WhoIs, error)
Constants ¶
const ( // -- Local Blockchain -- BLOCKCHAIN_REST_LOCAL = "http://0.0.0.0:26657" BLOCKCHAIN_FAUCET_LOCAL = "http://0.0.0.0:4500" BLOCKCHAIN_RPC_LOCAL = "127.0.0.1:9090" // -- Dev Blockchain -- BLOCKCHAIN_FAUCET_DEV = "http://143.198.29.209:8000" BLOCKCHAIN_RPC_DEV = "143.198.29.209:9090" // -- Beta Blockchain -- BLOCKCHAIN_FAUCET_BETA = "http://137.184.190.146:8000" BLOCKCHAIN_RPC_BETA = "137.184.190.146:9090" // -- Services -- IPFS_ADDRESS = "https://ipfs.sonr.ws" IPFS_API_ADDRESS = "https://api.ipfs.sonr.ws" VAULT_API_ADDRESS = "http://164.92.99.233" )
Variables ¶
This section is empty.
Functions ¶
func DecodeTxResponseData ¶ added in v0.3.0
func DecodeTxResponseData(d string, v proto.Unmarshaler) error
Types ¶
type Client ¶ added in v0.3.0
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.3.0
func NewClient(t ConnEndpointType) *Client
func (*Client) BroadcastTx ¶ added in v0.3.0
func (c *Client) BroadcastTx(txRawBytes []byte) (*txtypes.BroadcastTxResponse, error)
BroadcastTx broadcasts a transaction on the Sonr blockchain network
func (*Client) CheckBalance ¶ added in v0.3.0
func (*Client) GetAPIAddress ¶ added in v0.3.0
func (*Client) GetFaucetAddress ¶ added in v0.3.0
func (*Client) GetIPFSAddress ¶ added in v0.3.1
func (*Client) GetIPFSApiAddress ¶ added in v0.3.1
func (*Client) GetRPCAddress ¶ added in v0.3.0
func (*Client) QueryWhatIsByController ¶ added in v0.3.0
func (*Client) QueryWhoIs ¶ added in v0.3.0
func (*Client) QueryWhoIsByAlias ¶ added in v0.3.0
func (*Client) QueryWhoIsByController ¶ added in v0.3.0
func (*Client) RequestFaucet ¶ added in v0.3.0
RequestFaucet requests a faucet from the Sonr network
func (*Client) SimulateTx ¶ added in v0.3.0
func (c *Client) SimulateTx(txRawBytes []byte) (*txtypes.SimulateResponse, error)
SimulateTx simulates a transaction on the Sonr blockchain network
type ConnEndpointType ¶ added in v0.3.0
type ConnEndpointType int
const ( ConnEndpointType_NONE ConnEndpointType = iota ConnEndpointType_LOCAL ConnEndpointType_DEV ConnEndpointType_BETA )
type Cosmos ¶
type Cosmos struct { cosmosclient.Client // contains filtered or unexported fields }
func (*Cosmos) AccountName ¶
AccountName returns the account name as string
func (*Cosmos) BroadcastBuyAlias ¶
func (cc *Cosmos) BroadcastBuyAlias(msg *rt.MsgBuyAlias) (*rt.MsgBuyAliasResponse, error)
------- Registry ------- BroadcastBuyAppAlias broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastBuyNameAlias ¶
func (cc *Cosmos) BroadcastBuyNameAlias(msg *rt.MsgBuyAlias) (*rt.MsgBuyAliasResponse, error)
BroadcastBuyNameAlias broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastCreateSchema ¶ added in v0.3.0
func (cc *Cosmos) BroadcastCreateSchema(msg *st.MsgCreateSchema) (*st.MsgCreateSchemaResponse, error)
------- Schemas -------
func (*Cosmos) BroadcastCreateWhoIs ¶
func (cc *Cosmos) BroadcastCreateWhoIs(msg *rt.MsgCreateWhoIs) (*rt.MsgCreateWhoIsResponse, error)
BroadcastUpdateApplication broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastDeactivateWhoIs ¶
func (cc *Cosmos) BroadcastDeactivateWhoIs(msg *rt.MsgDeactivateWhoIs) (*rt.MsgDeactivateWhoIsResponse, error)
BroadcastUpdateName broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastSellAlias ¶
func (cc *Cosmos) BroadcastSellAlias(msg *rt.MsgSellAlias) (*rt.MsgSellAliasResponse, error)
BroadcastSellAlias broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastTransferAlias ¶
func (cc *Cosmos) BroadcastTransferAlias(msg *rt.MsgTransferAlias) (*rt.MsgTransferAliasResponse, error)
BroadcastTransferNameAlias broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateWhoIs ¶
func (cc *Cosmos) BroadcastUpdateWhoIs(msg *rt.MsgUpdateWhoIs) (*rt.MsgUpdateWhoIsResponse, error)
BroadcastUpdateApplication broadcasts a transaction to the blockchain
func (*Cosmos) NameExists ¶
NameExists checks if a name exists on the blockchain
func (*Cosmos) QueryAllWhoIs ¶
QueryAllWhoIs returns all DIDDocuments registered on the blockchain
func (*Cosmos) QuerySchema ¶ added in v0.3.0
func (*Cosmos) QueryWhatIsAll ¶ added in v0.3.0
func (cc *Cosmos) QueryWhatIsAll(queryReq *st.QueryAllWhatIsRequest) (*st.QueryAllWhatIsResponse, error)
func (*Cosmos) QueryWhoIs ¶
QueryWhoIs returns a DIDDocument for the given name registered on the blockchain
func (*Cosmos) QueryWhoIsAlias ¶
QueryWhoIsAlias returns a DIDDocument for the given alias registered on the blockchain