Stellar SDK for Scala

This is the SDK for performing Stellar operations via Scala. It provides the ability to access the Stellar network via Horizon instances to build and submit transactions, query the state of the network and stream updates.

Scala developers may prefer to use this SDK because it provides a more natural API for Scala developers than the official Java SDK

The code throughout this documentation is compiled against Scala 2.13.


Add the jitpack resolver.

resolvers += "jitpack" at ""

Then, add the SDK via your dependency management tool.

libraryDependencies += "io.github.synesso" %% "scala-stellar-sdk" % "0.21.1"
dependencies {
  implementation "io.github.synesso:scala-stellar-sdk_2.13:0.21.1"

Creating an account on the public test network.

sourceval kp = KeyPair.random
val response =

Fetching the details of an account.

sourceval account: Future[Account] = network.account(kp).map(_.toAccount)
val nextSeqNo: Future[Long] =

Submitting a payment.

sourcefor {
  sourceAccount <- network.account(payerKeyPair)
  response <- model.Transaction(sourceAccount, timeBounds = Unbounded, maxFee = NativeAmount(100))
    .add(PaymentOperation(payeePublicKey.toAccountId, lumens(5000)))
} yield response

For more detailed coverage, continue by reading about KeyPairs.


Please enjoy the scaladoc for this release.

Deprecation warning

At this stage, classes and interfaces are likely to be refined. Minor releases may break backwards compatibility with minimal notice until v1.0.0.

Check the CHANGELOG for details of breaking changes.


Contributions are warmly welcomed. Please feel free to contribute by reporting issues you find, or by suggesting changes to the code. Or feel free to add your own features/issues to that list.

You can contact me on KeyBase.