[#common]
= common
:mrdocs:

Shared types used across the node, wallet, and GUI code&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:common/ConfigError.adoc[`ConfigError`] 
| Details about a configuration initialization failure&period;
| xref:common/PSBTFillOptions.adoc[`PSBTFillOptions`] 
| Instructions for how a PSBT should be signed or filled with information&period;
| xref:common/Settings.adoc[`Settings`] 
| Stored settings&period; This struct combines settings from the command line, a read&hyphen;only configuration file, and a read&hyphen;write runtime settings file&period;
| xref:common/SettingsSpan.adoc[`SettingsSpan`] 
| Accessor for list of settings that skips negated values when iterated over&period; The last boolean `false` value in the list and all earlier values are considered negated&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:common/SettingsAbortFn.adoc[`SettingsAbortFn`] 
| Callback function to let the user decide whether to abort loading if settings&period;json file exists and can&apos;t be parsed, or to ignore the error and overwrite the file&period;
| xref:common/SettingsValue.adoc[`SettingsValue`] 
| Settings value type (string&sol;integer&sol;boolean&sol;null variant)&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:common/ConfigStatus.adoc[`ConfigStatus`] 
| Outcome of reading configuration and initializing the data directory&period;
| xref:common/PSBTError.adoc[`PSBTError`] 
| Error conditions reported while processing a PSBT&period;
|===


== Functions

[cols="1,4"]
|===
| Name| Description
| xref:common/AmountErrMsg.adoc[`AmountErrMsg`] 
| Build the error message for an invalid amount value&period;
| xref:common/AmountHighWarn.adoc[`AmountHighWarn`] 
| Build a warning that a configured amount is unusually high&period;
| xref:common/FeeModeFromString.adoc[`FeeModeFromString`] 
| Parse a fee estimate mode from its string name&period;
| xref:common/FeeModeInfo.adoc[`FeeModeInfo`] 
| Format a single fee mode and its description&period;
| xref:common/FeeModes.adoc[`FeeModes`] 
| List the available fee estimate mode names&period;
| xref:common/FeeModesDetail.adoc[`FeeModesDetail`] 
| Build the detailed help text describing all fee modes&period;
| xref:common/FindKey.adoc[`FindKey`] 
| Map lookup helper&period;
| xref:common/GetSetting.adoc[`GetSetting`] 
| Get settings value from combined sources&colon; forced settings, command line arguments, runtime read&hyphen;write settings, and the read&hyphen;only config file&period;
| xref:common/GetSettingsList.adoc[`GetSettingsList`] 
| Get combined setting value similar to GetSetting(), except if setting was specified multiple times, return a list of all the values specified&period;
| xref:common/InitConfig.adoc[`InitConfig`] 
| Read config files, and create datadir and settings&period;json if they don&apos;t exist&period;
| xref:common/InvalidEstimateModeErrorMessage.adoc[`InvalidEstimateModeErrorMessage`] 
| Return the error message shown when an invalid estimate mode is given&period;
| xref:common/InvalidPortErrMsg.adoc[`InvalidPortErrMsg`] 
| Build the error message for an invalid port value&period;
| xref:common/OnlyHasDefaultSectionSetting.adoc[`OnlyHasDefaultSectionSetting`] 
| Return true if a setting is set in the default config file section, and not overridden by a higher priority command&hyphen;line or network section value&period;
| xref:common/PSBTErrorString.adoc[`PSBTErrorString`] 
| Return a bilingual message describing a PSBT error&period;
| xref:common/ReadSettings.adoc[`ReadSettings`] 
| Read settings file&period;
| xref:common/ResolveErrMsg.adoc[`ResolveErrMsg`] 
| Build the error message for a failed address resolution&period;
| xref:common/StringForFeeReason.adoc[`StringForFeeReason`] 
| Return a human&hyphen;readable description of a fee reason&period;
| xref:common/TransactionErrorString.adoc[`TransactionErrorString`] 
| Return a bilingual message describing a transaction error&period;
| xref:common/WriteSettings.adoc[`WriteSettings`] 
| Write settings file&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
