v13.0.0-beta.1: Protocol 22
Pre-release
Pre-release
·
125 commits
to master
since this 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#signAuthEntriesnow takes anaddressinstead 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=falseto build without theaxiosdependency: this will buildstellar-sdk-no-axios.jsandstellar-sdk-no-axios.min.jsin thedist/directory, or just runyarn build:browser:no-axiosto generate these files. - You can import Node packages without the
axiosdependency 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=falseto build without theeventsourcedependency: this will buildstellar-sdk-no-eventsource.jsandstellar-sdk-no-eventsource.min.jsin thedist/directory, or just runyarn build:browser:no-eventsourceto generate these files. - You can import Node packages without the
eventsourcedependency 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.jsfor the browser build and import from@stellar/stellar-sdk/minimalfor the Node package.
- Set
contract.AssembledTransaction#signAuthEntriesnow allows you to overrideauthorizeEntry. This can be used to streamline novel workflows using cross-contract auth. (#1044)rpc.Servernow has agetSACBalancehelper 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#nonInvokerSigningBynow correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error.signwill 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