# Sending transactions

You can request a user to sign and send a transaction on behalf of the connected account.&#x20;

For that, you'll need to obtain an instance of the wallet object, construct the transaction you want to send and call the `sendTransaction` function on it.

{% tabs %}
{% tab title="TypeScript" %}

```javascript
const accounts = await fuel.accounts();
const account = accounts[0];

const transactionRequest = new ScriptTransactionRequest({
  gasLimit: 50_000,
  gasPrice: 1,
});

const toAddress = Address.fromString(toAccount);
const amount = bn.parseUnits("0.1");
transactionRequest.addCoinOutput(toAddress, amount);

const wallet = await fuel.getWallet(account);
const resources = await wallet.getResourcesToSpend([[amount, NativeAssetId]]);

transactionRequest.addResources(resources);
const response = await wallet.sendTransaction(transactionRequest);

// wait for transaction to be completed
await response.wait();
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fuelet.app/wallet-api/sending-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
