@aastar/sdk 0.20.4 → 0.20.6

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 (92) hide show
  1. package/README.md +32 -24
  2. package/dist/BaseClient-BjbYP0cf.d.ts +88 -0
  3. package/dist/UserClient-AIIHB54I.js +6 -0
  4. package/dist/{UserClient-JMNNZT4P.js.map → UserClient-AIIHB54I.js.map} +1 -1
  5. package/dist/account.d.ts +48 -1
  6. package/dist/account.js +3 -3
  7. package/dist/admin.d.ts +62 -1
  8. package/dist/admin.js +3 -3
  9. package/dist/airaccount.d.ts +4 -2
  10. package/dist/airaccount.js +2 -4498
  11. package/dist/airaccount.js.map +1 -1
  12. package/dist/channel-CkRRbzT8.d.ts +77 -0
  13. package/dist/channel.d.ts +64 -1
  14. package/dist/channel.js +3 -3
  15. package/dist/{chunk-YSDWB6DO.js → chunk-4EZD7LPE.js} +30 -24
  16. package/dist/chunk-4EZD7LPE.js.map +1 -0
  17. package/dist/{chunk-TBDMSJVL.js → chunk-6QYXGMCR.js} +513 -322
  18. package/dist/chunk-6QYXGMCR.js.map +1 -0
  19. package/dist/{chunk-QNYP7RPI.js → chunk-7ARJ3OSU.js} +29 -21
  20. package/dist/chunk-7ARJ3OSU.js.map +1 -0
  21. package/dist/{chunk-KL6SCEIU.js → chunk-BN5WY5GM.js} +16 -14
  22. package/dist/chunk-BN5WY5GM.js.map +1 -0
  23. package/dist/{chunk-5TDDS3T5.js → chunk-FJ7XECC5.js} +4 -4
  24. package/dist/chunk-FJ7XECC5.js.map +1 -0
  25. package/dist/{chunk-4KRQXOTI.js → chunk-FUU7RIIA.js} +113 -102
  26. package/dist/chunk-FUU7RIIA.js.map +1 -0
  27. package/dist/{chunk-ZJLIKMCA.js → chunk-G3UJC4EL.js} +17 -8
  28. package/dist/chunk-G3UJC4EL.js.map +1 -0
  29. package/dist/{chunk-M5ORP2PM.js → chunk-KDH3UPKD.js} +10 -13
  30. package/dist/chunk-KDH3UPKD.js.map +1 -0
  31. package/dist/chunk-KISL64KW.js +4245 -0
  32. package/dist/chunk-KISL64KW.js.map +1 -0
  33. package/dist/{chunk-Y3KP7R2Y.js → chunk-LXWIPTPX.js} +5 -5
  34. package/dist/chunk-LXWIPTPX.js.map +1 -0
  35. package/dist/{chunk-NAPMVAVJ.js → chunk-MVEWJIPY.js} +124 -110
  36. package/dist/chunk-MVEWJIPY.js.map +1 -0
  37. package/dist/{chunk-LNICTATJ.js → chunk-PAABYXS6.js} +33 -40
  38. package/dist/chunk-PAABYXS6.js.map +1 -0
  39. package/dist/{chunk-O454V5ML.js → chunk-PKCHRXFR.js} +8 -12
  40. package/dist/chunk-PKCHRXFR.js.map +1 -0
  41. package/dist/{chunk-R2RATIK2.js → chunk-TENYCMJ3.js} +31 -31
  42. package/dist/chunk-TENYCMJ3.js.map +1 -0
  43. package/dist/{contract-addresses-VLAHHXOO.js → contract-addresses-N3TOL2WL.js} +3 -3
  44. package/dist/{contract-addresses-VLAHHXOO.js.map → contract-addresses-N3TOL2WL.js.map} +1 -1
  45. package/dist/core.d.ts +6930 -13
  46. package/dist/core.js +2 -2
  47. package/dist/dapp.d.ts +127 -1
  48. package/dist/dapp.js +12 -13
  49. package/dist/dapp.js.map +1 -1
  50. package/dist/doc-types-471vSmPO.d.ts +16 -0
  51. package/dist/enduser.d.ts +261 -1
  52. package/dist/enduser.js +4 -4
  53. package/dist/identity.d.ts +81 -1
  54. package/dist/identity.js +3 -3
  55. package/dist/index-B6SfEQxo.d.ts +47 -0
  56. package/dist/index.d.ts +55 -14
  57. package/dist/index.js +22 -22
  58. package/dist/index.js.map +1 -1
  59. package/dist/kms.d.ts +2986 -0
  60. package/dist/kms.js +5 -0
  61. package/dist/kms.js.map +1 -0
  62. package/dist/operator.d.ts +164 -1
  63. package/dist/operator.js +3 -3
  64. package/dist/paymaster.d.ts +312 -1
  65. package/dist/paymaster.js +3 -3
  66. package/dist/{index.node-GNYPFVZQ.js → src-L5SI5WNB.js} +4 -4
  67. package/dist/src-L5SI5WNB.js.map +1 -0
  68. package/dist/{dist-WMYQOYRO.js → src-X5MIV3EB.js} +5 -5
  69. package/dist/src-X5MIV3EB.js.map +1 -0
  70. package/dist/tier-router-DLiMxs0h.d.ts +321 -0
  71. package/dist/tokens.d.ts +64 -1
  72. package/dist/tokens.js +3 -3
  73. package/dist/x402.d.ts +373 -1
  74. package/dist/x402.js +3 -3
  75. package/package.json +19 -15
  76. package/LICENSE +0 -180
  77. package/dist/UserClient-JMNNZT4P.js +0 -6
  78. package/dist/chunk-4KRQXOTI.js.map +0 -1
  79. package/dist/chunk-5TDDS3T5.js.map +0 -1
  80. package/dist/chunk-KL6SCEIU.js.map +0 -1
  81. package/dist/chunk-LNICTATJ.js.map +0 -1
  82. package/dist/chunk-M5ORP2PM.js.map +0 -1
  83. package/dist/chunk-NAPMVAVJ.js.map +0 -1
  84. package/dist/chunk-O454V5ML.js.map +0 -1
  85. package/dist/chunk-QNYP7RPI.js.map +0 -1
  86. package/dist/chunk-R2RATIK2.js.map +0 -1
  87. package/dist/chunk-TBDMSJVL.js.map +0 -1
  88. package/dist/chunk-Y3KP7R2Y.js.map +0 -1
  89. package/dist/chunk-YSDWB6DO.js.map +0 -1
  90. package/dist/chunk-ZJLIKMCA.js.map +0 -1
  91. package/dist/dist-WMYQOYRO.js.map +0 -1
  92. package/dist/index.node-GNYPFVZQ.js.map +0 -1
package/README.md CHANGED
@@ -36,7 +36,10 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采
36
36
  | `@aastar/sdk/x402` | x402 settlement (x402 结算) |
37
37
  | `@aastar/sdk/channel` | Micro-payment channels (微支付通道) |
38
38
  | `@aastar/sdk/enduser` · `/operator` · `/admin` | Role lifecycle workflows (角色生命周期) |
39
- | `@aastar/sdk/airaccount` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) |
39
+ | `@aastar/sdk/kms` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) |
40
+
41
+ > 🔄 The `@aastar/sdk/airaccount` subpath is **deprecated** — it still works as an alias of `@aastar/sdk/kms` for one release. Please migrate to `@aastar/sdk/kms`.
42
+ > `@aastar/sdk/airaccount` 子路径已**废弃**,作为 `@aastar/sdk/kms` 的别名再保留一个版本,请尽快迁移到 `@aastar/sdk/kms`。
40
43
 
41
44
  > ⚠️ **`react` / `react-dom` are optional peer deps.** They're only needed for the `@aastar/sdk/dapp`
42
45
  > subpath. The root `import '@aastar/sdk'` and all non-UI subpaths work in Node/server with no React.
@@ -47,16 +50,16 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采
47
50
  ## 📦 Installation | 安装
48
51
 
49
52
  ```bash
50
- pnpm add @aastar/sdk viem ethers
53
+ pnpm add @aastar/sdk viem
51
54
  # or
52
- npm install @aastar/sdk viem ethers
55
+ npm install @aastar/sdk viem
53
56
 
54
57
  # Only if you use the React UI subpath (@aastar/sdk/dapp):
55
58
  pnpm add react react-dom
56
59
  ```
57
60
 
58
- > AirAccount / KMS / BLS features are included — no separate install. Import them from `@aastar/sdk/airaccount`.
59
- > AirAccount / KMS / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/airaccount` 导入即可。
61
+ > You only need `@aastar/sdk` + `viem` — all transitive deps install automatically. KMS / WebAuthn / BLS features are bundled in — no separate install. Import them from `@aastar/sdk/kms`.
62
+ > 只需安装 `@aastar/sdk` + `viem`,其余依赖自动带入。KMS / WebAuthn / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/kms` 导入即可。
60
63
 
61
64
  ### Importing | 导入方式
62
65
 
@@ -66,7 +69,7 @@ import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '
66
69
 
67
70
  // …or cherry-pick from a subpath to keep bundles lean:
68
71
  import { registryActions } from '@aastar/sdk/core';
69
- import { KmsManager, P256PasskeySigner } from '@aastar/sdk/airaccount';
72
+ import { KmsManager, P256PasskeySigner } from '@aastar/sdk/kms';
70
73
  import { useGasless } from '@aastar/sdk/dapp'; // requires react
71
74
  ```
72
75
 
@@ -74,37 +77,43 @@ import { useGasless } from '@aastar/sdk/dapp'; // requires react
74
77
 
75
78
  ## 🌐 Multi-chain | 多链配置
76
79
 
77
- Contract addresses are keyed by **chainId** in `CANONICAL_ADDRESSES`, so switching chains means
78
- switching the viem `chain` + `transport` and passing the matching address set.
79
- 合约地址在 `CANONICAL_ADDRESSES` 中按 **chainId** 分组,切链 = 切换 viem `chain` + `transport` 并传入对应链的地址集。
80
+ **Switching chains is seamless just pass a viem `chain`.** Contract addresses are auto-resolved
81
+ from `chain.id`, so you never hardcode addresses or memorize chainIds. Use the exact chain objects
82
+ from `viem/chains`.
83
+ 切链是无感的——**只需传入一个 viem `chain`**,合约地址会根据 `chain.id` 自动解析,无需手写地址、无需记 chainId。直接用 `viem/chains` 里的链对象即可。
80
84
 
81
- | Network | chainId | Status |
82
- |---|---|---|
83
- | Optimism (mainnet) | `10` | ✅ deployed |
84
- | Sepolia (testnet) | `11155111` | ✅ deployed (primary test target) |
85
- | OP Sepolia (testnet) | `11155420` | ✅ deployed |
86
- | Ethereum mainnet | `1` | ⏳ not yet deployed |
85
+ | Network | viem chain | chainId | Status |
86
+ |---|---|---|---|
87
+ | Optimism (mainnet) | `optimism` | `10` | ✅ deployed |
88
+ | Sepolia (testnet) | `sepolia` | `11155111` | ✅ deployed (primary test target) |
89
+ | OP Sepolia (testnet) | `optimismSepolia` | `11155420` | ✅ deployed |
90
+ | Ethereum mainnet | `mainnet` | `1` | ⏳ not yet deployed |
87
91
 
88
92
  ```typescript
89
- import { createEndUserClient, CANONICAL_ADDRESSES } from '@aastar/sdk';
93
+ import { createEndUserClient } from '@aastar/sdk';
90
94
  import { sepolia, optimism } from 'viem/chains';
91
95
  import { http } from 'viem';
92
96
 
93
- // Sepolia testnet
97
+ // Sepolia testnet — addresses auto-resolved from sepolia.id
94
98
  const test = createEndUserClient({
95
99
  chain: sepolia,
96
100
  transport: http(process.env.SEPOLIA_RPC_URL),
97
- addresses: CANONICAL_ADDRESSES[11155111],
98
101
  });
99
102
 
100
- // Optimism mainnet — same code, just swap chain + transport + address set
103
+ // Optimism mainnet — same code, just swap chain + transport
101
104
  const prod = createEndUserClient({
102
105
  chain: optimism,
103
106
  transport: http('https://mainnet.optimism.io'),
104
- addresses: CANONICAL_ADDRESSES[10],
105
107
  });
106
108
  ```
107
109
 
110
+ - **Unsupported chain?** If you pass a chain that has no deployment yet (e.g. `mainnet`) and no
111
+ explicit `addresses`, the factory throws a clear error naming the supported chains — no silent
112
+ misconfiguration.
113
+ - **Custom / private deployment?** Override per-call with `addresses: { ... }` (or `CANONICAL_ADDRESSES[chainId]`
114
+ to start from a known set); the explicit value always wins over auto-resolution.
115
+ - 未部署的链(如 `mainnet`)且未显式传 `addresses` 时,工厂会抛出列明受支持链的清晰报错;自定义部署可通过 `addresses` 覆盖,显式值优先。
116
+
108
117
  Helpers for RPC URLs and explorer links live in `@aastar/sdk` too:
109
118
  `getNetwork(name)`, `getRpcUrl(name)`, `getChainId(name)`, `getTxUrl(name, hash)`, `getAddressUrl(name, addr)`.
110
119
 
@@ -131,23 +140,22 @@ Helpers for RPC URLs and explorer links live in `@aastar/sdk` too:
131
140
  import { http } from 'viem';
132
141
  import { privateKeyToAccount } from 'viem/accounts';
133
142
  import { sepolia } from 'viem/chains';
134
- import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '@aastar/sdk';
143
+ import { createEndUserClient, createOperatorClient } from '@aastar/sdk';
135
144
 
136
145
  const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
137
146
 
138
147
  // Role-based clients compose viem action factories under the hood.
148
+ // Addresses auto-resolve from chain.id — no `addresses` needed for supported chains.
139
149
  const enduser = createEndUserClient({
140
150
  chain: sepolia,
141
151
  transport: http(process.env.SEPOLIA_RPC_URL),
142
152
  account,
143
- addresses: CANONICAL_ADDRESSES[11155111],
144
153
  });
145
154
 
146
155
  const operator = createOperatorClient({
147
156
  chain: sepolia,
148
157
  transport: http(process.env.SEPOLIA_RPC_URL),
149
158
  account,
150
- addresses: CANONICAL_ADDRESSES[11155111],
151
159
  });
152
160
  ```
153
161
 
@@ -237,7 +245,7 @@ All capabilities are bundled into `@aastar/sdk`; the table below maps each forme
237
245
  | `@aastar/sdk/identity` | Reputation, Credit limits, ZK Proofs |
238
246
  | `@aastar/sdk/paymaster` | EntryPoint & Paymaster low-level API |
239
247
  | `@aastar/sdk/dapp` | React Components & Integration Hooks (needs `react`) |
240
- | `@aastar/sdk/airaccount` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts |
248
+ | `@aastar/sdk/kms` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts (`/airaccount` = deprecated alias) |
241
249
 
242
250
  ---
243
251
 
@@ -0,0 +1,88 @@
1
+ import { Address, Account } from 'viem';
2
+ import { W as WalletClient, P as PublicClient } from './doc-types-471vSmPO.js';
3
+
4
+ /**
5
+ * Base configuration for all L2 Business Clients
6
+ */
7
+ interface ClientConfig {
8
+ /**
9
+ * Viem WalletClient for write operations.
10
+ * Must have an account attached.
11
+ */
12
+ client: WalletClient;
13
+ /**
14
+ * Optional PublicClient for read operations.
15
+ * If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better).
16
+ * Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider.
17
+ * However, explicitly accepting PublicClient encourages separation.
18
+ */
19
+ publicClient?: PublicClient;
20
+ /**
21
+ * Registry contract address.
22
+ * Essential for looking up other contracts if not provided explicitly.
23
+ */
24
+ registryAddress?: Address;
25
+ /**
26
+ * GToken contract address.
27
+ * Required for operations involving token approvals and transfers.
28
+ */
29
+ gTokenAddress?: Address;
30
+ /**
31
+ * GTokenStaking contract address.
32
+ * Required for role registration that involves staking.
33
+ */
34
+ gTokenStakingAddress?: Address;
35
+ /**
36
+ * PaymasterFactory contract address.
37
+ * Required for deploying new PaymasterV4 instances.
38
+ */
39
+ paymasterFactoryAddress?: Address;
40
+ xpntsFactoryAddress?: Address;
41
+ ethUsdPriceFeedAddress?: Address;
42
+ entryPointAddress?: Address;
43
+ }
44
+ /**
45
+ * Common options for transaction methods
46
+ */
47
+ interface TransactionOptions {
48
+ /**
49
+ * Override the account to use for the transaction.
50
+ * If not provided, uses the account from the WalletClient.
51
+ */
52
+ account?: Account | Address;
53
+ /**
54
+ * Optional value to send with the transaction (in wei)
55
+ */
56
+ value?: bigint;
57
+ }
58
+ /**
59
+ * Generic result wrapper for business operations
60
+ * Currently just returns the type directly, but can be expanded for metadata.
61
+ */
62
+ type BusinessResult<T> = Promise<T>;
63
+
64
+ declare abstract class BaseClient {
65
+ client: WalletClient;
66
+ publicClient?: PublicClient;
67
+ protected registryAddress?: Address;
68
+ protected gTokenAddress?: Address;
69
+ protected gTokenStakingAddress?: Address;
70
+ protected paymasterFactoryAddress?: Address;
71
+ protected entryPointAddress?: Address;
72
+ constructor(config: ClientConfig);
73
+ /**
74
+ * Get the account address of the connected wallet
75
+ */
76
+ getAddress(): Address;
77
+ /**
78
+ * Helper to ensure public client exists or fallback to wallet client (if it supports read)
79
+ */
80
+ getStartPublicClient(): PublicClient | WalletClient;
81
+ protected requireRegistry(): Address;
82
+ protected requireGToken(): Address;
83
+ protected requireGTokenStaking(): Address;
84
+ protected requirePaymasterFactory(): Address;
85
+ protected requireEntryPoint(): Address;
86
+ }
87
+
88
+ export { type BusinessResult as B, type ClientConfig as C, type TransactionOptions as T, BaseClient as a };
@@ -0,0 +1,6 @@
1
+ export { UserClient } from './chunk-PAABYXS6.js';
2
+ import './chunk-6QYXGMCR.js';
3
+ import './chunk-G3UJC4EL.js';
4
+ import './chunk-PZ5AY32C.js';
5
+ //# sourceMappingURL=UserClient-AIIHB54I.js.map
6
+ //# sourceMappingURL=UserClient-AIIHB54I.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-JMNNZT4P.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-AIIHB54I.js"}
package/dist/account.d.ts CHANGED
@@ -1 +1,48 @@
1
- export * from '@aastar/account';
1
+ import { WalletClient, Address, Hex, Hash, Chain, Transport, LocalAccount } from 'viem';
2
+
3
+ type EOAWalletClient = WalletClient & {
4
+ sendTransaction: (args: {
5
+ to: Address;
6
+ value?: bigint;
7
+ data?: Hex;
8
+ }) => Promise<Hash>;
9
+ getAddress: () => Address;
10
+ };
11
+ declare const createEOAWalletClient: (privateKey: Hex, chain: Chain, transport?: Transport) => EOAWalletClient;
12
+
13
+ type SimpleSmartAccount = LocalAccount & {
14
+ signUserOperation: (userOp: any) => Promise<Hex>;
15
+ getInitCode: () => Promise<Hex>;
16
+ getDummySignature: () => Promise<Hex>;
17
+ entryPoint: Address;
18
+ };
19
+ declare function toSimpleSmartAccount(parameters: {
20
+ client: any;
21
+ owner: LocalAccount;
22
+ factoryAddress: Address;
23
+ entryPoint: {
24
+ address: Address;
25
+ version: '0.6' | '0.7';
26
+ };
27
+ salt?: bigint;
28
+ index?: bigint;
29
+ }): Promise<SimpleSmartAccount>;
30
+
31
+ /**
32
+ * Common Pack Logic for v0.7 UserOperations
33
+ */
34
+ declare function packUserOpLimits(high: bigint, low: bigint): Hex;
35
+ /**
36
+ * Local implementation of EntryPoint v0.7 getUserOpHash
37
+ */
38
+ declare function getUserOpHash(op: any, ep: Address, chainId: number): Hex;
39
+ /**
40
+ * UserOperation Client for handling high-level flows
41
+ */
42
+ declare class UserOpClient {
43
+ static estimateGas(bundler: any, op: any, entryPoint: Address): Promise<any>;
44
+ static sendUserOp(bundler: any, op: any, entryPoint: Address): Promise<any>;
45
+ static getReceipt(bundler: any, hash: Hex): Promise<any>;
46
+ }
47
+
48
+ export { type EOAWalletClient, type SimpleSmartAccount, UserOpClient, createEOAWalletClient, getUserOpHash, packUserOpLimits, toSimpleSmartAccount };
package/dist/account.js CHANGED
@@ -1,6 +1,6 @@
1
- export { UserOpClient, createEOAWalletClient, getUserOpHash, packUserOpLimits, toSimpleSmartAccount } from './chunk-YSDWB6DO.js';
2
- import './chunk-TBDMSJVL.js';
3
- import './chunk-ZJLIKMCA.js';
1
+ export { UserOpClient, createEOAWalletClient, getUserOpHash, packUserOpLimits, toSimpleSmartAccount } from './chunk-4EZD7LPE.js';
2
+ import './chunk-6QYXGMCR.js';
3
+ import './chunk-G3UJC4EL.js';
4
4
  import './chunk-PZ5AY32C.js';
5
5
  //# sourceMappingURL=account.js.map
6
6
  //# sourceMappingURL=account.js.map
package/dist/admin.d.ts CHANGED
@@ -1 +1,62 @@
1
- export * from '@aastar/admin';
1
+ import { Address, Hash, Hex } from 'viem';
2
+ import { a as BaseClient, C as ClientConfig, T as TransactionOptions } from './BaseClient-BjbYP0cf.js';
3
+ import './doc-types-471vSmPO.js';
4
+
5
+ interface ProtocolParams {
6
+ minStake: bigint;
7
+ treasury: Address;
8
+ entryPoint: Address;
9
+ superPaymaster: Address;
10
+ }
11
+ /**
12
+ * ProtocolGovernance - L3 Pattern
13
+ *
14
+ * Responsibilities:
15
+ * 1. Global Protocol Parameter Management (Registry, EntryPoint)
16
+ * 2. High-level Governance Operations (DAO Transfer, Upgrades)
17
+ * 3. SuperPaymaster & Module Approval
18
+ */
19
+ declare class ProtocolGovernance extends BaseClient {
20
+ registryAddress: Address;
21
+ entryPointAddress: Address;
22
+ constructor(config: ClientConfig & {
23
+ registryAddress: Address;
24
+ entryPointAddress: Address;
25
+ });
26
+ /**
27
+ * Update the Global Treasury Address where protocol fees are collected
28
+ */
29
+ setTreasury(treasury: Address, options?: TransactionOptions): Promise<Hash>;
30
+ /**
31
+ * Update the supported EntryPoint address
32
+ */
33
+ updateEntryPoint(entryPoint: Address, options?: TransactionOptions): Promise<Hash>;
34
+ /**
35
+ * Approve a new SuperPaymaster contract address
36
+ */
37
+ setSuperPaymaster(paymaster: Address, options?: TransactionOptions): Promise<Hash>;
38
+ /**
39
+ * Set the Staking contract address
40
+ */
41
+ setStaking(staking: Address, options?: TransactionOptions): Promise<Hash>;
42
+ /**
43
+ * Configure a Role's parameters (Admin only).
44
+ * Reads the current on-chain config first, then merges the provided overrides
45
+ * and writes back the full struct via configureRole.
46
+ */
47
+ configureRole(params: {
48
+ roleId: Hex;
49
+ minStake?: bigint;
50
+ ticketPrice?: bigint;
51
+ exitFeePercent?: bigint;
52
+ minExitFee?: bigint;
53
+ }, options?: TransactionOptions): Promise<Hash>;
54
+ /**
55
+ * Transfer Protocol Ownership to a DAO (Multisig/Timelock)
56
+ * This is the final step of "Protocol Admin" lifecycle.
57
+ */
58
+ transferToDAO(daoAddress: Address, options?: TransactionOptions): Promise<Hash>;
59
+ getProtocolParams(): Promise<ProtocolParams>;
60
+ }
61
+
62
+ export { ProtocolGovernance, type ProtocolParams };
package/dist/admin.js CHANGED
@@ -1,6 +1,6 @@
1
- export { ProtocolGovernance } from './chunk-5TDDS3T5.js';
2
- import './chunk-TBDMSJVL.js';
3
- import './chunk-ZJLIKMCA.js';
1
+ export { ProtocolGovernance } from './chunk-FJ7XECC5.js';
2
+ import './chunk-6QYXGMCR.js';
3
+ import './chunk-G3UJC4EL.js';
4
4
  import './chunk-PZ5AY32C.js';
5
5
  //# sourceMappingURL=admin.js.map
6
6
  //# sourceMappingURL=admin.js.map
@@ -1,2 +1,4 @@
1
- export * from '@aastar/airaccount/server';
2
- export * from '@aastar/airaccount';
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, AccountRecord, ActiveRecovery, AgentRegistryService, AgentReputationSummary, AgentSessionConfig, AgentSessionInfo, AirAccountVersion, BLSSignatureService, BeginCeremonyResponse, BindERC8004AgentWalletParams, BlsConfigRecord, BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, CreateAgentAccountParams, CreateP256SessionKeyRequest, CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, DelegateInitParams, DvtPendingConfirmationError, 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, EntryPointConfig, EntryPointVersion, EntryPointVersionConfig, EstimateGasParams, EthereumProvider, ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, GrantP256SessionParams, GrantSessionParams, GuardChecker, GuardState, GuardStateReader, ILogger, ISignerAdapter, IStorageAdapter, InstallModuleParams, KmsAgentService, KmsAttestationManifestResponse, KmsAttestationProofResponse, KmsAttestationResponse, KmsBeginAuthenticationRequest, KmsBeginAuthenticationResponse, KmsBeginGrantSessionAuthRequest, KmsBeginGrantSessionAuthResponse, KmsBeginRegistrationRequest, KmsBeginRegistrationResponse, KmsChangePasskeyResponse, KmsCompleteRegistrationRequest, KmsCompleteRegistrationResponse, KmsCreateAgentKeyRequest, KmsCreateAgentKeyResponse, KmsCreateKeyRequest, KmsCreateKeyResponse, KmsDeleteKeyResponse, KmsDeriveAddressResponse, KmsDescribeKeyResponse, KmsEip712Domain, KmsEip712FieldValue, KmsEip712TypeDef, KmsEthereumTransaction, KmsGetPublicKeyResponse, KmsHealthResponse, KmsHttpClient, KmsHttpClientOptions, KmsKeyStatusResponse, KmsListKeysResponse, KmsManager, KmsMonitorService, KmsPaymentAuth, KmsPaymentSignatureResponse, KmsPaymentSigner, KmsPurgeKeyResponse, KmsQueueStatusResponse, KmsRefreshAgentCredentialRequest, KmsRefreshAgentCredentialResponse, KmsRevokeAgentCredentialRequest, KmsRevokeAgentCredentialResponse, KmsRollbackCounterResponse, KmsSessionService, KmsSignAgentRequest, KmsSignAgentResponse, KmsSignGTokenAuthorizationRequest, KmsSignGrantSessionRequest, KmsSignGrantSessionResponse, KmsSignHashResponse, KmsSignMicropaymentVoucherRequest, KmsSignP256GrantSessionRequest, KmsSignRequest, KmsSignResponse, KmsSignTypedDataRequest, KmsSignTypedDataResponse, KmsSignX402PaymentRequest, KmsSigner, KmsStatsResponse, KmsVersionResponse, L2Type, L2_TYPE, LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, MintAgentIdentityParams, ModuleManager, ModuleTypeId, OapdConfig, P256PasskeySigner, PasskeyAssertionContext, PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, PaymasterRecord, PendingExit, PendingWeightChange, QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, RevokeP256SessionKeyRequest, RevokeP256SessionKeyResponse, RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, ServerConfig, SessionInfo, SessionKeyService, SetAgentWalletParams, SignP256UserOpRequest, SignP256UserOpResponse, SilentLogger, SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TokenBalance, TokenGuardState, TokenInfo, TokenService, TransferManager, TransferRecord, TransferResult, UninstallModuleParams, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, WebAuthnAssertion, WebAuthnAuthenticationCredential, WeightConfig, 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 './kms.js';
2
+ export { A as ALG_BLS, a as ALG_CUMULATIVE_T2, b as ALG_CUMULATIVE_T3, c as ALG_ECDSA, d as ALG_P256, e as AlgId, B as BLSConfig, f as BLSManager, g as BLSNode, h as BLSSignatureData, i as BeginAuthenticationResponse, j as BeginRegistrationResponse, k as BeginTransactionVerificationResponse, C as CryptoUtil, l as CumulativeT2SignatureData, m as CumulativeT3SignatureData, E as ERC4337Utils, G as GasEstimate, n as GuardStatus, P as PackedUserOperation, o as PasskeyAuthenticationParams, p as PasskeyInfo, q as PasskeyManager, r as PasskeyRegistrationParams, s as PreCheckResult, T as TierConfig, t as TierLevel, u as TransactionVerificationParams, U as UserOpBuilder, v as UserOperation, Y as YAAAClient, w as YAAAConfig, x as algIdForTier, y as resolveTier } from './tier-router-DLiMxs0h.js';
3
+ import 'ethers';
4
+ import 'axios';