vault

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

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

func NewVault

func NewVault(queries *database.Queries) *Vault

func (*Vault) AddPeer added in v1.2.0

func (vault *Vault) AddPeer(ctx context.Context, foreignKey string, peerID string, userAgent string, updatedDkgResult *tss.DkgResult) error

AddPeer adds a device in DB, including updating the BKs Requires the metadata in the context

func (*Vault) RetrieveWallet

func (vault *Vault) RetrieveWallet(ctx context.Context, foreignKey string) (*tss.DkgResult, error)

RetrieveWallet retrieves a wallet from DB based on the userID of the user (which is a loose foreign key, the format will depend on the auth provider) Tested in integration tests (with throw away db)

func (*Vault) StoreWallet

func (vault *Vault) StoreWallet(ctx context.Context, foreignKey string, peerID string, userAgent string, dkgResult *tss.DkgResult) (string, error)

StoreWallet inserts a wallet (if it already exists, it does nothing, no error returned) Tested in integration tests (with throw away db)

func (*Vault) WalletExists

func (vault *Vault) WalletExists(ctx context.Context, foreignKey string) error

WalletExists verifies if a wallet already exists

Jump to

Keyboard shortcuts

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