controller

package
v0.3.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DIDController

type DIDController interface {
	// Address
	Address() string

	// DID
	ID() string

	// DID Document
	Document() *crypto.DidDocument

	// Creates a new account
	CreateAccount(name string, coinType common.CoinType) error

	// Gets an account by name
	GetAccount(name string) (wallet.Account, error)

	// Gets all accounts
	ListAccounts() ([]wallet.Account, error)
}

`DIDController` is a type that is both a `wallet.Wallet` and a `store.WalletStore`. @property GetChallengeResponse - This method is used to get the challenge response from the DID controller. @property RegisterAuthenticationCredential - This is the method that will be called when the user clicks on the "Register" button. @property GetAssertionOptions - This method is used to get the options for the assertion. @property AuthorizeCredential - This is the method that will be called when the user clicks the "Login" button on the login page.

func New

func New(ctx context.Context, account wallet.Account) (DIDController, error)

`New` creates a new DID controller instance

type DIDControllerImpl

type DIDControllerImpl struct {
	// contains filtered or unexported fields
}

`DIDControllerImpl` is a type that implements the `DIDController` interface. @property - `wallet.Wallet`: This is the interface that the DID controller implements. @property - `store.WalletStore`: This is the interface that the DID controller implements.

func (*DIDControllerImpl) Address

func (d *DIDControllerImpl) Address() string

Address returns the address of the DID controller.

func (*DIDControllerImpl) CreateAccount

func (w *DIDControllerImpl) CreateAccount(name string, coinType common.CoinType) error

Creating a new account.

func (*DIDControllerImpl) Document

func (d *DIDControllerImpl) Document() *crypto.DidDocument

Document returns the DID document of the DID controller.

func (*DIDControllerImpl) GetAccount

func (w *DIDControllerImpl) GetAccount(name string) (wallet.Account, error)

Returning the account.WalletAccount and error.

func (*DIDControllerImpl) ID

func (d *DIDControllerImpl) ID() string

ID returns the DID of the DID controller.

func (*DIDControllerImpl) ListAccounts

func (w *DIDControllerImpl) ListAccounts() ([]wallet.Account, error)

Returning a list of accounts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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