sfs

package
v0.6.28-beta.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimAccount

func ClaimAccount(ksDidList []string, coinType crypto.CoinType, cred *servicetypes.WebauthnCredential) (types.Account, error)

Resolve account takes a list of key shares and a coin type and returns an account.

func CreateInbox

func CreateInbox(accDid string) error

CreateInbox sets up a default inbox for the account

func GetAccount

func GetAccount(accDid string) (types.Account, error)

The function retrieves an account from a key store table using the account's DID and returns it as a model.

func GetKeyshare

func GetKeyshare(keyDid string) (types.KeyShare, error)

The function retrieves a keyshare from a vault based on a given key DID.

func HasInbox

func HasInbox(accDid string) (bool, error)

HasInbox checks if the account has an inbox

func Init

func Init() error

The function "Init" is declared with the parameter "error" and its purpose is not specified as the code is incomplete.

func InsertAccount

func InsertAccount(acc types.Account)

The function inserts an account and its associated key shares into a vault.

func InsertKeyshare

func InsertKeyshare(ks types.KeyShare)

The function inserts a keyshare into a table and returns an error if there is one.

func InsertSonrAccount

func InsertSonrAccount(acc types.Account, cred *servicetypes.WebauthnCredential) error

The function inserts a Sonr account with a webauthn credential.

func LoadInbox

func LoadInbox(accDid string) (*types.Inbox, error)

LoadInbox loads the inbox for the account

func NewMailboxKey added in v0.6.28

func NewMailboxKey(secretKey []byte) (*mbKey, error)

func ReadInbox added in v0.6.28

func ReadInbox(accDid string) ([]*types.WalletMail, error)

ReadInbox reads the inbox for the account

func WriteInbox added in v0.6.28

func WriteInbox(toDid string, msg *types.WalletMail) error

WriteInbox writes the inbox to the database

Types

This section is empty.

Jump to

Keyboard shortcuts

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