Import Wallet
curl --request POST \
--url https://testnet.walletkit.com/wallets/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"type": "eoa",
"control_mode": "user",
"private_key": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"user_pin": "111111"
}
'import requests
url = "https://testnet.walletkit.com/wallets/import"
payload = {
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"type": "eoa",
"control_mode": "user",
"private_key": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"user_pin": "111111"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network: 'Avalanche',
name: 'User Wallet',
owner_id: '58c9095e-24db-43eb-b49d-ddc305c2b6f7',
type: 'eoa',
control_mode: 'user',
private_key: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
user_pin: '111111'
})
};
fetch('https://testnet.walletkit.com/wallets/import', 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://testnet.walletkit.com/wallets/import",
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([
'network' => 'Avalanche',
'name' => 'User Wallet',
'owner_id' => '58c9095e-24db-43eb-b49d-ddc305c2b6f7',
'type' => 'eoa',
'control_mode' => 'user',
'private_key' => '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
'user_pin' => '111111'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://testnet.walletkit.com/wallets/import"
payload := strings.NewReader("{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://testnet.walletkit.com/wallets/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.walletkit.com/wallets/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1427fe1c-226e-4dde-a0a1-d46c4521084b",
"created_at": "2024-01-31T11:36:06.395674-08:00",
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"address": "0x1Be31A94361a391bBaFB2a4CCd704F57dc04d4bb"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Wallets
Import Wallet
Import a wallet with provided private key or mnemonic phrase.
Import Wallet
curl --request POST \
--url https://testnet.walletkit.com/wallets/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"type": "eoa",
"control_mode": "user",
"private_key": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"user_pin": "111111"
}
'import requests
url = "https://testnet.walletkit.com/wallets/import"
payload = {
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"type": "eoa",
"control_mode": "user",
"private_key": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"user_pin": "111111"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network: 'Avalanche',
name: 'User Wallet',
owner_id: '58c9095e-24db-43eb-b49d-ddc305c2b6f7',
type: 'eoa',
control_mode: 'user',
private_key: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
user_pin: '111111'
})
};
fetch('https://testnet.walletkit.com/wallets/import', 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://testnet.walletkit.com/wallets/import",
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([
'network' => 'Avalanche',
'name' => 'User Wallet',
'owner_id' => '58c9095e-24db-43eb-b49d-ddc305c2b6f7',
'type' => 'eoa',
'control_mode' => 'user',
'private_key' => '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
'user_pin' => '111111'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://testnet.walletkit.com/wallets/import"
payload := strings.NewReader("{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://testnet.walletkit.com/wallets/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.walletkit.com/wallets/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"Avalanche\",\n \"name\": \"User Wallet\",\n \"owner_id\": \"58c9095e-24db-43eb-b49d-ddc305c2b6f7\",\n \"type\": \"eoa\",\n \"control_mode\": \"user\",\n \"private_key\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n \"user_pin\": \"111111\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1427fe1c-226e-4dde-a0a1-d46c4521084b",
"created_at": "2024-01-31T11:36:06.395674-08:00",
"network": "Avalanche",
"name": "User Wallet",
"owner_id": "58c9095e-24db-43eb-b49d-ddc305c2b6f7",
"address": "0x1Be31A94361a391bBaFB2a4CCd704F57dc04d4bb"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Headers
Your WalletKit Project ID can be found on the API Keys page in the WalletKit Dashboard.
Authorizations
Body
application/json