Skip to content

Instantly share code, notes, and snippets.

@vilenarios
Last active December 22, 2023 12:49
Show Gist options
  • Save vilenarios/6154d9b6d68265456848914120a92bcb to your computer and use it in GitHub Desktop.
Save vilenarios/6154d9b6d68265456848914120a92bcb to your computer and use it in GitHub Desktop.
Switching from Irys
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