buyRecord
buyRecord
is a method on the ARIO
class that purchases a new ArNS record with the specified name, type, processId, and duration.
Examples
buyRecord
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
name | string | The ArNS name to purchase | false |
type | string | The type of record: 'lease' or 'permabuy' | false |
years | number | The number of years to lease (for lease type) or purchase permanently (for permabuy type) | false |
processId | string | The process id of an existing ANT process. If not provided, a new ANT process using the provided signer will be spawned, and the ArNS record will be assigned to that process. | true |
referrer | string | Track purchase referrals for analytics (e.g. my-app.com) | true |
tags | array | An array of GQL tag objects to attach to the buyRecord AO message | true |
Manual ANT Creation
If you prefer to manually create an ANT during the purchase process, see the manual ANT creation workflow.