@pafi-dev/issuer 0.10.0 → 0.10.2

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.d.cts CHANGED
@@ -2237,6 +2237,23 @@ interface PTClaimHandlerConfig {
2237
2237
  /** How far ahead of `now` to set the MintRequest deadline. Default 15 min. */
2238
2238
  signatureDeadlineSeconds?: number;
2239
2239
  now?: () => number;
2240
+ /**
2241
+ * Optional override for the v1.6+ MintFeeWrapper address. By default the
2242
+ * handler auto-resolves the wrapper from the request's `chainId` via
2243
+ * `getContractAddresses(chainId).mintFeeWrapper`. Set this only when:
2244
+ * - testing against a non-canonical wrapper deploy, or
2245
+ * - the SDK's hardcoded address is stale and you can't bump the SDK yet
2246
+ *
2247
+ * Pass the dead-zero address to opt OUT of the wrapper path (force direct
2248
+ * mint with no fee). Pass `undefined` (default) to use SDK's lookup.
2249
+ *
2250
+ * Caller responsibility either way:
2251
+ * - DAO must have called `IssuerRegistry.setMintFeeWrapper(...)` so
2252
+ * `addIssuer` cascades the recipient list.
2253
+ * - The PointToken must have been registered with the wrapper (via
2254
+ * `addIssuer` cascade or owner-only `wrapper.registerToken`).
2255
+ */
2256
+ mintFeeWrapperAddress?: Address;
2240
2257
  }
2241
2258
  interface PTClaimRequest {
2242
2259
  authenticatedAddress: Address;
package/dist/index.d.ts CHANGED
@@ -2237,6 +2237,23 @@ interface PTClaimHandlerConfig {
2237
2237
  /** How far ahead of `now` to set the MintRequest deadline. Default 15 min. */
2238
2238
  signatureDeadlineSeconds?: number;
2239
2239
  now?: () => number;
2240
+ /**
2241
+ * Optional override for the v1.6+ MintFeeWrapper address. By default the
2242
+ * handler auto-resolves the wrapper from the request's `chainId` via
2243
+ * `getContractAddresses(chainId).mintFeeWrapper`. Set this only when:
2244
+ * - testing against a non-canonical wrapper deploy, or
2245
+ * - the SDK's hardcoded address is stale and you can't bump the SDK yet
2246
+ *
2247
+ * Pass the dead-zero address to opt OUT of the wrapper path (force direct
2248
+ * mint with no fee). Pass `undefined` (default) to use SDK's lookup.
2249
+ *
2250
+ * Caller responsibility either way:
2251
+ * - DAO must have called `IssuerRegistry.setMintFeeWrapper(...)` so
2252
+ * `addIssuer` cascades the recipient list.
2253
+ * - The PointToken must have been registered with the wrapper (via
2254
+ * `addIssuer` cascade or owner-only `wrapper.registerToken`).
2255
+ */
2256
+ mintFeeWrapperAddress?: Address;
2240
2257
  }
2241
2258
  interface PTClaimRequest {
2242
2259
  authenticatedAddress: Address;
package/dist/index.js CHANGED
@@ -2380,6 +2380,11 @@ var PTClaimError = class extends PafiSdkError {
2380
2380
  this.details = details;
2381
2381
  }
2382
2382
  };
2383
+ function isNoWrapper(address) {
2384
+ if (!address) return true;
2385
+ const lower = address.toLowerCase();
2386
+ return lower === "0x0000000000000000000000000000000000000000" || lower === "0x000000000000000000000000000000000000dead";
2387
+ }
2383
2388
  var DEFAULT_LOCK_MS = 15 * 60 * 1e3;
2384
2389
  var DEFAULT_SIG_DEADLINE_SEC2 = 15 * 60;
2385
2390
  var PTClaimHandler = class {
@@ -2416,9 +2421,11 @@ var PTClaimHandler = class {
2416
2421
  );
2417
2422
  }
2418
2423
  }
2419
- const { batchExecutor: batchExecutorAddress } = getContractAddresses3(
2420
- request.chainId
2421
- );
2424
+ const chainAddresses = getContractAddresses3(request.chainId);
2425
+ const { batchExecutor: batchExecutorAddress } = chainAddresses;
2426
+ const wrapperOverride = this.cfg.mintFeeWrapperAddress;
2427
+ const wrapperFromSdk = chainAddresses.mintFeeWrapper;
2428
+ const resolvedWrapper = wrapperOverride !== void 0 ? isNoWrapper(wrapperOverride) ? void 0 : wrapperOverride : isNoWrapper(wrapperFromSdk) ? void 0 : wrapperFromSdk;
2422
2429
  const lockId = await this.cfg.ledger.lockForMinting(
2423
2430
  request.userAddress,
2424
2431
  request.amount,
@@ -2446,7 +2453,8 @@ var PTClaimHandler = class {
2446
2453
  issuerSignerWallet: this.cfg.issuerSignerWallet,
2447
2454
  domain,
2448
2455
  mintRequestNonce: request.mintRequestNonce,
2449
- deadline: signatureDeadline
2456
+ deadline: signatureDeadline,
2457
+ mintFeeWrapperAddress: resolvedWrapper
2450
2458
  // No feeAmount/feeRecipient — RelayService auto-resolves.
2451
2459
  });
2452
2460
  } catch (err) {
@@ -2468,7 +2476,8 @@ var PTClaimHandler = class {
2468
2476
  domain,
2469
2477
  mintRequestNonce: request.mintRequestNonce,
2470
2478
  deadline: signatureDeadline,
2471
- feeAmount: 0n
2479
+ feeAmount: 0n,
2480
+ mintFeeWrapperAddress: resolvedWrapper
2472
2481
  });
2473
2482
  } catch (err) {
2474
2483
  throw new PTClaimError(
@@ -4412,7 +4421,7 @@ var MemoryRedemptionHistoryStore = class {
4412
4421
  };
4413
4422
 
4414
4423
  // src/index.ts
4415
- var PAFI_ISSUER_SDK_VERSION = true ? "0.10.0" : "dev";
4424
+ var PAFI_ISSUER_SDK_VERSION = true ? "0.10.2" : "dev";
4416
4425
  export {
4417
4426
  AdapterMisconfiguredError,
4418
4427
  AuthError,