# Overview & Structure

The SDK is heavily based on the [builder](https://en.wikipedia.org/wiki/Builder_pattern) and [factory](https://en.wikipedia.org/wiki/Factory_\(object-oriented_programming\)) pattern to create the configuration, service instances and subsequently the objects wrapping the transaction to interact with the aeternity network.

## SDK Service Entrypoint

The central access point to all services is made available through the [AeternityService](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/service/aeternity/impl/AeternityService.java) which can be obtained via the [AeternityServiceFactory](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/service/aeternity/AeternityServiceFactory.java). Necessary parameters to f.e. identify the network to use or the endpoints to act against, are defined via the [AeternityServiceConfiguration](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/service/aeternity/AeternityServiceConfiguration.java). Within this class, the following parameters can be set

| Parameter       | Description                                                                                                                             | Value / Default                                                                                                                                                       |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| baseUrl         | endpoint URL of the aeternity node                                                                                                      | [https://sdk-testnet.aepps.com](https://testnet.aeternity.io)                                                                                                         |
| compilerBaseUrl | endpoint URL of the sophia compiler node                                                                                                | [https://compiler.aepps.com](https://compiler.aeternity.io)                                                                                                           |
| mdwBaseUrl      | endpoint URL of the aeternal middleware                                                                                                 | <https://testnet.aeternity.io/mdw>                                                                                                                                    |
| network         | network to run against - must be considered together with chosen Endpoint URLs                                                          | one of [Network](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/constants/Network.java)                       |
| nativeMode      | for debug and test purposes - if true, the SDK creates the unsigned transaction from the given model, otherwise the node is called      | true                                                                                                                                                                  |
| baseKeyPair     | the account which is internally used to sign all transactions (if no other  private key is passed in the post transaction method)       | instance of [BaseKeyPair](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/domain/secret/impl/BaseKeyPair.java) |
| vertx           | the vertx instance which is used within the SDK to call the node interfaces - will be instantiated automatically                        |                                                                                                                                                                       |
| targetVM        | target VM version - depending on the selected VM, contract related transactions need to specify the respective abiVersion and vmVersion | FATE, one of [VirtualMachine](https://github.com/kryptokrauts/aepp-sdk-java/blob/master/src/main/java/com/kryptokrauts/aeternity/sdk/constants/VirtualMachine.java)   |

To actually construct the service configuration and get an instance of the AeternityService, the following steps are necessary. In this example we use a randomly created base key pair

```
KeyPairService keyPairService = new KeyPairServiceFactory().getService();
BaseKeyPair baseKeyPair = keyPairService.generateBaseKeyPair();
AeternityService aeternityService =
        new AeternityServiceFactory()
            .getService(
                AeternityServiceConfiguration.configure()
                    .baseUrl(<baseURL>)
                    .compilerBaseUrl(<compilerBaseUrl>)
                    .aeternalBaseUrl(<aeternalBaseUrl>)
                    .network(Network.<network>)                    
                    .baseKeyPair(baseKeyPair)
                    .targetVM(VirtualMachine.FATE)
                    .compile());
```

## Aeternity Service Capabilities

All provided functions are classified into their purpose for better organization - those will be discussed in the subsequent chapters.

### accounts

### aeternal

### compiler

### info

### names

### oracles

### transactions


---

# 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://kryptokrauts.gitbook.io/aepp-sdk-java/use-the-sdk/overview-structure.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.
