Skip to content

Commit 7ac9826

Browse files
committed
removed JWT requirement
1 parent 3aa109b commit 7ac9826

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

sdk/src/network-client.ts

Lines changed: 4 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,12 +1627,10 @@ 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
}
1637-
1633+
console.log("Using headers:", headers);
16381634
try {
16391635
const response = await retryWithBackoff(() =>
16401636
post(`${proverUri}/prove`, {

0 commit comments

Comments
 (0)