Skip to content

Commit c225895

Browse files
authored
Merge pull request #1083 from ProvableHQ/rr-patch-delegating-proving-auth
2 parents 046c371 + f8698ba commit c225895

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

sdk/src/network-client.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ interface AleoNetworkClientOptions {
2626
*
2727
* @property provingRequest {ProvingRequest | string} The proving request being submitted to the network.
2828
* @property url {string} The URL of the delegated proving service.
29-
* @property apiKey {string} The API key to use for authentication. NOTE: This is not currently used but will be in a future release.
30-
* @property delegatedProvingJWT {string} JWT token for authentication. NOTE: This will be deprecated in favor of apiKey in a future release.
29+
* @property apiKey {string} The API key to use for authentication.
3130
*/
3231
interface DelegatedProvingParams {
3332
provingRequest: ProvingRequest | string;
3433
url?: string;
3534
apiKey?: string;
36-
delegatedProvingJWT?: string;
3735
}
3836

3937
/**
@@ -1629,10 +1627,8 @@ class AleoNetworkClient {
16291627
};
16301628

16311629
// Add auth header based on what's available
1632-
if (options.delegatedProvingJWT) {
1633-
headers["Authorization"] = `Bearer ${options.delegatedProvingJWT}`;
1634-
} else if (options.apiKey) {
1635-
headers["X-API-Key"] = options.apiKey;
1630+
if (options.apiKey) {
1631+
headers["X-Provable-API-Key"] = options.apiKey;
16361632
}
16371633

16381634
try {
@@ -1642,7 +1638,6 @@ class AleoNetworkClient {
16421638
headers
16431639
})
16441640
);
1645-
16461641
const responseText = await response.text();
16471642
return parseJSON(responseText);
16481643
} catch (error) {

0 commit comments

Comments
 (0)