init
init
is a factory function that creates a read-only or writeable client. By providing a signer
additional write APIs that require signing, like setRecord
and transfer
are available. By default, a read-only client is returned and no write APIs are available.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
processId | String | The AO process ID of the ANT to connect to. | false |
process | AOProcess | A pre-configured AOProcess instance used to initialize the ARIO class | true |
signer | ContractSigner | An optional signer instance, used to enable write operations on the blockchain | true |
Examples
init
const { ANT } = require("@ar.io/sdk")
const ant = ANT.init(
{
processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM"
}
)