Skip to content

Releases: Soneso/stellar_flutter_sdk

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.

Headers and Web fixes

16 Jul 11:22
Compare
Choose a tag to compare

Fixes:

  • fix request headers handling (see #98)
  • fix sequence number handling for web (see #97)

Breaking changes:

  • The sequence number has been changed from int to BigInt

Null-Safety improvements

01 Jul 09:44
Compare
Choose a tag to compare

Null-Safety improvements:

With the introduction of null-safety in dart, the sdk was migrated automatically, which resulted in all class member variables becoming nullable. Most places have been adapted in the mealtime, but there are still a few places that need to be updated.
This release updates the remaining places, especially classes representing horizon responses but also different xdr classes.

Big Amounts on Web:

This release also adds support for big amounts on web for many operations such as, change_trust,
create_account, payment, path_payment_strict_send, path_payment_strict_receive, manage_sell_offer,
manage_buy_offer, create_passive_sell_offer, clawback, create_claimable_balance, liquidity_pool_deposit,
liquidity_pool_withdraw. See also: #96

Breaking changes:

ContractCreditedEffectResponse and ContractDebitedEffectResponse moved from liquidity_pools_effects_responses.dart to soroban_effects_responses.dart

LiquidityPoolDepositedEffectResponse: reservesDeposited is now a list of AssetAmount instead of ReserveResponse

LiquidityPoolWithdrewEffectResponse: reservesReceived is now a list of AssetAmount instead of ReserveResponse

LiquidityPoolRevokedEffectResponse: reservesRevoked is now a list of LiquidityPoolClaimableAssetAmount instead of ReserveResponse

TrustLineFlagsUpdatedEffectResponse moved from misc_effects_responses.dart to trustline_effects_responses.dart

CreatePassiveSellOfferOperationResponse: removed offerId since it is always null

LiquidityPoolDepositOperationResponse: reservesMax & reservesDeposited are now a list of AssetAmount instead of ReserveResponse

Operation: id is now a String instead of int

EffectsRequestBuilder forOperation(String operationId): operationIdis now aStringinstead ofint`

Future<OperationResponse> operation(String operationId): operationId is now a String instead of int

Soroban improvements

06 Jun 18:43
Compare
Choose a tag to compare

1. Soroban Server improvements:

  • add getAccountand getContractData methods
  • add missing fields oldestLedger and latestLedger to the get health response
  • add useful xdr conversions: ledgerEntryData and keyVal for LedgerEntry
  • add useful xdr conversions: xdrTransactionEnvelope, xdrTransactionResult, xdrTransactionMeta for GetTransactionResponse
  • add missing field txHash to EventInfo
  • add useful xdr conversion: valueXdr to EventInfo
  • improve simulate transaction result: xdr and auth are not nullable any more

2. SEP-11 (TxRep):

  • add soroban support

3. XDR helper methods

  • multiple useful additional helper methods in the soroban and classic XDR classes.

4. Breaking changes:

  • renamed Row to OrderBookRow for the order book response
  • typo: renamed statusChangesto stateChanges for the soroban simulate transaction response

Protocol 21 Support

13 May 19:24
Compare
Choose a tag to compare

adds support for protocol 21. see #93

Update Soroban RPC Args

29 Apr 13:45
Compare
Choose a tag to compare
  • update soroban RPC args for sendTransaction and getTransaction
  • allow optional httpClient to init StellarSDK. See #91

SEP-08 support

24 Apr 16:04
Compare
Choose a tag to compare

adds support for SEP-08. See doc.