github PolymeshAssociation/polymesh-sdk v17.0.0

latest releases: v26.2.0-alpha.5, v26.2.0-alpha.4, v26.2.0-alpha.3...
2 years ago

17.0.0 (2022-09-21)

Bug Fixes

  • 🐛 fix bug where only the default signer was used (#831) (c04d5e4)
  • 🐛 improve the typing of splitTransactions (83a7af7)

Features

  • 🎸 allow for exempted identities to be removed (5036a1d)
  • 🎸 release elimination of transaction queues (#828) (7d5a11b), closes #785
  • 🎸 use a more specific type for onStatusChange in txBase (#829) (32bf5d9)
  • 🎸 remove Transaction Queues
    The TransactionQueue class has been removed. Most of its methods have been moved over to
    PolymeshTransaction and PolymeshTransactionBatch. Methods that returned a TransactionQueue
    (all endpoints that write to the blockchain, such as sdk.assets.registerTicker) now return
    either a PolymeshTransaction or PolymeshTransactionBatch. This means that all operations
    in the SDK are now atomic and not prone to race conditions or half-states
  • The onProcessedByMiddleware method has been moved to PolymeshTransaction and
    PolymeshTransactionBase
  • The Fees interface now contains a total property which is the sum of free
    and locked
  • The PayingAccountType enum now includes a Caller member, to represent cases
    where the calling Account has to pay for a transaction’s fees

BREAKING CHANGES

  • 🧨 non passed exempted identities are removed when calling
    setTransferRestriction
  • 🧨 remove Transaction Queues
    • Remove the inputArgs property from PolymeshTransaction. Replaced by the args
      property. Arguments for PolymeshTransaction and PolymeshTransactionBatch are now
      available at any point in time (previously they could depend on the result of a previous
      transaction in the queue)
    • Remove the isCritical property from both PolymeshTransaction and PolymeshTransactionBatch.
      It no longer makes sense without Transaction Queues
    • Change the run method in PolymeshTransaction and PolymeshTransactionBatch to work similarly
      to the run method in TransactionQueue. The method will check if the caller account has
      enough balance for fees, the transaction will be run and its status updated. The method returns
      a Promise that resolves to the result of running the transaction. For example, calling run on
      the transaction returned by asset.registerTicker will return a Promise that resolves to a
      TickerReservation entity
    • Change the argument received by the callback passed to onStatusChange to
      PolymeshTransactionBase. If type refinement is required, the isPolymeshTransaction
      and isPolymeshTransactionBatch typeguards can be used (they can be imported from types)
    • Change the return type of getFees in PolymeshTransaction and PolymeshTransactionBatch
      to PayingAccountFees, which contains details about the Account that will pay for the fees,
      its remaining balance (before paying), and the fees themselves
    • Remove the getPayingAccount method from PolymeshTransaction and PolymeshTransactionBatch.
      Its result is now contained in getFees
    • Change the PayingAccount type to now only contain allowance: BigNumber when type is
      Subsidy. For Caller and Other, there is no allowance
    • Rename getFees to getTotalFees in PolymeshTransaction and PolymeshTransactionBatch

Don't miss a new polymesh-sdk release

NewReleases is sending notifications on new releases.