@provablehq/sdk 0.11.8 → 0.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1630,11 +1630,14 @@ class ApiAuth {
1630
1630
  * both a usable token and the material to mint one.
1631
1631
  */
1632
1632
  async headers() {
1633
- if (this.config.mode === "none")
1634
- return {};
1635
1633
  if (this.config.mode === "api-key") {
1636
1634
  return { [this.config.header ?? DEFAULT_API_KEY_HEADER]: this.config.value };
1637
1635
  }
1636
+ if (this.config.mode === "none") {
1637
+ // A token injected via setJwtData authenticates even without mint
1638
+ // material: an external session owns minting and hands tokens in.
1639
+ return this.jwtData?.jwt ? { Authorization: this.jwtData.jwt } : {};
1640
+ }
1638
1641
  const stale = !this.jwtData || Date.now() >= this.jwtData.expiration - FIVE_MINUTES;
1639
1642
  if (stale) {
1640
1643
  const { apiKey, consumerId } = this.config;
@@ -1750,7 +1753,7 @@ class AleoNetworkClient {
1750
1753
  else {
1751
1754
  this.headers = {
1752
1755
  // This is replaced by the actual version by a Rollup plugin
1753
- "X-Aleo-SDK-Version": "0.11.8",
1756
+ "X-Aleo-SDK-Version": "0.11.9",
1754
1757
  "X-Aleo-environment": environment(),
1755
1758
  };
1756
1759
  }
@@ -1772,7 +1775,7 @@ class AleoNetworkClient {
1772
1775
  else {
1773
1776
  this.headers = {
1774
1777
  // This is replaced by the actual version by a Rollup plugin
1775
- "X-Aleo-SDK-Version": "0.11.8",
1778
+ "X-Aleo-SDK-Version": "0.11.9",
1776
1779
  "X-Aleo-environment": environment(),
1777
1780
  };
1778
1781
  }