Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
527e07a
feat: replace logger package and log in misc with pino
FedericoAmura Feb 26, 2025
cfc3c34
feat: remove misc package with a lot of zod schemas, helper functions…
FedericoAmura Mar 3, 2025
c99d1f0
feat: changes in lit node client to remove misc, missed in previous c…
FedericoAmura Mar 4, 2025
21b33f8
feat: logger fixes
FedericoAmura Mar 6, 2025
3d2dc98
fix: remove unused stuff and type fixes
FedericoAmura Mar 6, 2025
4e2d35c
fix: localStorage.spec.ts
FedericoAmura Mar 6, 2025
fc17d03
fix: assemble-most-common-response when property types differ
FedericoAmura Mar 6, 2025
a2ca33e
feat: replace uint8arrays pkg with Buffer
FedericoAmura Mar 6, 2025
2eec105
feat: replace nacl pkg with noble curves
FedericoAmura Mar 6, 2025
a6fd6b9
feat: remove IEither pattern
FedericoAmura Mar 6, 2025
f1cc256
fix: linting
FedericoAmura Mar 6, 2025
a45c133
fix: run unit test for all packages
FedericoAmura Mar 7, 2025
bc87787
feat: unify localstorage usage in misc-browser
FedericoAmura Mar 7, 2025
fc73d7f
feat: lit errors
FedericoAmura Mar 7, 2025
e9cf2db
feat: remove full erc20 abi
FedericoAmura Mar 7, 2025
e4d66c9
feat: remove encryption package
FedericoAmura Mar 7, 2025
a36466b
feat: errors in relay
FedericoAmura Mar 7, 2025
50b9857
feat: abstract pino sdk logger singleton in previous logger package
FedericoAmura Mar 12, 2025
2b63d1e
feat: replace all javascript private properties with typescript priva…
FedericoAmura Mar 12, 2025
eb930e8
fix: remove removed tests references
FedericoAmura Mar 12, 2025
27d1e9e
feat: missing logger migrations
FedericoAmura Mar 13, 2025
cc83252
feat: make event listener use an action repository so action definiti…
FedericoAmura Mar 13, 2025
2016736
fix: remove module level loggers that were not updated if sdk logger …
FedericoAmura Mar 13, 2025
14a0ede
feat: add custom actions doc for event listener state machines
FedericoAmura Mar 14, 2025
9b63fd8
Merge branch 'LIT-4211-auth-refactor' into feature/lit-4238-clean-unn…
Ansonhkg Apr 3, 2025
a3041a5
chore: update yarn.lock
Ansonhkg Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,13 @@ If you're a tech-savvy user and wish to utilize only specific submodules that ou
| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 'crypto') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/crypto"><img src="https://img.shields.io/npm/v/@lit-protocol/crypto"/></a> |
| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 'encryption') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/encryption"><img src="https://img.shields.io/npm/v/@lit-protocol/encryption"/></a> |
| [@lit-protocol/event-listener](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/event-listener) | ![event-listener](https://img.shields.io/badge/-universal-8A6496 'event-listener') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/event-listener"><img src="https://img.shields.io/npm/v/@lit-protocol/event-listener"/></a> |
| [@lit-protocol/logger](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/logger) | ![logger](https://img.shields.io/badge/-universal-8A6496 'logger') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/logger"><img src="https://img.shields.io/npm/v/@lit-protocol/logger"/></a> |
| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 'misc') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/misc"><img src="https://img.shields.io/npm/v/@lit-protocol/misc"/></a> |
| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 'nacl') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/nacl"><img src="https://img.shields.io/npm/v/@lit-protocol/nacl"/></a> |
| [@lit-protocol/networks](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/networks) | ![networks](https://img.shields.io/badge/-universal-8A6496 'networks') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/networks"><img src="https://img.shields.io/npm/v/@lit-protocol/networks"/></a> |
| [@lit-protocol/pkp-base](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-base) | ![pkp-base](https://img.shields.io/badge/-universal-8A6496 'pkp-base') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-base"><img src="https://img.shields.io/npm/v/@lit-protocol/pkp-base"/></a> |
| [@lit-protocol/pkp-cosmos](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-cosmos) | ![pkp-cosmos](https://img.shields.io/badge/-universal-8A6496 'pkp-cosmos') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-cosmos"><img src="https://img.shields.io/npm/v/@lit-protocol/pkp-cosmos"/></a> |
| [@lit-protocol/pkp-ethers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-ethers) | ![pkp-ethers](https://img.shields.io/badge/-universal-8A6496 'pkp-ethers') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-ethers"><img src="https://img.shields.io/npm/v/@lit-protocol/pkp-ethers"/></a> |
| [@lit-protocol/pkp-sui](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-sui) | ![pkp-sui](https://img.shields.io/badge/-universal-8A6496 'pkp-sui') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-sui"><img src="https://img.shields.io/npm/v/@lit-protocol/pkp-sui"/></a> |
| [@lit-protocol/pkp-walletconnect](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-walletconnect) | ![pkp-walletconnect](https://img.shields.io/badge/-universal-8A6496 'pkp-walletconnect') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-walletconnect"><img src="https://img.shields.io/npm/v/@lit-protocol/pkp-walletconnect"/></a> |
| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 'types') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/types"><img src="https://img.shields.io/npm/v/@lit-protocol/types"/></a> |
| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 'uint8arrays') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/uint8arrays"><img src="https://img.shields.io/npm/v/@lit-protocol/uint8arrays"/></a> |
| [@lit-protocol/wasm](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/wasm) | ![wasm](https://img.shields.io/badge/-universal-8A6496 'wasm') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/wasm"><img src="https://img.shields.io/npm/v/@lit-protocol/wasm"/></a> |
| [@lit-protocol/wrapped-keys](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/wrapped-keys) | ![wrapped-keys](https://img.shields.io/badge/-universal-8A6496 'wrapped-keys') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/wrapped-keys"><img src="https://img.shields.io/npm/v/@lit-protocol/wrapped-keys"/></a> |
| [@lit-protocol/wrapped-keys-lit-actions](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/wrapped-keys-lit-actions) | ![wrapped-keys-lit-actions](https://img.shields.io/badge/-universal-8A6496 'wrapped-keys-lit-actions') | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/wrapped-keys-lit-actions"><img src="https://img.shields.io/npm/v/@lit-protocol/wrapped-keys-lit-actions"/></a> |
Expand All @@ -100,7 +96,7 @@ If you're a tech-savvy user and wish to utilize only specific submodules that ou

## Prerequisite

- node (v19.x or above)
- node (v20.x or above)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v19 has gone out of maintenance a while ago
v20 is in maintenance and supports File (used in encryption)

https://nodejs.org/en/about/previous-releases

- rust (v1.70.00 or above)
- [wasm-pack](https://github.com/rustwasm/wasm-pack)

Expand Down
11 changes: 11 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ const crypto = require('crypto');
global.TextEncoder = require('util').TextEncoder;
global.TextDecoder = require('util').TextDecoder;
global.crypto = crypto;

if (!global.crypto.subtle) {
global.crypto.subtle = {
digest: async (algorithm, data) => {
const algo = algorithm.toLowerCase().replace('-', '');
const hash = crypto.createHash(algo);
hash.update(Buffer.from(data));
return hash.digest().buffer;
},
};
}
2 changes: 0 additions & 2 deletions local-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@
"synthetix-js": "^2.74.1",
"tslib": "^2.3.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"uint8arrays": "^4.0.3",
"@openagenda/verror": "^3.1.4",
"ipfs-unixfs-importer": "12.0.1",
"@solana/web3.js": "^1.95.3",
"bech32": "^2.0.0",
"pako": "^2.1.0",
"@lit-protocol/misc": "8.0.0-alpha.0",
"@lit-protocol/lit-node-client": "8.0.0-alpha.0",
"@lit-protocol/auth": "8.0.0-alpha.0",
"@lit-protocol/contracts": "^0.0.71"
Expand Down
1 change: 0 additions & 1 deletion local-tests/setup/session-sigs/get-eoa-session-sigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
AuthSig,
LitResourceAbilityRequest,
} from '@lit-protocol/types';
import { log } from '@lit-protocol/misc';
import { ethers } from 'ethers';
import {
LIT_ABILITY,
Expand Down
3 changes: 1 addition & 2 deletions local-tests/setup/session-sigs/get-pkp-session-sigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
type AuthenticationContext,
LitResourceAbilityRequest,
} from '@lit-protocol/types';
import { log } from '@lit-protocol/misc';
import {
LIT_ABILITY,
CENTRALISATION_BY_NETWORK,
Expand Down Expand Up @@ -43,7 +42,7 @@ export const getPkpAuthContext = (
}),
});

log('[getPkpAuthContext]: ', authContext);
console.log('[getPkpAuthContext]: ', authContext);
Copy link
Contributor Author

@FedericoAmura FedericoAmura Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing logs are more clear when using console than using pino


return authContext;
};
7 changes: 2 additions & 5 deletions local-tests/setup/tinny-person.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import {
AuthSig,
generateAuthSig,
createSiweMessage,
} from '@lit-protocol/auth-helpers';
import { generateAuthSig, createSiweMessage } from '@lit-protocol/auth-helpers';
import { LitContracts } from '@lit-protocol/contracts-sdk';
import {
AuthMethod,
AuthSig,
BaseSiweMessage,
LitContractContext,
} from '@lit-protocol/types';
Expand Down
5 changes: 2 additions & 3 deletions local-tests/tests/testExecuteJsDecryptAndCombine.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { LIT_NETWORK } from '@lit-protocol/constants';
import { ILitNodeClient } from '@lit-protocol/types';
import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { getLitActionAuthContext } from 'local-tests/setup/session-sigs/get-lit-action-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';

import { encryptString } from '@lit-protocol/encryption';

/**
Expand All @@ -29,7 +28,7 @@ export const testExecuteJsDecryptAndCombine = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// -- Expected output:
// {
Expand Down
3 changes: 1 addition & 2 deletions local-tests/tests/testRelayer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { log } from '@lit-protocol/misc';
import { ClaimRequest, ClientClaimProcessor } from '@lit-protocol/types';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { authenticators, LitRelay } from '@lit-protocol/auth';
Expand Down Expand Up @@ -90,5 +89,5 @@ export const testRelayer = async (devEnv: TinnyEnvironment) => {
}
});

log('✅ 2. [testRelayer] Claim works');
console.log('✅ 2. [testRelayer] Claim works');
};
10 changes: 5 additions & 5 deletions local-tests/tests/testUseEoaSessionSigsToEncryptDecryptFile.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { LIT_ABILITY } from '@lit-protocol/constants';
import { encryptString, decryptToFile } from '@lit-protocol/encryption';
import { ILitNodeClient } from '@lit-protocol/types';

import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';
import { encryptString, decryptToFile } from '@lit-protocol/encryption';

/**
* Test Commands:
Expand Down Expand Up @@ -34,7 +34,7 @@ export const testUseEoaSessionSigsToEncryptDecryptFile = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// await 5 seconds for the encryption to be mined

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// DEBUG=true LIT_RPC_URL=https://yellowstone-rpc.litprotocol.com NETWORK=custom yarn test:local --filter=testUseEoaSessionSigsToEncryptDecryptString
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { LIT_ABILITY } from '@lit-protocol/constants';
import { encryptString, decryptToString } from '@lit-protocol/encryption';
import { ILitNodeClient } from '@lit-protocol/types';

import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';
import { encryptString, decryptToString } from '@lit-protocol/encryption';

/**
* Test Commands:
Expand All @@ -31,7 +31,7 @@ export const testUseEoaSessionSigsToEncryptDecryptString = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// await 5 seconds for the encryption to be mined

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { LIT_ABILITY } from '@lit-protocol/constants';
import { ILitNodeClient } from '@lit-protocol/types';
import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import {
encryptUint8Array,
decryptToUint8Array,
} from '@lit-protocol/encryption';
import {
uint8arrayFromString,
uint8arrayToString,
} from '@lit-protocol/uint8arrays';

import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';

/**
* Test Commands:
Expand All @@ -30,7 +26,7 @@ export const testUseEoaSessionSigsToEncryptDecryptUint8Array = async (
});

const message = 'Hello world';
const messageToEncrypt = uint8arrayFromString(message, 'utf8');
const messageToEncrypt = Buffer.from(message, 'utf8');

const encryptRes = await encryptUint8Array(
{
Expand All @@ -40,7 +36,7 @@ export const testUseEoaSessionSigsToEncryptDecryptUint8Array = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// await 5 seconds for the encryption to be mined

Expand Down Expand Up @@ -81,7 +77,7 @@ export const testUseEoaSessionSigsToEncryptDecryptUint8Array = async (
},
devEnv.litNodeClient as unknown as ILitNodeClient
);
const decryptResString = uint8arrayToString(decryptRes, 'utf8');
const decryptResString = Buffer.from(decryptRes).toString('utf8');

devEnv.releasePrivateKeyFromUser(alice);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
// import { LitContracts } from '@lit-protocol/contracts-sdk';
// import { log } from '@lit-protocol/misc';
// import {
// ClaimRequest,
// ClaimResult,
// ClientClaimProcessor,
// } from '@lit-protocol/types';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';

/**
* ## Scenario:
Expand Down Expand Up @@ -174,5 +166,5 @@ export const testUseEoaSessionSigsToExecuteJsClaimKeys = async (
// }
// });

log('✅ testUseEoaSessionSigsToExecuteJsClaimKeys');
console.log('✅ testUseEoaSessionSigsToExecuteJsClaimKeys');
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { log } from '@lit-protocol/misc';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';

Expand Down Expand Up @@ -62,5 +61,5 @@ export const testUseEoaSessionSigsToExecuteJsSigning = async (
throw new Error(`Expected "publicKey" in res.signatures.sig`);
}

log('✅ testUseEoaSessionSigsToExecuteJsSigning');
console.log('✅ testUseEoaSessionSigsToExecuteJsSigning');
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { log } from '@lit-protocol/misc';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';

Expand All @@ -14,7 +13,7 @@ export const testUseEoaSessionSigsToExecuteJsSigningInParallel = async (
const alice = await devEnv.createRandomPerson();

const fn = async (index: number) => {
log(`Index: ${index}`);
console.log(`Index: ${index}`);

return await devEnv.litNodeClient.executeJs({
authContext: getEoaAuthContext(devEnv, alice),
Expand All @@ -34,7 +33,7 @@ export const testUseEoaSessionSigsToExecuteJsSigningInParallel = async (

const res = await Promise.all([fn(1), fn(2), fn(3)]);
devEnv.releasePrivateKeyFromUser(alice);
log('res:', res);
console.log('res:', res);

// -- Expected output:
// [
Expand Down Expand Up @@ -114,5 +113,5 @@ export const testUseEoaSessionSigsToExecuteJsSigningInParallel = async (
}
});

log('✅ testUseEoaSessionSigsToExecuteJsSigningInParallel');
console.log('✅ testUseEoaSessionSigsToExecuteJsSigningInParallel');
};
3 changes: 1 addition & 2 deletions local-tests/tests/testUseEoaSessionSigsToPkpSign.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ethers } from 'ethers';

import { log } from '@lit-protocol/misc';
import { getEoaAuthContext } from 'local-tests/setup/session-sigs/get-eoa-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';

Expand Down Expand Up @@ -82,5 +81,5 @@ export const testUseEoaSessionSigsToPkpSign = async (
);
}

log('✅ testUseEoaSessionSigsToPkpSign');
console.log('✅ testUseEoaSessionSigsToPkpSign');
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LIT_ABILITY } from '@lit-protocol/constants';
import { encryptString, decryptToFile } from '@lit-protocol/encryption';
import { ILitNodeClient } from '@lit-protocol/types';

import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { getPkpAuthContext } from 'local-tests/setup/session-sigs/get-pkp-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';
import { encryptString, decryptToFile } from '@lit-protocol/encryption';

/**
* Test Commands:
Expand Down Expand Up @@ -35,7 +35,7 @@ export const testUsePkpSessionSigsToEncryptDecryptFile = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// await 5 seconds for the encryption to be mined

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LIT_ABILITY } from '@lit-protocol/constants';
import { encryptString, decryptToString } from '@lit-protocol/encryption';
import { ILitNodeClient } from '@lit-protocol/types';

import { AccessControlConditions } from 'local-tests/setup/accs/accs';
import { LitAccessControlConditionResource } from '@lit-protocol/auth-helpers';
import { getPkpAuthContext } from 'local-tests/setup/session-sigs/get-pkp-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
import { log } from '@lit-protocol/misc';
import { encryptString, decryptToString } from '@lit-protocol/encryption';

/**
* Test Commands:
Expand All @@ -30,7 +30,7 @@ export const testUsePkpSessionSigsToEncryptDecryptString = async (
devEnv.litNodeClient as unknown as ILitNodeClient
);

log('encryptRes:', encryptRes);
console.log('encryptRes:', encryptRes);

// -- Expected output:
// {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { log } from '@lit-protocol/misc';
import { getPkpAuthContext } from 'local-tests/setup/session-sigs/get-pkp-session-sigs';
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';

Expand Down Expand Up @@ -76,5 +75,5 @@ export const testUsePkpSessionSigsToExecuteJsSigning = async (
throw new Error(`Expected "recid" to be parseable as a number`);
}

log('✅ res:', res);
console.log('✅ res:', res);
};
Loading