@@ -127,6 +127,7 @@ <h4>Transfer</h4>
127
127
</ div >
128
128
129
129
< div class ="logs ">
130
+ < h2 > Connected as < code id ="owner " class ="hex "> requesting owner…</ code > </ h2 >
130
131
< h2 > Chain history for < code id ="chain-id " class ="hex "> requesting a new microchain…</ code > </ h2 >
131
132
< ul id ="logs ">
132
133
< template >
@@ -140,7 +141,9 @@ <h2>Chain history for <code id="chain-id" class="hex">requesting a new microchai
140
141
141
142
< script type ="module ">
142
143
import * as linera from '@linera/client' ;
144
+ import * as signer from '@linera/signer' ;
143
145
146
+ // This needs to point at actual deployed fungible application ID.
144
147
const FUNGIBLE_APP_ID = '465e465b050db5034fd8a51df46b9a7cf02a8a6414cc2b94b102e912208d4a4b' ;
145
148
146
149
const gql = ( query , variables = { } ) => JSON . stringify ( { query, variables } ) ;
@@ -216,11 +219,16 @@ <h2>Chain history for <code id="chain-id" class="hex">requesting a new microchai
216
219
} ) ;
217
220
218
221
await linera . default ( ) ;
219
- const faucet = await new linera . Faucet ( 'https://faucet.testnet-babbage.linera.net' ) ;
222
+ throw new Error ( 'INSERT FAUCET URL HERE' ) ; // Replace with your Linera Faucet URL
223
+ // const faucet = await new linera.Faucet(FAUCET URL HERE);
224
+ throw new Error ( 'INSERT PRIVKEY HERE' ) ; // Replace with your private key
225
+ // const embedded_signer = await new signer.EmbeddedSigner("INSERT PRIVKEY HERE");
220
226
const wallet = await faucet . createWallet ( ) ;
221
- const client = await new linera . Client ( wallet ) ;
222
- const chainId = await faucet . claimChain ( client ) ;
227
+ const owner = await embedded_signer . address ( ) ;
228
+ const chainId = await faucet . claimChain ( wallet , owner ) ;
229
+ const client = await new linera . Client ( wallet , embedded_signer ) ;
223
230
document . querySelector ( '#chain-id' ) . innerText = chainId ;
231
+ document . querySelector ( '#owner' ) . innerText = owner ;
224
232
225
233
const application = await client . frontend ( ) . application ( FUNGIBLE_APP_ID ) ;
226
234
0 commit comments