(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Wolfram 15.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       154,          7]
NotebookDataLength[     45220,       1221]
NotebookOptionsPosition[     36183,       1053]
NotebookOutlinePosition[     38247,       1102]
CellTagsIndexPosition[     38169,       1097]
WindowTitle->TaprootOutputKey
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {GridBox[{
      {
       ItemBox[Cell[BoxData[
         RowBox[{
          TemplateBox[{12},
           "Spacer1"], Cell[
          "WOLFRAM INSTITUTE/ PUZZLES SYMBOL", "PacletNameCell",
           TextAlignment->Center,ExpressionUUID->
           "98dd0b76-f5bc-43c6-a94f-f78b06fa26db"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "cdc489b5-98eb-408b-abfd-30b746695764"],
        Background->LightDarkSwitched[
          RGBColor[0.490196, 0.576471, 0.690196]],
        ItemSize->Full], ""}
     },
     GridBoxAlignment->{"Rows" -> {{Center}}},
     GridBoxItemSize->{"Columns" -> {Full, 
         Scaled[0.02]}, "Rows" -> {{2.5}}}], Cell[TextData[{
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "See Also",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "ca827ab9-2711-49db-88c4-0f2e27f6be3e"]
         }],ExpressionUUID->"45555e03-5fdf-4c95-9f78-ff4db66cd962"],
         StripOnInput->False],{
        StyleBox[
          "\"BitcoinAddress\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BitcoinAddress"], 
         StyleBox[
          "\"Secp256k1PointAdd\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/Secp256k1PointAdd"], 
         StyleBox[
          "\"Secp256k1Point\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/Secp256k1Point"], 
         StyleBox[
          "\"BitcoinAddressData\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BitcoinAddressData"], 
         StyleBox[
          "\"BIP32DeriveKey\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP32DeriveKey"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "4656a61c-dbbe-403d-aeb3-276ff0a26d78"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "Related Guides",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "6854b754-c2eb-48b7-a48c-49924ea48131"]
         }],ExpressionUUID->"d603b67b-99a1-4900-ac63-f19c227bdfa5"],
         StripOnInput->False],{
        "\"Derivation\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Derivation"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "e0fa4e1a-394d-4f54-be12-ceadc3919488"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "URL",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "27e96948-ce2d-499a-96a5-051ce4986ad1"]
         }],ExpressionUUID->"67f6ec8c-fd01-4fb0-b02e-429bc0966a84"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/TaprootOutputKey\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/TaprootOutputKey"], 
         Delimiter, "\"Copy web URL\"" :> 
         Module[{DocumentationSearch`Private`nb$}, 
           DocumentationSearch`Private`nb$ = 
            NotebookPut[
             Notebook[{
               Cell[BoxData[
                 MakeBoxes[
                  Hyperlink[
                   "http://reference.wolfram.com/language/WolframInstitute/\
Puzzles/ref/TaprootOutputKey.html"], StandardForm]], "Input", 
                 TextClipboardType -> "PlainText"]}, Visible -> False]]; 
           SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
           FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
           NotebookClose[DocumentationSearch`Private`nb$]; Null], 
         "\"Go to web URL\"" :> 
         FrontEndExecute[{
           NotebookLocate[{
             URL[If[TrueQ[False], 
                 "http://reference.wolfram.com/system-modeler/", 
                 "http://reference.wolfram.com/language/"] <> 
               "WolframInstitute/Puzzles/ref/TaprootOutputKey" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "d6319f9a-5dec-41ab-aed1-3e445a0bc711"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "7e467f15-7683-49be-9f36-d07699011fbe"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"34bf3e6a-781a-49aa-aeb7-18015b49f8d8"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"cf3b361d-2321-455a-85e7-b3a834c5dd68"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "TaprootOutputKey", "ObjectName",ExpressionUUID->
      "00b83e52-c5a3-4f24-b156-aa4080995b66"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"e4595185-26d1-4d33-baf3-402e41b1f509"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "6d14b1e6-c729-4ce3-bf91-522df385683d"]
    }],ExpressionUUID->"ba869335-3322-4814-87f8-8e0e48cb4304"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"f0308f7e-df90-4873-b9e1-\
ca5903919d4d"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["TaprootOutputKey"]], 
         "paclet:WolframInstitute/Puzzles/ref/TaprootOutputKey", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       StyleBox["key", "TI"], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "2a02c750-549a-4f88-8260-19139f4259cd"],
     "\[LineSeparator]",
     "gives the 32-byte x-only taproot output key of an internal public ",
     StyleBox["key", "TI"],
     ", as a ByteArray."
    }],ExpressionUUID->"5626f864-49b8-45bf-9c79-fec5e4432412"]}
  }]], "Usage",ExpressionUUID->"242dc3cc-02df-4362-979a-08ba9d71dceb"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[Cell[TextData[{
  Cell[BoxData[
   DynamicBox[ToBoxes[
     If[CurrentValue[
        EvaluationCell[], "CellGroupOpen"] =!= Closed, 
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], 
      Rotate[
       Style[
        Graphics[{
          Thickness[0.18], 
          RGBColor[0.8509803921568627, 0.396078431372549, 0], 
          Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
         PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
        0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
    ImageSizeCache->{
     13.600000000000001`, {-0.1685058593749993, 13.768505859375}}]],
   ExpressionUUID->"88132ce7-66f1-4aee-86e9-c4fb4162fe2c"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"6c58f434-38b9-4bb7-a15e-223454b61a64"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "74c56ba0-33b2-41a1-b923-ce70532fb969"]],ExpressionUUID->"f13ec5f6-cc88-\
4b4f-a234-4c0a90d6617c"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->2051556413,ExpressionUUID->"fd968207-9ac1-4f4b-a614-cd4fe81792eb"],

Cell["\<\
The internal key is a SEC1 public key, a 32-byte x-only key, or a BIP32 \
extended key.\
\>", "Notes",ExpressionUUID->"07f5ab6d-8af0-4a18-a2c1-fcdcc776f7b2"],

Cell[TextData[{
 "The tweak is ",
 Cell[BoxData[
  RowBox[{
   StyleBox["t", "TI"], "=", 
   StyleBox["SHA256",
    FontSlant->"Plain"], 
   StyleBox["(",
    SpanMaxSize->1], 
   RowBox[{
    StyleBox["SHA256",
     FontSlant->"Plain"], 
    StyleBox["(",
     SpanMaxSize->1], 
    StyleBox["TapTweak",
     FontFamily->"Courier",
     FontSlant->"Plain"], 
    StyleBox[")",
     SpanMaxSize->1], "\[ThinSpace]", "\[DoubleVerticalBar]", "\[ThinSpace]", 
    
    StyleBox["SHA256",
     FontSlant->"Plain"], 
    StyleBox["(",
     SpanMaxSize->1], 
    StyleBox["TapTweak",
     FontFamily->"Courier",
     FontSlant->"Plain"], 
    StyleBox[")",
     SpanMaxSize->1], "\[ThinSpace]", "\[DoubleVerticalBar]", "\[ThinSpace]", 
    
    StyleBox["P", "TI"]}], 
   StyleBox[")",
    SpanMaxSize->1]}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "eb6eb212-7a8a-4910-a393-fa2c3ab73963"],
 ", the BIP340 tagged hash of the x-only internal key."
}], "Notes",ExpressionUUID->"ea29ec63-c32c-4b69-937d-903cdc57dc4b"],

Cell[TextData[{
 "The output key is the x coordinate of ",
 Cell[BoxData[
  RowBox[{
   SubscriptBox[
    StyleBox["lift",
     FontSlant->"Plain"], 
    StyleBox["x", "TI"]], 
   StyleBox["(",
    SpanMaxSize->1], 
   StyleBox["P", "TI"], 
   StyleBox[")",
    SpanMaxSize->1], "+", 
   StyleBox["t", "TI"], 
   StyleBox["G", "TI"]}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "66e57840-a70e-459e-9098-8e7d0a995179"],
 ", where ",
 Cell[BoxData[
  SubscriptBox[
   StyleBox["lift",
    FontSlant->"Plain"], 
   StyleBox["x", "TI"]]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "163c0a39-a814-461b-9993-85377c87dfa4"],
 " takes the point with even ",
 Cell[BoxData[
  StyleBox["y", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "942fe33a-9c1f-4843-8315-9b36db4b84f0"],
 "."
}], "Notes",ExpressionUUID->"31130ca8-a5c5-4779-b023-1b298d38dc6f"],

Cell["\<\
This is the BIP86 key-path-only tweak, with no script tree; a taproot output \
committing to a script tree uses a different tweak and is not built here.\
\>", "Notes",ExpressionUUID->"5dcbe53e-da33-48b9-9488-a4c17c0e5cd9"],

Cell["\<\
The 32-byte result is the witness program of a version 1 segwit output.\
\>", "Notes",ExpressionUUID->"465ccdd9-1ec7-4ddc-9be2-41aeb8b20c30"],

Cell["\<\
A key whose x coordinate is not on the curve matches no definition and the \
call is returned unevaluated.\
\>", "Notes",ExpressionUUID->"13a51b0b-4437-4122-afef-1be7da4bb8c6"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"53daf452-9a95-40ca-a67f-8ce20bee499e"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[
     MatchQ[
      CurrentValue[
       EvaluationNotebook[], {
       TaggingRules, "Openers", "PrimaryExamplesSection"}, Open], 
      Alternatives[True, Open]], 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
   ImageSizeCache->{
    13.600000000000001`, {4.251494140625001, 9.348505859375}}]],
  ExpressionUUID->"7a1eb712-ff83-4208-a4d4-741a20856cdc"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"9268b329-b6e6-4bdd-86e6-d568a874539b"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(11)", "ExampleCount",ExpressionUUID->
  "77ff376a-f27e-4846-aed5-b1fd94f7710b"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->511197059,ExpressionUUID->"3f942dbd-3908-42c3-963e-f968e095348b"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"049e7b64-74a9-43c6-b4b7-7eac23ef1b3d"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "c855fa29-5032-4fd6-bd05-eb6d31b0811f"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"ac5c9740-3a28-482d-909c-7a5371dfa5fc"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "da835fad-3c6d-4613-9023-cc4448577521"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1754382613,ExpressionUUID->"107f0d61-9031-43e4-b1af-528515edcdeb"],

Cell["\<\
The BIP86 first receiving output key, from its published internal key:\
\>", "ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"0b25cd9d-bbff-4c72-a7df-378d0ae884b2"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteListToHexString", "[", 
  RowBox[{"Normal", "[", 
   RowBox[{
   "TaprootOutputKey", 
    "[", "\"\<\
cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", "]"}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"6d023d8c-3f73-4000-b34f-6e61081fbf97"],

Cell[BoxData["\<\"\
a60869f0dbcf1dc659c9cecbaf8050135ea9e8cdc487053f1dc6880949dc684c\"\>"], \
"Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"64280801-c5c8-4cf1-acf5-b3a4851ffb03"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "575cdf47-6164-4560-9255-1c86e77338ef"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"253e6fd0-cc36-49ca-\
bebe-77004f7b8cae"],

Cell["The same tweak taken straight from the derived extended key:", \
"ExampleText",ExpressionUUID->"8afec95e-1f85-4c18-a83a-720602343db7"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteListToHexString", "[", 
  RowBox[{"Normal", "[", 
   RowBox[{"TaprootOutputKey", "[", 
    RowBox[{"BIP32DeriveKey", "[", 
     RowBox[{
      RowBox[{
      "BIP32MasterKey", 
       "[", "\"\<\
5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd3\
70d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4\>\"", "]"}], ",", 
      " ", "\"\<m/86h/0h/0h/0/0\>\""}], "]"}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"25df1162-e7f0-472f-b271-8a33e80ee9f2"],

Cell[BoxData["\<\"\
a60869f0dbcf1dc659c9cecbaf8050135ea9e8cdc487053f1dc6880949dc684c\"\>"], \
"Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"bde09040-44ad-49f4-9b53-4254ff4c0b19"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "e7b6bef1-5b5b-411b-95d8-b2dd190b13f1"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"95e60ce1-0968-46b0-\
81f2-eb2a47b091a2"],

Cell["The result is 32 bytes, an x-only key:", "ExampleText",ExpressionUUID->"a7d34a5b-3acd-4bc2-a4b0-aa318c69a81a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\
\>\"", "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"b5b69755-2c14-45c7-ad02-bbce5ee545bb"],

Cell[BoxData["32"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"59ae5798-26f0-4c89-9d33-ab4b630578dd"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "5a2792b5-2c73-4c56-ba51-87a295d8e926"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"cbf0ba8d-47bc-4f27-aec4-7b8123a70868"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(4)", "ExampleCount",ExpressionUUID->
  "ce5f4558-1a60-4171-abc2-cbe25c691bef"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"2d6e086a-cde7-4d86-a69a-b5deb0d532c8"],

Cell[TextData[{
 "The x-only key and the full SEC1 key of the same point give the same output \
key, since only ",
 Cell[BoxData[
  StyleBox["x", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "de1e6293-6d21-49c8-ad79-739b922d94cc"],
 " enters the tweak:"
}], "ExampleText",ExpressionUUID->"48c35056-6433-41b8-b6c6-fe3aadb3de7b"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\
\>\"", "]"}], " ", "===", " ", 
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<\
02cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", 
   "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"f0512cbc-7ae6-40f0-81d5-8d198d356be2"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"057659bc-91bd-4440-94fe-badbd6b0b9f6"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "91994443-6ec5-43c6-8499-64b617b7f2b1"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"8892161d-74af-4cce-\
bc4a-a1decda3abf5"],

Cell[TextData[{
 "The ",
 Cell[BoxData[
  RowBox[{"0", "x03"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "34840bee-a09f-4918-85f4-9b478a767f96"],
 " encoding of the same ",
 Cell[BoxData[
  StyleBox["x", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "4dd32d33-e764-4345-939d-56cccdaad76d"],
 " also gives the same output key, because ",
 Cell[BoxData[
  SubscriptBox[
   StyleBox["lift",
    FontSlant->"Plain"], 
   StyleBox["x", "TI"]]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "7bcd4540-c8f0-43c5-81ea-08661f90cbb7"],
 " discards the parity:"
}], "ExampleText",ExpressionUUID->"9a23c17c-c778-40f3-92e9-e50a1828e0d9"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<\
03cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", 
   "]"}], " ", "===", " ", 
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<\
02cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", 
   "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"58de3bee-25d5-4485-8cd4-35ae1729cf1c"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"ef3a8286-b925-4ec2-a268-1bf31bf2d991"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "de6594d1-e50b-43bd-87f5-909e9a1bd665"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"97a31bff-dee3-48ab-\
92bd-de01045bd58e"],

Cell["\<\
The other two BIP86 vectors, the second receiving key and the first change \
key:\
\>", "ExampleText",ExpressionUUID->"291c89c0-e6c8-461b-ad34-bd7ef41d9c1c"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Map", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"ByteListToHexString", "[", 
     RowBox[{"Normal", "[", 
      RowBox[{"TaprootOutputKey", "[", "#", "]"}], "]"}], "]"}], " ", "&"}], ",",
    " ", 
   RowBox[{"{", 
    RowBox[{"\"\<\
83dfe85a3151d2517290da461fe2815591ef69f2b18a2ce63f01697a8b313145\>\"", ",", 
     " ", "\"\<\
399f1b2f4393f29a18c937859c5dd8a77350103157eb880f02e8c08214277cef\>\""}], 
    "}"}]}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"1fa40d8e-2533-4fe6-bc36-8945a540a3d3"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"\
a82f29944d65b86ae6b5e5cc75e294ead6c59391a1edc5e016e3498c67fc7bbb\"\>", 
   ",", "\<\"882d74e5d0572d5a816cef0041a96b6c1de832f6f9676d9605c44d5e9a97d3dc\
\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"74086624-89ff-4a07-bb20-e84a40923c62"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "db389f2f-6349-48b3-9cee-bcd5a47de713"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"3f8818c9-0da3-490b-\
ac74-df63d0882bdf"],

Cell["\<\
An x coordinate that is not on the curve is not a key, and the call is \
returned unevaluated:\
\>", "ExampleText",ExpressionUUID->"52880e77-ca2a-4cd5-90ef-887bd5456b77"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MatchQ", "[", 
  RowBox[{
   RowBox[{
   "TaprootOutputKey", 
    "[", "\"\<\
0000000000000000000000000000000000000000000000000000000000000007\>\"", "]"}], 
   ",", " ", "_TaprootOutputKey"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"d71ab17c-d9fe-4ca9-a753-ede09868e23e"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"b92f5bba-bb7c-4c63-aa96-5f6baced8b70"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "5cb5a6b2-835e-4d0a-a970-57664adfb3e8"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"dc9dcc66-d085-4ce4-99d3-9d6b29489a94"],
 "Applications",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "dd21a289-3e14-47d1-a1c2-6137a53cbec9"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->258228157,ExpressionUUID->"66eff231-2156-4db9-a0a7-c457bdabf5a2"],

Cell["\<\
The output key is the witness program of the taproot address:\
\>", "ExampleText",ExpressionUUID->"0babcf4c-9c42-4ecc-ab66-10276f67c9f2"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BitcoinAddress", "[", 
  RowBox[{
   RowBox[{"BIP32DeriveKey", "[", 
    RowBox[{
     RowBox[{
     "BIP32MasterKey", 
      "[", "\"\<\
5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd3\
70d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4\>\"", "]"}], ",", 
     " ", "\"\<m/86h/0h/0h/0/0\>\""}], "]"}], ",", " ", "\"\<P2TR\>\""}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"a763a511-5271-4f1e-8653-916b5afd60e7"],

Cell[BoxData["\<\"\
bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr\"\>"], "Output",\

 CellLabel->"Out[1]= ",ExpressionUUID->"04596d65-4f02-4aa4-980a-9fdfeb49fe0b"]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "dd706dbe-0ce3-4ba8-99b0-90df8d48c463"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"b07b07c1-e5b8-4137-8dd8-2cbc5d1d1b67"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "a1abf33d-3ede-49bd-a855-7eddd98e8923"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"1fb2c24c-6d3d-4d1d-ada8-196847d6e90a"],

Cell["The address commits to exactly this key:", "ExampleText",ExpressionUUID->"b2a89d51-673b-4b27-bbd4-81df77149e5a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
   "BitcoinAddressData", 
    "[", "\"\<bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr\>\
\"", "]"}], "[", "\"\<Hash\>\"", "]"}], " ", "===", " ", 
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\
\>\"", "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"f0f9d5a0-01be-4356-9e15-3e8bca1474ce"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"dc832b71-6d07-49e1-be58-8ce71d37b56a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "c1f94418-441f-4aec-906a-19a111e2994b"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"3fcfdb64-c35a-4749-\
a8e1-5beac9b54440"],

Cell[TextData[{
 "The tweak is one ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["Secp256k1PointAdd"]], 
    "paclet:WolframInstitute/Puzzles/ref/Secp256k1PointAdd", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "89fbb8a0-5029-4c7e-b6a1-7cbb48806ac7"],
 " away from the internal point, so the output key is a point of the group:"
}], "ExampleText",ExpressionUUID->"bbe2f06b-82b9-4bfc-ad18-f3c2e8865bcd"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Secp256k1PointQ", "[", 
  RowBox[{"Secp256k1Point", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"Prepend", "[", 
     RowBox[{
      RowBox[{"Normal", "[", 
       RowBox[{
       "TaprootOutputKey", 
        "[", "\"\<\
cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", "]"}], 
       "]"}], ",", " ", "2"}], "]"}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"9c0b1f8f-fd67-4fa3-8165-cc879c9e591d"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"06b48f31-cc60-418a-8a81-11be7763193c"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "960c1de1-3808-413f-82a4-d2fb41f539ab"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"5d77986a-47f9-4883-8968-8f200b4c968a"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "4bd456ef-f663-43df-b0bc-16646fb6e2e3"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"53792f11-8247-412f-af0f-6c64853f94dd"],

Cell["\<\
The tweak is not the identity, so the internal key and the output key are \
different 32-byte values, and paying to the internal key pays to an output \
nobody can spend:\
\>", "ExampleText",ExpressionUUID->"a7244e21-a9c2-4fec-befe-d06da6ff0154"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
  "TaprootOutputKey", 
   "[", "\"\<cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\
\>\"", "]"}], " ", "===", " ", 
  RowBox[{"ByteArray", "[", 
   RowBox[{
   "HexStringToByteList", 
    "[", "\"\<\
cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115\>\"", "]"}], 
   "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"614ee062-0641-4f41-99ed-0498796f2ea2"],

Cell[BoxData["False"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"ccf2ed2b-178b-42c4-89ba-7c3e8fe61425"]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedFunction.png"]],
     ImageSizeCache->{50., {26.47265625, 33.52734375}}], GridBox[{
      {
       StyleBox[
        RowBox[{"See", " ", "Also"}], "SeeAlsoSection"]},
      {Cell[TextData[{
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BitcoinAddress"]], 
           "paclet:WolframInstitute/Puzzles/ref/BitcoinAddress", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "a088b871-5dba-4147-83dd-6c338df5fde0"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Secp256k1PointAdd"]], 
           "paclet:WolframInstitute/Puzzles/ref/Secp256k1PointAdd", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "79064260-be3b-4b24-bcb5-a0988793d7c5"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Secp256k1Point"]], 
           "paclet:WolframInstitute/Puzzles/ref/Secp256k1Point", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "a691be66-f879-41ac-b012-bfb3a4947325"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BitcoinAddressData"]], 
           "paclet:WolframInstitute/Puzzles/ref/BitcoinAddressData", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "9e9d73f3-0ce1-4c6b-bd41-c874bd79d656"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP32DeriveKey"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP32DeriveKey", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "c08d27dc-e334-4501-b3bd-c516113f6982"]
       }], "SeeAlso",ExpressionUUID->"1ab1734c-20d5-4e5e-9f68-4069f23b4596"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"e60a98bf-79ed-4ea9-acb3-\
1ec2192b083a"],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, "RelatedGuide.png"]],
     ImageSizeCache->{50., {26.47265625, 33.52734375}}], GridBox[{
      {
       StyleBox[
        RowBox[{"Related", " ", "Guides"}], "MoreAboutSection"]},
      {
       RowBox[{"\[FilledVerySmallSquare]", Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Derivation"]], 
           "paclet:WolframInstitute/Puzzles/guide/Derivation"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "0c11ee3d-9b4b-48d3-ba26-29afcbcf0599"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"69878775-b1f7-4d41-8465-\
ab9ed74da116"],

Cell[" ", "FooterCell",ExpressionUUID->"1ecdb87c-1faa-4869-8c79-0692bca4a367"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"TaprootOutputKey",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "", "LinkTrails" -> "", 
  "ExampleCounter" -> 1, 
  "Openers" -> {
   "PrimaryExamplesSection" -> Open, "ExampleSection" -> {"0" -> Open}, 
    "AllOptsTable" -> Closed}, "NewStyles" -> True, 
  "CitationPopupData" -> $Failed, "ShowCitation" -> False, "HasOptions" -> 
  True, "RootCaptions" -> "", "HeaderCoreAreaLink" -> {}, 
  "Metadata" -> {
   "built" -> "{2026, 8, 27, 0, 11, 59.638778}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[TaprootOutputKey, paclet : \
WolframInstitute/Puzzles/ref/TaprootOutputKey, WolframInstitute/Puzzles \
Package Symbol][key] gives the 32-byte x-only taproot output key of an \
internal public key, as a ByteArray.", "synonyms" -> {}, "tabletags" -> {}, 
    "title" -> "TaprootOutputKey", "titlemodifier" -> "", "metadescription" -> 
    "", "windowtitle" -> "TaprootOutputKey", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/TaprootOutputKey", "WorkflowDockedCell" -> 
    ""}, "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"b5792051-9ad6-43cb-ad85-33d683a59fb6"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[15246, 426, 188, 4, 70, "ExampleText",ExpressionUUID->"0b25cd9d-bbff-4c72-a7df-378d0ae884b2",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 38012, 1091}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[584, 21, 5842, 143, 70, "AnchorBarGrid",ExpressionUUID->"34bf3e6a-781a-49aa-aeb7-18015b49f8d8",
 CellID->1],
Cell[6429, 166, 107, 0, 70, "ContextNameCell",ExpressionUUID->"cf3b361d-2321-455a-85e7-b3a834c5dd68"],
Cell[CellGroupData[{
Cell[6561, 170, 559, 14, 70, "ObjectNameGrid",ExpressionUUID->"f0308f7e-df90-4873-b9e1-ca5903919d4d"],
Cell[7123, 186, 817, 20, 70, "Usage",ExpressionUUID->"242dc3cc-02df-4362-979a-08ba9d71dceb"]
}, Open  ]],
Cell[CellGroupData[{
Cell[7977, 211, 1444, 34, 70, "NotesSection",ExpressionUUID->"fd968207-9ac1-4f4b-a614-cd4fe81792eb",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->2051556413],
Cell[9424, 247, 167, 3, 70, "Notes",ExpressionUUID->"07f5ab6d-8af0-4a18-a2c1-fcdcc776f7b2"],
Cell[9594, 252, 1063, 37, 70, "Notes",ExpressionUUID->"ea29ec63-c32c-4b69-937d-903cdc57dc4b"],
Cell[10660, 291, 1004, 34, 70, "Notes",ExpressionUUID->"31130ca8-a5c5-4779-b023-1b298d38dc6f"],
Cell[11667, 327, 232, 3, 70, "Notes",ExpressionUUID->"5dcbe53e-da33-48b9-9488-a4c17c0e5cd9"],
Cell[11902, 332, 151, 2, 70, "Notes",ExpressionUUID->"465ccdd9-1ec7-4ddc-9be2-41aeb8b20c30"],
Cell[12056, 336, 186, 3, 70, "Notes",ExpressionUUID->"13a51b0b-4437-4122-afef-1be7da4bb8c6"]
}, Closed]],
Cell[12257, 342, 80, 0, 70, "PageDelimiter",ExpressionUUID->"53daf452-9a95-40ca-a67f-8ce20bee499e"],
Cell[CellGroupData[{
Cell[12362, 346, 1401, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"3f942dbd-3908-42c3-963e-f968e095348b",
 CellID->511197059],
Cell[13766, 385, 216, 4, 70, "Input",ExpressionUUID->"049e7b64-74a9-43c6-b4b7-7eac23ef1b3d",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[14007, 393, 1236, 31, 70, "ExampleSection",ExpressionUUID->"107f0d61-9031-43e4-b1af-528515edcdeb",
 CellID->1754382613],
Cell[15246, 426, 188, 4, 70, "ExampleText",ExpressionUUID->"0b25cd9d-bbff-4c72-a7df-378d0ae884b2",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[15459, 434, 362, 9, 70, "Input",ExpressionUUID->"6d023d8c-3f73-4000-b34f-6e61081fbf97"],
Cell[15824, 445, 182, 3, 70, "Output",ExpressionUUID->"64280801-c5c8-4cf1-acf5-b3a4851ffb03"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16043, 453, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"253e6fd0-cc36-49ca-bebe-77004f7b8cae"],
Cell[16270, 460, 140, 1, 70, "ExampleText",ExpressionUUID->"8afec95e-1f85-4c18-a83a-720602343db7"],
Cell[CellGroupData[{
Cell[16435, 465, 578, 13, 70, "Input",ExpressionUUID->"25df1162-e7f0-472f-b271-8a33e80ee9f2"],
Cell[17016, 480, 182, 3, 70, "Output",ExpressionUUID->"bde09040-44ad-49f4-9b53-4254ff4c0b19"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[17247, 489, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"95e60ce1-0968-46b0-81f2-eb2a47b091a2"],
Cell[17474, 496, 116, 0, 70, "ExampleText",ExpressionUUID->"a7d34a5b-3acd-4bc2-a4b0-aa318c69a81a"],
Cell[CellGroupData[{
Cell[17615, 500, 309, 7, 70, "Input",ExpressionUUID->"b5b69755-2c14-45c7-ad02-bbce5ee545bb"],
Cell[17927, 509, 108, 1, 70, "Output",ExpressionUUID->"59ae5798-26f0-4c89-9d33-ab4b630578dd"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[18096, 517, 1227, 31, 70, "ExampleSection",ExpressionUUID->"2d6e086a-cde7-4d86-a69a-b5deb0d532c8",
 CellID->1293636265],
Cell[19326, 550, 385, 9, 70, "ExampleText",ExpressionUUID->"48c35056-6433-41b8-b6c6-fe3aadb3de7b"],
Cell[CellGroupData[{
Cell[19736, 563, 440, 12, 70, "Input",ExpressionUUID->"f0512cbc-7ae6-40f0-81d5-8d198d356be2"],
Cell[20179, 577, 110, 1, 70, "Output",ExpressionUUID->"057659bc-91bd-4440-94fe-badbd6b0b9f6"]
}, Open  ]],
Cell[CellGroupData[{
Cell[20326, 583, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"8892161d-74af-4cce-bc4a-a1decda3abf5"],
Cell[20553, 590, 786, 23, 70, "ExampleText",ExpressionUUID->"9a23c17c-c778-40f3-92e9-e50a1828e0d9"],
Cell[CellGroupData[{
Cell[21364, 617, 446, 13, 70, "Input",ExpressionUUID->"58de3bee-25d5-4485-8cd4-35ae1729cf1c"],
Cell[21813, 632, 110, 1, 70, "Output",ExpressionUUID->"ef3a8286-b925-4ec2-a268-1bf31bf2d991"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[21972, 639, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"97a31bff-dee3-48ab-92bd-de01045bd58e"],
Cell[22199, 646, 167, 3, 70, "ExampleText",ExpressionUUID->"291c89c0-e6c8-461b-ad34-bd7ef41d9c1c"],
Cell[CellGroupData[{
Cell[22391, 653, 581, 15, 70, "Input",ExpressionUUID->"1fa40d8e-2533-4fe6-bc36-8945a540a3d3"],
Cell[22975, 670, 302, 6, 70, "Output",ExpressionUUID->"74086624-89ff-4a07-bb20-e84a40923c62"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23326, 682, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"3f8818c9-0da3-490b-ac74-df63d0882bdf"],
Cell[23553, 689, 180, 3, 70, "ExampleText",ExpressionUUID->"52880e77-ca2a-4cd5-90ef-887bd5456b77"],
Cell[CellGroupData[{
Cell[23758, 696, 360, 9, 70, "Input",ExpressionUUID->"d71ab17c-d9fe-4ca9-a753-ede09868e23e"],
Cell[24121, 707, 110, 1, 70, "Output",ExpressionUUID->"b92f5bba-bb7c-4c63-aa96-5f6baced8b70"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[24292, 715, 1233, 31, 70, "ExampleSection",ExpressionUUID->"66eff231-2156-4db9-a0a7-c457bdabf5a2",
 CellID->258228157],
Cell[25528, 748, 147, 2, 70, "ExampleText",ExpressionUUID->"0babcf4c-9c42-4ecc-ab66-10276f67c9f2"],
Cell[CellGroupData[{
Cell[25700, 754, 532, 13, 70, "Input",ExpressionUUID->"a763a511-5271-4f1e-8653-916b5afd60e7"],
Cell[26235, 769, 180, 3, 70, "Output",ExpressionUUID->"04596d65-4f02-4aa4-980a-9fdfeb49fe0b"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[26464, 778, 1244, 31, 70, "ExampleSection",ExpressionUUID->"1fb2c24c-6d3d-4d1d-ada8-196847d6e90a",
 CellID->2123667759],
Cell[27711, 811, 118, 0, 70, "ExampleText",ExpressionUUID->"b2a89d51-673b-4b27-bbd4-81df77149e5a"],
Cell[CellGroupData[{
Cell[27854, 815, 476, 12, 70, "Input",ExpressionUUID->"f0f9d5a0-01be-4356-9e15-3e8bca1474ce"],
Cell[28333, 829, 110, 1, 70, "Output",ExpressionUUID->"dc832b71-6d07-49e1-be58-8ce71d37b56a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[28480, 835, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"3fcfdb64-c35a-4749-a8e1-5beac9b54440"],
Cell[28707, 842, 564, 14, 70, "ExampleText",ExpressionUUID->"bbe2f06b-82b9-4bfc-ad18-f3c2e8865bcd"],
Cell[CellGroupData[{
Cell[29296, 860, 523, 13, 70, "Input",ExpressionUUID->"9c0b1f8f-fd67-4fa3-8165-cc879c9e591d"],
Cell[29822, 875, 110, 1, 70, "Output",ExpressionUUID->"06b48f31-cc60-418a-8a81-11be7763193c"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[29993, 883, 1237, 31, 70, "ExampleSection",ExpressionUUID->"53792f11-8247-412f-af0f-6c64853f94dd",
 CellID->1305812373],
Cell[31233, 916, 256, 4, 70, "ExampleText",ExpressionUUID->"a7244e21-a9c2-4fec-befe-d06da6ff0154"],
Cell[CellGroupData[{
Cell[31514, 924, 480, 13, 70, "Input",ExpressionUUID->"614ee062-0641-4f41-99ed-0498796f2ea2"],
Cell[31997, 939, 111, 1, 70, "Output",ExpressionUUID->"ccf2ed2b-178b-42c4-89ba-7c3e8fe61425"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[32147, 945, 3200, 83, 70, "SeeAlsoSection",ExpressionUUID->"e60a98bf-79ed-4ea9-acb3-1ec2192b083a"],
Cell[35350, 1030, 748, 19, 70, "MoreAboutSection",ExpressionUUID->"69878775-b1f7-4d41-8465-ab9ed74da116"],
Cell[36101, 1051, 78, 0, 70, "FooterCell",ExpressionUUID->"1ecdb87c-1faa-4869-8c79-0692bca4a367"]
}
]
*)

(* End of internal cache information *)

