@agether/sdk 2.9.0 → 2.11.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/cli.js +26 -12
- package/dist/index.d.mts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +26 -12
- package/dist/index.mjs +26 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -174,13 +174,13 @@ var init_config = __esm({
|
|
|
174
174
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
175
175
|
safe7579: SAFE7579,
|
|
176
176
|
entryPoint: ENTRYPOINT_V07,
|
|
177
|
-
agether4337Factory: "
|
|
178
|
-
agether7579Bootstrap: "
|
|
179
|
-
erc8004ValidationModule: "
|
|
180
|
-
agetherHookMultiplexer: "
|
|
177
|
+
agether4337Factory: "0xb6363c2B5C72C14D3fC4261e3dd836D8966bE072",
|
|
178
|
+
agether7579Bootstrap: "0x055C2e70dd011C4ADEEfB795Ab77D74437be6D33",
|
|
179
|
+
erc8004ValidationModule: "0xE282fB8615abb8bA53F07b8BAB2937C78fE3867D",
|
|
180
|
+
agetherHookMultiplexer: "0xeD62ac874F58CEc9F065aB8e6872752Eb0F6eA14",
|
|
181
181
|
validationRegistry: ZERO,
|
|
182
|
-
agether8004Scorer: "
|
|
183
|
-
timelockController: "
|
|
182
|
+
agether8004Scorer: "0x960853769d52B14aA0daeab7E1E59f5c9299cb65",
|
|
183
|
+
timelockController: "0x78e0227f9DE577e583B8149C73F0bA1E7200AD01",
|
|
184
184
|
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
185
185
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
186
186
|
morphoBlue: MORPHO_BLUE
|
|
@@ -190,13 +190,13 @@ var init_config = __esm({
|
|
|
190
190
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
191
191
|
safe7579: SAFE7579,
|
|
192
192
|
entryPoint: ENTRYPOINT_V07,
|
|
193
|
-
agether4337Factory: "
|
|
194
|
-
agether7579Bootstrap: "
|
|
195
|
-
erc8004ValidationModule: "
|
|
196
|
-
agetherHookMultiplexer: "
|
|
193
|
+
agether4337Factory: "0x73f4153bf1d46dB203Db27fc8FC942f6279D8d38",
|
|
194
|
+
agether7579Bootstrap: "0xbD0BDFE70fDB88fc03F2Ea22B81A2dfc99298E42",
|
|
195
|
+
erc8004ValidationModule: "0x85C8C97cE5AE540a4408D6A77a6D3aFcA9BCdB71",
|
|
196
|
+
agetherHookMultiplexer: "0x688cab46ce5A7450D706e9E3C8e0F31BaEa6c8BE",
|
|
197
197
|
validationRegistry: ZERO,
|
|
198
|
-
agether8004Scorer: "
|
|
199
|
-
timelockController: "
|
|
198
|
+
agether8004Scorer: "0x33eB904fe9975e2D8c577aD7e5B14CefBD4A65E1",
|
|
199
|
+
timelockController: "0xB3FD04f0B7c9DeC7f7B52d5c2CdfdCB3Fc9eE111",
|
|
200
200
|
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
201
201
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
202
202
|
morphoBlue: MORPHO_BLUE
|
|
@@ -1763,6 +1763,20 @@ var init_AgetherClient = __esm({
|
|
|
1763
1763
|
const signer = new import_ethers2.ethers.Wallet(privateKey, provider);
|
|
1764
1764
|
return new _AgetherClient({ config, signer, agentId, _privateKey: privateKey });
|
|
1765
1765
|
}
|
|
1766
|
+
static fromSigner(signer, agentIdOrChain, chainIdOrConfig) {
|
|
1767
|
+
if (!signer.provider) {
|
|
1768
|
+
throw new AgetherError("Signer must be connected to a provider", "NO_PROVIDER");
|
|
1769
|
+
}
|
|
1770
|
+
let agentId;
|
|
1771
|
+
let config;
|
|
1772
|
+
if (typeof agentIdOrChain === "bigint") {
|
|
1773
|
+
agentId = agentIdOrChain;
|
|
1774
|
+
config = typeof chainIdOrConfig === "number" ? getDefaultConfig(chainIdOrConfig) : chainIdOrConfig;
|
|
1775
|
+
} else {
|
|
1776
|
+
config = typeof agentIdOrChain === "number" ? getDefaultConfig(agentIdOrChain) : agentIdOrChain;
|
|
1777
|
+
}
|
|
1778
|
+
return new _AgetherClient({ config, signer, agentId });
|
|
1779
|
+
}
|
|
1766
1780
|
// ════════════════════════════════════════════════════════
|
|
1767
1781
|
// Registration
|
|
1768
1782
|
// ════════════════════════════════════════════════════════
|
package/dist/index.d.mts
CHANGED
|
@@ -191,6 +191,30 @@ declare class AgetherClient {
|
|
|
191
191
|
* Create an AgetherClient for an **existing** agent with a known agentId.
|
|
192
192
|
*/
|
|
193
193
|
static fromPrivateKey(privateKey: string, agentId: bigint, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
194
|
+
/**
|
|
195
|
+
* Create an AgetherClient from an **external signer** for a **new** agent (no agentId yet).
|
|
196
|
+
*
|
|
197
|
+
* Accepts any `ethers.AbstractSigner` — Privy, Bankr, Turnkey, MetaMask, etc.
|
|
198
|
+
* The signer **must** already be connected to a provider.
|
|
199
|
+
*
|
|
200
|
+
* Only `register()` and `getBalances()` are available until registration completes.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* const client = AgetherClient.fromSigner(privySigner, ChainId.Base);
|
|
205
|
+
* const result = await client.register();
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
static fromSigner(signer: ethers.AbstractSigner, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
209
|
+
/**
|
|
210
|
+
* Create an AgetherClient from an **external signer** for an **existing** agent.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* const client = AgetherClient.fromSigner(privySigner, 42n, ChainId.Base);
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
static fromSigner(signer: ethers.AbstractSigner, agentId: bigint, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
194
218
|
/**
|
|
195
219
|
* Register: create ERC-8004 identity + Safe account in one flow.
|
|
196
220
|
* If already registered, returns existing state.
|
package/dist/index.d.ts
CHANGED
|
@@ -191,6 +191,30 @@ declare class AgetherClient {
|
|
|
191
191
|
* Create an AgetherClient for an **existing** agent with a known agentId.
|
|
192
192
|
*/
|
|
193
193
|
static fromPrivateKey(privateKey: string, agentId: bigint, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
194
|
+
/**
|
|
195
|
+
* Create an AgetherClient from an **external signer** for a **new** agent (no agentId yet).
|
|
196
|
+
*
|
|
197
|
+
* Accepts any `ethers.AbstractSigner` — Privy, Bankr, Turnkey, MetaMask, etc.
|
|
198
|
+
* The signer **must** already be connected to a provider.
|
|
199
|
+
*
|
|
200
|
+
* Only `register()` and `getBalances()` are available until registration completes.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* const client = AgetherClient.fromSigner(privySigner, ChainId.Base);
|
|
205
|
+
* const result = await client.register();
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
static fromSigner(signer: ethers.AbstractSigner, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
209
|
+
/**
|
|
210
|
+
* Create an AgetherClient from an **external signer** for an **existing** agent.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* const client = AgetherClient.fromSigner(privySigner, 42n, ChainId.Base);
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
static fromSigner(signer: ethers.AbstractSigner, agentId: bigint, chainIdOrConfig: ChainId | AgetherConfig): AgetherClient;
|
|
194
218
|
/**
|
|
195
219
|
* Register: create ERC-8004 identity + Safe account in one flow.
|
|
196
220
|
* If already registered, returns existing state.
|
package/dist/index.js
CHANGED
|
@@ -247,13 +247,13 @@ var CONTRACT_ADDRESSES = {
|
|
|
247
247
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
248
248
|
safe7579: SAFE7579,
|
|
249
249
|
entryPoint: ENTRYPOINT_V07,
|
|
250
|
-
agether4337Factory: "
|
|
251
|
-
agether7579Bootstrap: "
|
|
252
|
-
erc8004ValidationModule: "
|
|
253
|
-
agetherHookMultiplexer: "
|
|
250
|
+
agether4337Factory: "0xb6363c2B5C72C14D3fC4261e3dd836D8966bE072",
|
|
251
|
+
agether7579Bootstrap: "0x055C2e70dd011C4ADEEfB795Ab77D74437be6D33",
|
|
252
|
+
erc8004ValidationModule: "0xE282fB8615abb8bA53F07b8BAB2937C78fE3867D",
|
|
253
|
+
agetherHookMultiplexer: "0xeD62ac874F58CEc9F065aB8e6872752Eb0F6eA14",
|
|
254
254
|
validationRegistry: ZERO,
|
|
255
|
-
agether8004Scorer: "
|
|
256
|
-
timelockController: "
|
|
255
|
+
agether8004Scorer: "0x960853769d52B14aA0daeab7E1E59f5c9299cb65",
|
|
256
|
+
timelockController: "0x78e0227f9DE577e583B8149C73F0bA1E7200AD01",
|
|
257
257
|
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
258
258
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
259
259
|
morphoBlue: MORPHO_BLUE
|
|
@@ -263,13 +263,13 @@ var CONTRACT_ADDRESSES = {
|
|
|
263
263
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
264
264
|
safe7579: SAFE7579,
|
|
265
265
|
entryPoint: ENTRYPOINT_V07,
|
|
266
|
-
agether4337Factory: "
|
|
267
|
-
agether7579Bootstrap: "
|
|
268
|
-
erc8004ValidationModule: "
|
|
269
|
-
agetherHookMultiplexer: "
|
|
266
|
+
agether4337Factory: "0x73f4153bf1d46dB203Db27fc8FC942f6279D8d38",
|
|
267
|
+
agether7579Bootstrap: "0xbD0BDFE70fDB88fc03F2Ea22B81A2dfc99298E42",
|
|
268
|
+
erc8004ValidationModule: "0x85C8C97cE5AE540a4408D6A77a6D3aFcA9BCdB71",
|
|
269
|
+
agetherHookMultiplexer: "0x688cab46ce5A7450D706e9E3C8e0F31BaEa6c8BE",
|
|
270
270
|
validationRegistry: ZERO,
|
|
271
|
-
agether8004Scorer: "
|
|
272
|
-
timelockController: "
|
|
271
|
+
agether8004Scorer: "0x33eB904fe9975e2D8c577aD7e5B14CefBD4A65E1",
|
|
272
|
+
timelockController: "0xB3FD04f0B7c9DeC7f7B52d5c2CdfdCB3Fc9eE111",
|
|
273
273
|
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
274
274
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
275
275
|
morphoBlue: MORPHO_BLUE
|
|
@@ -418,6 +418,20 @@ var AgetherClient = class _AgetherClient {
|
|
|
418
418
|
const signer = new import_ethers.ethers.Wallet(privateKey, provider);
|
|
419
419
|
return new _AgetherClient({ config, signer, agentId, _privateKey: privateKey });
|
|
420
420
|
}
|
|
421
|
+
static fromSigner(signer, agentIdOrChain, chainIdOrConfig) {
|
|
422
|
+
if (!signer.provider) {
|
|
423
|
+
throw new AgetherError("Signer must be connected to a provider", "NO_PROVIDER");
|
|
424
|
+
}
|
|
425
|
+
let agentId;
|
|
426
|
+
let config;
|
|
427
|
+
if (typeof agentIdOrChain === "bigint") {
|
|
428
|
+
agentId = agentIdOrChain;
|
|
429
|
+
config = typeof chainIdOrConfig === "number" ? getDefaultConfig(chainIdOrConfig) : chainIdOrConfig;
|
|
430
|
+
} else {
|
|
431
|
+
config = typeof agentIdOrChain === "number" ? getDefaultConfig(agentIdOrChain) : agentIdOrChain;
|
|
432
|
+
}
|
|
433
|
+
return new _AgetherClient({ config, signer, agentId });
|
|
434
|
+
}
|
|
421
435
|
// ════════════════════════════════════════════════════════
|
|
422
436
|
// Registration
|
|
423
437
|
// ════════════════════════════════════════════════════════
|
package/dist/index.mjs
CHANGED
|
@@ -172,13 +172,13 @@ var CONTRACT_ADDRESSES = {
|
|
|
172
172
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
173
173
|
safe7579: SAFE7579,
|
|
174
174
|
entryPoint: ENTRYPOINT_V07,
|
|
175
|
-
agether4337Factory: "
|
|
176
|
-
agether7579Bootstrap: "
|
|
177
|
-
erc8004ValidationModule: "
|
|
178
|
-
agetherHookMultiplexer: "
|
|
175
|
+
agether4337Factory: "0xb6363c2B5C72C14D3fC4261e3dd836D8966bE072",
|
|
176
|
+
agether7579Bootstrap: "0x055C2e70dd011C4ADEEfB795Ab77D74437be6D33",
|
|
177
|
+
erc8004ValidationModule: "0xE282fB8615abb8bA53F07b8BAB2937C78fE3867D",
|
|
178
|
+
agetherHookMultiplexer: "0xeD62ac874F58CEc9F065aB8e6872752Eb0F6eA14",
|
|
179
179
|
validationRegistry: ZERO,
|
|
180
|
-
agether8004Scorer: "
|
|
181
|
-
timelockController: "
|
|
180
|
+
agether8004Scorer: "0x960853769d52B14aA0daeab7E1E59f5c9299cb65",
|
|
181
|
+
timelockController: "0x78e0227f9DE577e583B8149C73F0bA1E7200AD01",
|
|
182
182
|
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
183
183
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
184
184
|
morphoBlue: MORPHO_BLUE
|
|
@@ -188,13 +188,13 @@ var CONTRACT_ADDRESSES = {
|
|
|
188
188
|
safeProxyFactory: SAFE_PROXY_FACTORY,
|
|
189
189
|
safe7579: SAFE7579,
|
|
190
190
|
entryPoint: ENTRYPOINT_V07,
|
|
191
|
-
agether4337Factory: "
|
|
192
|
-
agether7579Bootstrap: "
|
|
193
|
-
erc8004ValidationModule: "
|
|
194
|
-
agetherHookMultiplexer: "
|
|
191
|
+
agether4337Factory: "0x73f4153bf1d46dB203Db27fc8FC942f6279D8d38",
|
|
192
|
+
agether7579Bootstrap: "0xbD0BDFE70fDB88fc03F2Ea22B81A2dfc99298E42",
|
|
193
|
+
erc8004ValidationModule: "0x85C8C97cE5AE540a4408D6A77a6D3aFcA9BCdB71",
|
|
194
|
+
agetherHookMultiplexer: "0x688cab46ce5A7450D706e9E3C8e0F31BaEa6c8BE",
|
|
195
195
|
validationRegistry: ZERO,
|
|
196
|
-
agether8004Scorer: "
|
|
197
|
-
timelockController: "
|
|
196
|
+
agether8004Scorer: "0x33eB904fe9975e2D8c577aD7e5B14CefBD4A65E1",
|
|
197
|
+
timelockController: "0xB3FD04f0B7c9DeC7f7B52d5c2CdfdCB3Fc9eE111",
|
|
198
198
|
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
199
199
|
identityRegistry: ERC8004_IDENTITY_REGISTRY,
|
|
200
200
|
morphoBlue: MORPHO_BLUE
|
|
@@ -343,6 +343,20 @@ var AgetherClient = class _AgetherClient {
|
|
|
343
343
|
const signer = new ethers.Wallet(privateKey, provider);
|
|
344
344
|
return new _AgetherClient({ config, signer, agentId, _privateKey: privateKey });
|
|
345
345
|
}
|
|
346
|
+
static fromSigner(signer, agentIdOrChain, chainIdOrConfig) {
|
|
347
|
+
if (!signer.provider) {
|
|
348
|
+
throw new AgetherError("Signer must be connected to a provider", "NO_PROVIDER");
|
|
349
|
+
}
|
|
350
|
+
let agentId;
|
|
351
|
+
let config;
|
|
352
|
+
if (typeof agentIdOrChain === "bigint") {
|
|
353
|
+
agentId = agentIdOrChain;
|
|
354
|
+
config = typeof chainIdOrConfig === "number" ? getDefaultConfig(chainIdOrConfig) : chainIdOrConfig;
|
|
355
|
+
} else {
|
|
356
|
+
config = typeof agentIdOrChain === "number" ? getDefaultConfig(agentIdOrChain) : agentIdOrChain;
|
|
357
|
+
}
|
|
358
|
+
return new _AgetherClient({ config, signer, agentId });
|
|
359
|
+
}
|
|
346
360
|
// ════════════════════════════════════════════════════════
|
|
347
361
|
// Registration
|
|
348
362
|
// ════════════════════════════════════════════════════════
|