> ## 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.

# Sui

> Transfer SUI and coins, execute Move calls and programmable transactions, and sign personal messages with the MPCVault API.

Examples use [API client signing](https://docs.mpcvault.com/api-reference/overview.md#preparation).

## Signing request types

| Payload | Use |
| - | - |
| [`suiSendNative`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer SUI. |
| [`suiSendCoin`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer a coin, such as USDC. |
| [`suiSendCustom`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Execute Move calls and programmable transaction blocks (PTBs). |
| [`suiMessage`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Sign a personal message. |

To sign transactions you build yourself or messages you format yourself, use [raw signing](https://docs.mpcvault.com/api-reference/overview.md#raw-signing).

## Wallet

[Create a wallet](https://docs.mpcvault.com/api-reference/rest/create-wallet.md) with `networkType: "NETWORK_TYPE_SUI"`. Fund it with more than `1 SUI` for the transfer example and transaction fees, plus the coin balance for non-native transfers.

## Send SUI

This Sui Mainnet example sends `1 SUI`.

[CreateSigningRequest](https://docs.mpcvault.com/api-reference/rest/create-signing-request.md)

```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,
    "suiSendNative": {
      "from": "<YOUR_SUI_ADDRESS>",
      "to": "<RECIPIENT_SUI_ADDRESS>",
      "value": "1000000000"
    }
  }'
```

`value` is an integer string in MIST: `1 SUI = 1,000,000,000 MIST`.

## Send USDC

Replace `suiSendNative` with this payload in the same request:

```json theme={null}
{
  "suiSendCoin": {
    "from": "<YOUR_SUI_ADDRESS>",
    "to": "<RECIPIENT_SUI_ADDRESS>",
    "coinTag": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
    "amount": "1000000"
  }
}
```

This example sends `1 USDC` on Sui Mainnet. `coinTag` is [Circle's full Sui Mainnet USDC coin type](https://developers.circle.com/stablecoins/usdc-contract-addresses#mainnet). `amount: "1000000"` sends `1 USDC` (six decimals). SUI pays transaction fees.

## Call Move functions

For Move calls or a PTB combining multiple actions, replace the transaction payload with `suiSendCustom`. Keep the common fields and `broadcastTx: true`.

```json theme={null}
{
  "suiSendCustom": {
    "from": "<YOUR_SUI_ADDRESS>",
    "payload": "<BASE64_JSON_OR_BCS_TRANSACTION>"
  }
}
```

`payload` is standard, padded base64 of either:

* UTF-8 transaction JSON from [`Transaction.toJSON()`](https://sdk.mystenlabs.com/sui/transactions/basics#serializing-transactions): version `2`, with `inputs` and `commands`, plus optional `sender`, `gasData` and `expiration`. Your application resolves SDK intents before submission.
* BCS-serialized `TransactionData`, including the transaction kind, sender, gas data and expiration.

Your application defines the calls and inputs. MPCVault resolves JSON object inputs and fills missing sender, gas payment, gas budget, gas price and expiration before signing. The resulting bytes can differ from the submitted payload. [Encode the payload](https://docs.mpcvault.com/api-reference/data-types.md#encode-bytes) before submitting it.

## Sign and track

[Sign the request](https://docs.mpcvault.com/api-reference/overview.md#sign-the-request). The returned `txHash` is the Sui transaction digest.

Query that digest with [Sui GraphQL](https://docs.sui.io/develop/accessing-data/graphql/query-with-graphql):

```bash theme={null}
curl -X POST https://graphql.mainnet.sui.io/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query ($digest: String!) { transaction(digest: $digest) { digest effects { status executionError { message } checkpoint { sequenceNumber } } } }",
    "variables": {"digest": "<TRANSACTION_DIGEST>"}
  }'
```

`data.transaction.effects.status: "SUCCESS"` confirms execution; `"FAILURE"` includes `executionError.message`. A non-null `checkpoint` records checkpoint inclusion. Poll at a bounded interval while `data.transaction` is `null`; inspect any GraphQL `errors` before interpreting the result.

## Sign a message

[Create a message signing request](https://docs.mpcvault.com/api-reference/overview.md#sign-a-message) with `suiMessage` and omit `broadcastTx`:

```json theme={null}
{
  "suiMessage": {
    "from": "<YOUR_SUI_ADDRESS>",
    "type": "TYPE_DEFAULT",
    "content": "<BASE64_UTF8_MESSAGE>"
  }
}
```

`content` is standard, padded base64 of the original UTF-8 message text. MPCVault applies Sui's personal-message intent when signing. Execute the request using the shared message-signing flow.

The returned `eddsaSignature` contains the raw 64-byte signature as base64. Sui SDK verification uses `base64(0x00 || signature64 || publicKey32)`; [GetWalletInfo](https://docs.mpcvault.com/api-reference/rest/get-wallet-info.md) returns the wallet's public key in `details.publicKey` as base64. Decode both values before concatenating the bytes.


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