@@ -202,7 +202,7 @@ __*return*__ | `string` | *The transaction id of the deployed program or a failu
202
202
// / Import the mainnet version of the sdk.
203
203
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
204
204
205
- // Create a new NetworkClient, KeyProvider, and RecordProvider
205
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
206
206
const keyProvider = new AleoKeyProvider ();
207
207
const recordProvider = new NetworkRecordProvider (account, networkClient);
208
208
keyProvider .useCache = true ;
@@ -243,7 +243,7 @@ __*return*__ | `Promise.<Transaction>` | *- A promise that resolves to the trans
243
243
// / Import the mainnet version of the sdk.
244
244
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
245
245
246
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
246
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
247
247
const keyProvider = new AleoKeyProvider ();
248
248
const recordProvider = new NetworkRecordProvider (account, networkClient);
249
249
keyProvider .useCache = true ;
@@ -290,12 +290,12 @@ __*return*__ | `Promise.<ProvingRequest>` | *- A promise that resolves to the tr
290
290
// / Import the mainnet version of the sdk.
291
291
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
292
292
293
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
293
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
294
294
const keyProvider = new AleoKeyProvider ();
295
295
const recordProvider = new NetworkRecordProvider (account, networkClient);
296
296
keyProvider .useCache = true ;
297
297
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.
299
299
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
300
300
301
301
// Build the proving request.
@@ -312,10 +312,11 @@ const provingRequest = await programManager.provingRequest({
312
312
broadcast: true ,
313
313
});
314
314
315
- // Submit the transaction to the network and await the response.
315
+ // Submit the ProvingRequest to the network and await the response.
316
316
const provingResponse = await programManager .networkClient .submitProvingRequest (provingRequest);
317
317
// Get the transaction from the proving response.
318
318
const tx = provingResponse .transaction ;
319
+ // Check if the proving service has already submitted the transaction.
319
320
const submitted = provingResponse .broadcast ;
320
321
321
322
// Get the transaction id.
@@ -352,12 +353,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
352
353
// / Import the mainnet version of the sdk.
353
354
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
354
355
355
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
356
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
356
357
const keyProvider = new AleoKeyProvider ();
357
358
const recordProvider = new NetworkRecordProvider (account, networkClient);
358
359
keyProvider .useCache = true ;
359
360
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.
361
362
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
362
363
363
364
// Build the `Authorization`.
@@ -390,12 +391,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
390
391
// / Import the mainnet version of the sdk.
391
392
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
392
393
393
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
394
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
394
395
const keyProvider = new AleoKeyProvider ();
395
396
const recordProvider = new NetworkRecordProvider (account, networkClient);
396
397
keyProvider .useCache = true ;
397
398
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.
399
400
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
400
401
401
402
// Build a credits.aleo/fee_public `Authorization`.
@@ -1450,7 +1451,7 @@ __*return*__ | `string` | *The transaction id of the deployed program or a failu
1450
1451
// / Import the mainnet version of the sdk.
1451
1452
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
1452
1453
1453
- // Create a new NetworkClient, KeyProvider, and RecordProvider
1454
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
1454
1455
const keyProvider = new AleoKeyProvider ();
1455
1456
const recordProvider = new NetworkRecordProvider (account, networkClient);
1456
1457
keyProvider .useCache = true ;
@@ -1491,7 +1492,7 @@ __*return*__ | `Promise.<Transaction>` | *- A promise that resolves to the trans
1491
1492
// / Import the mainnet version of the sdk.
1492
1493
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
1493
1494
1494
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1495
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
1495
1496
const keyProvider = new AleoKeyProvider ();
1496
1497
const recordProvider = new NetworkRecordProvider (account, networkClient);
1497
1498
keyProvider .useCache = true ;
@@ -1538,12 +1539,12 @@ __*return*__ | `Promise.<ProvingRequest>` | *- A promise that resolves to the tr
1538
1539
// / Import the mainnet version of the sdk.
1539
1540
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
1540
1541
1541
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1542
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
1542
1543
const keyProvider = new AleoKeyProvider ();
1543
1544
const recordProvider = new NetworkRecordProvider (account, networkClient);
1544
1545
keyProvider .useCache = true ;
1545
1546
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.
1547
1548
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
1548
1549
1549
1550
// Build the proving request.
@@ -1560,10 +1561,11 @@ const provingRequest = await programManager.provingRequest({
1560
1561
broadcast: true ,
1561
1562
});
1562
1563
1563
- // Submit the transaction to the network and await the response.
1564
+ // Submit the ProvingRequest to the network and await the response.
1564
1565
const provingResponse = await programManager .networkClient .submitProvingRequest (provingRequest);
1565
1566
// Get the transaction from the proving response.
1566
1567
const tx = provingResponse .transaction ;
1568
+ // Check if the proving service has already submitted the transaction.
1567
1569
const submitted = provingResponse .broadcast ;
1568
1570
1569
1571
// Get the transaction id.
@@ -1600,12 +1602,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
1600
1602
// / Import the mainnet version of the sdk.
1601
1603
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
1602
1604
1603
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1605
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
1604
1606
const keyProvider = new AleoKeyProvider ();
1605
1607
const recordProvider = new NetworkRecordProvider (account, networkClient);
1606
1608
keyProvider .useCache = true ;
1607
1609
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.
1609
1611
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
1610
1612
1611
1613
// Build the `Authorization`.
@@ -1638,12 +1640,12 @@ __*return*__ | `Promise.<Authorization>` | *- A promise that resolves to an 
1638
1640
// / Import the mainnet version of the sdk.
1639
1641
import { AleoKeyProvider , ProgramManager , NetworkRecordProvider } from " @provablehq/sdk/mainnet.js" ;
1640
1642
1641
- // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
1643
+ // Create a new NetworkClient, KeyProvider, and RecordProvider.
1642
1644
const keyProvider = new AleoKeyProvider ();
1643
1645
const recordProvider = new NetworkRecordProvider (account, networkClient);
1644
1646
keyProvider .useCache = true ;
1645
1647
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.
1647
1649
const programManager = new ProgramManager (" https://api.explorer.provable.com/v1" , keyProvider, recordProvider);
1648
1650
1649
1651
// Build a credits.aleo/fee_public `Authorization`.
0 commit comments