> For the complete documentation index, see [llms.txt](https://docs.anchorprotocol.com/anchor-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anchorprotocol.com/anchor-2/xanchor/xanchor-terra-side-contracts/xanchor-wormhole-bridge.md).

# xAnchor Wormhole Bridge

Parses Wormhole messages from foreign chains, and any associated token transfer, if the action requires one. Receives outgoing messages and token transfers from xAnchor Core and forwards them back over the Wormhole Bridge.

### Config

| Key                          | Type     | Description                                           |
| ---------------------------- | -------- | ----------------------------------------------------- |
| `owner`                      | `String` | Address of contract owner                             |
| `wormhole_core_bridge_addr`  | `String` | Address of the Wormhole Core Bridge on Terra Mainnet  |
| `wormhole_token_bridge_addr` | `String` | Address of the Wormhole Token Bridge on Terra Mainnet |
| `xanchor_core_addr`          | `String` | Address of the xAnchor Core contract                  |
| `aust_cw20_addr`             | `String` | Address of the aUST token                             |

### InstantiateMsg

```rust
pub struct InstantiateMsg {
    pub owner: String,
    pub wormhole_core_bridge_addr: String,
    pub wormhole_token_bridge_addr: String,
    pub xanchor_core_addr: String,
    pub aust_cw20_addr: String,
}
```

### ExecuteMsg

```rust
pub enum ExecuteMsg {
    ProcessAnchorMessage {
        instruction_vaa: Binary,
        option_token_transfer_vaa: Option<Binary>,
    },
    SendAsset {
        asset: Asset,
    },

    /// Admin
    RegisterWormholeChainInfo {
        // Wormhole chain id.
        chain_id: u16,
        // address of contract on remote chain
        address: Vec<u8>,
    },
}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.anchorprotocol.com/anchor-2/xanchor/xanchor-terra-side-contracts/xanchor-wormhole-bridge.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
