init

init is a factory function that creates a read-only or writable client. By providing a signer, additional write APIs that require signing (like buyRecord and transfer) become available. By default, a read-only client is returned and no write APIs are available.

Parameters

← Swipe to see more →
ParameterTypeDescriptionOptional
processAOProcess

A pre-configured AOProcess instance used to initialize the ARIO class

true
processIdstringThe process ID of the AO processtrue
signerContractSigner

An optional signer instance, used to enable write operations on the blockchain

true
← Swipe to see more →

Examples

init

const { ARIO } = require("@ar.io/sdk")

const ario = ARIO.init()