Native accounts
Sign an off-chain message with the agent's Solana key
Needs native.solana.sign_message. Signs as wallet.solana_account_id. Bytes that parse as a Solana transaction message are refused. Requires X-Grant-Token for a live grant and is refused while the agent is frozen; destinations, budget, timelock_ms, schedule and owner_approval do not apply. Recorded in history as type native.
POST
/
v1
/
agents
/
{agent_id}
/
native
/
solana
/
sign-message
Sign an off-chain message with the agent's Solana key
curl --request POST \
--url https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Grant-Token: <api-key>' \
--data '
{
"message": "<string>",
"encoding": "utf8"
}
'import requests
url = "https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message"
payload = {
"message": "<string>",
"encoding": "utf8"
}
headers = {
"X-API-Key": "<api-key>",
"X-Grant-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Grant-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({message: '<string>', encoding: 'utf8'})
};
fetch('https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message', 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.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message",
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([
'message' => '<string>',
'encoding' => 'utf8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Grant-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Grant-Token", "<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.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message")
.header("X-API-Key", "<api-key>")
.header("X-Grant-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Grant-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}"
response = http.request(request)
puts response.read_body{
"correlation_id": "<string>",
"chain": "near",
"account_id": "<string>",
"signature": "<string>"
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}Authorizations
Token of the owner grant a delegated request runs under. The partner creates it and the owner signs its commitment; keep it on your backend.
Path Parameters
Pattern:
^[0-9a-f]{64}$Body
application/json
⌘I
Sign an off-chain message with the agent's Solana key
curl --request POST \
--url https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Grant-Token: <api-key>' \
--data '
{
"message": "<string>",
"encoding": "utf8"
}
'import requests
url = "https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message"
payload = {
"message": "<string>",
"encoding": "utf8"
}
headers = {
"X-API-Key": "<api-key>",
"X-Grant-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Grant-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({message: '<string>', encoding: 'utf8'})
};
fetch('https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message', 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.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message",
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([
'message' => '<string>',
'encoding' => 'utf8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Grant-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Grant-Token", "<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.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message")
.header("X-API-Key", "<api-key>")
.header("X-Grant-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsonintents.com/v1/agents/{agent_id}/native/solana/sign-message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Grant-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"encoding\": \"utf8\"\n}"
response = http.request(request)
puts response.read_body{
"correlation_id": "<string>",
"chain": "near",
"account_id": "<string>",
"signature": "<string>"
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}