curl --request POST \
--url https://mpc-client.portalhq.io/v1/raw/sign/{curve} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": "7369676e2074686973",
"share": "eyJjbG..."
}
'import requests
url = "https://mpc-client.portalhq.io/v1/raw/sign/{curve}"
payload = {
"params": "7369676e2074686973",
"share": "eyJjbG..."
}
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({params: '7369676e2074686973', share: 'eyJjbG...'})
};
fetch('https://mpc-client.portalhq.io/v1/raw/sign/{curve}', 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://mpc-client.portalhq.io/v1/raw/sign/{curve}",
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([
'params' => '7369676e2074686973',
'share' => 'eyJjbG...'
]),
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://mpc-client.portalhq.io/v1/raw/sign/{curve}"
payload := strings.NewReader("{\n \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\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://mpc-client.portalhq.io/v1/raw/sign/{curve}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mpc-client.portalhq.io/v1/raw/sign/{curve}")
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 \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\n}"
response = http.request(request)
puts response.read_body{
"data": "f7a6a07fa599db56fca50fa1202670b59054e7ed452ea57b3f5b43148b8bdb165beb3a4b0fd532162a1f0fd475de1a9ecd07c95186f7a0856ce1bffa45e3acc91b"
}{
"id": "BAD_REQUEST",
"message": "Can't parse the request body"
}"Incorrect API key format"{
"id": "<string>",
"message": "<string>"
}Sign a transaction or message by curve
Signs a raw hex digest using the specified elliptic curve.
The data field in the response is a hex string without the leading 0x.
curl --request POST \
--url https://mpc-client.portalhq.io/v1/raw/sign/{curve} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": "7369676e2074686973",
"share": "eyJjbG..."
}
'import requests
url = "https://mpc-client.portalhq.io/v1/raw/sign/{curve}"
payload = {
"params": "7369676e2074686973",
"share": "eyJjbG..."
}
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({params: '7369676e2074686973', share: 'eyJjbG...'})
};
fetch('https://mpc-client.portalhq.io/v1/raw/sign/{curve}', 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://mpc-client.portalhq.io/v1/raw/sign/{curve}",
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([
'params' => '7369676e2074686973',
'share' => 'eyJjbG...'
]),
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://mpc-client.portalhq.io/v1/raw/sign/{curve}"
payload := strings.NewReader("{\n \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\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://mpc-client.portalhq.io/v1/raw/sign/{curve}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mpc-client.portalhq.io/v1/raw/sign/{curve}")
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 \"params\": \"7369676e2074686973\",\n \"share\": \"eyJjbG...\"\n}"
response = http.request(request)
puts response.read_body{
"data": "f7a6a07fa599db56fca50fa1202670b59054e7ed452ea57b3f5b43148b8bdb165beb3a4b0fd532162a1f0fd475de1a9ecd07c95186f7a0856ce1bffa45e3acc91b"
}{
"id": "BAD_REQUEST",
"message": "Can't parse the request body"
}"Incorrect API key format"{
"id": "<string>",
"message": "<string>"
}Authorizations
Client API Key or Client Session Token
Path Parameters
The elliptic curve to use.
SECP256K1, ED25519 Body
Request body for signing a raw hex digest by curve.
A hex string of the digest to sign without the leading 0x
(e.g. "7369676e2074686973").
The MPC share for the relevant curve.
The data value from a client-stored presign response. Omit for standard
(non-presigned) signing. Mutually exclusive with presignatureId.
The id value from a Portal-managed presign response. Omit for standard
(non-presigned) signing. Mutually exclusive with presignature.
The signing scheme to use. Defaults to cggmp.
cggmp, frost Response
Signed successfully
Response containing the signed data.
The signed data as a hex string.
Was this page helpful?