@@ -7,13 +7,11 @@ import {
7
7
Plaintext ,
8
8
RecordCiphertext ,
9
9
Program ,
10
- ProvingRequest ,
11
10
RecordPlaintext ,
12
11
PrivateKey ,
13
12
Transaction ,
14
13
} from "./wasm" ;
15
14
import { ConfirmedTransactionJSON } from "./models/confirmed_transaction" ;
16
- import { ProvingResponse } from "./models/provingResponse" ;
17
15
18
16
type ProgramImports = { [ key : string ] : string | Program } ;
19
17
@@ -1502,7 +1500,7 @@ class AleoNetworkClient {
1502
1500
try {
1503
1501
const response = await retryWithBackoff ( ( ) =>
1504
1502
this . _sendPost ( this . host + "/transaction/broadcast" , {
1505
- body : transaction_string ,
1503
+ body : transactionString ,
1506
1504
headers : Object . assign ( { } , { ...this . headers , "X-ALEO-METHOD" : "submitTransaction" } , {
1507
1505
"Content-Type" : "application/json" ,
1508
1506
} ) ,
@@ -1556,44 +1554,6 @@ class AleoNetworkClient {
1556
1554
}
1557
1555
}
1558
1556
1559
- /**
1560
- * Submit a `ProvingRequest` to the Aleo network.
1561
- *
1562
- * @param {ProvingRequest | string } provingRequest - The `ProvingRequest` to submit
1563
- * @param {string } url - (Optional) The url of the proving service.
1564
- * @returns {Promise<ProvingResponse> } The solution id of the submitted solution or the resulting error.
1565
- */
1566
- async submitProvingRequest ( provingRequest : ProvingRequest | string , url ?: string ) : Promise < ProvingResponse > {
1567
- const prover_uri = url ? url : this . host ;
1568
- const provingRequestString =
1569
- provingRequest instanceof ProvingRequest
1570
- ? provingRequest . toString ( )
1571
- : provingRequest ;
1572
- try {
1573
- const response = await retryWithBackoff ( ( ) =>
1574
- post ( prover_uri + "/prove" , {
1575
- body : provingRequestString ,
1576
- headers : Object . assign ( { } , this . headers , {
1577
- "Content-Type" : "application/json" ,
1578
- } ) ,
1579
- } ) ,
1580
- ) ;
1581
-
1582
- try {
1583
- const text = await response . text ( ) ;
1584
- return parseJSON ( text ) ;
1585
- } catch ( error : any ) {
1586
- throw new Error (
1587
- `Error posting proving request. Aleo network response: ${ error . message } ` ,
1588
- ) ;
1589
- }
1590
- } catch ( error : any ) {
1591
- throw new Error (
1592
- `Error posting solution: No response received: ${ error . message } ` ,
1593
- ) ;
1594
- }
1595
- }
1596
-
1597
1557
/**
1598
1558
* Await a submitted transaction to be confirmed or rejected on the Aleo network.
1599
1559
*
0 commit comments