The following code example gets the file details of an uploaded file. This method takes the upload id of the file, and the deal id of the file. The deal id can be obtained by the getUploads method
require('dotenv').config()
const { mcsSDK } = require('js-mcs-sdk')
const fs = require('fs') // used to read files
// set up js-mcs-sdk
const mcs = new mcsSDK({
privateKey: process.env.PRIVATE_KEY,
rpcUrl: process.env.RPC_URL,
})
async function main() {
// ENTER PARAMETERS
const SOURCE_FILE_UPLOAD_ID = ''
const DEAL_ID = ''
console.log(await mcs.getFileDetails(SOURCE_FILE_UPLOAD_ID, DEAL_ID))
}
main()