From 10b0d0c06054f65ebdb208329ae7da587e6de502 Mon Sep 17 00:00:00 2001 From: Joaquim Verges Date: Wed, 4 Dec 2024 14:17:39 +1300 Subject: [PATCH] docs: Add EIP1193 extension documentation --- packages/thirdweb/scripts/typedoc.mjs | 6 +++++- packages/thirdweb/src/adapters/eip1193/from-eip1193.ts | 2 ++ packages/thirdweb/src/adapters/eip1193/to-eip1193.ts | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/thirdweb/scripts/typedoc.mjs b/packages/thirdweb/scripts/typedoc.mjs index e733815cb18..9f6bed5bfbf 100644 --- a/packages/thirdweb/scripts/typedoc.mjs +++ b/packages/thirdweb/scripts/typedoc.mjs @@ -4,7 +4,11 @@ import { Application } from "typedoc"; const jsonOut = "typedoc/documentation.json"; const app = await Application.bootstrapWithPlugins({ - entryPoints: ["src/exports/**/*.ts", "src/extensions/modules/**/index.ts"], + entryPoints: [ + "src/exports/**/*.ts", + "src/extensions/modules/**/index.ts", + "src/adapters/eip1193/index.ts", + ], exclude: [ "src/exports/*.native.ts", "src/exports/**/*.native.ts", diff --git a/packages/thirdweb/src/adapters/eip1193/from-eip1193.ts b/packages/thirdweb/src/adapters/eip1193/from-eip1193.ts index 7ac33cc4a73..f191a71d421 100644 --- a/packages/thirdweb/src/adapters/eip1193/from-eip1193.ts +++ b/packages/thirdweb/src/adapters/eip1193/from-eip1193.ts @@ -54,6 +54,8 @@ export type FromEip1193AdapterOptions = { * value: 1000000000000000000n * }); * ``` + * + * @extension EIP1193 */ export function fromProvider(options: FromEip1193AdapterOptions): Wallet { const id: WalletId = options.walletId ?? "adapter"; diff --git a/packages/thirdweb/src/adapters/eip1193/to-eip1193.ts b/packages/thirdweb/src/adapters/eip1193/to-eip1193.ts index ac87114ab3f..6f9f6b26fb8 100644 --- a/packages/thirdweb/src/adapters/eip1193/to-eip1193.ts +++ b/packages/thirdweb/src/adapters/eip1193/to-eip1193.ts @@ -50,6 +50,8 @@ export type ToEip1193ProviderOptions = { * console.log("Active accounts:", accounts); * }); * ``` + * + * @extension EIP1193 */ export function toProvider(options: ToEip1193ProviderOptions): EIP1193Provider { const { chain, client, wallet, connectOverride } = options;