arweaveteam / arweave-bundles Goto Github PK
View Code? Open in Web Editor NEWarweave-data
arweave-data
When I tried to submit an ANS-102
bundle I would receive the following error:
Expected data to be a string, Uint8Array or ArrayBuffer
The following is how I tried to submit the transactions.
const data = await ArData.bundleData(bundles);
let tx = await arweave.createTransaction({ data }, key);
tx.addTag('Bundle-Type', 'ANS-102');
tx.addTag('Bundle-Format', 'json');
tx.addTag('Bundle-Version', '1.0.0');
tx.addTag('Content-Type', 'application/json');
await arweave.transactions.sign(tx, key);
await arweave.transactions.post(tx);
Keep in mind that when I console.log
the ANS-102
transaction. It would output a JSON
object:
{
items: [
...
]
}
The data does verify as correct... However, I believe this is an issue with the Arweave core library not supporting the ANS-102
transaction format.
Debug Log as shown here:
│ high │ Server-Side Request Forgery │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ axios │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=0.21.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ arweave-bundles │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ arweave-bundles > arweave > axios │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1594 │
Can update the package.json
and yarn.lock
file with.
yarn add axios
And then republish as a new npm
version.
The README.md provides enough to get started however, there are some key things missing.
For example, one of the most important things for bundling data is making sure the item is compliant with the ANS-102
format as seen here: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-102.md#13-dataitem-format
It would be a good idea to update the README to provide everything necessary to upload a block.
ERROR: Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
My project setup is VITE + React + TS
It's a minor issue, but would be nice to fix this: https://github.com/ArweaveTeam/arweave-data/runs/591930023
There is no NPM package for this right now.
Would be nice to publish it to npmjs
.
An alternative for now is:
npm install https://github.com/ArweaveTeam/arweave-data
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.