Skip to content

Commit f07ec2b

Browse files
Update headers
1 parent 8a36e38 commit f07ec2b

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

sdk/src/network-client.ts

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import {
77
Plaintext,
88
RecordCiphertext,
99
Program,
10-
ProvingRequest,
1110
RecordPlaintext,
1211
PrivateKey,
1312
Transaction,
1413
} from "./wasm";
1514
import { ConfirmedTransactionJSON } from "./models/confirmed_transaction";
16-
import { ProvingResponse } from "./models/provingResponse";
1715

1816
type ProgramImports = { [key: string]: string | Program };
1917

@@ -1502,7 +1500,7 @@ class AleoNetworkClient {
15021500
try {
15031501
const response = await retryWithBackoff(() =>
15041502
this._sendPost(this.host + "/transaction/broadcast", {
1505-
body: transaction_string,
1503+
body: transactionString,
15061504
headers: Object.assign({}, {...this.headers, "X-ALEO-METHOD" : "submitTransaction"}, {
15071505
"Content-Type": "application/json",
15081506
}),
@@ -1556,44 +1554,6 @@ class AleoNetworkClient {
15561554
}
15571555
}
15581556

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-
15971557
/**
15981558
* Await a submitted transaction to be confirmed or rejected on the Aleo network.
15991559
*

0 commit comments

Comments
 (0)