diff --git a/docs/base-account/guides/tips/popup-tips.mdx b/docs/base-account/guides/tips/popup-tips.mdx
index 576aa36c..5364e78d 100644
--- a/docs/base-account/guides/tips/popup-tips.mdx
+++ b/docs/base-account/guides/tips/popup-tips.mdx
@@ -3,36 +3,35 @@ title: "Popup Tips"
---
-## Overview
-When a Base Account is connected and Coinbase Wallet SDK receives a request, it opens
-[keys.coinbase.com](https://keys.coinbase.com/) in a popup window and passes the request to the popup for handling.
-Keep the following points in mind when working with the Base Account popup.
+## Обзор
+Когда подключен Base Account (смарт-аккаунт) и Coinbase Wallet SDK получает запрос, он открывает сайт
+[keys.coinbase.com](https://keys.coinbase.com/) во всплывающем окне (popup) и передает запрос в это окно для обработки.
+При работе со всплывающим окном Base Account учитывайте следующие моменты.
-## Default blocking behavior
-- Most modern browsers block all popups by default, unless they are triggered by a click.
-- If a popup is blocked the browser shows a notification to the user, allowing them to manage popup settings.
+## Поведение блокировки по умолчанию
+- Большинство современных браузеров по умолчанию блокируют все всплывающие окна, если они не вызваны кликом пользователя.
+- Если окно заблокировано, браузер показывает пользователю уведомление, позволяя управлять настройками всплывающих окон.
+
+### Что с этим делать
+- Убедитесь, что между кликом по кнопке и запросом на открытие окна Base Account нет дополнительной логики, так как браузеры могут воспринимать такой запрос как программно инициированный.
+- Если логика неизбежна, сведите ее к минимуму и тщательно тестируйте во всех поддерживаемых браузерах.
-### What to do about it
-- Ensure there is no additional logic between the button click and the request to open the Base Account popup,
-as browsers might perceive the request as programmatically initiated.
-- If logic is unavoidable, keep it minimal and test thoroughly in all supported browsers.
## `Cross-Origin-Opener-Policy`
-If the Base Account popup opens and displays an error or infinite spinner, it may be due to the dapp's `Cross-Origin-Opener-Policy`. Be sure to use a directive that allows the Base Account popup to function.
+Если окно Base Account открывается и показывает ошибку или бесконечный спиннер, это может быть связано с заголовком `Cross-Origin-Opener-Policy` вашего dapp. Убедитесь, что используется директива, которая позволяет окну Base Account функционировать.
-- ✅ Allows Base Account popup to function
- - `unsafe-none` (default)
- - `same-origin-allow-popups` (recommended)
-- ❌ Breaks Base Account popup
+- ✅ Позволяет работать окну Base Account
+ - `unsafe-none` (по умолчанию)
+ - `same-origin-allow-popups` (рекомендуется)
+- ❌ Ломает работу окна Base Account
- `same-origin`
-For more detailed information refer to the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).
+Для получения более подробной информации обратитесь к [документации MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).
-## Base Account popup 'linger' behavior
-- Sometimes a dapp may programmatically make a followup request based on the response to a previous request.
-Normally, browsers block these programmatic requests to open popups.
-- To address this, after the Base Account popup responds to a request, it will linger for 200ms to listen for another incoming request before closing.
- - If a request is received *during* this 200ms window, it will be received and handled within the same popup window.
- - If a request is received *after* the 200ms window and the popup has closed, opening the Base Account popup will be blocked by the browser.
-
\ No newline at end of file
+## Поведение окна Base Account: "задержка" перед закрытием
+- Иногда dapp может программно отправлять последующий запрос на основе ответа на предыдущий запрос. Обычно браузеры блокируют такие программные запросы на открытие всплывающих окон.
+- Чтобы решить эту проблему, после того как окно Base Account ответит на запрос, оно будет оставаться открытым в течение 200 мс, "прислушиваясь" к возможному следующему входящему запросу, прежде чем закрыться.
+ - Если запрос получен в течение этого 200-миллисекундного интервала, он будет принят и обработан в том же самом всплывающем окне.
+ - Если запрос получен после истечения 200 мс и окно уже закрылось, попытка открыть окно Base Account будет заблокирована браузером.
+
diff --git a/docs/base-account/improve-ux/batch-transactions.mdx b/docs/base-account/improve-ux/batch-transactions.mdx
index 88e1fe7c..f204b64e 100644
--- a/docs/base-account/improve-ux/batch-transactions.mdx
+++ b/docs/base-account/improve-ux/batch-transactions.mdx
@@ -1,14 +1,14 @@
---
-title: "Batch Transactions"
+title: "Пакетные транзакции"
---
-With Base Account, you can send multiple onchain calls in a single transaction. Doing so improves the UX of multi-step interactions by reducing them to a single click. A common example of where you might want to leverage batch transactions is an ERC-20 `approve` followed by a swap.
+С помощью Base Account вы можете отправлять несколько ончейн-вызовов в одной транзакции. Это улучшает пользовательский опыт (UX) многошаговых операций, сводя их к одному клику. Типичный пример, где можно использовать пакетные транзакции - это вызов `approve` для токена ERC-20, за которым следует обмен (swap).
-You can submit batch transactions by using the `wallet_sendCalls` RPC method, defined in [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).
+Вы можете отправлять пакетные транзакции, используя RPC-метод `wallet_sendCalls`, определенный в [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).
-## Installation
+## Установка
-Install the Base Account SDK:
+Установите SDK Base Account:
```bash npm
@@ -28,11 +28,11 @@ bun add @base-org/account
```
-## Setup
+## Настройка
-### Initialize the SDK
+### Инициализация SDK
-Import and create the Base Account SDK instance:
+Импортируйте и создайте экземпляр SDK Base Account:
```tsx
import { createBaseAccountSDK, base } from '@base-org/account';
@@ -46,11 +46,11 @@ const sdk = createBaseAccountSDK({
const provider = sdk.getProvider();
```
-## Basic Batch Transaction
+## Базовая пакетная транзакция
-### Simple Multiple Transfers
+### Простые множественные переводы
-Send multiple ETH transfers in a single transaction:
+Отправьте несколько переводов ETH в одной транзакции:
```tsx
import { createBaseAccountSDK, getCryptoKeyAccount, base } from '@base-org/account';
@@ -66,32 +66,32 @@ const provider = sdk.getProvider();
async function sendBatchTransfers() {
try {
- // Get crypto account
+ // Получаем криптоаккаунт
const cryptoAccount = await getCryptoKeyAccount();
const fromAddress = cryptoAccount?.account?.address;
- // Prepare batch calls
+ // Подготавливаем пакет вызовов
const calls = [
{
to: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
value: numberToHex(parseEther('0.001')), // 0.001 ETH
- data: '0x', // Empty data for simple transfer
+ data: '0x', // Пустые данные для простого перевода
},
{
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f6E456',
value: numberToHex(parseEther('0.001')), // 0.001 ETH
- data: '0x', // Empty data for simple transfer
+ data: '0x', // Пустые данные для простого перевода
}
];
- // Send batch transaction
+ // Отправляем пакетную транзакцию
const result = await provider.request({
method: 'wallet_sendCalls',
params: [{
version: '2.0.0',
from: fromAddress,
chainId: numberToHex(base.constants.CHAIN_IDS.base),
- atomicRequired: true, // All calls must succeed or all fail
+ atomicRequired: true, // Все вызовы должны завершиться успешно, иначе все будут отменены
calls: calls
}]
});
@@ -105,17 +105,17 @@ async function sendBatchTransfers() {
}
```
-## Contract Interactions
+## Взаимодействие с контрактами
-### ERC-20 Approve and Transfer
+### Approve и перевод токена ERC-20
-A common pattern is to approve and then transfer ERC-20 tokens:
+Часто встречающийся паттерн - утвердить (approve), а затем перевести токены ERC-20:
```tsx
import { createBaseAccountSDK, getCryptoKeyAccount, base } from '@base-org/account';
import { numberToHex, parseUnits, encodeFunctionData } from 'viem';
-// ERC-20 ABI for approve and transfer functions
+// ABI ERC-20 для функций approve и transfer
const erc20Abi = [
{
name: 'approve',
@@ -150,8 +150,8 @@ async function approveAndTransfer() {
const cryptoAccount = await getCryptoKeyAccount();
const fromAddress = cryptoAccount?.account?.address;
- const tokenAddress = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC on Base
- const spenderAddress = '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad'; // Example spender
+ const tokenAddress = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC на Base
+ const spenderAddress = '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad'; // Пример получателя разрешения
const recipientAddress = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045';
const amount = parseUnits('10', 6); // 10 USDC (6 decimals)
@@ -191,11 +191,11 @@ async function approveAndTransfer() {
}
```
-## Advanced Features
+## Расширенные возможности
-### Checking Wallet Capabilities
+### Проверка возможностей кошелька
-Before sending batch transactions, you can check if the wallet supports atomic batching:
+Перед отправкой пакетных транзакций вы можете проверить, поддерживает ли кошелек атомарное объединение (atomic batching):
```tsx
async function checkCapabilities() {
@@ -226,9 +226,9 @@ async function checkCapabilities() {
}
```
-### Non-Atomic Batching
+### Неатомарное объединение
-Sometimes you want calls to execute sequentially, even if some fail:
+Иногда требуется, чтобы вызовы выполнялись последовательно, даже если некоторые из них завершатся неудачей:
```tsx
const result = await provider.request({
@@ -237,15 +237,15 @@ const result = await provider.request({
version: '2.0.0',
from: fromAddress,
chainId: numberToHex(base.constants.CHAIN_IDS.base),
- atomicRequired: false, // Allow partial execution
+ atomicRequired: false, // Разрешить частичное выполнение
calls: calls
}]
});
```
-## Error Handling
+## Обработка ошибок
-Handle common batch transaction errors:
+Обработка типичных ошибок пакетных транзакций:
```tsx
async function sendBatchWithErrorHandling(calls: any[]) {
diff --git a/docs/base-account/improve-ux/magic-spend.mdx b/docs/base-account/improve-ux/magic-spend.mdx
index 7607ebe0..1ef66b86 100644
--- a/docs/base-account/improve-ux/magic-spend.mdx
+++ b/docs/base-account/improve-ux/magic-spend.mdx
@@ -1,22 +1,22 @@
---
-title: "Use Coinbase Balances Onchain"
-description: "How to use Coinbase balances onchain with Base Account"
+title: "Использование балансов Coinbase в ончейн-среде"
+description: "Как использовать балансы Coinbase в ончейн-среде с помощью Base Account"
---
-With MagicSpend, Base Account users can use their Coinbase balances onchain. This means users can easily start using onchain apps without needing to onramp funds into their wallet.
+Благодаря функции MagicSpend пользователи Base Account могут использовать свои балансы Coinbase в ончейн-операциях. Это означает, что пользователи могут легко начать использовать ончейн-приложения без необходимости пополнять баланс (onramp) в своем кошельке.
-This also means that apps might not have all the balance information typically available to them by reading onchain data. Base Account indicates that this is the case by responding to [`wallet_getCapabilities` RPC calls](https://eip5792.xyz/reference/getCapabilities) with the `auxiliaryFunds` capability for each chain Base Account users can use their Coinbase balances on.
+Это также означает, что приложениям может быть недоступна вся информация о балансе, которая обычно получается путем чтения ончейн-данных. Base Account указывает на это, отвечая на [RPC-запросы `wallet_getCapabilities`](https://eip5792.xyz/reference/getCapabilities) возможностью (capability) `auxiliaryFunds` для каждой цепи, на которой пользователи Base Account могут использовать свои балансы Coinbase.
-If your app supports Base Account, it should not assume it knows the full balances available to a user if the `auxiliaryFunds` capability is present on a given chain. For example, if your app disables a transaction button if it sees that the wallet has insufficient funds, your app should take `auxiliaryFunds` into account and enable the button if the account has `auxiliaryFunds` on the chain the user is transacting on.
+Если ваше приложение поддерживает Base Account, оно не должно предполагать, что знает все доступные пользователю балансы, если для данной цепи присутствует возможность `auxiliaryFunds`. Например, если ваше приложение отключает кнопку транзакции, когда видит, что в кошельке недостаточно средств, оно должно учитывать `auxiliaryFunds` и активировать кнопку, если у аккаунта есть `auxiliaryFunds` в цепи, где пользователь совершает транзакцию.
-## Why it matters
+## Почему это важно
-MagicSpend makes onboarding smoother by letting users pay gas or send funds even when their onchain wallet balance is **zero**. Your interface should therefore _never_ disable an action just because the onchain balance is insufficient.
+MagicSpend упрощает вовлечение пользователей, позволяя им оплачивать комиссии или отправлять средства, даже когда баланс их ончейн-кошелька равен **нулю**. Следовательно, ваш интерфейс _никогда_ не должен отключать действие только из-за недостаточного ончейн-баланса.
-1. Ensure you have the user’s `address` stored in your component state (from your wallet connection flow).
+1. Убедитесь, что `address` пользователя сохранен в состоянии вашего компонента (из вашего потока подключения кошелька).
-2. Drop the component below into your UI. It will check whether MagicSpend (`auxiliaryFunds`) is available for that address on Base and if not, disable the send button accordingly.
+2. Добавьте приведенный ниже компонент в ваш интерфейс. Он проверит, доступна ли MagicSpend (`auxiliaryFunds`) для данного адреса на Base, и в противном случае соответствующим образом отключит кнопку отправки.
```tsx title="SendButton.tsx"
import { useEffect, useState } from "react";
@@ -31,14 +31,14 @@ const sdk = createBaseAccountSDK({
const provider = sdk.getProvider();
interface Props {
- address?: string; // wallet address from your app state
+ address?: string; // адрес кошелька из состояния вашего приложения
}
export function SendButton({ address }: Props) {
const [hasAuxFunds, setHasAuxFunds] = useState
(null);
useEffect(() => {
- if (!address) return; // Wallet not connected yet
+ if (!address) return; // Кошелек еще не подключен
(async () => {
try {
@@ -67,24 +67,24 @@ export function SendButton({ address }: Props) {
}
```
-### What the code does
+### Что делает этот код
-1. Receives the current `address` from your own wallet logic.
-2. Calls `wallet_getCapabilities` whenever the address changes.
-3. Reads `auxiliaryFunds.supported` for the Base chain (`8453`).
-4. Enables the button when MagicSpend is available; otherwise shows “Insufficient Balance”.
+1. Получает текущий `address` из вашей собственной логики работы с кошельком.
+2. Вызывает `wallet_getCapabilities` при каждом изменении адреса.
+3. Считывает `auxiliaryFunds.supported` для цепи Base (`8453`).
+4. Активирует кнопку, когда MagicSpend доступен; в противном случае показывает "Недостаточно средств".
-## Base Pay integrates Magic Spend by default
+## Base Pay интегрирует Magic Spend по умолчанию
-Thanks to [Magic Spend](/base-account/improve-ux/magic-spend), [Base Pay](/base-account/guides/accept-payments) allows users to pay with their USDC balance on Coinbase by default.
+Благодаря [Magic Spend](/base-account/improve-ux/magic-spend), [Base Pay](/base-account/guides/accept-payments) позволяет пользователям по умолчанию оплачивать с помощью своего баланса USDC на Coinbase.
---
-## Next steps
+## Следующие шаги
-- Handle loading/error states if you need fine-grained UX
-- Combine this check with your existing onchain balance logic for fallback flows
+- Обрабатывайте состояния загрузки/ошибок, если требуется детальный контроль над пользовательским опытом
+- Объедините эту проверку с вашей существующей логикой проверки ончейн-баланса для резервных сценариев
diff --git a/docs/base-account/improve-ux/spend-permissions.mdx b/docs/base-account/improve-ux/spend-permissions.mdx
index 2cfe719c..d0785e4b 100644
--- a/docs/base-account/improve-ux/spend-permissions.mdx
+++ b/docs/base-account/improve-ux/spend-permissions.mdx
@@ -1,41 +1,41 @@
---
-title: "Use Spend Permissions"
-description: "Learn how to use Spend Permissions to allow a trusted spender to spend user assets"
+title: "Использование разрешений на расходование"
+description: "Узнайте, как использовать Spend Permissions для предоставления доверенной стороне права расходовать активы пользователя"
---
-## Overview
+## Обзор
-Spend Permissions let you designate a trusted `spender` that can move assets out of a user's Base Account on their behalf.
+Разрешения на расходование (Spend Permissions) позволяют назначить доверенную сторону (`spender`), которая может перемещать активы из Base Account пользователя от его имени.
-After the user signs the permission, the `spender` can initiate transfers within the limits you define — no additional prompts, pop-ups, or signatures needed from the user. This powers seamless experiences such as subscription renewals, algorithmic trading, and automated payouts.
+После того как пользователь подписывает разрешение, `spender` может инициировать переводы в пределах установленных вами лимитов - без дополнительных запросов, всплывающих окон или подписей от пользователя. Это обеспечивает бесперебойную работу для таких сценариев, как продление подписок, алгоритмическая торговля и автоматические выплаты.
-Read more about the Spend Permission Manager contract and supported chains on [GitHub](https://github.com/coinbase/spend-permissions).
+Подробнее о контракте менеджера Spend Permissions и поддерживаемых цепях читайте на [GitHub](https://github.com/coinbase/spend-permissions).
- Spend Permissions for Base App Mini Apps are coming soon and will be supported in a future update.
+ Поддержка Spend Permissions для мини-приложений Base App появится в ближайшем будущем и будет добавлена в одном из следующих обновлений.
-If you're using Sub Accounts, learn how Base Account can automatically fund Sub Accounts and optionally skip approval prompts using [Auto Spend Permissions](/base-account/improve-ux/sub-accounts#auto-spend-permissions).
+Если вы используете Суб-аккаунты (Sub Accounts), узнайте, как Base Account может автоматически пополнять их и, при желании, пропускать запросы на подтверждение, используя [Auto Spend Permissions](/base-account/improve-ux/sub-accounts#auto-spend-permissions).
-## Usage
+## Использование
-### Request a Spend Permission
+### Запрос разрешения на расходование
-You create an EIP-712 payload that describes the permission and ask the user to sign it. Store the resulting signature along with the permission data so you can register the permission on-chain later. The SDK helper below handles construction and signing for you.
+Вы создаете полезную нагрузку (payload) EIP-712, описывающую разрешение, и просите пользователя подписать её. Сохраните полученную подпись вместе с данными разрешения, чтобы позднее зарегистрировать его в блокчейне. Помощник SDK ниже позаботится о формировании и подписании за вас.
-| Field Name | Type | Description |
-| ----------- | --------- | ---------------------------------------------------------------------------------------- |
-| `account` | `address` | Smart account this spend permission is valid for |
-| `spender` | `address` | Entity that can spend `account`'s tokens |
-| `token` | `address` | Token address (ERC-7528 native token or ERC-20 contract) |
-| `allowance` | `uint160` | Maximum allowed value to spend within each `period` |
-| `period` | `uint48` | Time duration for resetting used `allowance` on a recurring basis (seconds) |
-| `start` | `uint48` | Timestamp this spend permission is valid starting at (inclusive, unix seconds) |
-| `end` | `uint48` | Timestamp this spend permission is valid until (exclusive, unix seconds) |
-| `salt` | `uint256` | Arbitrary data to differentiate unique spend permissions with otherwise identical fields |
-| `extraData` | `bytes` | Arbitrary data to attach to a spend permission which may be consumed by the `spender` |
+| Название поля | Тип | Описание |
+| -------------- | --------- | ---------------------------------------------------------------------------------------------------- |
+| `account` | `address` | Смарт-аккаунт, для которого действительно данное разрешение на расходование |
+| `spender` | `address` | Субъект, который может расходовать токены `account` |
+| `token` | `address` | Адрес токена (нативный токен ERC-7528 или контракт ERC-20) |
+| `allowance` | `uint160` | Максимальное допустимое значение для расходования в течение каждого `period` |
+| `period` | `uint48` | Продолжительность времени для сброса использованного `allowance` на регулярной основе (в секундах) |
+| `start` | `uint48` | Метка времени, начиная с которой разрешение действительно (включительно, Unix секунды) |
+| `end` | `uint48` | Метка времени, до которой разрешение действительно (исключительно, Unix секунды) |
+| `salt` | `uint256` | Произвольные данные для различения уникальных разрешений с идентичными остальными полями |
+| `extraData` | `bytes` | Произвольные данные, прикрепляемые к разрешению, которые могут быть использованы стороной `spender` |
```tsx
import { requestSpendPermission } from "@base-org/account/spend-permission";
@@ -52,7 +52,7 @@ const permission = await requestSpendPermission({
account: "0x...",
spender: "0x...",
token: "0x...",
- chainId: 8453, // or any other supported chain
+ chainId: 8453, // или любой другая поддерживаемая цепь
allowance: 1_000_000n,
periodInDays: 30,
provider: sdk.getProvider(),
@@ -61,29 +61,29 @@ const permission = await requestSpendPermission({
console.log("Spend Permission:", permission);
```
-### Use the Spend Permission
+### Использование разрешения на расходование
-Using a permission is 2 steps:
+Использование разрешения состоит из 2 шагов:
-1. **Prepare the calls** — Call `prepareSpendCallData` with the permission and the requested `amount`.
-2. **Submit the calls** — Submit the calls using your app's spender account.
+1. **Подготовка вызовов** — Вызовите `prepareSpendCallData` с разрешением и запрашиваемой `amount`.
+2. **Отправка вызовов** — Отправьте вызовы, используя смарт-аккаунт spender вашего приложения.
-`prepareSpendCallData` returns an array of calls needed to spend the tokens:
+`prepareSpendCallData` возвращает массив вызовов, необходимых для расходования токенов:
-- `approveWithSignature` — When the permission is not yet registered onchain, this call would be prepended to the `spend` call.
-- `spend` — The call to spend the tokens from the user's Base Account.
+- `approveWithSignature` — Когда разрешение еще не зарегистрировано в блокчейне, этот вызов будет добавлен перед вызовом `spend`.
+- `spend` — Вызов для расходования токенов из Base Account пользователя.
```tsx
import { prepareSpendCallData } from "@base-org/account/spend-permission";
-// returns [approveWithSignatureCall, spendCall]
+// возвращает [approveWithSignatureCall, spendCall]
const spendCalls = await prepareSpendCallData({
permission,
- amount, // optional; omit to spend the remaining allowance
+ amount, // опционально; опустите, чтобы потратить оставшийся лимит
});
-// If your app spender account supports wallet_sendCalls, submit them in batch using wallet_sendCalls
-// this is an example on how to do it using wallet_sendCalls in provider interface
+// Если смарт-аккаунт spender вашего приложения поддерживает wallet_sendCalls, отправьте их пакетно, используя wallet_sendCalls
+// это пример того, как это сделать через интерфейс provider
await provider.request({
method: "wallet_sendCalls",
params: [
@@ -96,8 +96,8 @@ await provider.request({
],
});
-// If your app spender account doesn't support wallet_sendCalls, submit them in order using eth_sendTransaction
-// this is an example on how to do it using eth_sendTransaction in provider interface
+// Если смарт-аккаунт spender вашего приложения не поддерживает wallet_sendCalls, отправьте их по порядку, используя eth_sendTransaction
+// это пример того, как это сделать через интерфейс provider
await Promise.all(
spendCalls.map((call) =>
provider.request({
@@ -114,20 +114,20 @@ await Promise.all(
```
-**About the `spendCalls` array**
+**О массиве `spendCalls`**
-This array has 2 calls when submitting the permission onchain for *the first time*.
-When the permission is already registered onchain, this array has only 1 call (the `spend` call).
+Этот массив содержит 2 вызова при первой регистрации разрешения в блокчейне.
+Когда разрешение уже зарегистрировано, массив содержит только 1 вызов (вызов `spend`).
-For most use cases, you don't need to worry about this.
+Для большинства случаев использования вам не нужно об этом беспокоиться.
-### Revoke a Spend Permission
+### Отзыв разрешения на расходование
-You can revoke a permission in two ways:
+Вы можете отозвать разрешение двумя способами:
-- Request user approval via request to user's Base Account using `requestRevoke`.
-- Revoke silently from your app's spender by submitting the call returned from `prepareRevokeCallData`.
+- Запросить подтверждение пользователя через его Base Account с помощью `requestRevoke`.
+- Отозвать автоматически со смарт-аккаунта spender вашего приложения, отправив вызов, возвращенный функцией `prepareRevokeCallData`.
```tsx
import {
@@ -135,7 +135,7 @@ import {
prepareRevokeCallData,
} from "@base-org/account/spend-permission";
-// Option A: User-initiated revoke (wallet popup)
+// Вариант А: Отзыв, инициированный пользователем (всплывающее окно кошелька)
try {
const hash = await requestRevoke(permission);
console.log("Revoke succeeded", hash);
@@ -143,11 +143,11 @@ try {
console.warn("Revoke was rejected or failed");
}
-// Option B: Silent revoke by your app's spender account
+// Вариант Б: Автоматический отзыв со смарт-аккаунта spender вашего приложения
const revokeCall = await prepareRevokeCallData(permission);
-// Submit the revoke call using your app's spender account
-// this is an example on how to do it using wallet_sendCalls in provider interface
+// Отправьте вызов отзыва, используя смарт-аккаунт spender вашего приложения
+// это пример того, как это сделать через интерфейс provider
await provider.request({
method: "wallet_sendCalls",
params: [
@@ -160,8 +160,8 @@ await provider.request({
],
});
-// If your app spender account doesn't support wallet_sendCalls, submit the revoke call using eth_sendTransaction
-// this is an example on how to do it using eth_sendTransaction in provider interface
+// Если смарт-аккаунт spender вашего приложения не поддерживает wallet_sendCalls, отправьте вызов отзыва, используя eth_sendTransaction
+// это пример того, как это сделать через интерфейс provider
await provider.request({
method: "eth_sendTransaction",
params: [
@@ -173,7 +173,7 @@ await provider.request({
});
```
-## API Reference
+## Справочник API
- [requestSpendPermission](/base-account/reference/spend-permission-utilities/requestSpendPermission)
- [prepareSpendCallData](/base-account/reference/spend-permission-utilities/prepareSpendCallData)
@@ -183,7 +183,7 @@ await provider.request({
- [fetchPermission](/base-account/reference/spend-permission-utilities/fetchPermission)
- [getPermissionStatus](/base-account/reference/spend-permission-utilities/getPermissionStatus)
-## Complete Integration Example
+## Пример полной интеграции
```typescript
import {
@@ -207,17 +207,17 @@ const sdk = createBaseAccountSDK({
const spender = "0xAppSpenderAddress";
-// 1) Fetch a specific permission by its hash
-// Use fetchPermission when you already know the permission hash
-// (e.g., stored from a previous session or passed as a parameter)
+// 1) Получить конкретное разрешение по его хэшу
+// Используйте fetchPermission, когда уже знаете хэш разрешения
+// (например, сохраненный из предыдущей сессии или переданный как параметр)
const permission = await fetchPermission({
permissionHash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
provider: sdk.getProvider(),
});
-// Alternative: Fetch all permissions for a spender
-// Use fetchPermissions when you need to see all available permissions
-// and want to choose which one to use
+// Альтернатива: Получить все разрешения для spender
+// Используйте fetchPermissions, когда нужно увидеть все доступные разрешения
+// и выбрать, какое из них использовать
// const permissions = await fetchPermissions({
// account: "0xUserBaseAccountAddress",
// chainId: 84532,
@@ -227,10 +227,10 @@ const permission = await fetchPermission({
// const permission = permissions.at(0);
// ========================================
-// When there IS an existing permission
+// Когда разрешение УЖЕ существует
// ========================================
-// 2. check the status of permission
+// 2. Проверить статус разрешения
try {
const { isActive, remainingSpend } = await getPermissionStatus(permission);
const amount = 1000n;
@@ -242,14 +242,14 @@ try {
throw new Error("No spend permission available");
}
-// 3. prepare the calls
+// 3. Подготовить вызовы
const [approveCall, spendCall] = await prepareSpendCallData({
permission,
amount,
});
-// 4. execute the calls using your app's spender account
-// this is an example using wallet_sendCalls, in production it could be using eth_sendTransaction.
+// 4. Выполнить вызовы, используя смарт-аккаунт spender вашего приложения
+// это пример использования wallet_sendCalls, в продакшене можно использовать eth_sendTransaction.
await provider.request({
method: "wallet_sendCalls",
params: [
@@ -263,10 +263,10 @@ await provider.request({
});
// ========================================
-// When there is NOT an existing permission
+// Когда разрешение НЕ существует
// ========================================
-// 2. request a spend permission to use
+// 2. Запросить разрешение на расходование для использования
const newPermission = await requestSpendPermission({
account: "0xUserBaseAccountAddress",
spender,
@@ -277,14 +277,14 @@ const newPermission = await requestSpendPermission({
provider: sdk.getProvider(),
});
-// 3. prepare the calls
+// 3. Подготовить вызовы
const spendCalls = await prepareSpendCallData({
permission: newPermission,
amount: 1_000n,
});
-// 4. execute the calls using your app's spender account
-// this is an example using eth_sendTransaction. If your app account supports wallet_sendCalls, use wallet_sendCalls to batch the calls instead.
+// 4. Выполнить вызовы, используя смарт-аккаунт spender вашего приложения
+// это пример использования eth_sendTransaction. Если смарт-аккаунт вашего приложения поддерживает wallet_sendCalls, используйте wallet_sendCalls для пакетной отправки.
await Promise.all(
spendCalls.map((call) =>
provider.request({
@@ -300,7 +300,7 @@ await Promise.all(
);
// ========================================
-// Request user to revoke spend permission
+// Запросить у пользователя отзыв разрешения
// ========================================
try {
@@ -311,7 +311,7 @@ try {
}
// ========================================
-// Revoke spend permission in the background
+// Отозвать разрешение в фоновом режиме
// ========================================
const revokeCall = await prepareRevokeCallData(permission);
@@ -329,11 +329,11 @@ await provider.request({
});
```
-## Example Use Case
+## Пример использования
-Let's say you're building an AI agent that can autonomously purchase [Zora Creator Coins](https://docs.zora.co/coins) using secure [Spend Permissions](/base-account/improve-ux/spend-permissions) on Base.
+Предположим, вы создаете AI-агента, который может автономно покупать [Zora Creator Coins](https://docs.zora.co/coins), используя безопасные [Spend Permissions](/base-account/improve-ux/spend-permissions) на Base.
-This example demonstrates how to combine Base Account's [Spend Permissions](/base-account/improve-ux/spend-permissions) with Coinbase Developer Platform (CDP) [Server Wallets](https://docs.cdp.coinbase.com/server-wallets/v2/introduction/quickstart) and [Trade API](https://docs.cdp.coinbase.com/trade-api/quickstart) for seamless, gas-free AI agent transactions.
+Этот пример демонстрирует, как объединить [Spend Permissions](/base-account/improve-ux/spend-permissions) Base Account с [Server Wallets](https://docs.cdp.coinbase.com/server-wallets/v2/introduction/quickstart) and [Trade API](https://docs.cdp.coinbase.com/trade-api/quickstart) от Coinbase Developer Platform (CDP) для бесперебойных, не требующих комиссий транзакций AI-агента.
@@ -345,19 +345,19 @@ This example demonstrates how to combine Base Account's [Spend Permissions](/bas
- Try the live application and see spend permissions in action
+ Протестируйте живое приложение и посмотрите, как работают разрешения на расходование
- Explore the complete implementation on GitHub
+ Изучите полную реализацию на GitHub
-**Learn more:** [AI Agent with Spend Permissions](/cookbook/spend-permissions-ai-agent)
\ No newline at end of file
+**Узнать больше:** [AI Agent with Spend Permissions](/cookbook/spend-permissions-ai-agent)
diff --git a/docs/base-account/improve-ux/sponsor-gas/erc20-paymasters.mdx b/docs/base-account/improve-ux/sponsor-gas/erc20-paymasters.mdx
index 4a23e867..8d9f11bf 100644
--- a/docs/base-account/improve-ux/sponsor-gas/erc20-paymasters.mdx
+++ b/docs/base-account/improve-ux/sponsor-gas/erc20-paymasters.mdx
@@ -1,25 +1,25 @@
---
-title: "Pay Gas in ERC20 tokens"
-description: "Base Account enables users to pay for gas in ERC20 tokens"
+title: "Оплата комиссий токенами ERC20"
+description: "Base Account позволяет пользователям оплачивать комиссии (gas) токенами стандарта ERC20"
---
-Base Account enables users to pay for gas in ERC20 tokens!
-Tokens can be accepted for payment by passed in app paymasters in addition to a set of universally supported tokens, such as USDC (this set to be expanded soon).
+Base Account позволяет пользователям оплачивать комиссии (gas) токенами стандарта ERC20!
+Токены могут быть приняты в качестве оплаты через переданные в приложении paymaster'ы, в дополнение к набору универсально поддерживаемых токенов, таких как USDC (этот набор будет расширен в ближайшее время).
-This guide outlines how to set up your own app paymaster which will accept your token as payment.
+Это руководство описывает, как настроить собственный paymaster для вашего приложения, который будет принимать ваш токен в качестве оплаты.
-### Choose a paymaster service provider
+### Выберите провайдера услуги paymaster
-As a prerequisite, you'll need to obtain a paymaster service URL from a paymaster service provider. ERC20 paymasters have additional requirements that will be outlined below.
+В качестве предварительного условия вам необходимо получить URL службы paymaster от провайдера. Paymaster'ы для токенов ERC20 имеют дополнительные требования, которые будут описаны ниже.
-We recommend the [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) paymaster as it is fully set up to work with Base Account ERC20 token gas payments out of the box. CDP is also offering up to $15k in gas credits as part of the [Base Gasless Campaign](/base-account/more/base-gasless-campaign).
+Мы рекомендуем paymaster от [Coinbase Developer Platform](https://www.coinbase.com/developer-platform), поскольку он полностью готов к работе с оплатой комиссий токенами ERC20 в Base Account "из коробки". CDP также предлагает до $15 тыс. в виде грантов на газ в рамках [Base Gasless Campaign](/base-account/more/base-gasless-campaign).
-Otherwise if using a different paymaster provider, it must conform to the specification outlined in [ERC20 Compatible Paymasters](#erc20-compatible-paymasters) to correctly work with Base Account.
+Если вы используете другого провайдера paymaster, он должен соответствовать спецификации, изложенной в разделе [ERC20 Compatible Paymasters](#erc20-compatible-paymasters) чтобы корректно работать с Base Account.
-### App setup for custom token
+### Настройка приложения для пользовательского токена
-Once you have a paymaster that is compatible with ERC20 gas payments on Base Account, you are only responsible for including the approvals to the paymaster for your token. It is recommended to periodically top up the allowance once they hit some threshold.
+После того как у вас есть paymaster, совместимый с оплатой комиссий токенами ERC20 в Base Account, ваша задача - только включить разрешения (approvals) для вашего токена в адрес paymaster. Рекомендуется периодически пополнять разрешение, когда его остаток достигает определенного порога.
```js
@@ -39,7 +39,7 @@ const mintTo = {
calls = [mintTo]
-// Checks for allowance
+// Проверяем allowance (разрешенную сумму)
const allowance = await client.readContract({
abi: parseAbi(["function allowance(address owner, address spender) returns (uint256)"]),
address: tokenAddress,
@@ -48,7 +48,7 @@ const allowance = await client.readContract({
})
if (allowance < minTokenThreshold) {
- // include approval for $20 in calls so that the paymaster will be able to move the token to accept payment
+ // Добавляем вызов approve на $20 в список calls, чтобы paymaster мог переместить токены для принятия оплаты
calls.push({
abi: ["function approve(address,uint)"],
functionName: "approve",
@@ -58,34 +58,34 @@ if (allowance < minTokenThreshold) {
}
```
-That is it! Base Account will handle the rest as long as it is compatible as outlined below.
+Это всё! Base Account позаботится об остальном, при условии что paymaster совместим, как описано ниже.
-### ERC20 Compatible Paymasters
+### Совместимые с ERC20 Paymaster
-Coinbase Developer Platform is compatible out of the box and we will be working with other teams to include support soon!
+Coinbase Developer Platform совместим "из коробки", и мы работаем с другими командами, чтобы вскоре добавить поддержку и у них!
-The paymaster must handle the `pm_getPaymasterStubData` and `pm_getPaymasterData` JSON-RPC requests specified by ERC-7677 in addition to `pm_getAcceptedPaymentTokens`. We step through each request and response below.
+Paymaster должен обрабатывать JSON-RPC запросы `pm_getPaymasterStubData` и `pm_getPaymasterData`, указанные в ERC-7677, в дополнение к `pm_getAcceptedPaymentTokens`. Мы разберем каждый запрос и ответ ниже.
#### pm_getPaymasterStubData and pm_getPaymasterData
-1. The paymaster must use the specified ERC20 for payment if specified in the 7677 context field under `erc20`.
-2. Upon rejection / failure the paymaster should return a `data` field in the JSONRPC response which could be used to approve the paymaster and includes:
+1. Paymaster должен использовать указанный токен ERC20 для оплаты, если он указан в поле контекста `erc20` согласно спецификации 7677.
+2. При отказе / неудаче paymaster должен возвращать поле `data` в JSONRPC-ответе, которое может быть использовано для выдачи разрешения (approve) paymaster'у. Оно должно включать:
-- `acceptedTokens` array which is a struct including the token address
-- `paymasterAddress` field which is the paymaster address which will perform the token transfers.
+- Массив `acceptedTokens`, который представляет собой структуру, содержащую адрес токена.
+- Поле `paymasterAddress` - адрес paymaster'а, который будет выполнять перевод токенов.
-3. Upon success the paymaster must return a `tokenPayment` field in the result. This includes:
+3. При успехе paymaster должен возвращать поле `tokenPayment` в результате. Оно включает:
-- `tokenAddress` address of the token used for payment
-- `maxFee` the maximum fee to show in the UI
-- `decimals` decimals to use in the UI
-- `name` name of the token
+- `tokenAddress` - адрес токена, использованного для оплаты.
+- `maxFee` - максимальная комиссия для отображения в интерфейсе.
+- `decimals` - количество знаков после запятой (децималы) для использования в интерфейсе.
+- `name` - название токена.
-Base Account will simulate the transaction to ensure success and accurate information.
+Base Account выполнит симуляцию транзакции, чтобы убедиться в успехе и точности информации.
-##### Request
+##### Запрос
-This is a standard V0.6 Entrypoint request example with the additional context for the specified token to be used.
+Это пример стандартного запроса Entrypoint V0.6 с дополнительным контекстом для указания токена, который следует использовать.
```json
{
@@ -115,9 +115,9 @@ This is a standard V0.6 Entrypoint request example with the additional context f
}
```
-##### Response
+##### Ответ
-Successful response:
+Успешный ответ:
```json
{
@@ -135,7 +135,7 @@ Successful response:
}
```
-Rejection response:
+Ответ при отказе:
```json
{
@@ -158,10 +158,10 @@ Rejection response:
#### pm_getAcceptedPaymentTokens
-`pm_getAcceptedPaymentTokens` returns an array of tokens the paymaster will accept for payment.
-The request contains the entrypoint and the chain id with optional context.
+`pm_getAcceptedPaymentTokens` возвращает массив токенов, которые paymaster примет в качестве оплаты.
+Запрос содержит адрес Entrypoint и идентификатор цепи (Chain ID) с опциональным контекстом.
-##### Request
+##### Запрос
```json
{
@@ -171,7 +171,7 @@ The request contains the entrypoint and the chain id with optional context.
}
```
-##### Response
+##### Ответ
```json
{
diff --git a/docs/base-account/improve-ux/sponsor-gas/paymasters.mdx b/docs/base-account/improve-ux/sponsor-gas/paymasters.mdx
index 27efde08..6f6e1f3d 100644
--- a/docs/base-account/improve-ux/sponsor-gas/paymasters.mdx
+++ b/docs/base-account/improve-ux/sponsor-gas/paymasters.mdx
@@ -1,32 +1,31 @@
---
-title: "Sponsor Gas"
-description: "Use Paymasters to sponsor your users' transactions"
+title: "Спонсирование комиссий"
+description: "Используйте Paymaster'ы для спонсирования транзакций ваших пользователей"
---
-One of the biggest UX enhancements unlocked by Base Account is the ability for app developers to sponsor their users' transactions.
-If your app supports Base Account, you can start sponsoring your users'
-transactions by using [standardized Paymaster service communication](https://erc7677.xyz) enabled by [new wallet RPC methods](https://eip5792.xyz).
+Одним из ключевых улучшений пользовательского опыта, которое предоставляет Base Account, является возможность для разработчиков приложений спонсировать транзакции своих пользователей.
+Если ваше приложение поддерживает Base Account, вы можете начать спонсировать транзакции пользователей, используя [стандартизированную коммуникацию со службой Paymaster](https://erc7677.xyz) обеспечиваемую [новыми RPC-методами кошелька](https://eip5792.xyz).
-This guide is specific to using Base Account, you can find our more about using Paymasters with Base in
-the [Base Go Gasless page](/cookbook/go-gasless).
+Данное руководство специфично для использования Base Account. Более подробную информацию об использовании Paymaster'ов на Base вы можете найти
+на странице [Base Go Gasless page](/cookbook/go-gasless).
-## Implementation Guide
+## Руководство по реализации
-
- As a prerequisite, you'll need to obtain a Paymaster service URL from a Paymaster service provider.
+
+ В качестве предварительного условия вам необходимо получить URL службы Paymaster от провайдера этой услуги.
- We'll use [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) as a Paymaster service provider,
- currently offering up to $15k in gas credits as part of the [Base Gasless Campaign](/base-account/more/base-gasless-campaign).
+ Мы будем использовать [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) в качестве провайдера услуг Paymaster,
+ который в настоящее время предлагает до $15 тыс. в виде грантов на газ в рамках [Base Gasless Campaign](/base-account/more/base-gasless-campaign).
- **ERC-7677-Compliant Paymaster Providers**
+ **Провайдеры Paymaster, совместимые с ERC-7677**
- If you choose to use a different Paymaster service provider, ensure they are [ERC-7677-compliant](https://www.erc7677.xyz/ecosystem/paymasters).
+ Если вы решите использовать другого провайдера услуг Paymaster, убедитесь, что он [совместим с ERC-7677](https://www.erc7677.xyz/ecosystem/paymasters).
- Once you have signed up for [Coinbase Developer Platform](https://www.coinbase.com/developer-platform), you get your Paymaster service URL by navigating to **Onchain Tools > Paymaster** as shown below:
+ После регистрации в [Coinbase Developer Platform](https://www.coinbase.com/developer-platform), вы получите URL вашей службы Paymaster, перейдя в раздел **Onchain Tools > Paymaster**, как показано ниже:
@@ -37,20 +36,20 @@ the [Base Go Gasless page](/cookbook/go-gasless).
loading="lazy"
/>
- How to get your Paymaster service URL
+ Как получить URL вашей службы Paymaster
- **Should you create a proxy for your Paymaster service?**
+ **Стоит ли создавать прокси для вашей службы Paymaster?**
- We recommend using a proxy to protect the Paymaster service URL to prevent it from being exposed/leaked on a frontend client.
+ Мы рекомендуем использовать прокси для защиты URL службы Paymaster, чтобы предотвратить его раскрытие/утечку на клиентской стороне (frontend).
- For local development, you can use the same URL for the Paymaster service and the proxy.
+ Для локальной разработки вы можете использовать один и тот же URL для службы Paymaster и прокси.
- Once you have your Paymaster service URL, you can proceed to setting up your contracts allowlist.
- This is a list of contracts and function calls that you want to be sponsored by the Paymaster.
+ Получив URL службы Paymaster, вы можете перейти к настройке разрешительного списка (allowlist) контрактов.
+ Это список контрактов и вызовов функций, которые вы хотите, чтобы Paymaster спонсировал.
@@ -61,27 +60,27 @@ the [Base Go Gasless page](/cookbook/go-gasless).
loading="lazy"
/>
- How to set your Paymaster contracts allowlist
+ Как настроить разрешительный список контрактов Paymaster
- Congrats! You've set up your Paymaster service and contracts allowlist.
- It's time to set up the Base Account SDK.
+ Поздравляем! Вы настроили службу Paymaster и разрешительный список контрактов.
+ Пришло время настроить SDK для Base Account.
- **You can also choose to create custom advanced policies !**
+ **Вы также можете создать собственные расширенные политики!**
- You can create a `willSponsor` function to add some extra validation if you need more control over the policy enforcement.
+ При необходимости более тонкого контроля над применением политик вы можете создать функцию `willSponsor` для дополнительной валидации.
- `willSponsor` is most likely not needed if you are using [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) as it has built-in policy enforcement features,
- but know that this is still possible if you need it.
+ Скорее всего, функция `willSponsor` не понадобится, если вы используете [Coinbase Developer Platform](https://www.coinbase.com/developer-platform)так как он имеет встроенные функции применения политик,
+ но знайте, что эта возможность всё равно доступна, если она вам нужна.
-
- Install and initialize the Base Account SDK to interact with Base Account:
+
+ Установите и инициализируйте SDK Base Account для взаимодействия со смарт-аккаунтом:
- ### Installation
+ ### Установка
```bash npm
@@ -101,7 +100,7 @@ the [Base Go Gasless page](/cookbook/go-gasless).
```
- ### Initialize the SDK
+ ### Инициализация SDK
```tsx
import { createBaseAccountSDK, base } from '@base-org/account';
@@ -109,32 +108,32 @@ the [Base Go Gasless page](/cookbook/go-gasless).
const sdk = createBaseAccountSDK({
appName: 'Paymaster Demo',
appLogoUrl: 'https://base.org/logo.png',
- appChainIds: [base.constants.CHAIN_IDS.baseSepolia], // or base.constants.CHAIN_IDS.base for mainnet
+ appChainIds: [base.constants.CHAIN_IDS.baseSepolia], // или base.constants.CHAIN_IDS.base для мейннета
});
const provider = sdk.getProvider();
```
-
- Once you have your Paymaster service set up, you can now use `wallet_sendCalls` with paymaster capabilities to sponsor transactions.
+
+ После настройки службы Paymaster вы можете использовать метод `wallet_sendCalls` с возможностями paymaster для спонсирования транзакций.
- **Pass in the proxy URL**
+ **Передавайте URL прокси**
- If you set up a proxy in your app's backend as recommended in step (1) above, you'll want to pass in the proxy URL you created.
+ Если вы настроили прокси в бэкенде вашего приложения, как рекомендуется в шаге (1) выше, вам нужно передать созданный вами URL прокси.
- ### Basic Sponsored Transaction
+ ### Базовая спонсируемая транзакция
- Here's how to send a sponsored transaction using the `wallet_sendCalls` RPC method:
+ Вот как отправить спонсируемую транзакцию с помощью RPC-метода `wallet_sendCalls`:
```tsx
import { createBaseAccountSDK, getCryptoKeyAccount, base } from '@base-org/account';
import { numberToHex, encodeFunctionData, parseEther } from 'viem';
- // Example NFT contract ABI
+ // Пример ABI контракта NFT
const nftABI = [
{
name: 'safeMint',
@@ -155,7 +154,7 @@ the [Base Go Gasless page](/cookbook/go-gasless).
const provider = sdk.getProvider();
try {
- // Get the user's account
+ // Получаем аккаунт пользователя
const cryptoAccount = await getCryptoKeyAccount();
const fromAddress = cryptoAccount?.account?.address;
@@ -163,10 +162,10 @@ the [Base Go Gasless page](/cookbook/go-gasless).
throw new Error('No account found');
}
- // Your Paymaster service URL (use your proxy URL)
+ // URL вашей службы Paymaster (используйте URL вашего прокси)
const paymasterServiceUrl = process.env.NEXT_PUBLIC_PAYMASTER_PROXY_SERVER_URL;
- // Prepare the transaction call
+ // Подготавливаем вызов транзакции
const nftAddress = '0x119Ea671030FBf79AB93b436D2E20af6ea469a19';
const calls = [
{
@@ -180,7 +179,7 @@ the [Base Go Gasless page](/cookbook/go-gasless).
}
];
- // Send the transaction with paymaster capabilities
+ // Отправляем транзакцию с возможностями paymaster
const result = await provider.request({
method: 'wallet_sendCalls',
params: [{
@@ -205,9 +204,9 @@ the [Base Go Gasless page](/cookbook/go-gasless).
}
```
- ### Multiple Sponsored Transactions
+ ### Несколько спонсируемых транзакций
- You can also batch multiple transactions and have them all sponsored:
+ Вы также можете объединить несколько транзакций в пакет (batch), и все они будут спонсированы:
```tsx
async function sendMultipleSponsoredTransactions() {
@@ -223,17 +222,17 @@ the [Base Go Gasless page](/cookbook/go-gasless).
const paymasterServiceUrl = process.env.NEXT_PUBLIC_PAYMASTER_PROXY_SERVER_URL;
- // Multiple calls in a single sponsored transaction
+ // Несколько вызовов в одной спонсируемой транзакции
const calls = [
{
to: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
value: numberToHex(parseEther('0.001')),
- data: '0x' // Simple ETH transfer
+ data: '0x' // Простой перевод ETH
},
{
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f6E456',
value: numberToHex(parseEther('0.001')),
- data: '0x' // Another ETH transfer
+ data: '0x' // Еще один перевод ETH
}
];
@@ -256,9 +255,9 @@ the [Base Go Gasless page](/cookbook/go-gasless).
}
```
- ### Check Paymaster Capabilities
+ ### Проверка поддержки Paymaster
- Before sending sponsored transactions, you can check if the wallet supports paymaster services:
+ Перед отправкой спонсируемых транзакций вы можете проверить, поддерживает ли кошелек услуги paymaster:
```tsx
async function checkPaymasterSupport() {
@@ -294,8 +293,8 @@ the [Base Go Gasless page](/cookbook/go-gasless).
}
```
- That's it! Base Account will handle the rest. If your Paymaster service is able to sponsor the transaction,
- in the UI Base Account will indicate to your user that the transaction is sponsored.
+ Вот и всё! Base Account позаботится обо всём остальном. Если ваша служба Paymaster может спонсировать транзакцию,
+ в интерфейсе Base Account укажет вашему пользователю, что транзакция спонсируется.
diff --git a/docs/base-account/improve-ux/sub-accounts.mdx b/docs/base-account/improve-ux/sub-accounts.mdx
index 7c50b6b0..24af18e9 100644
--- a/docs/base-account/improve-ux/sub-accounts.mdx
+++ b/docs/base-account/improve-ux/sub-accounts.mdx
@@ -1,37 +1,37 @@
---
-title: 'Use Sub Accounts'
-description: 'Learn how to create and use Sub Accounts using Base Account SDK'
+title: 'Использование суб-аккаунтов'
+description: 'Узнайте, как создавать и использовать суб-аккаунты с помощью SDK Base Account'
---
import { GithubRepoCard } from "/snippets/GithubRepoCard.mdx"
-## What are Sub Accounts?
+## Что такое суб-аккаунты?
-Sub Accounts allow you to provision app-specific wallet accounts for your users that are embedded directly in your application. Once created, you can interact with them just as you would with any other wallet via the wallet provider or popular onchain libraries like OnchainKit, wagmi, and viem.
+Суб-аккаунты (Sub Accounts) позволяют создавать для ваших пользователей специфичные для приложения кошельки, которые встроены непосредственно в ваше приложение. После создания вы можете взаимодействовать с ними так же, как и с любым другим кошельком, через провайдер кошелька или популярные ончейн-библиотеки, такие как OnchainKit, wagmi и viem.
-Looking for a full implementation? Jump to the [Complete Integration Example](/base-account/improve-ux/sub-accounts#complete-integration-example).
+Ищете полную реализацию? Перейдите к [Complete Integration Example](/base-account/improve-ux/sub-accounts#complete-integration-example).
-## Key Benefits
+## Ключевые преимущества
-- **Frictionless transactions**: Eliminate repeated signing prompts for high frequency and agentic use cases or take full control of the transaction flow.
-- **No funding flows required**: Spend Permissions allow Sub Accounts to spend directly from the universal Base Account's balance.
-- **User control**: Users can manage all their sub accounts at [account.base.app](https://account.base.app).
+- **Беспрепятственные транзакции**: Устраните повторяющиеся запросы на подпись для сценариев с высокой частотой операций или автономных агентов (AI agents) или возьмите полный контроль над процессом транзакции.
+- **Не требуются пополнения**: Разрешения на расходование (Spend Permissions) позволяют суб-аккаунтам тратить средства напрямую с баланса универсального Base Account пользователя.
+- **Контроль со стороны пользователя**: Пользователи могут управлять всеми своими суб-аккаунтами на [account.base.app](https://account.base.app).
-If you would like to see a live demo of Sub Accounts in action, check out our [Sub Accounts Demo](https://sub-accounts-fc.vercel.app).
+Если вы хотите увидеть живую демонстрацию работы суб-аккаунтов, ознакомьтесь с нашим [Sub Accounts Demo](https://sub-accounts-fc.vercel.app).
**Spend Permissions**
-Sub Accounts are optimized for use with Spend Permissions to allow your app to take advantage of the user's existing Base Account balances. See the [Spend Permissions](/base-account/improve-ux/spend-permissions) guide for more information about how they work.
+Суб-аккаунты оптимизированы для использования вместе с Разрешениями на расходование (Spend Permissions), что позволяет вашему приложению использовать существующие балансы Base Account пользователя. Подробнее о том, как это работает, читайте в руководстве по [Spend Permissions](/base-account/improve-ux/spend-permissions).
-## Installation
+## Установка
-Install the Base Account SDK:
+Установите SDK Base Account:
```bash npm
@@ -51,9 +51,9 @@ bun add @base-org/account
```
-## Quickstart
+## Быстрый старт
-The fastest way to adopt Sub Accounts is to set `creation` to `on-connect` and `defaultAccount` to `sub` in the SDK configuration.
+Самый быстрый способ начать использовать суб-аккаунты - установить для параметров конфигурации SDK значения `creation`: `on-connect` и `defaultAccount`: `sub`.
```tsx
const sdk = createBaseAccountSDK({
@@ -65,52 +65,52 @@ const sdk = createBaseAccountSDK({
});
```
-This will automatically create a Sub Account for the user when they connect their Base Account and transactions will automatically be sent from the Sub Account unless you specify the `from` parameter in your transaction request to be the universal account address. Spend Permissions will also be automatically requested for the Sub Account as your app needs them.
+Это автоматически создаст суб-аккаунт для пользователя при подключении его Base Account, и транзакции будут автоматически отправляться с этого суб-аккаунта, если вы не укажете в запросе транзакции параметр `from` как адрес универсального аккаунта. Разрешения на расходование также будут автоматически запрашиваться для суб-аккаунта по мере необходимости вашему приложению.
-This is what the user will see when they connect their Base Account and automatic Sub Accounts are enabled:
+Вот что увидит пользователь при подключении своего Base Account, когда включены автоматические суб-аккаунты:
-We recommend using a [Paymaster](/base-account/improve-ux/sponsor-gas/paymasters) to sponsor gas to ensure the best user experience when integrating Sub Accounts. You can set a paymaster to be used for all transactions by configuring the `paymasterUrls` parameter in the SDK configuration. See the [createBaseAccount](/base-account/reference/core/createBaseAccount#param-paymaster-urls) reference for more information.
+Мы рекомендуем использовать [Paymaster](/base-account/improve-ux/sponsor-gas/paymasters) для спонсирования комиссий, чтобы обеспечить наилучший пользовательский опыт при интеграции суб-аккаунтов. Вы можете настроить paymaster для использования во всех транзакциях, указав параметр `paymasterUrls` в конфигурации SDK. Подробнее см. в справочнике по [createBaseAccount](/base-account/reference/core/createBaseAccount#param-paymaster-urls).
-## Using Sub Accounts
+## Использование суб-аккаунтов
-### Initialize the SDK
+### Инициализация SDK
-First, set up the Base Account SDK. Be sure to customize the `appName` and `appLogoUrl` to match your app as this will be displayed in the wallet connection popup and in the account.base.app dashboard. You can also customize the `appChainIds` to be the chains that your app supports.
+Сначала настройте SDK Base Account. Обязательно укажите `appName` и `appLogoUrl`, соответствующие вашему приложению, так как они будут отображаться во всплывающем окне подключения кошелька и в панели управления account.base.app. Вы также можете настроить `appChainIds` на цепи, которые поддерживает ваше приложение.
```tsx
import { createBaseAccountSDK, getCryptoKeyAccount } from '@base-org/account';
import { base } from 'viem/chains';
-// Initialize SDK with Sub Account configuration
+// Инициализация SDK с конфигурацией суб-аккаунта
const sdk = createBaseAccountSDK({
appName: 'Base Account SDK Demo',
appLogoUrl: 'https://base.org/logo.png',
appChainIds: [base.id],
});
-// Get an EIP-1193 provider
+// Получить провайдер EIP-1193
const provider = sdk.getProvider()
```
-### Create a Sub Account
+### Создание суб-аккаунта
-Make sure to authenticate the user with their Base Account before creating a Sub Account.
-For that, you can choose one of the following options:
-- Follow the [Authenticate users](/base-account/guides/authenticate-users) guide
-- Simply use `provider.request({ method: 'eth_requestAccounts' });` for a simple wallet connection
+Убедитесь, что пользователь аутентифицирован с помощью своего Base Account перед созданием суб-аккаунта.
+Для этого вы можете выбрать один из следующих вариантов:
+- Следуйте руководству [Authenticate users](/base-account/guides/authenticate-users)
+- Или просто используйте `provider.request({ method: 'eth_requestAccounts' });` для простого подключения кошелька
-Create a Sub Account for your application using the provider's [wallet_addSubAccount](/base-account/reference/core/provider-rpc-methods/wallet_addSubAccount) RPC method. When no `publicKey` parameter is provided, a non-extractable browser CryptoKey is generated and used to sign on behalf of the Sub Account.
+Создайте суб-аккаунт для вашего приложения, используя RPC-метод провайдера [wallet_addSubAccount](/base-account/reference/core/provider-rpc-methods/wallet_addSubAccount). Когда параметр `publicKey` не указан, генерируется неизвлекаемый ключ браузера (CryptoKey), который используется для подписи от имени суб-аккаунта.
```tsx
-// Create sub account
+// Создать суб-аккаунт
const subAccount = await provider.request({
method: 'wallet_addSubAccount',
params: [
@@ -125,7 +125,7 @@ const subAccount = await provider.request({
console.log('Sub Account created:', subAccount.address);
```
-Alternatively, you can use the SDK convenience method:
+Альтернативно, вы можете использовать удобный метод SDK:
```tsx
const subAccount = await sdk.subAccount.create();
@@ -133,24 +133,24 @@ const subAccount = await sdk.subAccount.create();
console.log('Sub Account created:', subAccount.address);
```
-This is what the user will see when prompted to create a Sub Account:
+Вот что увидит пользователь при запросе на создание суб-аккаунта:
-### Get Existing Sub Account
+### Получение существующего суб-аккаунта
-Retrieve an existing Sub Account using the provider's [wallet_getSubAccounts](/base-account/reference/core/provider-rpc-methods/wallet_getSubAccounts) RPC method. This will return the Sub Account associated with the app's domain and is useful to check if a Sub Account already exists for the user to determine if one needs to be created.
+Получите существующий суб-аккаунт, используя RPC-метод провайдера [wallet_getSubAccounts](/base-account/reference/core/provider-rpc-methods/wallet_getSubAccounts). Это вернет суб-аккаунт, связанный с доменом приложения, и полезно для проверки существования суб-аккаунта у пользователя, чтобы определить, нужно ли его создавать.
```tsx
-// Get the universal account
+// Получить универсальный аккаунт
const [universalAddress] = await provider.request({
method: "eth_requestAccounts",
params: []
})
-// Get sub account for universal account
+// Получить суб-аккаунт для универсального аккаунта
const { subAccounts: [subAccount] } = await provider.request({
method: 'wallet_getSubAccounts',
params: [{
@@ -166,33 +166,33 @@ if (subAccount) {
}
```
-Alternatively, you can use the SDK convenience method:
+Альтернативно, вы можете использовать удобный метод SDK:
```tsx
const subAccount = await sdk.subAccount.get();
console.log('Sub Account:', subAccount);
```
-### Send transactions
+### Отправка транзакций
-To send transactions from the connected sub account you can use EIP-5792 `wallet_sendCalls` or `eth_sendTransaction`. You need to specify the `from` parameter to be the sub account address.
+Чтобы отправлять транзакции с подключенного суб-аккаунта, вы можете использовать `wallet_sendCalls` (EIP-5792) или `eth_sendTransaction`. Вам необходимо указать параметр `from` как адрес суб-аккаунта.
-When the Sub Account is connected, it is the second account in the array returned by `eth_requestAccounts` or `eth_accounts`. `wallet_addSubAccount` needs to be called in each session before the Sub Account can be used. It will not trigger a new Sub Account creation if one already exists.
+Когда суб-аккаунт подключен, он является вторым аккаунтом в массиве, возвращаемом `eth_requestAccounts` или `eth_accounts`. Метод `wallet_addSubAccount` необходимо вызывать в каждой сессии перед использованием суб-аккаунта. Это не вызовет новое создание суб-аккаунта, если он уже существует.
-If you are using `mode: 'auto'`, the Sub Account will be the first account in the array.
+Если вы используете `mode: 'auto'`, суб-аккаунт будет первым аккаунтом в массиве.
-First, get all the accounts that are available, of which the sub account will be the second account:
+Сначала получите все доступные аккаунты, где суб-аккаунт будет вторым:
```tsx
const [universalAddress, subAccountAddress] = await provider.request({
- method: "eth_requestAccounts", // or "eth_accounts" if already connected
+ method: "eth_requestAccounts", // или "eth_accounts", если уже подключен
params: []
})
```
-Then, send the transaction from the sub account:
+Затем отправьте транзакцию от имени суб-аккаунта:
**`wallet_sendCalls`**
@@ -202,7 +202,7 @@ const callsId = await provider.request({
params: [{
version: "2.0",
atomicRequired: true,
- from: subAccountAddress, // Specify the sub account address
+ from: subAccountAddress, // Указываем адрес суб-аккаунта
calls: [{
to: '0x...',
data: '0x...',
@@ -224,7 +224,7 @@ console.log('Calls sent:', callsId);
const tx = await provider.request({
method: 'eth_sendTransaction',
params: [{
- from: subAccountAddress, // Specify the sub account address
+ from: subAccountAddress, // Указываем адрес суб-аккаунта
to: '0x...',
data: '0x...',
value: '0x...',
@@ -234,13 +234,13 @@ const tx = await provider.request({
console.log('Transaction sent:', tx);
```
-We recommend using `wallet_sendCalls` in conjunction with a paymaster to ensure the best user experience. See the [Paymasters](/base-account/improve-ux/sponsor-gas/paymasters) guide for more information.
+Мы рекомендуем использовать `wallet_sendCalls` вместе с paymaster для обеспечения наилучшего пользовательского опыта. Подробнее см. в руководстве по [Paymasters](/base-account/improve-ux/sponsor-gas/paymasters).
-## Advanced Usage
+## Расширенное использование
-### Import an existing account
+### Импорт существующего аккаунта
-If you already have a deployed Smart Contract Account and would like to turn it into a Sub Account of the connected Base Account, you can import it as a Sub Account using the provider RPC method:
+Если у вас уже есть развернутый смарт-контракт аккаунт, и вы хотите сделать его суб-аккаунтом подключенного Base Account, вы можете импортировать его как суб-аккаунт, используя RPC-метод провайдера:
```tsx
const subAccount = await provider.request({
@@ -250,7 +250,7 @@ const subAccount = await provider.request({
account: {
type: 'deployed',
address: '0xYourSmartContractAccountAddress',
- chainId: 8453 // the chain the account is deployed on
+ chainId: 8453 // цепь, на которой развернут аккаунт
},
}
],
@@ -261,18 +261,17 @@ console.log('Sub Account added:', subAccount.address);
-Before the Sub Account is imported, you will need to add the Base Account address as an owner of the Sub Account. This currently needs to be done manually
-by calling the [`addOwnerAddress`](https://github.com/coinbase/smart-wallet/blob/a8c6456f3a6d5d2dea08d6336b3be13395cacd42/src/MultiOwnable.sol#L101) or [`addOwnerPublicKey`](https://github.com/coinbase/smart-wallet/blob/a8c6456f3a6d5d2dea08d6336b3be13395cacd42/src/MultiOwnable.sol#L109) functions on the Smart Contract of the Sub Account that was imported and setting the Base Account address as the owner.
+Перед импортом суб-аккаунта вам необходимо добавить адрес Base Account в качестве владельца (owner) суб-аккаунта. В настоящее время это необходимо делать вручную путем вызова функций [`addOwnerAddress`](https://github.com/coinbase/smart-wallet/blob/a8c6456f3a6d5d2dea08d6336b3be13395cacd42/src/MultiOwnable.sol#L101) или [`addOwnerPublicKey`](https://github.com/coinbase/smart-wallet/blob/a8c6456f3a6d5d2dea08d6336b3be13395cacd42/src/MultiOwnable.sol#L109) в смарт-контракте импортируемого суб-аккаунта, указав адрес Base Account в качестве владельца.
-Additionally, only Coinbase Smart Wallet contracts are currently supported for importing as a Sub Account into your Base Account.
+Кроме того, на данный момент только контракты Coinbase Smart Wallet поддерживаются для импорта в качестве суб-аккаунта в ваш Base Account.
-The Coinbase Smart Wallet contract ABI can be found on [GitHub](https://github.com/base/account-sdk/blob/master/packages/account-sdk/src/sign/base-account/utils/constants.ts#L8).
+ABI контракта Coinbase Smart Wallet можно найти на [GitHub](https://github.com/base/account-sdk/blob/master/packages/account-sdk/src/sign/base-account/utils/constants.ts#L8).
-### Add Owner Account
+### Добавление владельца (Owner) аккаунта
-Sub Accounts automatically detect when an ownership update is needed when a signature is required and will prompt the user to approve the update before signing. However, you can also add an owner to a Sub Account manually using the SDK convenience method:
+Суб-аккаунты автоматически обнаруживают необходимость обновления прав владения, когда требуется подпись, и запрашивают у пользователя подтверждение перед подписанием. Однако вы также можете добавить владельца к суб-аккаунту вручную, используя удобный метод SDK:
```tsx
const ownerAccount = await sdk.subAccount.addOwner({
@@ -284,43 +283,43 @@ const ownerAccount = await sdk.subAccount.addOwner({
console.log('Owner added to Sub Account');
```
-This generates a transaction to call the `addOwnerAddress` or `addOwnerPublicKey` functions on the Sub Account's smart contract to add the owner.
+Это создает транзакцию для вызова функций `addOwnerAddress` или `addOwnerPublicKey` в смарт-контракте суб-аккаунта, чтобы добавить владельца.
-Ownership changes are expected if the user signs in to your app on a new device or browser.
+Изменения прав владения ожидаемы, если пользователь входит в ваше приложение на новом устройстве или в другом браузере.
-Ensure you do not lose your app's Sub Account signer keys when using the SDK on the server (e.g. Node.js) as updating the owner requires a signature from the user, which cannot be requested from server contexts.
+Убедитесь, что вы не теряете ключи для подписи суб-аккаунта вашего приложения при использовании SDK на сервере (например, Node.js), так как обновление владельца требует подписи от пользователя, которую нельзя запросить в серверном контексте.
-## Auto Spend Permissions
+## Автоматические разрешения на расходование (Auto Spend Permissions)
-Auto Spend Permissions allows Sub Accounts to access funds from their parent Base Account when transaction balances are insufficient. This feature can also establish ongoing spend permissions, enabling future transactions to execute without user approval prompts, reducing friction in your app's transaction flow.
+Функция Auto Spend Permissions позволяет суб-аккаунтам получать доступ к средствам из их родительского Base Account, когда баланса суб-аккаунта недостаточно для транзакции. Эта функция также может устанавливать постоянные разрешения на расходование, позволяя выполнять будущие транзакции без запросов на подтверждение пользователя, что снижает трение в процессе транзакций вашего приложения.
-This feature is **enabled by default** when using Sub Accounts.
+Эта функция **включена по умолчанию** при использовании суб-аккаунтов.
-### How it works
+### Как это работает
-**First-time transaction flow:**
-When a Sub Account attempts its first transaction, Base Account displays a popup for user approval. During this approval process, Base Account:
+**Поток первой транзакции:**
+Когда суб-аккаунт пытается совершить свою первую транзакцию, Base Account отображает всплывающее окно для подтверждения пользователем. В процессе этого подтверждения Base Account:
-- Automatically detects any missing tokens (native or ERC-20) needed for the transaction
-- Requests a transfer of the required funds from the parent Base Account to the Sub Account to fulfill the current transaction
-- Allows the user to optionally grant ongoing spend permissions for future transactions in that token
+- Автоматически определяет отсутствующие токены (нативные или ERC-20), необходимые для транзакции
+- Запрашивает перевод необходимых средств из родительского Base Account в суб-аккаунт для выполнения текущей транзакции
+- Позволяет пользователю при желании предоставить постоянные разрешения на расходование для будущих транзакций в этом токене
-**Subsequent transactions:**
-If the user granted spend permissions, future transactions follow this priority:
+**Последующие транзакции:**
+Если пользователь предоставил разрешения на расходование, будущие транзакции следуют такому приоритету:
-1. First, attempt using existing Sub Account balances and granted spend permissions
-2. If insufficient, prompt the user to authorize additional transfers and/or spend permissions from their Base Account
+1. Сначала используется существующий баланс суб-аккаунта и предоставленные разрешения на расходование
+2. Если средств недостаточно, пользователю предлагается авторизовать дополнительные переводы и/или разрешения на расходование со своего Base Account
-Spend permission requests are limited to the first token when multiple transfers are needed for a single transaction. Additional tokens require separate approvals.
+Запросы на разрешение расходования ограничены первым токеном, когда для одной транзакции требуется несколько переводов. Для дополнительных токенов требуются отдельные разрешения.
-### Configuration
+### Конфигурация
-If your users' Sub Accounts will be funded manually, you can disable Auto Spend Permissions by setting `funding` to `manual` in your SDK configuration:
+Если суб-аккаунты ваших пользователей будут пополняться вручную, вы можете отключить Auto Spend Permissions, установив для параметра `funding` значение `manual` в конфигурации SDK:
```tsx
const sdk = createBaseAccountSDK({
@@ -328,24 +327,24 @@ const sdk = createBaseAccountSDK({
appLogoUrl: 'https://base.org/logo.png',
appChainIds: [base.id],
subAccounts: {
- funding: 'manual', // Disable auto spend permissions
+ funding: 'manual', // Отключить автоматические разрешения на расходование
}
});
```
-## Technical Details
+## Технические детали
-Base Account's self-custodial design requires a user passkey prompt for each wallet interaction, such as transactions or message signing. While this ensures user awareness and approval of every wallet interaction, it can impact user experience in applications requiring frequent wallet interactions.
+Самокастодиальный дизайн Base Account требует запроса на подтверждение с помощью passkey для каждого взаимодействия с кошельком, такого как транзакции или подпись сообщений. Хотя это обеспечивает осведомленность и одобрение пользователем каждого действия, это может повлиять на пользовательский опыт в приложениях, требующих частых взаимодействий с кошельком.
-To support Base Account with user experiences that need more developer control over wallet interactions, we've built Sub Accounts in conjunction with [ERC-7895](https://eip.tools/eip/7895), a new wallet RPC for creating hierarchical relationships between wallet accounts.
+Для поддержки Base Account в сценариях, где разработчикам требуется больший контроль над взаимодействиями с кошельком, мы создали суб-аккаунты совместно с [ERC-7895](https://eip.tools/eip/7895) - новым RPC-методом кошелька для создания иерархических отношений между аккаунтами кошельков.
-These Sub Accounts are linked to the end user's Base Account through an onchain relationship. When combined with our [Spend Permission feature](/base-account/improve-ux/spend-permissions), this creates a powerful foundation for provisioning and funding app accounts securely, while giving you ample control over building the user experience that makes the most sense for your application.
+Эти суб-аккаунты связаны с Base Account конечного пользователя через ончейн-отношения. В сочетании с нашей функцией [Spend Permission](/base-account/improve-ux/spend-permissions) это создает мощную основу для безопасного создания и финансирования аккаунтов приложений, предоставляя вам широкий контроль для создания оптимального пользовательского опыта.
-## Complete Integration Example
+## Пример полной интеграции
-Here's a full React component that demonstrates Sub Account creation and usage:
+Вот полный React-компонент, демонстрирующий создание и использование суб-аккаунта:
```tsx
import { createBaseAccountSDK } from "@base-org/account";
@@ -379,7 +378,7 @@ export default function SubAccountDemo() {
const [loadingUniversal, setLoadingUniversal] = useState(false);
const [status, setStatus] = useState("");
- // Initialize SDK and crypto account
+ // Инициализация SDK и криптоаккаунта
useEffect(() => {
const initializeSDK = async () => {
try {
@@ -388,7 +387,7 @@ export default function SubAccountDemo() {
appChainIds: [baseSepolia.id],
});
- // Get the provider
+ // Получить провайдер
const providerInstance = sdkInstance.getProvider();
setProvider(providerInstance);
@@ -412,7 +411,7 @@ export default function SubAccountDemo() {
setStatus("Connecting wallet...");
try {
- // Connect to the wallet
+ // Подключиться к кошельку
const accounts = (await provider.request({
method: "eth_requestAccounts",
params: [],
@@ -422,7 +421,7 @@ export default function SubAccountDemo() {
setUniversalAddress(universalAddr);
setConnected(true);
- // Check for existing sub account
+ // Проверить наличие существующего суб-аккаунта
const response = (await provider.request({
method: "wallet_getSubAccounts",
params: [
@@ -500,7 +499,7 @@ export default function SubAccountDemo() {
{
version: "2.0",
atomicRequired: true,
- chainId: `0x${baseSepolia.id.toString(16)}`, // Convert to hex
+ chainId: `0x${baseSepolia.id.toString(16)}`, // Конвертировать в hex
from,
calls,
capabilities: {
@@ -669,4 +668,4 @@ export default function SubAccountDemo() {
);
}
-```
\ No newline at end of file
+```
diff --git a/docs/base-account/more/base-gasless-campaign.mdx b/docs/base-account/more/base-gasless-campaign.mdx
index 224d3e80..32811e42 100644
--- a/docs/base-account/more/base-gasless-campaign.mdx
+++ b/docs/base-account/more/base-gasless-campaign.mdx
@@ -1,14 +1,14 @@
---
-title: "Base Gasless Campaign"
+title: "Кампания Base Gasless"
---
-Base is offering gas credits to help developers make the most of
-Base Account's [paymaster (sponsored transactions)](/base-account/improve-ux/sponsor-gas/paymasters) features.
+Base предлагает газовые кредиты, чтобы помочь разработчикам максимально
+использовать возможности Base Account [paymaster (спонсируемых транзакций)](/base-account/improve-ux/sponsor-gas/paymasters).
-| Partner Tier | Base Gas Credit Incentive | Requirements | Actions |
+| Уровень партнёрства | Стимул: Газовый кредит от Base | Требования | Действия |
| ------------ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| 1 | $15k |
- - Support Base Account
- - Onboard to CDP Paymaster
- - Preferred placement in your UI (ie "Create Wallet" button)
|
- 1. Migrate your Coinbase SDK to add Base Account to your app, or bump to latest version of any supporting wallet library.
- 2. Sign in / up for [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) (takes less than 2 minutes). No KYC needed - just email and phone.
- 3. Check out the Paymaster product where the Base Mainnet Paymaster is enabled by default. Set and change your gas policy at any time.
- 4. Complete [this form](https://docs.google.com/forms/d/1yPnBFW0bVUNLUN_w3ctCqYM9sjdIQO3Typ53KXlsS5g/viewform?edit_requested=true)
- Credits will land within 1 week of completion
|
-| 2 | $10k |
- - Support Base Account
- - Onboard to CDP Paymaster
|
- 1. Migrate your Coinbase SDK to add Base Account to your app, or bump to latest version of any supporting wallet library.
- 2. Sign in / up for [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) (takes less than 2 minutes). No KYC needed - just email and phone.
- 3. Check out the Paymaster product where the Base Mainnet Paymaster is enabled by default. Set and change your gas policy at any time.
- 4. Complete [this form](https://docs.google.com/forms/d/1yPnBFW0bVUNLUN_w3ctCqYM9sjdIQO3Typ53KXlsS5g/viewform?edit_requested=true)
- Credits will land within 1 week of completion
|
-| Bonus | $1k |
| Create a demo of your Coinbase Base Account integration, post on social (Farcaster and/or X) and tag Coinbase Wallet and/or Base |
+| 1 | $15k |
- - Поддержка Base Account
- - Подключение к CDP Paymaster
- - Предпочтительное размещение в вашем интерфейсе (например, кнопка "Create Wallet")
|
- 1. Мигрируйте Coinbase SDK, чтобы добавить Base Account в ваше приложение, или обновитесь до последней версии любой поддерживающей библиотеки кошельков.
- 2. Войдите / зарегистрируйтесь в [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) (занимает менее 2 минут). KYC не требуется - только email и телефон.
- 3. Ознакомьтесь с продуктом Paymaster, где Base Mainnet Paymaster включён по умолчанию. Устанавливайте и изменяйте свою газовую политику в любое время.
- 4. Заполните [эту форму](https://docs.google.com/forms/d/1yPnBFW0bVUNLUN_w3ctCqYM9sjdIQO3Typ53KXlsS5g/viewform?edit_requested=true)
- Кредиты поступят в течение 1 недели после выполнения всех условий
|
+| 2 | $10k |
- - Поддержка Base Account
- - Подключение к CDP Paymaster
|
- 1. MМигрируйте Coinbase SDK, чтобы добавить Base Account в ваше приложение, или обновитесь до последней версии любой поддерживающей библиотеки кошельков.
- 2. Войдите / зарегистрируйтесь в [Coinbase Developer Platform](https://www.coinbase.com/developer-platform) (занимает менее 2 минут). KYC не требуется - только email и телефон.
- 3. Ознакомьтесь с продуктом Paymaster, где Base Mainnet Paymaster включён по умолчанию. Устанавливайте и изменяйте свою газовую политику в любое время.
- 4. Заполните [эту форму](https://docs.google.com/forms/d/1yPnBFW0bVUNLUN_w3ctCqYM9sjdIQO3Typ53KXlsS5g/viewform?edit_requested=true)
- Кредиты поступят в течение 1 недели после выполнения всех условий
|
+| Бонус | $1k |
| Создайте демонстрацию вашей интеграции с Coinbase Base Account, опубликуйте в соцсетях (Farcaster и/или X) и отметьте Coinbase Wallet и/или Base |
diff --git a/docs/base-account/more/telemetry.mdx b/docs/base-account/more/telemetry.mdx
index 5dd3b0be..810ab998 100644
--- a/docs/base-account/more/telemetry.mdx
+++ b/docs/base-account/more/telemetry.mdx
@@ -1,34 +1,34 @@
---
-title: Telemetry · Base Account
-sidebarTitle: Telemetry
-description: Understanding Base Account's anonymous telemetry system and how to configure it.
+title: Телеметрия · Base Account
+sidebarTitle: Телеметрия
+description: Об анонимной системе телеметрии Base Account и о том, как её настроить.
---
-Base Account includes an anonymous telemetry system to help us better understand how Base Account is used across applications and improve the developer experience. Participation in this anonymous program is optional—if you'd prefer not to share any usage data, you can easily opt out.
+Base Account включает анонимную систему телеметрии, чтобы помочь нам лучше понять, как Base Account используется в различных приложениях, и улучшить опыт разработчиков. Участие в этой анонимной программе необязательно - если вы предпочитаете не делиться данными об использовании, вы можете легко отказаться.
-### Why Are We Collecting Telemetry?
+### Зачем мы собираем телеметрию?
-Base Account provides critical wallet infrastructure for onchain applications with features like signing transactions & messages, signer management, and more. By collecting telemetry data, we can:
+Base Account предоставляет критическую инфраструктуру кошелька для ончейн-приложений с такими функциями, как подписание транзакций и сообщений, управление подписантами и другие. Собирая данные телеметрии, мы можем:
-- **Monitor Wallet Operation Success**: Track which wallet operations (signing, connecting, transactions) are most reliable and identify failure patterns
-- **Data-Informed Improvements**: Help our engineering team generate insights that drive future wallet enhancements and reliability improvements
-- **Proactive Issue Detection**: Quickly detect issues with new SDK releases or wallet operations through operational metrics and error monitoring
+- **Мониторить успешность операций кошелька**: Отслеживать, какие операции кошелька (подписание, подключение, транзакции) наиболее надёжны, и выявлять паттерны сбоев
+- **Улучшения на основе данных**: Помогать нашей инженерной команде получать инсайты, которые стимулируют будущие улучшения и повышение надёжности кошелька
+- **Проактивное обнаружение проблем**: Быстро выявлять проблемы с новыми версиями SDK или операциями кошелька через операционные метрики и мониторинг ошибок
-### What Data Will Be Collected?
+### Какие данные собираются?
-Telemetry data is completely anonymous and focused on functional metrics. Specifically, we collect:
+Данные телеметрии полностью анонимны и сосредоточены на функциональных метриках. В частности, мы собираем:
-- **Request Success Metrics**: Information about the success and failure rates of wallet requests to identify reliability issues
-- **Error Events**: Generic error events with operational context to help us improve Base Account reliability
-- **UI Component Usage**: Anonymous metrics on interface component functionality to ensure optimal reliability
+- **Метрики успешности запросов**: Информацию о показателях успешности и сбоев запросов к кошельку для выявления проблем с надёжностью
+- **События ошибок**: Общие события ошибок с операционным контекстом, чтобы помочь нам повысить надёжность Base Account
+- **Использование UI-компонентов**: Анонимные метрики функциональности компонентов интерфейса для обеспечения оптимальной надёжности
-**Privacy First**: No sensitive data—such as private keys, transaction contents, user addresses, or personal information—is ever collected.
+**Конфиденциальность прежде всего**: Никакие конфиденциальные данные - такие как приватные ключи, содержимое транзакций, адреса пользователей или личная информация - никогда не собираются.
-### How Does It Work?
+### Как это работает?
-Telemetry is integrated into the Base Account SDK and automatically triggers when certain wallet events occur (provided telemetry is enabled in your configuration). The data is sent to secure Coinbase endpoints for analysis.
+Телеметрия интегрирована в Base Account SDK и автоматически активируется при возникновении определённых событий кошелька (при условии, что телеметрия включена в вашей конфигурации). Данные отправляются на защищённые конечные точки Coinbase для анализа.
-For example, when a wallet request occurs, a telemetry event like this is sent:
+Например, при выполнении запроса к кошельку отправляется событие телеметрии, подобное этому:
```bash
curl 'https://cca-lite.coinbase.com/amp' \
@@ -37,18 +37,18 @@ curl 'https://cca-lite.coinbase.com/amp' \
--data-raw 'e=[{"event_type":"scw_signer.request.started","event_properties":{"method":"eth_requestAccounts","correlationId":"abc123-def456","sdkVersion":"4.3.2","appName":"Your App Name","appOrigin":"https://your-app.com"}}]'
```
-The payload contains an array of telemetry events with operational data including:
+Полезная нагрузка содержит массив событий телеметрии с операционными данными, включая:
-- **event_type**: The specific wallet operation being tracked
-- **method**: The wallet method being called (e.g., `eth_requestAccounts`)
-- **correlationId**: A unique identifier for request tracking
-- **sdkVersion**: The Base Account SDK version
-- **appName**: Your application name
-- **appOrigin**: Your application's domain
+- **event_type**: Конкретная операция кошелька, которая отслеживается
+- **method**: Вызываемый метод кошелька (например, `eth_requestAccounts`)
+- **correlationId**: Уникальный идентификатор для отслеживания запросов
+- **sdkVersion**: Версия Base Account SDK
+- **appName**: Название вашего приложения
+- **appOrigin**: Домен вашего приложения
-### How Do I Opt Out?
+### Как отказаться?
-By default, telemetry collection follows an opt-out model. If you'd like to disable telemetry in your app that uses the Base Account SDK, you can configure it during SDK initialization:
+По умолчанию сбор телеметрии следует модели отказа. Если вы хотите отключить телеметрию в своём приложении, использующем Base Account SDK, вы можете настроить это во время инициализации SDK:
```typescript
import { createCoinbaseWalletSDK } from "@coinbase/wallet-sdk";
@@ -62,7 +62,7 @@ const sdk = createCoinbaseWalletSDK({
const provider = sdk.getProvider();
```
-For legacy Coinbase Wallet SDK class based components:
+Для устаревших компонентов на основе класса Coinbase Wallet SDK:
```tsx
import { CoinbaseWalletSDK } from "@coinbase/wallet-sdk";
@@ -77,9 +77,9 @@ const provider = sdk.getProvider({
});
```
-We believe that this telemetry initiative will help us make Base Account even better for all developers—by focusing our improvements on the most critical wallet operations and catching issues early. If you have any questions or feedback, please reach out to the Base Account team.
+Мы считаем, что эта инициатива по телеметрии поможет нам сделать Base Account ещё лучше для всех разработчиков - сосредоточив наши улучшения на наиболее критичных операциях кошелька и выявляя проблемы на раннем этапе. Если у вас есть вопросы или отзывы, пожалуйста, свяжитесь с командой Base Account.
-Happy building with Base Account!
+Удачной разработки с Base Account!
-— The Base Account team
+— Команда Base Account
diff --git a/docs/base-account/more/troubleshooting/usage-details/gas-usage.mdx b/docs/base-account/more/troubleshooting/usage-details/gas-usage.mdx
index 89bc88b2..c8bee02d 100644
--- a/docs/base-account/more/troubleshooting/usage-details/gas-usage.mdx
+++ b/docs/base-account/more/troubleshooting/usage-details/gas-usage.mdx
@@ -1,21 +1,21 @@
---
-title: "Gas Usage"
+title: "Использование газа"
---
-Base Accounts use more gas for transactions than traditional Ethereum accounts. On L2 networks, the cost difference to the user is a matter of cents.
-The gas difference is due to the additional overhead required for:
+Base Accounts используют больше газа для транзакций, чем традиционные Ethereum-аккаунты. В сетях L2 разница в стоимости для пользователя составляет копейки.
+Разница в газе обусловлена дополнительными накладными расходами, необходимыми для:
-1. **ERC-4337 Bundling**
-2. **Smart Contract Operations**, including one time deployment of the Base Account contract
-3. **Signature Verification**
+1. **Объединения (Bundling) ERC-4337**
+2. **Операций со смарт-контрактами**, включая разовое развёртывание контракта Base Account
+3. **Верификации подписей**
-## Gas Usage Breakdown
+## Детализация использования газа
-Here's a rough comparison of gas usage per account:
+Вот примерное сравнение использования газа на аккаунт:
-| Operation Type | Traditional Ethereum Account | Base Account |
+| Тип операции | Традиционный Ethereum-аккаунт | Base Account |
|---------------|------------|--------------|
-| Native Token Transfer | ~21,000 gas | ~100,000 gas |
-| ERC-20 Token Transfer | ~65,000 gas | ~150,000 gas |
-| First Deployment | N/A | ~300,000+ gas |
+| Перевод нативного токена | ~21,000 gas | ~100,000 gas |
+| Перевод токена ERC-20 | ~65,000 gas | ~150,000 gas |
+| Первое развёртывание | N/A | ~300,000+ gas |
diff --git a/docs/base-account/more/troubleshooting/usage-details/popups.mdx b/docs/base-account/more/troubleshooting/usage-details/popups.mdx
index bccea302..739a0a26 100644
--- a/docs/base-account/more/troubleshooting/usage-details/popups.mdx
+++ b/docs/base-account/more/troubleshooting/usage-details/popups.mdx
@@ -1,37 +1,37 @@
---
-title: "Popup Tips"
+title: "Подсказки по всплывающим окнам"
---
-## Overview
-When a Base Account is connected and Coinbase Wallet SDK receives a request, it opens
-[keys.coinbase.com](https://keys.coinbase.com/) in a popup window and passes the request to the popup for handling.
-Keep the following points in mind when working with the Base Account popup.
+## Обзор
+Когда подключён Base Account и Coinbase Wallet SDK получает запрос, он открывает
+[keys.coinbase.com](https://keys.coinbase.com/) во всплывающем окне и передаёт запрос туда для обработки.
+Учитывайте следующие моменты при работе со всплывающим окном Base Account.
-## Default blocking behavior
-- Most modern browsers block all popups by default, unless they are triggered by a click.
-- If a popup is blocked the browser shows a notification to the user, allowing them to manage popup settings.
+## Поведение блокировки по умолчанию
+- Большинство современных браузеров блокирует все всплывающие окна по умолчанию, если они не вызваны кликом.
+- Если всплывающее окно заблокировано, браузер показывает уведомление пользователю, позволяя ему управлять настройками всплывающих окон.
-### What to do about it
-- Ensure there is no additional logic between the button click and the request to open the Base Account popup,
-as browsers might perceive the request as programmatically initiated.
-- If logic is unavoidable, keep it minimal and test thoroughly in all supported browsers.
+### Что с этим делать
+- Убедитесь, что между кликом по кнопке и запросом на открытие всплывающего окна Base Account нет дополнительной логики,
+так как браузеры могут воспринимать запрос как программно инициированный.
+- Если логику нельзя избежать, делайте её минимальной и тщательно тестируйте во всех поддерживаемых браузерах.
## `Cross-Origin-Opener-Policy`
-If the Base Account popup opens and displays an error or infinite spinner, it may be due to the dapp's `Cross-Origin-Opener-Policy`. Be sure to use a directive that allows the Base Account popup to function.
+Если всплывающее окно Base Account открывается и отображает ошибку или бесконечный спиннер, это может быть связано с `Cross-Origin-Opener-Policy` вашего приложения. Убедитесь, что используется директива, позволяющая всплывающему окну Base Account функционировать.
-- ✅ Allows Base Account popup to function
- - `unsafe-none` (default)
- - `same-origin-allow-popups` (recommended)
-- ❌ Breaks Base Account popup
+- ✅ Позволяет всплывающему окну Base Account работать
+ - `unsafe-none` (по умолчанию)
+ - `same-origin-allow-popups` (рекомендуется)
+- ❌ Ломает всплывающее окно Base Account
- `same-origin`
-For more detailed information refer to the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).
+Для получения более подробной информации обратитесь к [документации MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).
-## Base Account popup 'linger' behavior
-- Sometimes a dapp may programmatically make a followup request based on the response to a previous request.
-Normally, browsers block these programmatic requests to open popups.
-- To address this, after the Base Account popup responds to a request, it will linger for 200ms to listen for another incoming request before closing.
- - If a request is received *during* this 200ms window, it will be received and handled within the same popup window.
- - If a request is received *after* the 200ms window and the popup has closed, opening the Base Account popup will be blocked by the browser.
+## Поведение "задержки" всплывающего окна Base Account
+- Иногда dapp может программно выполнить последующий запрос на основе ответа на предыдущий запрос.
+Обычно браузеры блокируют такие программные запросы на открытие всплывающих окон.
+- Чтобы решить эту проблему, после ответа на запрос всплывающее окно Base Account задерживается на 200мс, чтобы прослушивать входящие запросы перед закрытием.
+ - Если запрос получен в течение этого 200мс окна, он будет принят и обработан в том же всплывающем окне.
+ - Если запрос получен после 200мс окна и всплывающее окно закрылось, открытие всплывающего окна Base Account будет заблокировано браузером.
diff --git a/docs/base-account/more/troubleshooting/usage-details/simulations.mdx b/docs/base-account/more/troubleshooting/usage-details/simulations.mdx
index 0c5b4829..09b1202e 100644
--- a/docs/base-account/more/troubleshooting/usage-details/simulations.mdx
+++ b/docs/base-account/more/troubleshooting/usage-details/simulations.mdx
@@ -1,16 +1,16 @@
---
-title: "Transaction Simulation Data"
+title: "Данные симуляции транзакции"
---
-There is a hidden feature which enables you to easily copy transaction simulation request and response data which can then be pasted it in a text editor to inspect.
+Существует скрытая функция, которая позволяет легко скопировать данные запроса и ответа симуляции транзакции, чтобы затем вставить их в текстовый редактор для изучения.
-## Instructions
-- Click the area defined in red **_five times_**, then paste the copied data in a text editor.
+## Инструкции
+- Нажмите на область, выделенную красным **пять раз**, затем вставьте скопированные данные в текстовый редактор.
- 
+ 
diff --git a/docs/base-account/more/troubleshooting/usage-details/unsupported-calls.mdx b/docs/base-account/more/troubleshooting/usage-details/unsupported-calls.mdx
index 0a55f501..e1aa5c87 100644
--- a/docs/base-account/more/troubleshooting/usage-details/unsupported-calls.mdx
+++ b/docs/base-account/more/troubleshooting/usage-details/unsupported-calls.mdx
@@ -1,43 +1,43 @@
---
-title: 'Unsupported Calls'
+title: 'Неподдерживаемые вызовы'
---
-Base Account implements an Ethereum Provider JavaScript API (as detailed in [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193))
-and follows the [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) standard for account abstraction.
+Base Account реализует JavaScript API Ethereum Provider (как описано в [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193))
+и следует стандарту [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) для абстракции аккаунтов.
-This means that apps interacting with Base Account can expect it to behave like a regular Ethereum Virtual Machine (EVM) account.
-However, there are some calls that are not supported by Base Accounts for incompatibility or security reasons.
-This is a list of calls that are not supported:
+Это означает, что приложения, взаимодействующие с Base Account, могут ожидать, что он ведёт себя как обычный аккаунт Ethereum Virtual Machine (EVM).
+Однако есть некоторые вызовы, которые не поддерживаются Base Accounts по причинам несовместимости или безопасности.
+Вот список неподдерживаемых вызовов:
-- [Self Calls](#self-calls): This refers to the ability of an app to use the user's account to call itself.
-- [CREATE](#create): This refers to the ability of an app to create a new contract using the OPCODE `CREATE`.
+- [Вызовы к самому себе (Self Calls)](#self-calls): Способность приложения использовать аккаунт пользователя для вызова самого себя.
+- [CREATE](#create): Способность приложения создавать новый контракт с использованием OPCODE `CREATE`.
-## Self Calls
+## Вызовы к самому себе (Self Calls)
-For security reasons, we do not allow 3rd party apps to make calls to a user's own Base Account address.
-This could allow apps to change owners, upgrade the user's account, or cause other issues.
+По соображениям безопасности мы не позволяем сторонним приложениям совершать вызовы к адресу Base Account самого пользователя.
+Это может позволить приложениям изменять владельцев, обновлять аккаунт пользователя или вызывать другие проблемы.
## CREATE
-This is a limitation of the ERC-4337 standard and smart accounts.
-Currently, we do not support the `CREATE` opcode for smart contracts deployment.
-Future versions of Base Account may support it.
+Это ограничение стандарта ERC-4337 и смарт-аккаунтов.
+В настоящее время мы не поддерживаем OPCODE `CREATE` для развёртывания смарт-контрактов.
+Будущие версии Base Account могут поддерживать его.
-You can use a factory contract or a transaction with the `CREATE2` opcode to deploy a smart contract.
+Вы можете использовать фабричный контракт или транзакцию с opcode `CREATE2` для развёртывания смарт-контракта.
-## Solidity's Builtin `transfer` function
+## Встроенная функция Solidity `transfer`
-The `transfer` function is a built-in member of the `address` type in Solidity that can be used to send ETH to an address. Base Account wallets cannot receive ETH using this function.
-This function has long been considered deprecated in favor of `call` by the Solidity community, but some older contracts still use it.
+Функция `transfer` - это встроенный член типа `address` в Solidity, который можно использовать для отправки ETH на адрес. Кошельки Base Account не могут получать ETH с использованием этой функции.
+Этот метод уже давно считается устаревшим в пользу call в сообществе Solidity, но некоторые старые контракты всё ещё используют его.
-The reason for this is that `transfer` only forwards 2300 gas to the `transfer` call, a protective mechanism that was designed to prevent reentrancy attacks by limiting the amount of
-gas available to a smart contract that might reenter the caller.
-In the modern world of smart contract wallets (including for Base Account), this is often not enough gas for the smart contract's `receive` or `fallback` functions to complete their work,
-causing the transaction to revert.
+Причина в том, что transfer передаёт только 2300 газа в вызов `transfer`, что является защитным механизмом, разработанным для предотвращения атак повторного входа путём ограничения количества
+газа, доступного смарт-контракту, который может повторно войти в вызывающую сторону.
+В современном мире смарт-контрактных кошельков (включая Base Account) этого часто недостаточно для завершения работы функций `receive` или `fallback` смарт-контракта,
+что приводит к откату транзакции.
-### Known affected contracts
+### Известные затронутые контракты
-- The [WETH9 contract](https://basescan.org/token/0x4200000000000000000000000000000000000006) uses `transfer` to send ETH to the user's wallet and therefore Base Accounts cannot directly unwrap ETH from it.
+- Контракт [WETH9](https://basescan.org/token/0x4200000000000000000000000000000000000006) использует `transfer` для отправки ETH на кошелёк пользователя, поэтому Base Accounts не могут напрямую разворачивать ETH из него.
diff --git a/docs/base-account/more/troubleshooting/usage-details/wallet-library-support.mdx b/docs/base-account/more/troubleshooting/usage-details/wallet-library-support.mdx
index 3db0359b..6f0e44ac 100644
--- a/docs/base-account/more/troubleshooting/usage-details/wallet-library-support.mdx
+++ b/docs/base-account/more/troubleshooting/usage-details/wallet-library-support.mdx
@@ -1,11 +1,11 @@
---
-title: "Wallet Library Support"
+title: "Поддержка библиотек кошельков"
---
-Below are some popular wallet libraries and what we know of their plans for day 1 support for Base Account.
+Ниже приведены некоторые популярные библиотеки кошельков и информация об их планах по поддержке Base Account с первого дня.
-| Name | Support |
+| Название | Поддержка |
| ---------------------------------------------------------------------------------- | ------- |
| [Dynamic](https://docs.dynamic.xyz/wallets/advanced-wallets/coinbase-smart-wallet) | ✅ |
| [Privy](https://docs.privy.io/guide/react/recipes/misc/coinbase-smart-wallets) | ✅ |
diff --git a/docs/base-account/overview/what-is-base-account.mdx b/docs/base-account/overview/what-is-base-account.mdx
index 7ae0197e..245cc7c8 100644
--- a/docs/base-account/overview/what-is-base-account.mdx
+++ b/docs/base-account/overview/what-is-base-account.mdx
@@ -1,40 +1,40 @@
---
-title: "Base Account Overview"
-description: "What is a Base Account and how the Base Account SDK lets you add universal sign-in and one-tap USDC payments to any app."
+title: "Обзор Base Account"
+description: "Что такое Base Account и как Base Account SDK позволяет добавить универсальный вход и платежи USDC в одно нажатие в любое приложение."
---
-> **TL;DR** – Base Accounts are the onchain identity and account layer powering the [Base App](https://base.app). With the **Base Account SDK** you can connect to over one hundred thousand users and unlock authentication and payments with just a few lines of code.
+> **TL;DR** – Base Accounts - это уровень ончейн-идентификации и аккаунтов, который питает [Base App](https://base.app). С **Base Account SDK** вы можете подключиться к более чем ста тысячам пользователей и разблокировать аутентификацию и платежи всего несколькими строками кода.
-## What is a Base Account?
+## Что такое Base Account?
-A Base Account is a Smart-Wallet–backed account that gives every user:
+Base Account - это аккаунт на основе смарт-кошелька, который дает каждому пользователю:
-* **Universal sign-on** – one passkey works across every Base-enabled app.
-* **One-tap payments** – low-friction USDC payments built into the account layer.
-* **Private profile vault** – opt-in sharing of email, phone, shipping address, and more.
-* **Multi-chain support** – one address that works across nine EVM networks (and counting).
+* **Универсальный вход** – один пасскей работает во всех приложениях с поддержкой Base.
+* **Платежи в одно нажатие** – беспрепятственные платежи USDC, встроенные в уровень аккаунта.
+* **Приватное хранилище профиля** – опциональный обмен email, телефоном, адресом доставки и другим.
+* **Поддержка мультичейн** – один адрес, который работает в девяти EVM-сетях (и их количество растет).
-> Under the hood, each Base Account is an ERC-4337 Smart Wallet that can be deployed on any EVM-compatible chain; nine EVM mainnet chains are enabled out of the box, including Base Mainnet.
+> Под капотом каждый Base Account - это ERC-4337 умный кошелек, который может быть развернут в любой EVM-совместимой цепи; девять основных EVM-сетей включены из коробки, включая Base Mainnet.
-**Supported networks**
+**Поддерживаемые сети**
-- **Mainnet:** Base • Arbitrum • Optimism • Zora • Polygon • BNB • Avalanche • Lordchain • Ethereum Mainnet (not recommended due to costs)
+- **Mainnet:** Base • Arbitrum • Optimism • Zora • Polygon • BNB • Avalanche • Lordchain • Ethereum Mainnet (не рекомендуется из-за стоимости)
- **Testnet:** Sepolia • Base Sepolia
-## Why should developers care?
+## Почему это важно для разработчиков?
-* **Higher conversion** – no app installs, seed phrases, or network switches.
-* **Fewer drop-offs at checkout** – a single `pay()` call handles gas and settlement.
-* **Cross-app identity** – fetch a verified email or shipping address via the same SDK.
-* **Self-custodial** – users hold the keys; you never touch private data or funds.
+* **Более высокая конверсия** – никаких установок приложений, сид-фраз или переключения сетей.
+* **Меньше отказов при оплате** – один вызов `pay()` обрабатывает газ и расчеты.
+* **Кросс-приложенная идентичность** – получайте проверенный email или адрес доставки через тот же SDK.
+* **Самокастодиальный** – пользователи хранят ключи; вы никогда не касаетесь приватных данных или средств.
-## Next steps
+## Следующие шаги
-| Goal | Start here |
+| Цель | Начните здесь |
| --- | --- |
-| Build & run in 5 min | [Quickstart](/base-account/quickstart/web) |
-| Authentication flow | [Authenticate users](/base-account/guides/authenticate-users) |
-| Accept USDC payments on Base | [Accept payments](/base-account/guides/accept-payments) |
-| Deep-dive API shapes | [TypeScript API reference](/base-account/reference/core/getProvider) |
+| Собрать и запустить за 5 мин | [Быстрый старт](/base-account/quickstart/web) |
+| Процесс аутентификации | [Аутентификация пользователей](/base-account/guides/authenticate-users) |
+| Прием платежей USDC в Base | [Прием платежей](/base-account/guides/accept-payments) |
+| Глубокое погружение в API | [Справочник TypeScript API](/base-account/reference/core/getProvider) |
diff --git a/docs/base-account/quickstart/ai-tools-available-for-devs.mdx b/docs/base-account/quickstart/ai-tools-available-for-devs.mdx
index d1da792e..a8c98899 100644
--- a/docs/base-account/quickstart/ai-tools-available-for-devs.mdx
+++ b/docs/base-account/quickstart/ai-tools-available-for-devs.mdx
@@ -1,10 +1,10 @@
---
-title: "AI Tools for Base Account Developers"
+title: "Инструменты AI для разработчиков Base Account"
---
-Base Account has a number of AI tools available for builders and developers.
-We keep expanding the list of tools and features, so please check back soon for updates.
+Base Account предлагает ряд инструментов искусственного интеллекта для разработчиков и специалистов.
+Мы постоянно расширяем список инструментов и функций, поэтому следите за обновлениями.
- This doc is updated for Mobile Wallet Protocol Client `v1.0.0`
+ Эта документация обновлена для Клиента Мобильного Протокола Кошелька версии `v1.0.0`
- **Deep Link Handling**
+ **Обработка глубоких ссылок**
- Breaking change in v1.0.0: Universal Links and App Links requirements are
- removed in favor of custom schemes (e.g. `myapp://`).
+ Критическое изменение в v1.0.0: требования к Universal Links и App Links удалены в пользу
+ пользовательских схем (custom schemes), например `myapp://`.
-## Before You Start
+## Перед началом работы
-This guide walks you through adding support for Base Account into an existing React Native app or starter project.
+Это руководство проведет вас через процесс добавления поддержки Base Account в существующее приложение React Native или стартовый проект.
-If you prefer to skip ahead and start with a working example, navigate to the repository below:
+Если вы хотите сразу перейти к рабочему примеру, перейдите в репозиторий ниже:
-
+
-If you are looking to integrate Base Account into an existing React Native app or starter project, follow the instructions below.
+Если вы хотите интегрировать Base Account в существующее приложение React Native или стартовый проект, следуйте приведенным ниже инструкциям.
-## Step 1: Install Mobile Wallet Protocol Client
+## Шаг 1: Установите Клиент Мобильного Протокола Кошелька
-Add the latest version of [Mobile Wallet Protocol Client](https://mobilewalletprotocol.github.io/wallet-mobile-sdk/) to your project.
+Добавьте последнюю версию [Клиента Мобильного Протокола Кошелька](https://mobilewalletprotocol.github.io/wallet-mobile-sdk/) в ваш проект.
```zsh npm
@@ -45,12 +44,12 @@ yarn add @mobile-wallet-protocol/client@latest
```
-## Step 2: Add Polyfills
+## Шаг 2: Добавьте полифиллы
-### Install peer dependencies
+### Установите peer-зависимости
-The Mobile Wallet Protocol Client library requires the [Expo WebBrowser](https://docs.expo.dev/versions/latest/sdk/webbrowser/) and [Async Storage](https://react-native-async-storage.github.io/async-storage/docs/install) packages to be installed.
-Follow the instructions on the respective pages for any additional setup.
+Библиотеке Клиента Мобильного Протокола Кошелька требуются установленные пакеты [Expo WebBrowser](https://docs.expo.dev/versions/latest/sdk/webbrowser/) и [Async Storage](https://react-native-async-storage.github.io/async-storage/docs/install).
+Следуйте инструкциям на соответствующих страницах для любой дополнительной настройки.
```zsh npm
@@ -62,11 +61,11 @@ yarn add expo expo-web-browser @react-native-async-storage/async-storage
```
-### Polyfills
+### Полифиллы
-Mobile Wallet Protocol Client requires `crypto.randomUUID`, `crypto.getRandomValues`, and `URL` to be polyfilled globally since they are not available in the React Native environment.
+Клиенту Мобильного Протокола Кошелька требуются глобально доступные полифиллы для `crypto.randomUUID`, `crypto.getRandomValues` и `URL`, так как они недоступны в среде React Native.
-Below is an example of how to polyfill these functions in your app using the [expo-crypto](https://docs.expo.dev/versions/latest/sdk/crypto/) and [expo-standard-web-crypto](https://github.com/expo/expo/tree/master/packages/expo-standard-web-crypto/) packages.
+Ниже приведен пример, как добавить полифиллы для этих функций в ваше приложение с помощью пакетов [expo-crypto](https://docs.expo.dev/versions/latest/sdk/crypto/) и [expo-standard-web-crypto](https://github.com/expo/expo/tree/master/packages/expo-standard-web-crypto/).
```zsh npm
@@ -97,30 +96,30 @@ import { CoinbaseWalletSDK } from "@mobile-wallet-protocol/client";
```
-## Step 3: Usage
+## Шаг 3: Использование
-Mobile Wallet Protocol Client provides 2 interfaces for mobile app to interact with the Base Account, an EIP-1193 compliant provider interface and a wagmi connector.
+Клиент Мобильного Протокола Кошелька предоставляет 2 интерфейса для взаимодействия мобильного приложения с Base Account: интерфейс провайдера, совместимый со стандартом EIP-1193, и коннектор для wagmi.
- If your app is using wallet aggregator, go straight to [**Option 2: Wagmi
- Connector**](#option-2-wagmi-connector) for 1-line integration.
+ Если ваше приложение использует агрегатор кошельков, переходите сразу к
+ [**Варианту 2: Коннектор Wagmi**](#option-2-wagmi-connector) для интеграции в одну строку.
-### Option 1: EIP-1193 Provider
+### Вариант 1: Провайдер EIP-1193
- The `app` prefix in SDK config params is removed in v1.0.0.
+ Префикс `app` в параметрах конфигурации SDK удален в версии `v1.0.0`.
-Create a new `EIP1193Provider` instance, which is EIP-1193 compliant.
+Создайте новый экземпляр `EIP1193Provider`, который совместим со стандартом EIP-1193.
```tsx App.tsx
import { EIP1193Provider } from "@mobile-wallet-protocol/client";
-// Step 1. Initialize provider with your dapp's metadata and target wallet
+// Шаг 1. Инициализируйте провайдер с метаданными вашего dapp и целевым кошельком
const metadata = {
name: "My App Name",
- customScheme: "myapp://", // only custom scheme (e.g. `myapp://`) is supported in v1.0.0
+ customScheme: "myapp://", // в v1.0.0 поддерживаются только пользовательские схемы (например `myapp://`)
chainIds: [8453],
logoUrl: "https://example.com/logo.png",
};
@@ -131,7 +130,7 @@ const provider = new EIP1193Provider({
// ...
-// 2. Use the provider
+// 2. Используйте провайдер
const addresses = await provider.request({ method: "eth_requestAccounts" });
const signedData = await provider.request({
method: "personal_sign",
@@ -139,9 +138,9 @@ const signedData = await provider.request({
});
```
-### Option 2: Wagmi Connector
+### Вариант 2: Коннектор Wagmi
-Add the latest version of Mobile Wallet Protocol wagmi-connectors to your project.
+Добавьте последнюю версию коннекторов Mobile Wallet Protocol для wagmi в ваш проект.
```zsh npm
@@ -153,7 +152,7 @@ yarn add @mobile-wallet-protocol/wagmi-connectors@latest
```
-Simply import the `createConnectorFromWallet` function and pass in the wallet you want to use to wagmi config.
+Просто импортируйте функцию `createConnectorFromWallet` и передайте ей нужный кошелек в конфигурацию wagmi.
```ts config.ts
import {
@@ -163,7 +162,7 @@ import {
const metadata = {
name: "My App Name",
- customScheme: "myapp://", // only custom scheme (e.g. `myapp://`) is supported in v1.0.0
+ customScheme: "myapp://", // в v1.0.0 поддерживаются только пользовательские схемы (например `myapp://`)
chainIds: [8453],
logoUrl: "https://example.com/logo.png",
};
@@ -182,7 +181,7 @@ export const config = createConfig({
});
```
-Then you can use wagmi's react interface to interact with the Base Account.
+Затем вы можете использовать React-интерфейс wagmi для взаимодействия с Base Account.
```tsx App.tsx
import { useConnect } from "wagmi";
@@ -201,7 +200,7 @@ return (
);
```
-## Give feedback!
+## Поделитесь отзывом!
-Send us feedback on the [Base Discord](https://discord.com/invite/buildonbase/) or create a new issue on the [MobileWalletProtocol/react-native-client](https://github.com/MobileWalletProtocol/react-native-client/issues) repository.
+Отправьте нам отзыв в [дискорд Base](https://discord.com/invite/buildonbase/) или создайте новую проблему (issue) в репозитории [MobileWalletProtocol/react-native-client](https://github.com/MobileWalletProtocol/react-native-client/issues).
diff --git a/docs/base-account/quickstart/web-react.mdx b/docs/base-account/quickstart/web-react.mdx
index 4e90f4a5..3b3456dc 100644
--- a/docs/base-account/quickstart/web-react.mdx
+++ b/docs/base-account/quickstart/web-react.mdx
@@ -1,15 +1,15 @@
---
title: "Web (Next.js)"
-description: "Quickly add Sign in with Base and Base Pay to any Next.js app"
+description: "Быстро добавьте Sign in with Base и Base Pay в любое приложение Next.js"
---
import { GithubRepoCard } from "/snippets/GithubRepoCard.mdx"
-This quick-start shows the **minimum** code required to add Sign in with Base (SIWB) and Base Pay to any Next.js app using the Base Account SDK.
+Этот быстрый старт показывает минимальный код, необходимый для добавления Sign in with Base (SIWB) и Base Pay в любое приложение Next.js с использованием Base Account SDK.
-## 1. Create a new Next.js app
+## 1. Создайте новое приложение Next.js
-If you're starting fresh, create a new Next.js app:
+Если вы начинаете с нуля, создайте новое приложение Next.js:
```bash npm
@@ -33,9 +33,9 @@ cd base-account-quickstart
```
-When prompted during setup, you can choose the default options or customize as needed. For this quickstart, the default settings work perfectly.
+При настройке вы можете выбрать стандартные параметры или изменить их по необходимости. Для этого быстрого старта стандартные настройки подходят идеально.
-## 2. Install the SDK
+## 2. Установите SDK
```bash npm
@@ -56,14 +56,14 @@ bun add @base-org/account @base-org/account-ui
-**Got a peer dependency error?**
+**Получили ошибку о peer dependency?**
-Use `--legacy-peer-deps` flag if you get a peer dependency error.
+Используйте флаг `--legacy-peer-deps`, если получили ошибку о peer dependency.
-## 3. Create the main component
+## 3. Создайте основной компонент
-Replace the contents of `app/page.tsx` (or `app/page.js` if not using TypeScript) with this component:
+Замените содержимое `app/page.tsx` (или `app/page.js`, если не используете TypeScript) этим компонентом:
```jsx title="app/page.tsx" lineNumbers
'use client';
@@ -78,7 +78,7 @@ export default function Home() {
const [paymentId, setPaymentId] = useState('');
const [theme, setTheme] = useState('light');
- // Initialize SDK
+ // Инициализируем SDK
const sdk = createBaseAccountSDK(
{
appName: 'Base Account Quick-start',
@@ -86,7 +86,7 @@ export default function Home() {
}
);
- // Optional sign-in step – not required for `pay()`, but useful to get the user address
+ // Опциональный шаг входа – не требуется для `pay()`, но полезен для получения адреса пользователя
const handleSignIn = async () => {
try {
await sdk.getProvider().request({ method: 'wallet_connect' });
@@ -96,13 +96,13 @@ export default function Home() {
}
};
- // One-tap USDC payment using the pay() function
+ // Платеж USDC в одно нажатие с использованием функции `pay()`
const handlePayment = async () => {
try {
const { id } = await pay({
- amount: '0.01', // USD – SDK quotes equivalent USDC
- to: '0xRecipientAddress', // Replace with your recipient address
- testnet: true // set to false or omit for Mainnet
+ amount: '0.01', // USD – SDK конвертирует в эквивалент USDC
+ to: '0xRecipientAddress', // Замените на адрес получателя
+ testnet: true // установите false или опустите для Mainnet
});
setPaymentId(id);
@@ -113,7 +113,7 @@ export default function Home() {
}
};
- // Check payment status using stored payment ID
+ // Проверка статуса платежа с использованием сохраненного ID платежа
const handleCheckStatus = async () => {
if (!paymentId) {
setPaymentStatus('No payment ID found. Please make a payment first.');
@@ -205,37 +205,37 @@ export default function Home() {
```
-**Note:**
+**Примечание:**
-Make sure to replace `0xRecipientAddress` with your recipient address.
+Убедитесь, что заменили `0xRecipientAddress` на адрес вашего получателя.
-**Base Pay and SIWB are independent**
+**Base Pay и SIWB работают независимо**
-You DO NOT need to use SIWB to use Base Pay. You can just call the `pay()` function without any additional setup.
+Вам НЕ нужно использовать Sign in with Base (SIWB) для работы с Base Pay. Вы можете просто вызвать функцию `pay()` без какой-либо дополнительной настройки.
-## 4. Start your app
+## 4. Запустите ваше приложение
```bash
npm run dev
```
-Open http://localhost:3000, click **Sign in with Base** (optional) and then **Pay**, approve the transaction, and you've sent 5 USDC on Base Sepolia—done! 🎉
+Откройте http://localhost:3000, нажмите **Sign in with Base** (опционально) а затем **Pay**, подтвердите транзакцию, и вы отправили 5 USDC в сети Base Sepolia — готово! 🎉
-**Note:** If you have an existing Next.js app, just install the SDK (`npm install @base-org/account @base-org/account-ui`) and add the component above to your project. For other React frameworks, you can adapt this component as needed.
+**Примечание:** Если у вас уже есть приложение на Next.js, просто установите SDK (`npm install @base-org/account @base-org/account-ui`) и добавьте приведенный выше компонент в ваш проект. Для других React-фреймворков вы можете адаптировать этот компонент по необходимости.
-## Next steps
+## Следующие шаги
-* **[Authenticate Users](/base-account/guides/authenticate-users)** - strong authentication by setting up Sign in with Base with backend verification
-* **[Accept Payments](/base-account/guides/accept-payments)** explore all the features of Base Pay
-* **[Sign in with Base Button](/base-account/reference/ui-elements/sign-in-with-base-button)** – use the Sign in with Base Button component to quickly add authentication to your app
-* **[Base Pay Button](/base-account/reference/ui-elements/base-pay-button)** – use the Base Pay Button component to quickly add payments to your app
+* **[Аутентификация пользователей](/base-account/guides/authenticate-users)** - настройка надежной аутентификации с помощью Sign in with Base и проверкой на стороне сервера
+* **[Прием платежей](/base-account/guides/accept-payments)** изучите все возможности Base Pay
+* **[Кнопка Sign in with Base](/base-account/reference/ui-elements/sign-in-with-base-button)** – используйте компонент кнопки для быстрого добавления аутентификации в ваше приложение
+* **[Кнопка Base Pay](/base-account/reference/ui-elements/base-pay-button)** – используйте компонент кнопки для быстрого добавления платежей в ваше приложение
-**Please Follow the Brand Guidelines**
+**Пожалуйста, следуйте руководству по бренду**
-If you intend on using the `SignInWithBaseButton` or `BasePayButton`, please follow the [Brand Guidelines](/base-account/reference/ui-elements/brand-guidelines) to ensure consistency across your application.
+Если вы планируете использовать SignInWithBaseButton или BasePayButton, пожалуйста, следуйте [руководству по бренду](/base-account/reference/ui-elements/brand-guidelines) чтобы обеспечить единообразие в вашем приложении.
-
\ No newline at end of file
+
diff --git a/docs/base-account/quickstart/web.mdx b/docs/base-account/quickstart/web.mdx
index f41b8037..379b1649 100644
--- a/docs/base-account/quickstart/web.mdx
+++ b/docs/base-account/quickstart/web.mdx
@@ -1,30 +1,30 @@
---
title: "Web (HTML + JS)"
-description: "Integrate Sign in with Base and Base Pay using nothing but HTML and JavaScript."
+description: "Интегрируйте Sign in with Base и Base Pay, используя только HTML и JavaScript."
---
-This quick-start shows the **minimum** code required to add Sign in with Base and Base Pay to any web page using nothing but the Base Account SDK. No frameworks, no additional libraries.
+Этот быстрый старт показывает **минимальный** код, необходимый для добавления Sign in with Base и Base Pay на любую веб-страницу, используя только Base Account SDK. Никаких фреймворков, никаких дополнительных библиотек.
-## 1. Install the SDK (Optional)
+## 1. Установите SDK (Опционально)
-**Interactive Playground:** Want to test the SDK functions before integrating? Try our [Base Pay SDK Playground](https://base.github.io/account-sdk/pay-playground) to experiment with `pay()` and `getPaymentStatus()` functions.
+**Интерактивная площадка:** Хотите протестировать функции SDK перед интеграцией? Попробуйте нашу [Base Pay SDK Playground](https://base.github.io/account-sdk/pay-playground) чтобы поэкспериментировать с функциями `pay()` и `getPaymentStatus()`.
-You can use the Base Account SDK in two ways:
+Вы можете использовать Base Account SDK двумя способами:
-### Option A: CDN (No installation required)
-Just include the script tag in your HTML - no build tools needed!
+### Вариант A: CDN (Установка не требуется)
+Просто включите тег script в ваш HTML - никаких инструментов сборки не нужно!
```html index.html
-[...rest of your code]
+[...остальная часть вашего кода]
-[...rest of your code]
+[...остальная часть вашего кода]
```
-For a full example, see [example](#2-copy-paste-this-html-file) below.
+Полный [пример смотрите ниже] (#2-copy-paste-this-html-file).
-### Option B: NPM Package
-If you prefer to install locally:
+### Вариант B: NPM Пакет
+Если предпочитаете установить локально:
```bash npm
@@ -44,17 +44,17 @@ bun add @base-org/account
```
-Then use ES modules:
+Затем используйте ES модули:
```html
```
-This guide uses the CDN approach for simplicity.
+Это руководство использует подход CDN для простоты.
-## 2. Copy-paste this HTML file
+## 2. Скопируйте этот HTML файл
```html title="index.html" lineNumbers
@@ -71,11 +71,11 @@ This guide uses the CDN approach for simplicity.
-
+