removeController
removeController
is a method on the ANT
class that removes a controller from the list of approved controllers on the ANT.
removeController
requires authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
controller | String - WalletAddress | Public wallet address of the controller being removed. | false |
tags | array | An array of GQL tag objects to attach to the transfer AO message. | true |
Examples
removeController
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.removeController(
{ controller: 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f' },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
}
main();