Skip to content

Releases: Soneso/stellar-ios-mac-sdk

SEP-10 improvements

10 Dec 18:50
Compare
Choose a tag to compare
  • SEP-10 improvement: adds the possibility to pass a client domain signing function to WebAuthenticator.jwtToken(...), so that the challenge can be signed by a client domain signer on a remote server without having to store the signing key within the app.

  • ChangeTrustAsset improvement of sort order validation. See also: #167.

  • Extend Network enum so that the network passphrase can be accessed.

SEP-12 customer files support

04 Dec 13:01
Compare
Choose a tag to compare

Adds support for SEP-12 post and get customer files endpoints. See also SEP-12 doc.

Protocol 22

25 Nov 16:01
Compare
Choose a tag to compare

This version is unchanged from beta.2, whose changelog can be found here.

Protocol 22-rc3 support

04 Nov 13:42
Compare
Choose a tag to compare

This release adds support for Protocol 22-rc3 and maintains backwards compatibility for Protocol 21 and Protocol 22-rc2.

See also: #166

Changes:

  • The createdAt field from TransactionInfo is now an int again.
  • The field pagingToken from EventInfo is not nullable any more and will be filled for any version.

If you upgrade from the latest stable release (3.0.0) please read the info in release 3.0.1-beta1 first.

Protocol 22 Support

24 Oct 13:58
Compare
Choose a tag to compare

This release adds support for Protocol 22 and maintains backwards compatibility for Protocol 21.

See also: #163

To maintain compatibility for Protocol 21 until Protocol 22 is released you have to consider following braking changes if you are using this version of the SDK:

Horizon:

  • The deprecated fields amount and numAccounts have been removed from AssetResponse

Soroban:

  • The legacy field cost has been removed from SimulateTransactionResponse
  • The createdAt field from TransactionInfo is now a String. It was int before.

Other tips for migrating to Protocol 22:

  • Soroban: The field pagingToken from EventInfo will not be filled any more starting with Protocol 22. Instead, the new field cursor in GetEventsResponse will be filled starting with Protocol 22.
  • Soroban: The new field txHash in GetTransactionResponse and TransactionInfo will be filled starting with Protocol 22.
  • Soroban: You can use the new CreateContractWithConstructorHostFunction class to create contracts that have a constructor.

Async/await support

10 Oct 13:42
Compare
Choose a tag to compare

Async/await support:

  • adds support for async/await (see SE-0296)

Other changes:

  • renamed Walletclass to WalletUtils
  • removed unnecessary throws
  • improved test cases
  • improved documentation

Soroban Contract Parser & SEP imporvements

05 Sep 11:31
Compare
Choose a tag to compare

Soroban Contract Parser

This release adds a soroban contract parser that allows you to access the contract info stored in the contract bytecode.
You can access the environment metadata, contract spec and contract meta.

The environment metadata holds the interface version that should match the version of the soroban environment host functions supported.

The contract spec contains a SCSpecEntryXDR for every function, struct, and union exported by the contract.

In the contract meta, contracts may store any metadata in the entries that can be used by applications and tooling off-network.

You can access the parser directly if you have the contract bytecode:

let byteCode = FileManager.default.contents(atPath: 'path to .wasm file')
let contractInfo = try SorobanContractParser.parseContractByteCode(byteCode: byteCode)

Or you can use SorobanServer methods to load the contract code form the network and parse it.

By contract id:

sorobanServer.getContractInfoForContractId(contractId: contractId) { (response) -> (Void) in
    switch response {
    case .success(let contractInfo):
        // ...
    case .rpcFailure(let error):
        // ...
    case .parsingFailure (let error):
        // ...
    }
}

By wasm id:

sorobanServer.getContractInfoForWasmId(wasmId: wasmId) { (response) -> (Void) in
    switch response {
    case .success(let contractInfo):
        // ...
    case .rpcFailure(let error):
        // ...
    case .parsingFailure (let error):
        // ...
    }
}

The parser returns a SorobanContractInfo object containing the parsed data.
In SorobanParserTest.swift you can find a detailed example of how you can access the parsed data.

SEP improvements

SEP-06: allow extra fields to be added in the deposit and withdrawal requests.
SEP-06: add the new userActionRequired field to the transaction response object.
SEP-24: add the new userActionRequired field to the transaction response object.

Update for Horizon API historical data changes

07 Aug 05:13
Compare
Choose a tag to compare
  • Updated ClaimableBalanceResponse lastModifiedTime parsing. See #162

Horizon v2.31.0 and RPC v21.4.0 updates

25 Jul 11:55
Compare
Choose a tag to compare

Updates for Horizon v2.31.0
(see: #161)

  1. The new Horizon API endpoint: POST /transactions_async has been added.
    It is now covered in the sdk by following new methods:
sdk.transactions.submitAsyncTransaction(transaction:Transaction, ...)
sdk.transactions.submitFeeBumpAsyncTransaction(transaction:FeeBumpTransaction, ...)
sdk.transactions.postTransactionAsync(transactionEnvelope:String, ...)

see also: SubmitTransactionAsyncTestCase.swift

  1. Error schema change: POST /transactions now includes a the hash in its timeout response:

ErrorResponseExtras has been extended. It now provides txHash if the hash is available in the error response.

Updates for RPC v21.4.0
(see: #161)

  • added support for the new endpoints: getTransactions, getFeeStats and getVersionInfo.
  • fixed getEvents pagination options

Update SEP-12 support

  • added the new transaction_idrequest parameter to get and put customer requests.

Soroban improvements

06 Jun 19:04
Compare
Choose a tag to compare

1. Soroban Server improvements:

  • add getAccount and getContractData methods
  • add missing fields type and txHash to EventInfo
  • add useful xdr conversionvalueXdrto EventInfo
  • add missing fields latestLager and oldestLedger to GetHealthResponse
  • add useful xdr conversions transactionEnvelope, transactionResult and transactionMeta to GetTransactionResponse
  • add useful xdr conversions keyXdrValueand valueXdr to LedgerEntry
  • add missing resultErrorXdr field to SendTransactionResponse
  • make costoptional in SimulateTransactionResponse as it has been marked as deprecated in the RPC API docs.
  • make xdr and auth fields not nullable in SimulateTransactionResult

2. TxRep (SEP-11):

  • add soroban support