getCostDetails
getCostDetails
is a method on the ARIO
class that calculates detailed cost information for a specific interaction (such as buying an ArNS record). The method determines costs based on the interaction type, the payer's address, and the funding source (balance, stake, or any available funds).
getCostDetails
does not require authentication.
Examples
getCostDetails
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
intent | string | The type of interaction to calculate costs for (e.g., 'Buy-Record') | false |
fromAddress | string - WalletAddress | The Arweave address that will be charged for the interaction | false |
fundFrom | string | The source of funds: 'balance', 'stakes', or 'any' | false |
name | string | The ArNS name for the interaction (for Buy-Record operations) | conditional |
type | string | The type of purchase: 'lease' or 'permabuy' (for Buy-Record operations) | conditional |
years | number | Number of years (for lease-based operations) | conditional |
quantity | number | Quantity for operations like increasing undername limits | conditional |