Skip to content

Commit a5d0f6b

Browse files
committed
updated typescript mdx pages
1 parent 691b716 commit a5d0f6b

File tree

8 files changed

+144
-137
lines changed

8 files changed

+144
-137
lines changed
Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
import { OpenSourceCard, Callout } from "@doc";
22

3-
# Auth
3+
# Autenticación
44

5-
Using [`EIP-4361`](https://eips.ethereum.org/EIPS/eip-4361) (Sign in with Ethererum) standard, you can authenticate users to your backend using only their wallet. This is a secure and easy way to authenticate users without requiring them to create an additional account.
5+
Usando el estándar [`EIP-4361`](https://eips.ethereum.org/EIPS/eip-4361) (Iniciar sesión con Ethereum), puedes autenticar a los usuarios en tu backend utilizando solo su billetera. Esta es una forma segura y fácil de autenticar usuarios sin requerirles que creen una cuenta adicional.
66

7-
## Usage
7+
## Uso
88

9-
### Client Functions
9+
### Funciones del Cliente
1010

11-
<Callout variant="info" title="Auth with React">
12-
If you're using React, Auth integrates directly with our built-in
13-
[ConnectButton component](/react/v5/ConnectButton). This
14-
handles things like caching, error handling, and retries for you.
11+
<Callout variant="info" title="Autenticación con React">
12+
Si estás usando React, la autenticación se integra directamente con nuestro componente
13+
[ConnectButton](/react/v5/ConnectButton). Esto
14+
gestiona aspectos como el almacenamiento en caché, manejo de errores y reintentos por ti.
1515
</Callout>
1616

17+
1718
```ts
1819
import { signLoginPayload } from 'thirdweb/auth';
1920

20-
// 1. fetch a login payload from your server
21+
// 1. obtener el login payload desde tu servidor
2122
const result = await fetch(...);
2223
const loginPayload = await result.json();
2324

24-
// 2. sign the login payload with the user's account
25+
// 2. firmar el login payload con la cuenta del usuario
2526
const signature = await signLoginPayload({ payload: loginPayload, account });
2627

27-
// 3. send the login payload and signature to your server
28+
// 3. enviar el login payload y la firma a tu servidor
2829
const result = await fetch(...);
2930
const verifiedPayload = await result.json();
3031
```
3132

32-
How you store and maintain a user session is up to you, but our recommended approach is to store a JWT token in a cookie that is verified on the server. The server functions below include utility functions to generate and verify the JWT.
33+
Cómo almacenas y mantienes la sesión de un usuario depende de ti, pero nuestra enfoque recomendado es almacenar un token JWT en una cookie que se verifique en el servidor. Las funciones del servidor a continuación incluyen funciones de utilidad para generar y verificar el JWT.
34+
35+
Para generar y verificar el JWT, también necesitarás una clave privada EOA. La billetera de esta clave privada no necesita tener fondos, solo se usa para firmar.
3336

34-
In order to generate and verify the JWT you will also need an EOA private key. This private key's wallet does not need to hold any funds, it is only used for signing.
37+
### Funciones del Servidor
3538

36-
### Server Functions
3739

3840
```ts
3941
import { createThirdwebClient } from "thirdweb";
@@ -51,36 +53,38 @@ const auth = createAuth({
5153
adminAccount: privateKeyToAccount({client, privateKey})
5254
});
5355

54-
// 1. generate a login payload for a client on the server side
56+
// 1. generar un login payload para un cliente en el lado del servidor
5557
const loginPayload = await auth.generatePayload({ address: "0x123..." });
5658

57-
// 2. send the login payload to the client to sign
59+
// 2. enviar el login payload al cliente para que lo firme
5860

59-
// 3. verify the login payload and signature that the client sends back later
61+
// 3. verificar el login payload y la firma que el cliente enviará más tarde
6062
const verifiedPayload = await auth.verifyPayload({
6163
payload: loginPayload,
6264
signature: "0x123...",
6365
});
6466

65-
// 4. generate a JWT for the client
67+
// 4. generar un JWT para el cliente
6668
const jwt = await auth.generateJWT({ payload: verifiedPayload });
6769

68-
// 5. set the JWT as a cookie or otherwise provide it to the client
70+
// 5. establecer el JWT como una cookie o proporcionarlo al cliente de alguna otra manera
6971

70-
// 6. authenticate the client based on the JWT on subsequent calls
72+
// 6. autenticar al cliente basándose en el JWT en las siguientes llamadas
7173
const { valid, parsedJWT } = await auth.verifyJWT({ jwt });
74+
7275
```
7376

74-
## Example Repos
77+
## Repositorios de Ejemplo
7578

7679
<OpenSourceCard
7780
title="Auth + Next.js"
7881
href="https://github.com/thirdweb-example/thirdweb-auth-next"
79-
description="A working example of Auth + Next.js"
82+
description="Un ejemplo funcional de Auth + Next.js"
8083
/>
8184

8285
<OpenSourceCard
8386
title="Auth + Express"
8487
href="https://github.com/thirdweb-example/thirdweb-auth-express"
85-
description="A working example of a React + Express app using Auth"
88+
description="Un ejemplo funcional de una app React + Express usando Auth"
8689
/>
90+

apps/portal/src/app/typescript/v5/chain/page.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Chain
1+
# Blockchain
22

3-
The thirdweb SDK works with **any EVM chain**.
3+
El SDK de thirdweb funciona con **cualquier blockchain EVM**.
44

5-
All you need to connect a chain is its chain id. RPC connection to the chain is handled for you.
5+
Lo único que necesitas para conectar una blockchain es su ID de cadena. La conexión RPC a la blockchain se maneja automáticamente.
66

77
```ts
88
import { defineChain } from "thirdweb";
99

1010
const myChain = defineChain(myChainId);
1111
```
1212

13-
The SDK comes with predefined popular chains like `base`, `polygon`, and more exported from the `thirdweb/chains` entrypoint.
13+
El SDK viene con Blockchain populares predefinidas como `base`, `polygon` y más, exportadas desde el punto de entrada `thirdweb/chains`.
1414

1515
```ts
1616
import { polygon } from "thirdweb/chains";
1717

1818
const myChain = polygon;
1919
```
2020

21-
### Configuring chains (Advanced)
21+
### Configuración de Blockchain (Avanzado)
2222

23-
You can also configure chains with custom RPC endpoints, native currency, block explorers, and more.
23+
También puedes configurar blockchain con puntos de acceso RPC personalizados, moneda nativa, exploradores de bloques y más.
2424

2525
```ts
2626
const myChain = defineChain({
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import { Callout } from "@doc";
22

3-
# Client
3+
# Cliente
44

5-
A client is the entry point to the thirdweb SDK. It is required for all other actions.
5+
Un cliente es el punto de entrada al SDK de thirdweb. Es requerido para todas las demás acciones.
66

77
<Callout title="Client ID" variant="info">
88

9-
You must provide a `clientId` or `secretKey` in order to initialize a client.
9+
Debes proporcionar un `clientId` o `secretKey` para inicializar un cliente.
1010

11-
You can create a client ID for free at
11+
Puedes crear un client ID de forma gratuita en
1212
[thirdweb.com/create-api-key](https://thirdweb.com/create-api-key).
1313

1414
</Callout>
1515

16-
## Create a client
16+
## Crear un cliente
17+
18+
#### Para uso "del lado del cliente"
1719

18-
#### For "client-side" usage
1920

2021
```ts
2122
import { createThirdwebClient } from "thirdweb";
@@ -25,7 +26,7 @@ const client = createThirdwebClient({
2526
});
2627
```
2728

28-
#### For "server-side" usage
29+
#### Para uso "del lado del servidor"
2930

3031
```ts
3132
import { createThirdwebClient } from "thirdweb";
@@ -35,13 +36,14 @@ const client = createThirdwebClient({
3536
});
3637
```
3738

38-
You will need to pass this client to other methods in the SDK. This will allow you to
39+
Necesitarás pasar este cliente a otros métodos en el SDK. Esto te permitirá
3940

40-
- get performant RPC to all chains
41-
- download/upload to IPFS
42-
- access Account Abstraction infrastructure (bundler, paymaster)
43-
- access other thirdweb services
41+
- obtener RPC eficiente para todas las cadenas
42+
- descargar/subir a IPFS
43+
- acceder a la infraestructura de Account Abstraction (bundler, paymaster)
44+
- acceder a otros servicios de thirdweb
4445

45-
<Callout variant="info" title="Getting your RPC URL">
46-
If you need to access the raw RPC URL, just use thirdweb's default RPC format with your client ID `https://<chainId>.rpc.thirdweb.com/<clientId>`.
46+
<Callout variant="info" title="Obteniendo tu URL RPC">
47+
Si necesitas acceder a la URL RPC sin procesar, solo usa el formato RPC por defecto de thirdweb con tu client ID `https://<chainId>.rpc.thirdweb.com/<clientId>`.
4748
</Callout>
49+

apps/portal/src/app/typescript/v5/in-app-wallet/page.mdx

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,70 +16,71 @@ import {ExternalLink} from "lucide-react";
1616
import { TypeScriptIcon } from "@/icons";
1717

1818
export const metadata = createMetadata({
19-
title: "Connect users with In-App Wallet",
19+
title: "Conectar usuarios con Billetera In-App",
2020
description:
21-
"use the prebuilt connect UI components to authenticate users and connect in-app wallets",
21+
"Usa los componentes de UI preconstruidos para autenticar usuarios y conectar billeteras in-app",
2222
image: {
23-
title: "Connect users with In-App Wallets",
23+
title: "Conectar usuarios con Billeteras In-App",
2424
icon: "wallets",
2525
},
2626
});
2727

28-
# In-App Wallets
28+
# Billeteras In-App
2929

30-
Create in-app wallet for your users based on their email, phone, passkey, social auth or even their external wallets. These wallets are scoped by your clientId and do not require any confirmation to sign transactions.
30+
Crea billeteras in-app para tus usuarios basadas en su correo electrónico, teléfono, passkey, autenticación social o incluso sus billeteras externas. Estas billeteras están limitadas por tu clientId y no requieren ninguna confirmación para firmar transacciones.
3131

32-
## Available auth methods
32+
## Métodos de autenticación disponibles
3333

3434
<AuthList />
3535

3636
## Live Playground
3737

38-
Try out in-app wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/in-app-wallet)
38+
Prueba las billeteras in-app por ti mismo en el [playground en vivo de billetera in-app](https://playground.thirdweb.com/connect/in-app-wallet)
3939

4040
<Stack>
4141

4242
<ArticleIconCard
43-
title="Try the demo"
43+
title="Prueba la demostración"
4444
icon={ExternalLink}
4545
href="https://playground.thirdweb.com/connect/in-app-wallet"
46-
description="See the SDK in action on the live playground"
46+
description="Ve el SDK en acción en el playground en vivo"
4747
/>
4848

4949
</Stack>
5050

51-
## Configure in-app wallets
51+
## Configurar billeteras in-app
5252

53-
The simplest way to create an in-app wallet is to use the `inAppWallet()` function. By default, this will create a wallet that supports email/password login, Google, Apple, Facebook login, and passkey.
53+
La forma más sencilla de crear una billetera in-app es usar la función `inAppWallet()`. Por defecto, esto creará una billetera que soporta inicio de sesión con correo electrónico/contraseña, Google, Apple, Facebook y passkey.
5454

5555
```tsx
5656
import { inAppWallet } from "thirdweb/wallets";
5757

5858
const wallet = inAppWallet();
5959
```
6060

61-
You can also customize the wallet by passing in options.
61+
También puedes personalizar la billetera pasando opciones.
6262

6363
```tsx
6464
import { inAppWallet } from "thirdweb/wallets";
6565

6666
const wallet = inAppWallet({
6767
auth: {
68-
mode, // options are "popup" | "redirect" | "window";
69-
options, // ex: ["discord", "farcaster", "apple", "facebook", "google", "passkey"],
70-
passkeyDomain, // for passkey, the domain that the passkey is created on
71-
redirectUrl, // the URL to redirect to after authentication
68+
mode, // las opciones son "popup" | "redirect" | "window";
69+
options, // ej: ["discord", "farcaster", "apple", "facebook", "google", "passkey"],
70+
passkeyDomain, // para passkey, el dominio en el que se crea el passkey
71+
redirectUrl, // la URL a la que redirigir después de la autenticación
7272
},
73-
metadata, // metadata for the wallet (name, icon, etc.)
74-
smartAccount, // smart account options for the wallet (for gasless tx)
73+
metadata, // metadatos para la billetera (nombre, icono, etc.)
74+
smartAccount, // opciones de cuenta inteligente para la billetera (para transacciones sin gas)
7575
});
76+
7677
```
7778

78-
[View all in-app wallet options](/references/typescript/v5/InAppWalletCreationOptions).
79+
[Ver todas las opciones de billetera in-app](/references/typescript/v5/InAppWalletCreationOptions).
7980

80-
Once created, you can use it either with the prebuilt UI components, or with your own UI.
81+
Una vez creada, puedes usarla tanto con los componentes de UI preconstruidos, como con tu propia UI.
8182

82-
## Usage
83+
## Uso
8384

8485
```tsx
8586
import { ThirdwebProvider, ConnectButton } from "thirdweb/react";
@@ -97,17 +98,17 @@ console.log("connected as", account.address);
9798

9899
```
99100

100-
## API Reference
101+
## Referencia de la API
101102

102-
View all the auth and configuration options for in-app wallets in the [API Reference](/references/typescript/v5/inAppWallet).
103+
Consulta todas las opciones de autenticación y configuración para billeteras in-app en la [Referencia de la API](/references/typescript/v5/inAppWallet).
103104

104105
<Stack>
105106

106107
<ArticleIconCard
107108
title="inAppWallet"
108109
icon={TypeScriptIcon}
109110
href="/references/typescript/v5/inAppWallet"
110-
description="Create an in-app wallet from any auth"
111+
description="Crea una billetera in-app desde cualquier método de autenticación"
111112
/>
112113

113-
</Stack>
114+
</Stack>

0 commit comments

Comments
 (0)