@pafi-dev/core 0.19.0 → 0.20.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.
Files changed (57) hide show
  1. package/README.md +46 -8
  2. package/dist/abi/index.cjs +14 -4
  3. package/dist/abi/index.cjs.map +1 -1
  4. package/dist/abi/index.d.cts +3846 -482
  5. package/dist/abi/index.d.ts +3846 -482
  6. package/dist/abi/index.js +15 -5
  7. package/dist/{chunk-KRHGFUDI.cjs → chunk-245YA3CQ.cjs} +87 -20
  8. package/dist/chunk-245YA3CQ.cjs.map +1 -0
  9. package/dist/{chunk-C7VB6WTL.cjs → chunk-2CU7ZH2A.cjs} +490 -497
  10. package/dist/chunk-2CU7ZH2A.cjs.map +1 -0
  11. package/dist/chunk-2DVM77Y2.cjs +5018 -0
  12. package/dist/chunk-2DVM77Y2.cjs.map +1 -0
  13. package/dist/{chunk-UZUDJXKE.cjs → chunk-3ZT7KTN4.cjs} +5 -3
  14. package/dist/chunk-3ZT7KTN4.cjs.map +1 -0
  15. package/dist/{chunk-H3X3FYUU.js → chunk-4VPIPVV5.js} +62 -35
  16. package/dist/chunk-4VPIPVV5.js.map +1 -0
  17. package/dist/{chunk-UCO5DXD6.js → chunk-5Y7MGN56.js} +87 -20
  18. package/dist/chunk-5Y7MGN56.js.map +1 -0
  19. package/dist/chunk-DQKCPH6B.cjs +199 -0
  20. package/dist/chunk-DQKCPH6B.cjs.map +1 -0
  21. package/dist/{chunk-4TNHRZ4X.js → chunk-K4GBOB5V.js} +4 -2
  22. package/dist/chunk-K4GBOB5V.js.map +1 -0
  23. package/dist/{chunk-LF5GIN5P.js → chunk-W2DHHR2N.js} +490 -497
  24. package/dist/chunk-W2DHHR2N.js.map +1 -0
  25. package/dist/chunk-ZQVYWMOG.js +5018 -0
  26. package/dist/chunk-ZQVYWMOG.js.map +1 -0
  27. package/dist/contract/index.cjs +8 -4
  28. package/dist/contract/index.cjs.map +1 -1
  29. package/dist/contract/index.d.cts +53 -27
  30. package/dist/contract/index.d.ts +53 -27
  31. package/dist/contract/index.js +13 -9
  32. package/dist/eip712/index.cjs +3 -3
  33. package/dist/eip712/index.d.cts +7 -1
  34. package/dist/eip712/index.d.ts +7 -1
  35. package/dist/eip712/index.js +2 -2
  36. package/dist/index.cjs +132 -23
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +508 -9
  39. package/dist/index.d.ts +508 -9
  40. package/dist/index.js +132 -23
  41. package/dist/index.js.map +1 -1
  42. package/dist/{types-C17pznGz.d.ts → types-Hn1zUPTt.d.cts} +46 -13
  43. package/dist/{types-C17pznGz.d.cts → types-Hn1zUPTt.d.ts} +46 -13
  44. package/package.json +1 -1
  45. package/dist/chunk-4TNHRZ4X.js.map +0 -1
  46. package/dist/chunk-C7VB6WTL.cjs.map +0 -1
  47. package/dist/chunk-H3X3FYUU.js.map +0 -1
  48. package/dist/chunk-KRHGFUDI.cjs.map +0 -1
  49. package/dist/chunk-LF5GIN5P.js.map +0 -1
  50. package/dist/chunk-TRYGIC2I.cjs +0 -172
  51. package/dist/chunk-TRYGIC2I.cjs.map +0 -1
  52. package/dist/chunk-UCO5DXD6.js.map +0 -1
  53. package/dist/chunk-UZUDJXKE.cjs.map +0 -1
  54. package/dist/chunk-XXLIIWIF.cjs +0 -711
  55. package/dist/chunk-XXLIIWIF.cjs.map +0 -1
  56. package/dist/chunk-ZJXXCG5P.js +0 -711
  57. package/dist/chunk-ZJXXCG5P.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,15 +1,26 @@
1
1
  import { Address, Hex, TypedDataDomain, PublicClient, WalletClient, TransactionReceipt, HttpTransport } from 'viem';
2
- import { P as PoolKey, C as ChainConfig, V as V3Path, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, E as EIP712Signature, S as SignatureVerifyOptions, c as SignatureVerification } from './types-C17pznGz.js';
3
- export { B as BestQuote, d as BlackoutWindow, e as BurnRequest, f as ExactOutputBestQuote, g as ExactOutputQuoteResult, I as Issuer, Q as QuoteResult, R as Recipient, h as RedemptionDecision, i as RedemptionDenial, j as RedemptionDenialCode, k as RedemptionPolicy, l as RedemptionPolicySource, m as RedemptionPreview, n as SignatureVerificationFailReason, T as TokenCap } from './types-C17pznGz.js';
4
- export { pointTokenAbi as POINT_TOKEN_ABI, erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v3QuoterV2Abi } from './abi/index.js';
2
+ import { P as PoolKey, C as ChainConfig, V as V3Path, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, E as EIP712Signature, S as SignatureVerifyOptions, c as SignatureVerification } from './types-Hn1zUPTt.js';
3
+ export { B as BestQuote, d as BlackoutWindow, e as BurnRequest, f as ExactOutputBestQuote, g as ExactOutputQuoteResult, I as Issuer, Q as QuoteResult, R as Recipient, h as RedemptionDecision, i as RedemptionDenial, j as RedemptionDenialCode, k as RedemptionPolicy, l as RedemptionPolicySource, m as RedemptionPreview, n as SignatureVerificationFailReason, o as Source } from './types-Hn1zUPTt.js';
4
+ export { erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointModuleCoreAbi, pointTokenAbi, pointTokenFactoryAbi, settlementVaultAbi, tokenRegistryAbi, universalRouterAbi, v3QuoterV2Abi, vaultFactoryAbi, vaultRegistryAbi } from './abi/index.js';
5
5
  export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, signBurnRequest, signMintRequest, verifyBurnRequest, verifyMintRequest } from './eip712/index.js';
6
- export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getTokenCap, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyMintCap } from './contract/index.js';
6
+ export { computeEquityCap, getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getOracleRegistries, getPointTokenBalance, getPointTokenIssuerAddress, getTokenName, isActiveIssuer, isMinter, issuerRegistryGetIssuerFlatAbi, verifyEquityMint, verifyIssuerOperative, verifyMint } 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
 
10
10
  /**
11
11
  * EIP-712 typed data for the sig-gated mint path.
12
12
  *
13
+ * V2 dual-bucket — adds `source` (uint8) so the on-chain digest matches
14
+ * `MintForRequest(address user,address receiver,uint256 amount,uint8 source,uint256 nonce,uint256 deadline)`.
15
+ * Source values per `IPointToken.Source`:
16
+ * 0 = EQUITY (mint backed by issuer's declared capital)
17
+ * 1 = VAULT (mint backed by LP collateral in SettlementVault)
18
+ *
19
+ * SDK helpers `signMintRequest` / `prepareMint` hardcode `source = 0`
20
+ * (EQUITY). VAULT minting is contract-ready but no SDK writer ships it
21
+ * until the LP/admin dashboard lands; sponsor-relayer fails closed on
22
+ * `source != EQUITY` for the same reason.
23
+ *
13
24
  * Contract enforces:
14
25
  * - msg.sender == receiver (the on-chain caller of `mint`)
15
26
  * - nonce == mintRequestNonces[user] (per-user nonce stream)
@@ -29,6 +40,9 @@ declare const mintRequestTypes: {
29
40
  }, {
30
41
  readonly name: "amount";
31
42
  readonly type: "uint256";
43
+ }, {
44
+ readonly name: "source";
45
+ readonly type: "uint8";
32
46
  }, {
33
47
  readonly name: "nonce";
34
48
  readonly type: "uint256";
@@ -37,6 +51,13 @@ declare const mintRequestTypes: {
37
51
  readonly type: "uint256";
38
52
  }];
39
53
  };
54
+ /**
55
+ * EIP-712 typed data for the sig-gated burn path. V2 adds `source`
56
+ * (uint8) to match the contract's 6-field digest:
57
+ * `BurnRequest(address from,uint256 amount,uint8 source,uint256 nonce,uint256 deadline)`
58
+ *
59
+ * Same EQUITY-only policy as `mintRequestTypes`.
60
+ */
40
61
  declare const burnRequestTypes: {
41
62
  readonly BurnRequest: readonly [{
42
63
  readonly name: "from";
@@ -44,6 +65,9 @@ declare const burnRequestTypes: {
44
65
  }, {
45
66
  readonly name: "amount";
46
67
  readonly type: "uint256";
68
+ }, {
69
+ readonly name: "source";
70
+ readonly type: "uint8";
47
71
  }, {
48
72
  readonly name: "nonce";
49
73
  readonly type: "uint256";
@@ -1781,6 +1805,441 @@ interface QuoteOperatorFeeForTransferConfig extends Omit<QuoteOperatorFeeUsdtCon
1781
1805
  }
1782
1806
  declare function quoteOperatorFeeForTransfer(config: QuoteOperatorFeeForTransferConfig): Promise<bigint>;
1783
1807
 
1808
+ /**
1809
+ * Real `PointToken` ABI — matches the V2 dual-bucket PointToken on
1810
+ * Base. Each issuer's clone is per-deploy, created via
1811
+ * `PointTokenFactory.createToken()`. ABI sourced from the Solidity
1812
+ * contract shipped by the SC team (Pacific-Finance-Lab/PAFI-Point-module-sc).
1813
+ *
1814
+ * ## V2 Source enum
1815
+ *
1816
+ * Every mint and burn now requires a `Source` argument:
1817
+ * 0 = EQUITY — issuer's declared capital
1818
+ * 1 = VAULT — LP collateral in SettlementVault
1819
+ *
1820
+ * SDK helpers + sponsor-relayer hardcode / enforce `source = EQUITY`
1821
+ * until the VAULT writer surface lands.
1822
+ *
1823
+ * ## Mint — two paths
1824
+ *
1825
+ * Path 1 — Direct (whitelisted minter):
1826
+ * mint(address to, uint256 amount, uint8 source)
1827
+ * - msg.sender must be in minters[]
1828
+ * - Used by off-chain services that hold a minter key
1829
+ *
1830
+ * Path 2 — Sig-gated (sponsored flow):
1831
+ * mint(address user, uint256 amount, uint8 source, uint256 deadline, bytes minterSig)
1832
+ * - msg.sender MUST equal `user` (the receiver)
1833
+ * - minterSig is an EIP-712 MintForRequest signature from a whitelisted minter
1834
+ * - Consumes `mintRequestNonces[user]`
1835
+ * - Canonical PAFI path: issuer backend signs, user submits via
1836
+ * EIP-7702 + PAFI sponsor-relayer
1837
+ *
1838
+ * ## Burn — mirror structure
1839
+ *
1840
+ * Path 1: burn(address from, uint256 amount, uint8 source) — whitelisted burner
1841
+ * Path 2: burn(address from, uint256 amount, uint8 source, uint256 deadline, bytes burnerSig)
1842
+ * — msg.sender must equal `from`, burnerSig from whitelisted burner,
1843
+ * consumes `burnRequestNonces[from]`
1844
+ *
1845
+ * Either burn path emits `Transfer(from → 0x0)` so BurnIndexer semantics
1846
+ * don't depend on which path was taken. Bucket-specific underflow
1847
+ * surfaces as `BucketUnderflow(source, amount, available)`.
1848
+ *
1849
+ * ## EIP-712 type hashes (V2 — from contract source)
1850
+ *
1851
+ * MintForRequest(address user,address receiver,uint256 amount,uint8 source,uint256 nonce,uint256 deadline)
1852
+ * BurnRequest(address from,uint256 amount,uint8 source,uint256 nonce,uint256 deadline)
1853
+ *
1854
+ * `user` drives the `mintRequestNonces[user]` stream; `receiver ==
1855
+ * msg.sender` of `mint()` (= user for direct, = MintFeeWrapper for
1856
+ * wrapper-mediated mints).
1857
+ *
1858
+ * Domain: EIP-712 standard — name = ERC-20 token name, version = "1",
1859
+ * chainId, verifyingContract = this PointToken address.
1860
+ */
1861
+ /**
1862
+ * Single-signature ABI for the sig-gated mint (the canonical PAFI
1863
+ * sponsored path). Split out from `POINT_TOKEN_ABI` because viem's
1864
+ * type-level overload resolution on `encodeFunctionData({abi, functionName:"mint", args:[...]})`
1865
+ * cannot unambiguously pick between the 3-arg direct path and the
1866
+ * 5-arg sig-gated path when both share the `mint` name. Callers that
1867
+ * need to ENCODE the sig-gated mint should use this ABI; ABI reads
1868
+ * (e.g. balance views) keep `POINT_TOKEN_ABI`.
1869
+ */
1870
+ declare const POINT_TOKEN_MINT_SIG_ABI: readonly [{
1871
+ readonly name: "mint";
1872
+ readonly type: "function";
1873
+ readonly stateMutability: "nonpayable";
1874
+ readonly inputs: readonly [{
1875
+ readonly type: "address";
1876
+ readonly name: "user";
1877
+ }, {
1878
+ readonly type: "uint256";
1879
+ readonly name: "amount";
1880
+ }, {
1881
+ readonly type: "uint8";
1882
+ readonly name: "source";
1883
+ }, {
1884
+ readonly type: "uint256";
1885
+ readonly name: "deadline";
1886
+ }, {
1887
+ readonly type: "bytes";
1888
+ readonly name: "minterSig";
1889
+ }];
1890
+ readonly outputs: readonly [];
1891
+ }];
1892
+ /** Sig-gated burn ABI — see `POINT_TOKEN_MINT_SIG_ABI` rationale. */
1893
+ declare const POINT_TOKEN_BURN_SIG_ABI: readonly [{
1894
+ readonly name: "burn";
1895
+ readonly type: "function";
1896
+ readonly stateMutability: "nonpayable";
1897
+ readonly inputs: readonly [{
1898
+ readonly type: "address";
1899
+ readonly name: "from";
1900
+ }, {
1901
+ readonly type: "uint256";
1902
+ readonly name: "amount";
1903
+ }, {
1904
+ readonly type: "uint8";
1905
+ readonly name: "source";
1906
+ }, {
1907
+ readonly type: "uint256";
1908
+ readonly name: "deadline";
1909
+ }, {
1910
+ readonly type: "bytes";
1911
+ readonly name: "burnerSig";
1912
+ }];
1913
+ readonly outputs: readonly [];
1914
+ }];
1915
+ declare const POINT_TOKEN_ABI: readonly [{
1916
+ readonly name: "mint";
1917
+ readonly type: "function";
1918
+ readonly stateMutability: "nonpayable";
1919
+ readonly inputs: readonly [{
1920
+ readonly type: "address";
1921
+ readonly name: "to";
1922
+ }, {
1923
+ readonly type: "uint256";
1924
+ readonly name: "amount";
1925
+ }, {
1926
+ readonly type: "uint8";
1927
+ readonly name: "source";
1928
+ }];
1929
+ readonly outputs: readonly [];
1930
+ }, {
1931
+ readonly name: "mint";
1932
+ readonly type: "function";
1933
+ readonly stateMutability: "nonpayable";
1934
+ readonly inputs: readonly [{
1935
+ readonly type: "address";
1936
+ readonly name: "user";
1937
+ }, {
1938
+ readonly type: "uint256";
1939
+ readonly name: "amount";
1940
+ }, {
1941
+ readonly type: "uint8";
1942
+ readonly name: "source";
1943
+ }, {
1944
+ readonly type: "uint256";
1945
+ readonly name: "deadline";
1946
+ }, {
1947
+ readonly type: "bytes";
1948
+ readonly name: "minterSig";
1949
+ }];
1950
+ readonly outputs: readonly [];
1951
+ }, {
1952
+ readonly name: "burn";
1953
+ readonly type: "function";
1954
+ readonly stateMutability: "nonpayable";
1955
+ readonly inputs: readonly [{
1956
+ readonly type: "address";
1957
+ readonly name: "from";
1958
+ }, {
1959
+ readonly type: "uint256";
1960
+ readonly name: "amount";
1961
+ }, {
1962
+ readonly type: "uint8";
1963
+ readonly name: "source";
1964
+ }];
1965
+ readonly outputs: readonly [];
1966
+ }, {
1967
+ readonly name: "burn";
1968
+ readonly type: "function";
1969
+ readonly stateMutability: "nonpayable";
1970
+ readonly inputs: readonly [{
1971
+ readonly type: "address";
1972
+ readonly name: "from";
1973
+ }, {
1974
+ readonly type: "uint256";
1975
+ readonly name: "amount";
1976
+ }, {
1977
+ readonly type: "uint8";
1978
+ readonly name: "source";
1979
+ }, {
1980
+ readonly type: "uint256";
1981
+ readonly name: "deadline";
1982
+ }, {
1983
+ readonly type: "bytes";
1984
+ readonly name: "burnerSig";
1985
+ }];
1986
+ readonly outputs: readonly [];
1987
+ }, {
1988
+ readonly name: "equitySupply";
1989
+ readonly type: "function";
1990
+ readonly stateMutability: "view";
1991
+ readonly inputs: readonly [];
1992
+ readonly outputs: readonly [{
1993
+ readonly type: "uint256";
1994
+ }];
1995
+ }, {
1996
+ readonly name: "vaultSupply";
1997
+ readonly type: "function";
1998
+ readonly stateMutability: "view";
1999
+ readonly inputs: readonly [];
2000
+ readonly outputs: readonly [{
2001
+ readonly type: "uint256";
2002
+ }];
2003
+ }, {
2004
+ readonly name: "minters";
2005
+ readonly type: "function";
2006
+ readonly stateMutability: "view";
2007
+ readonly inputs: readonly [{
2008
+ readonly type: "address";
2009
+ readonly name: "account";
2010
+ }];
2011
+ readonly outputs: readonly [{
2012
+ readonly type: "bool";
2013
+ }];
2014
+ }, {
2015
+ readonly name: "burners";
2016
+ readonly type: "function";
2017
+ readonly stateMutability: "view";
2018
+ readonly inputs: readonly [{
2019
+ readonly type: "address";
2020
+ readonly name: "account";
2021
+ }];
2022
+ readonly outputs: readonly [{
2023
+ readonly type: "bool";
2024
+ }];
2025
+ }, {
2026
+ readonly name: "addMinter";
2027
+ readonly type: "function";
2028
+ readonly stateMutability: "nonpayable";
2029
+ readonly inputs: readonly [{
2030
+ readonly type: "address";
2031
+ readonly name: "minter";
2032
+ }];
2033
+ readonly outputs: readonly [];
2034
+ }, {
2035
+ readonly name: "removeMinter";
2036
+ readonly type: "function";
2037
+ readonly stateMutability: "nonpayable";
2038
+ readonly inputs: readonly [{
2039
+ readonly type: "address";
2040
+ readonly name: "minter";
2041
+ }];
2042
+ readonly outputs: readonly [];
2043
+ }, {
2044
+ readonly name: "addBurner";
2045
+ readonly type: "function";
2046
+ readonly stateMutability: "nonpayable";
2047
+ readonly inputs: readonly [{
2048
+ readonly type: "address";
2049
+ readonly name: "burner";
2050
+ }];
2051
+ readonly outputs: readonly [];
2052
+ }, {
2053
+ readonly name: "removeBurner";
2054
+ readonly type: "function";
2055
+ readonly stateMutability: "nonpayable";
2056
+ readonly inputs: readonly [{
2057
+ readonly type: "address";
2058
+ readonly name: "burner";
2059
+ }];
2060
+ readonly outputs: readonly [];
2061
+ }, {
2062
+ readonly name: "mintRequestNonces";
2063
+ readonly type: "function";
2064
+ readonly stateMutability: "view";
2065
+ readonly inputs: readonly [{
2066
+ readonly type: "address";
2067
+ readonly name: "receiver";
2068
+ }];
2069
+ readonly outputs: readonly [{
2070
+ readonly type: "uint256";
2071
+ }];
2072
+ }, {
2073
+ readonly name: "burnRequestNonces";
2074
+ readonly type: "function";
2075
+ readonly stateMutability: "view";
2076
+ readonly inputs: readonly [{
2077
+ readonly type: "address";
2078
+ readonly name: "from";
2079
+ }];
2080
+ readonly outputs: readonly [{
2081
+ readonly type: "uint256";
2082
+ }];
2083
+ }, {
2084
+ readonly name: "mintingOracle";
2085
+ readonly type: "function";
2086
+ readonly stateMutability: "view";
2087
+ readonly inputs: readonly [];
2088
+ readonly outputs: readonly [{
2089
+ readonly type: "address";
2090
+ }];
2091
+ }, {
2092
+ readonly name: "setMintingOracle";
2093
+ readonly type: "function";
2094
+ readonly stateMutability: "nonpayable";
2095
+ readonly inputs: readonly [{
2096
+ readonly type: "address";
2097
+ readonly name: "_mintingOracle";
2098
+ }];
2099
+ readonly outputs: readonly [];
2100
+ }, {
2101
+ readonly name: "issuer";
2102
+ readonly type: "function";
2103
+ readonly stateMutability: "view";
2104
+ readonly inputs: readonly [];
2105
+ readonly outputs: readonly [{
2106
+ readonly type: "address";
2107
+ }];
2108
+ }, {
2109
+ readonly name: "balanceOf";
2110
+ readonly type: "function";
2111
+ readonly stateMutability: "view";
2112
+ readonly inputs: readonly [{
2113
+ readonly type: "address";
2114
+ readonly name: "account";
2115
+ }];
2116
+ readonly outputs: readonly [{
2117
+ readonly type: "uint256";
2118
+ }];
2119
+ }, {
2120
+ readonly name: "totalSupply";
2121
+ readonly type: "function";
2122
+ readonly stateMutability: "view";
2123
+ readonly inputs: readonly [];
2124
+ readonly outputs: readonly [{
2125
+ readonly type: "uint256";
2126
+ }];
2127
+ }, {
2128
+ readonly name: "name";
2129
+ readonly type: "function";
2130
+ readonly stateMutability: "view";
2131
+ readonly inputs: readonly [];
2132
+ readonly outputs: readonly [{
2133
+ readonly type: "string";
2134
+ }];
2135
+ }, {
2136
+ readonly name: "symbol";
2137
+ readonly type: "function";
2138
+ readonly stateMutability: "view";
2139
+ readonly inputs: readonly [];
2140
+ readonly outputs: readonly [{
2141
+ readonly type: "string";
2142
+ }];
2143
+ }, {
2144
+ readonly name: "decimals";
2145
+ readonly type: "function";
2146
+ readonly stateMutability: "view";
2147
+ readonly inputs: readonly [];
2148
+ readonly outputs: readonly [{
2149
+ readonly type: "uint8";
2150
+ }];
2151
+ }, {
2152
+ readonly name: "DOMAIN_SEPARATOR";
2153
+ readonly type: "function";
2154
+ readonly stateMutability: "view";
2155
+ readonly inputs: readonly [];
2156
+ readonly outputs: readonly [{
2157
+ readonly type: "bytes32";
2158
+ }];
2159
+ }, {
2160
+ readonly name: "eip712Domain";
2161
+ readonly type: "function";
2162
+ readonly stateMutability: "view";
2163
+ readonly inputs: readonly [];
2164
+ readonly outputs: readonly [{
2165
+ readonly type: "bytes1";
2166
+ readonly name: "fields";
2167
+ }, {
2168
+ readonly type: "string";
2169
+ readonly name: "name";
2170
+ }, {
2171
+ readonly type: "string";
2172
+ readonly name: "version";
2173
+ }, {
2174
+ readonly type: "uint256";
2175
+ readonly name: "chainId";
2176
+ }, {
2177
+ readonly type: "address";
2178
+ readonly name: "verifyingContract";
2179
+ }, {
2180
+ readonly type: "bytes32";
2181
+ readonly name: "salt";
2182
+ }, {
2183
+ readonly type: "uint256[]";
2184
+ readonly name: "extensions";
2185
+ }];
2186
+ }, {
2187
+ readonly name: "Transfer";
2188
+ readonly type: "event";
2189
+ readonly inputs: readonly [{
2190
+ readonly type: "address";
2191
+ readonly name: "from";
2192
+ readonly indexed: true;
2193
+ }, {
2194
+ readonly type: "address";
2195
+ readonly name: "to";
2196
+ readonly indexed: true;
2197
+ }, {
2198
+ readonly type: "uint256";
2199
+ readonly name: "value";
2200
+ }];
2201
+ }, {
2202
+ readonly name: "MinterAdded";
2203
+ readonly type: "event";
2204
+ readonly inputs: readonly [{
2205
+ readonly type: "address";
2206
+ readonly name: "minter";
2207
+ readonly indexed: true;
2208
+ }];
2209
+ }, {
2210
+ readonly name: "MinterRemoved";
2211
+ readonly type: "event";
2212
+ readonly inputs: readonly [{
2213
+ readonly type: "address";
2214
+ readonly name: "minter";
2215
+ readonly indexed: true;
2216
+ }];
2217
+ }, {
2218
+ readonly name: "BurnerAdded";
2219
+ readonly type: "event";
2220
+ readonly inputs: readonly [{
2221
+ readonly type: "address";
2222
+ readonly name: "burner";
2223
+ readonly indexed: true;
2224
+ }];
2225
+ }, {
2226
+ readonly name: "BurnerRemoved";
2227
+ readonly type: "event";
2228
+ readonly inputs: readonly [{
2229
+ readonly type: "address";
2230
+ readonly name: "burner";
2231
+ readonly indexed: true;
2232
+ }];
2233
+ }, {
2234
+ readonly name: "MintingOracleUpdated";
2235
+ readonly type: "event";
2236
+ readonly inputs: readonly [{
2237
+ readonly type: "address";
2238
+ readonly name: "mintingOracle";
2239
+ readonly indexed: true;
2240
+ }];
2241
+ }];
2242
+
1784
2243
  declare const BATCH_EXECUTOR_ADDRESS_BASE_MAINNET: `0x${string}`;
1785
2244
  declare const BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA: `0x${string}`;
1786
2245
 
@@ -1836,6 +2295,12 @@ interface ContractAddresses {
1836
2295
  mintFeeWrapper: Address;
1837
2296
  /** Chainlink ETH/USD price feed — used by FeeManager to convert gas cost to USDT. */
1838
2297
  chainlinkEthUsd: Address;
2298
+ /**
2299
+ * Chainlink USDC/USD price feed — paired with the canonical USDC.
2300
+ * Optional because not every chain ships a USDC oracle; FeeManager
2301
+ * falls back to 1:1 (USDC pegged) when undefined.
2302
+ */
2303
+ chainlinkUsdcUsd?: Address;
1839
2304
  /**
1840
2305
  * Orderly perp-deposit Relay — holds an ETH reserve to cover the
1841
2306
  * LayerZero msg.value, charges a USDC token-fee reimbursement.
@@ -1851,7 +2316,7 @@ interface ContractAddresses {
1851
2316
  * shouldn't be able to redirect this fee to themselves.
1852
2317
  */
1853
2318
  pafiFeeRecipient: Address;
1854
- /** Uniswap V4 UniversalRouter — swap entry point for the swap handler. */
2319
+ /** UniversalRouter — swap entry point for the swap handler. */
1855
2320
  universalRouter: Address;
1856
2321
  /**
1857
2322
  * PAFI fork of Uniswap's Permit2. Acts as the unified token-approval
@@ -1862,6 +2327,22 @@ interface ContractAddresses {
1862
2327
  * sync with `PERMIT2_ADDRESS` top-level export.
1863
2328
  */
1864
2329
  permit2: Address;
2330
+ /** V2: TokenRegistry — per-PointToken metadata + active flag. */
2331
+ tokenRegistry: Address;
2332
+ /**
2333
+ * V2: VaultRegistry — per-PointToken SettlementVault registration.
2334
+ * Read-only from the SDK's perspective today (issuer-equity-only
2335
+ * launch); becomes write-side relevant when the LP vault flow lands.
2336
+ */
2337
+ vaultRegistry: Address;
2338
+ /** V2: VaultFactory — deploys SettlementVault UUPS-beacon clones. */
2339
+ vaultFactory: Address;
2340
+ /**
2341
+ * V2: PointModuleCore — top-level coordinator. Holds references to
2342
+ * the IssuerRegistry, TokenRegistry, VaultRegistry, MintingOracle so
2343
+ * consumers can resolve the full registry set from one address.
2344
+ */
2345
+ pointModuleCore: Address;
1865
2346
  }
1866
2347
  declare const CONTRACT_ADDRESSES: Record<number, ContractAddresses>;
1867
2348
  /**
@@ -1871,11 +2352,26 @@ declare const CONTRACT_ADDRESSES: Record<number, ContractAddresses>;
1871
2352
  */
1872
2353
  declare const POINT_TOKEN_FACTORY_ADDRESSES: Record<number, Address>;
1873
2354
  /**
1874
- * PointToken implementation address — the EIP-1167 clone target used
1875
- * by PointTokenFactory. Exposed for observability / proxy verification;
1876
- * consumers should never call this directly.
2355
+ * PointToken implementation address — the clone target used by
2356
+ * PointTokenFactory. V2 switched from EIP-1167 minimal proxy to a
2357
+ * UUPS-beacon pattern (see `POINT_TOKEN_BEACON_ADDRESSES`); each clone
2358
+ * delegates through the beacon to this impl. Exposed for observability
2359
+ * / proxy verification; consumers should never call this directly.
1877
2360
  */
1878
2361
  declare const POINT_TOKEN_IMPL_ADDRESSES: Record<number, Address>;
2362
+ /**
2363
+ * V2: PointToken UUPS beacon — clones point at this beacon; the beacon
2364
+ * delegates to the impl. Upgrading the impl is done by re-pointing the
2365
+ * beacon. Exposed for upgrade audits and observability; runtime SDK
2366
+ * paths never reference it directly.
2367
+ */
2368
+ declare const POINT_TOKEN_BEACON_ADDRESSES: Record<number, Address>;
2369
+ /**
2370
+ * V2: SettlementVault UUPS beacon — same pattern as the PointToken
2371
+ * beacon, for the per-PointToken ERC-4626 LP vault deployed by
2372
+ * VaultFactory. Exposed for upgrade audits.
2373
+ */
2374
+ declare const VAULT_BEACON_ADDRESSES: Record<number, Address>;
1879
2375
  /**
1880
2376
  * Lookup helper — throws if the chain isn't in the map so callers fail
1881
2377
  * loudly on misconfiguration instead of silently using `undefined`.
@@ -2213,6 +2709,9 @@ declare class PafiSDK {
2213
2709
  }, {
2214
2710
  readonly name: "amount";
2215
2711
  readonly type: "uint256";
2712
+ }, {
2713
+ readonly name: "source";
2714
+ readonly type: "uint8";
2216
2715
  }, {
2217
2716
  readonly name: "nonce";
2218
2717
  readonly type: "uint256";
@@ -2232,4 +2731,4 @@ declare class PafiSDK {
2232
2731
  signLoginMessage(message: string): Promise<Hex>;
2233
2732
  }
2234
2733
 
2235
- export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, type BuildErc20TransferParams, type BuildPartialUserOpParams, type BuildPerpDepositViaRelayParams, type BuildPerpDepositWithGasDeductionParams, COMMON_POOLS, COMMON_TOKENS, CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, DUMMY_SIGNATURE_V07, type DelegateDirectParams, type DelegateDirectResult, type DelegateImpl, EIP712Signature, ENTRY_POINT_V07, ENTRY_POINT_V08, type Eip7702AuthorizationJsonRpc, type FallbackInfo, type FeeScenario, LoginMessageParams, MintRequest, type ModalOpenOptions, ORDERLY_RELAY_ABI, ORDERLY_VAULT_ABI, ORDERLY_VAULT_ADDRESSES, ORDERLY_VAULT_BASE_MAINNET, type Operation, OracleStaleError, type OrderlyRelayDepositRequest, PAFI_SERVICE_URLS, PAFI_SUBGRAPH_URL, PERMIT2_ADDRESS, POINT_TOKEN_FACTORY_ADDRESSES, POINT_TOKEN_IMPL_ADDRESSES, POINT_TOKEN_POOLS, type PackedUserOperationMessage, type PafiErrorType, type PafiProxyTransportParams, PafiSDK, PafiSDKConfig, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, QUOTER_V2_ADDRESSES, type QuoteOperatorFeeForTransferConfig, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig, SCENARIO_GAS_UNITS, SDK_ERROR_HTTP_STATUS_CODE, SIMPLE_7702_IMPL_BASE_MAINNET, SUPPORTED_CHAINS, type SdkErrorHttpStatus, type SendWithPaymasterFallbackParams, type SignAuthorizationFn, type SignatureStruct, SignatureVerification, SignatureVerifyOptions, type SignedAuthorization, SigningError, SimulationError, type SmartAccountSender, type SponsorshipScenario, type SubmissionPath, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, type UserOpReceipt, type UserOpTypedData, type UserOperation, V3Path, V3_FACTORY_ADDRESSES, V3_POOL_INIT_CODE_HASH, V3_SWAP_ROUTER_ADDRESSES, ValidationError, type VaultDepositFE, ZERO_VALUE, assembleUserOperation, buildDelegationUserOp, buildEip7702Authorization, buildErc20TransferUserOp, buildPartialUserOperation, buildPerpDepositViaRelay, buildPerpDepositWithGasDeduction, buildUserOpTypedData, burnRequestTypes, checkDelegation, checkEthAndBranch, computeAccountId, computeAuthorizationHash, computeUserOpHash, computeV3PoolAddress, createPafiProxyTransport, decodeBatchExecuteCalls, defaultErrorTypeForStatus, delegateDirect, detectDelegateImpl, encodeBatchExecute, encodeV3Path, encodeV3PathReversed, erc20ApproveOp, erc20BurnOp, erc20TransferOp, fetchPafiPools, getAaNonce, getContractAddresses, getDummySignatureFor7702, getPafiServiceUrls, getPafiWebModalAdapter, isDelegatedTo, isDelegatedToTarget, isPaymasterError, mintRequestTypes, openPafiWebModal, openWebPopup, parseEip7702DelegatedAddress, quoteOperatorFeeForTransfer, quoteOperatorFeePt, quoteOperatorFeeUsdt, rawCallOp, sendWithPaymasterFallback, serializeUserOpToJsonRpc, setPafiWebModalAdapter, splitAuthorizationSig, webPopupAdapter };
2734
+ export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, type BuildErc20TransferParams, type BuildPartialUserOpParams, type BuildPerpDepositViaRelayParams, type BuildPerpDepositWithGasDeductionParams, COMMON_POOLS, COMMON_TOKENS, CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, DUMMY_SIGNATURE_V07, type DelegateDirectParams, type DelegateDirectResult, type DelegateImpl, EIP712Signature, ENTRY_POINT_V07, ENTRY_POINT_V08, type Eip7702AuthorizationJsonRpc, type FallbackInfo, type FeeScenario, LoginMessageParams, MintRequest, type ModalOpenOptions, ORDERLY_RELAY_ABI, ORDERLY_VAULT_ABI, ORDERLY_VAULT_ADDRESSES, ORDERLY_VAULT_BASE_MAINNET, type Operation, OracleStaleError, type OrderlyRelayDepositRequest, PAFI_SERVICE_URLS, PAFI_SUBGRAPH_URL, PERMIT2_ADDRESS, POINT_TOKEN_ABI, POINT_TOKEN_BEACON_ADDRESSES, POINT_TOKEN_BURN_SIG_ABI, POINT_TOKEN_FACTORY_ADDRESSES, POINT_TOKEN_IMPL_ADDRESSES, POINT_TOKEN_MINT_SIG_ABI, POINT_TOKEN_POOLS, type PackedUserOperationMessage, type PafiErrorType, type PafiProxyTransportParams, PafiSDK, PafiSDKConfig, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, QUOTER_V2_ADDRESSES, type QuoteOperatorFeeForTransferConfig, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig, SCENARIO_GAS_UNITS, SDK_ERROR_HTTP_STATUS_CODE, SIMPLE_7702_IMPL_BASE_MAINNET, SUPPORTED_CHAINS, type SdkErrorHttpStatus, type SendWithPaymasterFallbackParams, type SignAuthorizationFn, type SignatureStruct, SignatureVerification, SignatureVerifyOptions, type SignedAuthorization, SigningError, SimulationError, type SmartAccountSender, type SponsorshipScenario, type SubmissionPath, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, type UserOpReceipt, type UserOpTypedData, type UserOperation, V3Path, V3_FACTORY_ADDRESSES, V3_POOL_INIT_CODE_HASH, V3_SWAP_ROUTER_ADDRESSES, VAULT_BEACON_ADDRESSES, ValidationError, type VaultDepositFE, ZERO_VALUE, assembleUserOperation, buildDelegationUserOp, buildEip7702Authorization, buildErc20TransferUserOp, buildPartialUserOperation, buildPerpDepositViaRelay, buildPerpDepositWithGasDeduction, buildUserOpTypedData, burnRequestTypes, checkDelegation, checkEthAndBranch, computeAccountId, computeAuthorizationHash, computeUserOpHash, computeV3PoolAddress, createPafiProxyTransport, decodeBatchExecuteCalls, defaultErrorTypeForStatus, delegateDirect, detectDelegateImpl, encodeBatchExecute, encodeV3Path, encodeV3PathReversed, erc20ApproveOp, erc20BurnOp, erc20TransferOp, fetchPafiPools, getAaNonce, getContractAddresses, getDummySignatureFor7702, getPafiServiceUrls, getPafiWebModalAdapter, isDelegatedTo, isDelegatedToTarget, isPaymasterError, mintRequestTypes, openPafiWebModal, openWebPopup, parseEip7702DelegatedAddress, quoteOperatorFeeForTransfer, quoteOperatorFeePt, quoteOperatorFeeUsdt, rawCallOp, sendWithPaymasterFallback, serializeUserOpToJsonRpc, setPafiWebModalAdapter, splitAuthorizationSig, webPopupAdapter };