# program

## Description

Returns program source code corresponding to a specific program ID.

## Method Parameters

* **`params`** - *`Object`*:
  * **`id`** - *`string`*: Program ID (example: `credits.aleo`).

## Returns

* **`result`** - *`string`*: Program source code aleo instructions.

## Example

### Request

```bash
curl --location --request POST 'https://testnet3.aleorpc.com' \
  --header 'Content-Type:  application/json' \
  --data-raw '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "program",
      "params": {
        "id": "helloworld.aleo"
    }
  }'
```

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "program helloworld.aleo;\n\nfunction main:\n    input r0 as u32.public;\n    input r1 as u32.private;\n    add r0 r1 into r2;\n    output r2 as u32.private;\n"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.leo.app/aleo-rpc-api/endpoints/programs/program.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
