Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSignature ¶
CheckSignature checks that provided message was signed with the given key
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a blockchain http client
func (*Client) ValidateAddress ¶
func (c *Client) ValidateAddress(address string) (ValidateAddressInfo, error)
ValidateAddress returns information about given address from the blockchain
type UsersService ¶
type UsersService struct { NetParams chaincfg.Params BCClient Client UsersStore stores.UsersStore SessionsStore stores.SessionsStore SettingsStore stores.SettingsStore ProgressStore stores.ProgressStore }
UsersService
func (*UsersService) CreateSession ¶
func (s *UsersService) CreateSession(user models.User) (string, error)
CreateSession create new session for a give user
func (*UsersService) CreateUserWithPassword ¶
func (s *UsersService) CreateUserWithPassword(username, password string) (*models.User, error)
CreateUserWithPassword create a user with a provided ligin/password pair
func (*UsersService) CreateUserWithSignature ¶
func (s *UsersService) CreateUserWithSignature(message, pubkeyHex, signatureHex, timestamp string, debug bool) (*models.User, error)
CreateUserWithSignature creates a user with provided pubkey and signature TODO: replace pubkey with address
type ValidateAddressInfo ¶
type ValidateAddressInfo struct { IsValid bool `json:"isvalid"` Beaconed byte `json:"isbeaconed"` // why isbeaconed is a number in meritd??? Confirmed byte `json:"isconfirmed"` // why isconfirmed is a number in meritd??? Address string `json:"address"` PublicKey string `json:"pubkey"` Alias string `json:"alias"` }
Result of `validateaddress` call
Click to show internal directories.
Click to hide internal directories.