Skip to content

Commit

Permalink
fix(io): remove new APIs
Browse files Browse the repository at this point in the history
Goign to avoidnew APIs for now, so just use the newest tags
  • Loading branch information
dtfiedler committed Jan 7, 2025
1 parent 6999bcf commit d916ab6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
21 changes: 2 additions & 19 deletions src/common/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -993,17 +993,9 @@ export class ARIOWriteable extends ARIOReadable implements AoARIOWrite {
});
}

/* @deprecated - use `buyArNSName` instead */
async buyRecord(
params: AoBuyRecordParams,
options?: WriteOptions,
): Promise<AoMessageResult> {
return this.buyArNSName(params, options);
}

async buyArNSName(
params: AoBuyRecordParams,
options?: WriteOptions,
): Promise<AoMessageResult> {
const { tags = [] } = options || {};
const allTags = [
Expand All @@ -1030,15 +1022,14 @@ export class ARIOWriteable extends ARIOReadable implements AoARIOWrite {
* @param {Object} [options] - The options for the upgrade
* @returns {Promise<AoMessageResult>} The result of the upgrade
*/

async upgradeArNSName(
async upgradeRecord(
params: AoArNSPurchaseParams,
options?: WriteOptions,
): Promise<AoMessageResult> {
const { tags = [] } = options || {};
const allTags = [
...tags,
{ name: 'Action', value: 'Upgrade-Name' }, // TODO: align on Update-Record vs. Upgrade-Name (contract currently uses Upgrade-Name)
{ name: 'Action', value: 'Upgrade-Name' },
{ name: 'Name', value: params.name },
{ name: 'Fund-From', value: params.fundFrom },
];
Expand All @@ -1048,14 +1039,6 @@ export class ARIOWriteable extends ARIOReadable implements AoARIOWrite {
});
}

/* @deprecated - use `upgradeArNSName` instead */
async upgradeRecord(
params: AoArNSPurchaseParams,
options?: WriteOptions,
): Promise<AoMessageResult> {
return this.upgradeArNSName(params, options);
}

/**
* Extends the lease of an existing leased record.
*
Expand Down
10 changes: 0 additions & 10 deletions src/types/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,24 +636,14 @@ export interface AoARIOWrite extends AoARIORead {
options?: WriteOptions,
): Promise<AoMessageResult>;
// END OF GATEWAY SPECIFIC INTERACTIONS
/* @deprecated - use `buyArNSName` instead */
buyRecord(
params: AoBuyRecordParams,
options?: WriteOptions,
): Promise<AoMessageResult>;
buyArNSName(
params: AoArNSPurchaseParams,
options?: WriteOptions,
): Promise<AoMessageResult>;
/* @deprecated - use `upgradeArNSName` instead */
upgradeRecord(
params: AoArNSPurchaseParams,
options?: WriteOptions,
): Promise<AoMessageResult>;
upgradeArNSName(
params: AoArNSPurchaseParams,
options?: WriteOptions,
): Promise<AoMessageResult>;
extendLease(
params: AoExtendLeaseParams,
options?: WriteOptions,
Expand Down

0 comments on commit d916ab6

Please sign in to comment.