[#btck_context_create]
= btck&lowbar;context&lowbar;create
:mrdocs:

Create a new kernel context&period; If the options have not been previously set, their corresponding fields will be initialized to default values&semi; the context will assume mainnet chain parameters and won&apos;t attempt to call the kernel notification callbacks&period;

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:btck_Context-07.adoc[btck&lowbar;Context]*
btck&lowbar;context&lowbar;create(xref:btck_ContextOptions-0d.adoc[btck&lowbar;ContextOptions] const* context&lowbar;options);
----

== Return Value

The allocated context, or null on error&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *context&lowbar;options* [in]
| Nullable, created by xref:btck_context_options_create.adoc[`btck&lowbar;context&lowbar;options&lowbar;create`]&period;
|===


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