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
4 changes: 1 addition & 3 deletions docs/pages/core/add-passkey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const signerSubscription = watchSignerStatus(config)(async (status) => {
});
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>
16 changes: 4 additions & 12 deletions docs/pages/core/authenticate-users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ if (!bundle) {
await signer.authenticate({ type: "email", bundle });
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -85,9 +83,7 @@ await signer.authenticate({
});
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -120,9 +116,7 @@ await signer.authenticate({
});
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -150,8 +144,6 @@ await signer.authenticate({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>
12 changes: 3 additions & 9 deletions docs/pages/core/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ npm i -s @account-kit/core @account-kit/infra
Now, you're ready to create a config. The config we create should be a static object that you can import anywhere into your application. It contains all of the state that the functions within
this package use.

```ts twoslash
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

## Authenticate the user

Expand Down Expand Up @@ -84,9 +82,7 @@ if (!bundle) {
await signer.authenticate({ type: "email", bundle });
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -131,9 +127,7 @@ await client.sendUserOperation({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down
8 changes: 2 additions & 6 deletions docs/pages/core/send-user-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ await client.sendUserOperation({
});
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -112,8 +110,6 @@ await client.sendUserOperation({
});
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/core/sponsor-gas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ const clientSubscription = watchSmartAccountClient(
// .. do stuff with the client state
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/config.ts]
```
<Markdown src="../../shared/core/config.mdx" />

</CodeBlocks>

Expand Down
4 changes: 1 addition & 3 deletions docs/pages/core/ssr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ if (typeof window !== "undefined") {
}
```

```ts twoslash [config.ts] filename="config.ts"
// [!include ~/shared/core/ssr-config.ts]
```
<Markdown src="../../shared/core/ssr-config.mdx" />

</CodeBlocks>

Expand Down
4 changes: 1 addition & 3 deletions docs/pages/infra/drop-and-replace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ try {
}
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

</CodeBlocks>

Expand Down
8 changes: 2 additions & 6 deletions docs/pages/infra/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ Now that you have an API key and a Policy ID, you can create a [Smart Account Cl
above.
</Warning>

```ts twoslash
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

## Send a user operation

Expand All @@ -72,8 +70,6 @@ const { hash } = await client.sendUserOperation({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

</CodeBlocks>
8 changes: 2 additions & 6 deletions docs/pages/infra/send-user-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const { hash } = await client.sendUserOperation({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -56,8 +54,6 @@ const { hash } = await client.sendUserOperation({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

</CodeBlocks>
8 changes: 2 additions & 6 deletions docs/pages/infra/sponsor-gas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ how to use other paymaster providers as well.

Now you can create a Smart Account Client which is configured to sponsor gas.

```ts twoslash
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

### 3. Send a user operation with gas sponsorship

Expand All @@ -38,9 +36,7 @@ const { hash } = await client.sendUserOperation({
});
```

```ts twoslash [client.ts] filename="client.ts"
// [!include ~/shared/infra/client.ts]
```
<Markdown src="../../shared/infra/client.mdx" />

</CodeBlocks>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ Here's an example of how to do this:

<CodeBlocks>

```tsx [_layout.tsx (Expo)] twoslash
// [!include ~/shared/react-native/account-provider-setup.tsx]
```

```tsx [App.tsx (Bare React Native)] twoslash
// [!include ~/shared/react-native/account-provider-setup.tsx]
```
<Markdown src="../../../../shared/react-native/account-provider-setup.mdx" />

</CodeBlocks>

Expand Down
4 changes: 1 addition & 3 deletions docs/pages/signer/as-an-eoa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export const walletClient = createWalletClient({
});
```

```ts twoslash [signer.ts] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../shared/signer/signer.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/signer/authentication/add-passkey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import { signer } from "./signer";
await signer.addPasskey({});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/signer/authentication/auth0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ await authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/signer/authentication/email-magic-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/signer/authentication/email-otp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
36 changes: 9 additions & 27 deletions docs/pages/signer/authentication/mfa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const totpUrl = result?.multiFactors[0].multiFactorTotpUrl;
const multiFactorId = result?.multiFactors[0].multiFactorId;
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -58,9 +56,7 @@ await signer.verifyMfa({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -78,9 +74,7 @@ await signer.removeMfa({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -94,9 +88,7 @@ import { signer } from "./signer";
const { multiFactors } = await signer.getMfaFactors();
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -116,9 +108,7 @@ signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -135,9 +125,7 @@ signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -153,9 +141,7 @@ const user = await signer?.validateMultiFactors({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -205,9 +191,7 @@ try {
}
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand Down Expand Up @@ -236,8 +220,6 @@ await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
8 changes: 2 additions & 6 deletions docs/pages/signer/authentication/passkey-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ const result = await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>

Expand All @@ -47,8 +45,6 @@ const result = await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
4 changes: 1 addition & 3 deletions docs/pages/signer/authentication/passkey-signup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const result = await signer.authenticate({
});
```

```ts twoslash [signer] filename="signer.ts"
// [!include ~/shared/signer/signer.ts]
```
<Markdown src="../../../shared/signer/signer.mdx" />

</CodeBlocks>
Loading
Loading