@pafi-dev/core 0.8.0 → 0.9.0
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 +17 -17
- package/dist/index.d.cts +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.js +5 -5
- 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
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkG7NS4TS3cjs = require('./chunk-G7NS4TS3.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -35,11 +35,11 @@ var _chunk75JWR5SAcjs = require('./chunk-75JWR5SA.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkJH6XFHEScjs = require('./chunk-JH6XFHES.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunk57KR35JWcjs = require('./chunk-57KR35JW.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
@@ -65,10 +65,10 @@ var _chunkJEWSN7Q3cjs = require('./chunk-JEWSN7Q3.cjs');
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
var
|
|
68
|
+
var _chunkUTG2UT54cjs = require('./chunk-UTG2UT54.cjs');
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var _chunkKRHGFUDIcjs = require('./chunk-KRHGFUDI.cjs');
|
|
72
72
|
require('./chunk-JEQ2X3Z6.cjs');
|
|
73
73
|
|
|
74
74
|
// src/index.ts
|
|
@@ -586,7 +586,7 @@ function buildUserOpTypedData(userOp, chainId) {
|
|
|
586
586
|
name: "ERC4337",
|
|
587
587
|
version: "1",
|
|
588
588
|
chainId,
|
|
589
|
-
verifyingContract:
|
|
589
|
+
verifyingContract: _chunkUTG2UT54cjs.ENTRY_POINT_V08
|
|
590
590
|
},
|
|
591
591
|
types: PACKED_USER_OPERATION_TYPES,
|
|
592
592
|
primaryType: "PackedUserOperation",
|
|
@@ -737,7 +737,7 @@ async function getAaNonce(client, userAddress) {
|
|
|
737
737
|
}
|
|
738
738
|
];
|
|
739
739
|
return client.readContract({
|
|
740
|
-
address:
|
|
740
|
+
address: _chunkUTG2UT54cjs.ENTRY_POINT_V08,
|
|
741
741
|
abi: NONCE_ABI,
|
|
742
742
|
functionName: "getNonce",
|
|
743
743
|
args: [userAddress, 0n]
|
|
@@ -1484,7 +1484,7 @@ var PafiSDK = class {
|
|
|
1484
1484
|
const provider = this.requireProvider();
|
|
1485
1485
|
const pointToken = this.requirePointToken();
|
|
1486
1486
|
const chainId = this.requireChainId();
|
|
1487
|
-
const name = await
|
|
1487
|
+
const name = await _chunkJH6XFHEScjs.getTokenName.call(void 0, provider, pointToken);
|
|
1488
1488
|
return { name, verifyingContract: pointToken, chainId };
|
|
1489
1489
|
}
|
|
1490
1490
|
// -------------------------------------------------------------------------
|
|
@@ -1492,40 +1492,40 @@ var PafiSDK = class {
|
|
|
1492
1492
|
// -------------------------------------------------------------------------
|
|
1493
1493
|
async buildMintRequestTypedData(message) {
|
|
1494
1494
|
const domain = await this.getDomain();
|
|
1495
|
-
return
|
|
1495
|
+
return _chunkUTG2UT54cjs.buildMintRequestTypedData.call(void 0, domain, message);
|
|
1496
1496
|
}
|
|
1497
1497
|
async buildReceiverConsentTypedData(message) {
|
|
1498
1498
|
const domain = await this.getDomain();
|
|
1499
|
-
return
|
|
1499
|
+
return _chunkUTG2UT54cjs.buildReceiverConsentTypedData.call(void 0, domain, message);
|
|
1500
1500
|
}
|
|
1501
1501
|
async signMintRequest(message) {
|
|
1502
1502
|
const domain = await this.getDomain();
|
|
1503
|
-
return
|
|
1503
|
+
return _chunkUTG2UT54cjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
|
|
1504
1504
|
}
|
|
1505
1505
|
async verifyMintRequest(message, signature, expectedMinter) {
|
|
1506
1506
|
const domain = await this.getDomain();
|
|
1507
|
-
return
|
|
1507
|
+
return _chunkUTG2UT54cjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
|
|
1508
1508
|
}
|
|
1509
1509
|
async signReceiverConsent(message) {
|
|
1510
1510
|
const domain = await this.getDomain();
|
|
1511
|
-
return
|
|
1511
|
+
return _chunkUTG2UT54cjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
|
|
1512
1512
|
}
|
|
1513
1513
|
async verifyReceiverConsent(message, signature, expectedReceiver) {
|
|
1514
1514
|
const domain = await this.getDomain();
|
|
1515
|
-
return
|
|
1515
|
+
return _chunkUTG2UT54cjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
|
|
1516
1516
|
}
|
|
1517
1517
|
// -------------------------------------------------------------------------
|
|
1518
1518
|
// Contract reads
|
|
1519
1519
|
// -------------------------------------------------------------------------
|
|
1520
1520
|
async getMintRequestNonce(receiver) {
|
|
1521
|
-
return
|
|
1521
|
+
return _chunkJH6XFHEScjs.getMintRequestNonce.call(void 0,
|
|
1522
1522
|
this.requireProvider(),
|
|
1523
1523
|
this.requirePointToken(),
|
|
1524
1524
|
receiver
|
|
1525
1525
|
);
|
|
1526
1526
|
}
|
|
1527
1527
|
async getReceiverConsentNonce(receiver) {
|
|
1528
|
-
return
|
|
1528
|
+
return _chunkJH6XFHEScjs.getReceiverConsentNonce.call(void 0,
|
|
1529
1529
|
this.requireProvider(),
|
|
1530
1530
|
this.requirePointToken(),
|
|
1531
1531
|
receiver
|
|
@@ -1687,5 +1687,5 @@ var PafiSDK = class {
|
|
|
1687
1687
|
|
|
1688
1688
|
|
|
1689
1689
|
|
|
1690
|
-
exports.ApiError = ApiError; exports.BATCH_EXECUTOR_7702_IMPL = BATCH_EXECUTOR_7702_IMPL; exports.BATCH_EXECUTOR_ABI = BATCH_EXECUTOR_ABI; exports.BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = BATCH_EXECUTOR_ADDRESS_BASE_MAINNET; exports.BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA; exports.BROKER_HASHES = BROKER_HASHES; exports.COMMON_POOLS =
|
|
1690
|
+
exports.ApiError = ApiError; exports.BATCH_EXECUTOR_7702_IMPL = BATCH_EXECUTOR_7702_IMPL; exports.BATCH_EXECUTOR_ABI = BATCH_EXECUTOR_ABI; exports.BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = BATCH_EXECUTOR_ADDRESS_BASE_MAINNET; exports.BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA; exports.BROKER_HASHES = BROKER_HASHES; exports.COMMON_POOLS = _chunkUTG2UT54cjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunkUTG2UT54cjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunkUTG2UT54cjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunkUTG2UT54cjs.ENTRY_POINT_V08; exports.Eip712DomainMismatchError = _chunkUTG2UT54cjs.Eip712DomainMismatchError; exports.ORDERLY_RELAY_ABI = ORDERLY_RELAY_ABI; exports.ORDERLY_VAULT_ABI = ORDERLY_VAULT_ABI; exports.ORDERLY_VAULT_ADDRESSES = ORDERLY_VAULT_ADDRESSES; exports.ORDERLY_VAULT_BASE_MAINNET = ORDERLY_VAULT_BASE_MAINNET; exports.OracleStaleError = OracleStaleError; exports.PAFI_SERVICE_URLS = PAFI_SERVICE_URLS; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunkUTG2UT54cjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunkUTG2UT54cjs.POINT_TOKEN_POOLS; exports.POINT_TOKEN_V2_ABI = _chunkKRHGFUDIcjs.pointTokenAbi; exports.PafiSDK = PafiSDK; exports.PafiSDKError = PafiSDKError; exports.PafiSdkError = PafiSdkError; exports.SDK_ERROR_HTTP_STATUS_CODE = SDK_ERROR_HTTP_STATUS_CODE; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunk75JWR5SAcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunkUTG2UT54cjs.SUPPORTED_CHAINS; exports.SigningError = SigningError; exports.SimulationError = SimulationError; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunkUTG2UT54cjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V4_QUOTER_ADDRESSES = _chunkUTG2UT54cjs.V4_QUOTER_ADDRESSES; exports.ValidationError = ValidationError; exports.ZERO_VALUE = ZERO_VALUE; exports._resetPaymasterConfigForTests = _resetPaymasterConfigForTests; exports.assembleUserOperation = assembleUserOperation; exports.assertDomainMatchesContract = _chunkUTG2UT54cjs.assertDomainMatchesContract; exports.buildAndSignSponsorAuth = _chunk75JWR5SAcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunkUTG2UT54cjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunkUTG2UT54cjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildMintRequestTypedData = _chunkUTG2UT54cjs.buildMintRequestTypedData; exports.buildPartialUserOperation = buildPartialUserOperation; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildReceiverConsentTypedData = _chunkUTG2UT54cjs.buildReceiverConsentTypedData; exports.buildSponsorAuthDomain = _chunk75JWR5SAcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunk75JWR5SAcjs.buildSponsorAuthTypedData; exports.buildUserOpTypedData = buildUserOpTypedData; exports.burnRequestTypes = _chunkUTG2UT54cjs.burnRequestTypes; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunk75JWR5SAcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunk75JWR5SAcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = decodeBatchExecuteCalls; exports.defaultErrorTypeForStatus = defaultErrorTypeForStatus; exports.delegateDirect = delegateDirect; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = encodeBatchExecute; exports.erc20Abi = _chunkG7NS4TS3cjs.erc20Abi; exports.erc20ApproveOp = erc20ApproveOp; exports.erc20BurnOp = erc20BurnOp; exports.erc20TransferOp = erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.generateSponsorAuthNonce = _chunk75JWR5SAcjs.generateSponsorAuthNonce; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkJH6XFHEScjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkJH6XFHEScjs.getIssuer2; exports.getMintRequestNonce = _chunkJH6XFHEScjs.getMintRequestNonce; exports.getPafiServiceUrls = getPafiServiceUrls; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPaymasterConfig = getPaymasterConfig; exports.getPointTokenBalance = _chunkJH6XFHEScjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkJH6XFHEScjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkJH6XFHEScjs.getIssuer; exports.getReceiverConsentNonce = _chunkJH6XFHEScjs.getReceiverConsentNonce; exports.getSponsorAuthDomainAnchor = _chunk75JWR5SAcjs.getSponsorAuthDomainAnchor; exports.getTokenName = _chunkJH6XFHEScjs.getTokenName; exports.isActiveIssuer = _chunkJH6XFHEScjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkJH6XFHEScjs.isMinter; exports.isPaymasterConfigured = isPaymasterConfigured; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunk57KR35JWcjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkJH6XFHEScjs.issuerRegistryGetIssuerFlatAbi; exports.mintFeeWrapperAbi = _chunkG7NS4TS3cjs.mintFeeWrapperAbi; exports.mintRequestTypes = _chunkUTG2UT54cjs.mintRequestTypes; exports.mintingOracleAbi = _chunk57KR35JWcjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunk75JWR5SAcjs.parseLoginMessage; exports.permit2Abi = _chunkG7NS4TS3cjs.permit2Abi; exports.pointTokenAbi = _chunkKRHGFUDIcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkG7NS4TS3cjs.pointTokenFactoryAbi; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; exports.rawCallOp = rawCallOp; exports.receiverConsentTypes = _chunkUTG2UT54cjs.receiverConsentTypes; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.setPaymasterConfig = setPaymasterConfig; exports.signBurnRequest = _chunkUTG2UT54cjs.signBurnRequest; exports.signMintRequest = _chunkUTG2UT54cjs.signMintRequest; exports.signReceiverConsent = _chunkUTG2UT54cjs.signReceiverConsent; exports.signSponsorAuth = _chunk75JWR5SAcjs.signSponsorAuth; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkG7NS4TS3cjs.universalRouterAbi; exports.v4QuoterAbi = _chunkG7NS4TS3cjs.v4QuoterAbi; exports.verifyBurnRequest = _chunkUTG2UT54cjs.verifyBurnRequest; exports.verifyLoginMessage = _chunk75JWR5SAcjs.verifyLoginMessage; exports.verifyMintCap = _chunkJH6XFHEScjs.verifyMintCap; exports.verifyMintRequest = _chunkUTG2UT54cjs.verifyMintRequest; exports.verifyReceiverConsent = _chunkUTG2UT54cjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunk75JWR5SAcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
|
|
1691
1691
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { Address, Hex, TypedDataDomain, PublicClient, WalletClient, TransactionReceipt, HttpTransport } from 'viem';
|
|
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 } from './types-
|
|
3
|
-
export { B as BestQuote, c as BlackoutWindow, d as BurnRequest, I as Issuer,
|
|
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 } from './types-DWLZNgcw.cjs';
|
|
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
6
|
export { getBurnRequestNonce, getIssuer, 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
|
|
|
10
|
+
/**
|
|
11
|
+
* EIP-712 typed data for the v1.6 sig-gated mint path.
|
|
12
|
+
*
|
|
13
|
+
* Contract enforces:
|
|
14
|
+
* - msg.sender == receiver (the on-chain caller of `mint`)
|
|
15
|
+
* - nonce == mintRequestNonces[user] (per-user nonce stream)
|
|
16
|
+
*
|
|
17
|
+
* `user` is the off-chain spender (whose nonce advances), `receiver` is
|
|
18
|
+
* the on-chain mint recipient. For direct mints `user == receiver` (user
|
|
19
|
+
* calls PointToken.mint themselves). For wrapper-mediated mints `user ==
|
|
20
|
+
* end-user`, `receiver == wrapper address`.
|
|
21
|
+
*/
|
|
10
22
|
declare const mintRequestTypes: {
|
|
11
|
-
readonly
|
|
12
|
-
readonly name: "
|
|
23
|
+
readonly MintForRequest: readonly [{
|
|
24
|
+
readonly name: "user";
|
|
25
|
+
readonly type: "address";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "receiver";
|
|
13
28
|
readonly type: "address";
|
|
14
29
|
}, {
|
|
15
30
|
readonly name: "amount";
|
|
@@ -1993,8 +2008,11 @@ declare class PafiSDK {
|
|
|
1993
2008
|
verifyingContract: `0x${string}`;
|
|
1994
2009
|
};
|
|
1995
2010
|
types: {
|
|
1996
|
-
readonly
|
|
1997
|
-
readonly name: "
|
|
2011
|
+
readonly MintForRequest: readonly [{
|
|
2012
|
+
readonly name: "user";
|
|
2013
|
+
readonly type: "address";
|
|
2014
|
+
}, {
|
|
2015
|
+
readonly name: "receiver";
|
|
1998
2016
|
readonly type: "address";
|
|
1999
2017
|
}, {
|
|
2000
2018
|
readonly name: "amount";
|
|
@@ -2007,7 +2025,7 @@ declare class PafiSDK {
|
|
|
2007
2025
|
readonly type: "uint256";
|
|
2008
2026
|
}];
|
|
2009
2027
|
};
|
|
2010
|
-
primaryType: "
|
|
2028
|
+
primaryType: "MintForRequest";
|
|
2011
2029
|
message: MintRequest;
|
|
2012
2030
|
}>;
|
|
2013
2031
|
buildReceiverConsentTypedData(message: ReceiverConsent): Promise<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { Address, Hex, TypedDataDomain, PublicClient, WalletClient, TransactionReceipt, HttpTransport } from 'viem';
|
|
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 } from './types-
|
|
3
|
-
export { B as BestQuote, c as BlackoutWindow, d as BurnRequest, I as Issuer,
|
|
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 } from './types-DWLZNgcw.js';
|
|
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
6
|
export { getBurnRequestNonce, getIssuer, 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
|
|
|
10
|
+
/**
|
|
11
|
+
* EIP-712 typed data for the v1.6 sig-gated mint path.
|
|
12
|
+
*
|
|
13
|
+
* Contract enforces:
|
|
14
|
+
* - msg.sender == receiver (the on-chain caller of `mint`)
|
|
15
|
+
* - nonce == mintRequestNonces[user] (per-user nonce stream)
|
|
16
|
+
*
|
|
17
|
+
* `user` is the off-chain spender (whose nonce advances), `receiver` is
|
|
18
|
+
* the on-chain mint recipient. For direct mints `user == receiver` (user
|
|
19
|
+
* calls PointToken.mint themselves). For wrapper-mediated mints `user ==
|
|
20
|
+
* end-user`, `receiver == wrapper address`.
|
|
21
|
+
*/
|
|
10
22
|
declare const mintRequestTypes: {
|
|
11
|
-
readonly
|
|
12
|
-
readonly name: "
|
|
23
|
+
readonly MintForRequest: readonly [{
|
|
24
|
+
readonly name: "user";
|
|
25
|
+
readonly type: "address";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "receiver";
|
|
13
28
|
readonly type: "address";
|
|
14
29
|
}, {
|
|
15
30
|
readonly name: "amount";
|
|
@@ -1993,8 +2008,11 @@ declare class PafiSDK {
|
|
|
1993
2008
|
verifyingContract: `0x${string}`;
|
|
1994
2009
|
};
|
|
1995
2010
|
types: {
|
|
1996
|
-
readonly
|
|
1997
|
-
readonly name: "
|
|
2011
|
+
readonly MintForRequest: readonly [{
|
|
2012
|
+
readonly name: "user";
|
|
2013
|
+
readonly type: "address";
|
|
2014
|
+
}, {
|
|
2015
|
+
readonly name: "receiver";
|
|
1998
2016
|
readonly type: "address";
|
|
1999
2017
|
}, {
|
|
2000
2018
|
readonly name: "amount";
|
|
@@ -2007,7 +2025,7 @@ declare class PafiSDK {
|
|
|
2007
2025
|
readonly type: "uint256";
|
|
2008
2026
|
}];
|
|
2009
2027
|
};
|
|
2010
|
-
primaryType: "
|
|
2028
|
+
primaryType: "MintForRequest";
|
|
2011
2029
|
message: MintRequest;
|
|
2012
2030
|
}>;
|
|
2013
2031
|
buildReceiverConsentTypedData(message: ReceiverConsent): Promise<{
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
pointTokenFactoryAbi,
|
|
6
6
|
universalRouterAbi,
|
|
7
7
|
v4QuoterAbi
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JWZTY5UL.js";
|
|
9
9
|
import {
|
|
10
10
|
SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET,
|
|
11
11
|
SPONSOR_AUTH_DOMAIN_NAME,
|
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
isMinter,
|
|
36
36
|
issuerRegistryGetIssuerFlatAbi,
|
|
37
37
|
verifyMintCap
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PWQWNHGI.js";
|
|
39
39
|
import {
|
|
40
40
|
issuerRegistryAbi,
|
|
41
41
|
mintingOracleAbi
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FHFZ2F34.js";
|
|
43
43
|
import {
|
|
44
44
|
COMMON_POOLS,
|
|
45
45
|
COMMON_TOKENS,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
verifyBurnRequest,
|
|
66
66
|
verifyMintRequest,
|
|
67
67
|
verifyReceiverConsent
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-XNVVZVK6.js";
|
|
69
69
|
import {
|
|
70
70
|
pointTokenAbi
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-UCO5DXD6.js";
|
|
72
72
|
import "./chunk-DGUM43GV.js";
|
|
73
73
|
|
|
74
74
|
// src/index.ts
|
|
@@ -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 };
|