1 |
|
2 | import { Tapleaf, Taptree } from '../types';
|
3 | export declare const LEAF_VERSION_TAPSCRIPT = 192;
|
4 | export declare const MAX_TAPTREE_DEPTH = 128;
|
5 | interface HashLeaf {
|
6 | hash: Buffer;
|
7 | }
|
8 | interface HashBranch {
|
9 | hash: Buffer;
|
10 | left: HashTree;
|
11 | right: HashTree;
|
12 | }
|
13 | interface TweakedPublicKey {
|
14 | parity: number;
|
15 | x: Buffer;
|
16 | }
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export type HashTree = HashLeaf | HashBranch;
|
24 | export declare function rootHashFromPath(controlBlock: Buffer, leafHash: Buffer): Buffer;
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare function toHashTree(scriptTree: Taptree): HashTree;
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | export declare function findScriptPath(node: HashTree, hash: Buffer): Buffer[] | undefined;
|
39 | export declare function tapleafHash(leaf: Tapleaf): Buffer;
|
40 | export declare function tapTweakHash(pubKey: Buffer, h: Buffer | undefined): Buffer;
|
41 | export declare function tweakKey(pubKey: Buffer, h: Buffer | undefined): TweakedPublicKey | null;
|
42 | export {};
|