@ar.io/sdk 2.4.0-alpha.7 → 2.4.0-alpha.8

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.
@@ -400,5 +400,28 @@ class AoANTWriteable extends AoANTReadable {
400
400
  signer: this.signer,
401
401
  });
402
402
  }
403
+ /**
404
+ * Sends a message to the IO contract to reassign the name to a new ANT. This can only be done by the current owner of the ANT.
405
+ * @param name @type {string} The name you want to reassign.
406
+ * @param ioProcessId @type {string} The processId of the IO contract.
407
+ * @param antProcessId @type {string} The processId of the ANT contract.
408
+ * @returns {Promise<AoMessageResult>} The result of the interaction.
409
+ * @example
410
+ * ```ts
411
+ * ant.reassignName({ name: "ardrive", ioProcessId: IO_TESTNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
412
+ * ```
413
+ */
414
+ async reassignName({ name, ioProcessId, antProcessId, }, options) {
415
+ return this.process.send({
416
+ tags: [
417
+ ...(options?.tags ?? []),
418
+ { name: 'Action', value: 'Reassign-Name' },
419
+ { name: 'Name', value: name },
420
+ { name: 'IO-Process-Id', value: ioProcessId },
421
+ { name: 'Process-Id', value: antProcessId },
422
+ ],
423
+ signer: this.signer,
424
+ });
425
+ }
403
426
  }
404
427
  exports.AoANTWriteable = AoANTWriteable;
@@ -100,6 +100,7 @@ exports.AntHandlerNames = [
100
100
  'initializeState',
101
101
  'state',
102
102
  'releaseName',
103
+ 'reassignName',
103
104
  ];
104
105
  exports.AntHandlersSchema = zod_1.z
105
106
  .array(zod_1.z.string({ description: 'Handler Name' }))
@@ -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.7';
20
+ exports.version = '2.4.0-alpha.8';
@@ -395,4 +395,27 @@ export class AoANTWriteable extends AoANTReadable {
395
395
  signer: this.signer,
396
396
  });
397
397
  }
398
+ /**
399
+ * Sends a message to the IO contract to reassign the name to a new ANT. This can only be done by the current owner of the ANT.
400
+ * @param name @type {string} The name you want to reassign.
401
+ * @param ioProcessId @type {string} The processId of the IO contract.
402
+ * @param antProcessId @type {string} The processId of the ANT contract.
403
+ * @returns {Promise<AoMessageResult>} The result of the interaction.
404
+ * @example
405
+ * ```ts
406
+ * ant.reassignName({ name: "ardrive", ioProcessId: IO_TESTNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
407
+ * ```
408
+ */
409
+ async reassignName({ name, ioProcessId, antProcessId, }, options) {
410
+ return this.process.send({
411
+ tags: [
412
+ ...(options?.tags ?? []),
413
+ { name: 'Action', value: 'Reassign-Name' },
414
+ { name: 'Name', value: name },
415
+ { name: 'IO-Process-Id', value: ioProcessId },
416
+ { name: 'Process-Id', value: antProcessId },
417
+ ],
418
+ signer: this.signer,
419
+ });
420
+ }
398
421
  }
@@ -97,6 +97,7 @@ export const AntHandlerNames = [
97
97
  'initializeState',
98
98
  'state',
99
99
  'releaseName',
100
+ 'reassignName',
100
101
  ];
101
102
  export const AntHandlersSchema = z
102
103
  .array(z.string({ description: 'Handler Name' }))
@@ -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.7';
17
+ export const version = '2.4.0-alpha.8';
@@ -218,4 +218,20 @@ export declare class AoANTWriteable extends AoANTReadable implements AoANTWrite
218
218
  name: string;
219
219
  ioProcessId: string;
220
220
  }, options?: WriteOptions): Promise<AoMessageResult>;
221
+ /**
222
+ * Sends a message to the IO contract to reassign the name to a new ANT. This can only be done by the current owner of the ANT.
223
+ * @param name @type {string} The name you want to reassign.
224
+ * @param ioProcessId @type {string} The processId of the IO contract.
225
+ * @param antProcessId @type {string} The processId of the ANT contract.
226
+ * @returns {Promise<AoMessageResult>} The result of the interaction.
227
+ * @example
228
+ * ```ts
229
+ * ant.reassignName({ name: "ardrive", ioProcessId: IO_TESTNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
230
+ * ```
231
+ */
232
+ reassignName({ name, ioProcessId, antProcessId, }: {
233
+ name: string;
234
+ ioProcessId: string;
235
+ antProcessId: string;
236
+ }, options?: WriteOptions): Promise<AoMessageResult>;
221
237
  }
@@ -211,4 +211,9 @@ export interface AoANTWrite extends AoANTRead {
211
211
  name: string;
212
212
  ioProcessId: string;
213
213
  }, options?: WriteOptions): Promise<AoMessageResult>;
214
+ reassignName({ name, ioProcessId, antProcessId, }: {
215
+ name: string;
216
+ ioProcessId: string;
217
+ antProcessId: string;
218
+ }, options?: WriteOptions): Promise<AoMessageResult>;
214
219
  }
@@ -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.6";
16
+ export declare const version = "2.4.0-alpha.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.4.0-alpha.7",
3
+ "version": "2.4.0-alpha.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"