Is it possible to create an auto signature using a private key , Instead of popping up the signature metamask window , When creating a new item and uploading it to rarible.
how do you upload it to rarible?
by moralis server ,
I did everything and it worked, but I donβt want the metamask window to pop up asking for a sign every time I upload new nft
this is my code :
β¦
setTYhis()
async function setTYhis() {
const imageFile = new Moralis.File(data.custom_fields.number_photo, { base64: photo })
await imageFile.saveIPFS();
let imageHash = imageFile.hash();
data.image = "/ipfs/" + imageHash
let metadata = data
const jsonFile = new Moralis.File("metadata.json", { base64: btoa(JSON.stringify(metadata)) });
await jsonFile.saveIPFS();
let metadataHash = jsonFile.hash();
let res = await Moralis.Plugins.rarible.lazyMint({
chain: 'eth',
userAddress: "myAddress",
tokenType: 'ERC721',
tokenUri: 'ipfs://' + metadataHash,
royaltiesAmount: 0, // 0.05% royalty. Optional,
supply: 1,
list: true, // Only if lazy listing
listTokenAmount: 1, // Only if lazy listing
listTokenValue: 10 ** 16.4, // Only if lazy listing
listAssetClass: 'ETH' // only if lazy listing || optional
})
}
β¦
maybe this helps you, it is not for rarible: https://github.com/dani69654/moralis_opensea_nodejs/blob/main/modules/buyOrder.js
1 Like