Skip to content

Releases: Soneso/stellar_flutter_sdk

SEP-12 additions & experimental passkey support

04 Dec 13:21
Compare
Choose a tag to compare
  • Adds support for SEP-12 post and get customer files endpoints. See also SEP-12 doc.
  • Adds experimental support for soroban passkeys. An example on how you can use the SDK to experiment with Soroban Smart Wallets can be found here.

Protocol 22

25 Nov 17:37
Compare
Choose a tag to compare

This version contains all changes from 1.9.1-beta, whose changelog can be found here.

In addition it fixes the contractID setter in XdrHashIDPreimage.

Protocol 22-rc3 support

04 Nov 13:28
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: #108

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 (1.8.9) please read the info from release 1.9.0-beta first.

Protocol 22 Support

24 Oct 13:17
Compare
Choose a tag to compare

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

See also: #104

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
  • The deprecated fields validBefore and validAfter have been removed from TransactionResponse

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.

Account response fix

22 Oct 16:46
Compare
Choose a tag to compare

Allows null values in account response for lastModifiedLedger. Fixes #105

SEP-7 & other improvements

05 Oct 17:34
Compare
Choose a tag to compare

SEP-7 improvements and refactoring:

  • signURI has been deprecated in favor of addSignature
  • SEP-7 urls can now be parsed via tryParseSep7Url
  • SEP-7 urls can now be validated via isValidSep7Url
  • Signed SEP-7 urls can now be validated via isValidSep7SignedUrl
  • checkUIRSchemeIsValid has been deprecated in favor of isValidSep7SignedUrl
  • verifyhas been deprecated in favor of verifySignature
  • verifySignature allows you to verify if a given sep-7 url has been signed by a given public key without having to request it from origin_domain
  • getParameterValuehas been deprecated in favor of tryParseSep7Url which returns all query parameters
  • the new function uriSchemeReplacementsToString allows you to build a replace parameter value from a list of UriSchemeReplacement objects
  • the new function uriSchemeReplacementsFromString takes a Sep-7 URL-decoded 'replace' string param and parses it to a list of
    UriSchemeReplacement objects for easy of use.
  • see also sep-7 test cases and sep-7 doc

Other improvements:

  • http client is now forwarded to EventSource, see: PR#102
  • updated toml to ^0.16.0
  • minor fixes

Soroban Contract Parser

05 Sep 10:53
Compare
Choose a tag to compare

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 XdrSCSpecEntry 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:

var byteCode = await Util.readFile("path to .wasm file");
var contractInfo = SorobanContractParser.parseContractByteCode(byteCode);

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

By contract id:

var contractInfo = await sorobanServer.loadContractInfoForContractId(contractId);

By wasm id:

var contractInfo = await sorobanServer.loadContractInfoForWasmId(wasmId);

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

SEP 6, 12 & 24 improvements

19 Aug 12:48
Compare
Choose a tag to compare

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.
SEP-12: null safety improvements.

Update for Horizon API historical data changes

09 Aug 11:15
Compare
Choose a tag to compare

Due to recent changes in the Stellar Development Foundation’s Horizon API, historical data will now be limited to one year. (https://stellar.org/blog/foundation-news/sdf-s-horizon-limiting-data-to-1-year)

As a result, some claimable balance responses may return a null value for the lastModifiedTime field.

To prevent parsing issues made the lastModifiedTime field optional.

Horizon v2.31.0 and RPC v21.4.0 updates

25 Jul 09:52
Compare
Choose a tag to compare

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

  1. The new Horizon API endpoint: POST /transactions_async has been added.
    It is now covered in the sdk by following new methods:
sdk.submitAsyncTransaction()
sdk.submitAsyncFeeBumpTransaction()
sdk.submitAsyncTransactionEnvelopeXdrBase64()

see also: transaction_async_test.dart

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

When submitting a transaction to the network, the sdk can throw the exception SubmitTransactionTimeoutResponseException
This exception now contains the hash of the transaction if available.

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

  • 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.

Update SEP support for web

The sdk now allows developers to set custom request headers for the SEP requests.
Although the sdk does not yet offer full support for web, this is a step that brings us closer to it,
because it helps us to avoid CORS issues.