@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 +5 -4
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -4
- package/package.json +1 -1
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
|
|
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
|
-
*
|
|
6176
|
-
*
|
|
6177
|
-
*
|
|
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
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
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
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
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
|
|
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
|
-
*
|
|
6163
|
-
*
|
|
6164
|
-
*
|
|
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.
|