Skip to content

Commit f78260f

Browse files
authored
Merge branch 'staging/v7' into feature/lit-3748-naga
2 parents 2e2ab69 + 4df408f commit f78260f

File tree

122 files changed

+226
-606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+226
-606
lines changed

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tinny ENV Vars
22
MAX_ATTEMPTS=1
3-
NETWORK=cayenne
3+
NETWORK=datil-dev
44
DEBUG=true
55
WAIT_FOR_KEY_INTERVAL=3000
66
LIT_OFFICAL_RPC=https://chain-rpc.litprotocol.com/http
@@ -18,4 +18,4 @@ STOP_TESTNET=false
1818
TESTNET_MANAGER_URL=http://0.0.0.0:8000
1919
USE_LIT_BINARIES=true
2020
LIT_NODE_BINARY_PATH=/path/to/lit_node/binary
21-
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary
21+
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ yarn test:local
148148

149149
## Create a new react demo app using the Lit JS SDK
150150

151-
```js
151+
```sh
152152
yarn tools --create --react contracts-sdk --demo
153153
```
154154

@@ -164,13 +164,13 @@ yarn delete:package <package-name>
164164

165165
## Building
166166

167-
```jsx
167+
```sh
168168
yarn build
169169
```
170170

171171
### Building target package
172172

173-
```jsx
173+
```sh
174174
yarn nx run <project-name>:build
175175
```
176176

@@ -226,19 +226,10 @@ You must have at least nodejs v18 to do this.
226226

227227
5. Update the docs with `yarn gen:docs --push`
228228

229-
6. Finally, publish with the `@cayenne` tag: `yarn publish:cayenne`
229+
6. Finally, publish with `yarn publish:packages`
230230

231231
7. Commit these changes "Published version X.X.X"
232232

233-
### Publishing to Serrano / Jalapno
234-
235-
```sh
236-
git checkout serrano
237-
yarn bump
238-
yarn build
239-
yarn node ./tools/scripts/pub.mjs --tag serrano-jalapeno
240-
```
241-
242233
## Testing
243234

244235
### Quick Start on E2E Testing
@@ -251,7 +242,7 @@ yarn test:local
251242

252243
### Unit Tests
253244

254-
```jsx
245+
```sh
255246
yarn test:unit
256247
```
257248

local-tests/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ The `testName` specified in the filter **must be the same as the function name**
1919
// run all tests on local chain
2020
DEBUG=true NETWORK=custom yarn test:local
2121
22-
// run filtered tests on manzano
23-
DEBUG=true NETWORK=manzano yarn test:local --filter=testExample
24-
DEBUG=true NETWORK=manzano yarn test:local --filter=testExample,testBundleSpeed
22+
// run filtered tests on datil-test
23+
DEBUG=true NETWORK=datil-test yarn test:local --filter=testExample
24+
DEBUG=true NETWORK=datil-test yarn test:local --filter=testExample,testBundleSpeed
2525
2626
// run filtered tests by keyword
27-
DEBUG=true NETWORK=manzano yarn test:local --filter=Encrypt
27+
DEBUG=true NETWORK=datil-test yarn test:local --filter=Encrypt
2828
2929
// eg.
3030
yarn test:local --filter=testExample,testBundleSpeed
@@ -41,7 +41,7 @@ Below is the API documentation for the `ProcessEnvs` interface, detailing the co
4141
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4242
| `MAX_ATTEMPTS` | Each test is executed in a loop with a maximum number of attempts specified by `devEnv.processEnvs.MAX_ATTEMPTS`. |
4343
| `TEST_TIMEOUT` | The maximum number of milliseconds to wait for a test to complete. |
44-
| `NETWORK` | The network to use for testing, which can be one of the following: `LIT_NETWORK.Custom`, `LIT_NETWORK.Manzano`, or `LIT_NETWORK.Cayenne`. |
44+
| `NETWORK` | The network to use for testing, which can be one of the following: `LIT_NETWORK.Custom`, `LIT_NETWORK.DatilDev`, or `LIT_NETWORK.Datil`. |
4545
| `DEBUG` | Specifies whether to enable debug mode. |
4646
| `REQUEST_PER_KILOSECOND` | To execute a transaction with Lit, you must reserve capacity on the network using Capacity Credits. These allow a set number of requests over a period (default 2 days). |
4747
| `WAIT_FOR_KEY_INTERVAL` | Wait time in milliseconds if no private keys are available. |
@@ -76,8 +76,8 @@ In the test function, a `devEnv` variable will automatically be added as the fir
7676
export const testExample = async (devEnv: TinnyEnvironment) => {
7777

7878
// ========== Enviorment ==========
79-
// This test will be skipped if we are testing on the Cayenne network
80-
devEnv.setUnavailable(LIT_NETWORK.Cayenne);
79+
// This test will be skipped if we are testing on the DatilDev network
80+
devEnv.setUnavailable(LIT_NETWORK.DatilDev);
8181

8282
// Using litNodeClient
8383
const res = await devEnv.litNodeClient.executeJs({...});
@@ -126,7 +126,6 @@ The `TinnyPerson` class encapsulates various functionalities to manage wallet op
126126
# esbuild benchmark
127127

128128
```ts
129-
130129
// test-bundle-speed.ts
131130
export const testBundleSpeed = async (devEnv: TinnyEnvironment) => {
132131
const a = await import('@lit-protocol/lit-node-client');
@@ -137,6 +136,7 @@ export const testBundleSpeed = async (devEnv: TinnyEnvironment) => {
137136

138137
console.log(a, b, c, d, e);
139138
};
140-
----------------
141-
Build time: 77ms
139+
// ----------------
140+
// Build time: 77ms
141+
// ----------------
142142
```

local-tests/setup/tinny-config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export interface ProcessEnvs {
1919
/**
2020
* The network to use for testing. This can be one of the following:
2121
* - `LIT_NETWORK.Custom`
22-
* - `LIT_NETWORK.Manzano`
23-
* - `LIT_NETWORK.Cayenne`
2422
* - `LIT_NETWORK.DatilDev`
2523
*/
2624
NETWORK: LIT_NETWORK_VALUES;

local-tests/setup/tinny-environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export class TinnyEnvironment {
229229
*
230230
* The LitNodeClient is configured differently based on the network:
231231
* - Custom: Uses custom settings for local testing, with node attestation disabled.
232-
* - Manzano (or other specified testnets): Configures for specific network environments with node attestation enabled.
232+
* - DatilTest (or other specified testnets): Configures for specific network environments with node attestation enabled.
233233
*
234234
* Logs the process and exits if the client is not ready after attempting to connect.
235235
*/

local-tests/tests/test-example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { LIT_NETWORK } from '@lit-protocol/constants';
66
import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
77

88
export const testExample = async (devEnv: TinnyEnvironment) => {
9-
// Note: This test will be skipped if we are testing on the Cayenne network
10-
devEnv.setUnavailable(LIT_NETWORK.Cayenne);
9+
// Note: This test will be skipped if we are testing on the DatilDev network
10+
devEnv.setUnavailable(LIT_NETWORK.DatilDev);
1111

1212
const alice = await devEnv.createRandomPerson();
1313

local-tests/tests/testCosmosAuthSigToEncryptDecryptString.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { encryptString, decryptToString } from '@lit-protocol/encryption';
66

77
/**
88
* Test Commands:
9-
* ❌ NETWORK=cayenne yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
10-
* ❌ NETWORK=manzano yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
9+
* ❌ NETWORK=datil-dev yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
10+
* ❌ NETWORK=datil-test yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
1111
* ❌ NETWORK=custom yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
1212
* ❌ NETWORK=datil-dev yarn test:local --filter=testCosmosAuthSigToEncryptDecryptString
1313
*/
@@ -16,9 +16,7 @@ export const testCosmosAuthSigToEncryptDecryptString = async (
1616
) => {
1717
console.log('❌❌ THIS IS A KNOWN FAILING TEST, PLEASE IGNORE FOR NOW. ❌❌');
1818

19-
devEnv.setUnavailable(LIT_NETWORK.Cayenne);
2019
devEnv.setUnavailable(LIT_NETWORK.Custom);
21-
devEnv.setUnavailable(LIT_NETWORK.Manzano);
2220
devEnv.setUnavailable(LIT_NETWORK.DatilDev);
2321

2422
const accs = AccessControlConditions.getCosmosBasicAccessControlConditions({

local-tests/tests/testDelegatingCapacityCreditsNFTToAnotherPkpToExecuteJs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
1313
*
1414
*
1515
* ## Test Commands:
16-
* - ❌ Not supported in Cayenne
17-
* - ✅ NETWORK=manzano yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherPkpToExecuteJs
16+
* - ✅ NETWORK=datil-test yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherPkpToExecuteJs
1817
* - ✅ NETWORK=custom yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherPkpToExecuteJs
1918
*/
2019
export const testDelegatingCapacityCreditsNFTToAnotherPkpToExecuteJs = async (

local-tests/tests/testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
1111
*
1212
*
1313
* ## Test Commands:
14-
* - ❌ Not supported in Cayenne, but session sigs would still work
15-
* - ✅ NETWORK=manzano yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs
14+
* - ✅ NETWORK=datil-test yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs
1615
* - ✅ NETWORK=custom yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs
1716
*/
1817
export const testDelegatingCapacityCreditsNFTToAnotherWalletToExecuteJs =

local-tests/tests/testDelegatingCapacityCreditsNFTToAnotherWalletToPkpSign.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
1111
*
1212
*
1313
* ## Test Commands:
14-
* - ❌ Not supported in Cayenne, but session sigs would still work
15-
* - ✅ NETWORK=manzano yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToPkpSign
14+
* - ✅ NETWORK=datil-test yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToPkpSign
1615
* - ✅ NETWORK=custom yarn test:local --filter=testDelegatingCapacityCreditsNFTToAnotherWalletToPkpSign
1716
*/
1817
export const testDelegatingCapacityCreditsNFTToAnotherWalletToPkpSign = async (

0 commit comments

Comments
 (0)