Skip to content

Commit acfe66d

Browse files
committed
fmt
1 parent 15203d4 commit acfe66d

File tree

15 files changed

+8309
-29288
lines changed

15 files changed

+8309
-29288
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ bunx changeset publish
113113

114114
# Contact
115115

116-
You can reach the Lit Protocol team through [Telegram](https://t.me/+aa73FAF9Vp82ZjJh), [Discord](https://litgateway.com/discord), or [X](https://x.com/litprotocol).
116+
You can reach the Lit Protocol team through [Telegram](https://t.me/+aa73FAF9Vp82ZjJh), [Discord](https://litgateway.com/discord), or [X](https://x.com/litprotocol).

bun.lock

Lines changed: 702 additions & 944 deletions
Large diffs are not rendered by default.

e2e/src/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export const init = async (
4848
alicePkpAuthContext: any;
4949
eveViemAccount: any;
5050
eveCustomAuthData: Awaited<ReturnType<typeof litUtils.generateAuthData>>;
51-
eveViemAccountPkp: Awaited<ReturnType<typeof litClient.mintWithCustomAuth>>['pkpData']['data'];
51+
eveViemAccountPkp: Awaited<
52+
ReturnType<typeof litClient.mintWithCustomAuth>
53+
>['pkpData']['data'];
5254
eveValidationIpfsCid: string;
5355
masterDepositForUser: (userAddress: string) => Promise<void>;
5456
// alicePkpViemAccountPermissionsManager: any,

e2e/src/v7-compatability.spec.ts

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { createAuthManager, storagePlugins, ViemAccountAuthenticator } from "@lit-protocol/auth";
2-
import { createLitClient } from "@lit-protocol/lit-client";
3-
import { nagaDev } from "@lit-protocol/networks";
4-
import { privateKeyToAccount } from "viem/accounts";
5-
1+
import {
2+
createAuthManager,
3+
storagePlugins,
4+
ViemAccountAuthenticator,
5+
} from '@lit-protocol/auth';
6+
import { createLitClient } from '@lit-protocol/lit-client';
7+
import { nagaDev } from '@lit-protocol/networks';
8+
import { privateKeyToAccount } from 'viem/accounts';
69

710
describe('v7 compatability', () => {
811
it('should be able to use the v7 api', async () => {
9-
10-
1112
const liveMasterAccount = privateKeyToAccount(
1213
process.env['LIVE_MASTER_ACCOUNT'] as `0x${string}`
1314
);
1415

15-
1616
const litClient = await createLitClient({ network: nagaDev });
1717

1818
const authManager = createAuthManager({
@@ -46,40 +46,38 @@ describe('v7 compatability', () => {
4646
litClient: litClient,
4747
});
4848

49-
50-
51-
5249
const { createAccBuilder } = await import(
5350
'@lit-protocol/access-control-conditions'
5451
);
5552

56-
57-
const unifiedAccs = createAccBuilder().unifiedAccs({
58-
conditionType: 'evmBasic',
59-
contractAddress: '',
60-
standardContractType: '',
61-
chain: 'ethereum',
62-
method: '',
63-
parameters: [':userAddress'],
64-
returnValueTest: {
65-
comparator: '=',
66-
value: liveMasterAccount.address,
67-
},
68-
}).build();
69-
70-
71-
const accs = createAccBuilder().evmBasic({
72-
contractAddress: '',
73-
standardContractType: '',
74-
chain: 'ethereum',
75-
method: '',
76-
parameters: [':userAddress'],
77-
returnValueTest: {
78-
comparator: '=',
79-
value: liveMasterAccount.address,
80-
},
81-
}).build();
82-
53+
const unifiedAccs = createAccBuilder()
54+
.unifiedAccs({
55+
conditionType: 'evmBasic',
56+
contractAddress: '',
57+
standardContractType: '',
58+
chain: 'ethereum',
59+
method: '',
60+
parameters: [':userAddress'],
61+
returnValueTest: {
62+
comparator: '=',
63+
value: liveMasterAccount.address,
64+
},
65+
})
66+
.build();
67+
68+
const accs = createAccBuilder()
69+
.evmBasic({
70+
contractAddress: '',
71+
standardContractType: '',
72+
chain: 'ethereum',
73+
method: '',
74+
parameters: [':userAddress'],
75+
returnValueTest: {
76+
comparator: '=',
77+
value: liveMasterAccount.address,
78+
},
79+
})
80+
.build();
8381

8482
const stringData = 'Hello from encrypt-decrypt flow test!';
8583
const encryptedStringData = await litClient.encrypt({
@@ -88,10 +86,8 @@ describe('v7 compatability', () => {
8886
chain: 'ethereum',
8987
});
9088

91-
9289
console.log(encryptedStringData);
9390

94-
9591
const decryptedStringResponse = await litClient.decrypt({
9692
data: encryptedStringData,
9793
unifiedAccessControlConditions: accs,
@@ -100,4 +96,4 @@ describe('v7 compatability', () => {
10096
});
10197
console.log(decryptedStringResponse);
10298
});
103-
});
99+
});

packages/access-control-conditions/src/lib/createAccBuilder.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,4 +852,4 @@ describe('Access Control Conditions Builder', () => {
852852
expect(condition.parameters).toEqual(['param1', 'param2', 'param3']);
853853
});
854854
});
855-
});
855+
});

packages/access-control-conditions/src/lib/createAccBuilder.ts

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,9 @@ class AccessControlConditionBuilder implements AccBuilder {
549549
return this;
550550
}
551551

552-
evmBasic(
553-
params: Omit<EvmBasicAcc, 'conditionType'>
554-
): AccBuilder {
552+
evmBasic(params: Omit<EvmBasicAcc, 'conditionType'>): AccBuilder {
555553
const p = params as Partial<EvmBasicAcc>;
556-
554+
557555
// For raw evmBasic, chain must be provided in params
558556
if (!p.chain) {
559557
throw new Error('Chain must be specified in params for evmBasic method');
@@ -568,14 +566,14 @@ class AccessControlConditionBuilder implements AccBuilder {
568566
return this;
569567
}
570568

571-
evmContract(
572-
params: Omit<EvmContractAcc, 'conditionType'>
573-
): AccBuilder {
569+
evmContract(params: Omit<EvmContractAcc, 'conditionType'>): AccBuilder {
574570
const p = params as Partial<EvmContractAcc>;
575-
571+
576572
// For raw evmContract, chain must be provided in params
577573
if (!p.chain) {
578-
throw new Error('Chain must be specified in params for evmContract method');
574+
throw new Error(
575+
'Chain must be specified in params for evmContract method'
576+
);
579577
}
580578

581579
this.pendingCondition = {
@@ -587,11 +585,9 @@ class AccessControlConditionBuilder implements AccBuilder {
587585
return this;
588586
}
589587

590-
solRpc(
591-
params: Omit<SolAcc, 'conditionType'>
592-
): AccBuilder {
588+
solRpc(params: Omit<SolAcc, 'conditionType'>): AccBuilder {
593589
const p = params as Partial<SolAcc>;
594-
590+
595591
// For raw solRpc, chain must be provided in params
596592
if (!p.chain) {
597593
throw new Error('Chain must be specified in params for solRpc method');
@@ -606,11 +602,9 @@ class AccessControlConditionBuilder implements AccBuilder {
606602
return this;
607603
}
608604

609-
cosmos(
610-
params: Omit<AtomAcc, 'conditionType'>
611-
): AccBuilder {
605+
cosmos(params: Omit<AtomAcc, 'conditionType'>): AccBuilder {
612606
const p = params as Partial<AtomAcc>;
613-
607+
614608
// For raw cosmos, chain must be provided in params
615609
if (!p.chain) {
616610
throw new Error('Chain must be specified in params for cosmos method');
@@ -938,4 +932,4 @@ export const createLitActionCondition = (
938932
comparator: comparator as any,
939933
value: expectedValue,
940934
},
941-
});
935+
});

packages/auth-services/src/_setup/initSystemContext.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,20 @@ export async function initSystemContext({
4949
: networkModule;
5050

5151
try {
52-
const baseRpc = typeof networkModule.getRpcUrl === 'function' ? networkModule.getRpcUrl() : 'n/a';
53-
const effRpc = typeof effectiveModule.getRpcUrl === 'function' ? effectiveModule.getRpcUrl() : 'n/a';
54-
console.log('[initSystemContext] RPC (base → effective):', baseRpc, '→', effRpc);
52+
const baseRpc =
53+
typeof networkModule.getRpcUrl === 'function'
54+
? networkModule.getRpcUrl()
55+
: 'n/a';
56+
const effRpc =
57+
typeof effectiveModule.getRpcUrl === 'function'
58+
? effectiveModule.getRpcUrl()
59+
: 'n/a';
60+
console.log(
61+
'[initSystemContext] RPC (base → effective):',
62+
baseRpc,
63+
'→',
64+
effRpc
65+
);
5566
} catch {}
5667

5768
const litClient = await createLitClient({

packages/auth-services/src/queue-manager/worker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ interface ParsedRedisConnectionOpts {
1111
}
1212

1313
export async function startAuthServiceWorker() {
14-
await initSystemContext({ appName: 'auth-services-worker', rpcUrl: env.LIT_TXSENDER_RPC_URL });
14+
await initSystemContext({
15+
appName: 'auth-services-worker',
16+
rpcUrl: env.LIT_TXSENDER_RPC_URL,
17+
});
1518
console.log('------------------------------------------------------');
1619
console.log(' Attempting to start Generic BullMQ Worker Process... ');
1720
console.log('------------------------------------------------------');

0 commit comments

Comments
 (0)