Pay SUI gas with currencies_

Pay gas with currencies. Your users never need to hold SUI. Drop-in SDK and API.

Mainnet not yet available — testnet only.
terminal
$pnpm add @stablestation/sponsor

See the full example below.

Supported currencies

How it works

Two calls. No SUI in the user wallet required.

01

prepare()

The SDK fetches config, builds currency payment into your transaction, estimates gas, and returns bytes ready for signing.

02

Sign + execute()

The user's wallet signs the prepared bytes. Then execute() sends them to the API, which validates, co-signs, and submits on-chain.

03

Done

You get back a digest and execution status. The user never needed SUI — payment happened in the selected currency.

app.ts
1import { SuiGrpcClient } from "@mysten/sui/grpc";
2import { Transaction } from "@mysten/sui/transactions";
3import { stableStation } from "@stablestation/sponsor";
4
5const client = new SuiGrpcClient({ network: "testnet" })
6 .$extend(stableStation({
7 apiUrl: "https://stablestation.mystenlabs.com/api/v1",
8 headers: { Authorization: `Bearer ${process.env.STABLESTATION_API_TOKEN}` },
9 }));
10
11// Build your transaction as usual
12const tx = new Transaction();
13tx.moveCall({ target: "0x...::module::function" });
14
15// 1) Prepare sponsored bytes
16const prepared = await client.stableStation.prepare({
17 transaction: tx,
18 sender: myAddress,
19 currency: "USDC",
20});
21
22// 2) User signs prepared bytes
23const { signature } = await wallet.signTransaction(prepared.txBytes);
24
25// 3) API co-signs + executes
26const result = await client.stableStation.execute(prepared, signature);
27console.log(result.digest, result.succeeded, result.error);