Three example/doc gaps found testing Base Account SDK v2.5.7 (dataCallback shape, prolink missing 'from', send_calls gas note)

Abierto
#1,730 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
javascript, typescript

Línea de trabajo

Empieza por las tres páginas referenciadas: base-account/reference/core/capabilities/datacallback, base-account/reference/prolink-utilities/decodeProlink y agents/guides/batch-calls. Compara sus ejemplos con los cuerpos de solicitud documentados y el comportamiento real reportado; después, actualiza la guía de callback y prolink y documenta la salvedad de gas de send_calls. Se considera terminado cuando los tres ejemplos y las notas coincidan con el comportamiento reproducido.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Found while building an agent (Kokosh) that exercises Base Account SDK v2.5.7 and Base MCP end-to-end on mainnet. Three separate example/documentation gaps, all reproduced live and cross-checked against the currently live base/docs content (not just a cached copy) before filing.

1. base-account/reference/core/capabilities/datacallback — callback payload shape doesn't match the live request body

The reference page's example (and the "Example Implementation" callback handler) reads:

const { requestedInfo } = requestData.capabilities.dataCallback;

The actual POST body Base sends to the callbackURL has requestedInfo as a top-level field, sibling to calls/capabilities/chainId — there is no requestData.capabilities.dataCallback.requestedInfo nesting.

Diagnosed by logging the raw request body in production after every live attempt using the documented shape returned 400 (Coinbase's own backend, api.wallet.coinbase.com/rpc/v3/scw/submitDataCallbackUpdate, rejected the echoed response built from the wrong shape). Once the handler was changed to read requestData.requestedInfo directly, a real $0.05 USDC Base Pay payment with payerInfo settled correctly in production.

2. base-account/reference/prolink-utilities/decodeProlink — "Validate Before Execution" example is missing from

The example executes the decoded request directly:

const result = await provider.request({
  method: decoded.method,
  params: decoded.params
});

For a wallet_sendCalls prolink that was encoded as a payment request (the common case — the encoder doesn't know who will open the link, so it has no from), this throws "The requested account and/or method has not been authorized by the user." The example needs an extra line connecting first and injecting the connected address into params[0].from before executing, e.g.:

const { accounts } = await provider.request({ method: 'wallet_connect', params: [{ version: '1' }] });
const sendParams = [{ ...decoded.params[0], from: accounts[0].address }];
const result = await provider.request({ method: decoded.method, params: sendParams });

Reproduced live: the unmodified example throws the unauthorized error on mainnet against a real payment-request prolink; adding the from injection fixes it and the transaction settles.

3. agents/guides/batch-calls — no mention that send_calls may need native gas, unlike other Base MCP/Base Account flows

Nothing on this page (or elsewhere I could find under agents/) notes that send_calls transactions may require the Base Account to hold native ETH for gas. This is easy to miss because other flows against the same Base Account — Base Pay's pay(), and a wallet_sendCalls executed directly via a first-party SDK popup — settle gaslessly (sponsored), while a send_calls submitted through Base MCP against a zero-ETH smart account failed with an insufficient-funds error until the account was funded with a small amount of ETH.

Worth a short caveat on this page (or wherever gas sponsorship for Base MCP write tools is centrally documented) noting that gas sponsorship is not guaranteed for every path that can produce a wallet_sendCalls-shaped transaction, so agents/users may need to fund the Base Account with native gas before using send_calls even if other flows against the same account have been gasless.


All three were hit while building https://github.com/Kajko25/kokosh (JOURNAL.md has the full reproduction detail with tx hashes) and while updating base/skills#148.

Lenguaje dominante
JavaScript
Estrellas
337
Forks
798
Merge medio
7 h 24 min
PR fusionados (30 d)
51

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de base/docs

Todos los issues de base/docs

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.