@pafi-dev/issuer 0.7.7 → 0.7.8
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 +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.cts
CHANGED
|
@@ -2304,6 +2304,15 @@ interface MobileSubmitDto {
|
|
|
2304
2304
|
interface DelegateStatusDto {
|
|
2305
2305
|
isDelegated: boolean;
|
|
2306
2306
|
batchExecutorAddress: Address;
|
|
2307
|
+
/**
|
|
2308
|
+
* EOA tx count fetched on-chain via `getTransactionCount(blockTag: 'pending')`.
|
|
2309
|
+
* Mobile passes this VERBATIM into Privy `signAuthorization({ ..., nonce })` —
|
|
2310
|
+
* MUST NOT hardcode `0` or fetch independently. For a fresh embedded wallet
|
|
2311
|
+
* it will be `"0"`, but re-delegation or post-activity wallets will be > 0.
|
|
2312
|
+
* Returned as decimal string (preserves bigint precision over JSON).
|
|
2313
|
+
*/
|
|
2314
|
+
delegationNonce: string;
|
|
2315
|
+
chainId: number;
|
|
2307
2316
|
}
|
|
2308
2317
|
interface DelegatePrepareDto {
|
|
2309
2318
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2304,6 +2304,15 @@ interface MobileSubmitDto {
|
|
|
2304
2304
|
interface DelegateStatusDto {
|
|
2305
2305
|
isDelegated: boolean;
|
|
2306
2306
|
batchExecutorAddress: Address;
|
|
2307
|
+
/**
|
|
2308
|
+
* EOA tx count fetched on-chain via `getTransactionCount(blockTag: 'pending')`.
|
|
2309
|
+
* Mobile passes this VERBATIM into Privy `signAuthorization({ ..., nonce })` —
|
|
2310
|
+
* MUST NOT hardcode `0` or fetch independently. For a fresh embedded wallet
|
|
2311
|
+
* it will be `"0"`, but re-delegation or post-activity wallets will be > 0.
|
|
2312
|
+
* Returned as decimal string (preserves bigint precision over JSON).
|
|
2313
|
+
*/
|
|
2314
|
+
delegationNonce: string;
|
|
2315
|
+
chainId: number;
|
|
2307
2316
|
}
|
|
2308
2317
|
interface DelegatePrepareDto {
|
|
2309
2318
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2733,12 +2733,18 @@ var IssuerApiAdapter = class {
|
|
|
2733
2733
|
// ------------------------------ Delegate endpoints -----------------------
|
|
2734
2734
|
async delegateStatus(authenticatedAddress, chainId) {
|
|
2735
2735
|
const { batchExecutor } = getContractAddresses6(chainId);
|
|
2736
|
-
const code = await
|
|
2737
|
-
address: authenticatedAddress
|
|
2738
|
-
|
|
2736
|
+
const [code, nonce] = await Promise.all([
|
|
2737
|
+
this.cfg.provider.getCode({ address: authenticatedAddress }),
|
|
2738
|
+
this.cfg.provider.getTransactionCount({
|
|
2739
|
+
address: authenticatedAddress,
|
|
2740
|
+
blockTag: "pending"
|
|
2741
|
+
})
|
|
2742
|
+
]);
|
|
2739
2743
|
return {
|
|
2740
2744
|
isDelegated: parseEip7702DelegatedAddress2(code) !== null,
|
|
2741
|
-
batchExecutorAddress: batchExecutor
|
|
2745
|
+
batchExecutorAddress: batchExecutor,
|
|
2746
|
+
delegationNonce: nonce.toString(),
|
|
2747
|
+
chainId
|
|
2742
2748
|
};
|
|
2743
2749
|
}
|
|
2744
2750
|
/**
|
|
@@ -3704,7 +3710,7 @@ var IssuerStateValidator = class _IssuerStateValidator {
|
|
|
3704
3710
|
};
|
|
3705
3711
|
|
|
3706
3712
|
// src/index.ts
|
|
3707
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.7.
|
|
3713
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.7.8" : "dev";
|
|
3708
3714
|
export {
|
|
3709
3715
|
AdapterMisconfiguredError,
|
|
3710
3716
|
AuthError,
|