@pafi-dev/core 0.8.0 → 0.9.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.
- package/dist/abi/index.cjs +4 -4
- package/dist/abi/index.d.cts +588 -107
- package/dist/abi/index.d.ts +588 -107
- package/dist/abi/index.js +3 -3
- package/dist/{chunk-JEWSN7Q3.cjs → chunk-57KR35JW.cjs} +474 -72
- package/dist/chunk-57KR35JW.cjs.map +1 -0
- package/dist/{chunk-B2NDSIAI.js → chunk-FHFZ2F34.js} +474 -72
- package/dist/chunk-FHFZ2F34.js.map +1 -0
- package/dist/{chunk-RFANYF24.cjs → chunk-G7NS4TS3.cjs} +615 -198
- package/dist/chunk-G7NS4TS3.cjs.map +1 -0
- package/dist/{chunk-YCY7MBSJ.cjs → chunk-JH6XFHES.cjs} +15 -15
- package/dist/chunk-JH6XFHES.cjs.map +1 -0
- package/dist/{chunk-ABNM6LMP.js → chunk-JWZTY5UL.js} +615 -198
- package/dist/chunk-JWZTY5UL.js.map +1 -0
- package/dist/chunk-KRHGFUDI.cjs +1155 -0
- package/dist/chunk-KRHGFUDI.cjs.map +1 -0
- package/dist/{chunk-Y4CFC4OC.js → chunk-PWQWNHGI.js} +5 -5
- package/dist/{chunk-Y4CFC4OC.js.map → chunk-PWQWNHGI.js.map} +1 -1
- package/dist/chunk-UCO5DXD6.js +1155 -0
- package/dist/chunk-UCO5DXD6.js.map +1 -0
- package/dist/{chunk-ACQHZWHP.cjs → chunk-UTG2UT54.cjs} +10 -8
- package/dist/chunk-UTG2UT54.cjs.map +1 -0
- package/dist/{chunk-BB5YW57R.js → chunk-XNVVZVK6.js} +9 -7
- package/dist/chunk-XNVVZVK6.js.map +1 -0
- package/dist/contract/index.cjs +4 -4
- package/dist/contract/index.d.cts +7 -2
- package/dist/contract/index.d.ts +7 -2
- package/dist/contract/index.js +3 -3
- package/dist/eip712/index.cjs +3 -3
- package/dist/eip712/index.d.cts +16 -5
- package/dist/eip712/index.d.ts +16 -5
- package/dist/eip712/index.js +2 -2
- package/dist/index.cjs +40 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -23
- package/dist/index.d.ts +51 -23
- package/dist/index.js +28 -30
- package/dist/index.js.map +1 -1
- package/dist/{types-BS4kpO4Z.d.ts → types-DWLZNgcw.d.cts} +37 -10
- package/dist/{types-BS4kpO4Z.d.cts → types-DWLZNgcw.d.ts} +37 -10
- package/package.json +1 -1
- package/dist/chunk-644KZUKR.cjs +0 -519
- package/dist/chunk-644KZUKR.cjs.map +0 -1
- package/dist/chunk-ABNM6LMP.js.map +0 -1
- package/dist/chunk-ACQHZWHP.cjs.map +0 -1
- package/dist/chunk-B2NDSIAI.js.map +0 -1
- package/dist/chunk-BB5YW57R.js.map +0 -1
- package/dist/chunk-CUVUSVWR.js +0 -519
- package/dist/chunk-CUVUSVWR.js.map +0 -1
- package/dist/chunk-JEWSN7Q3.cjs.map +0 -1
- package/dist/chunk-RFANYF24.cjs.map +0 -1
- package/dist/chunk-YCY7MBSJ.cjs.map +0 -1
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Address, Hex, WalletClient, PublicClient } from 'viem';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* MintForRequest(address user,address receiver,uint256 amount,uint256 nonce,uint256 deadline)
|
|
5
|
+
*
|
|
6
|
+
* v1.6 contract typehash. Two new fields vs v1.5:
|
|
7
|
+
* `user` — off-chain spender; PointToken increments mintRequestNonces[user]
|
|
8
|
+
* `receiver` — on-chain caller of PointToken.mint; required `msg.sender == receiver`
|
|
9
|
+
*
|
|
10
|
+
* Direct user mint: user == receiver == EOA
|
|
11
|
+
* Wrapper-mediated: user = end-user, receiver = MintFeeWrapper address
|
|
12
|
+
*/
|
|
4
13
|
interface MintRequest {
|
|
5
|
-
|
|
14
|
+
user: Address;
|
|
15
|
+
receiver: Address;
|
|
6
16
|
amount: bigint;
|
|
7
17
|
nonce: bigint;
|
|
8
18
|
deadline: bigint;
|
|
@@ -47,18 +57,26 @@ interface SignatureVerification {
|
|
|
47
57
|
recoveredAddress: Address;
|
|
48
58
|
}
|
|
49
59
|
/** Auto-generated from Solidity struct — do not edit */
|
|
60
|
+
interface Recipient {
|
|
61
|
+
account: Address;
|
|
62
|
+
basisPoints: number;
|
|
63
|
+
}
|
|
64
|
+
/** Auto-generated from Solidity struct — do not edit */
|
|
50
65
|
interface Issuer {
|
|
51
66
|
issuerAddress: Address;
|
|
52
67
|
signerAddress: Address;
|
|
53
68
|
name: string;
|
|
54
69
|
symbol: string;
|
|
55
|
-
declaredTotalSupply: bigint;
|
|
56
|
-
capBasisPoints: number;
|
|
57
70
|
active: boolean;
|
|
58
71
|
pointToken: Address;
|
|
59
72
|
mintingOracle: Address;
|
|
60
73
|
}
|
|
61
74
|
/** Auto-generated from Solidity struct — do not edit */
|
|
75
|
+
interface TokenCap {
|
|
76
|
+
declaredTotalSupply: bigint;
|
|
77
|
+
capBasisPoints: number;
|
|
78
|
+
}
|
|
79
|
+
/** Auto-generated from Solidity struct — do not edit */
|
|
62
80
|
interface PoolKey {
|
|
63
81
|
currency0: Address;
|
|
64
82
|
currency1: Address;
|
|
@@ -66,11 +84,6 @@ interface PoolKey {
|
|
|
66
84
|
tickSpacing: number;
|
|
67
85
|
hooks: Address;
|
|
68
86
|
}
|
|
69
|
-
/** Auto-generated from Solidity struct — do not edit. Used by MintFeeWrapper.{getRecipients, setRecipients, RecipientsUpdated event}. */
|
|
70
|
-
interface Recipient {
|
|
71
|
-
account: Address;
|
|
72
|
-
basisPoints: number;
|
|
73
|
-
}
|
|
74
87
|
/**
|
|
75
88
|
* Uniswap V4 PathKey — one hop in a multi-hop swap route. Same `fee`
|
|
76
89
|
* + `tickSpacing` typing constraints as `PoolKey`.
|
|
@@ -95,6 +108,20 @@ interface BestQuote {
|
|
|
95
108
|
bestRoute: QuoteResult;
|
|
96
109
|
allRoutes: QuoteResult[];
|
|
97
110
|
}
|
|
111
|
+
interface ExactOutputQuoteResult {
|
|
112
|
+
/** Input amount required to receive `exactAmount` of the output token. */
|
|
113
|
+
amountIn: bigint;
|
|
114
|
+
gasEstimate: bigint;
|
|
115
|
+
/**
|
|
116
|
+
* V4 PathKey[] traversed output→input for exact-out quoting (each
|
|
117
|
+
* `path[i].intermediateCurrency` is the previous currency in the route).
|
|
118
|
+
*/
|
|
119
|
+
path: PathKey[];
|
|
120
|
+
}
|
|
121
|
+
interface ExactOutputBestQuote {
|
|
122
|
+
bestRoute: ExactOutputQuoteResult;
|
|
123
|
+
allRoutes: ExactOutputQuoteResult[];
|
|
124
|
+
}
|
|
98
125
|
interface PafiSDKConfig {
|
|
99
126
|
pointTokenAddress?: Address;
|
|
100
127
|
signer?: WalletClient;
|
|
@@ -153,4 +180,4 @@ interface RedemptionDecision {
|
|
|
153
180
|
preview: RedemptionPreview;
|
|
154
181
|
}
|
|
155
182
|
|
|
156
|
-
export type { BestQuote as B, ChainConfig as C, EIP712Signature as E, Issuer as I, MintRequest as M, PoolKey as P, QuoteResult as Q, ReceiverConsent as R, SignatureVerification as S, PafiSDKConfig as a, PointTokenDomainConfig as b, BlackoutWindow as c, BurnRequest as d,
|
|
183
|
+
export type { BestQuote as B, ChainConfig as C, EIP712Signature as E, Issuer as I, MintRequest as M, PoolKey as P, QuoteResult as Q, ReceiverConsent as R, SignatureVerification as S, TokenCap as T, PafiSDKConfig as a, PointTokenDomainConfig as b, BlackoutWindow as c, BurnRequest as d, ExactOutputBestQuote as e, ExactOutputQuoteResult as f, PathKey as g, Recipient as h, RedemptionDecision as i, RedemptionDenial as j, RedemptionDenialCode as k, RedemptionPolicy as l, RedemptionPolicySource as m, RedemptionPreview as n };
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Address, Hex, WalletClient, PublicClient } from 'viem';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* MintForRequest(address user,address receiver,uint256 amount,uint256 nonce,uint256 deadline)
|
|
5
|
+
*
|
|
6
|
+
* v1.6 contract typehash. Two new fields vs v1.5:
|
|
7
|
+
* `user` — off-chain spender; PointToken increments mintRequestNonces[user]
|
|
8
|
+
* `receiver` — on-chain caller of PointToken.mint; required `msg.sender == receiver`
|
|
9
|
+
*
|
|
10
|
+
* Direct user mint: user == receiver == EOA
|
|
11
|
+
* Wrapper-mediated: user = end-user, receiver = MintFeeWrapper address
|
|
12
|
+
*/
|
|
4
13
|
interface MintRequest {
|
|
5
|
-
|
|
14
|
+
user: Address;
|
|
15
|
+
receiver: Address;
|
|
6
16
|
amount: bigint;
|
|
7
17
|
nonce: bigint;
|
|
8
18
|
deadline: bigint;
|
|
@@ -47,18 +57,26 @@ interface SignatureVerification {
|
|
|
47
57
|
recoveredAddress: Address;
|
|
48
58
|
}
|
|
49
59
|
/** Auto-generated from Solidity struct — do not edit */
|
|
60
|
+
interface Recipient {
|
|
61
|
+
account: Address;
|
|
62
|
+
basisPoints: number;
|
|
63
|
+
}
|
|
64
|
+
/** Auto-generated from Solidity struct — do not edit */
|
|
50
65
|
interface Issuer {
|
|
51
66
|
issuerAddress: Address;
|
|
52
67
|
signerAddress: Address;
|
|
53
68
|
name: string;
|
|
54
69
|
symbol: string;
|
|
55
|
-
declaredTotalSupply: bigint;
|
|
56
|
-
capBasisPoints: number;
|
|
57
70
|
active: boolean;
|
|
58
71
|
pointToken: Address;
|
|
59
72
|
mintingOracle: Address;
|
|
60
73
|
}
|
|
61
74
|
/** Auto-generated from Solidity struct — do not edit */
|
|
75
|
+
interface TokenCap {
|
|
76
|
+
declaredTotalSupply: bigint;
|
|
77
|
+
capBasisPoints: number;
|
|
78
|
+
}
|
|
79
|
+
/** Auto-generated from Solidity struct — do not edit */
|
|
62
80
|
interface PoolKey {
|
|
63
81
|
currency0: Address;
|
|
64
82
|
currency1: Address;
|
|
@@ -66,11 +84,6 @@ interface PoolKey {
|
|
|
66
84
|
tickSpacing: number;
|
|
67
85
|
hooks: Address;
|
|
68
86
|
}
|
|
69
|
-
/** Auto-generated from Solidity struct — do not edit. Used by MintFeeWrapper.{getRecipients, setRecipients, RecipientsUpdated event}. */
|
|
70
|
-
interface Recipient {
|
|
71
|
-
account: Address;
|
|
72
|
-
basisPoints: number;
|
|
73
|
-
}
|
|
74
87
|
/**
|
|
75
88
|
* Uniswap V4 PathKey — one hop in a multi-hop swap route. Same `fee`
|
|
76
89
|
* + `tickSpacing` typing constraints as `PoolKey`.
|
|
@@ -95,6 +108,20 @@ interface BestQuote {
|
|
|
95
108
|
bestRoute: QuoteResult;
|
|
96
109
|
allRoutes: QuoteResult[];
|
|
97
110
|
}
|
|
111
|
+
interface ExactOutputQuoteResult {
|
|
112
|
+
/** Input amount required to receive `exactAmount` of the output token. */
|
|
113
|
+
amountIn: bigint;
|
|
114
|
+
gasEstimate: bigint;
|
|
115
|
+
/**
|
|
116
|
+
* V4 PathKey[] traversed output→input for exact-out quoting (each
|
|
117
|
+
* `path[i].intermediateCurrency` is the previous currency in the route).
|
|
118
|
+
*/
|
|
119
|
+
path: PathKey[];
|
|
120
|
+
}
|
|
121
|
+
interface ExactOutputBestQuote {
|
|
122
|
+
bestRoute: ExactOutputQuoteResult;
|
|
123
|
+
allRoutes: ExactOutputQuoteResult[];
|
|
124
|
+
}
|
|
98
125
|
interface PafiSDKConfig {
|
|
99
126
|
pointTokenAddress?: Address;
|
|
100
127
|
signer?: WalletClient;
|
|
@@ -153,4 +180,4 @@ interface RedemptionDecision {
|
|
|
153
180
|
preview: RedemptionPreview;
|
|
154
181
|
}
|
|
155
182
|
|
|
156
|
-
export type { BestQuote as B, ChainConfig as C, EIP712Signature as E, Issuer as I, MintRequest as M, PoolKey as P, QuoteResult as Q, ReceiverConsent as R, SignatureVerification as S, PafiSDKConfig as a, PointTokenDomainConfig as b, BlackoutWindow as c, BurnRequest as d,
|
|
183
|
+
export type { BestQuote as B, ChainConfig as C, EIP712Signature as E, Issuer as I, MintRequest as M, PoolKey as P, QuoteResult as Q, ReceiverConsent as R, SignatureVerification as S, TokenCap as T, PafiSDKConfig as a, PointTokenDomainConfig as b, BlackoutWindow as c, BurnRequest as d, ExactOutputBestQuote as e, ExactOutputQuoteResult as f, PathKey as g, Recipient as h, RedemptionDecision as i, RedemptionDenial as j, RedemptionDenialCode as k, RedemptionPolicy as l, RedemptionPolicySource as m, RedemptionPreview as n };
|