package
0.0.0-20250225105205-8289a55d8107
Repository: https://github.com/mysteriumnetwork/node.git
Documentation: pkg.go.dev
# Functions
FromAddress converts address to identity.
NewExporter returns a new exporter object.
NewExtractor constructs Extractor instance.
NewIdentityCache creates and returns identityCache.
NewIdentityCacheFake creates and returns fake identity cache.
NewIdentityManager creates and returns new identityManager.
NewIdentityManagerFake creates fake identity manager for testing purposes TODO each caller should use it's own mocked manager part instead of global one.
NewImporter returns a new importer object.
NewKeystoreFilesystem create new keystore, which keeps keys in filesystem.
NewMockKeystore returns empty mock keystore.
NewMockKeystoreWith returns a new mock keystore with specified keys.
NewMover returns a new mover object.
NewResidentCountry constructor.
NewSigner returns new instance of Signer.
NewVerifierIdentity constructs Verifier which: - checks signature's sanity - checks if message was unchanged by middleman - checks if message is from exact identity.
NewVerifierSigned constructs Verifier which: - checks signature's sanity - checks if message was unchanged by middleman.
SignatureBase64 decodes base64 string signature into Signature.
SignatureBytes constructs Signature structure instance from bytes.
SignatureHex returns Signature struct from hex string.
# Constants
Identity events.
Identity events.
AppTopicResidentCountry resident country event topic.
# Variables
MockDecryptFunc represents the mock decrypt func.
MockKeys represents the mocked keys.
# Structs
AppEventIdentityUnlock represents the payload that is sent on identity unlock.
Exporter exposes a way to export private keys.
Identity represents unique user network identity.
IdentityCache saves identity to file.
Importer exposes a way to import an private keys.
Keystore handles everything that's related to eth accounts.
MockKey represents a mocked key.
Mover is wrapper on both the Exporter and Importer and can be used to manipulate private keys in to either direction.
ResidentCountry for saving and loading resident country resident country is used by legal to pay VAT.
ResidentCountryEvent represent actual resident country changed event.
Signature structure.
SignerFake represents fake signer for testing purposes TODO each caller (or use case) must use its own mocked signer in testing.
VerifierFake represents fake signature verifier useful for testing TODO each caller must use its own mocked verifier instead of global one.
# Interfaces
Extractor is able to message signer's identity.
IdentityCacheInterface allows caching single identity.
Manager interface exposes identity management methods TODO this interface must decay into caller specific smaller interfaces.
Signer interface signifies an ability to sign a message.
Verifier checks message's sanity.
# Type aliases
SignerFactory callback returning Signer.
VerifierFactory callback returning Verifier.