Documentation ¶
Index ¶
- Constants
- type Cosmos
- func (cc *Cosmos) AccountName() string
- func (cc *Cosmos) Address() string
- func (cc *Cosmos) BroadcastCreateBucket(msg *bt.MsgCreateBucket) (*bt.MsgCreateBucketResponse, error)
- func (cc *Cosmos) BroadcastCreateChannel(msg *ct.MsgCreateChannel) (*ct.MsgCreateChannelResponse, error)
- func (cc *Cosmos) BroadcastCreateObject(msg *ot.MsgCreateObject) (*ot.MsgCreateObjectResponse, error)
- func (cc *Cosmos) BroadcastDeactivateBucket(msg *bt.MsgDeactivateBucket) (*bt.MsgDeactivateBucketResponse, error)
- func (cc *Cosmos) BroadcastDeactivateChannel(msg *ct.MsgDeactivateChannel) (*ct.MsgDeactivateChannelResponse, error)
- func (cc *Cosmos) BroadcastDeactivateObject(msg *ot.MsgDeactivateObject) (*ot.MsgDeactivateObjectResponse, error)
- func (cc *Cosmos) BroadcastRegisterApplication(msg *rt.MsgRegisterApplication) (*rt.MsgRegisterApplicationResponse, error)
- func (cc *Cosmos) BroadcastRegisterName(msg *rt.MsgRegisterName) (*rt.MsgRegisterNameResponse, error)
- func (cc *Cosmos) BroadcastUpdateApplication(msg *rt.MsgUpdateApplication) (*rt.MsgUpdateApplicationResponse, error)
- func (cc *Cosmos) BroadcastUpdateBucket(msg *bt.MsgUpdateBucket) (*bt.MsgUpdateBucketResponse, error)
- func (cc *Cosmos) BroadcastUpdateChannel(msg *ct.MsgUpdateChannel) (*ct.MsgUpdateChannelResponse, error)
- func (cc *Cosmos) BroadcastUpdateName(msg *rt.MsgUpdateName) (*rt.MsgUpdateNameResponse, error)
- func (cc *Cosmos) BroadcastUpdateObject(msg *ot.MsgUpdateObject) (*ot.MsgUpdateObjectResponse, error)
- func (cc *Cosmos) NameExists(name string) bool
- func (cc *Cosmos) QueryAllBuckets() ([]bt.WhichIs, error)
- func (cc *Cosmos) QueryAllChannels() ([]ct.HowIs, error)
- func (cc *Cosmos) QueryAllNames() ([]rt.WhoIs, error)
- func (cc *Cosmos) QueryAllObjects() ([]ot.WhatIs, error)
- func (cc *Cosmos) QueryBucket(name string) (*bt.WhichIs, error)
- func (cc *Cosmos) QueryChannel(name string) (*ct.HowIs, error)
- func (cc *Cosmos) QueryName(name string) (*rt.WhoIs, error)
- func (cc *Cosmos) QueryObject(did string) (*ot.WhatIs, error)
- type WebAuthn
- func (w *WebAuthn) FinishAuthenticationSession(r *http.Request, username string) (*webauthn.Credential, error)
- func (w *WebAuthn) FinishRegistrationSession(r *http.Request, username string) (*webauthn.Credential, error)
- func (wan *WebAuthn) SaveAuthenticationSession(r *http.Request, w http.ResponseWriter, whoIs *rtv1.WhoIs) (*protocol.CredentialAssertion, error)
- func (wan *WebAuthn) SaveRegistrationSession(r *http.Request, w http.ResponseWriter, username string, creator string) (*protocol.CredentialCreation, error)
Constants ¶
const ( REGISTRATION_SESSION_KEY = "registration_session" AUTHENTICATION_SESSION_KEY = "authentication_session" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cosmos ¶
type Cosmos struct { cosmosclient.Client // contains filtered or unexported fields }
func NewCosmos ¶
NewCosmos creates a Sonr Blockchain client with the given account and provides helper functions
func (*Cosmos) AccountName ¶
AccountName returns the account name as string
func (*Cosmos) BroadcastCreateBucket ¶ added in v0.23.0
func (cc *Cosmos) BroadcastCreateBucket(msg *bt.MsgCreateBucket) (*bt.MsgCreateBucketResponse, error)
------- Buckets ------- BroadcastCreateBucket broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastCreateChannel ¶ added in v0.23.0
func (cc *Cosmos) BroadcastCreateChannel(msg *ct.MsgCreateChannel) (*ct.MsgCreateChannelResponse, error)
------- Channels ------- BroadcastDeactivateChannel broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastCreateObject ¶ added in v0.23.0
func (cc *Cosmos) BroadcastCreateObject(msg *ot.MsgCreateObject) (*ot.MsgCreateObjectResponse, error)
------- Objects ------- BroadcastCreateObject broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastDeactivateBucket ¶ added in v0.23.0
func (cc *Cosmos) BroadcastDeactivateBucket(msg *bt.MsgDeactivateBucket) (*bt.MsgDeactivateBucketResponse, error)
BroadcastDeactivateBucket broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastDeactivateChannel ¶ added in v0.23.0
func (cc *Cosmos) BroadcastDeactivateChannel(msg *ct.MsgDeactivateChannel) (*ct.MsgDeactivateChannelResponse, error)
BroadcastUpdateChannel broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastDeactivateObject ¶ added in v0.23.0
func (cc *Cosmos) BroadcastDeactivateObject(msg *ot.MsgDeactivateObject) (*ot.MsgDeactivateObjectResponse, error)
BroadcastUpdateChannel broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastRegisterApplication ¶ added in v0.23.0
func (cc *Cosmos) BroadcastRegisterApplication(msg *rt.MsgRegisterApplication) (*rt.MsgRegisterApplicationResponse, error)
------- Registry ------- BroadcastRegisterApplication broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastRegisterName ¶
func (cc *Cosmos) BroadcastRegisterName(msg *rt.MsgRegisterName) (*rt.MsgRegisterNameResponse, error)
BroadcastRegisterName broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateApplication ¶ added in v0.23.0
func (cc *Cosmos) BroadcastUpdateApplication(msg *rt.MsgUpdateApplication) (*rt.MsgUpdateApplicationResponse, error)
BroadcastUpdateApplication broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateBucket ¶ added in v0.23.0
func (cc *Cosmos) BroadcastUpdateBucket(msg *bt.MsgUpdateBucket) (*bt.MsgUpdateBucketResponse, error)
BroadcastUpdateBucket broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateChannel ¶ added in v0.23.0
func (cc *Cosmos) BroadcastUpdateChannel(msg *ct.MsgUpdateChannel) (*ct.MsgUpdateChannelResponse, error)
BroadcastUpdateChannel broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateName ¶ added in v0.23.0
func (cc *Cosmos) BroadcastUpdateName(msg *rt.MsgUpdateName) (*rt.MsgUpdateNameResponse, error)
BroadcastUpdateName broadcasts a transaction to the blockchain
func (*Cosmos) BroadcastUpdateObject ¶ added in v0.23.0
func (cc *Cosmos) BroadcastUpdateObject(msg *ot.MsgUpdateObject) (*ot.MsgUpdateObjectResponse, error)
BroadcastUpdateObject broadcasts a transaction to the blockchain
func (*Cosmos) NameExists ¶ added in v0.23.0
NameExists checks if a name exists on the blockchain
func (*Cosmos) QueryAllBuckets ¶ added in v0.23.0
QueryAllBuckets returns all names registered on the blockchain
func (*Cosmos) QueryAllChannels ¶ added in v0.23.0
QueryAllChannels returns all names registered on the blockchain
func (*Cosmos) QueryAllNames ¶
QueryAllNames returns all DIDDocuments registered on the blockchain
func (*Cosmos) QueryAllObjects ¶ added in v0.23.0
QueryAllObjects returns all names registered on the blockchain
func (*Cosmos) QueryBucket ¶ added in v0.23.0
QueryBucket returns all names registered on the blockchain
func (*Cosmos) QueryChannel ¶ added in v0.23.0
QueryChannel returns all names registered on the blockchain
type WebAuthn ¶ added in v0.23.0
type WebAuthn struct {
// contains filtered or unexported fields
}
WebAuthn manages the WebAuthn interface
func NewWebauthn ¶ added in v0.23.0
NewWebauthn creates a new WebAuthn instance with the given configuration
func (*WebAuthn) FinishAuthenticationSession ¶ added in v0.23.0
func (w *WebAuthn) FinishAuthenticationSession(r *http.Request, username string) (*webauthn.Credential, error)
FinishAuthenticationSession returns the registration session for the given user
func (*WebAuthn) FinishRegistrationSession ¶ added in v0.23.0
func (w *WebAuthn) FinishRegistrationSession(r *http.Request, username string) (*webauthn.Credential, error)
FinishRegistrationSession returns the registration session for the given user
func (*WebAuthn) SaveAuthenticationSession ¶ added in v0.23.0
func (wan *WebAuthn) SaveAuthenticationSession(r *http.Request, w http.ResponseWriter, whoIs *rtv1.WhoIs) (*protocol.CredentialAssertion, error)
SaveAuthenticationSession saves the login session for the given user
func (*WebAuthn) SaveRegistrationSession ¶ added in v0.23.0
func (wan *WebAuthn) SaveRegistrationSession(r *http.Request, w http.ResponseWriter, username string, creator string) (*protocol.CredentialCreation, error)
SaveRegistrationSession saves the registration session for the given user