Last active
December 22, 2023 12:49
-
-
Save vilenarios/6154d9b6d68265456848914120a92bcb to your computer and use it in GitHub Desktop.
Switching from Irys
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
import Irys from "@irys/sdk"; | |
import fs from "fs"; | |
const wallet = JSON.parse( | |
fs | |
.readFileSync( | |
"NEVERFKNTELLINGYOUDAVIDHACKER.json", | |
) | |
.toString(), | |
); | |
const init = async () => { | |
const token = "arweave"; | |
const irys = new Irys({ | |
// URL of the node you want to connect to | |
// production: https://turbo.ardrive.io or https://up.arweave.net (proxy for turbo prod) | |
// dev: https://turbo.ardrive.dev | |
url: "https://turbo.ardrive.io", | |
token, // Token used for payment and signing | |
key: wallet, // Arweave wallet | |
}); | |
const receipt = await irys.upload("testing stuff now..."); | |
console.log(receipt); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment