curl --request GET \
--url https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}', 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.geodesics.ai/swap/delegation/{chainId}/{walletAddress}",
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-api-key: <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://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"chainId": 123,
"walletAddress": "<string>",
"delegated": true,
"originReady": true,
"delegatedTo": "<string>",
"delegationTarget": "<string>",
"accountNonce": 123,
"provider": "<string>",
"activationCall": {
"to": "<string>",
"data": "<string>"
},
"carrier": {
"address": "<string>",
"decimals": 123,
"balance": "<string>"
}
}Check wallet delegation
Reads the wallet’s on-chain delegation and reports the delegate contract and, when recognized, the delegation provider. Read-only: the API holds no key.
curl --request GET \
--url https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}', 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.geodesics.ai/swap/delegation/{chainId}/{walletAddress}",
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-api-key: <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://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.geodesics.ai/swap/delegation/{chainId}/{walletAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"chainId": 123,
"walletAddress": "<string>",
"delegated": true,
"originReady": true,
"delegatedTo": "<string>",
"delegationTarget": "<string>",
"accountNonce": 123,
"provider": "<string>",
"activationCall": {
"to": "<string>",
"data": "<string>"
},
"carrier": {
"address": "<string>",
"decimals": 123,
"balance": "<string>"
}
}Authorizations
Path Parameters
EVM chain id to inspect (e.g. 8453).
The agent EOA to check.
Response
Default Response
The EVM chain the delegation was checked on.
The agent wallet whose delegation state was inspected.
Whether the wallet has any on-chain delegation set on this chain.
Whether the wallet can originate swaps on this chain as delegated today. False for an undelegated wallet or one delegated to an unsupported target.
The delegation target, when delegated.
Present when not delegated: the delegation target to sign an authorization for. Pass the signed authorization to POST /swap/build-geo-op; the first swap activates the wallet.
Present when not delegated: the wallet's current account nonce, the value an authorization must be signed at.
Known delegation provider name for delegatedTo, or null if unrecognized.
Present when not delegated: a ready-to-send transaction that activates the wallet on this chain (a tiny self-transfer of the chain’s stable, sent by the wallet itself).
Show child attributes
Show child attributes
The chain’s carrier stable and the wallet’s balance of it, used by clients to plan first-time chain onboarding. Omitted when the chain has no carrier or the read failed.
Show child attributes
Show child attributes
