@aastar/sdk 0.24.2 → 0.26.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.
Files changed (126) hide show
  1. package/dist/UserClient-5PQP6APK.js +6 -0
  2. package/dist/{UserClient-DPJ6E2XL.js.map → UserClient-5PQP6APK.js.map} +1 -1
  3. package/dist/UserClient-CD7R3335.cjs +15 -0
  4. package/dist/{UserClient-4MRK2D7W.cjs.map → UserClient-CD7R3335.cjs.map} +1 -1
  5. package/dist/account.cjs +8 -8
  6. package/dist/account.js +3 -3
  7. package/dist/addresses-D12T3kLs.d.cts +210 -0
  8. package/dist/addresses-D12T3kLs.d.ts +210 -0
  9. package/dist/admin.cjs +4 -4
  10. package/dist/admin.js +3 -3
  11. package/dist/airaccount.cjs +135 -103
  12. package/dist/airaccount.d.cts +1 -1
  13. package/dist/airaccount.d.ts +1 -1
  14. package/dist/airaccount.js +3 -3
  15. package/dist/channel.cjs +7 -7
  16. package/dist/channel.js +3 -3
  17. package/dist/{chunk-S7IUUQ5E.cjs → chunk-2RHBOBL7.cjs} +6 -6
  18. package/dist/{chunk-S7IUUQ5E.cjs.map → chunk-2RHBOBL7.cjs.map} +1 -1
  19. package/dist/{chunk-BPAAWQQA.js → chunk-4GJSK7E6.js} +557 -115
  20. package/dist/chunk-4GJSK7E6.js.map +1 -0
  21. package/dist/{chunk-EEWLL7GE.js → chunk-6DZCDV4Q.js} +2137 -13
  22. package/dist/chunk-6DZCDV4Q.js.map +1 -0
  23. package/dist/{chunk-MCDFQ5JH.cjs → chunk-7HTUDNH3.cjs} +11 -11
  24. package/dist/{chunk-MCDFQ5JH.cjs.map → chunk-7HTUDNH3.cjs.map} +1 -1
  25. package/dist/{chunk-UJPW54CK.js → chunk-7JVL5CU3.js} +3 -3
  26. package/dist/{chunk-UJPW54CK.js.map → chunk-7JVL5CU3.js.map} +1 -1
  27. package/dist/{chunk-7FLPD3V4.js → chunk-A4FO6FKN.js} +3 -3
  28. package/dist/{chunk-7FLPD3V4.js.map → chunk-A4FO6FKN.js.map} +1 -1
  29. package/dist/{chunk-MANVOQY7.cjs → chunk-CI4UJW5Y.cjs} +5 -5
  30. package/dist/{chunk-MANVOQY7.cjs.map → chunk-CI4UJW5Y.cjs.map} +1 -1
  31. package/dist/{chunk-PUE5GEKK.js → chunk-COTHBCR2.js} +3 -3
  32. package/dist/{chunk-PUE5GEKK.js.map → chunk-COTHBCR2.js.map} +1 -1
  33. package/dist/{chunk-TQIRRSGL.cjs → chunk-FIMXPANS.cjs} +4 -4
  34. package/dist/{chunk-TQIRRSGL.cjs.map → chunk-FIMXPANS.cjs.map} +1 -1
  35. package/dist/{chunk-MXJEULSE.cjs → chunk-G33MXEHU.cjs} +29 -2
  36. package/dist/chunk-G33MXEHU.cjs.map +1 -0
  37. package/dist/{chunk-FUY4MHPM.cjs → chunk-GASCTLKR.cjs} +9 -9
  38. package/dist/{chunk-FUY4MHPM.cjs.map → chunk-GASCTLKR.cjs.map} +1 -1
  39. package/dist/{chunk-W73Y6JWZ.js → chunk-IG4BG25C.js} +6 -6
  40. package/dist/{chunk-W73Y6JWZ.js.map → chunk-IG4BG25C.js.map} +1 -1
  41. package/dist/{chunk-TGEVD7OR.cjs → chunk-J3UAXGNP.cjs} +16 -16
  42. package/dist/{chunk-TGEVD7OR.cjs.map → chunk-J3UAXGNP.cjs.map} +1 -1
  43. package/dist/{chunk-Y5QM4LI4.js → chunk-JCEUTCFZ.js} +4 -4
  44. package/dist/{chunk-Y5QM4LI4.js.map → chunk-JCEUTCFZ.js.map} +1 -1
  45. package/dist/{chunk-IB3KOSHW.cjs → chunk-KOWTQJIX.cjs} +2177 -49
  46. package/dist/chunk-KOWTQJIX.cjs.map +1 -0
  47. package/dist/chunk-L6D2AGTF.js +500 -0
  48. package/dist/chunk-L6D2AGTF.js.map +1 -0
  49. package/dist/{chunk-KYXXIKEI.cjs → chunk-LRPAX5AG.cjs} +32 -32
  50. package/dist/{chunk-KYXXIKEI.cjs.map → chunk-LRPAX5AG.cjs.map} +1 -1
  51. package/dist/{chunk-UCLK6LTB.js → chunk-MBWBHKUE.js} +28 -3
  52. package/dist/chunk-MBWBHKUE.js.map +1 -0
  53. package/dist/{chunk-3FRNYRWI.cjs → chunk-NHDZQPDE.cjs} +26 -26
  54. package/dist/{chunk-3FRNYRWI.cjs.map → chunk-NHDZQPDE.cjs.map} +1 -1
  55. package/dist/{chunk-HP44S5U5.cjs → chunk-OBPTMV5W.cjs} +5 -5
  56. package/dist/{chunk-HP44S5U5.cjs.map → chunk-OBPTMV5W.cjs.map} +1 -1
  57. package/dist/{chunk-SX5GUCTF.js → chunk-QTXPAGNX.js} +9 -9
  58. package/dist/{chunk-SX5GUCTF.js.map → chunk-QTXPAGNX.js.map} +1 -1
  59. package/dist/{chunk-PTVXBXZX.js → chunk-UANSP3OK.js} +3 -3
  60. package/dist/{chunk-PTVXBXZX.js.map → chunk-UANSP3OK.js.map} +1 -1
  61. package/dist/{chunk-P3B6UTED.js → chunk-UTSFTWFC.js} +3 -3
  62. package/dist/{chunk-P3B6UTED.js.map → chunk-UTSFTWFC.js.map} +1 -1
  63. package/dist/{chunk-4Q6FADF6.cjs → chunk-UZE7IPOK.cjs} +571 -121
  64. package/dist/chunk-UZE7IPOK.cjs.map +1 -0
  65. package/dist/chunk-WTURYJEA.cjs +504 -0
  66. package/dist/chunk-WTURYJEA.cjs.map +1 -0
  67. package/dist/{chunk-XBZGVJ5K.js → chunk-YR7CTWY6.js} +3 -3
  68. package/dist/{chunk-XBZGVJ5K.js.map → chunk-YR7CTWY6.js.map} +1 -1
  69. package/dist/{contract-addresses-RABD77VP.cjs → contract-addresses-6K6IB5OB.cjs} +13 -13
  70. package/dist/{contract-addresses-RABD77VP.cjs.map → contract-addresses-6K6IB5OB.cjs.map} +1 -1
  71. package/dist/{contract-addresses-TVXSRQ7I.js → contract-addresses-CHZ7PK5H.js} +3 -3
  72. package/dist/{contract-addresses-TVXSRQ7I.js.map → contract-addresses-CHZ7PK5H.js.map} +1 -1
  73. package/dist/core.cjs +285 -261
  74. package/dist/core.d.cts +6 -175
  75. package/dist/core.d.ts +6 -175
  76. package/dist/core.js +2 -2
  77. package/dist/dapp.cjs +6 -6
  78. package/dist/dapp.js +3 -3
  79. package/dist/enduser.cjs +7 -7
  80. package/dist/enduser.js +4 -4
  81. package/dist/identity.cjs +6 -6
  82. package/dist/identity.js +3 -3
  83. package/dist/index.cjs +406 -374
  84. package/dist/index.d.cts +3 -2
  85. package/dist/index.d.ts +3 -2
  86. package/dist/index.js +17 -17
  87. package/dist/kms.cjs +135 -103
  88. package/dist/kms.d.cts +330 -26
  89. package/dist/kms.d.ts +330 -26
  90. package/dist/kms.js +3 -3
  91. package/dist/operator.cjs +7 -7
  92. package/dist/operator.js +3 -3
  93. package/dist/paymaster.cjs +16 -16
  94. package/dist/paymaster.js +3 -3
  95. package/dist/{src-VO7TXJPG.cjs → src-DNURNUIA.cjs} +287 -263
  96. package/dist/src-DNURNUIA.cjs.map +1 -0
  97. package/dist/{src-RM6DDR7K.cjs → src-DZDH3BSU.cjs} +18 -18
  98. package/dist/src-DZDH3BSU.cjs.map +1 -0
  99. package/dist/{src-HKOFZ4V3.js → src-EVM7OESP.js} +5 -5
  100. package/dist/src-EVM7OESP.js.map +1 -0
  101. package/dist/src-FY3KAPPC.js +5 -0
  102. package/dist/src-FY3KAPPC.js.map +1 -0
  103. package/dist/tokens.cjs +12 -4
  104. package/dist/tokens.d.cts +133 -1
  105. package/dist/tokens.d.ts +133 -1
  106. package/dist/tokens.js +3 -3
  107. package/dist/x402.cjs +26 -26
  108. package/dist/x402.js +3 -3
  109. package/package.json +1 -1
  110. package/dist/UserClient-4MRK2D7W.cjs +0 -15
  111. package/dist/UserClient-DPJ6E2XL.js +0 -6
  112. package/dist/chunk-4Q6FADF6.cjs.map +0 -1
  113. package/dist/chunk-BPAAWQQA.js.map +0 -1
  114. package/dist/chunk-EEWLL7GE.js.map +0 -1
  115. package/dist/chunk-IB3KOSHW.cjs.map +0 -1
  116. package/dist/chunk-MXJEULSE.cjs.map +0 -1
  117. package/dist/chunk-O2CN77MV.js +0 -226
  118. package/dist/chunk-O2CN77MV.js.map +0 -1
  119. package/dist/chunk-UCLK6LTB.js.map +0 -1
  120. package/dist/chunk-V23XPVHO.cjs +0 -228
  121. package/dist/chunk-V23XPVHO.cjs.map +0 -1
  122. package/dist/src-HKOFZ4V3.js.map +0 -1
  123. package/dist/src-L2BLX34S.js +0 -5
  124. package/dist/src-L2BLX34S.js.map +0 -1
  125. package/dist/src-RM6DDR7K.cjs.map +0 -1
  126. package/dist/src-VO7TXJPG.cjs.map +0 -1
package/dist/kms.d.cts CHANGED
@@ -334,7 +334,28 @@ interface RunCeremonyOptions {
334
334
  rpId?: string;
335
335
  origin?: string;
336
336
  signCount?: number;
337
+ /**
338
+ * The 32-byte payload digest being authorized (e.g. the SignHash hash). When set,
339
+ * the WebAuthn challenge is bound to it as `SHA-256(nonce ‖ payload)` instead of the
340
+ * raw nonce — this is the "what you see is what you sign" (WYSIWYS) commitment the
341
+ * TA verifies (AirAccount #68). REQUIRED once the KMS runs in strict mode
342
+ * (`--features strict-challenge`); in the default transition mode the raw nonce is
343
+ * still accepted. Omit only for non-signing ceremonies (none today). Accepts a
344
+ * Uint8Array or a `0x` hex string.
345
+ */
346
+ payload?: Uint8Array | `0x${string}`;
337
347
  }
348
+ /**
349
+ * Compute the WYSIWYS-bound WebAuthn challenge for a signing ceremony:
350
+ * `base64url( SHA-256( decode(nonce) ‖ payload ) )`.
351
+ *
352
+ * `nonce` is the base64url challenge from BeginAuthentication; `payload` is the 32-byte
353
+ * digest about to be signed (the SignHash hash). The KMS/TA recomputes this exact value
354
+ * and rejects the signature if it doesn't match (AirAccount #68). Use this in a browser
355
+ * frontend that builds its own WebAuthn assertion for a device passkey, so the per-call
356
+ * `webAuthnAssertion` it sends commits to the operation hash.
357
+ */
358
+ declare function commitChallenge(nonceBase64Url: string, payload: Uint8Array | `0x${string}`): string;
338
359
  /**
339
360
  * Run a full WebAuthn challenge-binding ceremony (AirAccount #49):
340
361
  * 1. fetch a one-time TA challenge from the `begin` endpoint,
@@ -446,6 +467,71 @@ interface KmsEip712FieldValue {
446
467
  name: string;
447
468
  value: unknown;
448
469
  }
470
+ /**
471
+ * Compute the standard EIP-712 digest for a KMS typed-data request — the same value the
472
+ * KMS hashes host-side, and the payload to commit to in the WebAuthn ceremony (WYSIWYS,
473
+ * AirAccount #68). Converts the KMS wire format (`types` = array of struct defs, `message`
474
+ * = array of `{name,value}`) into viem's `hashTypedData` input. `EIP712Domain` is dropped
475
+ * from `types` (viem derives it from `domain`).
476
+ */
477
+ declare function eip712Digest(params: {
478
+ domain: KmsEip712Domain;
479
+ primaryType: string;
480
+ types: KmsEip712TypeDef[];
481
+ message: KmsEip712FieldValue[];
482
+ }): `0x${string}`;
483
+ /**
484
+ * Compute the KMS "mint" digest — the WYSIWYS commitment payload for the key-minting
485
+ * ceremonies (AirAccount #115): `create_agent_key` (`agent`) / `create_p256_session_key`
486
+ * (`p256`). Mirrors the TA byte-for-byte (`ta/src/main.rs` agent_mint_digest /
487
+ * p256_session_mint_digest), verified against the locked test vectors on aastar-sdk#135:
488
+ *
489
+ * mint_digest = SHA-256( tag ‖ walletId[16B UUID] ‖ index[u32 BE] ‖ ttlSecs[i64 BE] ‖ SHA-256(subject) )
490
+ *
491
+ * Pass the result as the ceremony `payload` (the ceremony binds `challenge =
492
+ * SHA-256(nonce ‖ mint_digest)` via {@link commitChallenge}).
493
+ *
494
+ * NOTE on `index`: the agent/session index is allocated server-side
495
+ * (`next_agent_index_for_wallet`), so the caller must supply the index the KMS will assign
496
+ * (e.g. the current count for a new key) — a mismatch fails closed under strict mode.
497
+ * `subject` is the JWT `sub` (typically the human key id); `ttlSecs` the JWT lifetime.
498
+ */
499
+ declare function mintDigest(p: {
500
+ kind: "agent" | "p256";
501
+ walletId: string;
502
+ index: number;
503
+ ttlSecs: number | bigint;
504
+ subject: string;
505
+ }): `0x${string}`;
506
+ /**
507
+ * Compute the grant-session `final_hash` — the value the TA signs and the WYSIWYS commitment
508
+ * payload for the grant ceremony (AirAccount #112). Equals the contract's `buildGrantHash()` /
509
+ * `buildP256GrantHash()` output byte-for-byte (`SessionKeyValidator._buildGrantHash` already
510
+ * applies `inner.toEthSignedMessageHash()`); verified against the live contract (E2E oracle).
511
+ * `inner = keccak256(abi.encode(domainTag, chainId,
512
+ * verifyingContract, account, <sessionKey | keyX,keyY>, expiry, contractScope, selectorScope,
513
+ * velocityLimit, velocityWindow, callTargetsHash, selectorsHash, nonce))` with
514
+ * `callTargetsHash = keccak256(abi.encodePacked(callTargets))`,
515
+ * `selectorsHash = keccak256(abi.encodePacked(selectorAllowlist))`; then EIP-191-prefixed.
516
+ */
517
+ declare function grantSessionFinalHash(p: {
518
+ chainId: number;
519
+ verifyingContract: string;
520
+ account: string;
521
+ expiry: number;
522
+ contractScope: string;
523
+ selectorScope: string;
524
+ velocityLimit: number;
525
+ velocityWindow: number;
526
+ callTargets: string[];
527
+ selectorAllowlist: string[];
528
+ nonce: number | bigint | string;
529
+ } & ({
530
+ sessionKey: string;
531
+ } | {
532
+ keyX: string;
533
+ keyY: string;
534
+ })): `0x${string}`;
449
535
  interface KmsSignTypedDataRequest {
450
536
  keyId: string;
451
537
  hdPath?: string;
@@ -666,6 +752,20 @@ declare class KmsManager {
666
752
  WebAuthn?: WebAuthnAssertion;
667
753
  Passkey?: LegacyPasskeyAssertion;
668
754
  }): Promise<KmsChangePasskeyResponse>;
755
+ /** Schedule key deletion, running the WebAuthn ceremony internally (raw-nonce). */
756
+ deleteKeyWithCeremony(params: {
757
+ KeyId: string;
758
+ PendingWindowInDays?: number;
759
+ }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsDeleteKeyResponse>;
760
+ /** Unfreeze a dormant key, running the WebAuthn ceremony internally (raw-nonce). */
761
+ unfreezeKeyWithCeremony(params: {
762
+ KeyId: string;
763
+ }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsUnfreezeKeyResponse>;
764
+ /** Rotate the bound passkey, running the WebAuthn ceremony internally (raw-nonce). */
765
+ changePasskeyWithCeremony(params: {
766
+ KeyId: string;
767
+ PasskeyPublicKey: string;
768
+ }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsChangePasskeyResponse>;
669
769
  /**
670
770
  * Sign a message or an EIP-155 transaction (WebAuthn-gated).
671
771
  * Provide exactly one of `Message` (hex) or `Transaction`. For a raw 32-byte
@@ -735,17 +835,36 @@ declare class KmsManager {
735
835
  DerivationPath: string;
736
836
  }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsDeriveAddressResponse>;
737
837
  /**
738
- * Sign a message or EIP-155 transaction, running the challenge-binding ceremony
739
- * internally. `params.KeyId` is required (it identifies the wallet to challenge).
838
+ * Sign a message or EIP-155 transaction via `/Sign`, running the ceremony internally.
839
+ * `params.KeyId` is required.
840
+ *
841
+ * ⚠️ STRICT MODE: unlike {@link signHashWithCeremony} / {@link signTypedDataWithCeremony},
842
+ * this does NOT auto-bind a payload commitment, because the TA derives the signed digest
843
+ * from `Message` / `Transaction` host-side (EIP-191 / RLP) and the SDK can't reproduce it
844
+ * byte-exactly for every input. So it sends the RAW nonce by default — which the KMS will
845
+ * REJECT once strict mode (#63) is on. For strict-safe signing either:
846
+ * - pass `options.payload` = the exact digest the TA will sign (you computed it), or
847
+ * - prefer {@link signHashWithCeremony} (commits to a known 32-byte hash).
740
848
  */
741
849
  signWithCeremony(params: Omit<KmsSignRequest, "WebAuthn" | "Passkey"> & {
742
850
  KeyId: string;
743
851
  }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignResponse>;
744
- /** Sign a 32-byte digest, running the challenge-binding ceremony internally. */
852
+ /**
853
+ * Sign a 32-byte digest, running the challenge-binding ceremony internally.
854
+ * Binds the challenge to `hash` (WYSIWYS commitment, #68) by default — pass an
855
+ * explicit `options.payload` only to override.
856
+ */
745
857
  signHashWithCeremony(hash: string, target: {
746
858
  KeyId: string;
747
859
  }, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignHashResponse>;
748
- /** Sign EIP-712 typed data, running the challenge-binding ceremony internally. */
860
+ /**
861
+ * Sign EIP-712 typed data, running the challenge-binding ceremony internally.
862
+ * Auto-binds the WYSIWYS commitment (#68): the ceremony challenge is
863
+ * `SHA-256(nonce ‖ eip712Digest)`, where `eip712Digest` is the standard EIP-712
864
+ * digest the KMS hashes host-side — computed here via {@link eip712Digest} so the
865
+ * user's signature commits to the exact typed-data payload. Pass an explicit
866
+ * `options.payload` only to override.
867
+ */
749
868
  signTypedDataWithCeremony(params: Omit<KmsSignTypedDataRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignTypedDataResponse>;
750
869
  /**
751
870
  * Sign a GRANT_SESSION_V2 hash, running the grant-session ceremony internally
@@ -769,37 +888,113 @@ declare class KmsManager {
769
888
  * challenge from {@link beginGrantSessionAuth} instead.)
770
889
  */
771
890
  beginWebAuthnAuth(keyId: string): Promise<KmsBeginAuthenticationResponse>;
891
+ /**
892
+ * Create a KMS signer that authorizes each signature with a LEGACY raw passkey
893
+ * assertion (reusable, no challenge consumption).
894
+ *
895
+ * @deprecated The KMS (v0.20.0+) rejects legacy raw passkey assertions for
896
+ * signing/mutating operations (`/SignHash` → 400, "no challenge binding —
897
+ * replayable"), unless `KMS_ALLOW_LEGACY_PASSKEY=1` is set on the KMS (test
898
+ * only). Prefer {@link createKmsSignerWithCeremony}, which runs a one-time
899
+ * challenge-bound WebAuthn ceremony per signature.
900
+ */
772
901
  createKmsSigner(keyId: string, address: string, assertionProvider: () => Promise<LegacyPasskeyAssertion>): KmsSigner;
902
+ /**
903
+ * Create a KMS signer that authorizes each signature with a one-time,
904
+ * challenge-bound WebAuthn ceremony (production-safe; replay-protected).
905
+ *
906
+ * Every `signMessage` call runs a FRESH ceremony (BeginAuthentication →
907
+ * authenticator assertion → `/SignHash` with the `WebAuthn` field), because the
908
+ * KMS consumes the challenge atomically (one challenge ⇒ one signature). A
909
+ * Tier-2/3 BLS transfer that needs N owner signatures therefore triggers N
910
+ * ceremonies — see {@link BLSSignatureService} (which now skips the unused
911
+ * userOpHash owner-ECDSA for tiered signatures, so Tier-2 needs only one).
912
+ *
913
+ * @param ceremonySigner authenticator that signs the WebAuthn challenge
914
+ * (a browser passkey on the client, or {@link P256PasskeySigner} server-side).
915
+ */
916
+ createKmsSignerWithCeremony(keyId: string, address: string, ceremonySigner: PasskeyCeremonySigner, ceremonyOptions?: Omit<RunCeremonyOptions, "signer">, commitPayload?: boolean): KmsSigner;
773
917
  }
918
+ /** How a {@link KmsSigner} authorizes each `/SignHash` call. */
919
+ type KmsSignerAuth = {
920
+ mode: "legacy";
921
+ assertionProvider: () => Promise<LegacyPasskeyAssertion>;
922
+ } | {
923
+ mode: "ceremony";
924
+ ceremonySigner: PasskeyCeremonySigner;
925
+ ceremonyOptions?: Omit<RunCeremonyOptions, "signer">;
926
+ /**
927
+ * Bind each ceremony challenge to the payload via `SHA-256(nonce ‖ hash)`
928
+ * (WYSIWYS, AirAccount #68). DEFAULT `true` — verified end-to-end against the live
929
+ * KMS (kms.aastar.io) once AirAccount#110 (host/TA challenge alignment) shipped; the
930
+ * KMS transition mode accepts it now and strict mode (#63) will REQUIRE it. Set
931
+ * `false` only to force the legacy raw-nonce challenge (not strict-safe).
932
+ */
933
+ commitPayload?: boolean;
934
+ };
774
935
  /**
775
- * KMS-backed signer with Passkey assertion.
936
+ * KMS-backed signer (EIP-191 personal-sign over a digest).
776
937
  *
777
- * Each signing operation calls the `assertionProvider` to obtain a Legacy
778
- * Passkey assertion, which is then passed to KMS SignHash. The Legacy format
779
- * is reusable (no challenge consumption), enabling BLS dual-signing.
938
+ * Two authorization modes (see {@link KmsSignerAuth}):
939
+ * - `ceremony` (preferred): each signature runs a fresh one-time WebAuthn
940
+ * ceremony and calls KMS `SignHash` with the challenge-bound `WebAuthn` field
941
+ * (replay-safe; what the KMS now requires).
942
+ * - `legacy` (deprecated): each signature reuses a raw passkey assertion via
943
+ * KMS `SignHash` `Passkey` field — rejected by KMS unless
944
+ * `KMS_ALLOW_LEGACY_PASSKEY=1` (test only).
780
945
  *
781
946
  * Narrowed during the ethers -> viem migration: only the EIP-191 personal-sign
782
- * and address-read behaviour is actually consumed by the SDK, so the former
783
- * ethers.AbstractSigner surface (signTransaction / signTypedData / connect /
784
- * provider) has been dropped.
947
+ * and address-read behaviour is consumed by the SDK.
785
948
  */
786
949
  declare class KmsSigner {
787
950
  private readonly keyId;
788
951
  private readonly _address;
789
952
  private readonly kmsManager;
790
- private readonly assertionProvider;
791
- constructor(keyId: string, _address: string, kmsManager: KmsManager, assertionProvider: () => Promise<LegacyPasskeyAssertion>);
953
+ private readonly auth;
954
+ constructor(keyId: string, _address: string, kmsManager: KmsManager, auth: KmsSignerAuth);
792
955
  getAddress(): Promise<string>;
793
- signMessage(message: string | Uint8Array): Promise<string>;
956
+ /**
957
+ * EIP-191 personal-sign over a digest. A string is hashed as UTF-8 text, a byte
958
+ * array as raw bytes — byte-identical to ethers `hashMessage`.
959
+ *
960
+ * @param webAuthnAssertion OPTIONAL pre-built, one-time ceremony assertion. Use
961
+ * this in server flows where the passkey lives on the USER's device: the
962
+ * frontend runs the BeginAuthentication ceremony and the backend forwards the
963
+ * resulting `{ ChallengeId, Credential }` here. When supplied it takes
964
+ * precedence over the signer's baked-in auth mode. Each assertion is one-time
965
+ * (the KMS consumes the challenge), so a caller that needs N signatures must
966
+ * supply N distinct assertions.
967
+ *
968
+ * WYSIWYS (AirAccount #68): the frontend MUST build the assertion over the
969
+ * payload-committed challenge `commitChallenge(nonce, hashOf(message))`, not the
970
+ * raw nonce — otherwise a compromised host could swap the signed payload. The
971
+ * raw-nonce assertion only works while the KMS runs in transition mode. (The
972
+ * signer's own ceremony mode does this automatically.)
973
+ */
974
+ signMessage(message: string | Uint8Array, webAuthnAssertion?: WebAuthnAssertion): Promise<string>;
794
975
  }
795
976
 
796
977
  /**
797
- * Context for passing Passkey assertion data through the signing chain.
798
- * Used by KMS-backed signers to authenticate signing operations.
978
+ * Context for passing a LEGACY raw passkey assertion through the signing chain.
979
+ *
980
+ * @deprecated KMS v0.20.0+ rejects legacy raw passkey assertions for signing
981
+ * (no challenge binding → replayable). Prefer {@link WebAuthnCeremonyContext}.
799
982
  */
800
983
  interface PasskeyAssertionContext {
801
984
  assertion: LegacyPasskeyAssertion;
802
985
  }
986
+ /**
987
+ * Context carrying a one-time, challenge-bound WebAuthn ceremony assertion
988
+ * (the replay-safe path the KMS now requires). In server transfer flows the
989
+ * passkey lives on the USER's device: the frontend runs the BeginAuthentication
990
+ * ceremony and the backend forwards the resulting `{ ChallengeId, Credential }`.
991
+ * Each assertion is one-time — a flow needing N signatures supplies N of them.
992
+ */
993
+ interface WebAuthnCeremonyContext {
994
+ webAuthnAssertion: WebAuthnAssertion;
995
+ }
996
+ /** Either auth context accepted by a KMS-backed signer. */
997
+ type SignerAuthContext = PasskeyAssertionContext | WebAuthnCeremonyContext;
803
998
  /**
804
999
  * Pluggable signer adapter — replaces NestJS AuthService wallet management.
805
1000
  * Implement this to provide signing capabilities from your key management system.
@@ -817,9 +1012,11 @@ interface ISignerAdapter {
817
1012
  * `account.signMessage({ raw: bytes })`). A `Uint8Array` (or raw `0x` hex) is
818
1013
  * signed as raw bytes — callers pass a 32-byte digest, NOT UTF-8 text.
819
1014
  *
820
- * @param ctx optional Passkey assertion context for KMS-backed signers.
1015
+ * @param ctx optional auth context for KMS-backed signers — a one-time
1016
+ * {@link WebAuthnCeremonyContext} (preferred) or a legacy
1017
+ * {@link PasskeyAssertionContext}.
821
1018
  */
822
- signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: PasskeyAssertionContext): Promise<`0x${string}`>;
1019
+ signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: SignerAuthContext): Promise<`0x${string}`>;
823
1020
  /**
824
1021
  * Ensure a signer exists for the user (create on demand if needed).
825
1022
  * Returns the signer's address.
@@ -1419,7 +1616,17 @@ declare class BLSSignatureService {
1419
1616
  /** Lazy-initialize BLSManager on first use. */
1420
1617
  private ensureInitialized;
1421
1618
  getActiveSignerNodes(): Promise<unknown[]>;
1422
- generateBLSSignature(userId: string, userOpHash: string, ctx?: PasskeyAssertionContext): Promise<BLSSignatureData>;
1619
+ generateBLSSignature(userId: string, userOpHash: string, ctx?: SignerAuthContext, options?: {
1620
+ /**
1621
+ * Skip the owner ECDSA over `userOpHash` (`aaSignature`). The cumulative
1622
+ * Tier-2 (algId 0x04) / Tier-3 (0x05) packings do NOT include it — they
1623
+ * carry only `messagePointSignature` (owner intent comes from the P256
1624
+ * passkey signature) — so computing it there is a wasted owner signature.
1625
+ * Under the WebAuthn-ceremony KMS path that wasted signature is also a
1626
+ * wasted user gesture, so tiered callers set this to `true`.
1627
+ */
1628
+ skipOwnerOpSignature?: boolean;
1629
+ }): Promise<BLSSignatureData>;
1423
1630
  packSignature(blsData: BLSSignatureData): Promise<string>;
1424
1631
  /**
1425
1632
  * Generate a tiered signature based on the required tier level.
@@ -1441,7 +1648,7 @@ declare class BLSSignatureService {
1441
1648
  userOpHash: string;
1442
1649
  p256Signature?: string;
1443
1650
  guardianSigner?: GuardianSigner;
1444
- ctx?: PasskeyAssertionContext;
1651
+ ctx?: SignerAuthContext;
1445
1652
  }): Promise<string>;
1446
1653
  }
1447
1654
 
@@ -1561,7 +1768,20 @@ interface ExecuteTransferParams {
1561
1768
  * the gas token address appended to paymasterData. Used when the paymaster
1562
1769
  * contract does not expose a public token() getter for auto-detection. */
1563
1770
  paymasterTokenAddress?: string;
1771
+ /**
1772
+ * LEGACY raw passkey assertion for KMS signing.
1773
+ * @deprecated KMS v0.20.0+ rejects it (replayable). Use {@link webAuthnAssertion}.
1774
+ */
1564
1775
  passkeyAssertion?: LegacyPasskeyAssertion;
1776
+ /**
1777
+ * One-time, challenge-bound WebAuthn ceremony assertion for KMS owner signing
1778
+ * (replay-safe; what the KMS now requires). The frontend runs the
1779
+ * BeginAuthentication ceremony with the user's device passkey and passes the
1780
+ * resulting `{ ChallengeId, Credential }` here. The challenge is consumed once,
1781
+ * so this authorizes exactly ONE owner signature — use the tiered path
1782
+ * (`useAirAccountTiering: true`), which needs a single owner signature.
1783
+ */
1784
+ webAuthnAssertion?: WebAuthnAssertion;
1565
1785
  /** P256 passkey signature (64 bytes hex). Required for AirAccount Tier 2/3. */
1566
1786
  p256Signature?: string;
1567
1787
  /** Guardian signer instance. Required for AirAccount Tier 3. */
@@ -1639,7 +1859,7 @@ declare class WalletManager {
1639
1859
  private readonly signer;
1640
1860
  constructor(signer: ISignerAdapter);
1641
1861
  getAddress(userId: string): Promise<`0x${string}`>;
1642
- signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: PasskeyAssertionContext): Promise<`0x${string}`>;
1862
+ signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: SignerAuthContext): Promise<`0x${string}`>;
1643
1863
  ensureSigner(userId: string): Promise<{
1644
1864
  address: `0x${string}`;
1645
1865
  }>;
@@ -1670,6 +1890,26 @@ declare class WalletManager {
1670
1890
  *
1671
1891
  * const account = await client.accounts.createAccount('user-123');
1672
1892
  * ```
1893
+ *
1894
+ * @example KMS-backed signing (production) — inject {@link KmsSignerAdapter} as the
1895
+ * `signer`. This is the wiring seam that carries a per-call WebAuthn ceremony
1896
+ * assertion (challenge-bound, replay-safe) from `executeTransfer` through to the
1897
+ * KMS `/SignHash`. The `userId → { keyId, address }` mapping is app-specific.
1898
+ * ```ts
1899
+ * import { AirAccountServerClient, KmsManager, KmsSignerAdapter } from '@aastar/airaccount/server';
1900
+ *
1901
+ * const kms = new KmsManager({ kmsEndpoint, kmsApiKey, kmsEnabled: true });
1902
+ * const client = new AirAccountServerClient({
1903
+ * ...rest,
1904
+ * signer: new KmsSignerAdapter(kms, async (userId) => lookupUserKey(userId)),
1905
+ * });
1906
+ * // Transfer with a one-time WebAuthn assertion (frontend ceremony) on the tiered path:
1907
+ * await client.transfers.executeTransfer(userId, {
1908
+ * ...params,
1909
+ * useAirAccountTiering: true,
1910
+ * webAuthnAssertion, // { ChallengeId, Credential } from BeginAuthentication
1911
+ * });
1912
+ * ```
1673
1913
  */
1674
1914
  declare class AirAccountServerClient {
1675
1915
  readonly ethereum: EthereumProvider;
@@ -2952,7 +3192,15 @@ declare class KmsAgentService {
2952
3192
  * the caller supplies the resulting assertion in the request.
2953
3193
  */
2954
3194
  revokeAgentCredential(params: KmsRevokeAgentCredentialRequest): Promise<KmsRevokeAgentCredentialResponse>;
2955
- /** Mint an agent key, running the challenge-binding ceremony internally. */
3195
+ /**
3196
+ * Mint an agent key, running the challenge-binding ceremony internally.
3197
+ *
3198
+ * STRICT MODE (AirAccount #115): bind the mint params by passing `options.payload =
3199
+ * mintDigest({ kind: "agent", walletId, index, ttlSecs, subject })` — `index` is the
3200
+ * agent_index the KMS will assign (query it first), `subject` the JWT sub (human key id),
3201
+ * `ttlSecs` the JWT lifetime. Without a payload the ceremony sends the raw nonce, which
3202
+ * strict mode rejects.
3203
+ */
2956
3204
  createAgentKeyWithCeremony(params: Omit<KmsCreateAgentKeyRequest, "webAuthnAssertion" | "passkeyAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsCreateAgentKeyResponse>;
2957
3205
  /**
2958
3206
  * Refresh an agent credential, running the challenge-binding ceremony
@@ -3063,7 +3311,15 @@ declare class KmsSessionService {
3063
3311
  * the caller. Idempotent: revoking an already-revoked key still resolves.
3064
3312
  */
3065
3313
  revokeP256SessionKey(params: RevokeP256SessionKeyRequest): Promise<RevokeP256SessionKeyResponse>;
3066
- /** Create a P-256 session key, running the challenge-binding ceremony internally. */
3314
+ /**
3315
+ * Create a P-256 session key, running the challenge-binding ceremony internally.
3316
+ *
3317
+ * STRICT MODE (AirAccount #115): bind the mint params by passing `options.payload =
3318
+ * mintDigest({ kind: "p256", walletId, index, ttlSecs, subject })` — `index` is the
3319
+ * session_index the KMS will assign (query it first), `subject` the JWT sub (human key
3320
+ * id), `ttlSecs` the JWT lifetime. Without a payload the ceremony sends the raw nonce,
3321
+ * which strict mode rejects.
3322
+ */
3067
3323
  createP256SessionKeyWithCeremony(params: Omit<CreateP256SessionKeyRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<CreateP256SessionKeyResponse>;
3068
3324
  /**
3069
3325
  * Revoke a P-256 session key, running the challenge-binding ceremony internally.
@@ -3146,7 +3402,19 @@ declare class KmsPaymentSigner {
3146
3402
  * Sign an x402 payment authorization via `POST /kms/SignX402Payment`.
3147
3403
  */
3148
3404
  signX402Payment(params: KmsSignX402PaymentRequest, auth: KmsPaymentAuth): Promise<KmsPaymentSignatureResponse>;
3149
- }
3405
+ /** Sign a MicroPaymentChannel voucher, running the committed ceremony internally. */
3406
+ signMicropaymentVoucherWithCeremony(params: KmsSignMicropaymentVoucherRequest, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsPaymentSignatureResponse>;
3407
+ /** Sign a GToken EIP-3009 authorization, running the committed ceremony internally. */
3408
+ signGTokenAuthorizationWithCeremony(params: KmsSignGTokenAuthorizationRequest, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsPaymentSignatureResponse>;
3409
+ /** Sign an x402 payment, running the committed ceremony internally. */
3410
+ signX402PaymentWithCeremony(params: KmsSignX402PaymentRequest, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer" | "payload">): Promise<KmsPaymentSignatureResponse>;
3411
+ }
3412
+ /** EIP-712 digest for a MicroPaymentChannel `Voucher` (domain MicroPaymentChannel/1.0.0). */
3413
+ declare function micropaymentVoucherDigest(p: KmsSignMicropaymentVoucherRequest): `0x${string}`;
3414
+ /** EIP-712 digest for a GToken EIP-3009 `TransferWithAuthorization` (domain GToken/1). */
3415
+ declare function gTokenAuthorizationDigest(p: KmsSignGTokenAuthorizationRequest): `0x${string}`;
3416
+ /** EIP-712 digest for an x402 `PaymentPayload` (domain SuperPaymaster/1). */
3417
+ declare function x402PaymentDigest(p: KmsSignX402PaymentRequest): `0x${string}`;
3150
3418
 
3151
3419
  /**
3152
3420
  * Liveness probe response. Returned by `GET /health` without auth — works even
@@ -3334,10 +3602,46 @@ declare class LocalWalletSigner implements ISignerAdapter {
3334
3602
  private readonly account;
3335
3603
  constructor(privateKey: string);
3336
3604
  getAddress(_userId: string): Promise<`0x${string}`>;
3337
- signMessage(_userId: string, message: `0x${string}` | Uint8Array, _ctx?: PasskeyAssertionContext): Promise<`0x${string}`>;
3605
+ signMessage(_userId: string, message: `0x${string}` | Uint8Array, _ctx?: SignerAuthContext): Promise<`0x${string}`>;
3338
3606
  ensureSigner(_userId: string): Promise<{
3339
3607
  address: `0x${string}`;
3340
3608
  }>;
3341
3609
  }
3342
3610
 
3343
- export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, type FullConfigGuardianParams, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, type P256GuardianKey, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type SerializedGuardianSpec, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp };
3611
+ /** Resolves an app user id to its KMS key + EOA address. App-specific mapping. */
3612
+ type KmsKeyResolver = (userId: string) => Promise<{
3613
+ keyId: string;
3614
+ address: `0x${string}`;
3615
+ }>;
3616
+ /**
3617
+ * KMS-backed {@link ISignerAdapter} — the bridge between the SDK signing chain
3618
+ * (BLS / transfer pass a {@link SignerAuthContext}) and the KMS `/SignHash` API.
3619
+ *
3620
+ * This is the concrete adapter the BLS/transfer services expect: it unpacks the
3621
+ * per-call auth context and forwards it to the right KMS endpoint.
3622
+ * - {@link WebAuthnCeremonyContext} (preferred) → `signHashWithWebAuthn`
3623
+ * (one-time, challenge-bound; replay-safe — what KMS v0.20.0+ requires).
3624
+ * - {@link PasskeyAssertionContext} (legacy, @deprecated) → `signHash`
3625
+ * (rejected by KMS unless `KMS_ALLOW_LEGACY_PASSKEY=1`, test only).
3626
+ *
3627
+ * The frontend runs the BeginAuthentication ceremony with the user's device
3628
+ * passkey and passes the resulting `{ ChallengeId, Credential }` down as
3629
+ * `ctx.webAuthnAssertion`. Since each challenge is consumed once, a flow needing
3630
+ * N signatures must pass N assertions — use the tiered transfer path, which needs
3631
+ * only one owner signature.
3632
+ *
3633
+ * The `userId → { keyId, address }` mapping is app-specific; inject it via
3634
+ * {@link KmsKeyResolver}.
3635
+ */
3636
+ declare class KmsSignerAdapter implements ISignerAdapter {
3637
+ private readonly kms;
3638
+ private readonly resolveKey;
3639
+ constructor(kms: KmsManager, resolveKey: KmsKeyResolver);
3640
+ getAddress(userId: string): Promise<`0x${string}`>;
3641
+ ensureSigner(userId: string): Promise<{
3642
+ address: `0x${string}`;
3643
+ }>;
3644
+ signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: SignerAuthContext): Promise<`0x${string}`>;
3645
+ }
3646
+
3647
+ export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, type FullConfigGuardianParams, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyResolver, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, KmsSignerAdapter, type KmsSignerAuth, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, type P256GuardianKey, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type SerializedGuardianSpec, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, type SignerAuthContext, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WebAuthnCeremonyContext, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, commitChallenge, computeOapdSalt, eip712Digest, erc8004AddressesForChain, gTokenAuthorizationDigest, getOapdAddress, getOapdAddressWithChainId, grantSessionFinalHash, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, micropaymentVoucherDigest, mintDigest, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp, x402PaymentDigest };