Pubkey to Address
curl --request POST \
--url https://api.adamik.io/api/{chainId}/address/encode \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pubkey": "<string>"
}
'import requests
url = "https://api.adamik.io/api/{chainId}/address/encode"
payload = { "pubkey": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pubkey: '<string>'})
};
fetch('https://api.adamik.io/api/{chainId}/address/encode', 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.adamik.io/api/{chainId}/address/encode",
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([
'pubkey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.adamik.io/api/{chainId}/address/encode"
payload := strings.NewReader("{\n \"pubkey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.adamik.io/api/{chainId}/address/encode")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pubkey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adamik.io/api/{chainId}/address/encode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pubkey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chainId": "aptos",
"pubkey": "<string>",
"addresses": [
{
"type": "<string>",
"address": "<string>"
}
]
}Utils
Pubkey to Address
Encodes the provided public key to one or multiple addresses, for the given chain ID. Each address is labeled with a type, which may be “default” when there is only one address.
POST
/
api
/
{chainId}
/
address
/
encode
Pubkey to Address
curl --request POST \
--url https://api.adamik.io/api/{chainId}/address/encode \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pubkey": "<string>"
}
'import requests
url = "https://api.adamik.io/api/{chainId}/address/encode"
payload = { "pubkey": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pubkey: '<string>'})
};
fetch('https://api.adamik.io/api/{chainId}/address/encode', 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.adamik.io/api/{chainId}/address/encode",
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([
'pubkey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.adamik.io/api/{chainId}/address/encode"
payload := strings.NewReader("{\n \"pubkey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.adamik.io/api/{chainId}/address/encode")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pubkey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adamik.io/api/{chainId}/address/encode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pubkey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chainId": "aptos",
"pubkey": "<string>",
"addresses": [
{
"type": "<string>",
"address": "<string>"
}
]
}Authorizations
Path Parameters
Unique adamik identifier of the chain
Available options:
aptos, aptos-testnet, algorand, ethereum, sepolia, holesky, hoodi, zksync, zksync-sepolia, injective-evm-testnet, base, base-sepolia, optimism, optimism-sepolia, arbitrum, arbitrum-sepolia, polygon, polygon-amoy, bsc, bsc-testnet, linea, linea-sepolia, avalanche, avalanche-fuji, gnosis, gnosis-chiado, moonbeam, moonriver, moonbase, fantom, mantle, chiliz, chiliz-testnet, ton, tron, rootstock, rootstock-testnet, bitcoin, bitcoin-testnet, bitcoin-signet, litecoin, dogecoin, starknet, starknet-sepolia, monad-testnet, bitsong, chihuahua, seda, persistence, comdex, humans-ai, ki, provenance, quicksilver, saga, kava, sei, fetch-ai, cosmoshub, osmosis, celestia, dydx, axelar, evmos, irisnet, juno, lum-network, omniflix, medibloc, passage, quasar, sommelier, shentu, stride, terra2, akash, dymension, band, stargaze, kyve, likecoin, osmosis-testnet, celestia-testnet, cosmoshub-testnet, injective, babylon, babylon-testnet, berachain, berachain-bepolia, cronos, world-chain, world-chain-sepolia, hyperliquid, solana, stellar, stellar-testnet Body
application/json
Response
200 - application/json
Returns a set of addresses, one for each supported type, depending on the chain
Unique adamik identifier of the chain
Available options:
aptos, aptos-testnet, algorand, ethereum, sepolia, holesky, hoodi, zksync, zksync-sepolia, injective-evm-testnet, base, base-sepolia, optimism, optimism-sepolia, arbitrum, arbitrum-sepolia, polygon, polygon-amoy, bsc, bsc-testnet, linea, linea-sepolia, avalanche, avalanche-fuji, gnosis, gnosis-chiado, moonbeam, moonriver, moonbase, fantom, mantle, chiliz, chiliz-testnet, ton, tron, rootstock, rootstock-testnet, bitcoin, bitcoin-testnet, bitcoin-signet, litecoin, dogecoin, starknet, starknet-sepolia, monad-testnet, bitsong, chihuahua, seda, persistence, comdex, humans-ai, ki, provenance, quicksilver, saga, kava, sei, fetch-ai, cosmoshub, osmosis, celestia, dydx, axelar, evmos, irisnet, juno, lum-network, omniflix, medibloc, passage, quasar, sommelier, shentu, stride, terra2, akash, dymension, band, stargaze, kyve, likecoin, osmosis-testnet, celestia-testnet, cosmoshub-testnet, injective, babylon, babylon-testnet, berachain, berachain-bepolia, cronos, world-chain, world-chain-sepolia, hyperliquid, solana, stellar, stellar-testnet Show child attributes
Show child attributes
Was this page helpful?