@pafi-dev/issuer 0.30.0 → 0.31.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 +17 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -13
- package/dist/index.d.ts +51 -13
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2903,7 +2903,10 @@ async function prepareMobileUserOp(params) {
|
|
|
2903
2903
|
callGasLimit: fallback.userOp.callGasLimit.toString(),
|
|
2904
2904
|
verificationGasLimit: fallback.userOp.verificationGasLimit.toString(),
|
|
2905
2905
|
preVerificationGas: fallback.userOp.preVerificationGas.toString(),
|
|
2906
|
-
userOpHash: fallback.userOpHash
|
|
2906
|
+
userOpHash: fallback.userOpHash,
|
|
2907
|
+
// Audit PACI5-21 — carry the fallback-specific lockId so submit
|
|
2908
|
+
// can bind the fallback userOpHash to the correct ledger row.
|
|
2909
|
+
lockId: params.lockIdFallback
|
|
2907
2910
|
};
|
|
2908
2911
|
}
|
|
2909
2912
|
const entry = {
|
|
@@ -3096,6 +3099,7 @@ async function handleMobilePrepare(params) {
|
|
|
3096
3099
|
lockId: params.lockId,
|
|
3097
3100
|
partialUserOp: sponsoredOp,
|
|
3098
3101
|
partialUserOpFallback: params.partialUserOpFallback,
|
|
3102
|
+
lockIdFallback: params.lockIdFallback,
|
|
3099
3103
|
paymasterFields,
|
|
3100
3104
|
chainId: params.chainId,
|
|
3101
3105
|
store: params.store,
|
|
@@ -3124,7 +3128,8 @@ async function handleMobileSubmit(params) {
|
|
|
3124
3128
|
entryPoint: params.entryPoint ?? import_core10.ENTRY_POINT_V08,
|
|
3125
3129
|
eip7702Auth: entry.eip7702Auth
|
|
3126
3130
|
});
|
|
3127
|
-
|
|
3131
|
+
const targetLockId = variant === "fallback" && entry.fallback?.lockId ? entry.fallback.lockId : params.lockId;
|
|
3132
|
+
await params.bindUserOpHash(targetLockId, result.userOpHash);
|
|
3128
3133
|
await params.store.delete(params.lockId);
|
|
3129
3134
|
return { userOpHash: result.userOpHash };
|
|
3130
3135
|
}
|
|
@@ -3866,10 +3871,16 @@ var IssuerApiAdapter = class {
|
|
|
3866
3871
|
"burn",
|
|
3867
3872
|
pointTokenAddress,
|
|
3868
3873
|
redeemResponse.expiresInSeconds,
|
|
3869
|
-
input.eip7702Auth
|
|
3874
|
+
input.eip7702Auth,
|
|
3875
|
+
// Audit PACI5-21 — fallback path reserves a separate
|
|
3876
|
+
// PendingCredit row for the full `amount`. Surface its lockId so
|
|
3877
|
+
// mobile FE can poll the correct row + `handleMobileSubmit`
|
|
3878
|
+
// routes the userOpHash bind to it on fallback submit.
|
|
3879
|
+
redeemResponse.fallback?.lockId
|
|
3870
3880
|
);
|
|
3871
3881
|
return {
|
|
3872
3882
|
lockId: redeemResponse.lockId,
|
|
3883
|
+
lockIdFallback: redeemResponse.fallback?.lockId,
|
|
3873
3884
|
userOpHash: prepared.sponsored.userOpHash,
|
|
3874
3885
|
typedData: prepared.sponsored.typedData,
|
|
3875
3886
|
userOpHashFallback: prepared.fallback?.userOpHash,
|
|
@@ -4000,13 +4011,14 @@ var IssuerApiAdapter = class {
|
|
|
4000
4011
|
issuerSignerWallet: this.cfg.issuerSignerWallet
|
|
4001
4012
|
});
|
|
4002
4013
|
}
|
|
4003
|
-
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds, eip7702Auth) {
|
|
4014
|
+
async runMobilePrepare(authenticatedAddress, chainId, lockId, partialUserOp, partialUserOpFallback, scenario, pointTokenAddress, ttlSeconds, eip7702Auth, lockIdFallback) {
|
|
4004
4015
|
return await handleMobilePrepare({
|
|
4005
4016
|
userAddress: authenticatedAddress,
|
|
4006
4017
|
chainId,
|
|
4007
4018
|
lockId,
|
|
4008
4019
|
partialUserOp,
|
|
4009
4020
|
partialUserOpFallback,
|
|
4021
|
+
lockIdFallback,
|
|
4010
4022
|
scenario,
|
|
4011
4023
|
pointTokenAddress,
|
|
4012
4024
|
ttlSeconds,
|
|
@@ -5271,7 +5283,7 @@ var MemoryRedemptionHistoryStore = class {
|
|
|
5271
5283
|
};
|
|
5272
5284
|
|
|
5273
5285
|
// src/index.ts
|
|
5274
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.
|
|
5286
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.31.0" : "dev";
|
|
5275
5287
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5276
5288
|
0 && (module.exports = {
|
|
5277
5289
|
AdapterMisconfiguredError,
|