Closed zqplugins closed 2 months ago
WebIrys, by default, doesn't support private keys - however you can use the following code to add support:
import ArweaveConfig from "@irys/sdk/node/tokens/ethereum";
import { BaseWebIrys } from "@irys/sdk/web/base";
import { type WebToken } from "@irys/sdk/web/types";
const wallet = <JWK object here>;
const config = { providerUrl: "" };
const irys = new BaseWebIrys({
network: "mainnet",
config,
getTokenConfig: (i): WebToken =>
new ArweaveConfig({
irys: i,
name: "arweave",
ticker: "AR",
minConfirm: 10,
isSlow: true,
providerUrl: config.providerUrl ?? "https://arweave.net",
wallet,
}) as unknown as WebToken,
});
Thanks, I'll give it a try
@JesseTheRobot Hello, can you tell me the structure of the key? I have an error-
that key format looks correct - are you passing the entire object as the key as the wallet object, and can you show me the new Qu
function so I can see exactly what function is causing the issue?
also, I noticed an issue with my initial code, the first import should be:
import ArweaveConfig from "@irys/sdk/node/tokens/arweave";
@JesseTheRobot we use cdn import with webpack build. so we have a slightly different entry. I also tried via node js to make a connection via arweave key, but I get the same error. Do you have an example of a working app with connection via arweave key?
@JesseTheRobot Hello, Do you have an example of a working app with connection via arweave key?
For using WebIrys, no - I'm not entirely sure why the code I gave you isn't working can you show me the code you're using now? I might be able to spot the problem.
@JesseTheRobot I made a video showing how I configured webIrys and Irys/sdk (node js server).
https://mega.nz/file/gNE2RQBB#5y5bc5-jL6QQe0EiyOshVl0L37fqbWJIgHhRxDiG7y4
why did you remove the BaseWebIrys code? without that it won't work
@JesseTheRobot I did not delete, I showed you two separate examples on client side and server side. I have the same error.
Hello, I have a arweave wallet private key, but i can't to connect.
I don't see anywhere in the documentation an option to specify a key
https://docs.irys.xyz/developer-docs/irys-sdk/irys-in-the-browser
I have already tried different methods but they all give the same error.