v13.0.0-beta.1: Protocol 22
Pre-release
Pre-release
v13.0.0-beta.1
This is the first release that supports Protocol 22. While the network has not upgraded yet, you can start integrating the new features into your codebase if you want a head start. Keep in mind that while the binary XDR is backwards-compatible, the naming and layout of structures is not. In other words, this build will continue to work on Protocol 21, but you may have to update code that references XDR directly.
Breaking Changes
contract.AssembledTransaction#signAuthEntries
now takes anaddress
instead of apublicKey
. This brings the API more inline with its actual functionality: It can be used to sign all the auth entries for a particular address, whether that is the address of an account (public key) or a contract. (#1044).- The Node.js code will now Babelify to Node 18 instead of Node 16, but we stopped supporting Node 16 long ago so this shouldn't be a breaking change.
Added
- You can now build the browser bundle without various dependencies:
- Set
USE_AXIOS=false
to build without theaxios
dependency: this will buildstellar-sdk-no-axios.js
andstellar-sdk-no-axios.min.js
in thedist/
directory, or just runyarn build:browser:no-axios
to generate these files. - You can import Node packages without the
axios
dependency via@stellar/stellar-sdk/no-axios
. For Node environments that don't support modern imports, use@stellar/stellar-sdk/lib/no-axios/index
. - Set
USE_EVENTSOURCE=false
to build without theeventsource
dependency: this will buildstellar-sdk-no-eventsource.js
andstellar-sdk-no-eventsource.min.js
in thedist/
directory, or just runyarn build:browser:no-eventsource
to generate these files. - You can import Node packages without the
eventsource
dependency via@stellar/stellar-sdk/no-eventsource
. For Node.js environments that don't support modern imports, use@stellar/stellar-sdk/lib/no-eventsource/index
. - To use a minimal build without both Axios and EventSource, use
stellar-sdk-minimal.js
for the browser build and import from@stellar/stellar-sdk/minimal
for the Node package.
- Set
contract.AssembledTransaction#signAuthEntries
now allows you to overrideauthorizeEntry
. This can be used to streamline novel workflows using cross-contract auth. (#1044)rpc.Server
now has agetSACBalance
helper which lets you fetch the balance of a built-in Stellar Asset Contract token held by a contract (#1046):
export interface BalanceResponse {
latestLedger: number;
/** present only on success, otherwise request malformed or no balance */
balanceEntry?: {
/** a 64-bit integer */
amount: string;
authorized: boolean;
clawback: boolean;
lastModifiedLedgerSeq?: number;
liveUntilLedgerSeq?: number;
};
}
Fixed
contract.AssembledTransaction#nonInvokerSigningBy
now correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error.sign
will ignore these contract addresses, since auth happens via cross-contract call (#1044).
Contributors
@Shaptic @psheth9 @BlaineHeffron @chadoh
New Contributors
- @ElliotFriend made their first contribution in #965
- @omahs made their first contribution in #1069
Full Changelog: v12.3.0...v13.0.0-beta.1