This file contains 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 HDWalletProvider from "@truffle/hdwallet-provider"; | |
import { OpenSeaPort, Network } from "opensea-js"; | |
import { PRIVATE_KEY } from "./consts.mjs"; | |
const provider = new HDWalletProvider({ | |
privateKeys: [PRIVATE_KEY], | |
providerOrUrl: "https://rpc.ankr.com/eth", | |
}); | |
provider.engine.on("error", (err) => { | |
console.error("provider error", err); | |
}); | |
const seaport = new OpenSeaPort(provider, { | |
networkName: Network.Main, | |
apiKey: "2f6f419a083c46de9d83ce3dbe7db601", | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment