@pafi-dev/core 0.3.0-beta.0 → 0.3.0-beta.10

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 (87) hide show
  1. package/dist/abi/index.cjs +2 -6
  2. package/dist/abi/index.cjs.map +1 -1
  3. package/dist/abi/index.d.cts +1 -286
  4. package/dist/abi/index.d.ts +1 -286
  5. package/dist/abi/index.js +1 -5
  6. package/dist/{chunk-R4L66ZR5.js → chunk-73CQTNLB.js} +10 -1
  7. package/dist/chunk-73CQTNLB.js.map +1 -0
  8. package/dist/{chunk-5YH4D7QF.js → chunk-7UBO7DY5.js} +1 -1
  9. package/dist/{chunk-FGKLDKJK.cjs → chunk-ALCWYDVG.cjs} +1 -1
  10. package/dist/{chunk-FGKLDKJK.cjs.map → chunk-ALCWYDVG.cjs.map} +1 -1
  11. package/dist/{chunk-X3I5XWAR.cjs → chunk-CQCSQPWG.cjs} +2 -15
  12. package/dist/chunk-CQCSQPWG.cjs.map +1 -0
  13. package/dist/{chunk-CWP4PFOP.cjs → chunk-DMW67WBU.cjs} +11 -2
  14. package/dist/chunk-DMW67WBU.cjs.map +1 -0
  15. package/dist/{chunk-C4ZDYG4D.js → chunk-DUY7Z2AI.js} +48 -6
  16. package/dist/chunk-DUY7Z2AI.js.map +1 -0
  17. package/dist/chunk-EDR5SFJN.cjs +351 -0
  18. package/dist/chunk-EDR5SFJN.cjs.map +1 -0
  19. package/dist/{chunk-FIKTQR7H.js → chunk-I2P3TIP7.js} +2 -2
  20. package/dist/{chunk-BNTVOKYT.cjs → chunk-KJKDLD7N.cjs} +51 -9
  21. package/dist/chunk-KJKDLD7N.cjs.map +1 -0
  22. package/dist/{chunk-VQSRCMMK.js → chunk-QGO6X6LG.js} +2 -15
  23. package/dist/chunk-QGO6X6LG.js.map +1 -0
  24. package/dist/chunk-W23EJNYG.js +351 -0
  25. package/dist/chunk-W23EJNYG.js.map +1 -0
  26. package/dist/{chunk-CAE2BVKI.cjs → chunk-Z2V525IS.cjs} +6 -6
  27. package/dist/{chunk-CAE2BVKI.cjs.map → chunk-Z2V525IS.cjs.map} +1 -1
  28. package/dist/contract/index.cjs +2 -5
  29. package/dist/contract/index.cjs.map +1 -1
  30. package/dist/contract/index.d.cts +2 -4
  31. package/dist/contract/index.d.ts +2 -4
  32. package/dist/contract/index.js +1 -4
  33. package/dist/eip712/index.cjs +9 -3
  34. package/dist/eip712/index.cjs.map +1 -1
  35. package/dist/eip712/index.d.cts +44 -2
  36. package/dist/eip712/index.d.ts +44 -2
  37. package/dist/eip712/index.js +8 -2
  38. package/dist/index-B06IJlHe.d.ts +244 -0
  39. package/dist/index-B7pGBych.d.cts +244 -0
  40. package/dist/index.cjs +365 -329
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +778 -459
  43. package/dist/index.d.ts +778 -459
  44. package/dist/index.js +383 -347
  45. package/dist/index.js.map +1 -1
  46. package/dist/quoting/index.cjs +3 -3
  47. package/dist/quoting/index.d.cts +1 -1
  48. package/dist/quoting/index.d.ts +1 -1
  49. package/dist/quoting/index.js +2 -2
  50. package/dist/swap/index.cjs +4 -3
  51. package/dist/swap/index.cjs.map +1 -1
  52. package/dist/swap/index.d.cts +3 -84
  53. package/dist/swap/index.d.ts +3 -84
  54. package/dist/swap/index.js +3 -2
  55. package/dist/{types-BDOnH5Le.d.ts → types-b5_Tokjl.d.cts} +8 -17
  56. package/dist/{types-BDOnH5Le.d.cts → types-b5_Tokjl.d.ts} +8 -17
  57. package/package.json +1 -1
  58. package/dist/chunk-27V32VNM.cjs +0 -370
  59. package/dist/chunk-27V32VNM.cjs.map +0 -1
  60. package/dist/chunk-4RYBJLF3.js +0 -370
  61. package/dist/chunk-4RYBJLF3.js.map +0 -1
  62. package/dist/chunk-5QJZT7VB.cjs +0 -46
  63. package/dist/chunk-5QJZT7VB.cjs.map +0 -1
  64. package/dist/chunk-6I6K43RQ.cjs +0 -149
  65. package/dist/chunk-6I6K43RQ.cjs.map +0 -1
  66. package/dist/chunk-BNTVOKYT.cjs.map +0 -1
  67. package/dist/chunk-C4ZDYG4D.js.map +0 -1
  68. package/dist/chunk-CWP4PFOP.cjs.map +0 -1
  69. package/dist/chunk-L74CZAVQ.cjs +0 -99
  70. package/dist/chunk-L74CZAVQ.cjs.map +0 -1
  71. package/dist/chunk-P56TUGTS.js +0 -46
  72. package/dist/chunk-P56TUGTS.js.map +0 -1
  73. package/dist/chunk-R4L66ZR5.js.map +0 -1
  74. package/dist/chunk-UU72CX7E.js +0 -149
  75. package/dist/chunk-UU72CX7E.js.map +0 -1
  76. package/dist/chunk-VQSRCMMK.js.map +0 -1
  77. package/dist/chunk-X3I5XWAR.cjs.map +0 -1
  78. package/dist/chunk-X4IXUTTD.js +0 -99
  79. package/dist/chunk-X4IXUTTD.js.map +0 -1
  80. package/dist/relay/index.cjs +0 -19
  81. package/dist/relay/index.cjs.map +0 -1
  82. package/dist/relay/index.d.cts +0 -75
  83. package/dist/relay/index.d.ts +0 -75
  84. package/dist/relay/index.js +0 -19
  85. package/dist/relay/index.js.map +0 -1
  86. /package/dist/{chunk-5YH4D7QF.js.map → chunk-7UBO7DY5.js.map} +0 -0
  87. /package/dist/{chunk-FIKTQR7H.js.map → chunk-I2P3TIP7.js.map} +0 -0
@@ -1,75 +0,0 @@
1
- import { Hex, PublicClient, Address } from 'viem';
2
- import { e as PathKey, d as SwapParams, c as MintParams } from '../types-BDOnH5Le.js';
3
-
4
- /**
5
- * Encode extData for ReceiverConsent and MintParams.
6
- * extData = abi.encode(uint256 minAmountOut, uint256 feeInUsdt)
7
- */
8
- declare function encodeExtData(minAmountOut: bigint, feeInUsdt: bigint): Hex;
9
- /**
10
- * Decode extData back to { minAmountOut, feeInUsdt }.
11
- */
12
- declare function decodeExtData(extData: Hex): {
13
- minAmountOut: bigint;
14
- feeInUsdt: bigint;
15
- };
16
- /**
17
- * Build SwapParams and extData from a quote result for Relay.mintAndSwap.
18
- *
19
- * @param quote - Quote result containing the path
20
- * @param minAmountOut - Minimum acceptable USDT output (caller applies slippage)
21
- * @param feeInUsdt - Fixed USDT fee for the relayer
22
- * @param deadline - Swap deadline (unix timestamp)
23
- *
24
- * @deprecated Since v1.4 — the `claimAndSwap` flow is retired. The
25
- * Issuer App now performs mint-only claims; swaps happen on PAFI Web.
26
- * For PT→USDT swap batch calls on PAFI Web, use
27
- * `buildSwapWithGasDeduction()` (v1.5). This helper is kept for legacy
28
- * consumers still on v0.2.x and will be removed in v2.0.
29
- */
30
- declare function buildRelaySwapParams(params: {
31
- quote: {
32
- path: PathKey[];
33
- };
34
- minAmountOut: bigint;
35
- feeInUsdt: bigint;
36
- deadline: bigint;
37
- }): {
38
- swapParams: SwapParams;
39
- extData: Hex;
40
- };
41
- /**
42
- * Encode calldata for the legacy `Relayer.mintAndSwap()` function.
43
- *
44
- * @deprecated Since v1.4 — the `claimAndSwap` flow is retired. Use
45
- * `Relayer.mint()` instead (via `@pafi-dev/issuer` RelayService in v1.4).
46
- * Kept for legacy v0.2.x consumers; will be removed in v2.0.
47
- */
48
- declare function encodeMintAndSwap(mint: MintParams, swap: SwapParams): Hex;
49
- declare function decodeMintAndSwap(calldata: Hex): {
50
- mint: MintParams;
51
- swap: SwapParams;
52
- };
53
-
54
- interface SimulationResult {
55
- success: boolean;
56
- gasEstimate: bigint;
57
- }
58
- /**
59
- * Simulate a Relay.mintAndSwap call via eth_call (no gas spent).
60
- *
61
- * Runs the full flow — signature verification, minting, swap via PoolManager,
62
- * fee split — without submitting a transaction. If the simulation reverts,
63
- * throws a `SimulationError` with the revert reason.
64
- *
65
- * Call this AFTER both signatures are collected but BEFORE submitting the tx.
66
- *
67
- * @param client - viem PublicClient
68
- * @param relayAddress - Relay contract address
69
- * @param mint - MintParams (with real minterSig + receiverSig)
70
- * @param swap - SwapParams (path + deadline)
71
- * @param from - Address that will call mintAndSwap (the relayer)
72
- */
73
- declare function simulateMintAndSwap(client: PublicClient, relayAddress: Address, mint: MintParams, swap: SwapParams, from: Address): Promise<SimulationResult>;
74
-
75
- export { type SimulationResult, buildRelaySwapParams, decodeExtData, decodeMintAndSwap, encodeExtData, encodeMintAndSwap, simulateMintAndSwap };
@@ -1,19 +0,0 @@
1
- import {
2
- buildRelaySwapParams,
3
- decodeExtData,
4
- decodeMintAndSwap,
5
- encodeExtData,
6
- encodeMintAndSwap,
7
- simulateMintAndSwap
8
- } from "../chunk-X4IXUTTD.js";
9
- import "../chunk-4RYBJLF3.js";
10
- import "../chunk-P56TUGTS.js";
11
- export {
12
- buildRelaySwapParams,
13
- decodeExtData,
14
- decodeMintAndSwap,
15
- encodeExtData,
16
- encodeMintAndSwap,
17
- simulateMintAndSwap
18
- };
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}