extendLease

extendLease is a method on the ARIO class that extends the lease duration of a registered ArNS domain. The extension period can be 1-5 years, depending on the domain's grace period status. Note that permanently registered domains cannot have their leases extended.

extendLease requires authentication.

Parameters

ParameterTypeDescriptionOptional
namestringThe ArNS name for which to extend the leasefalse
yearsnumberThe number of years to extend the lease by (1-5 years)false
tagsarrayAn array of GQL tag objects to attach to the transfer AO messagetrue

Examples

extendLease

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

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

 const { id: txId } = await ario.increaseUndernameLimit(
         {
             name: 'ar-io',
             years: 1,
         },
         // optional additional tags
         { tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
     );
 }

 main();