Aeternity BATM extra extension

We are developing Aeternity BATM (https://github.com/GENERALBYTESCOM/batm_public) extension to add AE support on BATM Server (CAS). Extension is JAVA based. For blockchain operation we’'re using aepp-sdk-java (h ttps://github.com/kryptokrauts/aepp-sdk-java).

Repo URL: https://github.com/peter-nexpur/batm_public

Follwoing main interfaces will be implemented:

  • [IWallet] h ttps://github.com/GENERALBYTESCOM/batm_public/blob/master/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IWallet.java)
  • [IPaymentSupport] (h ttps://github.com/GENERALBYTESCOM/batm_public/blob/master/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/payment/IPaymentSupport.java)
  • [IPaperWalletGenerator] h ttps://github.com/GENERALBYTESCOM/batm_public/blob/master/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IPaperWalletGenerator.java

sorry for broken links, im new user and have limitations :slight_smile:

4 Likes

you can contact @mitch_lbw or me if you need help or have any questions regarding the java-sdk.

in the near future we will release a new version that will probably have some breaking changes due to refactoring.

2 Likes

Hi Peter,
glad you’re using our SDK :slight_smile: - as @marc0olo wrote, do not hesitate to ask in case of questions. And as also said, we’re currently working on a major improvement concerning usability which unfortunately will have some breaking changes (but it will be worth it :wink: ) as well as support of futher features
Thanks and regards,
Mitch

1 Like

I came accross depency problem, when tried to add aepp-sdk-java:1.2.0 to BATM project. The conflict is in jackson-x. aepp-sdk-java uses version 2.9.8, batm project uses 2.9.1. Can you rebuild it with lower jackson-x-2.9.1 or give me some directions so i would rebuild it and evetually publish it as separate plugin in gradle repo(ill publish it as kryptokrauts devepment, and update it, when you release newer verion) ? Also it would be nice if we could exchange some contacts for wire, viber, whats up or whatever you prefer for more direct communication. My email is [email protected] you can send it there. Thanks. :slight_smile:

1 Like

@emin already told me in another thread that you might need some help. can you show me the current state of your development?

it might be possible to exclude the jackson library when importing our java-sdk:

<dependency>
      <groupId>com.kryptokrauts</groupId>
      <artifactId>aepp-sdk-java</artifactId>
      <version>1.2.0</version>
      <exclusions>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
          </exclusion>
      </exclusions> 
</dependency>

Maybe you also need to exclude other jackson artifacts like jackson-annotations, jackson-databind and jackson-datatype-jsr310.

Hopefully that won’t break any functionality of the java-sdk.

Thank you for suggestion, here is what happened

First i excluded conflicted depencies as you suggested

> compile ("com.kryptokrauts:aepp-sdk-java:1.2.0"){
  exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
  exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
  exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
  exclude group: 'com.github.jnr', module: 'jnr-ffi'
  exclude group: 'com.github.jnr', module: 'jffi'
  exclude group: 'commons-codec', module: 'commons-codec'

}

Then i got this error:

> Account account = accountService.getAccount("ak_EvSv1tynyr7RrWt3tTgtFrNQN8Ma138cxudPpLf2gk8DyjK4j").blockingGet();
                                               ^

class file for io.reactivex.Single not found

Then i added

compile(“io.reactivex.rxjava2:rxjava:2.2.4”)

and everythings compiled successfuly

When i tried to test SDK that error happened:

> Exception in thread "main" java.lang.NoClassDefFoundError: io/vertx/core/Vertx

at com.kryptokrauts.aeternity.sdk.service.ServiceConfiguration.getApiClient(ServiceConfiguration.java:55)
at com.kryptokrauts.aeternity.sdk.service.account.impl.AccountServiceImpl.getAccountApi(AccountServiceImpl.java:21)
at com.kryptokrauts.aeternity.sdk.service.account.impl.AccountServiceImpl.getAccount(AccountServiceImpl.java:28)

This is my sdk test code:

final static String baseUrl = “https://sdk-mainnet.aepps.com/v2”;
ServiceConfiguration serviceConf = ServiceConfiguration.configure().baseUrl(baseUrl).compile();
AccountService accountService = new AccountServiceFactory().getService(serviceConf);
Account account = accountService.getAccount(“ak_EvSv1tynyr7RrWt3tTgtFrNQN8Ma138cxudPpLf2gk8DyjK4j”).blockingGet();

quick update:

Cleaned and rebuiled the project, and SDK seemed to be wotking.Retrieved balance for account successfully . Havent tested creating transactions though. Thanks for the help.

Dependency mismatch is sometimes a pain :-/

If you need further assistance just let me know. I am also available in the aeternity devchat now :wink: