@lit-protocol/vincent-e2e-test-utils 1.0.0 → 1.1.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/CHANGELOG.md +10 -0
- package/dist/CHANGELOG.md +24 -0
- package/dist/package.json +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/index.d.ts +1 -0
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +3 -1
- package/dist/src/lib/index.js.map +1 -1
- package/dist/src/lib/setup-vincent-development-environment.d.ts +49 -0
- package/dist/src/lib/setup-vincent-development-environment.d.ts.map +1 -0
- package/dist/src/lib/setup-vincent-development-environment.js +89 -0
- package/dist/src/lib/setup-vincent-development-environment.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 1.1.0 (2025-11-07)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Adds a `setupVincentDevelopmentEnvironment` function to streamline/abstract the developer experience. ([4ddce811](https://github.com/LIT-Protocol/Vincent/commit/4ddce811))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- awisniew207 @awisniew207
|
|
10
|
+
|
|
1
11
|
# 1.0.0 (2025-11-06)
|
|
2
12
|
|
|
3
13
|
### 🚀 Features
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 1.1.0 (2025-11-07)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Adds a `setupVincentDevelopmentEnvironment` function to streamline/abstract the developer experience. ([4ddce811](https://github.com/LIT-Protocol/Vincent/commit/4ddce811))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- awisniew207 @awisniew207
|
|
10
|
+
|
|
11
|
+
# 1.0.0 (2025-11-06)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- Add logic to registerNewAppVersion to avoid registering a new App version if the given Ability and Policy config matches the latest App version. Add logic to permitAppVersionForAgentWalletPkp to avoid permitting the App version if it's already been permitted. ([bbc0b752](https://github.com/LIT-Protocol/Vincent/commit/bbc0b752))
|
|
16
|
+
|
|
17
|
+
### ⚠️ Breaking Changes
|
|
18
|
+
|
|
19
|
+
- Initial release of Vincent E2E test util methods taken from the Vincent Ability Start Kit repo ([65b0a4a6](https://github.com/LIT-Protocol/Vincent/commit/65b0a4a6))
|
|
20
|
+
|
|
21
|
+
### ❤️ Thank You
|
|
22
|
+
|
|
23
|
+
- Wyatt Barnes @spacesailor24
|
|
24
|
+
|
|
1
25
|
# Changelog
|
|
2
26
|
|
|
3
27
|
## 0.1.0
|
package/dist/package.json
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { delegator, delegatee, funder, chain, appManager, mintNewPkp, ensureUnexpiredCapacityToken, getEnv, getChainHelpers, createRandomVincentWallets, } from './lib';
|
|
1
|
+
export { delegator, delegatee, funder, chain, appManager, mintNewPkp, ensureUnexpiredCapacityToken, getEnv, getChainHelpers, createRandomVincentWallets, setupVincentDevelopmentEnvironment, } from './lib';
|
|
2
2
|
export type { PkpInfo } from './lib/mint-new-pkp';
|
|
3
|
+
export type { VincentDevEnvironment } from './lib/setup-vincent-development-environment';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,4BAA4B,EAC5B,MAAM,EACN,eAAe,EACf,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,4BAA4B,EAC5B,MAAM,EACN,eAAe,EACf,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,OAAO,CAAC;AAEf,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
|
|
3
|
+
exports.setupVincentDevelopmentEnvironment = exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
|
|
4
4
|
var lib_1 = require("./lib");
|
|
5
5
|
Object.defineProperty(exports, "delegator", { enumerable: true, get: function () { return lib_1.delegator; } });
|
|
6
6
|
Object.defineProperty(exports, "delegatee", { enumerable: true, get: function () { return lib_1.delegatee; } });
|
|
@@ -12,4 +12,5 @@ Object.defineProperty(exports, "ensureUnexpiredCapacityToken", { enumerable: tru
|
|
|
12
12
|
Object.defineProperty(exports, "getEnv", { enumerable: true, get: function () { return lib_1.getEnv; } });
|
|
13
13
|
Object.defineProperty(exports, "getChainHelpers", { enumerable: true, get: function () { return lib_1.getChainHelpers; } });
|
|
14
14
|
Object.defineProperty(exports, "createRandomVincentWallets", { enumerable: true, get: function () { return lib_1.createRandomVincentWallets; } });
|
|
15
|
+
Object.defineProperty(exports, "setupVincentDevelopmentEnvironment", { enumerable: true, get: function () { return lib_1.setupVincentDevelopmentEnvironment; } });
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAYe;AAXb,gGAAA,SAAS,OAAA;AACT,gGAAA,SAAS,OAAA;AACT,6FAAA,MAAM,OAAA;AACN,4FAAA,KAAK,OAAA;AACL,iGAAA,UAAU,OAAA;AACV,iGAAA,UAAU,OAAA;AACV,mHAAA,4BAA4B,OAAA;AAC5B,6FAAA,MAAM,OAAA;AACN,sGAAA,eAAe,OAAA;AACf,iHAAA,0BAA0B,OAAA;AAC1B,yHAAA,kCAAkC,OAAA"}
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export { ensureUnexpiredCapacityToken } from './ensure-capacity-credit';
|
|
|
13
13
|
export { getEnv } from './env';
|
|
14
14
|
export { getChainHelpers } from './chain';
|
|
15
15
|
export { createRandomVincentWallets } from './create-random-vincent-wallets';
|
|
16
|
+
export { setupVincentDevelopmentEnvironment, type VincentDevEnvironment, } from './setup-vincent-development-environment';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAA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AyC,CAAC"}
|
package/dist/src/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
|
|
3
|
+
exports.setupVincentDevelopmentEnvironment = exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const delegator = tslib_1.__importStar(require("./delegator"));
|
|
6
6
|
exports.delegator = delegator;
|
|
@@ -22,4 +22,6 @@ var chain_1 = require("./chain");
|
|
|
22
22
|
Object.defineProperty(exports, "getChainHelpers", { enumerable: true, get: function () { return chain_1.getChainHelpers; } });
|
|
23
23
|
var create_random_vincent_wallets_1 = require("./create-random-vincent-wallets");
|
|
24
24
|
Object.defineProperty(exports, "createRandomVincentWallets", { enumerable: true, get: function () { return create_random_vincent_wallets_1.createRandomVincentWallets; } });
|
|
25
|
+
var setup_vincent_development_environment_1 = require("./setup-vincent-development-environment");
|
|
26
|
+
Object.defineProperty(exports, "setupVincentDevelopmentEnvironment", { enumerable: true, get: function () { return setup_vincent_development_environment_1.setupVincentDevelopmentEnvironment; } });
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAyC;AAChC,8BAAS;AAElB,+DAAyC;AAChC,8BAAS;AAElB,yDAAmC;AAC1B,wBAAM;AAEf,uDAAiC;AACxB,sBAAK;AAEd,iEAA2C;AAClC,gCAAU;AAEnB,+CAA4C;AAAnC,0GAAA,UAAU,OAAA;AACnB,mEAAwE;AAA/D,sIAAA,4BAA4B,OAAA;AACrC,6BAA+B;AAAtB,6FAAA,MAAM,OAAA;AACf,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AACxB,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAyC;AAChC,8BAAS;AAElB,+DAAyC;AAChC,8BAAS;AAElB,yDAAmC;AAC1B,wBAAM;AAEf,uDAAiC;AACxB,sBAAK;AAEd,iEAA2C;AAClC,gCAAU;AAEnB,+CAA4C;AAAnC,0GAAA,UAAU,OAAA;AACnB,mEAAwE;AAA/D,sIAAA,4BAA4B,OAAA;AACrC,6BAA+B;AAAtB,6FAAA,MAAM,OAAA;AACf,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AACxB,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,iGAGiD;AAF/C,2JAAA,kCAAkC,OAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Wallet } from 'ethers';
|
|
2
|
+
import type { PermissionData } from '@lit-protocol/vincent-contracts-sdk';
|
|
3
|
+
import type { PkpInfo } from './mint-new-pkp';
|
|
4
|
+
export interface VincentDevEnvironment {
|
|
5
|
+
agentPkpInfo: PkpInfo;
|
|
6
|
+
wallets: {
|
|
7
|
+
appDelegatee: Wallet;
|
|
8
|
+
funder: Wallet;
|
|
9
|
+
appManager: Wallet;
|
|
10
|
+
agentWalletOwner: Wallet;
|
|
11
|
+
};
|
|
12
|
+
appId: number;
|
|
13
|
+
appVersion: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Helper function to set up a Vincent development environment.
|
|
17
|
+
* This function handles all the necessary setup steps including:
|
|
18
|
+
* - Checking and funding all required accounts (funder, app delegatee, app manager)
|
|
19
|
+
* - Registering or updating your app with abilities and policies
|
|
20
|
+
* - Creating or using an existing agent PKP
|
|
21
|
+
* - Setting up permissions for the agent PKP
|
|
22
|
+
* - Ensuring a valid capacity token exists
|
|
23
|
+
*
|
|
24
|
+
* @param permissionData permission data containing abilities and their policies
|
|
25
|
+
* @returns the setup result including agent PKP info, wallets, app ID, and app version
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* // Example with no policies
|
|
29
|
+
* const permissionData = {
|
|
30
|
+
* [bundledVincentAbility.ipfsCid]: {},
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
33
|
+
* // Example with policies
|
|
34
|
+
* const permissionDataWithPolicies = {
|
|
35
|
+
* [bundledVincentAbility.ipfsCid]: {
|
|
36
|
+
* [spendingLimitPolicy.ipfsCid]: {
|
|
37
|
+
* limit: '1000000',
|
|
38
|
+
* period: '86400',
|
|
39
|
+
* },
|
|
40
|
+
* },
|
|
41
|
+
* };
|
|
42
|
+
*
|
|
43
|
+
* const result = await setupVincentDevelopmentEnvironment({ permissionData });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const setupVincentDevelopmentEnvironment: ({ permissionData, }: {
|
|
47
|
+
permissionData: PermissionData;
|
|
48
|
+
}) => Promise<VincentDevEnvironment>;
|
|
49
|
+
//# sourceMappingURL=setup-vincent-development-environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-vincent-development-environment.d.ts","sourceRoot":"","sources":["../../../src/lib/setup-vincent-development-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAS9C,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,kCAAkC,GAAU,qBAEtD;IACD,cAAc,EAAE,cAAc,CAAC;CAChC,KAAG,OAAO,CAAC,qBAAqB,CAwDhC,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupVincentDevelopmentEnvironment = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const appManager = tslib_1.__importStar(require("./appManager"));
|
|
6
|
+
const chain_1 = require("./chain");
|
|
7
|
+
const delegatee = tslib_1.__importStar(require("./delegatee"));
|
|
8
|
+
const delegator = tslib_1.__importStar(require("./delegator"));
|
|
9
|
+
const ensure_capacity_credit_1 = require("./ensure-capacity-credit");
|
|
10
|
+
const funder = tslib_1.__importStar(require("./funder"));
|
|
11
|
+
/**
|
|
12
|
+
* Helper function to set up a Vincent development environment.
|
|
13
|
+
* This function handles all the necessary setup steps including:
|
|
14
|
+
* - Checking and funding all required accounts (funder, app delegatee, app manager)
|
|
15
|
+
* - Registering or updating your app with abilities and policies
|
|
16
|
+
* - Creating or using an existing agent PKP
|
|
17
|
+
* - Setting up permissions for the agent PKP
|
|
18
|
+
* - Ensuring a valid capacity token exists
|
|
19
|
+
*
|
|
20
|
+
* @param permissionData permission data containing abilities and their policies
|
|
21
|
+
* @returns the setup result including agent PKP info, wallets, app ID, and app version
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* // Example with no policies
|
|
25
|
+
* const permissionData = {
|
|
26
|
+
* [bundledVincentAbility.ipfsCid]: {},
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
* // Example with policies
|
|
30
|
+
* const permissionDataWithPolicies = {
|
|
31
|
+
* [bundledVincentAbility.ipfsCid]: {
|
|
32
|
+
* [spendingLimitPolicy.ipfsCid]: {
|
|
33
|
+
* limit: '1000000',
|
|
34
|
+
* period: '86400',
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* };
|
|
38
|
+
*
|
|
39
|
+
* const result = await setupVincentDevelopmentEnvironment({ permissionData });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
const setupVincentDevelopmentEnvironment = async ({ permissionData, }) => {
|
|
43
|
+
// Check and fund all required accounts
|
|
44
|
+
await funder.checkFunderBalance();
|
|
45
|
+
await delegatee.ensureAppDelegateeFunded();
|
|
46
|
+
await appManager.ensureAppManagerFunded();
|
|
47
|
+
const chainHelpers = await (0, chain_1.getChainHelpers)();
|
|
48
|
+
const wallets = chainHelpers.wallets;
|
|
49
|
+
const abilityIpfsCids = Object.keys(permissionData);
|
|
50
|
+
const abilityPolicies = abilityIpfsCids.map((abilityIpfsCid) => {
|
|
51
|
+
return Object.keys(permissionData[abilityIpfsCid]);
|
|
52
|
+
});
|
|
53
|
+
// If an app exists for the delegatee, we will create a new app version with the new ipfs cids
|
|
54
|
+
// Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids
|
|
55
|
+
const existingApp = await delegatee.getAppInfo();
|
|
56
|
+
let appId;
|
|
57
|
+
let appVersion;
|
|
58
|
+
if (!existingApp) {
|
|
59
|
+
const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies });
|
|
60
|
+
appId = newApp.appId;
|
|
61
|
+
appVersion = newApp.appVersion;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const newAppVersion = await appManager.registerNewAppVersion({
|
|
65
|
+
abilityIpfsCids,
|
|
66
|
+
abilityPolicies,
|
|
67
|
+
});
|
|
68
|
+
appId = existingApp.appId;
|
|
69
|
+
appVersion = newAppVersion.appVersion;
|
|
70
|
+
}
|
|
71
|
+
const agentPkpInfo = await delegator.getFundedAgentPkp();
|
|
72
|
+
await delegator.permitAppVersionForAgentWalletPkp({
|
|
73
|
+
permissionData,
|
|
74
|
+
appId,
|
|
75
|
+
appVersion,
|
|
76
|
+
agentPkpInfo,
|
|
77
|
+
});
|
|
78
|
+
await delegator.addPermissionForAbilities(wallets.agentWalletOwner, agentPkpInfo.tokenId, abilityIpfsCids);
|
|
79
|
+
// Ensure capacity token is valid and unexpired
|
|
80
|
+
await (0, ensure_capacity_credit_1.ensureUnexpiredCapacityToken)(wallets.appDelegatee);
|
|
81
|
+
return {
|
|
82
|
+
agentPkpInfo,
|
|
83
|
+
wallets,
|
|
84
|
+
appId,
|
|
85
|
+
appVersion,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
exports.setupVincentDevelopmentEnvironment = setupVincentDevelopmentEnvironment;
|
|
89
|
+
//# sourceMappingURL=setup-vincent-development-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-vincent-development-environment.js","sourceRoot":"","sources":["../../../src/lib/setup-vincent-development-environment.ts"],"names":[],"mappings":";;;;AAMA,iEAA2C;AAC3C,mCAA0C;AAC1C,+DAAyC;AACzC,+DAAyC;AACzC,qEAAwE;AACxE,yDAAmC;AAcnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,MAAM,kCAAkC,GAAG,KAAK,EAAE,EACvD,cAAc,GAGf,EAAkC,EAAE;IACnC,uCAAuC;IACvC,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;IAClC,MAAM,SAAS,CAAC,wBAAwB,EAAE,CAAC;IAC3C,MAAM,UAAU,CAAC,sBAAsB,EAAE,CAAC;IAE1C,MAAM,YAAY,GAAG,MAAM,IAAA,uBAAe,GAAE,CAAC;IAC7C,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;IAErC,MAAM,eAAe,GAAa,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAA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