[#ChainType]
= ChainType
:mrdocs:

Identifies which Bitcoin chain a node operates on&period;

== Synopsis

Declared in `&lt;util&sol;chaintype&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
enum class ChainType : int;
----

== Members

[cols="1,4"]
|===
| Name| Description
| `MAIN` 
| The main Bitcoin network (mainnet)&period;
| `TESTNET` 
| The version 3 public test network (testnet3)&period;
| `SIGNET` 
| A signet network, where blocks require a signature&period;
| `REGTEST` 
| A private regression test network with on&hyphen;demand block creation&period;
| `TESTNET4` 
| The version 4 public test network (testnet4)&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:ChainTypeFromString.adoc[`ChainTypeFromString`]
| Parse a chain type from its canonical string name&period;
| xref:ChainTypeToString.adoc[`ChainTypeToString`]
| Convert a chain type to its canonical string name&period;
| xref:CreateBaseChainParams.adoc[`CreateBaseChainParams`]
| Creates and returns a std&colon;&colon;unique&lowbar;ptr&lt;CBaseChainParams&gt; of the chosen chain&period;
| xref:GetNetworkForMagic.adoc[`GetNetworkForMagic`]
| Determines which chain a set of network magic bytes belongs to&period;
| xref:SelectBaseParams.adoc[`SelectBaseParams`]
| Sets the params returned by Params() to those for the given chain&period;
| xref:SelectParams.adoc[`SelectParams`]
| Sets the params returned by Params() to those for the given chain type&period;
|===


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