# CCIP v1.6.0 Aptos Router API Reference
Source: https://docs.chain.link/ccip/api-reference/aptos/v1.6.0/router

> For the complete documentation index, see [llms.txt](/llms.txt).

## Router

Below is a complete API reference for the primary user-facing functions in the Aptos CCIP `router` module. Unlike SVM-based chains, Aptos does not require a complex list of accounts to be passed in a `Context`. Instead, all necessary information is passed directly as arguments to the entry functions.

### `ccip_send`

This entry function is located in the `ccip_router::router` module and serves as the primary entry point for sending a cross-chain message. After performing initial checks, such as validating the destination chain and its supported OnRamp version, it forwards the call to the underlying `ccip_send` function in the appropriate `ccip_onramp::onramp` module to process the request.

```rust
// As defined in ccip_router::router
public entry fun ccip_send(
    caller: &signer,
    dest_chain_selector: u64,
    receiver: vector<u8>,
    data: vector<u8>,
    token_addresses: vector<address>,
    token_amounts: vector<u64>,
    token_store_addresses: vector<address>,
    fee_token: address,
    fee_token_store: address,
    extra_args: vector<u8>
)
```

#### Parameters

| Name | Type | Description                                                                                                                                                                                                                |
| ---- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|      |      | The account signing the transaction and initiating the CCIP message. This account pays for the transaction fees and provides the tokens.                                                                                   |
|      |      | The unique CCIP blockchain identifier of the destination blockchain.                                                                                                                                                       |
|      |      | The destination address in its native byte format. For details, see the [Building Aptos to EVM Messages guide](/ccip/tutorials/aptos/source/build-messages#receiver).                                                      |
|      |      | The arbitrary data payload to be processed by the receiver on the destination chain.                                                                                                                                       |
|      |      | A vector of Aptos token type addresses to transfer. This should be an empty vector if no tokens are being sent.                                                                                                            |
|      |      | A vector of amounts for each corresponding token in `token_addresses`, specified in the token's smallest denomination.                                                                                                     |
|      |      | A vector of Fungible Asset store addresses from which tokens are withdrawn. Use `0x0` to default to the primary store of the `caller`'s account for each corresponding token.                                              |
|      |      | The type address of the token used to pay CCIP fees. Use `0xa` if paying with native APT.                                                                                                                                  |
|      |      | The Fungible Asset store address for the fee token. Use `0x0` to default to the primary store.                                                                                                                             |
|      |      | A serialized byte vector containing additional arguments for the destination chain, such as gas limits. See the [Aptos Messages API Reference](/ccip/api-reference/aptos/v1.6.0/messages#extra-args) for encoding details. |

### `get_fee`

This `#[view]` function is located in the `ccip_router::router` module. It allows you to preview the fee for a CCIP message before sending it. After validating the destination chain, it forwards the call to the corresponding `get_fee` function in the `ccip_onramp::onramp` module to get an accurate quote. This is essential for determining the fee amount to provide in your `ccip_send` call.

```rust
// As defined in ccip_router::router
#[view]
public fun get_fee(
    dest_chain_selector: u64,
    receiver: vector<u8>,
    data: vector<u8>,
    token_addresses: vector<address>,
    token_amounts: vector<u64>,
    token_store_addresses: vector<address>,
    fee_token: address,
    fee_token_store: address,
    extra_args: vector<u8>
): u64
```

#### Parameters

The parameters for `get_fee` are identical to those of `ccip_send`, excluding the `caller` signer. You should pass the exact same arguments that you intend to use for your `ccip_send` call to get an accurate fee quote.

#### Returns

| Name | Type | Description                                                                   |
| ---- | ---- | ----------------------------------------------------------------------------- |
|      |      | The calculated fee in the smallest denomination of the specified `fee_token`. |