@@ -202,7 +202,7 @@ __*return*__ | `string` | *The transaction id of the deployed program or a failu
202202// / Import the mainnet version of the sdk.
203203import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
204204
205- // Create a new NetworkClient, KeyProvider, and RecordProvider
205+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
206206const keyProvider = new AleoKeyProvider ();
207207const recordProvider = new NetworkRecordProvider (account, networkClient);
208208keyProvider .useCache = true ;
@@ -243,7 +243,7 @@ __*return*__ | `Promise.<Transaction>` | *- A promise that resolves to the trans
243243// / Import the mainnet version of the sdk.
244244import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
245245
246- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
246+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
247247const keyProvider = new AleoKeyProvider ();
248248const recordProvider = new NetworkRecordProvider (account, networkClient);
249249keyProvider .useCache = true ;
@@ -290,12 +290,12 @@ __*return*__ | `Promise.<ProvingRequest>` | *- A promise that resolves to the tr
290290// / Import the mainnet version of the sdk.
291291import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
292292
293- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
293+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
294294const keyProvider = new AleoKeyProvider ();
295295const recordProvider = new NetworkRecordProvider (account, networkClient);
296296keyProvider .useCache = true ;
297297
298- // Initialize a program manager with the key provider to automatically fetch keys for executions
298+ // Initialize a ProgramManager with the key and record providers.
299299const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
300300
301301// Build the proving request.
@@ -312,10 +312,11 @@ const provingRequest = await programManager.provingRequest({
312312 broadcast: true ,
313313});
314314
315- // Submit the transaction to the network and await the response.
315+ // Submit the ProvingRequest to the network and await the response.
316316const provingResponse = await programManager .networkClient .submitProvingRequest (provingRequest);
317317// Get the transaction from the proving response.
318318const tx = provingResponse .transaction ;
319+ // Check if the proving service has already submitted the transaction.
319320const submitted = provingResponse .broadcast ;
320321
321322// Get the transaction id.
@@ -352,12 +353,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
352353// / Import the mainnet version of the sdk.
353354import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
354355
355- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
356+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
356357const keyProvider = new AleoKeyProvider ();
357358const recordProvider = new NetworkRecordProvider (account, networkClient);
358359keyProvider .useCache = true ;
359360
360- // Initialize a program manager with the key provider to automatically fetch keys for executions
361+ // Initialize a ProgramManager with the key and record providers.
361362const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
362363
363364// Build the `Authorization`.
@@ -390,12 +391,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
390391// / Import the mainnet version of the sdk.
391392import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
392393
393- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
394+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
394395const keyProvider = new AleoKeyProvider ();
395396const recordProvider = new NetworkRecordProvider (account, networkClient);
396397keyProvider .useCache = true ;
397398
398- // Initialize a program manager with the key provider to automatically fetch keys for executions
399+ // Initialize a ProgramManager with the key and record providers.
399400const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
400401
401402// Build a credits.aleo/fee_public `Authorization`.
@@ -1450,7 +1451,7 @@ __*return*__ | `string` | *The transaction id of the deployed program or a failu
14501451// / Import the mainnet version of the sdk.
14511452import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
14521453
1453- // Create a new NetworkClient, KeyProvider, and RecordProvider
1454+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
14541455const keyProvider = new AleoKeyProvider ();
14551456const recordProvider = new NetworkRecordProvider (account, networkClient);
14561457keyProvider .useCache = true ;
@@ -1491,7 +1492,7 @@ __*return*__ | `Promise.<Transaction>` | *- A promise that resolves to the trans
14911492// / Import the mainnet version of the sdk.
14921493import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
14931494
1494- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1495+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
14951496const keyProvider = new AleoKeyProvider ();
14961497const recordProvider = new NetworkRecordProvider (account, networkClient);
14971498keyProvider .useCache = true ;
@@ -1538,12 +1539,12 @@ __*return*__ | `Promise.<ProvingRequest>` | *- A promise that resolves to the tr
15381539// / Import the mainnet version of the sdk.
15391540import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
15401541
1541- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1542+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
15421543const keyProvider = new AleoKeyProvider ();
15431544const recordProvider = new NetworkRecordProvider (account, networkClient);
15441545keyProvider .useCache = true ;
15451546
1546- // Initialize a program manager with the key provider to automatically fetch keys for executions
1547+ // Initialize a ProgramManager with the key and record providers.
15471548const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
15481549
15491550// Build the proving request.
@@ -1560,10 +1561,11 @@ const provingRequest = await programManager.provingRequest({
15601561 broadcast: true ,
15611562});
15621563
1563- // Submit the transaction to the network and await the response.
1564+ // Submit the ProvingRequest to the network and await the response.
15641565const provingResponse = await programManager .networkClient .submitProvingRequest (provingRequest);
15651566// Get the transaction from the proving response.
15661567const tx = provingResponse .transaction ;
1568+ // Check if the proving service has already submitted the transaction.
15671569const submitted = provingResponse .broadcast ;
15681570
15691571// Get the transaction id.
@@ -1600,12 +1602,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
16001602// / Import the mainnet version of the sdk.
16011603import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
16021604
1603- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1605+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
16041606const keyProvider = new AleoKeyProvider ();
16051607const recordProvider = new NetworkRecordProvider (account, networkClient);
16061608keyProvider .useCache = true ;
16071609
1608- // Initialize a program manager with the key provider to automatically fetch keys for executions
1610+ // Initialize a ProgramManager with the key and record providers.
16091611const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
16101612
16111613// Build the `Authorization`.
@@ -1638,12 +1640,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
16381640// / Import the mainnet version of the sdk.
16391641import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
16401642
1641- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1643+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
16421644const keyProvider = new AleoKeyProvider ();
16431645const recordProvider = new NetworkRecordProvider (account, networkClient);
16441646keyProvider .useCache = true ;
16451647
1646- // Initialize a program manager with the key provider to automatically fetch keys for executions
1648+ // Initialize a ProgramManager with the key and record providers.
16471649const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
16481650
16491651// Build a credits.aleo/fee_public `Authorization`.
0 commit comments