controller

package
v0.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SonrController

type SonrController struct {
	ID     types.DIDIdentifier
	Method types.DIDMethod

	Authenticator *authr.Authenticator
	// contains filtered or unexported fields
}

SonrController is a controller for the Sonr DID method

func AuthorizeIdentity

func AuthorizeIdentity(email string, controllerAcc *identitytypes.ControllerAccount) (*SonrController, error)

AuthorizeIdentity resolves a DID to an IDX controller

func New

func New(email string, cred *types.Credential, origin string) (*SonrController, error)

New creates a new identifier for the IDX controller

func (*SonrController) Account

Account returns the controller account

func (*SonrController) CreateWallet

func (c *SonrController) CreateWallet(ct crypto.CoinType) (*crypto.AccountData, error)

CreateWallet creates a new wallet for the given coin type

func (*SonrController) GetPrimaryWallet

func (c *SonrController) GetPrimaryWallet() *sonr.Account

GetPrimaryWallet returns the primary wallet sonr account

func (*SonrController) GetWallet

func (c *SonrController) GetWallet(did string) (*crypto.AccountData, error)

GetWallet returns the wallet info for the given DID

func (*SonrController) ListWallets

func (c *SonrController) ListWallets() []string

ListWallets returns the list of wallets for the controller

func (*SonrController) SignWithWallet

func (c *SonrController) SignWithWallet(did string, msg []byte) ([]byte, error)

SignWithWallet signs the given message with the wallet

func (*SonrController) VerifyWithWallet

func (c *SonrController) VerifyWithWallet(did string, msg []byte, sig []byte) (bool, error)

VerifyWithWallet verifies the given signature with the wallet

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL