Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Update CHANGELOG for v0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Synesso committed Feb 14, 2021
1 parent 626eee4 commit b952a75
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 25 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ As this project is pre 1.0, breaking changes may happen for minor version bumps.

## Next version

## 0.19.0

- A wide-ranging review of the SDK resulted in realignments to SDK/Network interactions and some data types. This has
resulted in minor breaking changes. These are:
- Many types that previously has `Seq[Byte]`, `LazyList[Byte]` or `Array[Byte]` as parameters now take
`okio.ByteString`. This is an efficient byte array wrapper that supports natural equality checking, fast encoding
and smart toString values. Migrate your code by constructing a ByteString from the existing array.
- [#388](https://github.com/Synesso/scala-stellar-sdk/issues/388) Fixes failure to deserialise ledger entries
- Domain model `decode` and `encode` has been replaced by `decodeXdr` and `xdr` methods, which take and return XDR
values. XDR values support an `encode()` method that returns a ByteString. For example, you might have previously
written `transaction.encode // LazyList[Byte]`. Migrate this with `transaction.xdr.encode() // ByteString`.
- `TransactionLedgerEntries`, which is part of a transaction response's metadata, has had its interface simplified.

## 0.18.0

- [#219](https://github.com/Synesso/scala-stellar-sdk/issues/219) Implement Offers endpoint
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Build](https://github.com/Synesso/scala-stellar-sdk/workflows/Build/badge.svg?branch=master)
[![Coverage](https://img.shields.io/codecov/c/gh/Synesso/scala-stellar-sdk.svg)](https://codecov.io/gh/Synesso/scala-stellar-sdk)
[![Issues](https://img.shields.io/github/issues/Synesso/scala-stellar-sdk.svg)](https://github.com/Synesso/scala-stellar-sdk/issues)
![Supports Stellar Horizon v1.12.0](https://img.shields.io/badge/Horizon-v1.12.0-blue.svg)
![Supports Stellar Horizon v1.14.0](https://img.shields.io/badge/Horizon-v1.14.0-blue.svg)
![Supports Stellar Core v15](https://img.shields.io/badge/Core-v15-blue.svg)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)

Expand All @@ -18,7 +18,7 @@ Add the JitPack & jcenter resolvers and the [latest dependency](https://jitpack.
```scala
resolvers += "jitpack" at "https://jitpack.io"
resolvers += Resolver.jcenterRepo
libraryDependencies += "com.github.synesso" %% "scala-stellar-sdk" % "0.18.0"
libraryDependencies += "com.github.synesso" %% "scala-stellar-sdk" % "0.19.0"
```

From there, it is a simple affair to create and fund a new account on the test network.
Expand Down
1 change: 0 additions & 1 deletion src/it/scala/stellar/sdk/LocalNetworkIntegrationSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ class LocalNetworkIntegrationSpec(implicit ee: ExecutionEnv) extends Specificati
timeBounds = TimeBounds.Unbounded,
maxFee = NativeAmount(100)
).sign(accnA)
_ = println(txn.encodeXDR)
txnResult <- txn.submit()
} yield txnResult must beLike[TransactionPostResponse] { case r: TransactionApproved =>
r.isSuccess must beTrue
Expand Down
9 changes: 0 additions & 9 deletions src/it/scala/stellar/sdk/TestNetworkJourney.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,8 @@ class TestNetworkJourney(implicit ee: ExecutionEnv) extends Specification with B
val signedTransaction = Transaction(sender, List(payment), NoMemo, TimeBounds.Unbounded, NativeAmount(100))
.sign(senderKey)
val parsedV0Txn: SignedTransaction = SignedTransaction.decodeXdr(signedTransaction.xdr)
println(s"signedTransaction.xdr = ${signedTransaction.xdr.encode().base64()}")
println(s"parsedV0Txn.xdr = ${parsedV0Txn.xdr.encode().base64()}")
val bumpedTxn = parsedV0Txn.bumpFee(NativeAmount(500), recipientKey)
println(s"bumpedTxn.xdr = ${bumpedTxn.xdr.encode().base64()}")
val response = Await.result(bumpedTxn.submit(), 20.seconds)
println(s"response = $response")
response.isSuccess must beTrue
}
*/
Expand Down
10 changes: 0 additions & 10 deletions src/main/scala/stellar/sdk/model/StrKey.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ case class AccountId(hash: Seq[Byte], subAccountId: Option[Long] = None) extends
case _ => (12 << 3).toByte // M
}

// override def encodeToChars: Seq[Char] = subAccountId match {
// case None => super.encodeToChars
// case Some(id) => codec.encode((kind +: long(id) ++: hash ++: checksum).toArray).map(_.toChar).toIndexedSeq
// }

// override def checksum: Seq[Byte] = subAccountId match {
// case None => ByteArrays.checksum((kind +: hash).toArray).toIndexedSeq
// case Some(id) => ByteArrays.checksum((kind +: long(id) ++: hash).toArray).toIndexedSeq
// }

val isMulitplexed: Boolean = subAccountId.isDefined
def publicKey: PublicKey = KeyPair.fromPublicKey(hash)

Expand Down
1 change: 0 additions & 1 deletion src/main/scala/stellar/sdk/model/Transaction.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ case class Transaction(
.build()

def hash: ByteString = signatureBase.sha256()
// def hash: ByteString = new ByteString(network.networkId ++ xdr.encode().toByteArray).sha256()

def signatureBase: ByteString =
new TransactionSignaturePayload.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ object TransactionResult {
case TransactionResultCode.txSUCCESS =>
TransactionSuccess(
feeCharged = fee,
// operationResults = xdr.getResult.getInnerResultPair.getResult.getResult.getResults.map(OperationResult.decodeXdr).toList,
operationResults = xdr.getResult.getResults.map(OperationResult.decodeXdr).toList,
// hash = new ByteString(xdr.getResult.getInnerResultPair.getTransactionHash.getHash)
hash = ByteString.EMPTY
)

Expand Down

0 comments on commit b952a75

Please sign in to comment.