Skip to content

Commit

Permalink
Merge pull request #2 from Sagleft/update-ws
Browse files Browse the repository at this point in the history
Update ws
  • Loading branch information
Sagleft authored May 28, 2022
2 parents da5ad81 + 473cf02 commit d21d61a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,30 @@ func (c *UtopiaClient) UCodeEncode(dataHexCode, coder, format string, imageSize
"format": format,
})
}

// SendAuthRequest - send auth request to user
func (c *UtopiaClient) SendAuthRequest(pubkey, message string) (bool, error) {
params := map[string]interface{}{
"pk": pubkey,
"message": message,
}
return c.queryResultToBool("sendAuthorizationRequest", params)
}

// AcceptAuthRequest - accept auth request
func (c *UtopiaClient) AcceptAuthRequest(pubkey, message string) (bool, error) {
params := map[string]interface{}{
"pk": pubkey,
"message": message,
}
return c.queryResultToBool("acceptAuthorizationRequest", params)
}

// RejectAuthRequest - reject user auth request
func (c *UtopiaClient) RejectAuthRequest(pubkey, message string) (bool, error) {
params := map[string]interface{}{
"pk": pubkey,
"message": message,
}
return c.queryResultToBool("rejectAuthorizationRequest", params)
}

0 comments on commit d21d61a

Please sign in to comment.