Skip to main content
fn get_project(env: Env, project_id: u64) -> Project
Returns the full Project struct for the given ID. Read-only, runs via Soroban simulation and does not consume fees.

Parameters

NameTypeDescription
project_idu64The Project to fetch.

Return value

struct Project {
    id: u64,
    merchant: Address,
    name: String,
    description: String,
    created_at: u64,
}
FieldDescription
idChain-assigned project ID.
merchantThe merchant address that owns this project.
nameHuman-readable project name.
descriptionOptional longer description, may be an empty string.
created_atUnix timestamp of the ledger at creation time.

Error cases

CodeNameDescription
6PlanNotFoundNo project exists with the given project_id on chain.

Examples

import { VowenaClient, NETWORKS } from "@vowena/sdk";

const client = new VowenaClient({
  contractId: NETWORKS.testnet.contractId,
  rpcUrl: NETWORKS.testnet.rpcUrl,
  networkPassphrase: NETWORKS.testnet.networkPassphrase,
});

const project = await client.getProject(1, "GREAD_CALLER...ADDR");
console.log(project.name); // "Acme SaaS"
Reads use a caller address for the Soroban simulation. Any funded testnet address works — the SDK ships a READ_CALLER default for dashboards.