@aastar/sdk 0.20.6 → 0.20.7
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.d.ts +3 -3
- package/dist/airaccount.js +2 -2
- package/dist/{chunk-KISL64KW.js → chunk-UIFMIVDK.js} +967 -617
- package/dist/chunk-UIFMIVDK.js.map +1 -0
- package/dist/{chunk-FUU7RIIA.js → chunk-X3AMH53O.js} +146 -104
- package/dist/chunk-X3AMH53O.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1 -1
- package/dist/kms.d.ts +173 -105
- package/dist/kms.js +2 -2
- package/dist/{tier-router-DLiMxs0h.d.ts → tier-router-DeeVg69O.d.ts} +60 -11
- package/package.json +1 -2
- package/dist/chunk-FUU7RIIA.js.map +0 -1
- package/dist/chunk-KISL64KW.js.map +0 -1
package/dist/kms.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, 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, 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, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, validateConfig, wrapExecuteUserOp } from './chunk-
|
|
2
|
-
export { ALG_BLS, ALG_CUMULATIVE_T2, ALG_CUMULATIVE_T3, ALG_ECDSA, ALG_P256, BLSManager, CryptoUtil, ERC4337Utils, PasskeyManager, UserOpBuilder, YAAAClient, algIdForTier, resolveTier } 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, 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, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, validateConfig, wrapExecuteUserOp } from './chunk-UIFMIVDK.js';
|
|
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-PZ5AY32C.js';
|
|
4
4
|
//# sourceMappingURL=kms.js.map
|
|
5
5
|
//# sourceMappingURL=kms.js.map
|
|
@@ -45,9 +45,38 @@ interface BeginTransactionVerificationResponse extends BeginAuthenticationRespon
|
|
|
45
45
|
userOpHash: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Configurable backend routes for the passkey (WebAuthn) flows.
|
|
50
|
+
*
|
|
51
|
+
* These default paths are the standardized contract served by AAStar's
|
|
52
|
+
* `@aastar/passkey-server` (any compatible RP exposing the same endpoints).
|
|
53
|
+
* They are NOT specific to any single backend. Consumers pointing at a
|
|
54
|
+
* different backend can override individual paths without changing code.
|
|
55
|
+
*/
|
|
56
|
+
interface PasskeyRoutes {
|
|
57
|
+
/** POST — begin passkey registration. Default: `/auth/passkey/register/begin` */
|
|
58
|
+
registerBegin: string;
|
|
59
|
+
/** POST — complete passkey registration. Default: `/auth/passkey/register/complete` */
|
|
60
|
+
registerComplete: string;
|
|
61
|
+
/** POST — begin passkey login/authentication. Default: `/auth/passkey/login/begin` */
|
|
62
|
+
loginBegin: string;
|
|
63
|
+
/** POST — complete passkey login/authentication. Default: `/auth/passkey/login/complete` */
|
|
64
|
+
loginComplete: string;
|
|
65
|
+
/** POST — begin adding a new device (passkey). Default: `/auth/device/passkey/begin` */
|
|
66
|
+
deviceBegin: string;
|
|
67
|
+
/** POST — complete adding a new device (passkey). Default: `/auth/device/passkey/complete` */
|
|
68
|
+
deviceComplete: string;
|
|
69
|
+
/** POST — begin transaction verification. Default: `/auth/transaction/verify/begin` */
|
|
70
|
+
transactionVerifyBegin: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Default passkey routes — the standardized `@aastar/passkey-server` contract.
|
|
74
|
+
*/
|
|
75
|
+
declare const DEFAULT_PASSKEY_ROUTES: PasskeyRoutes;
|
|
48
76
|
declare class PasskeyManager {
|
|
49
77
|
private api;
|
|
50
|
-
|
|
78
|
+
private routes;
|
|
79
|
+
constructor(baseURL: string, tokenProvider?: () => string | null, routes?: Partial<PasskeyRoutes>);
|
|
51
80
|
/**
|
|
52
81
|
* Complete Passkey Registration Flow
|
|
53
82
|
*/
|
|
@@ -134,11 +163,6 @@ declare class BLSManager {
|
|
|
134
163
|
* Calculate the MessagePoint G2 point for a given message (UserOpHash)
|
|
135
164
|
*/
|
|
136
165
|
generateMessagePoint(message: string | Uint8Array): Promise<string>;
|
|
137
|
-
/**
|
|
138
|
-
* Encode G2 Point to bytes for EIP-2537 format
|
|
139
|
-
*/
|
|
140
|
-
private encodeG2Point;
|
|
141
|
-
private hexToBytes;
|
|
142
166
|
/**
|
|
143
167
|
* Pack cumulative Tier 2 signature (algId 0x04): P256 + BLS.
|
|
144
168
|
*
|
|
@@ -172,20 +196,45 @@ declare class BLSManager {
|
|
|
172
196
|
aggregateSignatures(node: BLSNode, signatures: string[]): Promise<string>;
|
|
173
197
|
}
|
|
174
198
|
|
|
175
|
-
interface
|
|
176
|
-
/**
|
|
199
|
+
interface AirAccountConfig {
|
|
200
|
+
/**
|
|
201
|
+
* Backend RP (relying party) API URL — required, no default.
|
|
202
|
+
*
|
|
203
|
+
* AAStar's official hosted RP will be `https://auth.aastar.io` (served by
|
|
204
|
+
* aNode, see AAStarCommunity/YetAnotherAA-Validator#81). You can also point
|
|
205
|
+
* this at your own backend implementing the standardized passkey contract
|
|
206
|
+
* (see `@aastar/passkey-server` / {@link PasskeyRoutes}).
|
|
207
|
+
*/
|
|
177
208
|
apiURL: string;
|
|
178
209
|
/** Function to get the current auth token (JWT) */
|
|
179
210
|
tokenProvider?: () => string | null;
|
|
211
|
+
/**
|
|
212
|
+
* Optional overrides for the passkey backend route paths.
|
|
213
|
+
*
|
|
214
|
+
* Defaults to the standardized `@aastar/passkey-server` contract
|
|
215
|
+
* (`/auth/passkey/*`). Override individual paths to point at a backend that
|
|
216
|
+
* exposes different routes without changing SDK code.
|
|
217
|
+
*/
|
|
218
|
+
passkeyRoutes?: Partial<PasskeyRoutes>;
|
|
180
219
|
/** BLS Configuration */
|
|
181
220
|
bls: BLSConfig;
|
|
182
221
|
}
|
|
183
|
-
declare class
|
|
222
|
+
declare class AirAccountClient {
|
|
184
223
|
private config;
|
|
185
224
|
readonly passkey: PasskeyManager;
|
|
186
225
|
readonly bls: BLSManager;
|
|
187
|
-
constructor(config:
|
|
226
|
+
constructor(config: AirAccountConfig);
|
|
188
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* @deprecated Renamed to {@link AirAccountConfig}. This alias is kept for
|
|
230
|
+
* backward compatibility and will be removed in a future major version.
|
|
231
|
+
*/
|
|
232
|
+
type YAAAConfig = AirAccountConfig;
|
|
233
|
+
/**
|
|
234
|
+
* @deprecated Renamed to {@link AirAccountClient}. This alias is kept for
|
|
235
|
+
* backward compatibility and will be removed in a future major version.
|
|
236
|
+
*/
|
|
237
|
+
declare const YAAAClient: typeof AirAccountClient;
|
|
189
238
|
|
|
190
239
|
declare class CryptoUtil {
|
|
191
240
|
private static readonly ALGORITHM;
|
|
@@ -318,4 +367,4 @@ declare function resolveTier(value: bigint, config: TierConfig): TierLevel;
|
|
|
318
367
|
*/
|
|
319
368
|
declare function algIdForTier(tier: TierLevel): AlgId;
|
|
320
369
|
|
|
321
|
-
export { ALG_BLS as A, type BLSConfig as B, CryptoUtil as C, ERC4337Utils as E, type GasEstimate as G, type PackedUserOperation as P, type TierConfig as T, UserOpBuilder as U, YAAAClient as Y, ALG_CUMULATIVE_T2 as a, ALG_CUMULATIVE_T3 as b, ALG_ECDSA as c, ALG_P256 as d,
|
|
370
|
+
export { ALG_BLS as A, type BLSConfig as B, CryptoUtil as C, DEFAULT_PASSKEY_ROUTES as D, ERC4337Utils as E, algIdForTier as F, type GasEstimate as G, resolveTier as H, type PackedUserOperation as P, type TierConfig as T, UserOpBuilder as U, YAAAClient as Y, ALG_CUMULATIVE_T2 as a, ALG_CUMULATIVE_T3 as b, ALG_ECDSA as c, ALG_P256 as d, AirAccountClient as e, type AirAccountConfig as f, type AlgId as g, BLSManager as h, type BLSNode as i, type BLSSignatureData as j, type BeginAuthenticationResponse as k, type BeginRegistrationResponse as l, type BeginTransactionVerificationResponse as m, type CumulativeT2SignatureData as n, type CumulativeT3SignatureData as o, type GuardStatus as p, type PasskeyAuthenticationParams as q, type PasskeyInfo as r, PasskeyManager as s, type PasskeyRegistrationParams as t, type PasskeyRoutes as u, type PreCheckResult as v, type TierLevel as w, type TransactionVerificationParams as x, type UserOperation as y, type YAAAConfig as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aastar/sdk",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
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",
|
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
],
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"viem": "2.43.3",
|
|
101
|
-
"ethers": "^6.0.0",
|
|
102
101
|
"@simplewebauthn/browser": "^13.2.2",
|
|
103
102
|
"axios": "^1.12.2"
|
|
104
103
|
},
|