ANTVersions

Overview

The ANTVersions class provides functionality to manage ANT versions and track updates through the ANT Registry. This feature was added in SDK version 3.9.0.

The ANTVersions class in the AR.IO SDK contains several methods:

Initialization

The ANTVersions class can be initialized in different ways depending on your needs:

Read-only Access

// Default initialization (uses ANT_REGISTRY_ID)
const versions = ANTVersions.init()

// With custom process ID
const versions = ANTVersions.init({
  processId: 'your-process-id',
})

Read/Write Access

// With signer for write operations
const versions = ANTVersions.init({
  processId: 'your-process-id',
  signer: yourSigner,
})

Parameters

The initialization accepts the following configuration:

  • processId (string, optional): The process ID of the ANT Registry. Defaults to the main ANT Registry ID if not provided.
  • signer (AoSigner, optional): Signer instance for write operations. Required for addVersion method.
Note

Write operations like addVersion require a signer to be provided during initialization. Read operations can be performed without a signer.

Was this page helpful?