Skip to content

Commit

Permalink
chore: switch to @lens-chain/storage-client
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Feb 26, 2025
1 parent 66eaf36 commit 06adccc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/create-app/index.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/create-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion examples/user-onboarding/index.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/user-onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
22 changes: 16 additions & 6 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions packages/client/src/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// <reference path="../../../vite-env.d.ts" />

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);
Expand All @@ -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',
});
}
Expand Down Expand Up @@ -72,4 +72,4 @@ export function createGraphQLErrorObject(code: GraphQLErrorCode) {
};
}

export const storageClient = StorageClient.create(storageEnv);
export const storageClient = StorageClient.create();
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 06adccc

Please sign in to comment.