diff --git a/examples/create-app/index.ts b/examples/create-app/index.ts index ebc6b01e16..6ab221911f 100644 --- a/examples/create-app/index.ts +++ b/examples/create-app/index.ts @@ -1,11 +1,11 @@ import 'viem/window'; +import { StorageClient, testnet as storageTestnet } from '@lens-chain/storage-client'; import { chains } from '@lens-network/sdk/viem'; import { PublicClient, testnet as protocolTestnet, uri } from '@lens-protocol/client'; import { createApp, fetchApp } from '@lens-protocol/client/actions'; import { handleOperationWith } from '@lens-protocol/client/viem'; import { Platform, app } from '@lens-protocol/metadata'; -import { StorageClient, testnet as storageTestnet } from '@lens-protocol/storage-node-client'; import { type Address, createWalletClient, custom } from 'viem'; const chain = chains.testnet; diff --git a/examples/create-app/package.json b/examples/create-app/package.json index 941c6431d8..9d38ea074a 100644 --- a/examples/create-app/package.json +++ b/examples/create-app/package.json @@ -9,7 +9,7 @@ "@lens-network/sdk": "canary", "@lens-protocol/client": "canary", "@lens-protocol/metadata": "next", - "@lens-protocol/storage-node-client": "next", + "@lens-chain/storage-client": "next", "viem": "^2.21.55" }, "devDependencies": { diff --git a/examples/user-onboarding/index.ts b/examples/user-onboarding/index.ts index 1b8140be1a..8ec9d7c4b4 100644 --- a/examples/user-onboarding/index.ts +++ b/examples/user-onboarding/index.ts @@ -1,11 +1,11 @@ import 'viem/window'; +import { StorageClient, testnet as storageTestnet } from '@lens-chain/storage-client'; import { chains } from '@lens-network/sdk/viem'; import { PublicClient, testnet as protocolTestnet } from '@lens-protocol/client'; import { createAccountWithUsername, fetchAccount } from '@lens-protocol/client/actions'; import { handleOperationWith } from '@lens-protocol/client/viem'; import { account } from '@lens-protocol/metadata'; -import { StorageClient, testnet as storageTestnet } from '@lens-protocol/storage-node-client'; import { type Address, createWalletClient, custom } from 'viem'; const chain = chains.testnet; diff --git a/examples/user-onboarding/package.json b/examples/user-onboarding/package.json index 8c5b179189..0e2b6ea6a0 100644 --- a/examples/user-onboarding/package.json +++ b/examples/user-onboarding/package.json @@ -9,7 +9,7 @@ "@lens-network/sdk": "canary", "@lens-protocol/client": "canary", "@lens-protocol/metadata": "next", - "@lens-protocol/storage-node-client": "next", + "@lens-chain/storage-client": "next", "viem": "^2.21.55" }, "devDependencies": { diff --git a/packages/client/package.json b/packages/client/package.json index 72aeecd4b6..956a436e18 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -39,13 +39,23 @@ }, "typesVersions": { "*": { - "actions": ["./dist/actions/index.d.ts"], - "ethers": ["./dist/ethers/index.d.ts"], - "viem": ["./dist/viem/index.d.ts"], - "test-utils": ["./dist/test-utils.d.ts"] + "actions": [ + "./dist/actions/index.d.ts" + ], + "ethers": [ + "./dist/ethers/index.d.ts" + ], + "viem": [ + "./dist/viem/index.d.ts" + ], + "test-utils": [ + "./dist/test-utils.d.ts" + ] } }, - "files": ["dist"], + "files": [ + "dist" + ], "sideEffects": false, "scripts": { "build": "tsup", @@ -82,9 +92,9 @@ } }, "devDependencies": { + "@lens-chain/storage-client": "0.0.0-next-20250225182032", "@lens-network/sdk": "canary", "@lens-protocol/metadata": "next", - "@lens-protocol/storage-node-client": "next", "ethers": "^6.13.4", "msw": "^2.7.0", "tsup": "^8.3.5", diff --git a/packages/client/src/test-utils.ts b/packages/client/src/test-utils.ts index cc1f0bd80c..d19c88efb1 100644 --- a/packages/client/src/test-utils.ts +++ b/packages/client/src/test-utils.ts @@ -1,12 +1,12 @@ /// +import { StorageClient } from '@lens-chain/storage-client'; import { chains } from '@lens-network/sdk/viem'; -import { StorageClient, testnet as storageEnv } from '@lens-protocol/storage-node-client'; import { evmAddress } from '@lens-protocol/types'; import { http, type Account, type Transport, type WalletClient, createWalletClient } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; -import { GraphQLErrorCode, PublicClient, staging as apiEnv } from '.'; +import { GraphQLErrorCode, PublicClient, staging } from '.'; const pk = privateKeyToAccount(import.meta.env.PRIVATE_KEY); export const account = evmAddress(import.meta.env.TEST_ACCOUNT); @@ -22,7 +22,7 @@ export const signer = evmAddress(wallet.account.address); export function createPublicClient() { return PublicClient.create({ - environment: apiEnv, + environment: staging, origin: 'http://example.com', }); } @@ -72,4 +72,4 @@ export function createGraphQLErrorObject(code: GraphQLErrorCode) { }; } -export const storageClient = StorageClient.create(storageEnv); +export const storageClient = StorageClient.create(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16242679e2..0af6ccf16c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,15 +72,15 @@ importers: specifier: ^1.9.2 version: 1.9.2 devDependencies: + '@lens-chain/storage-client': + specifier: 0.0.0-next-20250225182032 + version: 0.0.0-next-20250225182032 '@lens-network/sdk': specifier: canary version: 0.0.0-canary-20241203140504(ethers@6.13.4)(viem@2.22.4(typescript@5.7.2)(zod@3.23.8))(zksync-ethers@6.15.3(ethers@6.13.4)) '@lens-protocol/metadata': specifier: next version: 2.0.0-next.6(typescript@5.7.2)(zod@3.23.8) - '@lens-protocol/storage-node-client': - specifier: next - version: 0.0.0-next-20250114134800 ethers: specifier: ^6.13.4 version: 6.13.4 @@ -875,6 +875,9 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@lens-chain/storage-client@0.0.0-next-20250225182032': + resolution: {integrity: sha512-wSDaBlaY1LzAyoTBuY65Dw2gbWgdQ+2/8c+1KWtlDr6Wk61hloXzn2dzJ/Uuw6+TSQqqfp9Ct/ElkowkqPTtjg==} + '@lens-network/sdk@0.0.0-canary-20241203140504': resolution: {integrity: sha512-w5mNEXQTP0pSkCq6b8sgM2/87dad1gFTP7hbaDxy4lXnM1fBrVA5OzxWRfCIJJY8/NGdw4RYhEzJoXf4IRR97w==} engines: {node: '>=18', pnpm: '>=9.1.2'} @@ -899,9 +902,6 @@ packages: zod: optional: true - '@lens-protocol/storage-node-client@0.0.0-next-20250114134800': - resolution: {integrity: sha512-1tSI6U8cgpXWsla0AbaJuy9x+q+qzcvEnbU/zhW2FO5xLxQsS7W4RB0V2fGxysGP0CcDyFws++rlAjcTbTPeEw==} - '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -3495,6 +3495,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@lens-chain/storage-client@0.0.0-next-20250225182032': {} + '@lens-network/sdk@0.0.0-canary-20241203140504(ethers@6.13.4)(viem@2.22.4(typescript@5.7.2)(zod@3.23.8))(zksync-ethers@6.15.3(ethers@6.13.4))': optionalDependencies: ethers: 6.13.4 @@ -3511,8 +3513,6 @@ snapshots: transitivePeerDependencies: - typescript - '@lens-protocol/storage-node-client@0.0.0-next-20250114134800': {} - '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.25.9