File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
packages/cashscript/src/types Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 11import type SignatureTemplate from '../SignatureTemplate.js' ;
22
3+ type BytesType = Uint8Array | string ;
4+ type SignatureType = SignatureTemplate | BytesType ;
5+
36type TypeMap = {
4- [ k : `bytes${number } `] : Uint8Array | string ; // Matches any "bytes<number>" pattern
7+ [ k : `bytes${number } `] : BytesType ; // Matches any "bytes<number>" pattern
58} & {
6- byte : Uint8Array | string ;
7- bytes : Uint8Array | string ;
9+ byte : BytesType ;
10+ bytes : BytesType ;
811 bool : boolean ;
912 int : bigint ;
1013 string : string ;
11- pubkey : Uint8Array | string ;
12- sig : SignatureTemplate | Uint8Array | string ;
13- datasig : Uint8Array | string ;
14+ pubkey : BytesType ;
15+ sig : SignatureType ;
16+ datasig : BytesType ;
1417} ;
1518
1619// Helper type to process a single parameter by mapping its `type` to a value in `TypeMap`.
You can’t perform that action at this time.
0 commit comments