From 31d8364e92492bdfc979ad4fcb103b48c940fe08 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Tue, 10 Dec 2024 14:10:06 +0100 Subject: [PATCH] feat: introduces accountFragment in client config --- packages/client/src/actions/account.ts | 13 ++- packages/client/src/clients.ts | 72 +++++++------ packages/client/src/config.ts | 9 +- packages/client/src/context.ts | 10 +- packages/client/src/types.ts | 8 -- packages/graphql/src/accounts/account.ts | 11 +- packages/graphql/src/fragments/account.ts | 9 +- packages/graphql/src/fragments/post.ts | 10 +- packages/graphql/src/graphql.ts | 124 ++++++++++++++++------ pnpm-lock.yaml | 105 +++++++++++++++--- 10 files changed, 258 insertions(+), 113 deletions(-) diff --git a/packages/client/src/actions/account.ts b/packages/client/src/actions/account.ts index 6bc42a127..a7d659242 100644 --- a/packages/client/src/actions/account.ts +++ b/packages/client/src/actions/account.ts @@ -24,7 +24,6 @@ import type { import { AccountFeedsStatsQuery, AccountGraphsStatsQuery, - AccountQuery, AccountStatsQuery, AccountsAvailableQuery, AccountsBlockedQuery, @@ -35,10 +34,13 @@ import { SearchAccountsQuery, SetAccountMetadataMutation, UnmuteAccountMutation, + accountQuery, } from '@lens-protocol/graphql'; import type { ResultAsync } from '@lens-protocol/types'; +import type { FullAccount } from '@lens-protocol/graphql'; import type { AnyClient, SessionClient } from '../clients'; +import type { Context } from '../context'; import type { UnauthenticatedError, UnexpectedError } from '../errors'; import type { Paginated } from '../types'; @@ -57,11 +59,12 @@ import type { Paginated } from '../types'; * @param request - The Account query request. * @returns The Account or `null` if it does not exist. */ -export function fetchAccount( - client: AnyClient, +export function fetchAccount( + client: AnyClient>, request: AccountRequest, -): ResultAsync { - return client.query(AccountQuery, { request }); +): ResultAsync { + const document = accountQuery(client.context.accountFragment); + return client.query(document, { request }); } /** diff --git a/packages/client/src/clients.ts b/packages/client/src/clients.ts index 1082d98a1..9aebf3720 100644 --- a/packages/client/src/clients.ts +++ b/packages/client/src/clients.ts @@ -1,11 +1,11 @@ -import type { EnvironmentConfig } from '@lens-protocol/env'; import { AuthenticateMutation, ChallengeMutation } from '@lens-protocol/graphql'; import type { AuthenticationChallenge, ChallengeRequest, SignedAuthChallenge, + StandardData, } from '@lens-protocol/graphql'; -import type { Credentials, IStorage, IStorageProvider } from '@lens-protocol/storage'; +import type { Credentials, IStorage } from '@lens-protocol/storage'; import { createCredentialsStorage } from '@lens-protocol/storage'; import { ResultAsync, @@ -29,10 +29,11 @@ import { } from '@urql/core'; import { type Logger, getLogger } from 'loglevel'; +import type { Account } from '@lens-protocol/graphql'; import { type AuthenticatedUser, authenticatedUser } from './AuthenticatedUser'; import { transactionStatus } from './actions'; import type { ClientConfig } from './config'; -import { configureContext } from './context'; +import { type Context, configureContext } from './context'; import { AuthenticationError, GraphQLErrorCode, @@ -43,7 +44,6 @@ import { hasExtensionCode, } from './errors'; import { decodeIdToken } from './tokens'; -import type { StandardData } from './types'; import { delay } from './utils'; function takeValue({ @@ -54,31 +54,20 @@ function takeValue({ return data.value; } -/** - * @internal - */ -type ClientContext = { - environment: EnvironmentConfig; - cache: boolean; - debug: boolean; - origin?: string; - storage: IStorageProvider; -}; - export type SignMessage = (message: string) => Promise; export type LoginParams = ChallengeRequest & { signMessage: SignMessage; }; -abstract class AbstractClient { +abstract class AbstractClient { protected readonly urql: UrqlClient; protected readonly logger: Logger; protected readonly credentials: IStorage; - protected constructor(public readonly context: ClientContext) { + protected constructor(public readonly context: TContext) { this.credentials = createCredentialsStorage(context.storage, context.environment.name); this.logger = getLogger(this.constructor.name); @@ -111,12 +100,12 @@ abstract class AbstractClient { /** * Asserts that the client is a {@link PublicClient}. */ - public abstract isPublicClient(): this is PublicClient; + public abstract isPublicClient(): this is PublicClient; /** * that the client is a {@link SessionClient}. */ - public abstract isSessionClient(): this is SessionClient; + public abstract isSessionClient(): this is SessionClient; public abstract query( document: TypedDocumentNode, TVariables>, @@ -156,13 +145,16 @@ abstract class AbstractClient { /** * A client to interact with the public access queries and mutations of the Lens GraphQL API. */ -export class PublicClient extends AbstractClient { +export class PublicClient extends AbstractClient< + TContext, + UnexpectedError +> { /** * The current session client. * * This could be the {@link PublicClient} itself if the user is not authenticated, or a {@link SessionClient} if the user is authenticated. */ - public currentSession: PublicClient | SessionClient = this; + public currentSession: PublicClient | SessionClient = this; /** * Create a new instance of the {@link PublicClient}. @@ -177,7 +169,7 @@ export class PublicClient extends AbstractClient { * @param options - The options to configure the client. * @returns The new instance of the client. */ - static create(options: ClientConfig): PublicClient { + static create(options: ClientConfig): PublicClient { return new PublicClient(configureContext(options)); } @@ -193,7 +185,7 @@ export class PublicClient extends AbstractClient { */ authenticate( request: SignedAuthChallenge, - ): ResultAsync { + ): ResultAsync, AuthenticationError | UnexpectedError> { return this.mutation(AuthenticateMutation, { request }) .andThen((result) => { if (result.__typename === 'AuthenticationTokens') { @@ -217,7 +209,7 @@ export class PublicClient extends AbstractClient { signMessage, ...request }: LoginParams): ResultAsync< - SessionClient, + SessionClient, AuthenticationError | SigningError | UnexpectedError > { return this.challenge(request) @@ -244,7 +236,7 @@ export class PublicClient extends AbstractClient { * * @returns The session client if available. */ - resumeSession(): ResultAsync { + resumeSession(): ResultAsync, UnauthenticatedError> { return ResultAsync.fromSafePromise(this.credentials.get()).andThen((credentials) => { if (!credentials) { return new UnauthenticatedError('No credentials found').asResultAsync(); @@ -256,14 +248,14 @@ export class PublicClient extends AbstractClient { /** * {@inheritDoc AbstractClient.isPublicClient} */ - public override isPublicClient(): this is PublicClient { + public override isPublicClient(): this is PublicClient { return true; } /** * {@inheritDoc AbstractClient.isSessionClient} */ - public override isSessionClient(): this is SessionClient { + public override isSessionClient(): this is SessionClient { return false; } @@ -301,12 +293,15 @@ export class PublicClient extends AbstractClient { * * @privateRemarks Intentionally not exported. */ -class SessionClient extends AbstractClient { - public get parent(): PublicClient { +class SessionClient extends AbstractClient< + TContext, + UnauthenticatedError | UnexpectedError +> { + public get parent(): PublicClient { return this._parent; } - constructor(private readonly _parent: PublicClient) { + constructor(private readonly _parent: PublicClient) { super(_parent.context); _parent.currentSession = this; } @@ -340,14 +335,14 @@ class SessionClient extends AbstractClient { return false; } /** * {@inheritDoc AbstractClient.isSessionClient} */ - public override isSessionClient(): this is SessionClient { + public override isSessionClient(): this is SessionClient { return true; } @@ -469,4 +464,15 @@ export type { SessionClient }; /** * Any client that can be used to interact with the Lens GraphQL API. */ -export type AnyClient = PublicClient | SessionClient; +// TODO remove default +export type AnyClient = + | PublicClient + | SessionClient; + +export type AccountFromContext = TContext extends Context + ? TAccount + : never; + +export type AccountFromClient = TClient extends AnyClient + ? AccountFromContext + : never; diff --git a/packages/client/src/config.ts b/packages/client/src/config.ts index 2e743c545..b91c75724 100644 --- a/packages/client/src/config.ts +++ b/packages/client/src/config.ts @@ -1,10 +1,11 @@ import type { EnvironmentConfig } from '@lens-protocol/env'; +import type { Account, AccountFragment, FragmentDocumentFor } from '@lens-protocol/graphql'; import type { IStorageProvider } from '@lens-protocol/storage'; /** * The client configuration. */ -export type ClientConfig = { +export type ClientConfig = { /** * The environment configuration to use (e.g. `mainnet`, `testnet`). */ @@ -34,4 +35,10 @@ export type ClientConfig = { * @defaultValue {@link InMemoryStorageProvider} */ storage?: IStorageProvider; + /** + * The Account Fragment to use. + * + * @defaultValue {@link AccountFragment} + */ + accountFragment?: FragmentDocumentFor; }; diff --git a/packages/client/src/context.ts b/packages/client/src/context.ts index 995d799f3..289ee53ac 100644 --- a/packages/client/src/context.ts +++ b/packages/client/src/context.ts @@ -1,27 +1,33 @@ import type { EnvironmentConfig } from '@lens-protocol/env'; +import { AccountFragment } from '@lens-protocol/graphql'; +import type { Account, FragmentDocumentFor } from '@lens-protocol/graphql'; import { type IStorageProvider, InMemoryStorageProvider } from '@lens-protocol/storage'; import type { ClientConfig } from './config'; /** * @internal */ -export type Context = { +export type Context = { environment: EnvironmentConfig; cache: boolean; debug: boolean; origin?: string; storage: IStorageProvider; + accountFragment: FragmentDocumentFor; }; /** * @internal */ -export function configureContext(from: ClientConfig): Context { +export function configureContext( + from: ClientConfig, +): Context { return { environment: from.environment, cache: from.cache ?? false, debug: from.debug ?? false, origin: from.origin, storage: from.storage ?? new InMemoryStorageProvider(), + accountFragment: from.accountFragment ?? (AccountFragment as FragmentDocumentFor), }; } diff --git a/packages/client/src/types.ts b/packages/client/src/types.ts index 1daa950eb..df450c0b2 100644 --- a/packages/client/src/types.ts +++ b/packages/client/src/types.ts @@ -57,14 +57,6 @@ export type OperationHandler = | RestrictedOperationHandler | DelegableOperationHandler; -/** - * A standardized data object. - * - * All GQL operations should alias their results to `value` to ensure interoperability - * with this client interface. - */ -export type StandardData = { value: T }; - /** * A paginated list of items. */ diff --git a/packages/graphql/src/accounts/account.ts b/packages/graphql/src/accounts/account.ts index dbca0e189..0d109c5a3 100644 --- a/packages/graphql/src/accounts/account.ts +++ b/packages/graphql/src/accounts/account.ts @@ -1,25 +1,24 @@ import type { FragmentOf } from 'gql.tada'; import { - Account, AccountAvailable, AccountBlocked, + AccountFragment, PaginatedResultInfo, SelfFundedTransactionRequest, SponsoredTransactionRequest, TransactionWillFail, } from '../fragments'; -import { type RequestOf, graphql } from '../graphql'; +import { type RequestOf, type RequestOfFactory, factory, graphql } from '../graphql'; -export const AccountQuery = graphql( +export const accountQuery = factory( `query Account($request: AccountRequest!) { value: account(request: $request) { ...Account } }`, - [Account], ); -export type AccountRequest = RequestOf; +export type AccountRequest = RequestOfFactory; export const SearchAccountsQuery = graphql( `query SearchAccounts($request: AccountSearchRequest!) { @@ -33,7 +32,7 @@ export const SearchAccountsQuery = graphql( } } }`, - [Account, PaginatedResultInfo], + [AccountFragment, PaginatedResultInfo], ); export type SearchAccountsRequest = RequestOf; diff --git a/packages/graphql/src/fragments/account.ts b/packages/graphql/src/fragments/account.ts index 85ba76490..190b71424 100644 --- a/packages/graphql/src/fragments/account.ts +++ b/packages/graphql/src/fragments/account.ts @@ -28,7 +28,7 @@ export const AccountMetadata = graphql( ); export type AccountMetadata = FragmentOf; -export const Account = graphql( +export const AccountFragment = graphql( `fragment Account on Account { __typename address @@ -38,11 +38,12 @@ export const Account = graphql( }`, [Username], ); -export type Account = FragmentOf; +export type Account = FragmentOf; -export const FullAccount = graphql( +export const FullAccountFragment = graphql( `fragment Account on Account { __typename + full: address address score metadata { @@ -57,7 +58,7 @@ export const FullAccount = graphql( }`, [AccountMetadata, LoggedInAccountOperations, Username], ); -export type FullAccount = FragmentOf; +export type FullAccount = FragmentOf; const AccountManagerPermissions = graphql( `fragment AccountManagerPermissions on AccountManagerPermissions { diff --git a/packages/graphql/src/fragments/post.ts b/packages/graphql/src/fragments/post.ts index f01e80351..207505bf3 100644 --- a/packages/graphql/src/fragments/post.ts +++ b/packages/graphql/src/fragments/post.ts @@ -1,6 +1,6 @@ import type { FragmentOf } from 'gql.tada'; import { graphql } from '../graphql'; -import { Account } from './account'; +import { AccountFragment } from './account'; import { ActionInputInfo, Amount, BooleanValue, NetworkAddress } from './common'; import { App, Feed } from './primitives'; @@ -134,7 +134,7 @@ export const ReferencedPost = graphql( } } `, - [Account, App, Feed, PostMetadata, PostAction, LoggedInPostOperations], + [AccountFragment, App, Feed, PostMetadata, PostAction, LoggedInPostOperations], ); export const NestedPost = graphql( @@ -184,8 +184,10 @@ export const Post = graphql( } } `, - [Account, App, Feed, PostMetadata, PostAction, NestedPost, LoggedInPostOperations], + [AccountFragment, App, Feed, PostMetadata, PostAction, NestedPost, LoggedInPostOperations], ); +export type PostFragment = Post; + export type Post = FragmentOf; // operations: LoggedInPostOperations @@ -277,6 +279,6 @@ export const AccountPostReaction = graphql( ...PostReaction } }`, - [Account, PostReaction], + [AccountFragment, PostReaction], ); export type AccountPostReaction = FragmentOf; diff --git a/packages/graphql/src/graphql.ts b/packages/graphql/src/graphql.ts index 6c237b296..9f8b485c5 100644 --- a/packages/graphql/src/graphql.ts +++ b/packages/graphql/src/graphql.ts @@ -1,28 +1,32 @@ -import { - type AccessToken, - type BigDecimal, - type BigIntString, - type BlockchainData, - type CompactJwt, - type Cursor, - type DateTime, - type EncodedTransaction, - type EvmAddress, - type ID, - type IdToken, - type LegacyProfileId, - type PostId, - type RefreshToken, - type Signature, - type TxHash, - type URI, - type URL, - type UUID, - type UsernameValue, - type Void, - never, +import type { + AccessToken, + BigDecimal, + BigIntString, + BlockchainData, + CompactJwt, + Cursor, + DateTime, + EncodedTransaction, + EvmAddress, + ID, + IdToken, + LegacyProfileId, + PostId, + RefreshToken, + Signature, + TxHash, + URI, + URL, + UUID, + UsernameValue, + Void, } from '@lens-protocol/types'; -import { type DocumentDecoration, type FragmentOf, initGraphQLTada } from 'gql.tada'; +import { + type DocumentDecoration, + type TadaDocumentNode, + type VariablesOf, + initGraphQLTada, +} from 'gql.tada'; import type { PageSize } from './enums'; import type { introspection } from './graphql-env'; @@ -72,23 +76,73 @@ export type RequestOf = Document extends DocumentDecoration< /** * @internal */ -export type FragmentShape = NonNullable[1]>[number]; +export type UnknownFragmentShape = NonNullable[1]>[number]; + +/** + * @internal + */ -export type TypedDocumentFrom = ReturnType< - typeof graphql ->; +export type TypedDocumentFrom< + In extends string, + Fragments extends UnknownFragmentShape[], +> = ReturnType>; -export type FragmentNodeFor = T extends FragmentOf ? U : never; +export type AnyGqlNode = { __typename: TTypename }; -export type Factory = []>( - ...fragments: T -) => TypedDocumentFrom; +export type AnyVariables = Record; + +export type FragmentDocumentFor = TGqlNode extends AnyGqlNode< + infer TTypename +> + ? TadaDocumentNode< + TGqlNode, + AnyVariables, + { + fragment: TTypename; + on: TTypename; + masked: false; + } + > + : never; + +/** + * A standardized data object. + * + * All GQL operations should alias their results to `value` to ensure interoperability + * with this client interface. + */ +export type StandardData = { value: T }; + +export type Factory = < + Nodes extends AnyGqlNode[], + Fragments extends { [K in keyof Nodes]: FragmentDocumentFor }, + Document extends TypedDocumentFrom, +>( + ...fragments: Fragments +) => TadaDocumentNode>, VariablesOf>; + +type First = T extends [infer First, ...unknown[]] ? First : never; /** * @internal */ -export function factory(_: In): Factory { - return []>(..._fragments: T): TypedDocumentFrom => { - never('This function should never be called'); +export function factory(operation: In): Factory { + return < + Nodes extends AnyGqlNode[], + Fragments extends { [K in keyof Nodes]: FragmentDocumentFor }, + Document extends TypedDocumentFrom, + Result extends StandardData>, + Variables extends VariablesOf, + >( + ...fragments: Fragments + ): TadaDocumentNode => { + return graphql(operation, fragments) as TadaDocumentNode; }; } + +/** + * @internal + */ +export type RequestOfFactory> = F extends Factory + ? RequestOf>> + : never; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de4a3057f..00bcecc3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,10 +58,10 @@ importers: version: link:../types '@urql/core': specifier: ^5.0.8 - version: 5.0.8(graphql@16.9.0) + version: 5.0.8 '@urql/exchange-auth': specifier: ^2.2.0 - version: 2.2.0(@urql/core@5.0.8(graphql@16.9.0)) + version: 2.2.0(@urql/core@5.0.8) jwt-decode: specifier: ^4.0.0 version: 4.0.0 @@ -71,16 +71,16 @@ importers: devDependencies: '@lens-network/sdk': specifier: 0.0.0-canary-20241203140504 - version: 0.0.0-canary-20241203140504(viem@2.21.53(typescript@5.6.3)(zod@3.23.8)) + version: 0.0.0-canary-20241203140504(viem@2.21.53(typescript@5.6.3)) tsup: specifier: ^8.3.5 - version: 8.3.5(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3) + version: 8.3.5(typescript@5.6.3) typescript: specifier: ^5.6.3 version: 5.6.3 viem: specifier: ^2.21.53 - version: 2.21.53(typescript@5.6.3)(zod@3.23.8) + version: 2.21.53(typescript@5.6.3) packages/env: dependencies: @@ -197,8 +197,8 @@ importers: packages: - '@0no-co/graphql.web@1.0.9': - resolution: {integrity: sha512-lXSg4bDHvP8CiMdpQf9f/rca12IIjXHN/p0Rc5mgzgLe4JBlIoA1zFa9NKhfG1bW0OyI2hgaOldFCfkEQwZuEQ==} + '@0no-co/graphql.web@1.0.12': + resolution: {integrity: sha512-BTDjjsV/zSPy5fqItwm+KWUfh9CSe9tTtR6rCB72ddtkAxdcHbi4Ir4r/L1Et4lyxmL+i7Rb3m9sjLLi9tYrzA==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 peerDependenciesMeta: @@ -2670,7 +2670,9 @@ packages: snapshots: - '@0no-co/graphql.web@1.0.9(graphql@16.9.0)': + '@0no-co/graphql.web@1.0.12': {} + + '@0no-co/graphql.web@1.0.12(graphql@16.9.0)': optionalDependencies: graphql: 16.9.0 @@ -3099,7 +3101,7 @@ snapshots: '@gql.tada/internal@1.0.8(graphql@16.9.0)(typescript@5.6.3)': dependencies: - '@0no-co/graphql.web': 1.0.9(graphql@16.9.0) + '@0no-co/graphql.web': 1.0.12(graphql@16.9.0) graphql: 16.9.0 typescript: 5.6.3 @@ -3135,9 +3137,9 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lens-network/sdk@0.0.0-canary-20241203140504(viem@2.21.53(typescript@5.6.3)(zod@3.23.8))': + '@lens-network/sdk@0.0.0-canary-20241203140504(viem@2.21.53(typescript@5.6.3))': optionalDependencies: - viem: 2.21.53(typescript@5.6.3)(zod@3.23.8) + viem: 2.21.53(typescript@5.6.3) '@manypkg/find-root@1.1.0': dependencies: @@ -3352,16 +3354,23 @@ snapshots: dependencies: '@types/node': 22.10.1 + '@urql/core@5.0.8': + dependencies: + '@0no-co/graphql.web': 1.0.12 + wonka: 6.3.4 + transitivePeerDependencies: + - graphql + '@urql/core@5.0.8(graphql@16.9.0)': dependencies: - '@0no-co/graphql.web': 1.0.9(graphql@16.9.0) + '@0no-co/graphql.web': 1.0.12(graphql@16.9.0) wonka: 6.3.4 transitivePeerDependencies: - graphql - '@urql/exchange-auth@2.2.0(@urql/core@5.0.8(graphql@16.9.0))': + '@urql/exchange-auth@2.2.0(@urql/core@5.0.8)': dependencies: - '@urql/core': 5.0.8(graphql@16.9.0) + '@urql/core': 5.0.8 wonka: 6.3.4 '@vitest/expect@2.1.8': @@ -3404,6 +3413,10 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 + abitype@1.0.6(typescript@5.6.3): + optionalDependencies: + typescript: 5.6.3 + abitype@1.0.6(typescript@5.6.3)(zod@3.23.8): optionalDependencies: typescript: 5.6.3 @@ -3915,7 +3928,7 @@ snapshots: gql.tada@1.8.10(graphql@16.9.0)(typescript@5.6.3): dependencies: - '@0no-co/graphql.web': 1.0.9(graphql@16.9.0) + '@0no-co/graphql.web': 1.0.12(graphql@16.9.0) '@0no-co/graphqlsp': 1.12.16(graphql@16.9.0)(typescript@5.6.3) '@gql.tada/cli-utils': 1.6.3(graphql@16.9.0)(typescript@5.6.3) '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@5.6.3) @@ -4290,6 +4303,20 @@ snapshots: outdent@0.5.0: {} + ox@0.1.2(typescript@5.6.3): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 + '@scure/bip39': 1.4.0 + abitype: 1.0.6(typescript@5.6.3) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - zod + ox@0.1.2(typescript@5.6.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.11.0 @@ -4402,6 +4429,10 @@ snapshots: ora: 8.1.0 v8flags: 4.0.1 + postcss-load-config@6.0.1: + dependencies: + lilconfig: 3.1.2 + postcss-load-config@6.0.1(postcss@8.4.49)(tsx@4.19.2): dependencies: lilconfig: 3.1.2 @@ -4750,6 +4781,32 @@ snapshots: - tsx - yaml + tsup@8.3.5(typescript@5.6.3): + dependencies: + bundle-require: 5.0.0(esbuild@0.24.0) + cac: 6.7.14 + chokidar: 4.0.1 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.24.0 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1 + resolve-from: 5.0.0 + rollup: 4.24.2 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.1 + tinyglobby: 0.2.10 + tree-kill: 1.2.2 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tsx@4.19.2: dependencies: esbuild: 0.23.1 @@ -4819,6 +4876,24 @@ snapshots: v8flags@4.0.1: {} + viem@2.21.53(typescript@5.6.3): + dependencies: + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 + '@scure/bip39': 1.4.0 + abitype: 1.0.6(typescript@5.6.3) + isows: 1.0.6(ws@8.18.0) + ox: 0.1.2(typescript@5.6.3) + webauthn-p256: 0.0.10 + ws: 8.18.0 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + viem@2.21.53(typescript@5.6.3)(zod@3.23.8): dependencies: '@noble/curves': 1.6.0