> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mpcvault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Classic Transactions

> Create and activate a Stellar wallet, add a trustline, and send an issued asset with a memo.

For each activation, trustline and payment request below, use its `signingRequest.uuid` to [review and sign](https://docs.mpcvault.com/api-reference/overview.md#review-the-request), then [confirm the transaction using its returned `txHash`](https://docs.mpcvault.com/api-reference/stellar/quickstart#confirm-a-transaction) before continuing.

## 1. Create a wallet

[CreateWallet](https://docs.mpcvault.com/api-reference/rest/create-wallet.md) creates a Stellar API wallet:

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createWallet \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "vaultUuid": "<VAULT_UUID>",
    "callbackClientSignerPublicKey": "<CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "networkType": "NETWORK_TYPE_STELLAR",
    "name": "Stellar API wallet"
  }'
```

The response returns the address in `details.address`, used below as `<NEW_STELLAR_ADDRESS>`.

The wallet's `STATUS_ACTIVE` is its MPCVault status; the Stellar account still needs activation.

## 2. Activate the account

Fund the new address with XLM on Stellar Mainnet:

* **External wallet or exchange:** send XLM using a service that supports funding new Stellar accounts.
* **Existing MPCVault wallet:** use any activated wallet with enough spendable XLM. `stellarSendNative` creates the destination account if it is inactive.

This example sends `3 XLM` to cover activation, one trustline and fees. An unsponsored account requires `1 XLM`; a standard trustline adds `0.5 XLM` to its reserve. See [Stellar account funding](https://developers.stellar.org/docs/build/apps/application-design-considerations).

Use an API token with access to the funding wallet's vault, that vault's UUID, and a client signer with key access:

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createSigningRequest \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <FUNDING_API_TOKEN>" \
  -d '{
    "vaultUuid": "<FUNDING_VAULT_UUID>",
    "callbackClientSignerPublicKey": "<FUNDING_CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "broadcastTx": true,
    "stellarSendNative": {
      "from": "<FUNDING_STELLAR_ADDRESS>",
      "to": "<NEW_STELLAR_ADDRESS>",
      "value": "3"
    }
  }'
```

Confirm the activation transaction succeeded on-chain before creating the trustline.

## 3. Add a trustline

The example uses [Circle's Stellar Mainnet USDC issuer](https://developers.circle.com/stablecoins/usdc-contract-addresses#mainnet):

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createSigningRequest \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "vaultUuid": "<VAULT_UUID>",
    "callbackClientSignerPublicKey": "<CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "broadcastTx": true,
    "stellarChangeTrust": {
      "from": "<NEW_STELLAR_ADDRESS>",
      "assetCode": "USDC",
      "assetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
    }
  }'
```

Once confirmed on-chain, the wallet can receive USDC from this issuer.

## 4. Receive USDC

Have an existing USDC holder send at least `1.2 USDC` to the new wallet. Check the received balance with [GetBalance](https://docs.mpcvault.com/api-reference/rest/get-balance.md):

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/getBalance \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "networkType": "NETWORK_TYPE_STELLAR",
    "walletAddress": "<NEW_STELLAR_ADDRESS>",
    "tokenAddress": "USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
  }'
```

`balance` is in whole asset units: `"1.2"` means `1.2 USDC`. Omit `tokenAddress` to query XLM. Individual deposits are confirmed by their transaction hash with [Stellar RPC](https://docs.mpcvault.com/api-reference/stellar/quickstart#confirm-a-transaction).

## 5. Send with a memo

The recipient must be activated and have a trustline to the same USDC issuer with enough capacity. Keep enough spendable XLM in the sending wallet for fees.

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createSigningRequest \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "vaultUuid": "<VAULT_UUID>",
    "callbackClientSignerPublicKey": "<CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "broadcastTx": true,
    "stellarSendAsset": {
      "from": "<NEW_STELLAR_ADDRESS>",
      "to": "<RECIPIENT_STELLAR_ADDRESS>",
      "assetCode": "USDC",
      "assetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
      "amount": "1.2",
      "memo": "Classic tutorial"
    }
  }'
```

`amount` is a decimal string in whole USDC units, with up to seven decimal places. `memo` is Text, up to 28 UTF-8 bytes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.