File tree Expand file tree Collapse file tree 7 files changed +47
-0
lines changed
Expand file tree Collapse file tree 7 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 2525 },
2626 "dependencies" : {
2727 "@bitgo/key-card" : " ^0.23.43" ,
28+ "@bitgo/abstract-utxo" : " ^9.10.0" ,
2829 "@bitgo/sdk-api" : " ^1.57.6" ,
2930 "@bitgo/sdk-coin-ada" : " ^4.5.3" ,
3031 "@bitgo/sdk-coin-algo" : " ^2.1.55" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ const BGComponent = lazy(() => import('@components/BitGoJS'));
77const BGApiComponent = lazy ( ( ) => import ( '@components/BitGoAPI' ) ) ;
88const CoinsComponent = lazy ( ( ) => import ( '@components/Coins' ) ) ;
99const KeyCardComponent = lazy ( ( ) => import ( '@components/KeyCard' ) ) ;
10+ const WasmMiniscriptComponent = lazy (
11+ ( ) => import ( '@components/WasmMiniscript' ) ,
12+ ) ;
1013const EcdsaChallengeComponent = lazy (
1114 ( ) => import ( '@components/EcdsaChallenge' ) ,
1215) ;
@@ -24,6 +27,10 @@ const App = () => {
2427 < Route path = "/bitgo-api" element = { < BGApiComponent /> } />
2528 < Route path = "/coins" element = { < CoinsComponent /> } />
2629 < Route path = "/keycard" element = { < KeyCardComponent /> } />
30+ < Route
31+ path = "/wasm-miniscript"
32+ element = { < WasmMiniscriptComponent /> }
33+ />
2734 < Route
2835 path = "/ecdsachallenge"
2936 element = { < EcdsaChallengeComponent /> }
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ const Navbar = () => {
3838 >
3939 Key Card
4040 </ NavItem >
41+ < NavItem
42+ activeRoute = { pathname === '/wasm-miniscript' }
43+ onClick = { ( ) => navigate ( '/wasm-miniscript' ) }
44+ >
45+ Wasm Miniscript
46+ </ NavItem >
4147 < NavItem
4248 activeRoute = { pathname === '/ecdsachallenge' }
4349 onClick = { ( ) => navigate ( '/ecdsachallenge' ) }
Original file line number Diff line number Diff line change 1+ import React , { useState } from 'react' ;
2+
3+ import * as AbstractUtxo from '@bitgo/abstract-utxo' ;
4+
5+ const defaultDescriptor =
6+ 'wpkh(xpub661MyMwAqRbcFQpwd6c6aaioiXWuygdeknqE8v6PSNusNjwZypj1uXTVNysfsFPEDL6X3yS1kL6JeWyy9bAiR97Gz8KD9Z1W54uBw9U9j2t/*)' ;
7+
8+ export default function ( ) {
9+ const [ descriptorString ] = useState ( defaultDescriptor ) ;
10+
11+ const descriptor = AbstractUtxo . descriptor . Descriptor . fromString (
12+ descriptorString ,
13+ 'derivable' ,
14+ ) ;
15+ return (
16+ < div >
17+ < pre > { descriptor . toString ( ) } </ pre >
18+ < pre >
19+ { Buffer . from ( descriptor . atDerivationIndex ( 0 ) . scriptPubkey ( ) ) . toString (
20+ 'hex' ,
21+ ) }
22+ </ pre >
23+ </ div >
24+ ) ;
25+ }
Original file line number Diff line number Diff line change 3636 {
3737 "path" : " ../bitgo"
3838 },
39+ {
40+ "path" : " ../abstract-utxo"
41+ },
3942 {
4043 "path" : " ../key-card"
4144 },
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ const rules = [
8888 emitFile : false ,
8989 } ,
9090 } ,
91+ {
92+ test : / m i n i s c r i p t .* \. w a s m $ / ,
93+ type : 'webassembly/sync' ,
94+ } ,
9195] ;
9296
9397const devRules = [
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ module.exports = {
5959 experiments : {
6060 backCompat : false ,
6161 asyncWebAssembly : true ,
62+ syncWebAssembly : true ,
6263 } ,
6364 optimization : {
6465 minimizer : [
You can’t perform that action at this time.
0 commit comments