Releases: stellar/js-stellar-base
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).
v6.0.6
v6.0.5
This version bump fixes a security vulnerability in a developer dependency; please upgrade as soon as possible! You may be affected if you are working on this package in a developer capacity (i.e. you've cloned this repository) and have run yarn
or yarn install
any time on Oct 22nd, 2021. Refer to the security advisory for details.
Security Fix
- Pin
ua-parser-js
to a known safe version (#477).
v6.0.4
v6.0.3
v6.0.2
v6.0.1
This release adds support to CAP-38.
Add
- Introduced new CAP-38 operations
LiquidityPoolDepositOp
andLiquidityPoolWithdrawOp
. - Introduced two new types of assets,
LiquidityPoolId
andLiquidityPoolAsset
.
Update
- The XDR definitions have been updated to support CAP-38.
- Extended
Operation
class with theOperation.revokeLiquidityPoolSponsorship
helper that allows revoking a liquidity pool sponsorship. - Asset types now include
AssetType.liquidityPoolShares
. Operation.changeTrust
andChangeTrustOp
can now useLiquidityPoolAsset
in addition toAsset
.Operation.revokeTrustlineSponsorship
can now useLiquidityPoolId
in addition toAsset
.
v6.0.0 (broken)
This release adds support to CAP-38.
Add
- Introduced new CAP-38 operations
LiquidityPoolDepositOp
andLiquidityPoolWithdrawOp
. - Introduced two new types of assets,
LiquidityPoolId
andLiquidityPoolAsset
.
Update
- The XDR definitions have been updated to support CAP-38.
- Extended
Operation
class with theOperation.revokeLiquidityPoolSponsorship
helper that allows revoking a liquidity pool sponsorship. - Asset types now include
AssetType.liquidityPoolShares
. Operation.changeTrust
andChangeTrustOp
can now useLiquidityPoolAsset
in addition toAsset
.Operation.revokeTrustlineSponsorship
can now useLiquidityPoolId
in addition toAsset
.
v5.3.2
With this release, all "critical" (subjective, given these dependencies were used exclusively during development) and most meaningful high-severity vulnerabilities in dependencies have been resolved through minor version updates.