I'm using opensea-js alongside with nodejs to make offer on opensea testnet assets. The code is following:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const Web3 = require('web3')
const opensea = require('opensea-js')
const provider = new Web3.providers.HttpProvider('https://rinkeby.infura.io')
const seaport = new opensea.OpenSeaPort(provider, {
networkName: opensea.Network.Main
})
const call = async () => {
const accountAddress = "my_metamask_wallet_address_on_rinkeby_network"
const tokenId = 12
const tokenAddress = "0x7dca125b1e805dc88814aed7ccc810f677d3e1db"
const offer = await seaport.createBuyOrder({
asset: {
tokenAddress: tokenAddress,
tokenId: tokenId,
},
accountAddress: accountAddress,
startAmount: 1
})
console.log(offer.expirationTime)
}
call()
But it throws a 404 not found error, what am I doing wrong? The response is {"success": false}
.