Documentation ¶
Index ¶
- func ClaimAccount(ksDidList []string, coinType crypto.CoinType, ...) (types.Account, error)
- func CreateInbox(accDid string) error
- func GetAccount(accDid string) (types.Account, error)
- func GetKeyshare(keyDid string) (types.KeyShare, error)
- func HasInbox(accDid string) (bool, error)
- func Init() error
- func InsertAccount(acc types.Account)
- func InsertKeyshare(ks types.KeyShare)
- func InsertSonrAccount(acc types.Account, cred *servicetypes.WebauthnCredential) error
- func LoadInbox(accDid string) (*types.Inbox, error)
- func NewMailboxKey(secretKey []byte) (*mbKey, error)
- func ReadInbox(accDid string) ([]*types.WalletMail, error)
- func WriteInbox(toDid string, msg *types.WalletMail) error
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 ¶
CreateInbox sets up a default inbox for the account
func GetAccount ¶
The function retrieves an account from a key store table using the account's DID and returns it as a model.
func GetKeyshare ¶
The function retrieves a keyshare from a vault based on a given key DID.
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 ¶
The function inserts an account and its associated key shares into a vault.
func InsertKeyshare ¶
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 NewMailboxKey ¶ added in v0.6.28
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.