Documentation
¶
Index ¶
- Variables
- type CreateParams
- type GetAllPrivateKeysRequest
- type GetAllPrivateKeysResponse
- type GetHotWalletKeysRequest
- type GetHotWalletKeysResponse
- type GetSeedsResponse
- type GetTwoFactorAuthDataResponse
- type OTPData
- type PrivateKeyItem
- type PrivateKeysItem
- type Service
- func (s *Service) ConfirmTwoFactorAuth(ctx context.Context, ownerID uuid.UUID, otp string) error
- func (s *Service) Create(ctx context.Context, params CreateParams) (*models.Owner, error)
- func (s *Service) DecryptOTPDataForAllOwners(ctx context.Context) error
- func (s *Service) DecryptSeedsForAllOwners(ctx context.Context) error
- func (s *Service) DisableTwoFactorAuth(ctx context.Context, ownerID uuid.UUID, otpKey string) error
- func (s *Service) EncryptOTPDataForAllOwners(ctx context.Context) error
- func (s *Service) EncryptSeedsForAllOwners(ctx context.Context) error
- func (s *Service) GetAll(ctx context.Context) ([]*models.Owner, error)
- func (s *Service) GetAllPrivateKeys(ctx context.Context, request GetAllPrivateKeysRequest) (*GetAllPrivateKeysResponse, error)
- func (s *Service) GetByID(ctx context.Context, ownerID uuid.UUID) (*models.Owner, error)
- func (s *Service) GetHotWalletKeys(ctx context.Context, request *GetHotWalletKeysRequest) (*GetHotWalletKeysResponse, error)
- func (s *Service) GetSeeds(ctx context.Context, ownerID uuid.UUID, otp string) (*GetSeedsResponse, error)
- func (s *Service) GetTwoFactorAuthData(ctx context.Context, ownerID uuid.UUID) (*GetTwoFactorAuthDataResponse, error)
- func (s *Service) ValidateTwoFactorToken(ctx context.Context, ownerID uuid.UUID, token string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientNotFound = errors.New("client not found") ErrExternalIDExists = errors.New("an owner with such external identifier already exists") ErrEmptyOwnerID = errors.New("empty owner id") ErrEmptyWalletAddressID = errors.New("empty wallet address id") ErrEmptyOTP = errors.New("empty otp") ErrEmptyOTPSecret = errors.New("empty otp secret") ErrEmptyMnemonic = errors.New("empty mnemonic") ErrEmptyPassPhrase = errors.New("empty pass phrase") ErrTwoFactorDisabled = errors.New("two factor authentication is disabled") )
Functions ¶
This section is empty.
Types ¶
type CreateParams ¶
type GetAllPrivateKeysRequest ¶
type GetAllPrivateKeysRequest struct {
OwnerID uuid.UUID `json:"owner_id"`
OTP string `json:"otp"`
}
func (*GetAllPrivateKeysRequest) Validate ¶
func (o *GetAllPrivateKeysRequest) Validate() error
type GetAllPrivateKeysResponse ¶
type GetAllPrivateKeysResponse map[wconstants.BlockchainType][]PrivateKeysItem
type GetHotWalletKeysRequest ¶
type GetHotWalletKeysRequest struct {
OwnerID uuid.UUID `json:"owner_id"`
WalletAddresses []string `json:"wallet_addresses"`
ExcludedAddresses []string `json:"excluded_addresses,omitempty"`
OTP string `json:"otp"`
}
func (*GetHotWalletKeysRequest) Validate ¶
func (o *GetHotWalletKeysRequest) Validate() error
type GetHotWalletKeysResponse ¶
type GetHotWalletKeysResponse map[wconstants.BlockchainType][]PrivateKeyItem
type GetSeedsResponse ¶
type PrivateKeyItem ¶
type PrivateKeysItem ¶
type PrivateKeysItem struct {
PublicKey string
PrivateKey string
Address string
Kind constants.WalletType
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ConfirmTwoFactorAuth ¶
ConfirmTwoFactorAuth confirms two-factor authentication for the owner.
func (*Service) DecryptOTPDataForAllOwners ¶ added in v0.9.6
func (*Service) DecryptSeedsForAllOwners ¶
func (*Service) DisableTwoFactorAuth ¶
DisableTwoFactorAuth disables two-factor authentication for the owner.
func (*Service) EncryptOTPDataForAllOwners ¶ added in v0.9.6
func (*Service) EncryptSeedsForAllOwners ¶
func (*Service) GetAllPrivateKeys ¶
func (s *Service) GetAllPrivateKeys(ctx context.Context, request GetAllPrivateKeysRequest) (*GetAllPrivateKeysResponse, error)
GetAllPrivateKeys returns all private keys for the owner.
func (*Service) GetHotWalletKeys ¶
func (s *Service) GetHotWalletKeys(ctx context.Context, request *GetHotWalletKeysRequest) (*GetHotWalletKeysResponse, error)
func (*Service) GetSeeds ¶
func (s *Service) GetSeeds(ctx context.Context, ownerID uuid.UUID, otp string) (*GetSeedsResponse, error)
GetSeeds returns the mnemonic and passphrase for the owner.
func (*Service) GetTwoFactorAuthData ¶
func (s *Service) GetTwoFactorAuthData(ctx context.Context, ownerID uuid.UUID) (*GetTwoFactorAuthDataResponse, error)
GetTwoFactorAuthData returns the two-factor authentication data for the owner.
Click to show internal directories.
Click to hide internal directories.