Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAccountHasNoActiveGuardian = errors.New("no active guardian for the account")
ErrAccountHasNoActiveGuardian signals that there is no active guardian for the user
var ErrEmptyUrl = errors.New("empty url")
ErrEmptyUrl signals that an empty url was provided
var ErrGuardianMismatch = errors.New("guardian mismatch")
ErrGuardianMismatch signals that a guardian mismatch was detected on transactions
var ErrGuardianNotUsable = errors.New("guardian not yet usable")
ErrGuardianNotUsable signals that the given guardian is not yet usable
var ErrInvalidGuardian = errors.New("invalid guardian")
ErrInvalidGuardian signals that the given guardian is not valid
var ErrInvalidSender = errors.New("invalid sender")
ErrInvalidSender signals that the given sender is not valid
var ErrInvalidValue = errors.New("invalid value")
ErrInvalidValue signals that an invalid value was provided
var ErrNilCryptoComponentsHolderFactory = errors.New("nil crypto components holder factory")
ErrNilCryptoComponentsHolderFactory signals that a nil crypto components holder factory was provided
var ErrNilDB = errors.New("nil db")
ErrNilDB signals that a nil db was provided
var ErrNilEncryptor = errors.New("nil encryptor")
ErrNilEncryptor signals that a nil encryptor was provided
var ErrNilGuardedTxBuilder = errors.New("nil guarded tx builder")
ErrNilGuardedTxBuilder signals that a nil guarded tx builder was provided
var ErrNilHTTPClientWrapper = errors.New("nil http client wrapper")
ErrNilHTTPClientWrapper signals that a nil http client wrapper was provided
var ErrNilHasher = errors.New("nil hasher")
ErrNilHasher signals that a nil hasher was provided
var ErrNilKeyGenerator = errors.New("nil key generator")
ErrNilKeyGenerator signals that a nil key generator was provided
var ErrNilKeysGenerator = errors.New("nil keys generator")
ErrNilKeysGenerator signals that a nil keys generator was provided
var ErrNilMarshaller = errors.New("nil marshaller")
ErrNilMarshaller signals that a nil marshaller was provided
var ErrNilPubKeyConverter = errors.New("nil pub key converter")
ErrNilPubKeyConverter signals that a nil pub key converter was provided
var ErrNilSecureOtpHandler = errors.New("nil secure TOTP handler")
ErrNilSecureOtpHandler signals that a nil secure TOTP handler was provided
var ErrNilSignatureVerifier = errors.New("nil signature verifier")
ErrNilSignatureVerifier signals that a nil signature verifier was provided
var ErrNilTOTPHandler = errors.New("nil TOTP handler")
ErrNilTOTPHandler signals that a nil TOTP handler was provided
var ErrNilUserEncryptor = errors.New("nil user encryptor")
ErrNilUserEncryptor signals that a nil user encryptor was provided
var ErrNilUserInfo = errors.New("nil user info")
ErrNilUserInfo signals that a nil user info was provided
var ErrNoBalance = errors.New("no balance")
ErrNoBalance signals that the provided account has no balance
var ErrNoTransactionToSign = errors.New("no transaction to sign")
ErrNoTransactionToSign signals that no transaction was provided to sign
var ErrSameCode = errors.New("same code")
ErrSameCode signals that same code was provided
var ErrSecondCodeInvalidInSecurityMode = errors.New("second code is invalid in security mode")
ErrSecondCodeInvalidInSecurityMode signals that the second code is invalid in security mode
var ErrTooManyTransactionsToSign = errors.New("too many transactions to sign")
ErrTooManyTransactionsToSign signals that too many transactions were provided to sign
Functions ¶
func NewServiceResolver ¶
func NewServiceResolver(args ArgServiceResolver) (*serviceResolver, error)
NewServiceResolver returns a new instance of service resolver
func NewUserEncryptor ¶
NewUserEncryptor creates a new instance of userEncryptor
Types ¶
type ArgServiceResolver ¶
type ArgServiceResolver struct {
UserEncryptor UserEncryptor
TOTPHandler handlers.TOTPHandler
SecureOtpHandler handlers.SecureOtpHandler
HttpClientWrapper core.HttpClientWrapper
KeysGenerator core.KeysGenerator
PubKeyConverter core.PubkeyConverter
UserDataMarshaller core.Marshaller
TxMarshaller core.Marshaller
TxHasher data.Hasher
SignatureVerifier builders.Signer
GuardedTxBuilder core.GuardedTxBuilder
RegisteredUsersDB core.StorageWithIndex
KeyGen crypto.KeyGenerator
CryptoComponentsHolderFactory CryptoComponentsHolderFactory
Config config.ServiceResolverConfig
}
ArgServiceResolver is the DTO used to create a new instance of service resolver
type CryptoComponentsHolderFactory ¶
type CryptoComponentsHolderFactory interface {
Create(privateKeyBytes []byte) (sdkCore.CryptoComponentsHolder, error)
IsInterfaceNil() bool
}
CryptoComponentsHolderFactory is the interface that defines the methods that can be used to create a new instance of CryptoComponentsHolder
type Encryptor ¶
type Encryptor interface {
EncryptData(data []byte) ([]byte, error)
DecryptData(data []byte) ([]byte, error)
IsInterfaceNil() bool
}
Encryptor is the interface that defines the methods that can be used to encrypt and decrypt data
type UserEncryptor ¶
type UserEncryptor interface {
EncryptUserInfo(userInfo *core.UserInfo) (*core.UserInfo, error)
DecryptUserInfo(userInfo *core.UserInfo) (*core.UserInfo, error)
IsInterfaceNil() bool
}
UserEncryptor is the interface that defines the methods that can be used to encrypt and decrypt user info