{"_id":"@irys/arweave","_rev":"5-fd09f22ca6d50f832c819b3f74aba5c8","name":"@irys/arweave","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@irys/arweave","version":"0.0.1","author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","_id":"@irys/arweave@0.0.1","maintainers":[{"name":"joshbundlr","email":"josh@bundlr.network"},{"name":"jessetherobot","email":"jesse@bundlr.network"}],"dist":{"shasum":"3b8ca0dd6eb5ef5edd8abb67dd673f28f3f473f4","tarball":"https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.1.tgz","fileCount":239,"integrity":"sha512-yzM3g2hEa0f33aRQJZi8OFjSUu80gxj1VGHYDBNCnRTKyBB5YqJG5xBr0sh8Uh5Q6ROJYtlVMBDtrdDn+3sjUQ==","signatures":[{"sig":"MEUCIBz7wVOXQdd3ccyLwyDCIZvK1YxCfjDeWWBc2GTzZupMAiEAtAJWKxR7YxNMZJNZCOQQReR2ZMHDNoYfhJdLn2n69fA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1576952},"main":"./build/cjs/cjsIndex.js","module":"./build/esm/esmIndex.js","browser":"./build/esm/web/index.js","exports":{".":{"import":{"node":"./build/esm/node/index.js","default":"./build/esm/esmIndex.js"},"browser":"./build/esm/web/index.js","require":{"node":"./build/cjs/node/index.js","default":"./build/cjs/cjsIndex.js"}},"./*":{"types":"./*.d.ts","default":"./*.js"},"./web":{"import":{"default":"./build/esm/web/index.js"},"require":{"default":"./build/cjs/web/index.js"}},"./node":{"import":{"default":"./build/esm/node/index.js"},"require":{"default":"./build/cjs/node/index.js"}},"./bundle":{"types":"./build/esm/esmIndex.d.ts","default":"./build/bundle.js"}},"scripts":{"lint":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx","test":"jest","clean":"rm -rf ./build","watch":"tsc --watch -p tsconfig.json","lint:fix":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx --fix","web:test":"concurrently \"npm run bundle:web\" \"npm run bundle:web:test\" && opener ./tests/web/web.html","dev:build":"npm run clean && concurrently \" yarn tsc -p cjs.tsconfig.json && sh ./scripts/fix-pkg.sh cjs commonjs \"  \" yarn tsc -p esm.tsconfig.json && sh ./scripts/fix-pkg.sh esm module && yarn tsc-esm-fix --tsconfig esm.tsconfig.json  \" ","bundle:web":"npx webpack --config-name web","prod:build":"npm run dev:build && npm run bundle:web:prod && ts-node scripts/embedVersion.ts","bundle:web:prod":"npx webpack --config-name web-prod","bundle:web:test":"npx webpack --config-name web-tests"},"_npmUser":{"name":"jessetherobot","email":"jesse@bundlr.network"},"repository":{"url":"https://github.com/Bundlr-Network/arweave","type":"git"},"description":"@irys/arweave is a JavaScript/TypeScript SDK for interacting with [Arweave](https://www.arweave.org/) and uploading data to the permaweb. It works in latest browsers and Node JS.","directories":{},"dependencies":{"axios":"^1.4.0","asn1.js":"^5.4.1","base64-js":"^1.5.1","async-retry":"^1.3.3","bignumber.js":"^9.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","jest":"^29.5.0","buffer":"^6.0.3","eslint":"^8.42.0","opener":"^1.5.2","ts-jest":"^29.1.0","ts-node":"^10.9.1","webpack":"^5.88.1","prettier":"^2.8.8","arconnect":"^0.4.2","ts-loader":"^9.4.4","typescript":"^5.1.3","@types/chai":"^4.3.5","@types/jest":"^29.5.2","@types/node":"^20.2.5","inspectpack":"^4.7.1","tsc-esm-fix":"^2.20.14","webpack-cli":"^4.9.2","@types/bn.js":"^5.1.1","concurrently":"^8.2.0","tsconfig-paths":"^4.2.0","readable-stream":"^4.4.2","resolve-tspaths":"^0.8.13","resolve.exports":"^2.0.2","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@types/async-retry":"^1.4.5","eslint-plugin-jest":"^27.2.1","terser-webpack-plugin":"^5.3.9","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/arweave_0.0.1_1695418004354_0.4593734992940719","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@irys/arweave","version":"0.0.2","author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","_id":"@irys/arweave@0.0.2","maintainers":[{"name":"joshbundlr","email":"josh@bundlr.network"},{"name":"jessetherobot","email":"jesse@bundlr.network"}],"dist":{"shasum":"c0e73eb8c15e323342d33ea92701d4036fd22ae3","tarball":"https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.2.tgz","fileCount":238,"integrity":"sha512-ddE5h4qXbl0xfGlxrtBIwzflaxZUDlDs43TuT0u1OMfyobHul4AA1VEX72Rpzw2bOh4vzoytSqA1jCM7x9YtHg==","signatures":[{"sig":"MEYCIQDXRwKMbQyPdfjjIbwjbuqH4eOv/VyySa7TaP8SYprESAIhAOpuaQIvj3AGQStZPO4BHj+5zCvzLMxWLKI3mZI9Krsp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":986761},"main":"./build/cjs/cjsIndex.js","module":"./build/esm/esmIndex.js","browser":"./build/esm/web/index.js","exports":{".":{"import":{"node":"./build/esm/node/index.js","default":"./build/esm/esmIndex.js"},"browser":"./build/esm/web/index.js","require":{"node":"./build/cjs/node/index.js","default":"./build/cjs/cjsIndex.js"}},"./*":{"types":"./*.d.ts","default":"./*.js"},"./web":{"import":{"default":"./build/esm/web/index.js"},"require":{"default":"./build/cjs/web/index.js"}},"./node":{"import":{"default":"./build/esm/node/index.js"},"require":{"default":"./build/cjs/node/index.js"}},"./web/*":{"import":{"types":"./build/esm/web/*.d.ts","default":"./build/esm/web/*.js"},"require":{"types":"./build/cjs/web/*.d.ts","default":"./build/cjs/web/*.js"}},"./bundle":{"types":"./build/esm/esmIndex.d.ts","default":"./build/bundle.js"},"./node/*":{"import":{"types":"./build/esm/node/*.d.ts","default":"./build/esm/node/*.js"},"require":{"types":"./build/cjs/node/*.d.ts","default":"./build/cjs/node/*.js"}},"./common/*":{"import":{"types":"./build/esm/common/*.d.ts","default":"./build/esm/common/*.js"},"require":{"types":"./build/cjs/common/*.d.ts","default":"./build/cjs/common/*.js"}}},"scripts":{"lint":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx","test":"jest","clean":"rm -rf ./build","watch":"tsc --watch -p tsconfig.json","lint:fix":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx --fix","web:test":"concurrently \"npm run bundle:web\" \"npm run bundle:web:test\" && opener ./tests/web/web.html","dev:build":"npm run clean && concurrently \" yarn tsc -p cjs.tsconfig.json && sh ./scripts/fix-pkg.sh cjs commonjs \"  \" yarn tsc -p esm.tsconfig.json && sh ./scripts/fix-pkg.sh esm module && yarn tsc-esm-fix --tsconfig esm.tsconfig.json  \" ","bundle:web":"npx webpack --config-name web","prod:build":"npm run dev:build && npm run bundle:web:prod && ts-node scripts/embedVersion.ts","bundle:web:prod":"npx webpack --config-name web-prod","bundle:web:test":"npx webpack --config-name web-tests"},"_npmUser":{"name":"jessetherobot","email":"jesse@bundlr.network"},"repository":{"url":"https://github.com/Bundlr-Network/arweave","type":"git"},"description":"![](./assets/irys-arweave-package.png?raw=true)","directories":{},"dependencies":{"axios":"^1.4.0","asn1.js":"^5.4.1","base64-js":"^1.5.1","async-retry":"^1.3.3","bignumber.js":"^9.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","jest":"^29.5.0","buffer":"^6.0.3","eslint":"^8.42.0","opener":"^1.5.2","ts-jest":"^29.1.0","ts-node":"^10.9.1","webpack":"^5.88.1","prettier":"^2.8.8","arconnect":"^0.4.2","ts-loader":"^9.4.4","typescript":"^5.1.3","@types/chai":"^4.3.5","@types/jest":"^29.5.2","@types/node":"^20.2.5","inspectpack":"^4.7.1","tsc-esm-fix":"^2.20.14","webpack-cli":"^4.9.2","@types/bn.js":"^5.1.1","concurrently":"^8.2.0","tsconfig-paths":"^4.2.0","readable-stream":"^4.4.2","resolve-tspaths":"^0.8.13","resolve.exports":"^2.0.2","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@types/async-retry":"^1.4.5","eslint-plugin-jest":"^27.2.1","terser-webpack-plugin":"^5.3.9","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/arweave_0.0.2_1696367052644_0.01953234596099751","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@irys/arweave","version":"0.0.3","author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","_id":"@irys/arweave@0.0.3","maintainers":[{"name":"joshbundlr","email":"josh@bundlr.network"},{"name":"jessetherobot","email":"jesse@bundlr.network"}],"dist":{"shasum":"700824aabfc833fce0ab91ea4aef30e67a3acf33","tarball":"https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.3.tgz","fileCount":238,"integrity":"sha512-LVpR9PPvguW36aqEus71C8vqxMHUbgOxMYA+Bx6HZzf9BlBSjkHhtJ3e0d0rBjSMRKOT5Dw47VwqpHPz/VeH5A==","signatures":[{"sig":"MEUCIQCd8/u1vot1BrcEWvnwR9VQZoT5W1r+12TNSQuy+7BdfwIgBEynEfodctVPeqVYX1w7269tTpYXIMNY0yE8iXNAUB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":989980},"main":"./build/cjs/cjsIndex.js","module":"./build/esm/esmIndex.js","browser":"./build/esm/web/index.js","exports":{".":{"import":{"node":"./build/esm/node/index.js","default":"./build/esm/esmIndex.js"},"browser":"./build/esm/web/index.js","require":{"node":"./build/cjs/node/index.js","default":"./build/cjs/cjsIndex.js"}},"./*":{"types":"./*.d.ts","default":"./*.js"},"./web":{"import":{"default":"./build/esm/web/index.js"},"require":{"default":"./build/cjs/web/index.js"}},"./node":{"import":{"default":"./build/esm/node/index.js"},"require":{"default":"./build/cjs/node/index.js"}},"./web/*":{"import":{"types":"./build/esm/web/*.d.ts","default":"./build/esm/web/*.js"},"require":{"types":"./build/cjs/web/*.d.ts","default":"./build/cjs/web/*.js"}},"./bundle":{"types":"./build/esm/esmIndex.d.ts","default":"./build/bundle.js"},"./node/*":{"import":{"types":"./build/esm/node/*.d.ts","default":"./build/esm/node/*.js"},"require":{"types":"./build/cjs/node/*.d.ts","default":"./build/cjs/node/*.js"}},"./common/*":{"import":{"types":"./build/esm/common/*.d.ts","default":"./build/esm/common/*.js"},"require":{"types":"./build/cjs/common/*.d.ts","default":"./build/cjs/common/*.js"}}},"scripts":{"lint":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx","test":"jest","clean":"rm -rf ./build","watch":"tsc --watch -p tsconfig.json","lint:fix":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx --fix","web:test":"concurrently \"npm run bundle:web\" \"npm run bundle:web:test\" && opener ./tests/web/web.html","dev:build":"npm run clean && concurrently \" yarn tsc -p cjs.tsconfig.json && sh ./scripts/fix-pkg.sh cjs commonjs \"  \" yarn tsc -p esm.tsconfig.json && sh ./scripts/fix-pkg.sh esm module && yarn tsc-esm-fix --tsconfig esm.tsconfig.json  \" ","bundle:web":"npx webpack --config-name web","prod:build":"npm run dev:build && npm run bundle:web:prod && ts-node scripts/embedVersion.ts","bundle:web:prod":"npx webpack --config-name web-prod","bundle:web:test":"npx webpack --config-name web-tests"},"_npmUser":{"name":"jessetherobot","email":"jesse@bundlr.network"},"repository":{"url":"https://github.com/Bundlr-Network/arweave","type":"git"},"description":"![](./assets/irys-arweave-package.png?raw=true)","directories":{},"dependencies":{"axios":"^1.6.7","asn1.js":"^5.4.1","base64-js":"^1.5.1","async-retry":"^1.3.3","bignumber.js":"^9.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","jest":"^29.5.0","buffer":"^6.0.3","eslint":"^8.42.0","opener":"^1.5.2","ts-jest":"^29.1.0","ts-node":"^10.9.1","webpack":"^5.88.1","prettier":"^2.8.8","arconnect":"^0.4.2","ts-loader":"^9.4.4","typescript":"^5.1.3","@types/chai":"^4.3.5","@types/jest":"^29.5.2","@types/node":"^20.2.5","inspectpack":"^4.7.1","tsc-esm-fix":"^2.20.14","webpack-cli":"^4.9.2","@types/bn.js":"^5.1.1","concurrently":"^8.2.0","tsconfig-paths":"^4.2.0","prettier-eslint":"^16.3.0","readable-stream":"^4.4.2","resolve-tspaths":"^0.8.13","resolve.exports":"^2.0.2","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@types/async-retry":"^1.4.5","eslint-plugin-jest":"^27.2.1","terser-webpack-plugin":"^5.3.9","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/arweave_0.0.3_1711361785410_0.36558940580188004","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@irys/arweave","version":"0.0.4","author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","_id":"@irys/arweave@0.0.4","maintainers":[{"name":"jessetherobot","email":"jesse@bundlr.network"},{"name":"joshbundlr","email":"josh@bundlr.network"}],"dist":{"shasum":"a2062489f448ebe2d36fed233e675c650ca07a23","tarball":"https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.4.tgz","fileCount":238,"integrity":"sha512-64OXtvca3Zdh4Rg6I5K7xRwkPwIcA5Ot8k24WqbWPSmKkZU/tZTB22TQyUdkdlmnAuqz171cBYYnJ8DTYoxtqA==","signatures":[{"sig":"MEYCIQCP41S7pAnn6O8c4Zfk/ulJLuRIRTAoiE49viIc6E6lYAIhAIwSt4GrjlHRrXa6wII0ONhIVsimCXS5X0mgc5bZkz5o","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":989984},"main":"./build/cjs/cjsIndex.js","module":"./build/esm/esmIndex.js","browser":"./build/esm/web/index.js","exports":{".":{"import":{"node":"./build/esm/node/index.js","default":"./build/esm/esmIndex.js"},"browser":"./build/esm/web/index.js","require":{"node":"./build/cjs/node/index.js","default":"./build/cjs/cjsIndex.js"}},"./web":{"import":{"default":"./build/esm/web/index.js"},"require":{"default":"./build/cjs/web/index.js"}},"./node":{"import":{"default":"./build/esm/node/index.js"},"require":{"default":"./build/cjs/node/index.js"}},"./any/*":{"types":"./*.d.ts","default":"./*.js"},"./web/*":{"import":{"types":"./build/esm/web/*.d.ts","default":"./build/esm/web/*.js"},"require":{"types":"./build/cjs/web/*.d.ts","default":"./build/cjs/web/*.js"}},"./bundle":{"types":"./build/esm/esmIndex.d.ts","default":"./build/bundle.js"},"./node/*":{"import":{"types":"./build/esm/node/*.d.ts","default":"./build/esm/node/*.js"},"require":{"types":"./build/cjs/node/*.d.ts","default":"./build/cjs/node/*.js"}},"./common/*":{"import":{"types":"./build/esm/common/*.d.ts","default":"./build/esm/common/*.js"},"require":{"types":"./build/cjs/common/*.d.ts","default":"./build/cjs/common/*.js"}}},"scripts":{"lint":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx","test":"jest","clean":"rm -rf ./build","watch":"tsc --watch -p tsconfig.json","lint:fix":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx --fix","web:test":"concurrently \"npm run bundle:web\" \"npm run bundle:web:test\" && opener ./tests/web/web.html","dev:build":"npm run clean && concurrently \" yarn tsc -p cjs.tsconfig.json && sh ./scripts/fix-pkg.sh cjs commonjs \"  \" yarn tsc -p esm.tsconfig.json && sh ./scripts/fix-pkg.sh esm module && yarn tsc-esm-fix --tsconfig esm.tsconfig.json  \" ","bundle:web":"npx webpack --config-name web","prod:build":"npm run dev:build && npm run bundle:web:prod && ts-node scripts/embedVersion.ts","bundle:web:prod":"npx webpack --config-name web-prod","bundle:web:test":"npx webpack --config-name web-tests"},"_npmUser":{"name":"jessetherobot","email":"jesse@bundlr.network"},"repository":{"url":"https://github.com/Bundlr-Network/arweave","type":"git"},"description":"![](./assets/irys-arweave-package.png?raw=true)","directories":{},"dependencies":{"axios":"^1.6.7","asn1.js":"^5.4.1","base64-js":"^1.5.1","async-retry":"^1.3.3","bignumber.js":"^9.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","jest":"^29.5.0","buffer":"^6.0.3","eslint":"^8.42.0","opener":"^1.5.2","ts-jest":"^29.1.0","ts-node":"^10.9.1","webpack":"^5.88.1","prettier":"^2.8.8","arconnect":"^0.4.2","ts-loader":"^9.4.4","typescript":"^5.1.3","@types/chai":"^4.3.5","@types/jest":"^29.5.2","@types/node":"^20.2.5","inspectpack":"^4.7.1","tsc-esm-fix":"^2.20.14","webpack-cli":"^4.9.2","@types/bn.js":"^5.1.1","concurrently":"^8.2.0","tsconfig-paths":"^4.2.0","prettier-eslint":"^16.3.0","readable-stream":"^4.4.2","resolve-tspaths":"^0.8.13","resolve.exports":"^2.0.2","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@types/async-retry":"^1.4.5","eslint-plugin-jest":"^27.2.1","terser-webpack-plugin":"^5.3.9","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/arweave_0.0.4_1741560022857_0.04859255737711221","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@irys/arweave","version":"0.0.5","repository":{"type":"git","url":"https://github.com/Bundlr-Network/arweave"},"author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","main":"./build/cjs/cjsIndex.js","browser":"./build/esm/web/index.js","module":"./build/esm/esmIndex.js","exports":{"./node":{"require":{"default":"./build/cjs/node/index.js"},"import":{"default":"./build/esm/node/index.js"}},"./node/*":{"require":{"types":"./build/cjs/node/*.d.ts","default":"./build/cjs/node/*.js"},"import":{"types":"./build/esm/node/*.d.ts","default":"./build/esm/node/*.js"}},"./web":{"require":{"default":"./build/cjs/web/index.js"},"import":{"default":"./build/esm/web/index.js"}},"./web/*":{"require":{"types":"./build/cjs/web/*.d.ts","default":"./build/cjs/web/*.js"},"import":{"types":"./build/esm/web/*.d.ts","default":"./build/esm/web/*.js"}},"./common/*":{"require":{"types":"./build/cjs/common/*.d.ts","default":"./build/cjs/common/*.js"},"import":{"types":"./build/esm/common/*.d.ts","default":"./build/esm/common/*.js"}},"./bundle":{"types":"./build/esm/esmIndex.d.ts","default":"./build/bundle.js"},".":{"browser":"./build/esm/web/index.js","require":{"node":"./build/cjs/node/index.js","default":"./build/cjs/cjsIndex.js"},"import":{"node":"./build/esm/node/index.js","default":"./build/esm/esmIndex.js"}},"./*":{"types":"./*.d.ts","default":"./*.js"}},"scripts":{"lint":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx","lint:fix":"eslint ./src -c ./.eslintrc.json --ext .ts,.tsx --fix","watch":"tsc --watch -p tsconfig.json","test":"jest","clean":"rm -rf ./build","dev:build":"npm run clean && concurrently \" yarn tsc -p cjs.tsconfig.json && sh ./scripts/fix-pkg.sh cjs commonjs \"  \" yarn tsc -p esm.tsconfig.json && sh ./scripts/fix-pkg.sh esm module && yarn tsc-esm-fix --tsconfig esm.tsconfig.json  \" ","bundle:web":"npx webpack --config-name web","bundle:web:test":"npx webpack --config-name web-tests","bundle:web:prod":"npx webpack --config-name web-prod","web:test":"concurrently \"npm run bundle:web\" \"npm run bundle:web:test\" && opener ./tests/web/web.html","prod:build":"npm run dev:build && npm run bundle:web:prod && ts-node scripts/embedVersion.ts"},"devDependencies":{"@types/async-retry":"^1.4.5","@types/bn.js":"^5.1.1","@types/chai":"^4.3.5","@types/jest":"^29.5.2","@types/node":"^20.2.5","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","arconnect":"^0.4.2","buffer":"^6.0.3","chai":"^4.3.7","concurrently":"^8.2.0","crypto-browserify":"^3.12.0","eslint":"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-jest":"^27.2.1","eslint-plugin-prettier":"^4.2.1","inspectpack":"^4.7.1","jest":"^29.5.0","opener":"^1.5.2","prettier":"^2.8.8","prettier-eslint":"^16.3.0","readable-stream":"^4.4.2","resolve-tspaths":"^0.8.13","resolve.exports":"^2.0.2","stream-browserify":"^3.0.0","terser-webpack-plugin":"^5.3.9","ts-jest":"^29.1.0","ts-loader":"^9.4.4","ts-node":"^10.9.1","tsc-esm-fix":"^2.20.14","tsconfig-paths":"^4.2.0","typescript":"^5.1.3","webpack":"^5.88.1","webpack-cli":"^4.9.2"},"dependencies":{"asn1.js":"^5.4.1","async-retry":"^1.3.3","axios":"^1.6.7","base64-js":"^1.5.1","bignumber.js":"^9.1.1"},"description":"![](./assets/irys-arweave-package.png?raw=true)","_id":"@irys/arweave@0.0.5","dist":{"shasum":"52479bbac85b852fe2aa391b21d4d807e9676b9d","integrity":"sha512-EUWLPnhtLI8JziG3T2QCDcoc9whSff7l9RkMjkkLuT3XQjhcqDg4zIKIRCS6Q0EC15/kAvXRALBbUq8Mfkfz4Q==","tarball":"https://registry.npmjs.org/@irys/arweave/-/arweave-0.0.5.tgz","fileCount":238,"unpackedSize":989980,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDsrFzZlJHUVF7BUtIr9/Zx+Txzg1t1usfMvEdOO4kYdAiAc89BnlOhtS26PXDcbmg6vX4xY4bDd6sK0T6S9Gv0CMg=="}]},"_npmUser":{"name":"jessetherobot","email":"jesse@bundlr.network"},"directories":{},"maintainers":[{"name":"jessetherobot","email":"jesse@bundlr.network"},{"name":"joshbundlr","email":"josh@bundlr.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arweave_0.0.5_1741775734984_0.7109643636172325"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-22T21:26:44.238Z","modified":"2025-03-12T10:35:35.540Z","0.0.1":"2023-09-22T21:26:44.606Z","0.0.2":"2023-10-03T21:04:13.024Z","0.0.3":"2024-03-25T10:16:25.653Z","0.0.4":"2025-03-09T22:40:23.067Z","0.0.5":"2025-03-12T10:35:35.325Z"},"author":{"name":"JesseTheRobot","email":"jesse@bundlr.network"},"license":"MIT","repository":{"type":"git","url":"https://github.com/Bundlr-Network/arweave"},"description":"![](./assets/irys-arweave-package.png?raw=true)","maintainers":[{"name":"jessetherobot","email":"jesse@bundlr.network"},{"name":"joshbundlr","email":"josh@bundlr.network"}],"readme":"# @irys/arweave\n\n![](./assets/irys-arweave-package.png?raw=true)\n\n@irys/arweave is a TypeScript/JavaScript SDK for interacting with [Arweave](https://www.arweave.org/) and uploading data to the permaweb. It works in latest browsers and Node JS.\n\nThe package is a fork of [arweave-js](https://github.com/ArweaveTeam/arweave-js) that introduces better typing, Improved  NodeJS compatibility, and better support for using streams by integrating code from [arweave-stream-tx](https://github.com/CDDelta/arweave-stream-tx). \n\n> **Note:** \n> If you are planning to upload large batches of data transactions to Arweave, it is strongly advised that you use [ArBundles](https://github.com/Bundler-Network/arbundles) or [Irys](https://irys.xyz) instead of transactions with `@irys/arweave`. You can read about bundles and their advantages on the [Arwiki](https://arwiki.wiki/#/en/bundles).\n\n- [Arweave JS](#arweave-js)\n\t- [Installation](#installation)\n\t\t- [Npm](#npm)\n\t\t- [Yarn](#yarn)\n\t\t- [Bundles](#bundles)\n\t- [Initialization](#initialization)\n\t\t- [Web bundles](#web-bundles)\n\t\t- [Initialization options](#initialization-options)\n\t- [Usage](#usage)\n\t\t- [Wallets and keys](#wallets-and-keys)\n\t\t\t- [Creating a new wallet and private key](#creating-a-new-wallet-and-private-key)\n\t\t\t- [Getting the wallet address for a private key](#getting-the-wallet-address-for-a-private-key)\n\t\t\t- [Getting an address balance](#getting-an-address-balance)\n\t\t\t- [Getting the last transaction ID from a wallet](#getting-the-last-transaction-id-from-a-wallet)\n\t\t- [Transactions](#transactions)\n\t\t\t- [Creating a data transaction](#creating-a-data-transaction)\n\t\t\t- [Creating a wallet to wallet transaction](#creating-a-wallet-to-wallet-transaction)\n\t\t\t- [Adding tags to a transaction](#adding-tags-to-a-transaction)\n\t\t\t- [Signing a transaction](#signing-a-transaction)\n\t\t\t- [Submitting a transaction](#submitting-a-transaction)\n\t\t\t\t- [Chunked uploading advanced options](#chunked-uploading-advanced-options)\n\t\t- [Streaming uploads](#streaming-uploads)\n\t\t\t- [Getting transaction status](#getting-transaction-status)\n\t\t\t- [Getting a transaction](#getting-a-transaction)\n\t\t\t- [Getting transaction data](#getting-transaction-data)\n\t\t\t- [Getting tags from transactions](#getting-tags-from-transactions)\n\t\t- [Blocks](#blocks)\n\t\t\t- [Getting a block by indep\\_hash](#getting-a-block-by-indep_hash)\n\t\t\t- [Getting block by height](#getting-block-by-height)\n\t\t\t- [Getting current block](#getting-current-block)\n\t\t- [GraphQL](#graphql)\n\t\t- [License](#license)\n\n## Installation\n\n### Npm\n```bash\nnpm install @irys/arweave\n```\n\n### Yarn\n```\nyarn add @irys/arweave\n```\n\n### Bundles\n\nInclude the package via import statement when possible. If a script tag is required, use the examples below.\n\n```html\n<!-- Latest -->\n<script src=\"https://unpkg.com/@irys/arweave/build/web.bundle.js\"></script>\n\n<!-- Latest, minified-->\n<script src=\"https://unpkg.com/@irys/arweave/build/web.bundle.min.js\"></script>\n\n<!-- Specific version -->\n<script src=\"https://unpkg.com/@irys@1.0.0/arweave/build/web.bundle.js\"></script>\n\n<!-- Specific version, minified -->\n<script src=\"https://unpkg.com/@irys@1.0.0/arweave/build/web.bundle.min.js\"></script>\n```\n\n\n## Initialization\n\n```js\nimport Arweave from \"@irys/arweave\";\n\n// If you want to connect directly to a node\nconst arweave = new Arweave({ url: \"http://127.0.0.1:1984\" });\n\n// Or to specify a gateway when running from NodeJS you might use\nconst arweave = new Arweave({ url: \"https://arweave.net\" });\n\n// @irys/arweave includes a fallback capable request backend - requests can be specified to be gateway only or to try gateways and miners. Requests are forwarded to hosts in the order you specify, with gateways being used before miners if both can be used for a request.\n\n// Specify multiple gateways and multiple miners - will request from arweave.net, arweave.dev, your-gateway, and the miners\nconst arweave = new Arweave([\"https://arweave.net\", \"https://arweave.dev\", \"https://your-gateway\"], {\n  miners: [\"http://127.0.0.1:1984\", \"http://52.38.214.72:1984\"],\n});\n\n```\n\n\n### Web bundles\n\n```js\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Hello world</title>\n    <script src=\"https://unpkg.com/@irys/arweave/build/web.bundle.js\"></script>\n    <script>\n    const arweave = new Arweave({ url: \"https://arweave.net\" })\n    arweave.network.getInfo().then(console.log);\n    </script>\n</head>\n<body>\n\n</body>\n</html>\n```\n\n### Initialization options\n\n```js\n(\n    gateways: string, URL, or ApiConfig - Array or single item\n    options: {\n        gateways?: same as above\n        crypto?: Custom implementation of CryptoInterface\n        miners?: same as gateways, but for miner nodes\n    }\n\n)\n```\n\n## Usage\n\n### Wallets and keys\n\n#### Creating a new wallet and private key\n\nTo generate a new wallet address and private key ([JWK](https://docs.arweave.org/developers/server/http-api#key-format)) use the function `arweave.wallets.generate()`. Once AR has been sent to the address for a new wallet, the key can then be used to sign outgoing transactions.\n\n> Don't expose private keys or make them public as anyone with the key can use the corresponding wallet.\n\n> Make sure your keys stored securely as they can never be recovered if lost.\n\n\n```js\narweave.wallets.generate().then((key) => {\n  console.log(key);\n  // {\n  //     \"kty\": \"RSA\",\n  //     \"n\": \"3WquzP5IVTIsv3XYJjfw5L-t4X34WoWHwOuxb9V8w...\",\n  //     \"e\": ...\n});\n\n```\n\n#### Getting the wallet address for a private key\n\n```js\narweave.wallets.jwkToAddress(key).then((address) => {\n  console.log(address);\n  //1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\n});\n```\n\n#### Getting an address balance\n\n> All amounts are returned in [Winston](https://docs.arweave.org/developers/server/http-api#ar-and-winston).\n\n```js\narweave.wallets.getBalance(\"1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\").then((balance) => {\n  let winston = balance;\n  let ar = arweave.utils.winstonToAr(balance);\n\n  console.log(winston);\n  //125213858712\n\n  console.log(ar);\n  //0.125213858712\n});\n\n```\n\n#### Getting the last transaction ID from a wallet\n\n```js\narweave.wallets.getLastTransactionID(\"1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\").then((transactionId) => {\n  console.log(transactionId);\n  //3pXpj43Tk8QzDAoERjHE3ED7oEKLKephjnVakvkiHF8\n});\n\n```\n\n### Transactions\n\nTransactions are the building blocks of Arweave. They can send [AR](https://docs.arweave.org/developers/server/http-api#ar-and-winston) between wallet addresses or store data on Arweave.\n\nThe create transaction methods create and return an unsigned transaction object. You must sign the transaction and submit it separately using the `transactions.sign()` and `transactions.submit()` methods.\n\nIf you don't pass a `key` argument when creating a transaction, @irys/arweave will attempt to use a browser-based wallet extension, such as [ArConnect](https://arconnect.io) or [Arweave.app](https://arweave.app) to sign the transaction.\n\n**Modifying a transaction object after signing it will invalidate the signature,** causing it to be rejected by the network if submitted in that state. Transaction prices are based on the size of the data field, so modifying the data field after a transaction has been created isn't recommended as you'll need to manually update the price.\n\nThe transaction ID is a hash of the transaction signature, so a transaction ID can't be known until its contents are finalized and it has been signed.\n\n#### Creating a data transaction\n\n> **Note:** If you are planning to upload large batches of data transactions to Arweave, it is strongly advised that you use [ArBundles](https://github.com/Bundler-Network/arbundles) instead of transactions with `@irys/arweave`. You can read about bundles and their advantages on the [Arwiki](https://arwiki.wiki/#/en/preview/WUAtjfiDQEIqhsUcHXIFTn5ZmeDIE7If9hJREBLRgak).\n\nData transactions are used to store data on Arweave. They can contain HTML or any arbitrary data and are served like webpages.\n\n```js\nlet key = await arweave.wallets.generate();\n\n// Plain text\nlet transactionA = await arweave.createTransaction(\n  {\n    data: '<html><head><meta charset=\"UTF-8\"><title>Hello world!</title></head><body></body></html>',\n  },\n  key,\n);\n\n// Buffer\nlet transactionB = await arweave.createTransaction(\n  {\n    data: Buffer.from(\"Some data\", \"utf8\"),\n  },\n  key,\n);\n\nconsole.log(transactionA);\n// Transaction {\n//   format: 2,\n//   id: 'ReUohI9tEmXQ6EN9H9IkRjY9bSdgql_OdLUCOeMEte0',\n//   last_tx: 'Tk-0c7260Ya5zjfjzl4f6-W-vRO94qiqZMAScKBcYXc68v1Pd8bYfTbKWi7pepUF',\n//   owner: 'kmM4O08BJB85RbxfQ2nkka9VNO6Czm2Tc_IGQNYCTSXRzO...',\n//   tags: [],\n//   target: '',\n//   quantity: '0',\n//   data: 'c29tZSBkYXRh',\n//   data_size: '9',\n//   data_root: 'qwKZUl7qWpCEmB3cpONKTYOcSmnmhb-_s8ggMTZwCU4',\n//   data_tree: [],\n//   reward: '7489274',\n//   signature: 'JYdFPblDuT95ky7_wVss3Ax9e4Qygcd_lEcB07sDPUD_wNslOk...'\n// }\n\n```\n\n#### Creating a wallet to wallet transaction\n\nWallet to wallet transactions facilitate payments from one wallet to another. Supply a target wallet, and AR quantity in Winston.\n\n```js\nlet key = await arweave.wallets.generate();\n\n// Send 10.5 AR to 1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\nlet transaction = await arweave.createTransaction(\n  {\n    target: \"1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\",\n    quantity: arweave.utils.arToWinston(\"10.5\"),\n  },\n  key,\n);\n\nconsole.log(transaction);\n// Transaction {\n//   format: 2,\n//   id: 'v-n7hAc7cubeXSClh0beaOs1RjYFagyvpl2TkUOfbRg',\n//   last_tx: 'Tk-0c7260Ya5zjfjzl4f6-W-vRO94qiqZMAScKBcYXc68v1Pd8bYfTbKWi7pepUF',\n//   owner: 'kmM4O08BJB85RbxfQ2nkka9VNO6Czm2Tc_IGQNYCTSXRzOc6W9b...',\n//   tags: [],\n//   target: '1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY',\n//   quantity: '10500000000000',\n//   data: '',\n//   data_size: '0',\n//   data_root: '',\n//   data_tree: [],\n//   reward: '7468335',\n//   signature: 'DnUOYbRSkhI4ZXg5fpYDCwPv8yvM5toAneSx4Jlg0zjIocqPs8giPP...'\n// }\n\n```\n\n#### Adding tags to a transaction\n\nMetadata can be added to transactions through tags, these are simple key/value pairs that can be used to document the contents of a transaction or provide related data.\n\n[GraphQL](#graphql) uses tags when searching for transactions.\n\n> The `Content-Type` tag is a reserved tag and is used to set the data content type. For example, a transaction with HTML data and a content type tag of `text/html` will be served as a HTML page and render correctly in browsers, if the content type is set to `text/plain` then it will be served as a plain text document and will not render in browsers.\n\n> If you omit the `Content-Type` tag, browsers will be unable to render the content. \n\n```js\nlet key = await arweave.wallets.generate();\n\nlet transaction = await arweave.createTransaction(\n  {\n    data: '<html><head><meta charset=\"UTF-8\"><title>Hello world!</title></head><body></body></html>',\n  },\n  key,\n);\n\ntransaction.addTag(\"Content-Type\", \"text/html\");\ntransaction.addTag(\"key2\", \"value2\");\n\nconsole.log(transaction);\n// Transaction {\n//   format: 2,\n//   id: '',\n//   last_tx: 'Tk-0c7260Ya5zjfjzl4f6-W-vRO94qiqZMAScKBcYXc68v1Pd8bYfTbKWi7pepUF',\n//   owner: 'kmM4O08BJB85RbxfQ2nkka9VNO6Czm2Tc_IGQNYC...',\n//   tags: [\n//     Tag { name: 'Q29udGVudC1UeXBl', value: 'dGV4dC9odG1s' },\n//     Tag { name: 'a2V5Mg', value: 'dmFsdWUy' }\n//   ],\n//   target: '',\n//   quantity: '0',\n//   data: 'PGh0bWw-PGhlYWQ-PG1ldGEgY2hhcnNldD0iVVRGLTgiPjx0aXRsZT5IZWxsbyB3b3JsZCE8L3RpdGxlPjwvaGVhZD48Ym9keT48L2JvZHk-PC9odG1sPg',\n//   data_size: '88',\n//   data_root: 'GQunzmbwk2_JPU7oJOmLrTMvj8v_7BJaF0weyjVn5Nc',\n//   data_tree: [],\n//   reward: '7673074',\n//   signature: ''\n// }\n\n```\n\n#### Signing a transaction\n\n```js\nlet key = await arweave.wallets.generate();\n\nlet transaction = await arweave.createTransaction(\n  {\n    target: \"1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\",\n    quantity: arweave.utils.arToWinston(\"10.5\"),\n  },\n  key,\n);\n\nawait arweave.transactions.sign(transaction, key);\n\nconsole.log(transaction);\n// Transaction {\n//   format: 2,\n//   id: 'v-n7hAc7cubeXSClh0beaOs1RjYFagyvpl2TkUOfbRg',\n//   last_tx: 'Tk-0c7260Ya5zjfjzl4f6-W-vRO94qiqZMAScKBcYXc68v1Pd8bYfTbKWi7pepUF',\n//   owner: 'kmM4O08BJB85RbxfQ2nkka9VNO6Czm2Tc_IGQNYCTSXRzOc6W9b...',\n//   tags: [],\n//   target: '1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY',\n//   quantity: '10500000000000',\n//   data: '',\n//   data_size: '0',\n//   data_root: '',\n//   data_tree: [],\n//   reward: '7468335',\n//   signature: 'DnUOYbRSkhI4ZXg5fpYDCwPv8yvM5toAneSx4Jlg0zjIocqPs8giPP...'\n// }\n\n```\n\n#### Submitting a transaction\n\nThe preferred method of submitting a data transaction is to use chunk uploading. This method allows larger transaction sizes, resuming an upload if it's interrupted, and give progress updates while uploading.\n\n> The following code has been simplified and ignores potential errors.\n\n```js\n\nlet data = fs.readFileSync(\"path/to/file.pdf\");\n\nlet transaction = await arweave.createTransaction({ data: data }, key);\ntransaction.addTag(\"Content-Type\", \"application/pdf\");\n\nawait arweave.transactions.sign(transaction, key);\n\nlet uploader = await arweave.transactions.getUploader(transaction);\n\nwhile (!uploader.isComplete) {\n  await uploader.uploadChunk();\n  console.log(`${uploader.pctComplete}% complete, ${uploader.uploadedChunks}/${uploader.totalChunks}`);\n}\n```\n\nYou can also submit transactions using `transactions.post()` which is suitable for small transactions or token transfers:\n\n```js\nlet key = await arweave.wallets.generate();\n\nlet transaction = await arweave.createTransaction(\n  {\n    target: \"1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY\",\n    quantity: arweave.ar.arToWinston(\"10.5\"),\n  },\n  key,\n);\n\nawait arweave.transactions.sign(transaction, key);\n\nconst response = await arweave.transactions.post(transaction);\n\nconsole.log(response.status);\n// 200 : not to be confused with getStatus === 200, see note below**\n\n\n// HTTP response codes (200 - server received the transaction, 4XX - invalid transaction, 5XX - error)\n```\n\nThe `200` responses means a node has received your transaction, it does not mean that the transaction has mined and confirmed, and that a txid can be used as if it's immutable. See [get a transaction status](#get-a-transaction-status) for more detail on how to correctly determine that your transaction has been mined and confirmed. This also applies to the `uploader()` method.\n\n\n##### Chunked uploading advanced options\n\nYou can resume an upload from a saved uploader object that you have persisted in storage some using \n`JSON.stringify(uploader)` at any stage of the upload. To resume, parse it back into an object and pass it to `getUploader()` along with the transactions data:\n\n```js\nlet data = fs.readFileSync(\"path/to/file.pdf\"); // Get the same data\nlet resumeObject = JSON.parse(savedUploader); // Get uploader object from where you stored it.\n\nlet uploader = await arweave.transactions.getUploader(resumeObject, data);\nwhile (!uploader.isComplete) {\n  await uploader.uploadChunk();\n}\n```\n\nWhen resuming the upload, you *must provide the same data* as the original upload. When you serialize the uploader object with `JSON.stringify()` to save it somewhere, it will not include the data.\n\nYou can also resume an upload from just the transaction ID and data, once it has been mined into a block. This can be useful if you didn't save the uploader somewhere but the upload got interrupted. This will re-upload all of the data from the beginning, since we don't know which parts have been uploaded:\n\n```js\nlet data = fs.readFileSync(\"path/to/file.pdf\"); // Get the same data\nlet resumeTxId = \"mytxid\"; // A transaction ID for a mined transaction that didn't complete the upload.\n\nlet uploader = await arweave.transactions.getUploader(resumeTxId, data);\nwhile (!uploader.isComplete) {\n  await uploader.uploadChunk();\n  console.log(`${uploader.pctComplete}% complete`);\n}\n```\n\nAlternatively:\n\n```js\n// Example of tx being accepted and mined, but the network is missing the data\nimport Arweave from \"./node/index.js\"; // Assumed locally built nodejs target\nimport ArweaveTransaction from \"./node/lib/transaction.js\";\nimport fs from \"fs\";\n\n// Initialize a gateway connection\nconst arweave = Arweave.init({\n  host: \"arweave.net\",\n  port: 443,\n  protocol: \"https\",\n});\n\n// The data that you paid for but is missing in the network\nlet missingData = fs.readFileSync(\"./myfile.mov\");\n\n// Get the tx headers from arweave.net/tx/{txid}\nlet txHeaders = require(\"./txheaders.json\");\n\n(async () => {\n  const tx = new ArweaveTransaction.default(txHeaders);\n  let uploader = await arweave.transactions.getUploader(tx, missingData);\n  while (!uploader.isComplete) {\n    await uploader.uploadChunk();\n  }\n})();\n```\n\nThere is also an async iterator interface to chunk uploading, but this method means you'll need to ensure you are using a transpiler and polyfill for the asyncIterator symbol for some environments (Safari on iOS in particular). This method takes the same arguments for uploading/resuming a transaction as `getUploader()` and just has a slightly shorter syntax:\n\n```js\nfor await (const uploader of arweave.transactions.upload(tx)) {\n  console.log(`${uploader.pctComplete}% Complete`);\n}\n// done.\n```\n\n### Streaming uploads\n\n@irys/arweave includes (for NodeJS) a modified version of [arweave-stream-tx](https://github.com/Bundlr-Network/arweave-stream-tx) to allow for the \nefficient uploading of transactions of arbitrary size.\n\n```ts\nimport { pipeline } from \"stream/promises\";\n\nconst arweave = new Arweave(...)\n\nconst tx = await pipeline(createReadStream(\"./<path-to-file>\"), createTransactionAsync({}))\n\nawait arweave.transactions.sign(tx)\n\nawait pipeline(createReadStream(\"./<path-to-file>\"), uploadTransactionAsync(tx, arweave))\n\n```\n\n\n#### Getting transaction status\n\n> Just like other blockchains (including Bitcoin and Ethereum), you should always ensure that your transaction has received enough block confirmations before you assume that the transaction has been fully accepted by the network.\n> We strongly advise that you check the status and number of confirmations for a given txid before using it, even if you have received a ‘200’ status response.\n```js\narweave.transactions.getStatus(\"bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U\").then((res) => {\n  console.log(res);\n  // {\n  //  status: 200,\n  //  confirmed: {\n  //    block_height: 140151,\n  //    block_indep_hash: 'OR1wue3oBSg3XWvH0GBlauAtAjBICVs2F_8YLYQ3aoAR7q6_3fFeuBOw7d-JTEdR',\n  //    number_of_confirmations: 20\n  //  }\n  //}\n});\n\n```\n\n#### Getting a transaction\n\nUnlike `arweave-js` the returned data and tags are automatically decoded from base64.\n\n>Due to how the API has evolved over time and with larger transaction support, the `data` field is no longer _guaranteed_ to be returned from the network as part of the transaction json, therefore, it is not recommended that you use this function for fetching data. You should use [`arweave.transactions.getData()`](#get-transaction-data) instead, as it will handle small transactions, as well as the reassembling of chunks for larger ones while benefiting from gateway optimisations.*\n\n```js\nconst transaction = arweave.transactions.get(\"hKMMPNh_emBf8v_at1tFzNYACisyMQNcKzeeE1QE9p8\").then((transaction) => {\n  console.log(transaction);\n  // Transaction {\n  //   'format': 1,\n  //   'id': 'hKMMPNh_emBf8v_at1tFzNYACisyMQNcKzeeE1QE9p8',\n  //   'last_tx': 'GW7p6NoGJ495tAoUjU5GLxIH52gqOgk5j78gQv3j0ebvldAlw6VgIUv_lrMNGI72',\n  //   'owner': 'warLaSbicZm1nx9ucf-_5i91CWgmNOcnFJfyJdloCtsbenBhLrcGH472kKTZyuEAp2lSKlZ0NFCT2r2z-0...',\n  //   'tags': [\n  //     {\n  //       'name': 'QXBwLU5hbWU',\n  //       'value': 'd2VpYm90LXNlYXJjaC13ZWlicw'\n  //     }\n  //   ],\n  //   'target': ',\n  //   'quantity': '0',\n  //   'data': 'iVBORw0KGgoAAAANSUhEUgAAArIAAADGCAYAAAAuVWN-AAAACXBIWXMAAAsSAAA...'\n  //   'data_size': '36795',\n  //   'data_tree': [],\n  //   'data_root': ',\n  //   'reward': '93077980',\n  //   'signature': 'RpohCHVl5vzGlG4R5ybeEuhs556Jv7rWOGaZCT69cpIei_j9b9sAetBlr0...'\n  // }\n});\n\n```\n\n#### Getting transaction data\n\nYou can get the transaction data from a transaction ID without having to get the entire transaction\n\n```js\n// Get the base64url encoded string\narweave.transactions.getData(\"bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U\").then((data) => {\n  console.log(data);\n  // CjwhRE9DVFlQRSBodG1sPgo...\n});\n\n// Get the data decoded to a Uint8Array for binary data\narweave.transactions.getData(\"bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U\", { decode: true }).then((data) => {\n  console.log(data);\n  // Uint8Array [10, 60, 33, 68, ...]\n});\n\n// Get the data decode as string data\narweave.transactions.getData(\"bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U\", { decode: true, string: true }).then((data) => {\n  console.log(data);\n  // <!DOCTYPE HTML>...\n});\n```\n\n#### Getting tags from transactions\n\nUnlike `arweave-js`, tags are automatically decoded:\n\n```js\nconst transaction = arweave.transactions.get(\"bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U\").then((transaction) => {\n  transaction[\"tags\"].forEach(({ name, value }) => {\n    console.log(`${name} : ${value}`);\n  });\n  // Content-Type : text/html\n  // User-Agent : ArweaveDeploy/1.1.0\n});\n```\n\n### Blocks\n\nBlocks are base elements of Arweave's blockweave data structure.\nEach block is linked to two prior blocks: the previous block in the \"chain\" (as with traditional blockchain\nprotocols), and a block from the previous history of the blockchain (the \"recall block\"). Each block contains\na list of zero to many transactions.\n\n\n#### Getting a block by indep_hash\nGets block data for given independent hash. \n\n```js\nconst result = await arweave.blocks.getByHash(\"zbUPQFA4ybnd8h99KI9Iqh4mogXJibr0syEwuJPrFHhOhld7XBMOUDeXfsIGvYDp\");\nconsole.log(result);\n// {\n//   \"nonce\": \"6jdzO4FzS4EVaQVcLBEmxm6uN5-1tqBXW24Pzp6JsRQ\",\n//   \"previous_block\": \"iNgEv6vf9nIrxLWeEu-vPNHFftEh0kfOnx0qd6NKUOc8Z3WeMeOmAmdOHwSUFAGn\",\n//   \"timestamp\": 1624183433,\n//   \"last_retarget\": 1624183433,\n//   \"diff\": \"115792089220940710686296942055695413965527953310049630981189590430430626054144\",\n//   \"height\": 711150,\n//   \"hash\": \"_____8V8BkM8Cyja5ZFJcc7HfX33eM4BKDAvcEBn22s\",\n//   \"indep_hash\": \"zbUPQFA4ybnd8h99KI9Iqh4mogXJibr0syEwuJPrFHhOhld7XBMOUDeXfsIGvYDp\",\n//   \"txs\": [ ...\n```\n\n#### Getting block by height\n\n```js\nconst result = await arweave.blocks.getByHeight(711150);\nconsole.log(result);\n// {\n//   \"nonce\": \"6jdzO4FzS4EVaQVcLBEmxm6uN5-1tqBXW24Pzp6JsRQ\",\n//   \"previous_block\": \"iNgEv6vf9nIrxLWeEu-vPNHFftEh0kfOnx0qd6NKUOc8Z3WeMeOmAmdOHwSUFAGn\",\n//   \"timestamp\": 1624183433,\n//   \"last_retarget\": 1624183433,\n//   \"diff\": \"115792089220940710686296942055695413965527953310049630981189590430430626054144\",\n//   \"height\": 711150,\n//   \"hash\": \"_____8V8BkM8Cyja5ZFJcc7HfX33eM4BKDAvcEBn22s\",\n//   \"indep_hash\": \"zbUPQFA4ybnd8h99KI9Iqh4mogXJibr0syEwuJPrFHhOhld7XBMOUDeXfsIGvYDp\",\n//   \"txs\": [ ...\n```\n\n\n#### Getting current block\nGets a block data for current block, i.e., block with indep_hash:\n```js\nconst { current } = await arweave.network.getInfo();\n```\n\n```js\nconst result = await arweave.blocks.getCurrent();\nconsole.log(result);\n// {\n//   \"indep_hash\": \"qoJwHSpzl6Ouo140HW2DTv1rGOrgfBEnHi5sHv-fJt_TsK7xA70F2QbjMCopLiMd\",\n//   ...\n```\n\n### GraphQL \n\nGraphQL (GQL) provides flexible querying and allows you to search for transactions by tags, wallet address, block height, and more. \n\nPlease see the [GQL Guide](https://gql-guide.vercel.app/) for further details.\n\n\n### License\n\nThis software is released under MIT license. See [LICENSE.md](./LICENSE.md) for full license details.","readmeFilename":"README.md"}