Skip to content

feat: add MACH funding entrypoints across wallet transports - #859

Merged
gakonst merged 2 commits into
mainfrom
codex/mach-funding-20261005
Oct 6, 2026
Merged

gakonst merged 2 commits into
mainfrom
codex/mach-funding-20261005

Conversation

@gakonst

@gakonst gakonst commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Add one MACH funding entry point for apps, mobile adapters, and CLI callers. Mach.fund(provider, hints) opens wallet_deposit with the mainnet MACH token. Mach.getFundingUrl({ address, amount }) produces a recipient-bound wallet link for callers that cannot mount the wallet UI. Both validate recipient, chain, and amount before handing off.

Post-connect and access-key deposit hints now carry intent: 'mach'. Documentation covers direct requests and transport-independent links. Legacy offchain MPP Credits remain a separate balance; opening checkout does not prove funds arrived.

Validation: 619 pure tests pass, including 23 MACH/intent tests; TypeScript/type tests, package and documentation builds pass. Lint/format checks pass with two pre-existing unrelated warnings. CI runtime/localnet, package builds, hosted documentation preview and both playgrounds pass.

CI Verify / Checks remains blocked by the pre-existing braces@3.0.3 audit finding GHSA-vfj7-8cjw-p6xm. Package manifests and the lockfile are unchanged in this PR, and the vulnerable version is present in its base commit. As checked on October 5, the upstream advisory lists no patched version; braces@3.0.4 is not published. The audit policy remains enabled.

Requires the companion wallet checkout implementation and MACH service binding before advertising the SDK helper. Related TypeScript CLI: tempoxyz/wallet-cli#166.

Companion hosted MACH checkout and CLI key permissions: https://github.com/tempoxyz/wallet/pull/789.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
accounts-site Ready Ready Preview Oct 6, 2026 12:35am UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/tempoxyz/accounts@859

commit: cc3db2c

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor
Worker Preview
Playground https://d0b9e046-accounts-playground.porto.workers.dev

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor
Worker Preview
Wagmi https://57daeb24-accounts-wagmi.porto.workers.dev

## Summary

Add optional `destinationToken` to the `wallet_deposit` request schema.
Preserve the existing `token` source hint and requests that omit the new
parameter. Document runtime wallet-support discovery and include a minor
changeset.

This companion is stacked on [accounts
#859](#859), the SDK branch
already pinned by Tempo Wallet. Its diff contains only the destination
parameter, its schema/type coverage, and destination-aware dismissal
cases; it does not change MACH or other funding behavior.

## Validation

- 25 request-schema tests pass, including preservation of both source
and destination hints and existing omitted-parameter coverage.
- Four transport dismissal tests pass for omitted and OUSD destinations,
including a wallet that ignores cancellation. These in-process cases ran
with a temporary configuration without localnet setup; other localnet
cases were not run.
- SDK TypeScript project checks pass (`pnpm exec tsc -b --noEmit`).

Prompted by: @danrobinson

Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com>
@gakonst
gakonst merged commit 56efdd1 into main Oct 6, 2026
11 of 12 checks passed
@gakonst
gakonst deleted the codex/mach-funding-20261005 branch October 6, 2026 00:29
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor
Worker Preview
Wagmi https://1314fc68-accounts-wagmi.porto.workers.dev

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor
Worker Preview
Playground https://d9c9d2b9-accounts-playground.porto.workers.dev

gakonst added a commit to tempoxyz/wallet-cli that referenced this pull request Oct 6, 2026
Make MACH the default funding path and replace Coinflow credit payments
with canonical onchain MACH settlement. `tempo wallet fund --amount 5
--no-browser --no-wait` returns a recipient-bound checkout link for
remote agents. Normal funding opens the same link and waits, with a
deadline and cancellation, for the requested MACH balance increase.

`whoami --mach` reads the six-decimal token balance. `request --mach
--max-spend ...` and challenge-based `transfer --mach` use mppx with
strict caps, challenge validation, and no stablecoin fallback when MACH
is explicitly selected. Paid requests and uncertain settlements are not
retried. Dry runs inspect the quote without signing or requiring a
budget. Deprecated `--credits` spellings warn and select MACH; old
offchain credits are neither redeemed nor converted.

Validation: all 59 focused tests pass, including the real SDK with
mocked RPC/signing. The full suite, source/test TypeScript, code checks,
and package build pass. CI Tests, Types, Code and Check passed at
cab7495; the follow-up commit adds the required release note. Local
full-suite testing used one worker and a 60-second timeout because
unchanged-base CLI startup took 10.39 seconds on the loaded Mac (this
branch took 9.85 seconds). No real signing or payments were performed.

Checkout links require the companion wallet web deployment. Hosted
checkout currently supports mainnet, $5-$100 with cent precision.
Balance queries also recognize the testnet token deployment. Balance
polling observes funding; it does not prove a particular card charge.

Related SDK: tempoxyz/accounts#859. Web wallet
and Rust CLI use the same funding-link contract.

Companion hosted MACH checkout and CLI key permissions:
tempoxyz/wallet#789.

This branch was successfully deployed

1 active deployment
Preview — 0c70bc46 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants