Skip to main content

How to enable API?

How to create API users?

Before enabling the API, you will first need to create an API key. On the Web

  1. Visit console.mpcvault.com.

  2. The org admin navigates to the API page and clicks "Create an API user" to enter the editing page.

  3. In the pop-up window, fill in the following fields:

    • Name: Enter a unique name to identify the API user. Note that the name must be unique within the same organization and cannot be repeated.

    • Permission: Depending on your needs, select the vaults that the API users will have access to set the permission level for the API users.

    • IP Whitelist: Complete this field to restrict API user access to only specific IP address ranges. You can enter up to 3 IP addresses. Please separate multiple addresses with commas.

  4. After filling in the information, click the "Create" button to finalize the creation of the API user.

  5. Save the API token. After you've created the API user, the system will display a pop-up window with your API token. Copy and save the API token in a secure place for future use.

    Docusaurus Plushie

tip

You will not be able to retrieve the full API token from the system again. If you lose this token, you will need to generate a new one.

With the API tokens, you will be able to interact with our systems. Here are some examples: GitHub repository

Detailed API setup guide

A more detailed setup guide can be found here:

https://docs.google.com/document/d/1MF6aQUnLQ8h9Wpxct7HYC2w5g63oU-axpOVJwHQhDos/edit?usp=sharing

How to use API to send transactions on custom EVM chains

To use the API for sending transactions on custom EVM chains, follow the steps below:

Step 1: Add the Custom EVM Chain to Your Vault

  1. Visit console.mpcvault.com.
  2. Navigate to the vault's "Custom EVM networks" menu.
  3. Add the target custom EVM chain to your vault by entering the required chain details (e.g., chain ID, RPC URL, etc.).

Step 2: Add the Target ERC20 Token (if applicable)

If you are sending an ERC20 token transaction, you must:

  1. Visit console.mpcvault.com.
  2. Navigate to the vault's "Token list" menu.
  3. Add the target ERC20 token to the vault by providing the token's contract address.

Step 3: Initiate the Transaction

  1. Use the API to initiate a transaction, following the same process as for non-custom EVM chains.
  2. Note that the nonce and gas_fee parameters are mandatory for transactions on custom EVM chains and must be explicitly defined in the API request.

By following these steps, you can successfully use the API to send transactions on custom EVM chains.