Skip to content

Commit

Permalink
add tr(KEY) re expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero-1729 committed May 16, 2024
1 parent 0511e64 commit ccbc520
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/re.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const reAddr = String.raw`addr\((.*?)\)`; //Matches anything. We assert later in
const rePkh = String.raw`pkh\(${reKeyExp}\)`;
const reWpkh = String.raw`wpkh\(${reKeyExp}\)`;
const reShWpkh = String.raw`sh\(wpkh\(${reKeyExp}\)\)`;
const rePtr = String.raw`tr\(${reKeyExp}\)`;


const reMiniscript = String.raw`(.*?)`; //Matches anything. We assert later in the code that miniscripts are valid and sane.

Expand All @@ -72,6 +74,7 @@ export const reAddrAnchored = anchorStartAndEnd(composeChecksum(reAddr));
export const rePkhAnchored = anchorStartAndEnd(composeChecksum(rePkh));
export const reWpkhAnchored = anchorStartAndEnd(composeChecksum(reWpkh));
export const reShWpkhAnchored = anchorStartAndEnd(composeChecksum(reShWpkh));
export const rePtrAnchored = anchorStartAndEnd(composeChecksum(rePtr));

export const reShMiniscriptAnchored = anchorStartAndEnd(
composeChecksum(makeReSh(reMiniscript))
Expand Down

0 comments on commit ccbc520

Please sign in to comment.