Skip to content

Commit 88d2f88

Browse files
committed
added auth header for proving request method
1 parent 853f91b commit 88d2f88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/src/network-client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ class AleoNetworkClient {
16011601
* @param {string} url - (Optional) The url of the proving service.
16021602
* @returns {Promise<ProvingResponse>} The ProvingResponse containing the transaction result and the result of the broadcast if the `broadcast` flag was set to `true`.
16031603
*/
1604-
async submitProvingRequest(provingRequest: ProvingRequest | string, url?: string): Promise<ProvingResponse> {
1604+
async submitProvingRequest(provingRequest: ProvingRequest | string, url?: string, apiKey?: string, delegatedProvingJWT?: string): Promise<ProvingResponse> {
16051605
const prover_uri = url ? url : this.host;
16061606
const provingRequestString =
16071607
provingRequest instanceof ProvingRequest
@@ -1612,6 +1612,9 @@ class AleoNetworkClient {
16121612
post(prover_uri + "/prove", {
16131613
body: provingRequestString,
16141614
headers: Object.assign({}, {...this.headers, "X-ALEO-METHOD": "submitProvingRequest"}, {
1615+
"authorization": "Bearer " + delegatedProvingJWT,
1616+
},
1617+
{
16151618
"Content-Type": "application/json",
16161619
}),
16171620
}),

0 commit comments

Comments
 (0)