@@ -58,25 +58,25 @@ export interface Tapleaf {
5858}
5959
6060export const TAPLEAF_VERSION_MASK = 0xfe ;
61- export function isTapleaf ( o : any ) : o is Tapleaf {
62- if ( ! o || ! ( 'output' in o ) ) return false ;
61+ export function isTapleaf ( o : unknown ) : o is Tapleaf {
62+ if ( ! o || typeof o !== 'object' || ! ( 'output' in o ) ) return false ;
6363 if ( ! ( o . output instanceof Uint8Array ) ) return false ;
6464 if ( o . version !== undefined )
6565 return ( o . version & TAPLEAF_VERSION_MASK ) === o . version ;
6666 return true ;
6767}
6868
6969/**
70- * Binary tree repsenting script path spends for a Taproot input.
70+ * Binary tree representing script path spends for a Taproot input.
7171 * Each node is either a single Tapleaf, or a pair of Tapleaf | Taptree.
7272 * The tree has no balancing requirements.
7373 */
7474export type Taptree = [ Taptree | Tapleaf , Taptree | Tapleaf ] | Tapleaf ;
7575
76- export function isTaptree ( scriptTree : any ) : scriptTree is Taptree {
76+ export function isTaptree ( scriptTree : unknown ) : scriptTree is Taptree {
7777 if ( ! Array . isArray ( scriptTree ) ) return isTapleaf ( scriptTree ) ;
7878 if ( scriptTree . length !== 2 ) return false ;
79- return scriptTree . every ( ( t : any ) => isTaptree ( t ) ) ;
79+ return scriptTree . every ( ( t : unknown ) => isTaptree ( t ) ) ;
8080}
8181
8282export interface TinySecp256k1Interface {
@@ -110,7 +110,7 @@ export const SatoshiSchema = v.pipe(
110110 v . maxValue ( 0x7fff_ffff_ffff_ffffn ) ,
111111) ;
112112
113- export const NullablePartial = ( a : Record < string , any > ) =>
113+ export const NullablePartial = ( a : Record < string , unknown > ) =>
114114 v . object (
115115 Object . entries ( a ) . reduce (
116116 ( acc , next ) => ( { ...acc , [ next [ 0 ] ] : v . nullish ( next [ 1 ] ) } ) ,
0 commit comments