@pafi-dev/core 0.9.6 → 0.10.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/README.md +194 -189
- package/dist/{chunk-5NEAI2BH.cjs → chunk-4NTU7XGP.cjs} +2 -54
- package/dist/chunk-4NTU7XGP.cjs.map +1 -0
- package/dist/{chunk-BNO5SM25.cjs → chunk-BBQLGBOD.cjs} +2 -11
- package/dist/{chunk-Y5EYH2SQ.js.map → chunk-BBQLGBOD.cjs.map} +1 -1
- package/dist/{chunk-Y5EYH2SQ.js → chunk-J7EYOLMI.js} +1 -10
- package/dist/chunk-J7EYOLMI.js.map +1 -0
- package/dist/{chunk-HJYHGCMT.js → chunk-RVSW7I6U.js} +2 -54
- package/dist/chunk-RVSW7I6U.js.map +1 -0
- package/dist/contract/index.cjs +2 -4
- package/dist/contract/index.cjs.map +1 -1
- package/dist/contract/index.d.cts +2 -11
- package/dist/contract/index.d.ts +2 -11
- package/dist/contract/index.js +1 -3
- package/dist/eip712/index.cjs +2 -8
- package/dist/eip712/index.cjs.map +1 -1
- package/dist/eip712/index.d.cts +2 -41
- package/dist/eip712/index.d.ts +2 -41
- package/dist/eip712/index.js +3 -9
- package/dist/index.cjs +13 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -84
- package/dist/index.d.ts +36 -84
- package/dist/index.js +11 -47
- package/dist/index.js.map +1 -1
- package/dist/{types-DWLZNgcw.d.cts → types-B3UivyQ1.d.cts} +1 -10
- package/dist/{types-DWLZNgcw.d.ts → types-B3UivyQ1.d.ts} +1 -10
- package/package.json +10 -1
- package/dist/chunk-5NEAI2BH.cjs.map +0 -1
- package/dist/chunk-BNO5SM25.cjs.map +0 -1
- package/dist/chunk-HJYHGCMT.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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,
|
|
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,
|
|
2
|
+
import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, E as EIP712Signature, S as SignatureVerification } from './types-B3UivyQ1.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, R as Recipient, h as RedemptionDecision, i as RedemptionDenial, j as RedemptionDenialCode, k as RedemptionPolicy, l as RedemptionPolicySource, m as RedemptionPreview, T as TokenCap } from './types-B3UivyQ1.cjs';
|
|
4
4
|
export { pointTokenAbi as POINT_TOKEN_V2_ABI, erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.cjs';
|
|
5
|
-
export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData,
|
|
6
|
-
export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress,
|
|
5
|
+
export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, signBurnRequest, signMintRequest, verifyBurnRequest, verifyMintRequest } from './eip712/index.cjs';
|
|
6
|
+
export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getTokenCap, 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
|
|
|
@@ -52,27 +52,6 @@ declare const burnRequestTypes: {
|
|
|
52
52
|
readonly type: "uint256";
|
|
53
53
|
}];
|
|
54
54
|
};
|
|
55
|
-
declare const receiverConsentTypes: {
|
|
56
|
-
readonly ReceiverConsent: readonly [{
|
|
57
|
-
readonly name: "onBehalfOf";
|
|
58
|
-
readonly type: "address";
|
|
59
|
-
}, {
|
|
60
|
-
readonly name: "originalReceiver";
|
|
61
|
-
readonly type: "address";
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "amount";
|
|
64
|
-
readonly type: "uint256";
|
|
65
|
-
}, {
|
|
66
|
-
readonly name: "nonce";
|
|
67
|
-
readonly type: "uint256";
|
|
68
|
-
}, {
|
|
69
|
-
readonly name: "deadline";
|
|
70
|
-
readonly type: "uint256";
|
|
71
|
-
}, {
|
|
72
|
-
readonly name: "extData";
|
|
73
|
-
readonly type: "bytes";
|
|
74
|
-
}];
|
|
75
|
-
};
|
|
76
55
|
declare const SUPPORTED_CHAINS: Record<number, ChainConfig>;
|
|
77
56
|
declare const V4_QUOTER_ADDRESSES: Record<number, Address>;
|
|
78
57
|
declare const UNIVERSAL_ROUTER_ADDRESSES: Record<number, Address>;
|
|
@@ -680,12 +659,13 @@ declare function rawCallOp(target: Address, data: `0x${string}`, value?: bigint)
|
|
|
680
659
|
* and invokes each one in sequence, reverting all if any fail.
|
|
681
660
|
*
|
|
682
661
|
* Function name is `executeBatch` (selector `0x34fcd5be`) to match
|
|
683
|
-
* Pimlico's `Simple7702Account`
|
|
684
|
-
*
|
|
685
|
-
* The shorter `execute(Call[])` (selector
|
|
686
|
-
* legacy/standalone batch executor
|
|
687
|
-
* delegated EOA falls through to the
|
|
688
|
-
* with "account: not from EntryPoint"
|
|
662
|
+
* Pimlico's `Simple7702Account` — the EIP-7702 delegate impl PAFI
|
|
663
|
+
* pins on Base mainnet as of v1.4 (replaced an earlier Coinbase Smart
|
|
664
|
+
* Wallet v2 trial). The shorter `execute(Call[])` (selector
|
|
665
|
+
* `0x3f707e6b`) only exists on legacy/standalone batch executor
|
|
666
|
+
* contracts; calling it on a 7702 delegated EOA falls through to the
|
|
667
|
+
* fallback function and reverts with "account: not from EntryPoint"
|
|
668
|
+
* (AA23).
|
|
689
669
|
*/
|
|
690
670
|
declare const BATCH_EXECUTOR_ABI: readonly [{
|
|
691
671
|
readonly name: "executeBatch";
|
|
@@ -708,20 +688,21 @@ declare const BATCH_EXECUTOR_ABI: readonly [{
|
|
|
708
688
|
readonly outputs: readonly [];
|
|
709
689
|
}];
|
|
710
690
|
/**
|
|
711
|
-
* Encode a batch of operations into calldata for
|
|
712
|
-
*
|
|
691
|
+
* Encode a batch of operations into calldata for
|
|
692
|
+
* `BatchExecutor.executeBatch((address,uint256,bytes)[])`. The
|
|
693
|
+
* resulting calldata goes into `UserOperation.callData`.
|
|
713
694
|
*
|
|
714
695
|
* When the EOA has an EIP-7702 delegation to a BatchExecutor, calling
|
|
715
696
|
* this calldata against the EOA runs all operations with
|
|
716
697
|
* `msg.sender = EOA` for each inner call.
|
|
717
698
|
*
|
|
718
699
|
* @param operations batch of calls, in execution order
|
|
719
|
-
* @returns calldata bytes for `
|
|
700
|
+
* @returns calldata bytes for `executeBatch((address,uint256,bytes)[])`
|
|
720
701
|
*/
|
|
721
702
|
declare function encodeBatchExecute(operations: Operation[]): Hex;
|
|
722
703
|
/**
|
|
723
|
-
* Decode `BatchExecutor.
|
|
724
|
-
* `{ to, data, value }` objects.
|
|
704
|
+
* Decode `BatchExecutor.executeBatch(calls[])` callData back into
|
|
705
|
+
* individual `{ to, data, value }` objects.
|
|
725
706
|
*
|
|
726
707
|
* Used by issuer backends to convert a `PartialUserOperation.callData`
|
|
727
708
|
* into the `calls[]` array returned to web/FE clients (which submit via
|
|
@@ -882,20 +863,31 @@ declare function computeUserOpHash(userOp: Parameters<typeof buildUserOpTypedDat
|
|
|
882
863
|
|
|
883
864
|
/**
|
|
884
865
|
* EIP-7702 delegate impls supported by the PAFI mobile prepare/submit
|
|
885
|
-
* flow. Each impl exposes `
|
|
886
|
-
* selector `0x34fcd5be
|
|
887
|
-
*
|
|
888
|
-
*
|
|
866
|
+
* flow. Each impl exposes `executeBatch((address,uint256,bytes)[])`
|
|
867
|
+
* (selector `0x34fcd5be`) so callData encoding is identical, but each
|
|
868
|
+
* may use a slightly different dummy-signature pattern that Pimlico's
|
|
869
|
+
* `pm_sponsorUserOperation` simulation accepts.
|
|
870
|
+
*
|
|
871
|
+
* Current primary impl is `simple7702` (Pimlico's `Simple7702Account`).
|
|
872
|
+
* `batchExecutor` is retained for transition / back-compat with EOAs
|
|
873
|
+
* that delegated to the earlier Coinbase Smart Wallet v2 BatchExecutor
|
|
874
|
+
* (trialled before v1.4 — Pimlico became the canonical impl on
|
|
875
|
+
* 2026-04-27 due to a Coinbase SignatureWrapper incompatibility that
|
|
876
|
+
* caused AA23 0x3c10b94e during validateUserOp).
|
|
889
877
|
*/
|
|
890
878
|
type DelegateImpl = "simple7702" | "batchExecutor" | "unknown";
|
|
891
879
|
/**
|
|
892
|
-
* Pimlico's `Simple7702Account` implementation address on Base mainnet
|
|
880
|
+
* Pimlico's `Simple7702Account` implementation address on Base mainnet —
|
|
881
|
+
* the canonical PAFI delegation target as of v1.4 (2026-04-27).
|
|
893
882
|
* Used by `permissionless.to7702SimpleSmartAccount`.
|
|
894
883
|
*/
|
|
895
884
|
declare const SIMPLE_7702_IMPL_BASE_MAINNET: Address;
|
|
896
885
|
/**
|
|
897
|
-
* Coinbase Smart Wallet v2 BatchExecutor —
|
|
898
|
-
* target. Same on Base mainnet + Base Sepolia.
|
|
886
|
+
* Legacy Coinbase Smart Wallet v2 BatchExecutor — PAFI's pre-v1.4
|
|
887
|
+
* delegation target. Same on Base mainnet + Base Sepolia. Detected
|
|
888
|
+
* here so EOAs that delegated to this address before the v1.4 cutover
|
|
889
|
+
* still pass the impl check; new delegations should target
|
|
890
|
+
* {@link SIMPLE_7702_IMPL_BASE_MAINNET} instead.
|
|
899
891
|
*/
|
|
900
892
|
declare const BATCH_EXECUTOR_7702_IMPL: Address;
|
|
901
893
|
/**
|
|
@@ -2003,12 +1995,6 @@ declare class PafiSDK {
|
|
|
2003
1995
|
verify: PafiSDK["verifyMintRequest"];
|
|
2004
1996
|
getNonce: PafiSDK["getMintRequestNonce"];
|
|
2005
1997
|
};
|
|
2006
|
-
readonly consent: {
|
|
2007
|
-
buildTypedData: PafiSDK["buildReceiverConsentTypedData"];
|
|
2008
|
-
sign: PafiSDK["signReceiverConsent"];
|
|
2009
|
-
verify: PafiSDK["verifyReceiverConsent"];
|
|
2010
|
-
getNonce: PafiSDK["getReceiverConsentNonce"];
|
|
2011
|
-
};
|
|
2012
1998
|
readonly auth: {
|
|
2013
1999
|
createLoginMessage: PafiSDK["createLoginMessage"];
|
|
2014
2000
|
signMessage: PafiSDK["signLoginMessage"];
|
|
@@ -2050,46 +2036,12 @@ declare class PafiSDK {
|
|
|
2050
2036
|
primaryType: "MintForRequest";
|
|
2051
2037
|
message: MintRequest;
|
|
2052
2038
|
}>;
|
|
2053
|
-
buildReceiverConsentTypedData(message: ReceiverConsent): Promise<{
|
|
2054
|
-
domain: {
|
|
2055
|
-
name: string;
|
|
2056
|
-
version: string;
|
|
2057
|
-
chainId: number;
|
|
2058
|
-
verifyingContract: `0x${string}`;
|
|
2059
|
-
};
|
|
2060
|
-
types: {
|
|
2061
|
-
readonly ReceiverConsent: readonly [{
|
|
2062
|
-
readonly name: "onBehalfOf";
|
|
2063
|
-
readonly type: "address";
|
|
2064
|
-
}, {
|
|
2065
|
-
readonly name: "originalReceiver";
|
|
2066
|
-
readonly type: "address";
|
|
2067
|
-
}, {
|
|
2068
|
-
readonly name: "amount";
|
|
2069
|
-
readonly type: "uint256";
|
|
2070
|
-
}, {
|
|
2071
|
-
readonly name: "nonce";
|
|
2072
|
-
readonly type: "uint256";
|
|
2073
|
-
}, {
|
|
2074
|
-
readonly name: "deadline";
|
|
2075
|
-
readonly type: "uint256";
|
|
2076
|
-
}, {
|
|
2077
|
-
readonly name: "extData";
|
|
2078
|
-
readonly type: "bytes";
|
|
2079
|
-
}];
|
|
2080
|
-
};
|
|
2081
|
-
primaryType: "ReceiverConsent";
|
|
2082
|
-
message: ReceiverConsent;
|
|
2083
|
-
}>;
|
|
2084
2039
|
signMintRequest(message: MintRequest): Promise<EIP712Signature>;
|
|
2085
2040
|
verifyMintRequest(message: MintRequest, signature: Hex, expectedMinter: Address): Promise<SignatureVerification>;
|
|
2086
|
-
signReceiverConsent(message: ReceiverConsent): Promise<EIP712Signature>;
|
|
2087
|
-
verifyReceiverConsent(message: ReceiverConsent, signature: Hex, expectedReceiver: Address): Promise<SignatureVerification>;
|
|
2088
2041
|
getMintRequestNonce(receiver: Address): Promise<bigint>;
|
|
2089
|
-
getReceiverConsentNonce(receiver: Address): Promise<bigint>;
|
|
2090
2042
|
createLoginMessage(params: Omit<LoginMessageParams, "address" | "chainId">): Promise<string>;
|
|
2091
2043
|
/** Sign a login message string with the current signer (personal_sign) */
|
|
2092
2044
|
signLoginMessage(message: string): Promise<Hex>;
|
|
2093
2045
|
}
|
|
2094
2046
|
|
|
2095
|
-
export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, 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, 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, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig,
|
|
2047
|
+
export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, 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, 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, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig, SDK_ERROR_HTTP_STATUS_CODE, SIMPLE_7702_IMPL_BASE_MAINNET, SUPPORTED_CHAINS, type SdkErrorHttpStatus, type SendWithPaymasterFallbackParams, type SignAuthorizationFn, type SignatureStruct, SignatureVerification, type SignedAuthorization, SigningError, SimulationError, type SmartAccountSender, type SponsorshipScenario, type SubmissionPath, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, type UserOpReceipt, type UserOpTypedData, type UserOperation, V4_QUOTER_ADDRESSES, ValidationError, type VaultDepositFE, ZERO_VALUE, _resetPaymasterConfigForTests, assembleUserOperation, buildDelegationUserOp, buildEip7702Authorization, buildPartialUserOperation, buildPerpDepositViaRelay, buildPerpDepositWithGasDeduction, buildUserOpTypedData, burnRequestTypes, checkDelegation, checkEthAndBranch, computeAccountId, computeAuthorizationHash, computeUserOpHash, createPafiProxyTransport, decodeBatchExecuteCalls, defaultErrorTypeForStatus, delegateDirect, detectDelegateImpl, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, fetchPafiPools, getAaNonce, getContractAddresses, getDummySignatureFor7702, getPafiServiceUrls, getPafiWebModalAdapter, getPaymasterConfig, isDelegatedTo, isDelegatedToTarget, isPaymasterConfigured, isPaymasterError, mintRequestTypes, openPafiWebModal, openWebPopup, parseEip7702DelegatedAddress, quoteOperatorFeePt, quoteOperatorFeeUsdt, rawCallOp, sendWithPaymasterFallback, serializeUserOpToJsonRpc, setPafiWebModalAdapter, setPaymasterConfig, splitAuthorizationSig, webPopupAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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,
|
|
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,
|
|
2
|
+
import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, E as EIP712Signature, S as SignatureVerification } from './types-B3UivyQ1.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, R as Recipient, h as RedemptionDecision, i as RedemptionDenial, j as RedemptionDenialCode, k as RedemptionPolicy, l as RedemptionPolicySource, m as RedemptionPreview, T as TokenCap } from './types-B3UivyQ1.js';
|
|
4
4
|
export { pointTokenAbi as POINT_TOKEN_V2_ABI, erc20Abi, issuerRegistryAbi, mintFeeWrapperAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.js';
|
|
5
|
-
export { Eip712DomainMismatchError, assertDomainMatchesContract, buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData,
|
|
6
|
-
export { getBurnRequestNonce, getIssuer, getMintFeeBps, getMintFeeRecipients, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress,
|
|
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';
|
|
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
|
|
|
@@ -52,27 +52,6 @@ declare const burnRequestTypes: {
|
|
|
52
52
|
readonly type: "uint256";
|
|
53
53
|
}];
|
|
54
54
|
};
|
|
55
|
-
declare const receiverConsentTypes: {
|
|
56
|
-
readonly ReceiverConsent: readonly [{
|
|
57
|
-
readonly name: "onBehalfOf";
|
|
58
|
-
readonly type: "address";
|
|
59
|
-
}, {
|
|
60
|
-
readonly name: "originalReceiver";
|
|
61
|
-
readonly type: "address";
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "amount";
|
|
64
|
-
readonly type: "uint256";
|
|
65
|
-
}, {
|
|
66
|
-
readonly name: "nonce";
|
|
67
|
-
readonly type: "uint256";
|
|
68
|
-
}, {
|
|
69
|
-
readonly name: "deadline";
|
|
70
|
-
readonly type: "uint256";
|
|
71
|
-
}, {
|
|
72
|
-
readonly name: "extData";
|
|
73
|
-
readonly type: "bytes";
|
|
74
|
-
}];
|
|
75
|
-
};
|
|
76
55
|
declare const SUPPORTED_CHAINS: Record<number, ChainConfig>;
|
|
77
56
|
declare const V4_QUOTER_ADDRESSES: Record<number, Address>;
|
|
78
57
|
declare const UNIVERSAL_ROUTER_ADDRESSES: Record<number, Address>;
|
|
@@ -680,12 +659,13 @@ declare function rawCallOp(target: Address, data: `0x${string}`, value?: bigint)
|
|
|
680
659
|
* and invokes each one in sequence, reverting all if any fail.
|
|
681
660
|
*
|
|
682
661
|
* Function name is `executeBatch` (selector `0x34fcd5be`) to match
|
|
683
|
-
* Pimlico's `Simple7702Account`
|
|
684
|
-
*
|
|
685
|
-
* The shorter `execute(Call[])` (selector
|
|
686
|
-
* legacy/standalone batch executor
|
|
687
|
-
* delegated EOA falls through to the
|
|
688
|
-
* with "account: not from EntryPoint"
|
|
662
|
+
* Pimlico's `Simple7702Account` — the EIP-7702 delegate impl PAFI
|
|
663
|
+
* pins on Base mainnet as of v1.4 (replaced an earlier Coinbase Smart
|
|
664
|
+
* Wallet v2 trial). The shorter `execute(Call[])` (selector
|
|
665
|
+
* `0x3f707e6b`) only exists on legacy/standalone batch executor
|
|
666
|
+
* contracts; calling it on a 7702 delegated EOA falls through to the
|
|
667
|
+
* fallback function and reverts with "account: not from EntryPoint"
|
|
668
|
+
* (AA23).
|
|
689
669
|
*/
|
|
690
670
|
declare const BATCH_EXECUTOR_ABI: readonly [{
|
|
691
671
|
readonly name: "executeBatch";
|
|
@@ -708,20 +688,21 @@ declare const BATCH_EXECUTOR_ABI: readonly [{
|
|
|
708
688
|
readonly outputs: readonly [];
|
|
709
689
|
}];
|
|
710
690
|
/**
|
|
711
|
-
* Encode a batch of operations into calldata for
|
|
712
|
-
*
|
|
691
|
+
* Encode a batch of operations into calldata for
|
|
692
|
+
* `BatchExecutor.executeBatch((address,uint256,bytes)[])`. The
|
|
693
|
+
* resulting calldata goes into `UserOperation.callData`.
|
|
713
694
|
*
|
|
714
695
|
* When the EOA has an EIP-7702 delegation to a BatchExecutor, calling
|
|
715
696
|
* this calldata against the EOA runs all operations with
|
|
716
697
|
* `msg.sender = EOA` for each inner call.
|
|
717
698
|
*
|
|
718
699
|
* @param operations batch of calls, in execution order
|
|
719
|
-
* @returns calldata bytes for `
|
|
700
|
+
* @returns calldata bytes for `executeBatch((address,uint256,bytes)[])`
|
|
720
701
|
*/
|
|
721
702
|
declare function encodeBatchExecute(operations: Operation[]): Hex;
|
|
722
703
|
/**
|
|
723
|
-
* Decode `BatchExecutor.
|
|
724
|
-
* `{ to, data, value }` objects.
|
|
704
|
+
* Decode `BatchExecutor.executeBatch(calls[])` callData back into
|
|
705
|
+
* individual `{ to, data, value }` objects.
|
|
725
706
|
*
|
|
726
707
|
* Used by issuer backends to convert a `PartialUserOperation.callData`
|
|
727
708
|
* into the `calls[]` array returned to web/FE clients (which submit via
|
|
@@ -882,20 +863,31 @@ declare function computeUserOpHash(userOp: Parameters<typeof buildUserOpTypedDat
|
|
|
882
863
|
|
|
883
864
|
/**
|
|
884
865
|
* EIP-7702 delegate impls supported by the PAFI mobile prepare/submit
|
|
885
|
-
* flow. Each impl exposes `
|
|
886
|
-
* selector `0x34fcd5be
|
|
887
|
-
*
|
|
888
|
-
*
|
|
866
|
+
* flow. Each impl exposes `executeBatch((address,uint256,bytes)[])`
|
|
867
|
+
* (selector `0x34fcd5be`) so callData encoding is identical, but each
|
|
868
|
+
* may use a slightly different dummy-signature pattern that Pimlico's
|
|
869
|
+
* `pm_sponsorUserOperation` simulation accepts.
|
|
870
|
+
*
|
|
871
|
+
* Current primary impl is `simple7702` (Pimlico's `Simple7702Account`).
|
|
872
|
+
* `batchExecutor` is retained for transition / back-compat with EOAs
|
|
873
|
+
* that delegated to the earlier Coinbase Smart Wallet v2 BatchExecutor
|
|
874
|
+
* (trialled before v1.4 — Pimlico became the canonical impl on
|
|
875
|
+
* 2026-04-27 due to a Coinbase SignatureWrapper incompatibility that
|
|
876
|
+
* caused AA23 0x3c10b94e during validateUserOp).
|
|
889
877
|
*/
|
|
890
878
|
type DelegateImpl = "simple7702" | "batchExecutor" | "unknown";
|
|
891
879
|
/**
|
|
892
|
-
* Pimlico's `Simple7702Account` implementation address on Base mainnet
|
|
880
|
+
* Pimlico's `Simple7702Account` implementation address on Base mainnet —
|
|
881
|
+
* the canonical PAFI delegation target as of v1.4 (2026-04-27).
|
|
893
882
|
* Used by `permissionless.to7702SimpleSmartAccount`.
|
|
894
883
|
*/
|
|
895
884
|
declare const SIMPLE_7702_IMPL_BASE_MAINNET: Address;
|
|
896
885
|
/**
|
|
897
|
-
* Coinbase Smart Wallet v2 BatchExecutor —
|
|
898
|
-
* target. Same on Base mainnet + Base Sepolia.
|
|
886
|
+
* Legacy Coinbase Smart Wallet v2 BatchExecutor — PAFI's pre-v1.4
|
|
887
|
+
* delegation target. Same on Base mainnet + Base Sepolia. Detected
|
|
888
|
+
* here so EOAs that delegated to this address before the v1.4 cutover
|
|
889
|
+
* still pass the impl check; new delegations should target
|
|
890
|
+
* {@link SIMPLE_7702_IMPL_BASE_MAINNET} instead.
|
|
899
891
|
*/
|
|
900
892
|
declare const BATCH_EXECUTOR_7702_IMPL: Address;
|
|
901
893
|
/**
|
|
@@ -2003,12 +1995,6 @@ declare class PafiSDK {
|
|
|
2003
1995
|
verify: PafiSDK["verifyMintRequest"];
|
|
2004
1996
|
getNonce: PafiSDK["getMintRequestNonce"];
|
|
2005
1997
|
};
|
|
2006
|
-
readonly consent: {
|
|
2007
|
-
buildTypedData: PafiSDK["buildReceiverConsentTypedData"];
|
|
2008
|
-
sign: PafiSDK["signReceiverConsent"];
|
|
2009
|
-
verify: PafiSDK["verifyReceiverConsent"];
|
|
2010
|
-
getNonce: PafiSDK["getReceiverConsentNonce"];
|
|
2011
|
-
};
|
|
2012
1998
|
readonly auth: {
|
|
2013
1999
|
createLoginMessage: PafiSDK["createLoginMessage"];
|
|
2014
2000
|
signMessage: PafiSDK["signLoginMessage"];
|
|
@@ -2050,46 +2036,12 @@ declare class PafiSDK {
|
|
|
2050
2036
|
primaryType: "MintForRequest";
|
|
2051
2037
|
message: MintRequest;
|
|
2052
2038
|
}>;
|
|
2053
|
-
buildReceiverConsentTypedData(message: ReceiverConsent): Promise<{
|
|
2054
|
-
domain: {
|
|
2055
|
-
name: string;
|
|
2056
|
-
version: string;
|
|
2057
|
-
chainId: number;
|
|
2058
|
-
verifyingContract: `0x${string}`;
|
|
2059
|
-
};
|
|
2060
|
-
types: {
|
|
2061
|
-
readonly ReceiverConsent: readonly [{
|
|
2062
|
-
readonly name: "onBehalfOf";
|
|
2063
|
-
readonly type: "address";
|
|
2064
|
-
}, {
|
|
2065
|
-
readonly name: "originalReceiver";
|
|
2066
|
-
readonly type: "address";
|
|
2067
|
-
}, {
|
|
2068
|
-
readonly name: "amount";
|
|
2069
|
-
readonly type: "uint256";
|
|
2070
|
-
}, {
|
|
2071
|
-
readonly name: "nonce";
|
|
2072
|
-
readonly type: "uint256";
|
|
2073
|
-
}, {
|
|
2074
|
-
readonly name: "deadline";
|
|
2075
|
-
readonly type: "uint256";
|
|
2076
|
-
}, {
|
|
2077
|
-
readonly name: "extData";
|
|
2078
|
-
readonly type: "bytes";
|
|
2079
|
-
}];
|
|
2080
|
-
};
|
|
2081
|
-
primaryType: "ReceiverConsent";
|
|
2082
|
-
message: ReceiverConsent;
|
|
2083
|
-
}>;
|
|
2084
2039
|
signMintRequest(message: MintRequest): Promise<EIP712Signature>;
|
|
2085
2040
|
verifyMintRequest(message: MintRequest, signature: Hex, expectedMinter: Address): Promise<SignatureVerification>;
|
|
2086
|
-
signReceiverConsent(message: ReceiverConsent): Promise<EIP712Signature>;
|
|
2087
|
-
verifyReceiverConsent(message: ReceiverConsent, signature: Hex, expectedReceiver: Address): Promise<SignatureVerification>;
|
|
2088
2041
|
getMintRequestNonce(receiver: Address): Promise<bigint>;
|
|
2089
|
-
getReceiverConsentNonce(receiver: Address): Promise<bigint>;
|
|
2090
2042
|
createLoginMessage(params: Omit<LoginMessageParams, "address" | "chainId">): Promise<string>;
|
|
2091
2043
|
/** Sign a login message string with the current signer (personal_sign) */
|
|
2092
2044
|
signLoginMessage(message: string): Promise<Hex>;
|
|
2093
2045
|
}
|
|
2094
2046
|
|
|
2095
|
-
export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, 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, 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, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig,
|
|
2047
|
+
export { ApiError, BATCH_EXECUTOR_7702_IMPL, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, type BuildDelegationUserOpParams, 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, 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, PafiSdkError, type PafiServiceUrls, type PafiWebModalAdapter, type PafiWebModalHandle, type PartialUserOperation, type PaymasterConfig, type PaymasterFields, PointTokenDomainConfig, PoolKey, type QuoteOperatorFeePtConfig, type QuoteOperatorFeeUsdtConfig, SDK_ERROR_HTTP_STATUS_CODE, SIMPLE_7702_IMPL_BASE_MAINNET, SUPPORTED_CHAINS, type SdkErrorHttpStatus, type SendWithPaymasterFallbackParams, type SignAuthorizationFn, type SignatureStruct, SignatureVerification, type SignedAuthorization, SigningError, SimulationError, type SmartAccountSender, type SponsorshipScenario, type SubmissionPath, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, type UserOpReceipt, type UserOpTypedData, type UserOperation, V4_QUOTER_ADDRESSES, ValidationError, type VaultDepositFE, ZERO_VALUE, _resetPaymasterConfigForTests, assembleUserOperation, buildDelegationUserOp, buildEip7702Authorization, buildPartialUserOperation, buildPerpDepositViaRelay, buildPerpDepositWithGasDeduction, buildUserOpTypedData, burnRequestTypes, checkDelegation, checkEthAndBranch, computeAccountId, computeAuthorizationHash, computeUserOpHash, createPafiProxyTransport, decodeBatchExecuteCalls, defaultErrorTypeForStatus, delegateDirect, detectDelegateImpl, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, fetchPafiPools, getAaNonce, getContractAddresses, getDummySignatureFor7702, getPafiServiceUrls, getPafiWebModalAdapter, getPaymasterConfig, isDelegatedTo, isDelegatedToTarget, isPaymasterConfigured, isPaymasterError, mintRequestTypes, openPafiWebModal, openWebPopup, parseEip7702DelegatedAddress, quoteOperatorFeePt, quoteOperatorFeeUsdt, rawCallOp, sendWithPaymasterFallback, serializeUserOpToJsonRpc, setPafiWebModalAdapter, setPaymasterConfig, splitAuthorizationSig, webPopupAdapter };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
erc20Abi,
|
|
3
|
-
permit2Abi,
|
|
4
|
-
pointTokenFactoryAbi,
|
|
5
|
-
universalRouterAbi,
|
|
6
|
-
v4QuoterAbi
|
|
7
|
-
} from "./chunk-CWH4KOUW.js";
|
|
8
1
|
import {
|
|
9
2
|
SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET,
|
|
10
3
|
SPONSOR_AUTH_DOMAIN_NAME,
|
|
@@ -21,6 +14,13 @@ import {
|
|
|
21
14
|
verifyLoginMessage,
|
|
22
15
|
verifySponsorAuth
|
|
23
16
|
} from "./chunk-4EGXLYMM.js";
|
|
17
|
+
import {
|
|
18
|
+
erc20Abi,
|
|
19
|
+
permit2Abi,
|
|
20
|
+
pointTokenFactoryAbi,
|
|
21
|
+
universalRouterAbi,
|
|
22
|
+
v4QuoterAbi
|
|
23
|
+
} from "./chunk-CWH4KOUW.js";
|
|
24
24
|
import {
|
|
25
25
|
getBurnRequestNonce,
|
|
26
26
|
getIssuer,
|
|
@@ -30,14 +30,13 @@ import {
|
|
|
30
30
|
getMintRequestNonce,
|
|
31
31
|
getPointTokenBalance,
|
|
32
32
|
getPointTokenIssuer,
|
|
33
|
-
getReceiverConsentNonce,
|
|
34
33
|
getTokenCap,
|
|
35
34
|
getTokenName,
|
|
36
35
|
isActiveIssuer,
|
|
37
36
|
isMinter,
|
|
38
37
|
issuerRegistryGetIssuerFlatAbi,
|
|
39
38
|
verifyMintCap
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-J7EYOLMI.js";
|
|
41
40
|
import {
|
|
42
41
|
issuerRegistryAbi,
|
|
43
42
|
mintFeeWrapperAbi,
|
|
@@ -58,17 +57,13 @@ import {
|
|
|
58
57
|
buildBurnRequestTypedData,
|
|
59
58
|
buildDomain,
|
|
60
59
|
buildMintRequestTypedData,
|
|
61
|
-
buildReceiverConsentTypedData,
|
|
62
60
|
burnRequestTypes,
|
|
63
61
|
mintRequestTypes,
|
|
64
|
-
receiverConsentTypes,
|
|
65
62
|
signBurnRequest,
|
|
66
63
|
signMintRequest,
|
|
67
|
-
signReceiverConsent,
|
|
68
64
|
verifyBurnRequest,
|
|
69
|
-
verifyMintRequest
|
|
70
|
-
|
|
71
|
-
} from "./chunk-HJYHGCMT.js";
|
|
65
|
+
verifyMintRequest
|
|
66
|
+
} from "./chunk-RVSW7I6U.js";
|
|
72
67
|
import {
|
|
73
68
|
pointTokenAbi
|
|
74
69
|
} from "./chunk-UCO5DXD6.js";
|
|
@@ -637,7 +632,7 @@ function warnDeprecated(fn) {
|
|
|
637
632
|
if (_deprecationWarned) return;
|
|
638
633
|
_deprecationWarned = true;
|
|
639
634
|
console.warn(
|
|
640
|
-
`[PAFI] DEPRECATION
|
|
635
|
+
`[PAFI] DEPRECATION: \`${fn}\` from @pafi-dev/core/paymaster has been deprecated since v0.7.1 and will be removed in the next major bump (v1.0). Use \`PafiBackendClient\` from @pafi-dev/issuer/pafi-backend instead.`
|
|
641
636
|
);
|
|
642
637
|
}
|
|
643
638
|
function setPaymasterConfig(config) {
|
|
@@ -1421,7 +1416,6 @@ var PafiSDK = class {
|
|
|
1421
1416
|
// lives in the flat methods below so both access styles work.
|
|
1422
1417
|
// -------------------------------------------------------------------------
|
|
1423
1418
|
mint;
|
|
1424
|
-
consent;
|
|
1425
1419
|
auth;
|
|
1426
1420
|
constructor(config) {
|
|
1427
1421
|
this._pointTokenAddress = config.pointTokenAddress;
|
|
@@ -1440,12 +1434,6 @@ var PafiSDK = class {
|
|
|
1440
1434
|
verify: this.verifyMintRequest.bind(this),
|
|
1441
1435
|
getNonce: this.getMintRequestNonce.bind(this)
|
|
1442
1436
|
};
|
|
1443
|
-
this.consent = {
|
|
1444
|
-
buildTypedData: this.buildReceiverConsentTypedData.bind(this),
|
|
1445
|
-
sign: this.signReceiverConsent.bind(this),
|
|
1446
|
-
verify: this.verifyReceiverConsent.bind(this),
|
|
1447
|
-
getNonce: this.getReceiverConsentNonce.bind(this)
|
|
1448
|
-
};
|
|
1449
1437
|
this.auth = {
|
|
1450
1438
|
createLoginMessage: this.createLoginMessage.bind(this),
|
|
1451
1439
|
signMessage: this.signLoginMessage.bind(this)
|
|
@@ -1507,10 +1495,6 @@ var PafiSDK = class {
|
|
|
1507
1495
|
const domain = await this.getDomain();
|
|
1508
1496
|
return buildMintRequestTypedData(domain, message);
|
|
1509
1497
|
}
|
|
1510
|
-
async buildReceiverConsentTypedData(message) {
|
|
1511
|
-
const domain = await this.getDomain();
|
|
1512
|
-
return buildReceiverConsentTypedData(domain, message);
|
|
1513
|
-
}
|
|
1514
1498
|
async signMintRequest(message) {
|
|
1515
1499
|
const domain = await this.getDomain();
|
|
1516
1500
|
return signMintRequest(this.requireSigner(), domain, message);
|
|
@@ -1519,14 +1503,6 @@ var PafiSDK = class {
|
|
|
1519
1503
|
const domain = await this.getDomain();
|
|
1520
1504
|
return verifyMintRequest(domain, message, signature, expectedMinter);
|
|
1521
1505
|
}
|
|
1522
|
-
async signReceiverConsent(message) {
|
|
1523
|
-
const domain = await this.getDomain();
|
|
1524
|
-
return signReceiverConsent(this.requireSigner(), domain, message);
|
|
1525
|
-
}
|
|
1526
|
-
async verifyReceiverConsent(message, signature, expectedReceiver) {
|
|
1527
|
-
const domain = await this.getDomain();
|
|
1528
|
-
return verifyReceiverConsent(domain, message, signature, expectedReceiver);
|
|
1529
|
-
}
|
|
1530
1506
|
// -------------------------------------------------------------------------
|
|
1531
1507
|
// Contract reads
|
|
1532
1508
|
// -------------------------------------------------------------------------
|
|
@@ -1537,13 +1513,6 @@ var PafiSDK = class {
|
|
|
1537
1513
|
receiver
|
|
1538
1514
|
);
|
|
1539
1515
|
}
|
|
1540
|
-
async getReceiverConsentNonce(receiver) {
|
|
1541
|
-
return getReceiverConsentNonce(
|
|
1542
|
-
this.requireProvider(),
|
|
1543
|
-
this.requirePointToken(),
|
|
1544
|
-
receiver
|
|
1545
|
-
);
|
|
1546
|
-
}
|
|
1547
1516
|
// -------------------------------------------------------------------------
|
|
1548
1517
|
// Auth — EIP-4361 login helpers (offline, stateless)
|
|
1549
1518
|
// -------------------------------------------------------------------------
|
|
@@ -1621,7 +1590,6 @@ export {
|
|
|
1621
1590
|
buildPartialUserOperation,
|
|
1622
1591
|
buildPerpDepositViaRelay,
|
|
1623
1592
|
buildPerpDepositWithGasDeduction,
|
|
1624
|
-
buildReceiverConsentTypedData,
|
|
1625
1593
|
buildSponsorAuthDomain,
|
|
1626
1594
|
buildSponsorAuthTypedData,
|
|
1627
1595
|
buildUserOpTypedData,
|
|
@@ -1659,7 +1627,6 @@ export {
|
|
|
1659
1627
|
getPointTokenBalance,
|
|
1660
1628
|
getPointTokenIssuer,
|
|
1661
1629
|
getIssuer as getPointTokenIssuerAddress,
|
|
1662
|
-
getReceiverConsentNonce,
|
|
1663
1630
|
getSponsorAuthDomainAnchor,
|
|
1664
1631
|
getTokenCap,
|
|
1665
1632
|
getTokenName,
|
|
@@ -1684,14 +1651,12 @@ export {
|
|
|
1684
1651
|
quoteOperatorFeePt,
|
|
1685
1652
|
quoteOperatorFeeUsdt,
|
|
1686
1653
|
rawCallOp,
|
|
1687
|
-
receiverConsentTypes,
|
|
1688
1654
|
sendWithPaymasterFallback,
|
|
1689
1655
|
serializeUserOpToJsonRpc,
|
|
1690
1656
|
setPafiWebModalAdapter,
|
|
1691
1657
|
setPaymasterConfig,
|
|
1692
1658
|
signBurnRequest,
|
|
1693
1659
|
signMintRequest,
|
|
1694
|
-
signReceiverConsent,
|
|
1695
1660
|
signSponsorAuth,
|
|
1696
1661
|
splitAuthorizationSig,
|
|
1697
1662
|
universalRouterAbi,
|
|
@@ -1700,7 +1665,6 @@ export {
|
|
|
1700
1665
|
verifyLoginMessage,
|
|
1701
1666
|
verifyMintCap,
|
|
1702
1667
|
verifyMintRequest,
|
|
1703
|
-
verifyReceiverConsent,
|
|
1704
1668
|
verifySponsorAuth,
|
|
1705
1669
|
webPopupAdapter
|
|
1706
1670
|
};
|