Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ConfigPath the path of the Keystore V3 wallet path ConfigPath = "path" // ConfigFilenamesWith0xPrefix whether or not to use the 0x prefix on filenames, when using passwordExt password ConfigFilenamesWith0xPrefix = "filenames.with0xPrefix" // ConfigFilenamesPrimaryExt extension to append to the "from" address string to find the file (see metadata section for file types). All filenames must be lower case on disk. ConfigFilenamesPrimaryExt = "filenames.primaryExt" // ConfigFilenamesPrimaryMatchRegex allows filenames where the address can be extracted with a regular expression. Takes precedence over primaryExt ConfigFilenamesPrimaryMatchRegex = "filenames.primaryMatchRegex" // ConfigFilenamesPasswordExt extension to append to the "from" address string to find the password file (if not using a metadata file to specify the password file) ConfigFilenamesPasswordExt = "filenames.passwordExt" // ConfigFilenamesPasswordPath directory path where the password files should be found - default is the same path as the primary file ConfigFilenamesPasswordPath = "filenames.passwordPath" // ConfigFilenamesPasswordTrimSpace whether to trim whitespace from passwords loaded from files (such as trailing newline characters) ConfigFilenamesPasswordTrimSpace = "filenames.passwordTrimSpace" // ConfigDefaultPasswordFile default password file to use if neither the metadata, or passwordExtension find a password ConfigDefaultPasswordFile = "defaultPasswordFile" // ConfigDisableListener disable the filesystem listener that detects newly added keys automatically ConfigDisableListener = "disableListener" // ConfigSignerCacheSize the number of signing keys to keep in memory ConfigSignerCacheSize = "signerCacheSize" // ConfigSignerCacheTTL the time to keep an unused signing key in memory ConfigSignerCacheTTL = "signerCacheTTL" // ConfigMetadataFormat format to parse the metadata - supported: auto (from extension) / filename / toml / yaml / json (please quote "0x..." strings in YAML) ConfigMetadataFormat = "metadata.format" // ConfigMetadataKeyFileProperty use for toml/yaml/json to find the name of the file containing the keystorev3 file ConfigMetadataKeyFileProperty = "metadata.keyFileProperty" // ConfigMetadataPasswordFileProperty use for toml/yaml to find the name of the file containing the keystorev3 file ConfigMetadataPasswordFileProperty = "metadata.passwordFileProperty" )
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
Types ¶
type Config ¶
type Config struct { Path string DefaultPasswordFile string SignerCacheSize string SignerCacheTTL string DisableListener bool Filenames FilenamesConfig Metadata MetadataConfig }
func ReadConfig ¶
type FilenamesConfig ¶
type MetadataConfig ¶
type Wallet ¶
type Wallet interface { ethsigner.WalletTypedData GetWalletFile(ctx context.Context, addr ethtypes.Address0xHex) (keystorev3.WalletFile, error) AddListener(listener chan<- ethtypes.Address0xHex) }
Wallet is a directory containing a set of KeystoreV3 files, conforming to the ethsigner.Wallet interface and providing notifications when new keys are added to the wallet (via FS listener).
func NewFilesystemWallet ¶
Click to show internal directories.
Click to hide internal directories.