@pafi-dev/issuer 0.26.1 → 0.27.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/index.cjs +15 -9
- 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 +15 -9
- 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,
|
|
@@ -3053,7 +3054,8 @@ async function handleMobilePrepare(params) {
|
|
|
3053
3054
|
paymasterFields,
|
|
3054
3055
|
chainId: params.chainId,
|
|
3055
3056
|
store: params.store,
|
|
3056
|
-
ttlSeconds: params.ttlSeconds
|
|
3057
|
+
ttlSeconds: params.ttlSeconds,
|
|
3058
|
+
eip7702Auth: params.eip7702Auth
|
|
3057
3059
|
});
|
|
3058
3060
|
return {
|
|
3059
3061
|
...prepared,
|
|
@@ -3074,7 +3076,8 @@ async function handleMobileSubmit(params) {
|
|
|
3074
3076
|
const result = await relayUserOp({
|
|
3075
3077
|
client: params.pafiBackendClient,
|
|
3076
3078
|
userOp: userOpJson,
|
|
3077
|
-
entryPoint: params.entryPoint ?? import_core10.ENTRY_POINT_V08
|
|
3079
|
+
entryPoint: params.entryPoint ?? import_core10.ENTRY_POINT_V08,
|
|
3080
|
+
eip7702Auth: entry.eip7702Auth
|
|
3078
3081
|
});
|
|
3079
3082
|
await params.bindUserOpHash(params.lockId, result.userOpHash);
|
|
3080
3083
|
await params.store.delete(params.lockId);
|
|
@@ -3757,7 +3760,8 @@ var IssuerApiAdapter = class {
|
|
|
3757
3760
|
claimResult.fallback,
|
|
3758
3761
|
"mint",
|
|
3759
3762
|
pointTokenAddress,
|
|
3760
|
-
claimResult.expiresInSeconds
|
|
3763
|
+
claimResult.expiresInSeconds,
|
|
3764
|
+
input.eip7702Auth
|
|
3761
3765
|
);
|
|
3762
3766
|
return {
|
|
3763
3767
|
lockId: claimResult.lockId,
|
|
@@ -3802,7 +3806,8 @@ var IssuerApiAdapter = class {
|
|
|
3802
3806
|
redeemResponse.fallback?.userOp,
|
|
3803
3807
|
"burn",
|
|
3804
3808
|
pointTokenAddress,
|
|
3805
|
-
redeemResponse.expiresInSeconds
|
|
3809
|
+
redeemResponse.expiresInSeconds,
|
|
3810
|
+
input.eip7702Auth
|
|
3806
3811
|
);
|
|
3807
3812
|
return {
|
|
3808
3813
|
lockId: redeemResponse.lockId,
|
|
@@ -3936,7 +3941,7 @@ var IssuerApiAdapter = class {
|
|
|
3936
3941
|
issuerSignerWallet: this.cfg.issuerSignerWallet
|
|
3937
3942
|
});
|
|
3938
3943
|
}
|
|
3939
|
-
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds) {
|
|
3944
|
+
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds, eip7702Auth) {
|
|
3940
3945
|
return await handleMobilePrepare({
|
|
3941
3946
|
userAddress: authenticatedAddress,
|
|
3942
3947
|
chainId,
|
|
@@ -3949,7 +3954,8 @@ var IssuerApiAdapter = class {
|
|
|
3949
3954
|
store: this.cfg.pendingUserOpStore,
|
|
3950
3955
|
provider: this.cfg.provider,
|
|
3951
3956
|
pafiBackendClient: this.cfg.pafiBackendClient,
|
|
3952
|
-
onWarning: this.cfg.onWarning
|
|
3957
|
+
onWarning: this.cfg.onWarning,
|
|
3958
|
+
eip7702Auth
|
|
3953
3959
|
});
|
|
3954
3960
|
}
|
|
3955
3961
|
assertRedeemHandler() {
|
|
@@ -5206,7 +5212,7 @@ var MemoryRedemptionHistoryStore = class {
|
|
|
5206
5212
|
};
|
|
5207
5213
|
|
|
5208
5214
|
// src/index.ts
|
|
5209
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.
|
|
5215
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.27.0" : "dev";
|
|
5210
5216
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5211
5217
|
0 && (module.exports = {
|
|
5212
5218
|
AdapterMisconfiguredError,
|