derive/
lib.rs

1// Modern, minimalistic & standard-compliant cold wallet library.
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Written in 2020-2024 by
6//     Dr Maxim Orlovsky <orlovsky@lnp-bp.org>
7//
8// Copyright (C) 2020-2024 LNP/BP Standards Association. All rights reserved.
9// Copyright (C) 2020-2024 Dr Maxim Orlovsky. All rights reserved.
10//
11// Licensed under the Apache License, Version 2.0 (the "License");
12// you may not use this file except in compliance with the License.
13// You may obtain a copy of the License at
14//
15//     http://www.apache.org/licenses/LICENSE-2.0
16//
17// Unless required by applicable law or agreed to in writing, software
18// distributed under the License is distributed on an "AS IS" BASIS,
19// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20// See the License for the specific language governing permissions and
21// limitations under the License.
22
23#[macro_use]
24extern crate amplify;
25#[cfg(feature = "serde")]
26#[macro_use]
27extern crate serde;
28
29mod index;
30mod path;
31mod xkey;
32mod derive;
33pub mod taptree;
34mod sign;
35
36pub use bc::*;
37pub use derive::{
38    Derive, DeriveCompr, DeriveKey, DeriveLegacy, DeriveScripts, DeriveSet, DeriveXOnly,
39    DerivedAddr, DerivedAddrParseError, DerivedScript, Keychain, Terminal, TerminalParseError,
40};
41pub use index::{
42    DerivationIndex, HardenedIndex, Idx, IdxBase, IndexError, IndexParseError, NormalIndex,
43    HARDENED_INDEX_BOUNDARY,
44};
45pub use invoice::*;
46pub use path::{DerivationParseError, DerivationPath, DerivationSeg, SegParseError};
47pub use sign::Sign;
48pub use taptree::{
49    ControlBlockFactory, FinalizedTree, InvalidTree, LeafInfo, TapDerivation, TapTree,
50    TapTreeBuilder, UnfinalizedTree,
51};
52pub use xkey::{
53    ChainCode, KeyOrigin, OriginParseError, XkeyAccountError, XkeyDecodeError, XkeyMeta,
54    XkeyOrigin, XkeyParseError, Xpriv, XprivAccount, XprivCore, Xpub, XpubAccount, XpubCore,
55    XpubDerivable, XpubFp, XpubId, XPRIV_MAINNET_MAGIC, XPRIV_TESTNET_MAGIC,
56};