v7.0.0
This release introduces unconditional support for muxed accounts (#485).
Breaking Changes
In v5.2.0, we introduced opt-in support for muxed accounts, where you would need to explicitly pass a true
flag if you wanted to interpret muxed account objects as muxed addresses (in the form M...
, see SEP-23). We stated that this would become the default in the future. That is now the case.
The following fields will now always support muxed properties:
FeeBumpTransaction.feeSource
Transaction.sourceAccount
Operation.sourceAccount
Payment.destination
PathPaymentStrictReceive.destination
PathPaymentStrictSend.destination
AccountMerge.destination
Clawback.from
The following functions had a withMuxing
parameter removed:
Operation.fromXDRObject
Transaction.constructor
FeeBumpTransaction.constructor
TransactionBuilder.fromXDR
TransactionBuilder.buildFeeBumpTransaction
The following functions will no longer check the opts
object for a withMuxing
field:
TransactionBuilder.constructor
Operation.setSourceAccount
There are several other breaking changes:
TransactionBuilder.enableMuxedAccounts()
is removeddecodeAddressToMuxedAccount()
andencodeMuxedAccountToAddress()
no longer accept a second boolean parameterAccount.createSubaccount()
andMuxedAccount.createSubaccount()
are removed (#487). You should prefer to create them manually:
let mux1 = new MuxedAccount(someAccount, '1');
// before:
let mux2 = mux1.createSubaccount('2');
// now:
let mux2 = new MuxedAccount(mux1.baseAccount(), '2');
- Introduced a new helper method to help convert from muxed account addresses to their underlying Stellar addresses (#485):
function extractBaseAddess(address: string): string;
- The following muxed account validation functions are now available from Typescript (#483):
namespace StrKey {
function encodeMed25519PublicKey(data: Buffer): string;
function decodeMed25519PublicKey(data: string): Buffer;
function isValidMed25519PublicKey(publicKey: string): boolean;
}
function decodeAddressToMuxedAccount(address: string, supportMuxing: boolean): xdr.MuxedAccount;
function encodeMuxedAccountToAddress(account: xdr.MuxedAccount, supportMuxing: boolean): string;
function encodeMuxedAccount(gAddress: string, id: string): xdr.MuxedAccount;
- Introduced a helper function which lets you pre-determine the hex claimable balance ID of a
createClaimableBalance
operation prior to submission to the network (#482):
class Transaction {
// ...
function getClaimableBalanceId(opIndex: number): string;
}
Fix
- Add
Buffer
as a parameter type option for theKeypair
constructor in Typescript (#484).