curl --request POST \
--url https://api.mpcvault.com/v1/createWallet \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"ref": "customer-wallet-001",
"name": "test wallet"
}
'import requests
url = "https://api.mpcvault.com/v1/createWallet"
payload = {
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"ref": "customer-wallet-001",
"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: '<string>',
callbackClientSignerPublicKey: '<string>',
ref: 'customer-wallet-001',
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' => '<string>',
'callbackClientSignerPublicKey' => '<string>',
'ref' => 'customer-wallet-001',
'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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\n \"name\": \"test wallet\"\n}"
response = http.request(request)
puts response.read_body{
"details": {
"vaultUuid": "<string>",
"keyType": "KEY_TYPE_ECC_ED25519",
"keyPath": "path/to/key",
"publicKey": "<string>",
"networkType": "NETWORK_TYPE_EVM",
"address": "<string>",
"ref": "customer-wallet-001",
"status": "STATUS_ACTIVE",
"name": "test wallet "
},
"error": {
"message": "<string>",
"serviceErrorCode": "SERVICE_ERROR_CODE_UNSPECIFIED",
"executeSigningRequestsErrorCode": "EXECUTE_SIGNING_REQUESTS_ERROR_CODE_UNSPECIFIED"
}
}CreateWallet
Create an API wallet in a vault for a supported network.
curl --request POST \
--url https://api.mpcvault.com/v1/createWallet \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"ref": "customer-wallet-001",
"name": "test wallet"
}
'import requests
url = "https://api.mpcvault.com/v1/createWallet"
payload = {
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"ref": "customer-wallet-001",
"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: '<string>',
callbackClientSignerPublicKey: '<string>',
ref: 'customer-wallet-001',
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' => '<string>',
'callbackClientSignerPublicKey' => '<string>',
'ref' => 'customer-wallet-001',
'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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\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\": \"<string>\",\n \"callbackClientSignerPublicKey\": \"<string>\",\n \"ref\": \"customer-wallet-001\",\n \"name\": \"test wallet\"\n}"
response = http.request(request)
puts response.read_body{
"details": {
"vaultUuid": "<string>",
"keyType": "KEY_TYPE_ECC_ED25519",
"keyPath": "path/to/key",
"publicKey": "<string>",
"networkType": "NETWORK_TYPE_EVM",
"address": "<string>",
"ref": "customer-wallet-001",
"status": "STATUS_ACTIVE",
"name": "test wallet "
},
"error": {
"message": "<string>",
"serviceErrorCode": "SERVICE_ERROR_CODE_UNSPECIFIED",
"executeSigningRequestsErrorCode": "EXECUTE_SIGNING_REQUESTS_ERROR_CODE_UNSPECIFIED"
}
}callbackClientSignerPublicKey to its OpenSSH public key.
The response returns the wallet in details, including details.address. Creation completes without a separate execution call. The network guides define networkType and funding or activation requirements; Introduction covers subsequent requests.Body
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.
"<string>"
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 Was this page helpful?