Created
November 6, 2019 20:29
-
-
Save iamonuwa/483c097b50f6e1f2b677a9111b49c40b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tx = await arweave.createTransaction( | |
{ data: JSON.stringify(data) }, | |
key | |
); | |
console.log(tx); | |
tx.addTag("App-Name", "demo"); | |
tx.addTag("App-Version", "0.0.1"); | |
tx.addTag("Unix-Time", Math.round(new Date().getTime() / 1000)); | |
tx.addTag("Type", "publish"); | |
console.log(tx); | |
await arweave.transactions.sign(tx, key); | |
console.log(tx.id); | |
let { status } = await arweave.transactions.post(tx); | |
Author
iamonuwa
commented
Nov 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment