@owney/sdk 0.7.25-beta.1 → 0.7.25-beta.3

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.
package/dist/index.cjs CHANGED
@@ -2313,11 +2313,12 @@ async function postSponsorBatchTransfer(input) {
2313
2313
  // src/lib/permit2.ts
2314
2314
  var import_viem3 = require("viem");
2315
2315
  var PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
2316
+ var MAX_UINT256 = 2n ** 256n - 1n;
2316
2317
  function permit2ApprovalAmount(requiredAmount) {
2317
2318
  if (requiredAmount <= 0n) {
2318
2319
  throw new Error("Permit2 approval requires a positive deposit amount");
2319
2320
  }
2320
- return requiredAmount;
2321
+ return MAX_UINT256;
2321
2322
  }
2322
2323
  var ERC20_ALLOWANCE_ABI = [
2323
2324
  {
@@ -6172,9 +6173,9 @@ var OwneySDK = class {
6172
6173
  }
6173
6174
  /**
6174
6175
  * User-paid approval of Permit2 on the selected token for the active chain.
6175
- * Approves exactly the pending deposit amount. Another approval is required
6176
- * for a later deposit once this allowance has been consumed. Resolves after
6177
- * one confirmation so the subsequent deposit attempt sees the new allowance.
6176
+ * Grants the maximum ERC20 allowance so later deposits do not require another
6177
+ * approval. Resolves after one confirmation so the subsequent deposit attempt
6178
+ * sees the new allowance.
6178
6179
  *
6179
6180
  * @param requiredAmount Raw base-unit amount the pending deposit must cover.
6180
6181
  * @returns the approval transaction hash.
package/dist/index.d.cts CHANGED
@@ -793,9 +793,9 @@ declare class OwneySDK {
793
793
  ensureAutoSelectProtocols(asset: "USDC" | "WETH", agentId?: AgentId): Promise<boolean>;
794
794
  /**
795
795
  * User-paid approval of Permit2 on the selected token for the active chain.
796
- * Approves exactly the pending deposit amount. Another approval is required
797
- * for a later deposit once this allowance has been consumed. Resolves after
798
- * one confirmation so the subsequent deposit attempt sees the new allowance.
796
+ * Grants the maximum ERC20 allowance so later deposits do not require another
797
+ * approval. Resolves after one confirmation so the subsequent deposit attempt
798
+ * sees the new allowance.
799
799
  *
800
800
  * @param requiredAmount Raw base-unit amount the pending deposit must cover.
801
801
  * @returns the approval transaction hash.
package/dist/index.d.ts CHANGED
@@ -793,9 +793,9 @@ declare class OwneySDK {
793
793
  ensureAutoSelectProtocols(asset: "USDC" | "WETH", agentId?: AgentId): Promise<boolean>;
794
794
  /**
795
795
  * User-paid approval of Permit2 on the selected token for the active chain.
796
- * Approves exactly the pending deposit amount. Another approval is required
797
- * for a later deposit once this allowance has been consumed. Resolves after
798
- * one confirmation so the subsequent deposit attempt sees the new allowance.
796
+ * Grants the maximum ERC20 allowance so later deposits do not require another
797
+ * approval. Resolves after one confirmation so the subsequent deposit attempt
798
+ * sees the new allowance.
799
799
  *
800
800
  * @param requiredAmount Raw base-unit amount the pending deposit must cover.
801
801
  * @returns the approval transaction hash.
package/dist/index.js CHANGED
@@ -2287,11 +2287,12 @@ async function postSponsorBatchTransfer(input) {
2287
2287
  // src/lib/permit2.ts
2288
2288
  import { bytesToHex as bytesToHex2 } from "viem";
2289
2289
  var PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
2290
+ var MAX_UINT256 = 2n ** 256n - 1n;
2290
2291
  function permit2ApprovalAmount(requiredAmount) {
2291
2292
  if (requiredAmount <= 0n) {
2292
2293
  throw new Error("Permit2 approval requires a positive deposit amount");
2293
2294
  }
2294
- return requiredAmount;
2295
+ return MAX_UINT256;
2295
2296
  }
2296
2297
  var ERC20_ALLOWANCE_ABI = [
2297
2298
  {
@@ -6159,9 +6160,9 @@ var OwneySDK = class {
6159
6160
  }
6160
6161
  /**
6161
6162
  * User-paid approval of Permit2 on the selected token for the active chain.
6162
- * Approves exactly the pending deposit amount. Another approval is required
6163
- * for a later deposit once this allowance has been consumed. Resolves after
6164
- * one confirmation so the subsequent deposit attempt sees the new allowance.
6163
+ * Grants the maximum ERC20 allowance so later deposits do not require another
6164
+ * approval. Resolves after one confirmation so the subsequent deposit attempt
6165
+ * sees the new allowance.
6165
6166
  *
6166
6167
  * @param requiredAmount Raw base-unit amount the pending deposit must cover.
6167
6168
  * @returns the approval transaction hash.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owney/sdk",
3
- "version": "0.7.25-beta.1",
3
+ "version": "0.7.25-beta.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",