Merkle Proof
curl --request GET \
--url https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof', 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://app.magna.so/api/external/v1/allocations/{id}/merkle-proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <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"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"decodableArgs": "0x1234567890abcdef1234567890abcdef12345678901234567890abcdef12345678",
"hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
"walletAddress": "0x742d35Cc6634C0532925a3b8D8c9f82bA2D2BbEc",
"proof": [
"0x1111111111111111111111111111111111111111111111111111111111111111",
"0x2222222222222222222222222222222222222222222222222222222222222222",
"0x3333333333333333333333333333333333333333333333333333333333333333"
],
"input": null,
"merkleTreeId": "9876543a-bcde-f012-3456-789abcdef012",
"distributionId": "fedcba98-7654-3210-fedc-ba9876543210",
"rootIndex": 42,
"createdAt": "2024-04-15T21:26:21.000Z",
"updatedAt": "2024-04-15T21:26:21.000Z"
}
}Allocations
Merkle Proof
Retrieve the merkle proof for an allocation, used to verify and claim tokens in merkle-based distributions.
GET
/
api
/
external
/
v1
/
allocations
/
{id}
/
merkle-proof
Merkle Proof
curl --request GET \
--url https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof', 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://app.magna.so/api/external/v1/allocations/{id}/merkle-proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <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"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/{id}/merkle-proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"decodableArgs": "0x1234567890abcdef1234567890abcdef12345678901234567890abcdef12345678",
"hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
"walletAddress": "0x742d35Cc6634C0532925a3b8D8c9f82bA2D2BbEc",
"proof": [
"0x1111111111111111111111111111111111111111111111111111111111111111",
"0x2222222222222222222222222222222222222222222222222222222222222222",
"0x3333333333333333333333333333333333333333333333333333333333333333"
],
"input": null,
"merkleTreeId": "9876543a-bcde-f012-3456-789abcdef012",
"distributionId": "fedcba98-7654-3210-fedc-ba9876543210",
"rootIndex": 42,
"createdAt": "2024-04-15T21:26:21.000Z",
"updatedAt": "2024-04-15T21:26:21.000Z"
}
}⌘I