You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface relayer sponsorship signal end-to-end (additive, non-breaking) (#1007)
* feat(relayer): propagate sponsored signal and mark swallowed errors
`RpcRelayer.feeOptions` now forwards the server's `sponsored: boolean` to
callers, and both `feeOptions` and `feeTokens` mark their swallowed-error
returns with `failed: true`. The `Relayer` interface and all bundled
implementations (Rpc, Sequence, Local, EIP6963, Pk) are widened to match.
Additive change: existing consumers ignoring the new fields are unaffected.
Downstream sponsorship classifiers should switch from `!feeOption` inference
to `sponsored === true` so a real subsidy is no longer indistinguishable
from a swallowed `/FeeOptions` error.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(wallet-wdk): carry sponsored/failed on StandardRelayerOption
`StandardRelayerOption` gains optional `sponsored` and `failed` fields,
populated on both construction branches in `transactions.ts` from the
relayer SDK's new `feeOptions` return. `isStandardRelayerOption` /
`isERC4337RelayerOption` are re-exported so consumers can narrow before
reading the new fields.
UI consumers that classified sponsorship by "no fee option attached"
should switch to `sponsored === true` to distinguish a real subsidy from
a swallowed `/FeeOptions` error.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(dapp-client): add isSponsored for explicit sponsorship checks
`DappClient.isSponsored(chainId, transactions)` and
`ChainSessionManager.isSponsored(calls)` return true only when the
relayer's `/FeeOptions` endpoint explicitly reports sponsorship; any
error, network failure, or absence of sponsorship returns false. A true
result is always safe to surface as "free gas" in UI.
Prefer this over inferring sponsorship from an empty `getFeeOptions`
array — a swallowed `/FeeOptions` error produces the same empty shape as
a real subsidy. `getFeeOptions` is unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments