curl --request POST \
--url https://api.mpcvault.com/v1/createWallet \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"vaultUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"callbackClientSignerPublicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"name": "test wallet"
}
'import requests
url = "https://api.mpcvault.com/v1/createWallet"
payload = {
"vaultUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"callbackClientSignerPublicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"name": "test wallet"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vaultUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
callbackClientSignerPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test',
ref: '0x4321567890abcdef4321567890abcdef123456',
name: 'test wallet'
})
};
fetch('https://api.mpcvault.com/v1/createWallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mpcvault.com/v1/createWallet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vaultUuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'callbackClientSignerPublicKey' => 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test',
'ref' => '0x4321567890abcdef4321567890abcdef123456',
'name' => 'test wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mpcvault.com/v1/createWallet"
payload := strings.NewReader("{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mpcvault.com/v1/createWallet")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/createWallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}"
response = http.request(request)
puts response.read_body{
"details": {
"vaultUuid": "9f5ee5fb-07f5-470c-a2ff-081e2d6d107a",
"keyType": "KEY_TYPE_ECC_ED25519",
"keyPath": "path/to/key",
"publicKey": "aSDinaTvuI8gbWludGxpZnk=",
"networkType": "NETWORK_TYPE_EVM",
"address": "<string>",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"status": "STATUS_ACTIVE",
"name": "test wallet"
},
"error": {
"message": "<string>",
"executeSigningRequestsErrorCode": "EXECUTE_SIGNING_REQUESTS_ERROR_CODE_UNSPECIFIED",
"serviceErrorCode": "SERVICE_ERROR_CODE_UNSPECIFIED"
}
}CreateWallet
Create a new EOA wallet in a vault for a given network.
curl --request POST \
--url https://api.mpcvault.com/v1/createWallet \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"vaultUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"callbackClientSignerPublicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"name": "test wallet"
}
'import requests
url = "https://api.mpcvault.com/v1/createWallet"
payload = {
"vaultUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"callbackClientSignerPublicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"name": "test wallet"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vaultUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
callbackClientSignerPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test',
ref: '0x4321567890abcdef4321567890abcdef123456',
name: 'test wallet'
})
};
fetch('https://api.mpcvault.com/v1/createWallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mpcvault.com/v1/createWallet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vaultUuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'callbackClientSignerPublicKey' => 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test',
'ref' => '0x4321567890abcdef4321567890abcdef123456',
'name' => 'test wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mpcvault.com/v1/createWallet"
payload := strings.NewReader("{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mpcvault.com/v1/createWallet")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/createWallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultUuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"callbackClientSignerPublicKey\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test\",\n \"ref\": \"0x4321567890abcdef4321567890abcdef123456\",\n \"name\": \"test wallet\"\n}"
response = http.request(request)
puts response.read_body{
"details": {
"vaultUuid": "9f5ee5fb-07f5-470c-a2ff-081e2d6d107a",
"keyType": "KEY_TYPE_ECC_ED25519",
"keyPath": "path/to/key",
"publicKey": "aSDinaTvuI8gbWludGxpZnk=",
"networkType": "NETWORK_TYPE_EVM",
"address": "<string>",
"ref": "0x4321567890abcdef4321567890abcdef123456",
"status": "STATUS_ACTIVE",
"name": "test wallet"
},
"error": {
"message": "<string>",
"executeSigningRequestsErrorCode": "EXECUTE_SIGNING_REQUESTS_ERROR_CODE_UNSPECIFIED",
"serviceErrorCode": "SERVICE_ERROR_CODE_UNSPECIFIED"
}
}address in the response (do not derive it yourself). Run your own sanity checks before using the wallet in production.Authorizations
Your API token. Required for all API requests.
Body
UUID of the vault the wallet is created in (shown on the vault's settings page in the web app). Hyphenated UUID string.
Public key of the API client signer that receives the callback. OpenSSH authorized_keys text of an ssh-ed25519 key, returned exactly as sent. Plain string: "" (not null) when the request has no callback key. Required when creating a wallet. It must be the public key of the API client signer configured for the vault vaultUuid (any other key is rejected), and the caller's IP address must be in that signer's IP whitelist.
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDmdWUo3e3/xUd0kbXCz4omzhqcYaPPYNTZ6ndqZdBAo test"
Network family of the wallet. Enum name: NETWORK_TYPE_EVM, NETWORK_TYPE_BITCOIN, NETWORK_TYPE_TRON, NETWORK_TYPE_APTOS, NETWORK_TYPE_SUI, NETWORK_TYPE_SOLANA, NETWORK_TYPE_TON or NETWORK_TYPE_STELLAR; NETWORK_TYPE_UNKNOWN for an unmapped network. On create NETWORK_TYPE_UNKNOWN is rejected.
NETWORK_TYPE_UNKNOWN, NETWORK_TYPE_EVM, NETWORK_TYPE_BITCOIN, NETWORK_TYPE_TRON, NETWORK_TYPE_APTOS, NETWORK_TYPE_SUI, NETWORK_TYPE_SOLANA, NETWORK_TYPE_TON, NETWORK_TYPE_STELLAR Customer reference for the wallet, unique per organization when not empty. UTF-8, at most 500 Unicode code points; empty string when none.
500"0x4321567890abcdef4321567890abcdef123456"
Name of the wallet. UTF-8, at most 85 Unicode code points.
85"test wallet"
Was this page helpful?