Skip to content

Releases: stellar/js-stellar-base

v3.0.1

04 May 13:32
54637a3
Compare
Choose a tag to compare

Add

  • Add TypeScript definitions for auto-generated XDR code (#342)

v3.0.0

27 Apr 20:55
b5d605f
Compare
Choose a tag to compare

This version brings protocol 13 support with backwards compatibility support for protocol 12.

Add

  • Add TransactionBuilder.buildFeeBumpTransaction which makes it easy to create FeeBumpTransaction (#321).
  • Adds a feature flag which allow consumers of this library to create V1 (protocol 13) transactions using the TransactionBuilder (#321).
  • Add support for CAP0027: First-class multiplexed accounts (#325).
  • Add Keypair.xdrMuxedAccount which creates a new xdr.MuxedAccount(#325).
  • Add FeeBumpTransaction which makes it easy to work with fee bump transactions (#328).
  • Add TransactionBuilder.fromXDR which receives an xdr envelope and return a Transaction or FeeBumpTransaction (#328).

Update

  • Update XDR definitions with protocol 13 (#317).

  • Extend Transaction to work with TransactionV1Envelope and TransactionV0Envelope (#317).

  • Add backward compatibility support for CAP0018 (#317).

  • Update operations builder to support multiplexed accounts (#337).

    This allows you to specify an M account as the destination or source:

    var destination = 'MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6';
    var amount = '1000.0000000';
    var asset = new StellarBase.Asset(
      'USDUSD',
      'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
    );
    var source =
      'MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6';
    StellarBase.Operation.payment({
      destination,
      asset,
      amount,
      source
    });
    

    To use multiplexed accounts you need a Stellar network instance running Protocol 13 or higher

Breaking changes

  • Transaction.toEnvelope() returns a protocol 13 xdr.TransactionEnvelope which is an xdr.Union (#317).
    If you have code that looks like this - transaction.toEnvelope().tx - you have two options:

    • You can grab the value wrapped by the union, calling value() like transaction.toEnvelope().value().tx.
    • You can check which is the discriminant by using switch() and then call v0(), v1(), or feeBump().
  • The return value from Transaction.fee changed from number to string. This brings support for Int64 values (#321).

  • The const BASE_FEE changed from number to string (#321).

  • The option fee passed to new TransactionBuilder({fee: ..}) changed from number to string (#321).

  • The following fields, which were previously an xdr.AccountID are now a xdr.MuxedAccount (#325):

    • PaymentOp.destination
    • PathPaymentStrictReceiveOp.destination
    • PathPaymentStrictSendOp.destination
    • Operation.sourceAccount
    • Operation.destination (for ACCOUNT_MERGE)
    • Transaction.sourceAccount
    • FeeBumpTransaction.feeSource

    You can get the string representation by calling StrKey.encodeMuxedAccount which will return a G.. or M.. account.

  • Remove the following deprecated functions (#331):

    • Operation.manageOffer
    • Operation.createPassiveOffer
    • Operation.pathPayment
    • Keypair.fromBase58Seed
  • Remove the Network class (#331).

  • Remove vendor/base58.js (#331).

v3.0.0-alpha.1

23 Apr 22:43
f01f129
Compare
Choose a tag to compare

Update

  • Update operations builder to support multiplexed accounts (#337).

    This allows you to specify an M account as the destination or source:

    var destination = 'MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6';
    var amount = '1000.0000000';
    var asset = new StellarBase.Asset(
      'USDUSD',
      'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
    );
    var source =
      'MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6';
    StellarBase.Operation.payment({
      destination,
      asset,
      amount,
      source
    });
    

v3.0.0-alpha.0

22 Apr 15:51
81b3a58
Compare
Choose a tag to compare

This version brings protocol 13 support with backwards compatibility support for protocol 12.

Add

  • Add TransactionBuilder.buildFeeBumpTransaction which makes it easy to create FeeBumpTransaction (#321).
  • Adds a feature flag which allow consumers of this library to create V1 (protocol 13) transactions using the TransactionBuilder (#321).
  • Add support for CAP0027: First-class multiplexed accounts (#325).
  • Add Keypair.xdrMuxedAccount which creates a new xdr.MuxedAccount(#325).
  • Add FeeBumpTransaction which makes it easy to work with fee bump transactions (#328).
  • Add TransactionBuilder.fromXDR which receives an xdr envelope and return a Transaction or FeeBumpTransaction (#328).

Update

  • Update XDR definitions with protocol 13 (#317).
  • Extend Transaction to work with TransactionV1Envelope and TransactionV0Envelope (#317).
  • Add backward compatibility support for CAP0018 (#317).

Breaking changes

  • Transaction.toEnvelope() returns a protocol 13 xdr.TransactionEnvelope which is an xdr.Union (#317).
    If you have code that looks like this transaction.toEnvelope().tx you have two options:

    • You can grab the value wrapped by the union, calling value() like transaction.toEnvelope().value().tx.
    • You can check which is the discriminant by using switch() and then call v0(), v1(), or feeBump().
  • The return value from Transaction.fee changed from number to string. This brings support for Int64 values (#321).

  • The const BASE_FEE changed from number to string (#321).

  • The option fee passed to new TransactionBuilder({fee: ..}) changed from number to string (#321).

  • The following fields, which were previously an xdr.AccountID are now a xdr.MuxedAccount (#325):

    • PaymentOp.destination
    • PathPaymentStrictReceiveOp.destination
    • PathPaymentStrictSendOp.destination
    • Operation.sourceAccount
    • Operation.destination (for ACCOUNT_MERGE)
    • Transaction.sourceAccount
    • FeeBumpTransaction.feeSource

    You can get the string representation by calling StrKey.encodeMuxedAccount which will return a G.. or M.. account.

  • Remove the following deprecated functions (#331):

    • Operation.manageOffer
    • Operation.createPassiveOffer
    • Operation.pathPayment
    • Keypair.fromBase58Seed
  • Remove the Network class (#331).

  • Remove vendor/base58.js (#331).

v2.1.9

21 Apr 18:56
e59f214
Compare
Choose a tag to compare
v2.1.9 (#333)

v2.1.8

31 Mar 18:50
169581f
Compare
Choose a tag to compare

Fix

  • Fix setTimeout(0) and partially defined timebounds (#315).

v2.1.7

26 Mar 16:55
21ecf1a
Compare
Choose a tag to compare

Fix

  • Fix TypeScript options for ManageData operation to allow setting value to null (#310)
  • Fix crash on partially defined time bounds (#303)

v2.1.6

18 Feb 21:29
e1f5822
Compare
Choose a tag to compare
v2.1.6. (#302)

v2.1.5

18 Feb 20:03
6bb4a4d
Compare
Choose a tag to compare

Add

  • Add toXDR type to Transaction class (#296)

Fix

  • Fix doc link (#298)

Remove

  • Remove node engine restriction (#294)

Update

  • Update creating an account example (#299)
  • Use console.trace to get line num in Networks.use (#300)

v2.1.4

23 Jan 23:21
757926d
Compare
Choose a tag to compare
  • Regenerate the XDR definitions to include MetaV2 (#288)