@pafi-dev/core 0.3.0-beta.3 → 0.3.0-beta.4

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.
Files changed (42) hide show
  1. package/dist/{chunk-R4L66ZR5.js → chunk-73CQTNLB.js} +10 -1
  2. package/dist/chunk-73CQTNLB.js.map +1 -0
  3. package/dist/{chunk-CWP4PFOP.cjs → chunk-DMW67WBU.cjs} +11 -2
  4. package/dist/chunk-DMW67WBU.cjs.map +1 -0
  5. package/dist/{chunk-C4ZDYG4D.js → chunk-DUY7Z2AI.js} +48 -6
  6. package/dist/chunk-DUY7Z2AI.js.map +1 -0
  7. package/dist/{chunk-FIKTQR7H.js → chunk-I2P3TIP7.js} +2 -2
  8. package/dist/{chunk-BNTVOKYT.cjs → chunk-KJKDLD7N.cjs} +51 -9
  9. package/dist/chunk-KJKDLD7N.cjs.map +1 -0
  10. package/dist/{chunk-CAE2BVKI.cjs → chunk-Z2V525IS.cjs} +6 -6
  11. package/dist/{chunk-CAE2BVKI.cjs.map → chunk-Z2V525IS.cjs.map} +1 -1
  12. package/dist/contract/index.d.cts +1 -1
  13. package/dist/contract/index.d.ts +1 -1
  14. package/dist/eip712/index.cjs +9 -3
  15. package/dist/eip712/index.cjs.map +1 -1
  16. package/dist/eip712/index.d.cts +44 -2
  17. package/dist/eip712/index.d.ts +44 -2
  18. package/dist/eip712/index.js +8 -2
  19. package/dist/{index-BpUYHGu3.d.cts → index-B5OJ9Kcx.d.cts} +1 -1
  20. package/dist/{index-CNALKsH1.d.ts → index-BYL8Nn-n.d.ts} +1 -1
  21. package/dist/index.cjs +78 -86
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +347 -184
  24. package/dist/index.d.ts +347 -184
  25. package/dist/index.js +74 -82
  26. package/dist/index.js.map +1 -1
  27. package/dist/quoting/index.cjs +3 -3
  28. package/dist/quoting/index.d.cts +1 -1
  29. package/dist/quoting/index.d.ts +1 -1
  30. package/dist/quoting/index.js +2 -2
  31. package/dist/relay/index.d.cts +1 -1
  32. package/dist/relay/index.d.ts +1 -1
  33. package/dist/swap/index.d.cts +2 -2
  34. package/dist/swap/index.d.ts +2 -2
  35. package/dist/{types-BDOnH5Le.d.cts → types-DGDlKiDe.d.cts} +8 -1
  36. package/dist/{types-BDOnH5Le.d.ts → types-DGDlKiDe.d.ts} +8 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-BNTVOKYT.cjs.map +0 -1
  39. package/dist/chunk-C4ZDYG4D.js.map +0 -1
  40. package/dist/chunk-CWP4PFOP.cjs.map +0 -1
  41. package/dist/chunk-R4L66ZR5.js.map +0 -1
  42. /package/dist/{chunk-FIKTQR7H.js.map → chunk-I2P3TIP7.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { Address, Hex, PublicClient, WalletClient } from 'viem';
2
- import { P as PoolKey, C as ChainConfig, a as PointTokenDomainConfig, E as EIP712Signature, S as SignatureVerification, b as PafiSDKConfig, M as MintRequest, R as ReceiverConsent, c as MintParams, d as SwapParams, B as BestQuote, Q as QuoteResult, e as PathKey } from './types-BDOnH5Le.js';
3
- export { I as Issuer } from './types-BDOnH5Le.js';
2
+ import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, R as ReceiverConsent, E as EIP712Signature, S as SignatureVerification, c as MintParams, d as SwapParams, B as BestQuote, Q as QuoteResult, e as PathKey } from './types-DGDlKiDe.js';
3
+ export { f as BurnRequest, I as Issuer } from './types-DGDlKiDe.js';
4
4
  export { erc20Abi, issuerRegistryAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, relayAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.js';
5
- export { buildDomain, buildMintRequestTypedData, buildReceiverConsentTypedData, signMintRequest, signReceiverConsent, verifyMintRequest, verifyReceiverConsent } from './eip712/index.js';
5
+ export { buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, buildReceiverConsentTypedData, signBurnRequest, signMintRequest, signReceiverConsent, verifyBurnRequest, verifyMintRequest, verifyReceiverConsent } from './eip712/index.js';
6
6
  import { SimulationResult } from './relay/index.js';
7
7
  export { buildRelaySwapParams, decodeExtData, decodeMintAndSwap, encodeExtData, encodeMintAndSwap, simulateMintAndSwap } from './relay/index.js';
8
8
  export { getIssuer, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, getUsdt, isActiveIssuer, isMinter, verifyMintCap } from './contract/index.js';
9
9
  export { buildAllPaths, combineRoutes, findBestQuote, quoteBestRoute, quoteExactInput, quoteExactInputSingle } from './quoting/index.js';
10
- import { O as Operation, P as PartialUserOperation, U as UserOperation, S as SwapSimulationResult } from './index-CNALKsH1.js';
11
- export { B as BuildSwapWithGasDeductionParams, E as ENTRY_POINT_V07, a as PaymasterFields, b as SETTLE_ALL, c as SWAP_EXACT_IN, T as TAKE_ALL, d as UserOpReceipt, V as V4_SWAP, Z as ZERO_VALUE, e as buildErc20ApprovalCalldata, f as buildPermit2ApprovalCalldata, g as buildSwapFromQuote, h as buildSwapWithGasDeduction, i as buildUniversalRouterExecuteArgs, j as buildV4SwapInput, k as checkAllowance, s as simulateSwap } from './index-CNALKsH1.js';
10
+ import { O as Operation, P as PartialUserOperation, U as UserOperation, S as SwapSimulationResult } from './index-BYL8Nn-n.js';
11
+ export { B as BuildSwapWithGasDeductionParams, E as ENTRY_POINT_V07, a as PaymasterFields, b as SETTLE_ALL, c as SWAP_EXACT_IN, T as TAKE_ALL, d as UserOpReceipt, V as V4_SWAP, Z as ZERO_VALUE, e as buildErc20ApprovalCalldata, f as buildPermit2ApprovalCalldata, g as buildSwapFromQuote, h as buildSwapWithGasDeduction, i as buildUniversalRouterExecuteArgs, j as buildV4SwapInput, k as checkAllowance, s as simulateSwap } from './index-BYL8Nn-n.js';
12
12
  import { LoginMessageParams } from './auth/index.js';
13
13
  export { VerifyLoginResult, createLoginMessage, parseLoginMessage, verifyLoginMessage } from './auth/index.js';
14
14
 
@@ -27,6 +27,21 @@ declare const mintRequestTypes: {
27
27
  readonly type: "uint256";
28
28
  }];
29
29
  };
30
+ declare const burnRequestTypes: {
31
+ readonly BurnRequest: readonly [{
32
+ readonly name: "from";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly name: "amount";
36
+ readonly type: "uint256";
37
+ }, {
38
+ readonly name: "nonce";
39
+ readonly type: "uint256";
40
+ }, {
41
+ readonly name: "deadline";
42
+ readonly type: "uint256";
43
+ }];
44
+ };
30
45
  declare const receiverConsentTypes: {
31
46
  readonly ReceiverConsent: readonly [{
32
47
  readonly name: "onBehalfOf";
@@ -276,40 +291,105 @@ interface CheckEthAndBranchParams {
276
291
  declare function checkEthAndBranch(params: CheckEthAndBranchParams): Promise<SubmissionPath>;
277
292
 
278
293
  /**
279
- * ⚠️ MOCK — `PointToken` v1.4 surface (mint + burn).
294
+ * ⚠️ PARTIAL MOCK — `PointToken` ABI.
295
+ *
296
+ * As of 2026-04-21 this matches the deployed Base mainnet contract
297
+ * (POINT at `0x7d25E7156E51F865D522fd3ef257a6B5DD41b97e`). The ABI
298
+ * itself is no longer mocked — kept under `mocks/` only because the
299
+ * rest of the folder is still mock (pending BatchExecutor real address).
300
+ * Once Phase B completes, this file moves to `contracts/real/`.
301
+ *
302
+ * ## Mint — two paths
303
+ *
304
+ * Path 1 — Direct (whitelisted minter):
305
+ * mint(address to, uint256 amount)
306
+ * - msg.sender must be in minters[]
307
+ * - Used by off-chain services that hold a minter key
280
308
  *
281
- * ## Mint (NEW direct flow — no Relayer)
309
+ * Path 2 Sig-gated (gasless, v1.4 sponsored flow):
310
+ * mint(address to, uint256 amount, uint256 deadline, bytes minterSig)
311
+ * - msg.sender MUST equal `to` (the receiver)
312
+ * - minterSig is an EIP-712 MintRequest signature from a whitelisted minter
313
+ * - Consumes `mintRequestNonces[to]`
314
+ * - This is the path v1.4 uses: issuer backend signs, user submits
315
+ * via EIP-7702 + Coinbase Paymaster
282
316
  *
283
- * In v1.4 the user calls `PointToken.mint()` directly via an EIP-7702
284
- * delegated UserOp — `msg.sender == user`. The contract checks the
285
- * caller is on its authorized minter allowlist. **No Relayer contract,
286
- * no MintRequest EIP-712 signature.** Backend (gg56) only validates
287
- * off-chain (balance, policy, KYC) before returning the unsigned UserOp.
317
+ * ## Burn mirror structure
288
318
  *
289
- * The mock signature `mint(uint256 amount)` mints to `msg.sender`.
290
- * SC team confirmation pending they may pick `mint(address to,
291
- * uint256 amount)` instead. Either is a 1-line ABI change here.
319
+ * Path 1: burn(address from, uint256 amount) whitelisted burner
320
+ * Path 2: burn(address from, uint256 amount, uint256 deadline, bytes burnerSig)
321
+ * msg.sender must equal `from`, burnerSig from whitelisted burner,
322
+ * consumes `burnRequestNonces[from]`
292
323
  *
293
- * ## Burn two variants mocked
324
+ * Either burn path emits `Transfer(from → 0x0)` so BurnIndexer semantics
325
+ * don't depend on which path was taken.
294
326
  *
295
- * Variant A (simpler, most likely):
296
- * burn(uint256 amount)
297
- * - burns from `msg.sender` (user via EIP-7702)
327
+ * ## EIP-712 type hashes (from contract source)
298
328
  *
299
- * Variant B (signature-based, if SC prefers explicit on-chain consent):
300
- * burnWithSig(BurnConsent consent, Signature sig)
301
- * - verifies EIP-712 signature before burning
329
+ * MintRequest(address to,uint256 amount,uint256 nonce,uint256 deadline)
330
+ * BurnRequest(address from,uint256 amount,uint256 nonce,uint256 deadline)
302
331
  *
303
- * Either way the ERC-20 emits `Transfer(from, address(0), amount)` so
304
- * `BurnIndexer` semantics don't change.
332
+ * Domain: EIP-712 standard name = ERC-20 token name, version = "1",
333
+ * chainId, verifyingContract = this PointToken address.
305
334
  */
306
335
  declare const MOCK_POINT_TOKEN_V2_ABI: readonly [{
307
336
  readonly name: "mint";
308
337
  readonly type: "function";
309
338
  readonly stateMutability: "nonpayable";
310
339
  readonly inputs: readonly [{
340
+ readonly type: "address";
341
+ readonly name: "to";
342
+ }, {
343
+ readonly type: "uint256";
344
+ readonly name: "amount";
345
+ }];
346
+ readonly outputs: readonly [];
347
+ }, {
348
+ readonly name: "mint";
349
+ readonly type: "function";
350
+ readonly stateMutability: "nonpayable";
351
+ readonly inputs: readonly [{
352
+ readonly type: "address";
353
+ readonly name: "to";
354
+ }, {
355
+ readonly type: "uint256";
356
+ readonly name: "amount";
357
+ }, {
358
+ readonly type: "uint256";
359
+ readonly name: "deadline";
360
+ }, {
361
+ readonly type: "bytes";
362
+ readonly name: "minterSig";
363
+ }];
364
+ readonly outputs: readonly [];
365
+ }, {
366
+ readonly name: "burn";
367
+ readonly type: "function";
368
+ readonly stateMutability: "nonpayable";
369
+ readonly inputs: readonly [{
370
+ readonly type: "address";
371
+ readonly name: "from";
372
+ }, {
373
+ readonly type: "uint256";
374
+ readonly name: "amount";
375
+ }];
376
+ readonly outputs: readonly [];
377
+ }, {
378
+ readonly name: "burn";
379
+ readonly type: "function";
380
+ readonly stateMutability: "nonpayable";
381
+ readonly inputs: readonly [{
382
+ readonly type: "address";
383
+ readonly name: "from";
384
+ }, {
311
385
  readonly type: "uint256";
312
386
  readonly name: "amount";
387
+ }, {
388
+ readonly type: "uint256";
389
+ readonly name: "deadline";
390
+ }, {
391
+ readonly type: "bytes";
392
+ readonly name: "burnerSig";
313
393
  }];
314
394
  readonly outputs: readonly [];
315
395
  }, {
@@ -318,80 +398,183 @@ declare const MOCK_POINT_TOKEN_V2_ABI: readonly [{
318
398
  readonly stateMutability: "view";
319
399
  readonly inputs: readonly [{
320
400
  readonly type: "address";
321
- readonly name: "user";
401
+ readonly name: "account";
322
402
  }];
323
403
  readonly outputs: readonly [{
324
404
  readonly type: "bool";
325
405
  }];
326
406
  }, {
327
- readonly name: "burn";
407
+ readonly name: "burners";
408
+ readonly type: "function";
409
+ readonly stateMutability: "view";
410
+ readonly inputs: readonly [{
411
+ readonly type: "address";
412
+ readonly name: "account";
413
+ }];
414
+ readonly outputs: readonly [{
415
+ readonly type: "bool";
416
+ }];
417
+ }, {
418
+ readonly name: "addMinter";
328
419
  readonly type: "function";
329
420
  readonly stateMutability: "nonpayable";
330
421
  readonly inputs: readonly [{
331
- readonly type: "uint256";
332
- readonly name: "amount";
422
+ readonly type: "address";
423
+ readonly name: "minter";
333
424
  }];
334
425
  readonly outputs: readonly [];
335
426
  }, {
336
- readonly name: "burnWithSig";
427
+ readonly name: "removeMinter";
337
428
  readonly type: "function";
338
429
  readonly stateMutability: "nonpayable";
339
430
  readonly inputs: readonly [{
340
- readonly type: "tuple";
341
- readonly components: readonly [{
342
- readonly type: "address";
343
- readonly name: "user";
344
- }, {
345
- readonly type: "address";
346
- readonly name: "pointToken";
347
- }, {
348
- readonly type: "uint256";
349
- readonly name: "amount";
350
- }, {
351
- readonly type: "uint256";
352
- readonly name: "nonce";
353
- }, {
354
- readonly type: "uint256";
355
- readonly name: "deadline";
356
- }];
357
- readonly name: "consent";
358
- }, {
359
- readonly type: "tuple";
360
- readonly components: readonly [{
361
- readonly type: "uint8";
362
- readonly name: "v";
363
- }, {
364
- readonly type: "bytes32";
365
- readonly name: "r";
366
- }, {
367
- readonly type: "bytes32";
368
- readonly name: "s";
369
- }];
370
- readonly name: "sig";
431
+ readonly type: "address";
432
+ readonly name: "minter";
371
433
  }];
372
434
  readonly outputs: readonly [];
373
435
  }, {
374
- readonly name: "balanceOf";
436
+ readonly name: "addBurner";
437
+ readonly type: "function";
438
+ readonly stateMutability: "nonpayable";
439
+ readonly inputs: readonly [{
440
+ readonly type: "address";
441
+ readonly name: "burner";
442
+ }];
443
+ readonly outputs: readonly [];
444
+ }, {
445
+ readonly name: "removeBurner";
446
+ readonly type: "function";
447
+ readonly stateMutability: "nonpayable";
448
+ readonly inputs: readonly [{
449
+ readonly type: "address";
450
+ readonly name: "burner";
451
+ }];
452
+ readonly outputs: readonly [];
453
+ }, {
454
+ readonly name: "mintRequestNonces";
375
455
  readonly type: "function";
376
456
  readonly stateMutability: "view";
377
457
  readonly inputs: readonly [{
378
458
  readonly type: "address";
379
- readonly name: "user";
459
+ readonly name: "receiver";
380
460
  }];
381
461
  readonly outputs: readonly [{
382
462
  readonly type: "uint256";
383
463
  }];
384
464
  }, {
385
- readonly name: "burnNonce";
465
+ readonly name: "burnRequestNonces";
386
466
  readonly type: "function";
387
467
  readonly stateMutability: "view";
388
468
  readonly inputs: readonly [{
389
469
  readonly type: "address";
390
- readonly name: "user";
470
+ readonly name: "from";
391
471
  }];
392
472
  readonly outputs: readonly [{
393
473
  readonly type: "uint256";
394
474
  }];
475
+ }, {
476
+ readonly name: "mintingOracle";
477
+ readonly type: "function";
478
+ readonly stateMutability: "view";
479
+ readonly inputs: readonly [];
480
+ readonly outputs: readonly [{
481
+ readonly type: "address";
482
+ }];
483
+ }, {
484
+ readonly name: "setMintingOracle";
485
+ readonly type: "function";
486
+ readonly stateMutability: "nonpayable";
487
+ readonly inputs: readonly [{
488
+ readonly type: "address";
489
+ readonly name: "_mintingOracle";
490
+ }];
491
+ readonly outputs: readonly [];
492
+ }, {
493
+ readonly name: "issuer";
494
+ readonly type: "function";
495
+ readonly stateMutability: "view";
496
+ readonly inputs: readonly [];
497
+ readonly outputs: readonly [{
498
+ readonly type: "address";
499
+ }];
500
+ }, {
501
+ readonly name: "balanceOf";
502
+ readonly type: "function";
503
+ readonly stateMutability: "view";
504
+ readonly inputs: readonly [{
505
+ readonly type: "address";
506
+ readonly name: "account";
507
+ }];
508
+ readonly outputs: readonly [{
509
+ readonly type: "uint256";
510
+ }];
511
+ }, {
512
+ readonly name: "totalSupply";
513
+ readonly type: "function";
514
+ readonly stateMutability: "view";
515
+ readonly inputs: readonly [];
516
+ readonly outputs: readonly [{
517
+ readonly type: "uint256";
518
+ }];
519
+ }, {
520
+ readonly name: "name";
521
+ readonly type: "function";
522
+ readonly stateMutability: "view";
523
+ readonly inputs: readonly [];
524
+ readonly outputs: readonly [{
525
+ readonly type: "string";
526
+ }];
527
+ }, {
528
+ readonly name: "symbol";
529
+ readonly type: "function";
530
+ readonly stateMutability: "view";
531
+ readonly inputs: readonly [];
532
+ readonly outputs: readonly [{
533
+ readonly type: "string";
534
+ }];
535
+ }, {
536
+ readonly name: "decimals";
537
+ readonly type: "function";
538
+ readonly stateMutability: "view";
539
+ readonly inputs: readonly [];
540
+ readonly outputs: readonly [{
541
+ readonly type: "uint8";
542
+ }];
543
+ }, {
544
+ readonly name: "DOMAIN_SEPARATOR";
545
+ readonly type: "function";
546
+ readonly stateMutability: "view";
547
+ readonly inputs: readonly [];
548
+ readonly outputs: readonly [{
549
+ readonly type: "bytes32";
550
+ }];
551
+ }, {
552
+ readonly name: "eip712Domain";
553
+ readonly type: "function";
554
+ readonly stateMutability: "view";
555
+ readonly inputs: readonly [];
556
+ readonly outputs: readonly [{
557
+ readonly type: "bytes1";
558
+ readonly name: "fields";
559
+ }, {
560
+ readonly type: "string";
561
+ readonly name: "name";
562
+ }, {
563
+ readonly type: "string";
564
+ readonly name: "version";
565
+ }, {
566
+ readonly type: "uint256";
567
+ readonly name: "chainId";
568
+ }, {
569
+ readonly type: "address";
570
+ readonly name: "verifyingContract";
571
+ }, {
572
+ readonly type: "bytes32";
573
+ readonly name: "salt";
574
+ }, {
575
+ readonly type: "uint256[]";
576
+ readonly name: "extensions";
577
+ }];
395
578
  }, {
396
579
  readonly name: "Transfer";
397
580
  readonly type: "event";
@@ -407,6 +590,46 @@ declare const MOCK_POINT_TOKEN_V2_ABI: readonly [{
407
590
  readonly type: "uint256";
408
591
  readonly name: "value";
409
592
  }];
593
+ }, {
594
+ readonly name: "MinterAdded";
595
+ readonly type: "event";
596
+ readonly inputs: readonly [{
597
+ readonly type: "address";
598
+ readonly name: "minter";
599
+ readonly indexed: true;
600
+ }];
601
+ }, {
602
+ readonly name: "MinterRemoved";
603
+ readonly type: "event";
604
+ readonly inputs: readonly [{
605
+ readonly type: "address";
606
+ readonly name: "minter";
607
+ readonly indexed: true;
608
+ }];
609
+ }, {
610
+ readonly name: "BurnerAdded";
611
+ readonly type: "event";
612
+ readonly inputs: readonly [{
613
+ readonly type: "address";
614
+ readonly name: "burner";
615
+ readonly indexed: true;
616
+ }];
617
+ }, {
618
+ readonly name: "BurnerRemoved";
619
+ readonly type: "event";
620
+ readonly inputs: readonly [{
621
+ readonly type: "address";
622
+ readonly name: "burner";
623
+ readonly indexed: true;
624
+ }];
625
+ }, {
626
+ readonly name: "MintingOracleUpdated";
627
+ readonly type: "event";
628
+ readonly inputs: readonly [{
629
+ readonly type: "address";
630
+ readonly name: "mintingOracle";
631
+ readonly indexed: true;
632
+ }];
410
633
  }];
411
634
 
412
635
  /**
@@ -428,33 +651,32 @@ declare const MOCK_BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA: Address;
428
651
  declare const MOCK_BATCH_EXECUTOR_ADDRESS_BASE_MAINNET: Address;
429
652
 
430
653
  /**
431
- * ⚠️ MOCK — per-chain contract addresses for the v1.4 sponsored flow.
432
- *
433
- * Real addresses come from SC team once they deploy Relayer v2 and
434
- * pick a BatchExecutor. Until then we use placeholders so the SDK
435
- * code path compiles + tests execute end-to-end.
654
+ * ⚠️ PARTIAL MOCK — per-chain contract addresses for the v1.4 flow.
436
655
  *
437
- * **Intentionally not merge-safe to mainnet** callers that resolve
438
- * a mainnet address here get a `0x...DEAD` placeholder which will
439
- * revert at contract-level. That's the point: prod refuses to run
440
- * on mocks.
656
+ * As of 2026-04-21 SC team delivered the first round of deployed
657
+ * addresses on Base mainnet. `batchExecutor` is still pending (not
658
+ * part of the first deploy batch) so that single field remains a
659
+ * placeholder until Phase B.
441
660
  *
442
661
  * Chain id map:
443
- * - 8453 Base mainnet
444
- * - 84532 Base Sepolia
445
- *
446
- * Swap workflow when SC delivers:
447
- * 1. Rename this file `addresses.ts` under `src/contracts/real/`
448
- * 2. Fill real addresses per chain
449
- * 3. Update `src/contracts/index.ts` re-export
450
- * 4. Delete MOCK_* named exports
662
+ * - 8453 Base mainnet — SC-delivered (see below)
663
+ * - 84532 Base Sepolia — not in use; placeholders only
664
+ *
665
+ * v1.4 notes:
666
+ * - No `relayerV2` flow dropped the intermediate Relayer contract.
667
+ * User submits UserOp that calls `PointToken.mint(...)` directly.
668
+ * - `pointToken` here is the live deployed POINT instance (clone
669
+ * from PointTokenFactory) not the implementation. The impl
670
+ * lives at tokenImpl and is only referenced by the factory.
671
+ * - `usdt` is the MockERC20 (dev USDT) used by Uniswap pools.
672
+ *
673
+ * Swap workflow when BatchExecutor lands:
674
+ * 1. Replace `batchExecutor` placeholder with real address
675
+ * 2. Keep structure — consumers already import from the same key
676
+ * 3. Bump core to `0.3.0-beta.N+1`
451
677
  */
452
678
  /**
453
679
  * Per-chain contract addresses.
454
- *
455
- * v1.4 update: `relayerV2` field dropped — flow now calls
456
- * `PointToken.mint()` directly via EIP-7702 delegation. No Relayer
457
- * contract sits between user and PointToken.
458
680
  */
459
681
  interface ContractAddresses {
460
682
  pointToken: Address;
@@ -464,120 +686,61 @@ interface ContractAddresses {
464
686
  mintingOracle: Address;
465
687
  }
466
688
  declare const MOCK_ADDRESSES: Record<number, ContractAddresses>;
689
+ /**
690
+ * PointTokenFactory address — separate from `ContractAddresses`
691
+ * because it's only used at provisioning time (issuer onboard +
692
+ * token creation), not in the hot mint/burn path.
693
+ */
694
+ declare const POINT_TOKEN_FACTORY_ADDRESSES: Record<number, Address>;
695
+ /**
696
+ * PointToken implementation address — the EIP-1167 clone target used
697
+ * by PointTokenFactory. Exposed for observability / proxy verification;
698
+ * consumers should never call this directly.
699
+ */
700
+ declare const POINT_TOKEN_IMPL_ADDRESSES: Record<number, Address>;
467
701
  /**
468
702
  * Lookup helper — throws if the chain isn't in the map so callers fail
469
703
  * loudly on misconfiguration instead of silently using `undefined`.
470
704
  */
471
705
  declare function getMockAddresses(chainId: number): ContractAddresses;
472
706
 
473
- /**
474
- * ⚠️ MOCK — `BurnConsent` EIP-712 type for the v1.4 reverse flow.
475
- *
476
- * New type entirely — v0.2.x had no burn-for-credit flow.
477
- *
478
- * User signs `BurnConsent` to authorize burning `amount` PT from their
479
- * wallet in exchange for an off-chain credit of (amount - gasFee).
480
- * Signature is consumed either by:
481
- * - A relayer calling `PointToken.burnWithSig(...)` (Variant B)
482
- * - The paymaster-proxy-sponsored UserOp calling `PointToken.burn(...)`
483
- * with msg.sender = user via EIP-7702 (Variant A)
484
- *
485
- * Either way the tx emits `Transfer(user → 0x0)` which the issuer's
486
- * `BurnIndexer` watches for and uses to credit the off-chain ledger.
487
- *
488
- * Field list is a best-guess — SC team may add fields (e.g. `feeAmount`
489
- * explicit, `extData`). Update this mock when they freeze the spec.
490
- */
491
- interface MockBurnConsent {
492
- user: Address;
493
- pointToken: Address;
494
- amount: bigint;
495
- nonce: bigint;
496
- deadline: bigint;
497
- }
498
- declare const MOCK_BURN_CONSENT_TYPES: {
499
- readonly BurnConsent: readonly [{
500
- readonly name: "user";
501
- readonly type: "address";
502
- }, {
503
- readonly name: "pointToken";
504
- readonly type: "address";
505
- }, {
506
- readonly name: "amount";
507
- readonly type: "uint256";
508
- }, {
509
- readonly name: "nonce";
510
- readonly type: "uint256";
511
- }, {
512
- readonly name: "deadline";
513
- readonly type: "uint256";
514
- }];
515
- };
516
- declare function buildMockBurnConsentTypedData(domain: PointTokenDomainConfig, message: MockBurnConsent): {
517
- domain: {
518
- name: string;
519
- version: "1";
520
- chainId: number;
521
- verifyingContract: `0x${string}`;
522
- };
523
- types: {
524
- readonly BurnConsent: readonly [{
525
- readonly name: "user";
526
- readonly type: "address";
527
- }, {
528
- readonly name: "pointToken";
529
- readonly type: "address";
530
- }, {
531
- readonly name: "amount";
532
- readonly type: "uint256";
533
- }, {
534
- readonly name: "nonce";
535
- readonly type: "uint256";
536
- }, {
537
- readonly name: "deadline";
538
- readonly type: "uint256";
539
- }];
540
- };
541
- primaryType: "BurnConsent";
542
- message: MockBurnConsent;
543
- };
544
- declare function signMockBurnConsent(walletClient: WalletClient, domain: PointTokenDomainConfig, message: MockBurnConsent): Promise<EIP712Signature>;
545
- declare function verifyMockBurnConsent(domain: PointTokenDomainConfig, message: MockBurnConsent, signature: Hex, expectedUser: Address): Promise<SignatureVerification>;
546
-
547
707
  /**
548
708
  * Public contract surface for `@pafi-dev/core/contracts`.
549
709
  *
550
- * Consumers import contract ABIs + addresses + EIP-712 builders from
551
- * this module. The re-exports below dispatch to either `./mocks/*`
552
- * (current) or `./real/*` (once SC team delivers real ABIs).
553
- *
554
- * ## v1.4 update — Relayer removed
710
+ * Consumers import ABIs + per-chain addresses from this module. EIP-712
711
+ * helpers (`signMintRequest`, `signBurnRequest`, etc.) live under
712
+ * `./eip712/` and are re-exported from the package root — not duplicated
713
+ * here.
555
714
  *
556
- * The flow no longer routes mint through a Relayer contract. Users
557
- * call `PointToken.mint()` directly via an EIP-7702 delegated UserOp
558
- * (`msg.sender == user`). PointToken checks `minters[user]` for
559
- * authorization. No on-chain MintRequest signature, no dual-sig
560
- * verification.
715
+ * ## v1.4 flow no Relayer, sig-gated mint/burn
561
716
  *
562
- * Exports kept:
563
- * - `POINT_TOKEN_V2_ABI` mint + burn surface
564
- * - `BATCH_EXECUTOR_*` EIP-7702 delegation target
565
- * - `CONTRACT_ADDRESSES` — per-chain map (pointToken, batchExecutor, etc.)
566
- * - `BURN_CONSENT_*` EIP-712 for Scenario 2 if `burnWithSig` variant
717
+ * Relayer contract dropped. Users call `PointToken.mint(to, amount,
718
+ * deadline, minterSig)` directly via an EIP-7702 delegated UserOp —
719
+ * `msg.sender == user == to`. `minterSig` is an EIP-712 `MintRequest`
720
+ * signed off-chain by the issuer's minter signer (HSM/KMS). Mirror
721
+ * structure on the burn side with `BurnRequest` + `burn(from, amount,
722
+ * deadline, burnerSig)`.
567
723
  *
568
- * Exports removed (vs beta.2):
569
- * - `RELAYER_V2_ABI`, `RELAYER_V2_MINT_SELECTOR`, `MintRequestV2`,
570
- * `SignatureStruct` Relayer contract dropped from flow
571
- * - `MINT_REQUEST_V2_TYPES`, `buildMintRequestV2TypedData`,
572
- * `signMintRequestV2`, `verifyMintRequestV2` — no MintRequest sig
724
+ * Exports:
725
+ * - `POINT_TOKEN_V2_ABI` full mint + burn + admin surface
726
+ * - `BATCH_EXECUTOR_*` EIP-7702 delegation target (ABI real,
727
+ * address placeholder on all chains until
728
+ * SC delivers)
729
+ * - `CONTRACT_ADDRESSES` — per-chain map (real on 8453 except
730
+ * `batchExecutor` — pending SC)
731
+ * - `POINT_TOKEN_FACTORY_ADDRESSES`, `POINT_TOKEN_IMPL_ADDRESSES`
732
+ * — provisioning / observability helpers
573
733
  *
574
- * Status: MOCKS active. See `./mocks/README.md` for deletion checklist.
734
+ * Status: PARTIAL mock. Only `batchExecutor` on Base mainnet + the
735
+ * entire Base Sepolia row are still placeholder. See mocks/README.md
736
+ * for the deletion checklist.
575
737
  */
576
738
 
577
739
  /**
578
- * Signature struct shared by `burnWithSig` (and any future EIP-712
579
- * verifier on-chain). Exported here so consumers don't need to
580
- * redefine it locally.
740
+ * Signature struct kept for consumers that want the tuple form.
741
+ * Most v1.4 paths pass `bytes` (serialized signature) directly to the
742
+ * contract; this struct is only needed if you're manually splitting
743
+ * for other on-chain verifiers.
581
744
  */
582
745
  interface SignatureStruct {
583
746
  v: number;
@@ -929,4 +1092,4 @@ declare class PafiSDK {
929
1092
  signLoginMessage(message: string): Promise<Hex>;
930
1093
  }
931
1094
 
932
- export { ApiError, BATCH_EXECUTOR_ABI, MOCK_BATCH_EXECUTOR_ADDRESS_BASE_MAINNET as BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, MOCK_BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA as BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, MOCK_BURN_CONSENT_TYPES as BURN_CONSENT_TYPES, BestQuote, type BuildPartialUserOpParams, type MockBurnConsent as BurnConsent, COMMON_POOLS, COMMON_TOKENS, MOCK_ADDRESSES as CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, EIP712Signature, LoginMessageParams, MintParams, MintRequest, type ModalOpenOptions, Operation, POINT_TOKEN_POOLS, MOCK_POINT_TOKEN_V2_ABI as POINT_TOKEN_V2_ABI, PafiSDK, PafiSDKConfig, PafiSDKError, type PafiWebModalAdapter, type PafiWebModalHandle, PartialUserOperation, PathKey, type PaymasterConfig, PointTokenDomainConfig, PoolKey, QuoteResult, ReceiverConsent, SUPPORTED_CHAINS, type SignatureStruct, SignatureVerification, SigningError, SimulationError, SimulationResult, type SponsorshipScenario, type SubmissionPath, SwapParams, SwapSimulationResult, UNIVERSAL_ROUTER_ADDRESSES, UserOperation, V4_QUOTER_ADDRESSES, _resetPaymasterConfigForTests, assembleUserOperation, buildMockBurnConsentTypedData as buildBurnConsentTypedData, buildPartialUserOperation, checkEthAndBranch, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, getMockAddresses as getContractAddresses, getPafiWebModalAdapter, getPaymasterConfig, isPaymasterConfigured, mintRequestTypes, openPafiWebModal, openWebPopup, rawCallOp, receiverConsentTypes, setPafiWebModalAdapter, setPaymasterConfig, signMockBurnConsent as signBurnConsent, verifyMockBurnConsent as verifyBurnConsent, webPopupAdapter };
1095
+ export { ApiError, BATCH_EXECUTOR_ABI, MOCK_BATCH_EXECUTOR_ADDRESS_BASE_MAINNET as BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, MOCK_BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA as BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BestQuote, type BuildPartialUserOpParams, COMMON_POOLS, COMMON_TOKENS, MOCK_ADDRESSES as CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, EIP712Signature, LoginMessageParams, MintParams, MintRequest, type ModalOpenOptions, Operation, POINT_TOKEN_FACTORY_ADDRESSES, POINT_TOKEN_IMPL_ADDRESSES, POINT_TOKEN_POOLS, MOCK_POINT_TOKEN_V2_ABI as POINT_TOKEN_V2_ABI, PafiSDK, PafiSDKConfig, PafiSDKError, type PafiWebModalAdapter, type PafiWebModalHandle, PartialUserOperation, PathKey, type PaymasterConfig, PointTokenDomainConfig, PoolKey, QuoteResult, ReceiverConsent, SUPPORTED_CHAINS, type SignatureStruct, SignatureVerification, SigningError, SimulationError, SimulationResult, type SponsorshipScenario, type SubmissionPath, SwapParams, SwapSimulationResult, UNIVERSAL_ROUTER_ADDRESSES, UserOperation, V4_QUOTER_ADDRESSES, _resetPaymasterConfigForTests, assembleUserOperation, buildPartialUserOperation, burnRequestTypes, checkEthAndBranch, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, getMockAddresses as getContractAddresses, getPafiWebModalAdapter, getPaymasterConfig, isPaymasterConfigured, mintRequestTypes, openPafiWebModal, openWebPopup, rawCallOp, receiverConsentTypes, setPafiWebModalAdapter, setPaymasterConfig, webPopupAdapter };