# Lunarlander

Use these routes when you want HelloMoon Lunar Lander. Send the same request body described in HelloMoon's docs.

Reference:

* <https://docs.hellomoon.io/reference/lunar-lander>
* <https://docs.hellomoon.io/reference/send-bundle-api>
* <https://docs.hellomoon.io/reference/batch-send-api>

## Tip Addresses

Current LunarLander tip addresses recognized by this Bifrost deployment:

* `moon17L6BgxXRX5uHKudAmqVF96xia9h8ygcmG2sL3F`
* `moon26Sek222Md7ZydcAGxoKG832DK36CkLrS3PQY4c`
* `moon7fwyajcVstMoBnVy7UBcTx87SBtNoGGAaH2Cb8V`
* `moonBtH9HvLHjLqi9ivyrMVKgFUsSfrz9BwQ9khhn1u`
* `moonCJg8476LNFLptX1qrK8PdRsA1HD1R6XWyu9MB93`
* `moonF2sz7qwAtdETnrgxNbjonnhGGjd6r4W4UC9284s`
* `moonKfftMiGSak3cezvhEqvkPSzwrmQxQHXuspC96yj`
* `moonQBUKBpkifLcTd78bfxxt4PYLwmJ5admLW6cBBs8`
* `moonXwpKwoVkMegt5Bc776cSW793X1irL5hHV1vJ3JA`
* `moonZ6u9E2fgk6eWd82621eLPHt9zuJuYECXAYjMY1C`

Dedicated LunarLander tip addresses (Bifrost-managed):

* `tr7c9YdFm5pTx8xVp8XMRPrAFGSND7xmumTqPPJchHe`
* `trHMAN5tkHbzyvFobwjCx1G2tcKTo1ymVhog1ZVBqYD`
* `trWZmScJ2813eMwQLDpc96yf15mtFyXsafpP9NAfjdQ`
* `trdMqFh3cPLdweYmD9tLp8NeMZ6EJUhiDHr8XrqmuJN`
* `trzB8VqS6U3pG7CLjCoLTRvLw3i2ZEsjfAyhZmM3B27`

If you specifically want the Bifrost-managed dedicated LunarLander tip addresses, use one of the `tr...` addresses above.

## Send Transaction

Use `POST /lunarlander` for a single transaction.

Request Body

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendTransaction",
  "params": [
    "<base64-transaction>",
    {
      "encoding": "base64"
    }
  ]
}
```

| Field                | Type   | Required | Description                       |
| -------------------- | ------ | -------- | --------------------------------- |
| `params[0]`          | string | Yes      | Base64-encoded signed transaction |
| `params[1].encoding` | string | No       | `base64` (default)                |

Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "<transaction-signature>"
}
```

## Bundle Submission

Use `POST /lunar-submit-bundle` for a bundle of up to 4 transactions.

Request Body

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendBundle",
  "params": [
    [
      "<base64-transaction-1>",
      "<base64-transaction-2>"
    ],
    {
      "encoding": "base64"
    }
  ]
}
```

| Field                | Type      | Required | Description                         |
| -------------------- | --------- | -------- | ----------------------------------- |
| `params[0]`          | string\[] | Yes      | Base64-encoded transactions (max 4) |
| `params[1].encoding` | string    | No       | `base64` (default)                  |

Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "<bundle-id>"
}
```

## Batch Submission

Use `POST /lunar-submit-batch` for LunarLander's binary batch API.

Headers

| Header         | Value                      |
| -------------- | -------------------------- |
| `Content-Type` | `application/octet-stream` |

If your Bifrost deployment already has HelloMoon credentials configured, you usually do not need to send auth yourself.

Request Body (Binary)

Wire format uses repeating `[u16_be_length][raw_tx_bytes]` segments:

```
[2 bytes: tx1 length (big-endian)][tx1 bytes]
[2 bytes: tx2 length (big-endian)][tx2 bytes]
...
```

Maximum 16 transactions per batch. Each transaction payload must be 66-1232 bytes.

Response

```json
{
  "attempted": 2,
  "accepted": 2,
  "rejected": 0,
  "parse_error": null
}
```
