Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .changeset/quiet-times-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@lit-protocol/auth-helpers': minor
'@lit-protocol/lit-client': minor
'@lit-protocol/contracts': minor
'@lit-protocol/networks': minor
'@lit-protocol/auth': minor
---

Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually.
14 changes: 9 additions & 5 deletions docs/sdk/getting-started/auth-manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,31 @@ This method caches two components:
<Steps>
<Step title="Install the SDK">

Run the following command to install the SDK:
Run the following command to install the SDK and the required <code>viem</code> peer dependency:

<CodeGroup>

```bash npm
npm i @lit-protocol/auth
npm i @lit-protocol/auth viem
```

```bash yarn
yarn add @lit-protocol/auth
yarn add @lit-protocol/auth viem
```

```bash pnpm
pnpm add @lit-protocol/auth
pnpm add @lit-protocol/auth viem
```

```bash bun
bun add @lit-protocol/auth
bun add @lit-protocol/auth viem
```

</CodeGroup>

<Note>
<code>viem</code> must be installed in your application because the SDK no longer bundles it.
</Note>
</Step>
<Step title="Choose Storage Plugin">
Choose the appropriate network based on your development stage and requirements, then create your Lit Client instance.
Expand Down
13 changes: 8 additions & 5 deletions docs/sdk/getting-started/lit-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,31 @@ The Lit Client is the core interface for interacting with the Lit Protocol netwo

<Steps>
<Step title="Install the SDK">
Run the following command to install the SDK:
Run the following command to install the SDK and the required <code>viem</code> peer dependency:

<CodeGroup>

```bash npm
npm i @lit-protocol/lit-client @lit-protocol/networks
npm i @lit-protocol/lit-client @lit-protocol/networks viem
```

```bash yarn
yarn add @lit-protocol/lit-client @lit-protocol/networks
yarn add @lit-protocol/lit-client @lit-protocol/networks viem
```

```bash pnpm
pnpm add @lit-protocol/lit-client @lit-protocol/networks
pnpm add @lit-protocol/lit-client @lit-protocol/networks viem
```

```bash bun
bun add @lit-protocol/lit-client @lit-protocol/networks
bun add @lit-protocol/lit-client @lit-protocol/networks viem
```

</CodeGroup>

<Note>
<code>viem</code> is not bundled with the SDK. Ensure your application supplies a compatible version.
</Note>
</Step>

<Step title="Network Configuration & Client Creation">
Expand Down
1 change: 0 additions & 1 deletion docs/sdk/getting-started/payment-manager-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ The Payment Manager demonstrates Lit Protocol's payment system - a billing syste
- Encryption/Decryption - Secure data with programmable access control
- PKP Signing - Cryptographic keys that can sign transactions based on conditions
- Lit Actions - Serverless functions with cryptographic capabilities

Similar to how you pay AWS for cloud computing, this\system ensures the decentralised network can sustain itself and pay node operators. You can deposit funds, request withdrawals with security delays, and manage balances for yourself or other users (enabling applications to sponsor their users' costs for better UX).

<Steps>
Expand Down
6 changes: 3 additions & 3 deletions docs/sdk/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The Lit JS SDK provides a comprehensive toolkit for integrating Lit Protocol's d

- **[Lit Client Setup](/sdk/getting-started/lit-client)**: Configure the Lit Protocol client
- **[Auth Manager Setup](/sdk/getting-started/auth-manager)**: Set up authentication management with configurable storage options
- **[Payment Manager Setup](/sdk/getting-started/payment-setup)**: Configure payment processing capabilities
- **[Payment Manager Setup](/sdk/getting-started/payment-manager-setup)**: Configure payment processing capabilities
- **[Auth Services Setup](/sdk/getting-started/auth-services)**: Configure auth services

### 2. Authentication Options

- **[PKP Native Authentication](/sdk/auth/pkp-native-auth)**: Programmable Key Pair native authentication options
- **[PKP Custom Authentication](/sdk/auth/pkp-custom-auth)**: Custom PKP authentication implementations
- **[EOA Authentication](/sdk/auth/eoa-auth)**: Externally Owned Account authentication
- **[EOA Authentication](/sdk/auth/eoa/eoa-auth)**: Externally Owned Account authentication

### 3. Auth Context Consumption / Core API Methods

Expand All @@ -40,4 +40,4 @@ The Lit JS SDK provides a comprehensive toolkit for integrating Lit Protocol's d

### 5. Network Status & Monitoring

- **[Network Status](/sdk/resources/network-status)**: - Monitor real-time uptime and performance of Lit Protocol networks
- **[Network Status](/sdk/resources/network-status)**: - Monitor real-time uptime and performance of Lit Protocol networks
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"stytch": "^12.4.0",
"tslib": "^2.8.1",
"uint8arrays": "^4.0.3",
"viem": "2.29.4",
"viem": "2.38.x",
"wagmi": "^2.15.4",
"zod": "3.24.3",
"zod-validation-error": "3.4.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/auth-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
"ethers": "^5.7.1",
"siwe": "^2.3.2",
"siwe-recap": "0.0.2-alpha.0",
"viem": "2.29.4",
"zod": "3.24.3",
"@ethersproject/transactions": "5.7.0"
},
"peerDependencies": {
"viem": "2.38.x"
}
}
2 changes: 1 addition & 1 deletion packages/auth-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"redis": "^4.6.13",
"stytch": "^12.4.0",
"tslib": "^2.8.1",
"viem": "2.29.4",
"viem": "2.38.x",
"wagmi": "^2.14.11",
"zod": "^3.24.3",
"zod-validation-error": "3.4.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"jose": "^4.14.4",
"siwe": "^2.3.2",
"stytch": "^12.4.0",
"viem": "2.29.4",
"zod": "3.24.3"
},
"peerDependencies": {
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"viem": "2.38.x"
},
"browser": {
"crypto": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"tsx": "^4.20.5",
"typechain": "^8.3.2",
"typescript": "^5.8.3",
"viem": "^2.29.4",
"viem": "2.38.x",
"zod": "^3.24.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@lit-protocol/lit-client": "workspace:*",
"@lit-protocol/networks": "workspace:*",
"@lit-protocol/schemas": "workspace:*",
"viem": "2.29.4"
"viem": "2.38.x"
},
"engines": {
"node": ">=18.0.0"
Expand Down
4 changes: 3 additions & 1 deletion packages/lit-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"dependencies": {
"@lit-protocol/uint8arrays": "7.1.1",
"bs58": "^6.0.0",
"viem": "2.29.4",
"zod": "3.24.3"
},
"peerDependencies": {
"viem": "2.38.x"
}
}
5 changes: 3 additions & 2 deletions packages/networks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
"@noble/curves": "^1.8.1",
"@wagmi/core": "^2.17.1",
"bs58": "^6.0.0",
"elysia": "^1.2.25",
"ethers": "^5.7.1",
"node-localstorage": "^3.0.5",
"pino": "^9.6.0",
"pino-caller": "^4.0.0",
"viem": "2.29.4",
"zod": "3.24.3",
"@noble/hashes": "^1.8.0"
},
"peerDependencies": {
"viem": "2.38.x"
},
"gitHead": "0d7334c2c55f448e91fe32f29edc5db8f5e09e4b",
"tags": [
"universal"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { t } from 'elysia';
import { z } from 'zod';
import {
toBigInt,
Expand All @@ -19,18 +18,3 @@ export const ClaimRequestSchema = z.object({
// 2. Transformed/Validated Type - this is the type after the user input has been transformed and validated. Usually used for smart contract calls or external API calls (such as communication with nodes). (e.g., BigInt, etc.)
export type ClaimRequestRaw = z.input<typeof ClaimRequestSchema>;
export type ClaimRequestTransformed = z.infer<typeof ClaimRequestSchema>;

// ✨ Elysia Schema
export const tClaimRequestSchema = t.Object({
derivedKeyId: t.String(),
signatures: t.Array(
t.Object({
r: t.String(),
s: t.String(),
v: t.Number(),
})
),
authMethodType: t.Number(),
authMethodId: t.String(),
authMethodPubkey: t.String(),
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { t } from 'elysia';
import { z } from 'zod';
import {
toBigInt,
Expand All @@ -24,14 +23,3 @@ export const MintRequestSchema = z.object({
// 2. Transformed/Validated Type - this is the type after the user input has been transformed and validated. Usually used for smart contract calls or external API calls (such as communication with nodes). (e.g., BigInt, etc.)
export type MintRequestRaw = z.input<typeof MintRequestSchema>;
export type MintRequestTransformed = z.infer<typeof MintRequestSchema>;

// ✨ Elysia Schema
export const tMintRequestSchema = t.Object({
keyType: t.Number(),
permittedAuthMethodTypes: t.Array(t.Number()),
permittedAuthMethodIds: t.Array(t.String()),
permittedAuthMethodPubkeys: t.Array(t.String()),
permittedAuthMethodScopes: t.Array(t.Array(t.Number())),
addPkpEthAddressAsPermittedAddress: t.Boolean(),
sendPkpToItself: t.Boolean(),
});
Loading
Loading