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

# gRPC vs REST

> Choose the right protocol for your integration.

MPCVault supports both gRPC and REST with identical functionality.

## Comparison

|                  | gRPC                         | REST                          |
| ---------------- | ---------------------------- | ----------------------------- |
| Endpoint         | `api.mpcvault.com:443`       | `https://api.mpcvault.com/v1` |
| Performance      | Faster (binary protocol)     | Standard HTTP/JSON            |
| Client libraries | Auto-generated from Protobuf | Use any HTTP client           |
| Best for         | High-frequency operations    | Simple integrations           |

## REST Example

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/getWalletList \
  -H "Content-Type: application/json" \
  -H "x-mtoken: YOUR_API_TOKEN" \
  -d '{"vaultUuid": "your-vault-uuid","page":"0","limit":"10"}'
```

## gRPC Example

```python theme={null}
import grpc
from mpcvault import wallet_pb2, wallet_pb2_grpc

# Create secure channel
channel = grpc.secure_channel(
    'api.mpcvault.com:443',
    grpc.ssl_channel_credentials()
)

# Create stub
stub = wallet_pb2_grpc.WalletServiceStub(channel)

# Make request with metadata
metadata = [('x-mtoken', 'YOUR_API_TOKEN')]
response = stub.GetWalletList(
    wallet_pb2.GetWalletListRequest(vault_uuid="your-vault-uuid"),
    metadata=metadata
)
```

## Protobuf Definitions

Full Protobuf definitions and examples are available at:

[github.com/mpcvault/mpcvaultapis](https://github.com/mpcvault/mpcvaultapis/)
