@pafi-dev/core 0.9.0 → 0.9.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
@@ -3,7 +3,7 @@ import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDoma
3
3
  export { B as BestQuote, c as BlackoutWindow, d as BurnRequest, e as ExactOutputBestQuote, f as ExactOutputQuoteResult, I as Issuer, g as PathKey, Q as QuoteResult, h as Recipient, i as RedemptionDecision, j as RedemptionDenial, k as RedemptionDenialCode, l as RedemptionPolicy, m as RedemptionPolicySource, n as RedemptionPreview, T as TokenCap } from './types-DWLZNgcw.cjs';
4
4
  export { pointTokenAbi as POINT_TOKEN_V2_ABI, erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.cjs';
5
5
  export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, buildReceiverConsentTypedData, signBurnRequest, signMintRequest, signReceiverConsent, verifyBurnRequest, verifyMintRequest, verifyReceiverConsent } from './eip712/index.cjs';
6
- export { getBurnRequestNonce, getIssuer, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyMintCap } from './contract/index.cjs';
6
+ export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyMintCap } from './contract/index.cjs';
7
7
  import { LoginMessageParams } from './auth/index.cjs';
8
8
  export { BuildSponsorAuthParams, BuiltSponsorAuth, SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET, SPONSOR_AUTH_DOMAIN_NAME, SPONSOR_AUTH_TYPES, SponsorAuthPayload, SponsorAuthVerifyResult, VerifyLoginResult, buildAndSignSponsorAuth, buildSponsorAuthDomain, buildSponsorAuthTypedData, computeCallDataHash, createLoginMessage, generateSponsorAuthNonce, getSponsorAuthDomainAnchor, parseLoginMessage, signSponsorAuth, verifyLoginMessage, verifySponsorAuth } from './auth/index.cjs';
9
9
 
@@ -1617,25 +1617,32 @@ declare const BATCH_EXECUTOR_ADDRESS_BASE_MAINNET: `0x${string}`;
1617
1617
  declare const BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA: `0x${string}`;
1618
1618
 
1619
1619
  /**
1620
- * Per-chain deployed contract addresses — v1.4 flow.
1620
+ * Per-chain deployed contract addresses — v1.6 flow.
1621
1621
  *
1622
- * ## Status (2026-04-22)
1622
+ * ## Status (2026-05-07)
1623
1623
  *
1624
- * Base mainnet (8453): **all real**. BatchExecutor now points at the
1625
- * canonical Coinbase Smart Wallet v2 contract which PAFI reuses as the
1626
- * EIP-7702 delegation target (no per-app deploy required — one
1627
- * contract, every issuer).
1624
+ * Base mainnet (8453): v1.6 redeploy. PAFIHook removed entirely fee on
1625
+ * mint now happens via `MintFeeWrapper` (single global instance, multi-PT).
1626
+ * `pafiHook` field kept as placeholder for back-compat with consumers that
1627
+ * still reference it; set to a deterministic dead address to make misuse
1628
+ * obvious.
1628
1629
  *
1629
1630
  * Base Sepolia (84532): entire row is placeholder — not in active use.
1630
1631
  *
1631
1632
  * ## What lives where
1632
1633
  *
1633
- * pointToken live POINT instance (clone of PointToken impl)
1634
- * batchExecutor — EIP-7702 delegation target (Coinbase Smart Wallet v2)
1635
- * usdt — MockERC20 used by Uniswap pools
1636
- * issuerRegistry — registry of all issuers on this chain
1637
- * mintingOracle — per-issuer mint cap enforcer
1638
- * pafiHook — Uniswap V4 hook enforcing the 10% PT→USDT fee
1634
+ * pointToken DEAD legacy field (per-issuer, not chain-level).
1635
+ * Each issuer's clone is configured via env or
1636
+ * resolved from PointTokenFactory at runtime. Set
1637
+ * to a deterministic dead address so misuse fails
1638
+ * loudly. Will be removed when downstream consumers
1639
+ * stop referencing it.
1640
+ * batchExecutor — EIP-7702 delegation target (Pimlico Simple7702Account)
1641
+ * usdt — MockERC20 used by Uniswap pools
1642
+ * issuerRegistry — registry of all issuers on this chain
1643
+ * mintingOracle — per-token mint cap enforcer (v1.6: per-token, not per-issuer)
1644
+ * mintFeeWrapper — v1.6 mint-time fee splitter (single global instance)
1645
+ * pafiHook — DEAD; v1.5 V4 swap fee removed in v1.6. Kept for ABI compat.
1639
1646
  *
1640
1647
  * PointTokenFactory + PointToken implementation addresses live in
1641
1648
  * separate exports below — they're only needed at provisioning /
@@ -1649,10 +1656,16 @@ interface ContractAddresses {
1649
1656
  issuerRegistry: Address;
1650
1657
  mintingOracle: Address;
1651
1658
  /**
1652
- * Uniswap V4 hook that enforces the 10% fee on PT→USDT swaps
1653
- * (USDT→PT is free). FE reads this to build `PoolKey.hooks` when
1654
- * constructing a swap; quoters + routers need it to resolve the
1655
- * correct pool.
1659
+ * v1.6 single-instance MintFeeWrapper that skims a fee on every
1660
+ * sig-gated mint and distributes across the registered recipient
1661
+ * list for the target PointToken. Issuers route mints through this
1662
+ * by passing `mintFeeWrapperAddress` to `prepareMint`.
1663
+ */
1664
+ mintFeeWrapper: Address;
1665
+ /**
1666
+ * @deprecated v1.5 PAFIHook (10% PT→USDT swap fee) was removed in
1667
+ * v1.6. Field kept as a dead placeholder so older consumers don't
1668
+ * crash on missing-property errors; do not use for new code.
1656
1669
  */
1657
1670
  pafiHook: Address;
1658
1671
  /** Chainlink ETH/USD price feed — used by FeeManager to convert gas cost to USDT. */
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDoma
3
3
  export { B as BestQuote, c as BlackoutWindow, d as BurnRequest, e as ExactOutputBestQuote, f as ExactOutputQuoteResult, I as Issuer, g as PathKey, Q as QuoteResult, h as Recipient, i as RedemptionDecision, j as RedemptionDenial, k as RedemptionDenialCode, l as RedemptionPolicy, m as RedemptionPolicySource, n as RedemptionPreview, T as TokenCap } from './types-DWLZNgcw.js';
4
4
  export { pointTokenAbi as POINT_TOKEN_V2_ABI, erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.js';
5
5
  export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, buildReceiverConsentTypedData, signBurnRequest, signMintRequest, signReceiverConsent, verifyBurnRequest, verifyMintRequest, verifyReceiverConsent } from './eip712/index.js';
6
- export { getBurnRequestNonce, getIssuer, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyMintCap } from './contract/index.js';
6
+ export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyMintCap } from './contract/index.js';
7
7
  import { LoginMessageParams } from './auth/index.js';
8
8
  export { BuildSponsorAuthParams, BuiltSponsorAuth, SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET, SPONSOR_AUTH_DOMAIN_NAME, SPONSOR_AUTH_TYPES, SponsorAuthPayload, SponsorAuthVerifyResult, VerifyLoginResult, buildAndSignSponsorAuth, buildSponsorAuthDomain, buildSponsorAuthTypedData, computeCallDataHash, createLoginMessage, generateSponsorAuthNonce, getSponsorAuthDomainAnchor, parseLoginMessage, signSponsorAuth, verifyLoginMessage, verifySponsorAuth } from './auth/index.js';
9
9
 
@@ -1617,25 +1617,32 @@ declare const BATCH_EXECUTOR_ADDRESS_BASE_MAINNET: `0x${string}`;
1617
1617
  declare const BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA: `0x${string}`;
1618
1618
 
1619
1619
  /**
1620
- * Per-chain deployed contract addresses — v1.4 flow.
1620
+ * Per-chain deployed contract addresses — v1.6 flow.
1621
1621
  *
1622
- * ## Status (2026-04-22)
1622
+ * ## Status (2026-05-07)
1623
1623
  *
1624
- * Base mainnet (8453): **all real**. BatchExecutor now points at the
1625
- * canonical Coinbase Smart Wallet v2 contract which PAFI reuses as the
1626
- * EIP-7702 delegation target (no per-app deploy required — one
1627
- * contract, every issuer).
1624
+ * Base mainnet (8453): v1.6 redeploy. PAFIHook removed entirely fee on
1625
+ * mint now happens via `MintFeeWrapper` (single global instance, multi-PT).
1626
+ * `pafiHook` field kept as placeholder for back-compat with consumers that
1627
+ * still reference it; set to a deterministic dead address to make misuse
1628
+ * obvious.
1628
1629
  *
1629
1630
  * Base Sepolia (84532): entire row is placeholder — not in active use.
1630
1631
  *
1631
1632
  * ## What lives where
1632
1633
  *
1633
- * pointToken live POINT instance (clone of PointToken impl)
1634
- * batchExecutor — EIP-7702 delegation target (Coinbase Smart Wallet v2)
1635
- * usdt — MockERC20 used by Uniswap pools
1636
- * issuerRegistry — registry of all issuers on this chain
1637
- * mintingOracle — per-issuer mint cap enforcer
1638
- * pafiHook — Uniswap V4 hook enforcing the 10% PT→USDT fee
1634
+ * pointToken DEAD legacy field (per-issuer, not chain-level).
1635
+ * Each issuer's clone is configured via env or
1636
+ * resolved from PointTokenFactory at runtime. Set
1637
+ * to a deterministic dead address so misuse fails
1638
+ * loudly. Will be removed when downstream consumers
1639
+ * stop referencing it.
1640
+ * batchExecutor — EIP-7702 delegation target (Pimlico Simple7702Account)
1641
+ * usdt — MockERC20 used by Uniswap pools
1642
+ * issuerRegistry — registry of all issuers on this chain
1643
+ * mintingOracle — per-token mint cap enforcer (v1.6: per-token, not per-issuer)
1644
+ * mintFeeWrapper — v1.6 mint-time fee splitter (single global instance)
1645
+ * pafiHook — DEAD; v1.5 V4 swap fee removed in v1.6. Kept for ABI compat.
1639
1646
  *
1640
1647
  * PointTokenFactory + PointToken implementation addresses live in
1641
1648
  * separate exports below — they're only needed at provisioning /
@@ -1649,10 +1656,16 @@ interface ContractAddresses {
1649
1656
  issuerRegistry: Address;
1650
1657
  mintingOracle: Address;
1651
1658
  /**
1652
- * Uniswap V4 hook that enforces the 10% fee on PT→USDT swaps
1653
- * (USDT→PT is free). FE reads this to build `PoolKey.hooks` when
1654
- * constructing a swap; quoters + routers need it to resolve the
1655
- * correct pool.
1659
+ * v1.6 single-instance MintFeeWrapper that skims a fee on every
1660
+ * sig-gated mint and distributes across the registered recipient
1661
+ * list for the target PointToken. Issuers route mints through this
1662
+ * by passing `mintFeeWrapperAddress` to `prepareMint`.
1663
+ */
1664
+ mintFeeWrapper: Address;
1665
+ /**
1666
+ * @deprecated v1.5 PAFIHook (10% PT→USDT swap fee) was removed in
1667
+ * v1.6. Field kept as a dead placeholder so older consumers don't
1668
+ * crash on missing-property errors; do not use for new code.
1656
1669
  */
1657
1670
  pafiHook: Address;
1658
1671
  /** Chainlink ETH/USD price feed — used by FeeManager to convert gas cost to USDT. */
package/dist/index.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  erc20Abi,
3
- mintFeeWrapperAbi,
4
3
  permit2Abi,
5
4
  pointTokenFactoryAbi,
6
5
  universalRouterAbi,
7
6
  v4QuoterAbi
8
- } from "./chunk-JWZTY5UL.js";
7
+ } from "./chunk-CWH4KOUW.js";
9
8
  import {
10
9
  SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET,
11
10
  SPONSOR_AUTH_DOMAIN_NAME,
@@ -26,6 +25,8 @@ import {
26
25
  getBurnRequestNonce,
27
26
  getIssuer,
28
27
  getIssuer2,
28
+ getMintFeeBps,
29
+ getMintFeeRecipients,
29
30
  getMintRequestNonce,
30
31
  getPointTokenBalance,
31
32
  getPointTokenIssuer,
@@ -35,11 +36,12 @@ import {
35
36
  isMinter,
36
37
  issuerRegistryGetIssuerFlatAbi,
37
38
  verifyMintCap
38
- } from "./chunk-PWQWNHGI.js";
39
+ } from "./chunk-RFKS5BHE.js";
39
40
  import {
40
41
  issuerRegistryAbi,
42
+ mintFeeWrapperAbi,
41
43
  mintingOracleAbi
42
- } from "./chunk-FHFZ2F34.js";
44
+ } from "./chunk-LF5GIN5P.js";
43
45
  import {
44
46
  COMMON_POOLS,
45
47
  COMMON_TOKENS,
@@ -799,31 +801,31 @@ function buildEip7702Authorization(params) {
799
801
  // src/contracts/real/addresses.ts
800
802
  var PLACEHOLDER_DEAD = (suffix) => `0x000000000000000000000000000000000000${suffix.toLowerCase().padStart(4, "0")}`;
801
803
  var CONTRACT_ADDRESSES = {
802
- // Base mainnet — SC-delivered (2026-04-21, 2026-04-22)
803
- // registry: IssuerRegistry 0xda2D3338CF70F462Ac175F5f2edfa45660CA4f31
804
- // factory: PointTokenFactory 0x36c0BAb2faBE45EfA6d13001143e43A266Af673B
805
- // oracle: MintingOracle 0xD85165939C700E51c8a45099316C6482634C2Ab9
806
- // tokenImpl: PointToken (impl) 0x2e6FB1B0C1A51abb83eC974890126a64eC02E995
807
- // mockUsdt: MockERC20 0x5d313485Ba59C3bb91e1A9C0C11782F0b83d5dcd
808
- // POINT: PointToken instance 0x7d25E7156E51F865D522fd3ef257a6B5DD41b97e
809
- // batchExecutor: Pimlico Simple7702 0xe6Cae83BdE06E4c305530e199D7217f42808555B
810
- // (v0.7.6 — switched from Coinbase SW v2
811
- // `0x7702cb...7176C`; CSW v2 uses SignatureWrapper
812
- // format that Pimlico's `pm_sponsorUserOperation`
813
- // cannot produce a working dummy sig for, leading
814
- // to AA23 `0x3c10b94e` reverts on the simulator.
815
- // Pimlico's `Simple7702Account` accepts standard
816
- // v0.7 ECDSA dummy and matches what the web FE +
817
- // permissionless `to7702SimpleSmartAccount` already
818
- // used in production.)
819
- // pafiHook: PAFIHook (V4, 10%) 0x870cAF9882d3160602AaC1769C2B264A2d8EC044
804
+ // Base mainnet — v1.6 redeploy (2026-05-07)
805
+ // registry: IssuerRegistry 0xAB1d1e117c41636f30bb10194Fe6B774B6Da9E01
806
+ // factory: PointTokenFactory 0xA08274458b43E7D6F4ff61ddFe8A9852c6531085
807
+ // oracle: MintingOracle 0x2f4cf8C5F8b41efC970c5b46a5d905CeA1f871a0
808
+ // tokenImpl: PointToken (impl) 0xc41c3F8A0380c7760Ee1209d6d19C4b81dE994e4
809
+ // mintFeeWrapper: MintFeeWrapper 0xD324EE2e3220B23d1b1BfbB85f5bC1EF2E917B93
810
+ // mockUsdt: MockERC20 0x3F7e71B150e97316Bb9f363A32c19CcD36ac2382
811
+ // batchExecutor: Pimlico Simple7702 0xe6Cae83BdE06E4c305530e199D7217f42808555B (unchanged from v1.5)
812
+ //
813
+ // pointToken: PER-ISSUER, not chain-level. Each issuer deploys their
814
+ // own clone via PointTokenFactory.createToken() and tracks the address
815
+ // separately (env var, DB, or factory readout). This field is a
816
+ // historical leftover from v1.4 single-issuer days and has no SDK
817
+ // consumer kept as dead-zero so any code that mistakenly reads it
818
+ // fails loudly instead of silently routing to a stale token.
819
+ // Known clones (informational, NOT to be used as a default):
820
+ // gg56 (Test Point / TPT) — 0x855c2046AD49AcF9B3B32557176FfCB1a1A38A22
820
821
  8453: {
821
- pointToken: "0x7d25E7156E51F865D522fd3ef257a6B5DD41b97e",
822
+ pointToken: PLACEHOLDER_DEAD("dead"),
822
823
  batchExecutor: "0xe6Cae83BdE06E4c305530e199D7217f42808555B",
823
- usdt: "0x5d313485Ba59C3bb91e1A9C0C11782F0b83d5dcd",
824
- issuerRegistry: "0xda2D3338CF70F462Ac175F5f2edfa45660CA4f31",
825
- mintingOracle: "0xD85165939C700E51c8a45099316C6482634C2Ab9",
826
- pafiHook: "0x870cAF9882d3160602AaC1769C2B264A2d8EC044",
824
+ usdt: "0x3F7e71B150e97316Bb9f363A32c19CcD36ac2382",
825
+ issuerRegistry: "0xAB1d1e117c41636f30bb10194Fe6B774B6Da9E01",
826
+ mintingOracle: "0x2f4cf8C5F8b41efC970c5b46a5d905CeA1f871a0",
827
+ mintFeeWrapper: "0xD324EE2e3220B23d1b1BfbB85f5bC1EF2E917B93",
828
+ pafiHook: PLACEHOLDER_DEAD("dead"),
827
829
  chainlinkEthUsd: "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70",
828
830
  orderlyRelay: "0xDA082DAce1522c185aeB5A713FcA6fa6B6E99e7f",
829
831
  pafiFeeRecipient: "0xa3F71eadEd101513a0151007590020dCFD7C495e",
@@ -837,6 +839,7 @@ var CONTRACT_ADDRESSES = {
837
839
  usdt: PLACEHOLDER_DEAD("dead"),
838
840
  issuerRegistry: PLACEHOLDER_DEAD("dead"),
839
841
  mintingOracle: PLACEHOLDER_DEAD("dead"),
842
+ mintFeeWrapper: PLACEHOLDER_DEAD("dead"),
840
843
  pafiHook: PLACEHOLDER_DEAD("dead"),
841
844
  chainlinkEthUsd: PLACEHOLDER_DEAD("de02"),
842
845
  orderlyRelay: PLACEHOLDER_DEAD("de03"),
@@ -845,11 +848,11 @@ var CONTRACT_ADDRESSES = {
845
848
  }
846
849
  };
847
850
  var POINT_TOKEN_FACTORY_ADDRESSES = {
848
- 8453: "0x36c0BAb2faBE45EfA6d13001143e43A266Af673B",
851
+ 8453: "0xA08274458b43E7D6F4ff61ddFe8A9852c6531085",
849
852
  84532: PLACEHOLDER_DEAD("dead")
850
853
  };
851
854
  var POINT_TOKEN_IMPL_ADDRESSES = {
852
- 8453: "0x2e6FB1B0C1A51abb83eC974890126a64eC02E995",
855
+ 8453: "0xc41c3F8A0380c7760Ee1209d6d19C4b81dE994e4",
853
856
  84532: PLACEHOLDER_DEAD("dead")
854
857
  };
855
858
  function getContractAddresses(chainId) {
@@ -1637,6 +1640,8 @@ export {
1637
1640
  getContractAddresses,
1638
1641
  getDummySignatureFor7702,
1639
1642
  getIssuer2 as getIssuer,
1643
+ getMintFeeBps,
1644
+ getMintFeeRecipients,
1640
1645
  getMintRequestNonce,
1641
1646
  getPafiServiceUrls,
1642
1647
  getPafiWebModalAdapter,