@ar.io/sdk 2.4.0-alpha.5 → 2.4.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -643,6 +643,34 @@ class IOWriteable extends IOReadable {
643
643
  tags: prunedTags,
644
644
  });
645
645
  }
646
+ /**
647
+ * Upgrades an existing leased record to a permabuy.
648
+ *
649
+ * @param {Object} params - The parameters for upgrading a record
650
+ * @param {string} params.name - The name of the record to upgrade
651
+ * @param {Object} [options] - The options for the upgrade
652
+ * @returns {Promise<AoMessageResult>} The result of the upgrade
653
+ */
654
+ async upgradeRecord(params, options) {
655
+ const { tags = [] } = options || {};
656
+ return this.process.send({
657
+ signer: this.signer,
658
+ tags: [
659
+ ...tags,
660
+ { name: 'Action', value: 'Upgrade-Name' }, // TODO: align on Update-Record vs. Upgrade-Name (contract currently uses Upgrade-Name)
661
+ { name: 'Name', value: params.name },
662
+ ],
663
+ });
664
+ }
665
+ /**
666
+ * Extends the lease of an existing leased record.
667
+ *
668
+ * @param {Object} params - The parameters for extending a lease
669
+ * @param {string} params.name - The name of the record to extend
670
+ * @param {number} params.years - The number of years to extend the lease
671
+ * @param {Object} [options] - The options for the extension
672
+ * @returns {Promise<AoMessageResult>} The result of the extension
673
+ */
646
674
  async extendLease(params, options) {
647
675
  const { tags = [] } = options || {};
648
676
  return this.process.send({
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '2.4.0-alpha.5';
20
+ exports.version = '2.4.0-alpha.6';
@@ -638,6 +638,34 @@ export class IOWriteable extends IOReadable {
638
638
  tags: prunedTags,
639
639
  });
640
640
  }
641
+ /**
642
+ * Upgrades an existing leased record to a permabuy.
643
+ *
644
+ * @param {Object} params - The parameters for upgrading a record
645
+ * @param {string} params.name - The name of the record to upgrade
646
+ * @param {Object} [options] - The options for the upgrade
647
+ * @returns {Promise<AoMessageResult>} The result of the upgrade
648
+ */
649
+ async upgradeRecord(params, options) {
650
+ const { tags = [] } = options || {};
651
+ return this.process.send({
652
+ signer: this.signer,
653
+ tags: [
654
+ ...tags,
655
+ { name: 'Action', value: 'Upgrade-Name' }, // TODO: align on Update-Record vs. Upgrade-Name (contract currently uses Upgrade-Name)
656
+ { name: 'Name', value: params.name },
657
+ ],
658
+ });
659
+ }
660
+ /**
661
+ * Extends the lease of an existing leased record.
662
+ *
663
+ * @param {Object} params - The parameters for extending a lease
664
+ * @param {string} params.name - The name of the record to extend
665
+ * @param {number} params.years - The number of years to extend the lease
666
+ * @param {Object} [options] - The options for the extension
667
+ * @returns {Promise<AoMessageResult>} The result of the extension
668
+ */
641
669
  async extendLease(params, options) {
642
670
  const { tags = [] } = options || {};
643
671
  return this.process.send({
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '2.4.0-alpha.5';
17
+ export const version = '2.4.0-alpha.6';
@@ -158,6 +158,26 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
158
158
  type: 'lease' | 'permabuy';
159
159
  processId: string;
160
160
  }, options?: WriteOptions): Promise<AoMessageResult>;
161
+ /**
162
+ * Upgrades an existing leased record to a permabuy.
163
+ *
164
+ * @param {Object} params - The parameters for upgrading a record
165
+ * @param {string} params.name - The name of the record to upgrade
166
+ * @param {Object} [options] - The options for the upgrade
167
+ * @returns {Promise<AoMessageResult>} The result of the upgrade
168
+ */
169
+ upgradeRecord(params: {
170
+ name: string;
171
+ }, options?: WriteOptions): Promise<AoMessageResult>;
172
+ /**
173
+ * Extends the lease of an existing leased record.
174
+ *
175
+ * @param {Object} params - The parameters for extending a lease
176
+ * @param {string} params.name - The name of the record to extend
177
+ * @param {number} params.years - The number of years to extend the lease
178
+ * @param {Object} [options] - The options for the extension
179
+ * @returns {Promise<AoMessageResult>} The result of the extension
180
+ */
161
181
  extendLease(params: {
162
182
  name: string;
163
183
  years: number;
@@ -317,6 +317,9 @@ export interface AoIOWrite extends AoIORead {
317
317
  type: 'lease' | 'permabuy';
318
318
  processId: string;
319
319
  }, options?: WriteOptions): Promise<AoMessageResult>;
320
+ upgradeRecord(params: {
321
+ name: string;
322
+ }, options?: WriteOptions): Promise<AoMessageResult>;
320
323
  extendLease(params: {
321
324
  name: string;
322
325
  years: number;
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "2.4.0-alpha.4";
16
+ export declare const version = "2.4.0-alpha.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.4.0-alpha.5",
3
+ "version": "2.4.0-alpha.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"