@agether/sdk 2.6.0 → 2.6.1

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/cli.js CHANGED
@@ -2102,9 +2102,7 @@ var init_X402Client = __esm({
2102
2102
  const paymentAmount = await this._probePaymentAmount(url, fetchOpts);
2103
2103
  if (paymentAmount !== null) {
2104
2104
  console.log(` [auto-fund] Payment required: ${(Number(paymentAmount) / 1e6).toFixed(6)} USDC`);
2105
- const bufferStr = this.config.autoDrawBuffer || "0.5";
2106
- const buffer = BigInt(Math.round(parseFloat(bufferStr) * 1e6));
2107
- const needed = paymentAmount + buffer;
2105
+ const needed = paymentAmount;
2108
2106
  if (usdcBalance < needed) {
2109
2107
  const totalDeficit = needed - usdcBalance;
2110
2108
  console.log(` [auto-fund] Insufficient balance. Deficit: ${(Number(totalDeficit) / 1e6).toFixed(2)} USDC`);
package/dist/index.d.mts CHANGED
@@ -773,11 +773,6 @@ interface X402BaseConfig {
773
773
  * Tracks cumulative daily borrows and rejects auto-draw if exceeded.
774
774
  */
775
775
  dailySpendLimitUsdc?: string;
776
- /**
777
- * Safety margin: borrow this much extra beyond what's needed (in USDC, e.g. '1').
778
- * Helps avoid rounding issues. Default: '0.5'
779
- */
780
- autoDrawBuffer?: string;
781
776
  /**
782
777
  * Pre-loaded spending state from a previous session.
783
778
  * Pass this to resume the daily spending tracker after a restart.
package/dist/index.d.ts CHANGED
@@ -773,11 +773,6 @@ interface X402BaseConfig {
773
773
  * Tracks cumulative daily borrows and rejects auto-draw if exceeded.
774
774
  */
775
775
  dailySpendLimitUsdc?: string;
776
- /**
777
- * Safety margin: borrow this much extra beyond what's needed (in USDC, e.g. '1').
778
- * Helps avoid rounding issues. Default: '0.5'
779
- */
780
- autoDrawBuffer?: string;
781
776
  /**
782
777
  * Pre-loaded spending state from a previous session.
783
778
  * Pass this to resume the daily spending tracker after a restart.
package/dist/index.js CHANGED
@@ -2344,9 +2344,7 @@ var X402Client = class {
2344
2344
  const paymentAmount = await this._probePaymentAmount(url, fetchOpts);
2345
2345
  if (paymentAmount !== null) {
2346
2346
  console.log(` [auto-fund] Payment required: ${(Number(paymentAmount) / 1e6).toFixed(6)} USDC`);
2347
- const bufferStr = this.config.autoDrawBuffer || "0.5";
2348
- const buffer = BigInt(Math.round(parseFloat(bufferStr) * 1e6));
2349
- const needed = paymentAmount + buffer;
2347
+ const needed = paymentAmount;
2350
2348
  if (usdcBalance < needed) {
2351
2349
  const totalDeficit = needed - usdcBalance;
2352
2350
  console.log(` [auto-fund] Insufficient balance. Deficit: ${(Number(totalDeficit) / 1e6).toFixed(2)} USDC`);
package/dist/index.mjs CHANGED
@@ -2272,9 +2272,7 @@ var X402Client = class {
2272
2272
  const paymentAmount = await this._probePaymentAmount(url, fetchOpts);
2273
2273
  if (paymentAmount !== null) {
2274
2274
  console.log(` [auto-fund] Payment required: ${(Number(paymentAmount) / 1e6).toFixed(6)} USDC`);
2275
- const bufferStr = this.config.autoDrawBuffer || "0.5";
2276
- const buffer = BigInt(Math.round(parseFloat(bufferStr) * 1e6));
2277
- const needed = paymentAmount + buffer;
2275
+ const needed = paymentAmount;
2278
2276
  if (usdcBalance < needed) {
2279
2277
  const totalDeficit = needed - usdcBalance;
2280
2278
  console.log(` [auto-fund] Insufficient balance. Deficit: ${(Number(totalDeficit) / 1e6).toFixed(2)} USDC`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agether/sdk",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "TypeScript SDK for Agether - autonomous credit for AI agents on Base",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",