buyRecord
buyRecord
is a method on the ARIO
class that purchases a record in the ArNS registry for a specified name and duration.
buyRecord
requires authentication.
Important: ANT Process ID
The processId
parameter must be the process ID of an ANT (Arweave Name
Token) that you own or control. You cannot use the ARIO contract address or
create ANTs automatically through this method. You must create your ANT
separately before calling buyRecord
.
Examples
buyRecord
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
name | string | The ArNS name to purchase | false |
years | number | The number of years to lease the name for (1-5) | false |
processId | string | The ANT process ID to set for this name. Must be an existing ANT that you own or control | false |
type | string | The type of purchase: 'lease' or 'permabuy' | true |
fundFrom | string | The source of funds: 'balance', 'stakes', 'any', or 'turbo' | true |
paidBy | string | string[] | Wallet address(es) that will pay for the purchase (used with fundFrom: 'turbo') | true |
tags | array | An array of GQL tag objects to attach to the transfer AO message | true |