---
title: "Maestro Provider"
description: "Use MaestroProvider from @meshsdk/core to fetch Cardano UTxOs, assets and protocol parameters, evaluate scripts and submit transactions through Maestro."
url: https://meshjs.dev/providers/maestro
markdown: https://meshjs.dev/providers/maestro.md
lastModified: 2026-12-03
---

# Maestro Provider

Use MaestroProvider from @meshsdk/core to fetch Cardano UTxOs, assets and protocol parameters, evaluate scripts and submit transactions through Maestro.

`MaestroProvider` connects Mesh to the [Maestro](https://www.gomaestro.org/) Cardano API with a network name and an API key. It ships in `@meshsdk/core` (re-exported from `@meshsdk/provider`) and implements the fetcher, submitter, evaluator and listener interfaces, so you can pass it anywhere Mesh asks for a provider.

**When to use Maestro:**

- You already have a Maestro API key, or want a hosted API instead of running your own node
- You want transaction submission through Maestro's transaction manager, with an optional turbo submit endpoint
- You need script evaluation and UTxO queries from the same hosted service

## How do I connect to Maestro?

```tsx
import { MaestroProvider } from "@meshsdk/core";

const provider = new MaestroProvider({
  network: "Preprod",
  apiKey: "<YOUR_API_KEY>",
});

// Fetch UTxOs for an address
const utxos = await provider.fetchAddressUTxOs(
  "addr_test1qpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0uafhxhu32dys6pvn6wlw8dav6cmp4pmtv7cc3yel9uu0nq93swx9"
);
```

Create an API key for the network you target in your Maestro account. See the [Maestro documentation](https://docs.gomaestro.org/) for plans and key management.

## What options does MaestroProvider take?

| Option        | Type                                  | Required | Description                                                                        |
| ------------- | ------------------------------------- | -------- | ---------------------------------------------------------------------------------- |
| `network`     | `"Mainnet" \| "Preprod" \| "Preview"` | Yes      | Network to query. Requests go to `https://<network>.gomaestro-api.org/v1`          |
| `apiKey`      | `string`                              | Yes      | Your Maestro API key, sent as the `api-key` header                                 |
| `turboSubmit` | `boolean`                             | No       | Submit through `txmanager/turbosubmit` instead of `txmanager`. Defaults to `false` |

The API key belongs to one network. A Preprod key does not work against Mainnet.

## API Reference

### fetchAccountInfo

Retrieve staking information for a stake address.

```tsx
const accountInfo = await provider.fetchAccountInfo(
  "stake_test1uzw5mnt7g4xjgdqkfa80hrk7kdvds6sa4k0vvgjvlj7w8eskffj2n"
);
```

---

### fetchAddressAssets

Retrieve the native assets held at an address, as a map of asset unit to quantity.

```tsx
const assets = await provider.fetchAddressAssets(
  "addr_test1qpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0uafhxhu32dys6pvn6wlw8dav6cmp4pmtv7cc3yel9uu0nq93swx9"
);
```

---

### fetchAddressUTxOs

Retrieve all UTxOs controlled by an address. Optionally filter by a specific asset.

```tsx
// All UTxOs
const utxos = await provider.fetchAddressUTxOs(
  "addr_test1qpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0uafhxhu32dys6pvn6wlw8dav6cmp4pmtv7cc3yel9uu0nq93swx9"
);

// UTxOs containing a specific asset
const filteredUtxos = await provider.fetchAddressUTxOs(
  "addr_test1qpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0uafhxhu32dys6pvn6wlw8dav6cmp4pmtv7cc3yel9uu0nq93swx9",
  "d9312da562da182b02322fd8acb536f37eb9d29fba7c49dc172555274d657368546f6b656e"
);
```

| Parameter | Type     | Required | Description                                          |
| --------- | -------- | -------- | ---------------------------------------------------- |
| `address` | `string` | Yes      | Bech32 address to query                              |
| `asset`   | `string` | No       | Asset unit (policy ID + asset name hex) to filter by |

---

### fetchAssetAddresses

Find all addresses holding a specific asset.

```tsx
const addresses = await provider.fetchAssetAddresses(
  "d9312da562da182b02322fd8acb536f37eb9d29fba7c49dc172555274d657368546f6b656e"
);
```

---

### fetchAssetMetadata

Retrieve on-chain metadata for a specific asset.

```tsx
const metadata = await provider.fetchAssetMetadata(
  "d9312da562da182b02322fd8acb536f37eb9d29fba7c49dc172555274d657368546f6b656e"
);
```

---

### fetchBlockInfo

Retrieve information about a specific block by its hash.

```tsx
const blockInfo = await provider.fetchBlockInfo(
  "79f60880b097ec7dabb81f75f0b52fedf5e922d4f779a11c0c432dcf22c56089"
);
```

---

### fetchCollectionAssets

Retrieve assets minted under a policy ID. Pass the returned `next` cursor to get the following page.

```tsx
const { assets, next } = await provider.fetchCollectionAssets(
  "d9312da562da182b02322fd8acb536f37eb9d29fba7c49dc17255527"
);
```

| Parameter  | Type     | Required | Description                                    |
| ---------- | -------- | -------- | ---------------------------------------------- |
| `policyId` | `string` | Yes      | Policy ID of the collection                    |
| `cursor`   | `string` | No       | Cursor returned as `next` by the previous call |

---

### fetchHandleAddress and fetchHandle

Resolve an ADA Handle to its address, or fetch the handle's metadata. Maestro supports handles on **Mainnet only**; on Preprod and Preview both methods throw.

```tsx
const address = await provider.fetchHandleAddress("meshsdk");
const handleData = await provider.fetchHandle("meshsdk");
```

---

### fetchProtocolParameters

Retrieve the protocol parameters of the latest epoch. Maestro does not return parameters for a past epoch: passing an `epoch` argument throws.

```tsx
const params = await provider.fetchProtocolParameters();
```

---

### fetchTxInfo

Retrieve details of a confirmed transaction.

```tsx
const txInfo = await provider.fetchTxInfo(
  "f4ec9833a3bf95403d395f699bc564938f3419537e7fb5084425d3838a4b6159"
);
```

---

### fetchUTxOs

Retrieve the outputs of a transaction, optionally filtering by output index.

```tsx
// All outputs
const utxos = await provider.fetchUTxOs(
  "dfd2a2616e6154a092807b1ceebb9ddcadc0f22cf5c8e0e6b0757815083ccb70"
);

// Specific output
const singleUtxo = await provider.fetchUTxOs(
  "dfd2a2616e6154a092807b1ceebb9ddcadc0f22cf5c8e0e6b0757815083ccb70",
  0
);
```

---

### evaluateTx

Evaluate execution units for a transaction containing Plutus scripts.

```tsx
import { MaestroProvider, TxBuilder } from "@meshsdk/core";

const provider = new MaestroProvider({ network: "Preprod", apiKey: "<YOUR_API_KEY>" });
const builder = new TxBuilder({ network: "preprod", provider });

const built = await builder.build(
  [
    // ... your parts, such as spend.plutus(...)
  ],
  { payer: wallet },
);

const evaluation = await provider.evaluateTx(built.tx);
```

The result is a list of redeemer budgets with `index`, `tag` and `budget: { mem, steps }`, the same shape every Mesh evaluator returns.

---

### submitTx

Submit a signed transaction to the network. Returns the transaction hash.

```tsx
const txHash = await provider.submitTx(signedTx);
```

---

### onTxConfirmed

Poll every 5 seconds until the transaction is in a block with at least one confirmation, then call `callback`. `limit` (default `100`) caps the number of failed lookups.

```tsx
provider.onTxConfirmed(txHash, () => {
  console.log("Transaction confirmed!");
});
```

---

### get and post

Make custom requests to any Maestro endpoint, relative to `https://<network>.gomaestro-api.org/v1`.

```tsx
const data = await provider.get("transactions/f4ec9833a3bf95403d395f699bc564938f3419537e7fb5084425d3838a4b6159");
```

## Which methods does Maestro not support?

These methods exist on `MaestroProvider` but throw `Method not implemented` in `@meshsdk/provider@1.9.0-beta.101`, the version `@meshsdk/core@2.0.0` depends on:

- `fetchAddressTxs`
- `fetchGovernanceProposal`

Use [Blockfrost](https://meshjs.dev/providers/blockfrost) or [Koios](https://meshjs.dev/providers/koios) for these queries.

## Complete Example

To build, sign and submit a transaction, pass the provider to a wallet and to `TxBuilder`. See [Headless wallet](https://meshjs.dev/apis/wallets/meshwallet) for a wallet created with a `MaestroProvider`, and [Transaction basics](https://meshjs.dev/apis/txbuilder/basics) for building the transaction.

## Troubleshooting

### 401 or 403 error

The API key is missing, invalid, or belongs to a different network. Check that `network` matches the network of the key.

### "Does not support fetching addresses by handle on non-mainnet networks."

`fetchHandle` and `fetchHandleAddress` only work with `network: "Mainnet"`.

### "Maestro only supports fetching Protocol parameters of the latest completed epoch."

Call `fetchProtocolParameters()` without an epoch.

## References

- [Maestro documentation](https://docs.gomaestro.org/) - Maestro API reference and account setup
- [Cardano Developer Portal](https://developers.cardano.org) - Official Cardano development resources

## Related

- [All Providers](https://meshjs.dev/providers) - Compare Maestro with other providers
- [Transaction Builder](https://meshjs.dev/apis/txbuilder/basics) - Build transactions using provider data
- [Testnet setup](https://meshjs.dev/guides/testnet-setup) - Get test ADA and keys for Preprod and Preview
