Skip to content

fix: export TweakedPublicKey and fix JSDoc comments in bip341.d.ts #2247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cjs/payments/bip341.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface HashBranch {
left: HashTree;
right: HashTree;
}
interface TweakedPublicKey {
export interface TweakedPublicKey {
parity: number;
x: Uint8Array;
}
Expand Down Expand Up @@ -45,7 +45,7 @@ export declare function findScriptPath(node: HashTree, hash: Uint8Array): Uint8A
/**
* Calculates the tapleaf hash for a given Tapleaf object.
* @param leaf - The Tapleaf object to calculate the hash for.
* @returns The tapleaf hash as a Buffer.
* @returns The tapleaf hash as a Uint8Array.
*/
export declare function tapleafHash(leaf: Tapleaf): Uint8Array;
/**
Expand All @@ -61,7 +61,7 @@ export declare function tapTweakHash(pubKey: Uint8Array, h: Uint8Array | undefin
/**
* Tweak a public key with a given tweak hash.
* @param pubKey - The public key to be tweaked.
* @param h - The tweak hash.
* @param h - The optional tweak hash.
* @returns The tweaked public key or null if the input is invalid.
*/
export declare function tweakKey(pubKey: Uint8Array, h: Uint8Array | undefined): TweakedPublicKey | null;
Expand Down
Loading