Request an aggregation task
Request an aggregation task
Request a task to aggregate the Falcon signatures provided
POST
/v1/pqscale/aggsign
Headers
Request Body
Request a task to aggregate the Falcon signatures provided
POST
/v1/pqscale/aggsign
Headers
Request Body
Request examples
The request examples below are just for reference.
Remember to supply {{BASE_URL}}
and {{Your_API_key}}
in the corresponding fields.
curl '{{BASE_URL}}/v1/pqscale/aggsign' \
-H 'Authorization: {{Your_API_key}}' \
-H 'Content-Type: application/json' \
-d '{"data":[{"digest":"0x225129543239749633","signature":"0x393a74b6...","public_key":"0x0966e0fdb15c..."},{"digest":"0x225129543264915458","signature":"0x39deea609...","public_key":"0x094e5847b9ab..."},...
]}'
var https = require('https');
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{BASE_URL}}',
'path': '/v1/pqscale/aggsign',
'headers': {
'Authorization': '{{Your_API_key}}',
'Content-Type': 'application/json'
}
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"data": [
{
"digest": "0x225129543239749633",
"signature": "0x393a74b63...",
"public_key": "0x0966e0fdb15..."
},
{
"digest": "0x225129543264915458",
"signature": "0x39deea609...",
"public_key": "0x094e5847b9a..."
}
]
});
req.write(postData);
req.end();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{BASE_URL}}/v1/pqscale/aggsign"
method := "POST"
payload := strings.NewReader(`{"data":[{"digest":"0x225129543239749633","signature":"0x393a74b63...","public_key":"0x0966e0fdb15c..."},{"digest":"0x225129543264915458","signature":"0x39deea6094...","public_key":"0x094e5847b9ab..."}]}`)
client := &http.Client {
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "{{Your_API_key}}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Authorization", "{{Your_API_key}}".parse()?);
headers.insert("Content-Type", "application/json".parse()?);
let data = r#"{
"data": [
{
"digest": "0x225129543239749633",
"signature": "0x393a74b631650b...",
"public_key": "0x0966e0fdb15ce3d..."
},
{
"digest": "0x225129543264915458",
"signature": "0x39deea6094744c...",
"public_key": "0x094e5847b9aba66..."
}
]
}"#;
let json: serde_json::Value = serde_json::from_str(&data)?;
let request = client.request(reqwest::Method::POST, "{{BASE_URL}}/v1/pqscale/aggsign")
.headers(headers)
.json(&json);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}
import requests
import json
url = "{{BASE_URL}}/v1/pqscale/aggsign"
payload = json.dumps({
"data": [
{
"digest": "0x225129543239749633",
"signature": "0x393a74b63165...",
"public_key": "0x0966e0fdb15ce3..."
},
{
"digest": "0x225129543264915458",
"signature": "0x39deea609474...",
"public_key": "0x094e5847b9aba6..."
}
]
})
headers = {
'Authorization': '{{Your_API_key}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response examples
Last updated