> For the complete documentation index, see [llms.txt](https://docs.aeternity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aeternity.com/developer-documentation/aepp-sdk-js/docs/guides/low-vs-high-usage.md).

# Low vs High level API

## Interactions

`AeSdk` is a general, high-level interface that wraps multiple low-level interfaces. A general interface is preferred for its simplicity and resilience to breaking changes.

But there is also low-level interfaces. It's excellent for additional control, and as a teaching tool to understand the underlying operations. Most real-world requirements involves a series of low-level operations, so the SDK provides abstractions for these.

### Node API

The aeternity node exposes [a REST API](https://api-docs.aeternity.io/). This API is described in the [OpenAPI document](https://mainnet.aeternity.io/api?oas3). SDK uses this document to generate a TypeScript client. The result client (implemented in [`Node` class](https://sdk.aeternity.io/v14.1.0/api/classes/Node.html)) a basically a mapping of all node endpoints as functions.

So to get a transaction based on its hash you would invoke `node.getTransactionByHash('th_fWEsg152BNYcrqA9jDh9VVpacYojCUb1yu45zUnqhmQ3dAAC6')`. In this way the SDK is simply a mapping of the raw API calls into JavaScript.

### Transaction builder

Any blockchain state change requires signing a transaction. Transaction should be built according to the [protocol](https://github.com/aeternity/protocol/blob/c007deeac4a01e401238412801ac7084ac72d60e/serializations.md#accounts-version-1-basic-accounts). SDK implements it in [`buildTx`](https://sdk.aeternity.io/v14.1.0/api/functions/buildTx.html), [`buildTxAsync`](https://sdk.aeternity.io/v14.1.0/api/functions/buildTxAsync.html), and [`unpackTx`](https://sdk.aeternity.io/v14.1.0/api/functions/unpackTx.html). [`buildTxAsync`](https://sdk.aeternity.io/v14.1.0/api/functions/buildTxAsync.html) requires fewer arguments than [`buildTx`](https://sdk.aeternity.io/v14.1.0/api/functions/buildTx.html), but it expects the node instance provided in arguments.

## High-level SDK usage (preferable)

Example spend call, using æternity's SDK abstraction:

{% @github-files/github-code-block url="<https://github.com/aeternity/aepp-sdk-js/blob/1cd128798018d98bdd41eff9104442b44b385d46/examples/node/_api-high-level.js#L1-L18>" %}

## Low-level SDK usage

The same spend execution, but using low-level SDK functions:

{% @github-files/github-code-block url="<https://github.com/aeternity/aepp-sdk-js/blob/1cd128798018d98bdd41eff9104442b44b385d46/examples/node/_api-low-level.js#L1-L19>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aeternity.com/developer-documentation/aepp-sdk-js/docs/guides/low-vs-high-usage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
