Skip to content

Releases: ArweaveTeam/arweave-js

Drop NodeJS v16 Support

19 Mar 09:48
v1.15.0
efa533a
Compare
Choose a tag to compare

Maintenance Release

  • fix tests with nodejs v20 LTS
  • remove v16 support
  • extra wallet generation tests

Potentially breaking fix

04 Jul 06:10
Compare
Choose a tag to compare

Patch includes:

  1. README edits
  2. New argument check for node-driver hash function.

Point 2 enforces not using strings in nodejs environments without type-checking (e.g. SW contracts).

Meaning: don’t allow string as data argument for hash(data: Uint8Array, algorithm?: string): Promise<Uint8Array>;

This ensures both code portability for browser execution, and future proofing against arweave-js upgrading to use NodeJS Web Crypto API.

Fix error handling

15 Mar 20:05
Compare
Choose a tag to compare

This maintenance release closes 4 long standing open issues:

  • TypeError: Cannot read properties of undefined (reading 'replace') occurred when no wallet was found to sign transactions. We now do some jwk checks and close a logic opening which would result in an undefined object being treated as a jwk object, and return a more meaningful error.
  • arweave.api now decodes retrieved text txs with specified charset in it's Content-Type header (as opposed to defaulting all text to UTF-8).
  • Throw an error when getPrice receives a bad response from the server.
  • Throw an error when getTransactionAnchor receives a bad response from the server.

v1.13.0

15 Feb 11:16
Compare
Choose a tag to compare

Arweave.init changes

  • improved host detection
  • clips off subdomain so that ArNS domains can use the gateway

Arweave.api

  • expose web stream

v1.12.4

27 Jan 03:21
Compare
Choose a tag to compare

Release Notes

This update allows arweave-js to run in modern environments such as Chrome Extension Manifest V3.

Rationale: It seems like the industry is moving towards dropping the original XmlHttpRequest API in favour of Fetch API. Examples include the above browser extensions standard and web workers, which only support Fetch API.

Why not add a package like node-fetch? To simplify, rather than adding more complications to our inherited code, but PRs welcome.

Added dependency

Fetch API. Available in all modern browsers. Available as standard since node v18+ (*opt-in experimental since node v16.5).

Removed dependencies

Axios, node:utils (polyfill)

*Notes for NodeJS v16.5 - v17

To run with node v16.5+, you need to specify the --experimental-fetch flag in your app.

Examples

These can be added to your packages.json start script, or Dockerfile entrypoint

node

  • node --experimental-fetch --no-warnings <your-app.js>

ts-node

  • NODE_OPTIONS='--experimental-fetch --no-warnings' ts-node experimental-fetch.ts <your-app.ts>

Update September 2023

1.9.1

05 Aug 18:24
Compare
Choose a tag to compare

Improved support for larger transactions.

1.8.0

16 Jul 15:21
Compare
Choose a tag to compare

Added support for chunked uploads

1.7.1

11 May 16:14
Compare
Choose a tag to compare
Version bump 1.7.1

1.7.0

04 May 10:16
Compare
Choose a tag to compare

Added support for v2 transaction format