Skip to content

v3.0.0

Compare
Choose a tag to compare
@Shaptic Shaptic released this 22 Jun 20:38
· 22 commits to master since this release
f98705f

Breaking Changes

  • Add support for easily encoding integers larger than 32 bits (#100).

This (partially) breaks the API for creating Hyper and UnsignedHyper instances. Previously, you would pass low and high parts to represent the lower and upper 32 bits. Now, you can pass the entire 64-bit value directly as a bigint or string instance, or as a list of "chunks" like before, e.g.:

-new Hyper({ low: 1, high: 2 }); // representing (1 << 32) + 2 = 4294967298n
+new Hyper(4294967298n);
+new Hyper("4294967298");
+new Hyper(1, 2);

Note that stellar/dts-xdr has been updated to generate the correct TypeScript definitions that correspond to this change.