Buy with native ETH.
A quote and a wallet signature. Nothing else to configure.
A buy sends native ETH to the Floor1 bonding market and receives the selected token. Native buys do not need an ERC-20 approval.
Buy in one call
const { hash, quote } = await floor1.buy({
token,
amount: parseEther('0.01'),
slippageBps: 100,
});Provide a connected viem wallet when creating the client, or pass { wallet } as the second argument. A fresh quote is requested immediately before transaction construction. The SDK sends exactly the specified amount as transaction value.
Prepare without sending
import { prepareBuy } from '@floor1/sdk';
const quote = await floor1.quote({
token, side: 'buy', amount: parseEther('0.01'),
});
const tx = prepareBuy(quote);
const hash = await wallet.sendTransaction({
account,
chain: wallet.chain,
to: tx.to,
data: tx.data,
value: tx.value,
});The builder returns { chainId, to, data, value }. chainId is 91342, to is the configured bonding market, and data encodes buyWithEth(token, minimumOut). The SDK constructs calldata from the quote fields; it does not accept a transaction supplied by the quote server.
Confirm settlement
Use your existing receipt client to wait for confirmation and check receipt.status is success. Account for native ETH spent on gas. A submitted transaction may be replaced, dropped, or reverted; a hash alone is not a completed trade.