Claim Transaction Parameters
curl --request POST \
--url https://portal-api.magna.so/api/v2/{portalId}/claim/params \
--header 'Content-Type: application/json' \
--data '
{
"distributionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"extraData": "<string>",
"priorityFeeConfigFee": "<string>"
}
'import requests
url = "https://portal-api.magna.so/api/v2/{portalId}/claim/params"
payload = {
"distributionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"extraData": "<string>",
"priorityFeeConfigFee": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
distributionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
hookId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
extraData: '<string>',
priorityFeeConfigFee: '<string>'
})
};
fetch('https://portal-api.magna.so/api/v2/{portalId}/claim/params', 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://portal-api.magna.so/api/v2/{portalId}/claim/params",
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([
'distributionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'hookId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'extraData' => '<string>',
'priorityFeeConfigFee' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://portal-api.magna.so/api/v2/{portalId}/claim/params"
payload := strings.NewReader("{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://portal-api.magna.so/api/v2/{portalId}/claim/params")
.header("Content-Type", "application/json")
.body("{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal-api.magna.so/api/v2/{portalId}/claim/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "0x99Fcf70F401A2308C37C7e8d726fFBfe89AF1Bbd",
"to": "0x1d654f0984e9f42BF8F9bD69A6C23965310c81D1",
"data": "0x1bff5ed900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002463383662336533632d636633382d343139302d626539662d62373936386238353662373800000000000000000000000000000000000000000000000000000000",
"platformFee": "0"
}{
"errors": [
{
"path": "query.wallet",
"message": "Required"
}
]
}{
"error": "DISTRIBUTION_NOT_FOUND"
}{
"error": "internal server error"
}Claiming
Claim Transaction Parameters
Constructs transaction parameters for claiming a distribution so the user could sign it
POST
/
api
/
v2
/
{portalId}
/
claim
/
params
Claim Transaction Parameters
curl --request POST \
--url https://portal-api.magna.so/api/v2/{portalId}/claim/params \
--header 'Content-Type: application/json' \
--data '
{
"distributionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"extraData": "<string>",
"priorityFeeConfigFee": "<string>"
}
'import requests
url = "https://portal-api.magna.so/api/v2/{portalId}/claim/params"
payload = {
"distributionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"extraData": "<string>",
"priorityFeeConfigFee": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
distributionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
hookId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
extraData: '<string>',
priorityFeeConfigFee: '<string>'
})
};
fetch('https://portal-api.magna.so/api/v2/{portalId}/claim/params', 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://portal-api.magna.so/api/v2/{portalId}/claim/params",
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([
'distributionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'hookId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'extraData' => '<string>',
'priorityFeeConfigFee' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://portal-api.magna.so/api/v2/{portalId}/claim/params"
payload := strings.NewReader("{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://portal-api.magna.so/api/v2/{portalId}/claim/params")
.header("Content-Type", "application/json")
.body("{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal-api.magna.so/api/v2/{portalId}/claim/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"distributionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hookId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"extraData\": \"<string>\",\n \"priorityFeeConfigFee\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "0x99Fcf70F401A2308C37C7e8d726fFBfe89AF1Bbd",
"to": "0x1d654f0984e9f42BF8F9bD69A6C23965310c81D1",
"data": "0x1bff5ed900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002463383662336533632d636633382d343139302d626539662d62373936386238353662373800000000000000000000000000000000000000000000000000000000",
"platformFee": "0"
}{
"errors": [
{
"path": "query.wallet",
"message": "Required"
}
]
}{
"error": "DISTRIBUTION_NOT_FOUND"
}{
"error": "internal server error"
}Path Parameters
portal id
Body
application/json
Body
distribution(s) to get parameters for
ID of the protocol hook to use
Extra data for the protocol hook
Available options:
MANUAL_WITH_LEVEL, MANUAL_WITH_FEE, AUTOMATIC decimal value; required if priorityFeeConfigType is MANUAL_WITH_FEE
required if priorityFeeConfigType is MANUAL_WITH_LEVEL
Available options:
MIN, LOW, MEDIUM, HIGH, VERY_HIGH, EXTREME ⌘I