@aastar/sdk 0.25.0 → 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.
- package/dist/airaccount.cjs +127 -103
- package/dist/airaccount.d.cts +1 -1
- package/dist/airaccount.d.ts +1 -1
- package/dist/airaccount.js +1 -1
- package/dist/{chunk-D2RDBN46.js → chunk-4GJSK7E6.js} +334 -17
- package/dist/chunk-4GJSK7E6.js.map +1 -0
- package/dist/{chunk-6IZASQSB.cjs → chunk-UZE7IPOK.cjs} +338 -15
- package/dist/chunk-UZE7IPOK.cjs.map +1 -0
- package/dist/kms.cjs +127 -103
- package/dist/kms.d.cts +138 -14
- package/dist/kms.d.ts +138 -14
- package/dist/kms.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6IZASQSB.cjs.map +0 -1
- package/dist/chunk-D2RDBN46.js.map +0 -1
package/dist/kms.d.cts
CHANGED
|
@@ -467,6 +467,71 @@ interface KmsEip712FieldValue {
|
|
|
467
467
|
name: string;
|
|
468
468
|
value: unknown;
|
|
469
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}`;
|
|
470
535
|
interface KmsSignTypedDataRequest {
|
|
471
536
|
keyId: string;
|
|
472
537
|
hdPath?: string;
|
|
@@ -687,6 +752,20 @@ declare class KmsManager {
|
|
|
687
752
|
WebAuthn?: WebAuthnAssertion;
|
|
688
753
|
Passkey?: LegacyPasskeyAssertion;
|
|
689
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>;
|
|
690
769
|
/**
|
|
691
770
|
* Sign a message or an EIP-155 transaction (WebAuthn-gated).
|
|
692
771
|
* Provide exactly one of `Message` (hex) or `Transaction`. For a raw 32-byte
|
|
@@ -756,17 +835,36 @@ declare class KmsManager {
|
|
|
756
835
|
DerivationPath: string;
|
|
757
836
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsDeriveAddressResponse>;
|
|
758
837
|
/**
|
|
759
|
-
* Sign a message or EIP-155 transaction
|
|
760
|
-
*
|
|
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).
|
|
761
848
|
*/
|
|
762
849
|
signWithCeremony(params: Omit<KmsSignRequest, "WebAuthn" | "Passkey"> & {
|
|
763
850
|
KeyId: string;
|
|
764
851
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignResponse>;
|
|
765
|
-
/**
|
|
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
|
+
*/
|
|
766
857
|
signHashWithCeremony(hash: string, target: {
|
|
767
858
|
KeyId: string;
|
|
768
859
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignHashResponse>;
|
|
769
|
-
/**
|
|
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
|
+
*/
|
|
770
868
|
signTypedDataWithCeremony(params: Omit<KmsSignTypedDataRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignTypedDataResponse>;
|
|
771
869
|
/**
|
|
772
870
|
* Sign a GRANT_SESSION_V2 hash, running the grant-session ceremony internally
|
|
@@ -827,12 +925,10 @@ type KmsSignerAuth = {
|
|
|
827
925
|
ceremonyOptions?: Omit<RunCeremonyOptions, "signer">;
|
|
828
926
|
/**
|
|
829
927
|
* Bind each ceremony challenge to the payload via `SHA-256(nonce ‖ hash)`
|
|
830
|
-
* (WYSIWYS, AirAccount #68). DEFAULT `
|
|
831
|
-
*
|
|
832
|
-
*
|
|
833
|
-
* only
|
|
834
|
-
* signing ops (tracked AirAccount-side). The commitment IS already correct vs
|
|
835
|
-
* the TA; the gap is the host verify.
|
|
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).
|
|
836
932
|
*/
|
|
837
933
|
commitPayload?: boolean;
|
|
838
934
|
};
|
|
@@ -3096,7 +3192,15 @@ declare class KmsAgentService {
|
|
|
3096
3192
|
* the caller supplies the resulting assertion in the request.
|
|
3097
3193
|
*/
|
|
3098
3194
|
revokeAgentCredential(params: KmsRevokeAgentCredentialRequest): Promise<KmsRevokeAgentCredentialResponse>;
|
|
3099
|
-
/**
|
|
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
|
+
*/
|
|
3100
3204
|
createAgentKeyWithCeremony(params: Omit<KmsCreateAgentKeyRequest, "webAuthnAssertion" | "passkeyAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsCreateAgentKeyResponse>;
|
|
3101
3205
|
/**
|
|
3102
3206
|
* Refresh an agent credential, running the challenge-binding ceremony
|
|
@@ -3207,7 +3311,15 @@ declare class KmsSessionService {
|
|
|
3207
3311
|
* the caller. Idempotent: revoking an already-revoked key still resolves.
|
|
3208
3312
|
*/
|
|
3209
3313
|
revokeP256SessionKey(params: RevokeP256SessionKeyRequest): Promise<RevokeP256SessionKeyResponse>;
|
|
3210
|
-
/**
|
|
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
|
+
*/
|
|
3211
3323
|
createP256SessionKeyWithCeremony(params: Omit<CreateP256SessionKeyRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<CreateP256SessionKeyResponse>;
|
|
3212
3324
|
/**
|
|
3213
3325
|
* Revoke a P-256 session key, running the challenge-binding ceremony internally.
|
|
@@ -3290,7 +3402,19 @@ declare class KmsPaymentSigner {
|
|
|
3290
3402
|
* Sign an x402 payment authorization via `POST /kms/SignX402Payment`.
|
|
3291
3403
|
*/
|
|
3292
3404
|
signX402Payment(params: KmsSignX402PaymentRequest, auth: KmsPaymentAuth): Promise<KmsPaymentSignatureResponse>;
|
|
3293
|
-
|
|
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}`;
|
|
3294
3418
|
|
|
3295
3419
|
/**
|
|
3296
3420
|
* Liveness probe response. Returned by `GET /health` without auth — works even
|
|
@@ -3520,4 +3644,4 @@ declare class KmsSignerAdapter implements ISignerAdapter {
|
|
|
3520
3644
|
signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: SignerAuthContext): Promise<`0x${string}`>;
|
|
3521
3645
|
}
|
|
3522
3646
|
|
|
3523
|
-
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, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp };
|
|
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 };
|
package/dist/kms.d.ts
CHANGED
|
@@ -467,6 +467,71 @@ interface KmsEip712FieldValue {
|
|
|
467
467
|
name: string;
|
|
468
468
|
value: unknown;
|
|
469
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}`;
|
|
470
535
|
interface KmsSignTypedDataRequest {
|
|
471
536
|
keyId: string;
|
|
472
537
|
hdPath?: string;
|
|
@@ -687,6 +752,20 @@ declare class KmsManager {
|
|
|
687
752
|
WebAuthn?: WebAuthnAssertion;
|
|
688
753
|
Passkey?: LegacyPasskeyAssertion;
|
|
689
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>;
|
|
690
769
|
/**
|
|
691
770
|
* Sign a message or an EIP-155 transaction (WebAuthn-gated).
|
|
692
771
|
* Provide exactly one of `Message` (hex) or `Transaction`. For a raw 32-byte
|
|
@@ -756,17 +835,36 @@ declare class KmsManager {
|
|
|
756
835
|
DerivationPath: string;
|
|
757
836
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsDeriveAddressResponse>;
|
|
758
837
|
/**
|
|
759
|
-
* Sign a message or EIP-155 transaction
|
|
760
|
-
*
|
|
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).
|
|
761
848
|
*/
|
|
762
849
|
signWithCeremony(params: Omit<KmsSignRequest, "WebAuthn" | "Passkey"> & {
|
|
763
850
|
KeyId: string;
|
|
764
851
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignResponse>;
|
|
765
|
-
/**
|
|
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
|
+
*/
|
|
766
857
|
signHashWithCeremony(hash: string, target: {
|
|
767
858
|
KeyId: string;
|
|
768
859
|
}, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignHashResponse>;
|
|
769
|
-
/**
|
|
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
|
+
*/
|
|
770
868
|
signTypedDataWithCeremony(params: Omit<KmsSignTypedDataRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsSignTypedDataResponse>;
|
|
771
869
|
/**
|
|
772
870
|
* Sign a GRANT_SESSION_V2 hash, running the grant-session ceremony internally
|
|
@@ -827,12 +925,10 @@ type KmsSignerAuth = {
|
|
|
827
925
|
ceremonyOptions?: Omit<RunCeremonyOptions, "signer">;
|
|
828
926
|
/**
|
|
829
927
|
* Bind each ceremony challenge to the payload via `SHA-256(nonce ‖ hash)`
|
|
830
|
-
* (WYSIWYS, AirAccount #68). DEFAULT `
|
|
831
|
-
*
|
|
832
|
-
*
|
|
833
|
-
* only
|
|
834
|
-
* signing ops (tracked AirAccount-side). The commitment IS already correct vs
|
|
835
|
-
* the TA; the gap is the host verify.
|
|
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).
|
|
836
932
|
*/
|
|
837
933
|
commitPayload?: boolean;
|
|
838
934
|
};
|
|
@@ -3096,7 +3192,15 @@ declare class KmsAgentService {
|
|
|
3096
3192
|
* the caller supplies the resulting assertion in the request.
|
|
3097
3193
|
*/
|
|
3098
3194
|
revokeAgentCredential(params: KmsRevokeAgentCredentialRequest): Promise<KmsRevokeAgentCredentialResponse>;
|
|
3099
|
-
/**
|
|
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
|
+
*/
|
|
3100
3204
|
createAgentKeyWithCeremony(params: Omit<KmsCreateAgentKeyRequest, "webAuthnAssertion" | "passkeyAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<KmsCreateAgentKeyResponse>;
|
|
3101
3205
|
/**
|
|
3102
3206
|
* Refresh an agent credential, running the challenge-binding ceremony
|
|
@@ -3207,7 +3311,15 @@ declare class KmsSessionService {
|
|
|
3207
3311
|
* the caller. Idempotent: revoking an already-revoked key still resolves.
|
|
3208
3312
|
*/
|
|
3209
3313
|
revokeP256SessionKey(params: RevokeP256SessionKeyRequest): Promise<RevokeP256SessionKeyResponse>;
|
|
3210
|
-
/**
|
|
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
|
+
*/
|
|
3211
3323
|
createP256SessionKeyWithCeremony(params: Omit<CreateP256SessionKeyRequest, "webAuthnAssertion">, signer: PasskeyCeremonySigner, options?: Omit<RunCeremonyOptions, "signer">): Promise<CreateP256SessionKeyResponse>;
|
|
3212
3324
|
/**
|
|
3213
3325
|
* Revoke a P-256 session key, running the challenge-binding ceremony internally.
|
|
@@ -3290,7 +3402,19 @@ declare class KmsPaymentSigner {
|
|
|
3290
3402
|
* Sign an x402 payment authorization via `POST /kms/SignX402Payment`.
|
|
3291
3403
|
*/
|
|
3292
3404
|
signX402Payment(params: KmsSignX402PaymentRequest, auth: KmsPaymentAuth): Promise<KmsPaymentSignatureResponse>;
|
|
3293
|
-
|
|
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}`;
|
|
3294
3418
|
|
|
3295
3419
|
/**
|
|
3296
3420
|
* Liveness probe response. Returned by `GET /health` without auth — works even
|
|
@@ -3520,4 +3644,4 @@ declare class KmsSignerAdapter implements ISignerAdapter {
|
|
|
3520
3644
|
signMessage(userId: string, message: `0x${string}` | Uint8Array, ctx?: SignerAuthContext): Promise<`0x${string}`>;
|
|
3521
3645
|
}
|
|
3522
3646
|
|
|
3523
|
-
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, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp };
|
|
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 };
|
package/dist/kms.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, AgentRegistryService, AirAccountServerClient, BLSSignatureService, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, DvtPendingConfirmationError, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, EntryPointVersion, EthereumProvider, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, GuardChecker, GuardStateReader, KmsAgentService, KmsHttpClient, KmsManager, KmsMonitorService, KmsPaymentSigner, KmsSessionService, KmsSigner, KmsSignerAdapter, L2_TYPE, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, ModuleManager, P256PasskeySigner, PaymasterManager, PaymasterPriceStalenessError, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, SESSION_KEY_VALIDATOR_ABI, SessionKeyService, SilentLogger, TIER_GUARD_HOOK_ABI, TokenService, TransferManager, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, commitChallenge, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp } from './chunk-
|
|
1
|
+
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, AgentRegistryService, AirAccountServerClient, BLSSignatureService, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, DvtPendingConfirmationError, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, EntryPointVersion, EthereumProvider, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, GuardChecker, GuardStateReader, KmsAgentService, KmsHttpClient, KmsManager, KmsMonitorService, KmsPaymentSigner, KmsSessionService, KmsSigner, KmsSignerAdapter, L2_TYPE, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, ModuleManager, P256PasskeySigner, PaymasterManager, PaymasterPriceStalenessError, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, SESSION_KEY_VALIDATOR_ABI, SessionKeyService, SilentLogger, TIER_GUARD_HOOK_ABI, TokenService, TransferManager, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, 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 } from './chunk-4GJSK7E6.js';
|
|
2
2
|
export { ALG_BLS, ALG_CUMULATIVE_T2, ALG_CUMULATIVE_T3, ALG_ECDSA, ALG_P256, AirAccountClient, BLSManager, CryptoUtil, DEFAULT_PASSKEY_ROUTES, ERC4337Utils, PasskeyManager, UserOpBuilder, YAAAClient, algIdForTier, resolveTier } from './chunk-X3AMH53O.js';
|
|
3
3
|
import './chunk-6DZCDV4Q.js';
|
|
4
4
|
import './chunk-MBWBHKUE.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aastar/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "All-in-one TypeScript SDK for the AAStar Protocol / Mycelium Network — ERC-4337 account abstraction, gasless transactions, SuperPaymaster gas sponsorship, KMS WebAuthn passkeys, BLS aggregate signatures, multi-chain (Optimism + Ethereum) community economies & reputation. Single bundled package with subpath exports.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"erc-4337",
|