upgradeRecord
upgradeRecord
is a method on the ARIO
class that upgrades an existing ArNS record from a lease to a permanent ownership (permabuy). This allows converting a leased name to permanent ownership.
upgradeRecord
requires authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
name | string | The ArNS name to upgrade to permanent ownership | false |
fundFrom | string | The source of funds: 'balance', 'stakes', 'any', or 'turbo' | true |
tags | array | An array of GQL tag objects to attach to the transfer AO message | true |
Examples
upgradeRecord
const fs = require("fs");
const { ARIO, ArweaveSigner } = require("@ar.io/sdk");
async function main() {
const jwk = JSON.parse(fs.readFileSync("KeyFile.json"));
const ario = ARIO.init({
signer: new ArweaveSigner(jwk),
});
const { id: txId } = await ario.upgradeRecord(
{ name: 'ardrive' },
{
// optional tags
tags: [{ name: 'App-Name', value: 'ArNS-App' }],
},
);
}
main();