setKeywords

setKeywords is a method on the ANT class that updates the list of keywords associated with the ANT process.

setKeywords requires authentication.

Parameters

← Swipe to see more →
ParameterTypeDescriptionOptional
keywordsarray

An array of keywords to associate with the ANT process

false
tagsarray

An array of GQL tag objects to attach to the transfer AO message

true
← Swipe to see more →

Examples

setKeywords

 const fs = require("fs");
 const { ANT, ArweaveSigner } = require("@ar.io/sdk");

 async function main() {
 const jwk = JSON.parse(fs.readFileSync("KeyFile.json"));
 const ant = ANT.init({
     signer: new ArweaveSigner(jwk),
     processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM"
 });

 const { id: txId } = await ant.setKeywords(
         { keywords: ['Game', 'FPS', 'AO'] },
         // optional tags
         { tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
     );
 }

 main();