async function run() { const { ClientBuilder } = require('@iota/client'); // client will connect to testnet by default const client = new ClientBuilder().build(); // get message data by message id (get a random message id with getTips) const tips = await client.getTips(); const message_data = await client.getMessage().data(tips[0]); const message_metadata = await client.getMessage().metadata(tips[0]); console.log(message_metadata); console.log(message_data); // get indexation data by index const message_ids = await client.getMessage().index("IOTA.RS BINDING - NODE.JS") for (message_id of message_ids) { const message_wrapper = await client.getMessage().data(message_id) console.log(Buffer.from(message_wrapper.message.payload.data, 'hex').toString('utf8')); } } run()