> For the complete documentation index, see [llms.txt](https://andrewkimjoseph.gitbook.io/celina-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andrewkimjoseph.gitbook.io/celina-sdk/services/transactionservice.md).

# TransactionService

[**@andrewkimjoseph/celina-sdk**](/celina-sdk/api-reference/api-reference.md)

***

[@andrewkimjoseph/celina-sdk](/celina-sdk/api-reference/api-reference.md) / [services/transaction.service](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/api-reference/services/transaction.service/README.md) / TransactionService

## Class: TransactionService

Defined in: [src/services/transaction.service.ts:44](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L44)

Token sends, gas fee reads, and `prepareSend` flows with CELINA calldata tags.

### Constructors

#### Constructor

> **new TransactionService**(`clientFactory`): `TransactionService`

Defined in: [src/services/transaction.service.ts:47](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L47)

**Parameters**

**clientFactory**

`CeloClientFactory`

**Returns**

`TransactionService`

### Methods

#### estimateSend()

> **estimateSend**(`from`, `to`, `token`, `amount`): `Promise`<[`SendEstimateResult`](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/api-reference/services/transaction.service/type-aliases/SendEstimateResult.md)>

Defined in: [src/services/transaction.service.ts:59](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L59)

Simulate gas for a CELO or ERC-20 transfer from `from`.

**Parameters**

**from**

`` `0x${string}` ``

Sender wallet address

**to**

`` `0x${string}` ``

Recipient address

**token**

`string`

Symbol (e.g. `CELO`, `USDm`) or contract address

**amount**

`string`

Human-readable amount (e.g. `"10"`)

**Returns**

`Promise`<[`SendEstimateResult`](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/api-reference/services/transaction.service/type-aliases/SendEstimateResult.md)>

Gas estimate in units as a decimal string, or a structured insufficient-balance result when simulation reverts.

***

#### estimateTransaction()

> **estimateTransaction**(`params`): `Promise`<{ `estimatedCost`: `string`; `estimatedCostFormatted`: `string`; `from`: `` `0x${string}` ``; `gasLimit`: `string`; `gasPrice`: `string`; `isEip1559`: `boolean`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `network`: `"mainnet"`; `to`: `` `0x${string}` ``; }>

Defined in: [src/services/transaction.service.ts:217](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L217)

Generic transaction gas estimate (not token-transfer specific).

**Parameters**

**params**

**data?**

`` `0x${string}` ``

**from**

`` `0x${string}` ``

**to**

`` `0x${string}` ``

**value?**

`string`

**Returns**

`Promise`<{ `estimatedCost`: `string`; `estimatedCostFormatted`: `string`; `from`: `` `0x${string}` ``; `gasLimit`: `string`; `gasPrice`: `string`; `isEip1559`: `boolean`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `network`: `"mainnet"`; `to`: `` `0x${string}` ``; }>

***

#### getGasFeeData()

> **getGasFeeData**(): `Promise`<{ `baseFeePerGas`: `string`; `eip1559`: `boolean`; `gasPrice`: `string`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `network`: `"mainnet"`; }>

Defined in: [src/services/transaction.service.ts:183](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L183)

Current gas fee data including EIP-1559 fees when supported.

**Returns**

`Promise`<{ `baseFeePerGas`: `string`; `eip1559`: `boolean`; `gasPrice`: `string`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `network`: `"mainnet"`; }>

***

#### prepareSend()

> **prepareSend**(`from`, `to`, `token`, `amount`): `Promise`<[`SerializedPreparedFlow`](/celina-sdk/types/serializedpreparedflow.md)>

Defined in: [src/services/transaction.service.ts:121](https://github.com/andrewkimjoseph/celina-sdk/blob/970ab720c805303ead8b20406c6579ecdcf2193a/src/services/transaction.service.ts#L121)

Build an unsigned send flow (native CELO or ERC-20 transfer).

**Parameters**

**from**

`` `0x${string}` ``

Sender wallet address (must match connected wallet when signing)

**to**

`` `0x${string}` ``

Recipient address

**token**

`string`

Symbol or contract address

**amount**

`string`

Human-readable amount

**Returns**

`Promise`<[`SerializedPreparedFlow`](/celina-sdk/types/serializedpreparedflow.md)>

Single-step `SerializedPreparedFlow` for wagmi `sendTransactionAsync`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://andrewkimjoseph.gitbook.io/celina-sdk/services/transactionservice.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.
