Skip to content

v12.1.0

Compare
Choose a tag to compare
@Shaptic Shaptic released this 14 Jun 17:29
· 53 commits to master since this release
10e5edc

v12.1.0

Added

  • contract now exports the DEFAULT_TIMEOUT (#984).
  • contract.AssembledTransaction now has:
    • toXDR and fromXDR methods for serializing the transaction to and from XDR. These methods should be used in place of AssembledTransaction.toJSON and AssembledTransaction.fromJSONfor multi-auth signing. The JSON methods are now deprecated. Note: you must now call simulate on the transaction before the final signAndSend call after all required signatures are gathered when using the XDR methods (#977).
    • a restoreFootprint method which accepts the restorePreamble returned when a simulation call fails due to some contract state that has expired. When invoking a contract function, one can now set restore to true in the MethodOptions. When enabled, a restoreFootprint transaction will be created and await signing when required (#991).
    • separate sign and send methods so that you can sign a transaction without sending it (signAndSend still works as before; #922).
  • contract.Client now has a txFromXDR method which should be used in place of txFromJSON for multi-auth signing (#977).

Deprecated

  • In contract.AssembledTransaction, toJSON and fromJSON should be replaced with toXDR and fromXDR.
  • In contract.Client, txFromJSON should be replaced with txFromXDR.

Fixed

  • If you edit an AssembledTransaction with tx.raw = cloneFrom(tx.build), the tx.simulationData will now be updated correctly (#985).