Andamio LogoAndamio
Andamio API/Atlas tx builder api/Atlas Project Creator

Manage Treasury

Atlas TX Builder APIAtlas Project Creator

This endpoint allows a project creator to manage the project treasury, including adding new projects, managing allowed contributors, and depositing funds (ADA and other tokens).

POST
/atlas-tx-builder/project-creator/manage-treasury
X-API-Key<token>

API Key for authentication. Example: "YOUR_API_KEY"

In: header

Manage Treasury Request Body - Contains all necessary information to manage the treasury, including UTxO references for the project NFT, project creator's alias, access token, treasury token, treasury reference script, and escrow reference script, along with details for projects to add, allowed contributors, treasury fund UTxOs and output amounts, ADA deposit amount, and tokens to deposit.

adaDepositAmount?integer
changeAddress?string
collateralUTxO?object
contributorsAllowed?array<string>
escrowRefScriptUTxO?object
projectCreatorAccessTokenUTxO?object
projectCreatorAlias?string
projectNFTUTxO?object
projectsToAdd?array<object>
tokensToDeposit?array<object>
treasuryFundUTxOsAndOutputAmounts?object
treasuryRefScriptUTxO?object
treasuryTokenUTxO?object
usedAddresses?array<string>

Response Body

curl -X POST "https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury" \
  -H "Content-Type: application/json" \
  -d '{}'
const body = JSON.stringify({})

fetch("https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury"
  body := strings.NewReader(`{}`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury"
body = {}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;

var body = BodyPublishers.ofString("""{}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury"))
  .header("Content-Type", "application/json")
  .POST(body)
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var body = new StringContent("""
{}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PostAsync("https://andamio-api-308006323670.us-central1.run.app/api/v1/atlas-tx-builder/project-creator/manage-treasury", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
  "unsignedTxCBOR": "string"
}
{
  "details": "string",
  "message": "Bad Request: Invalid input.",
  "status_code": 400
}
{
  "details": "string",
  "message": "Unauthorized: Invalid or missing credentials.",
  "status_code": 401
}
{
  "details": "string",
  "message": "Forbidden: Insufficient permissions or tier access.",
  "status_code": 403
}
{
  "details": "string",
  "message": "Unprocessable Entity: Invalid request structure or data.",
  "status_code": 422
}
{
  "details": "string",
  "message": "Too Many Requests: Rate limit or quota exceeded.",
  "status_code": 429
}
{
  "details": "string",
  "message": "Internal Server Error: An unexpected error occurred.",
  "status_code": 500
}