Documentation ¶
Index ¶
- func CreateAccount(c *gin.Context)
- func CurrentUser(c *gin.Context)
- func ExportWallet(c *gin.Context)
- func GetAccount(c *gin.Context)
- func GetBlockHeight(c *gin.Context)
- func GetCredentialAssertionParams(c *gin.Context)
- func GetCredentialAttestationParams(c *gin.Context)
- func GetEmailAssertionParams(c *gin.Context)
- func GetHealth(c *gin.Context)
- func GetValidatorSet(c *gin.Context)
- func ListAccounts(c *gin.Context)
- func RegisterControllerIdentity(c *gin.Context)
- func RegisterEscrowIdentity(c *gin.Context)
- func SignInWithCredential(c *gin.Context)
- func SignInWithEmail(c *gin.Context)
- func SignWithAccount(c *gin.Context)
- func VerifyWithAccount(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccount ¶
CreateAccount creates a new account with a given coin type and name.
@Summary Create an account @Description Creates a new account with a given coin type and name. @Accept json @Produce json @Param coinType path string true "Coin Type Name" @Success 200 {object} map[string]interface{} "Account Info" @Router /createAccount/{coinType} [post]
func CurrentUser ¶
CurrentUser returns the current user's details.
@Summary Current user's details @Description Returns the current user's details. @Accept json @Produce json @Success 200 {object} map[string]string "JWT Token" @Failure 400 {object} map[string]string "Missing JWT" @Failure 401 {object} map[string]string "No JWT cookie found" @Router /currentUser [get]
func ExportWallet ¶
ExportWallet returns the encoded Sonr Wallet structure with an encrypted keyshare, which can be opened with the user's password, within Sonr Clients.
@Summary Export Wallet @Description Returns the encoded Sonr Wallet structure with an encrypted keyshare. @Accept json @Produce json @Success 200 {object} map[string]interface{} "Wallet Export Info" @Router /exportWallet [get]
func GetAccount ¶
GetAccount returns an account's details given its DID.
@Summary Get an account's details @Description Returns an account's details given its DID. @Accept json @Produce json @Param did path string true "DID of Account" @Success 200 {object} map[string]interface{} "Account Info" @Router /getAccount/{did} [get]
func GetBlockHeight ¶
GetBlockHeight returns the current block height.
@Summary Current block height @Description Returns the current block height. @Accept json @Produce json @Success 200 {object} map[string]int "Block Height" @Router /getBlockHeight [get]
func GetCredentialAssertionParams ¶
GetCredentialAssertionParams returns the credential assertion options to start account login.
@Summary Get credential assertion parameters @Description Returns the credential assertion options to start account login. @Accept json @Produce json @Param origin path string true "Origin" @Param alias path string true "Alias" @Success 200 {object} map[string]interface{} "Success response" @Failure 500 {object} map[string]string "Error message" @Router /getCredentialAssertionParams/{origin}/{alias} [get]
func GetCredentialAttestationParams ¶
GetCredentialAttestationParams returns the credential creation options to start account registration.
@Summary Get credential attestation parameters @Description Returns the credential creation options to start account registration. @Accept json @Produce json @Param origin path string true "Origin" @Param alias path string true "Alias" @Success 200 {object} map[string]interface{} "Success response" @Failure 500 {object} map[string]string "Error message" @Router /getCredentialAttestationParams/{origin}/{alias} [get]
func GetEmailAssertionParams ¶
GetEmailAssertionParams returns a JWT for the email controller. After it is confirmed, the user will claim one of their unclaimed Keyshares.
@Summary Get email assertion parameters @Description Returns a JWT for the email controller. After it is confirmed, the user will claim one of their unclaimed Keyshares. @Accept json @Produce json @Param email query string true "Email" @Success 200 {object} map[string]interface{} "Success response" @Failure 500 {object} map[string]string "Error message" @Router /getEmailAssertionParams [get]
func GetHealth ¶
GetHealth returns the health of the service.
@Summary Health of the service @Description Returns the health of the service. @Accept json @Produce json @Success 200 {object} map[string]string "Status message" @Router /getHealth [get]
func GetValidatorSet ¶
GetValidatorSet returns the current validator set.
@Summary Current validator set @Description Returns the current validator set. @Accept json @Produce json @Success 200 {object} map[string][]string "Validators" @Router /getValidatorSet [get]
func ListAccounts ¶
ListAccounts returns a list of wallet accounts given a coin type.
@Summary List wallet accounts @Description Returns a list of wallet accounts given a coin type. @Accept json @Produce json @Success 200 {object} map[string]interface{} "Accounts List" @Router /listAccounts [get]
func RegisterControllerIdentity ¶
RegisterControllerIdentity registers a credential for a given Unclaimed Wallet.
@Summary Register controller identity @Description Registers a credential for a given Unclaimed Wallet. @Accept json @Produce json @Param origin path string true "Origin" @Param alias path string true "Alias" @Param attestation query string true "Attestation" @Param challenge query string true "Challenge" @Success 200 {object} map[string]interface{} "Success response" @Failure 404 {object} map[string]string "Error message" @Failure 412 {object} map[string]string "Error message" @Failure 400 {object} map[string]string "Error message" @Failure 401 {object} map[string]string "Error message" @Router /registerControllerIdentity/{origin}/{alias} [post]
func RegisterEscrowIdentity ¶
RegisterEscrowIdentity returns the credential assertion options to start account login.
@Summary Register escrow identity @Description Returns the credential assertion options to start account login. @Accept json @Produce json @Param amount query string true "Amount" @Param email query string true "Email" @Success 200 {object} map[string]interface{} "Success response" @Failure 500 {object} map[string]string "Error message" @Router /registerEscrowIdentity [get]
func SignInWithCredential ¶
SignInWithCredential verifies a credential for a given account and returns the JWT Keyshare.
@Summary Sign in with credential @Description Verifies a credential for a given account and returns the JWT Keyshare. @Accept json @Produce json @Param origin path string true "Origin" @Param alias path string true "Alias" @Param assertion query string true "Assertion" @Success 200 {object} map[string]interface{} "Success response" @Failure 441 {object} map[string]string "Error message" @Failure 442 {object} map[string]string "Error message" @Failure 443 {object} map[string]string "Error message" @Failure 444 {object} map[string]string "Error message" @Failure 445 {object} map[string]string "Error message" @Router /signInWithCredential/{origin}/{alias} [post]
func SignInWithEmail ¶
SignInWithEmail registers a DIDDocument for a given email authorized jwt.
@Summary Sign in with email @Description Registers a DIDDocument for a given email authorized jwt. @Accept json @Produce json @Param jwt query string true "JWT" @Success 200 {object} map[string]interface{} "Success response" @Failure 500 {object} map[string]string "Error message" @Router /signInWithEmail [post]
func SignWithAccount ¶
SignWithAccount signs a message with an account given its DID. Requires the JWT of their Keyshare.
@Summary Sign a message with an account @Description Signs a message with an account given its DID. Requires the JWT of their Keyshare. @Accept json @Produce json @Param did path string true "DID of Account" @Param msg query string true "Message to Sign" @Success 200 {object} map[string]interface{} "Signature Info" @Router /signWithAccount/{did} [post]
func VerifyWithAccount ¶
VerifyWithAccount verifies a signature with an account.
@Summary Verify a signature with an account @Description Verifies a signature with an account. @Accept json @Produce json @Param did path string true "DID of Account" @Param msg query string true "Message" @Param sig query string true "Signature" @Success 200 {object} map[string]interface{} "Verification Result" @Router /verifyWithAccount/{did} [post]
Types ¶
This section is empty.