@pafi-dev/issuer 0.26.1 → 0.27.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/index.cjs +17 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2877,7 +2877,8 @@ async function prepareMobileUserOp(params) {
|
|
|
2877
2877
|
paymasterData: userOp.paymasterData,
|
|
2878
2878
|
chainId: params.chainId,
|
|
2879
2879
|
userOpHash,
|
|
2880
|
-
fallback: fallbackEntry
|
|
2880
|
+
fallback: fallbackEntry,
|
|
2881
|
+
eip7702Auth: params.eip7702Auth
|
|
2881
2882
|
};
|
|
2882
2883
|
await params.store.save(params.lockId, entry, params.ttlSeconds);
|
|
2883
2884
|
return {
|
|
@@ -3032,7 +3033,7 @@ async function handleMobilePrepare(params) {
|
|
|
3032
3033
|
params.provider.estimateFeesPerGas(),
|
|
3033
3034
|
params.provider.getCode({ address: params.userAddress })
|
|
3034
3035
|
]);
|
|
3035
|
-
const needsDelegation = (0, import_core10.parseEip7702DelegatedAddress)(userCode) === null;
|
|
3036
|
+
const needsDelegation = !params.eip7702Auth && (0, import_core10.parseEip7702DelegatedAddress)(userCode) === null;
|
|
3036
3037
|
const sponsoredOp = {
|
|
3037
3038
|
...params.partialUserOp,
|
|
3038
3039
|
maxFeePerGas: fees.maxFeePerGas ?? params.partialUserOp.maxFeePerGas ?? 0n,
|
|
@@ -3044,7 +3045,8 @@ async function handleMobilePrepare(params) {
|
|
|
3044
3045
|
scenario: params.scenario,
|
|
3045
3046
|
userOp: sponsoredOp,
|
|
3046
3047
|
pointTokenAddress: params.pointTokenAddress,
|
|
3047
|
-
onWarning: params.onWarning
|
|
3048
|
+
onWarning: params.onWarning,
|
|
3049
|
+
eip7702Auth: params.eip7702Auth
|
|
3048
3050
|
});
|
|
3049
3051
|
const prepared = await prepareMobileUserOp({
|
|
3050
3052
|
lockId: params.lockId,
|
|
@@ -3053,7 +3055,8 @@ async function handleMobilePrepare(params) {
|
|
|
3053
3055
|
paymasterFields,
|
|
3054
3056
|
chainId: params.chainId,
|
|
3055
3057
|
store: params.store,
|
|
3056
|
-
ttlSeconds: params.ttlSeconds
|
|
3058
|
+
ttlSeconds: params.ttlSeconds,
|
|
3059
|
+
eip7702Auth: params.eip7702Auth
|
|
3057
3060
|
});
|
|
3058
3061
|
return {
|
|
3059
3062
|
...prepared,
|
|
@@ -3074,7 +3077,8 @@ async function handleMobileSubmit(params) {
|
|
|
3074
3077
|
const result = await relayUserOp({
|
|
3075
3078
|
client: params.pafiBackendClient,
|
|
3076
3079
|
userOp: userOpJson,
|
|
3077
|
-
entryPoint: params.entryPoint ?? import_core10.ENTRY_POINT_V08
|
|
3080
|
+
entryPoint: params.entryPoint ?? import_core10.ENTRY_POINT_V08,
|
|
3081
|
+
eip7702Auth: entry.eip7702Auth
|
|
3078
3082
|
});
|
|
3079
3083
|
await params.bindUserOpHash(params.lockId, result.userOpHash);
|
|
3080
3084
|
await params.store.delete(params.lockId);
|
|
@@ -3757,7 +3761,8 @@ var IssuerApiAdapter = class {
|
|
|
3757
3761
|
claimResult.fallback,
|
|
3758
3762
|
"mint",
|
|
3759
3763
|
pointTokenAddress,
|
|
3760
|
-
claimResult.expiresInSeconds
|
|
3764
|
+
claimResult.expiresInSeconds,
|
|
3765
|
+
input.eip7702Auth
|
|
3761
3766
|
);
|
|
3762
3767
|
return {
|
|
3763
3768
|
lockId: claimResult.lockId,
|
|
@@ -3802,7 +3807,8 @@ var IssuerApiAdapter = class {
|
|
|
3802
3807
|
redeemResponse.fallback?.userOp,
|
|
3803
3808
|
"burn",
|
|
3804
3809
|
pointTokenAddress,
|
|
3805
|
-
redeemResponse.expiresInSeconds
|
|
3810
|
+
redeemResponse.expiresInSeconds,
|
|
3811
|
+
input.eip7702Auth
|
|
3806
3812
|
);
|
|
3807
3813
|
return {
|
|
3808
3814
|
lockId: redeemResponse.lockId,
|
|
@@ -3936,7 +3942,7 @@ var IssuerApiAdapter = class {
|
|
|
3936
3942
|
issuerSignerWallet: this.cfg.issuerSignerWallet
|
|
3937
3943
|
});
|
|
3938
3944
|
}
|
|
3939
|
-
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds) {
|
|
3945
|
+
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds, eip7702Auth) {
|
|
3940
3946
|
return await handleMobilePrepare({
|
|
3941
3947
|
userAddress: authenticatedAddress,
|
|
3942
3948
|
chainId,
|
|
@@ -3949,7 +3955,8 @@ var IssuerApiAdapter = class {
|
|
|
3949
3955
|
store: this.cfg.pendingUserOpStore,
|
|
3950
3956
|
provider: this.cfg.provider,
|
|
3951
3957
|
pafiBackendClient: this.cfg.pafiBackendClient,
|
|
3952
|
-
onWarning: this.cfg.onWarning
|
|
3958
|
+
onWarning: this.cfg.onWarning,
|
|
3959
|
+
eip7702Auth
|
|
3953
3960
|
});
|
|
3954
3961
|
}
|
|
3955
3962
|
assertRedeemHandler() {
|
|
@@ -5206,7 +5213,7 @@ var MemoryRedemptionHistoryStore = class {
|
|
|
5206
5213
|
};
|
|
5207
5214
|
|
|
5208
5215
|
// src/index.ts
|
|
5209
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.
|
|
5216
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.27.1" : "dev";
|
|
5210
5217
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5211
5218
|
0 && (module.exports = {
|
|
5212
5219
|
AdapterMisconfiguredError,
|