v12.1.0
Added
contractnow exports theDEFAULT_TIMEOUT(#984).contract.AssembledTransactionnow has:toXDRandfromXDRmethods for serializing the transaction to and from XDR. These methods should be used in place ofAssembledTransaction.toJSONandAssembledTransaction.fromJSONfor multi-auth signing. The JSON methods are now deprecated. Note: you must now callsimulateon the transaction before the finalsignAndSendcall after all required signatures are gathered when using the XDR methods (#977).- a
restoreFootprintmethod which accepts therestorePreamblereturned when a simulation call fails due to some contract state that has expired. When invoking a contract function, one can now setrestoretotruein theMethodOptions. When enabled, arestoreFootprinttransaction will be created and await signing when required (#991). - separate
signandsendmethods so that you can sign a transaction without sending it (signAndSendstill works as before; #922).
contract.Clientnow has atxFromXDRmethod which should be used in place oftxFromJSONfor multi-auth signing (#977).
Deprecated
- In
contract.AssembledTransaction,toJSONandfromJSONshould be replaced withtoXDRandfromXDR. - In
contract.Client,txFromJSONshould be replaced withtxFromXDR.
Fixed
- If you edit an
AssembledTransactionwithtx.raw = cloneFrom(tx.build), thetx.simulationDatawill now be updated correctly (#985).