@pafi-dev/issuer 0.5.10 → 0.5.11

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 CHANGED
@@ -46,7 +46,8 @@ __export(index_exports, {
46
46
  authenticateRequest: () => authenticateRequest,
47
47
  createIssuerService: () => createIssuerService,
48
48
  createSubgraphNativeUsdtQuoter: () => createSubgraphNativeUsdtQuoter,
49
- createSubgraphPoolsProvider: () => createSubgraphPoolsProvider
49
+ createSubgraphPoolsProvider: () => createSubgraphPoolsProvider,
50
+ serializeEntryToJsonRpc: () => serializeEntryToJsonRpc
50
51
  });
51
52
  module.exports = __toCommonJS(index_exports);
52
53
 
@@ -2095,9 +2096,31 @@ function createIssuerService(config) {
2095
2096
  };
2096
2097
  }
2097
2098
 
2099
+ // src/userop-store/serialize.ts
2100
+ var import_core9 = require("@pafi-dev/core");
2101
+ function serializeEntryToJsonRpc(entry, signature) {
2102
+ return (0, import_core9.serializeUserOpToJsonRpc)(
2103
+ {
2104
+ sender: entry.sender,
2105
+ nonce: BigInt(entry.nonce),
2106
+ callData: entry.callData,
2107
+ callGasLimit: BigInt(entry.callGasLimit),
2108
+ verificationGasLimit: BigInt(entry.verificationGasLimit),
2109
+ preVerificationGas: BigInt(entry.preVerificationGas),
2110
+ maxFeePerGas: BigInt(entry.maxFeePerGas),
2111
+ maxPriorityFeePerGas: BigInt(entry.maxPriorityFeePerGas),
2112
+ paymaster: entry.paymaster,
2113
+ paymasterVerificationGasLimit: entry.paymasterVerificationGasLimit != null ? BigInt(entry.paymasterVerificationGasLimit) : void 0,
2114
+ paymasterPostOpGasLimit: entry.paymasterPostOpGasLimit != null ? BigInt(entry.paymasterPostOpGasLimit) : void 0,
2115
+ paymasterData: entry.paymasterData
2116
+ },
2117
+ signature
2118
+ );
2119
+ }
2120
+
2098
2121
  // src/issuer-state/validator.ts
2099
2122
  var import_viem11 = require("viem");
2100
- var import_core9 = require("@pafi-dev/core");
2123
+ var import_core10 = require("@pafi-dev/core");
2101
2124
 
2102
2125
  // src/issuer-state/types.ts
2103
2126
  var IssuerStateError = class extends Error {
@@ -2128,7 +2151,7 @@ var IssuerStateValidator = class _IssuerStateValidator {
2128
2151
  * `CONTRACT_ADDRESSES` map for the given chain.
2129
2152
  */
2130
2153
  static forChain(provider, chainId) {
2131
- const { issuerRegistry } = (0, import_core9.getContractAddresses)(chainId);
2154
+ const { issuerRegistry } = (0, import_core10.getContractAddresses)(chainId);
2132
2155
  return new _IssuerStateValidator(provider, issuerRegistry);
2133
2156
  }
2134
2157
  /**
@@ -2157,7 +2180,7 @@ var IssuerStateValidator = class _IssuerStateValidator {
2157
2180
  if (cached) return cached;
2158
2181
  const issuer = await this.provider.readContract({
2159
2182
  address: key,
2160
- abi: import_core9.POINT_TOKEN_V2_ABI,
2183
+ abi: import_core10.POINT_TOKEN_V2_ABI,
2161
2184
  functionName: "issuer"
2162
2185
  });
2163
2186
  this.pointTokenIssuerCache.set(key, (0, import_viem11.getAddress)(issuer));
@@ -2238,13 +2261,13 @@ var IssuerStateValidator = class _IssuerStateValidator {
2238
2261
  const [tuple, totalSupply] = await Promise.all([
2239
2262
  this.provider.readContract({
2240
2263
  address: this.registryAddress,
2241
- abi: import_core9.issuerRegistryAbi,
2264
+ abi: import_core10.issuerRegistryAbi,
2242
2265
  functionName: "getIssuer",
2243
2266
  args: [issuerAddr]
2244
2267
  }),
2245
2268
  this.provider.readContract({
2246
2269
  address: tokenAddr,
2247
- abi: import_core9.POINT_TOKEN_V2_ABI,
2270
+ abi: import_core10.POINT_TOKEN_V2_ABI,
2248
2271
  functionName: "totalSupply"
2249
2272
  })
2250
2273
  ]);
@@ -2295,6 +2318,7 @@ var PAFI_ISSUER_SDK_VERSION = "0.4.0";
2295
2318
  authenticateRequest,
2296
2319
  createIssuerService,
2297
2320
  createSubgraphNativeUsdtQuoter,
2298
- createSubgraphPoolsProvider
2321
+ createSubgraphPoolsProvider,
2322
+ serializeEntryToJsonRpc
2299
2323
  });
2300
2324
  //# sourceMappingURL=index.cjs.map