@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 +31 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1640,6 +1640,15 @@ interface IPendingUserOpStore {
|
|
|
1640
1640
|
delete(lockId: string): Promise<void>;
|
|
1641
1641
|
}
|
|
1642
1642
|
|
|
1643
|
+
/**
|
|
1644
|
+
* Convert a stored `PendingUserOpEntry` (decimal-string fields) plus a
|
|
1645
|
+
* signature into the JSON-RPC wire format for `eth_sendUserOperation`.
|
|
1646
|
+
*
|
|
1647
|
+
* Bridges the gap between the serialized storage format (decimal strings,
|
|
1648
|
+
* safe for JSON/Redis) and `serializeUserOpToJsonRpc` which expects bigints.
|
|
1649
|
+
*/
|
|
1650
|
+
declare function serializeEntryToJsonRpc(entry: PendingUserOpEntry, signature: Hex): Record<string, string | null>;
|
|
1651
|
+
|
|
1643
1652
|
interface IssuerRegistryRecord {
|
|
1644
1653
|
issuerAddress: Address;
|
|
1645
1654
|
signerAddress: Address;
|
|
@@ -1733,4 +1742,4 @@ declare class IssuerStateValidator {
|
|
|
1733
1742
|
/** SDK package version — bumped on every release */
|
|
1734
1743
|
declare const PAFI_ISSUER_SDK_VERSION = "0.4.0";
|
|
1735
1744
|
|
|
1736
|
-
export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintingStatus, NonceManager, PAFI_ISSUER_SDK_VERSION, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PendingUserOpEntry, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, RelayError, type RelayErrorCode, RelayService, type RelayUserOpRequest, type RelayUserOpResponse, type RetryConfig, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider };
|
|
1745
|
+
export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintingStatus, NonceManager, PAFI_ISSUER_SDK_VERSION, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PendingUserOpEntry, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, RelayError, type RelayErrorCode, RelayService, type RelayUserOpRequest, type RelayUserOpResponse, type RetryConfig, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, serializeEntryToJsonRpc };
|
package/dist/index.d.ts
CHANGED
|
@@ -1640,6 +1640,15 @@ interface IPendingUserOpStore {
|
|
|
1640
1640
|
delete(lockId: string): Promise<void>;
|
|
1641
1641
|
}
|
|
1642
1642
|
|
|
1643
|
+
/**
|
|
1644
|
+
* Convert a stored `PendingUserOpEntry` (decimal-string fields) plus a
|
|
1645
|
+
* signature into the JSON-RPC wire format for `eth_sendUserOperation`.
|
|
1646
|
+
*
|
|
1647
|
+
* Bridges the gap between the serialized storage format (decimal strings,
|
|
1648
|
+
* safe for JSON/Redis) and `serializeUserOpToJsonRpc` which expects bigints.
|
|
1649
|
+
*/
|
|
1650
|
+
declare function serializeEntryToJsonRpc(entry: PendingUserOpEntry, signature: Hex): Record<string, string | null>;
|
|
1651
|
+
|
|
1643
1652
|
interface IssuerRegistryRecord {
|
|
1644
1653
|
issuerAddress: Address;
|
|
1645
1654
|
signerAddress: Address;
|
|
@@ -1733,4 +1742,4 @@ declare class IssuerStateValidator {
|
|
|
1733
1742
|
/** SDK package version — bumped on every release */
|
|
1734
1743
|
declare const PAFI_ISSUER_SDK_VERSION = "0.4.0";
|
|
1735
1744
|
|
|
1736
|
-
export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintingStatus, NonceManager, PAFI_ISSUER_SDK_VERSION, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PendingUserOpEntry, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, RelayError, type RelayErrorCode, RelayService, type RelayUserOpRequest, type RelayUserOpResponse, type RetryConfig, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider };
|
|
1745
|
+
export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintingStatus, NonceManager, PAFI_ISSUER_SDK_VERSION, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PendingUserOpEntry, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, RelayError, type RelayErrorCode, RelayService, type RelayUserOpRequest, type RelayUserOpResponse, type RetryConfig, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, serializeEntryToJsonRpc };
|
package/dist/index.js
CHANGED
|
@@ -2056,6 +2056,28 @@ function createIssuerService(config) {
|
|
|
2056
2056
|
};
|
|
2057
2057
|
}
|
|
2058
2058
|
|
|
2059
|
+
// src/userop-store/serialize.ts
|
|
2060
|
+
import { serializeUserOpToJsonRpc } from "@pafi-dev/core";
|
|
2061
|
+
function serializeEntryToJsonRpc(entry, signature) {
|
|
2062
|
+
return serializeUserOpToJsonRpc(
|
|
2063
|
+
{
|
|
2064
|
+
sender: entry.sender,
|
|
2065
|
+
nonce: BigInt(entry.nonce),
|
|
2066
|
+
callData: entry.callData,
|
|
2067
|
+
callGasLimit: BigInt(entry.callGasLimit),
|
|
2068
|
+
verificationGasLimit: BigInt(entry.verificationGasLimit),
|
|
2069
|
+
preVerificationGas: BigInt(entry.preVerificationGas),
|
|
2070
|
+
maxFeePerGas: BigInt(entry.maxFeePerGas),
|
|
2071
|
+
maxPriorityFeePerGas: BigInt(entry.maxPriorityFeePerGas),
|
|
2072
|
+
paymaster: entry.paymaster,
|
|
2073
|
+
paymasterVerificationGasLimit: entry.paymasterVerificationGasLimit != null ? BigInt(entry.paymasterVerificationGasLimit) : void 0,
|
|
2074
|
+
paymasterPostOpGasLimit: entry.paymasterPostOpGasLimit != null ? BigInt(entry.paymasterPostOpGasLimit) : void 0,
|
|
2075
|
+
paymasterData: entry.paymasterData
|
|
2076
|
+
},
|
|
2077
|
+
signature
|
|
2078
|
+
);
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2059
2081
|
// src/issuer-state/validator.ts
|
|
2060
2082
|
import { getAddress as getAddress9 } from "viem";
|
|
2061
2083
|
import {
|
|
@@ -2259,6 +2281,7 @@ export {
|
|
|
2259
2281
|
authenticateRequest,
|
|
2260
2282
|
createIssuerService,
|
|
2261
2283
|
createSubgraphNativeUsdtQuoter,
|
|
2262
|
-
createSubgraphPoolsProvider
|
|
2284
|
+
createSubgraphPoolsProvider,
|
|
2285
|
+
serializeEntryToJsonRpc
|
|
2263
2286
|
};
|
|
2264
2287
|
//# sourceMappingURL=index.js.map
|