File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export interface TweakedPublicKey {
16
16
isOdd : boolean ;
17
17
x : Buffer ;
18
18
}
19
+ export declare const TaprootLeaf : any ;
20
+ export declare const TaprootNode : any ;
19
21
export declare const Buffer256bit : any ;
20
22
export declare const Hash160bit : any ;
21
23
export declare const Hash256bit : any ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
3
- exports . oneOf = exports . Null = exports . BufferN = exports . Function = exports . UInt32 = exports . UInt8 = exports . tuple = exports . maybe = exports . Hex = exports . Buffer = exports . String = exports . Boolean = exports . Array = exports . Number = exports . Hash256bit = exports . Hash160bit = exports . Buffer256bit = exports . Network = exports . ECPoint = exports . Satoshi = exports . Signer = exports . BIP32Path = exports . UInt31 = exports . tweakPublicKey = exports . liftX = exports . isPoint = exports . typeforce = void 0 ;
3
+ exports . oneOf = exports . Null = exports . BufferN = exports . Function = exports . UInt32 = exports . UInt8 = exports . tuple = exports . maybe = exports . Hex = exports . Buffer = exports . String = exports . Boolean = exports . Array = exports . Number = exports . Hash256bit = exports . Hash160bit = exports . Buffer256bit = exports . TaprootNode = exports . TaprootLeaf = exports . Network = exports . ECPoint = exports . Satoshi = exports . Signer = exports . BIP32Path = exports . UInt31 = exports . tweakPublicKey = exports . liftX = exports . isPoint = exports . typeforce = void 0 ;
4
4
const buffer_1 = require ( 'buffer' ) ;
5
5
const bcrypto = require ( './crypto' ) ;
6
6
// Temp, to be replaced
@@ -136,6 +136,17 @@ exports.Network = exports.typeforce.compile({
136
136
scriptHash : exports . typeforce . UInt8 ,
137
137
wif : exports . typeforce . UInt8 ,
138
138
} ) ;
139
+ exports . TaprootLeaf = exports . typeforce . compile ( {
140
+ output : exports . typeforce . BufferN ( 34 ) ,
141
+ version : exports . typeforce . maybe ( exports . typeforce . UInt8 ) , // todo: recheck
142
+ } ) ;
143
+ // / todo: revisit
144
+ exports . TaprootNode = exports . typeforce . arrayOf (
145
+ exports . typeforce . oneOf (
146
+ exports . TaprootLeaf ,
147
+ exports . typeforce . arrayOf ( exports . TaprootLeaf ) ,
148
+ ) ,
149
+ ) ;
139
150
exports . Buffer256bit = exports . typeforce . BufferN ( 32 ) ;
140
151
exports . Hash160bit = exports . typeforce . BufferN ( 20 ) ;
141
152
exports . Hash256bit = exports . typeforce . BufferN ( 32 ) ;
Original file line number Diff line number Diff line change @@ -155,6 +155,16 @@ export interface TweakedPublicKey {
155
155
isOdd : boolean ;
156
156
x : Buffer ;
157
157
}
158
+
159
+ export const TaprootLeaf = typeforce . compile ( {
160
+ output : typeforce . BufferN ( 34 ) ,
161
+ version : typeforce . maybe ( typeforce . UInt8 ) // todo: recheck
162
+ } )
163
+
164
+ // / todo: revisit
165
+ export const TaprootNode = typeforce . arrayOf ( typeforce . oneOf ( TaprootLeaf , typeforce . arrayOf ( TaprootLeaf ) ) )
166
+
167
+
158
168
export const Buffer256bit = typeforce . BufferN ( 32 ) ;
159
169
export const Hash160bit = typeforce . BufferN ( 20 ) ;
160
170
export const Hash256bit = typeforce . BufferN ( 32 ) ;
You can’t perform that action at this time.
0 commit comments