@ar.io/sdk 2.5.0-alpha.8 → 2.5.0-alpha.9
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.
- package/README.md +17 -2
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/ant.js +26 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/ant.js +26 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/ant.d.ts +12 -0
- package/lib/types/types/ant.d.ts +9 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/ant.js
CHANGED
|
@@ -455,5 +455,31 @@ class AoANTWriteable extends AoANTReadable {
|
|
|
455
455
|
signer: this.signer,
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* Approves a primary name request for a given name or address.
|
|
460
|
+
*/
|
|
461
|
+
async approvePrimaryNameRequest({ name, address, ioProcessId, }, options) {
|
|
462
|
+
return this.process.send({
|
|
463
|
+
tags: [
|
|
464
|
+
...(options?.tags ?? []),
|
|
465
|
+
{ name: 'Action', value: 'Approve-Primary-Name' },
|
|
466
|
+
{ name: 'Name', value: name },
|
|
467
|
+
{ name: 'Recipient', value: address },
|
|
468
|
+
{ name: 'IO-Process-Id', value: ioProcessId },
|
|
469
|
+
],
|
|
470
|
+
signer: this.signer,
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
async removePrimaryNames({ names, ioProcessId }, options) {
|
|
474
|
+
return this.process.send({
|
|
475
|
+
tags: [
|
|
476
|
+
...(options?.tags ?? []),
|
|
477
|
+
{ name: 'Action', value: 'Remove-Primary-Names' },
|
|
478
|
+
{ name: 'Names', value: names.join(',') },
|
|
479
|
+
{ name: 'IO-Process-Id', value: ioProcessId },
|
|
480
|
+
],
|
|
481
|
+
signer: this.signer,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
458
484
|
}
|
|
459
485
|
exports.AoANTWriteable = AoANTWriteable;
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/ant.js
CHANGED
|
@@ -450,4 +450,30 @@ export class AoANTWriteable extends AoANTReadable {
|
|
|
450
450
|
signer: this.signer,
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* Approves a primary name request for a given name or address.
|
|
455
|
+
*/
|
|
456
|
+
async approvePrimaryNameRequest({ name, address, ioProcessId, }, options) {
|
|
457
|
+
return this.process.send({
|
|
458
|
+
tags: [
|
|
459
|
+
...(options?.tags ?? []),
|
|
460
|
+
{ name: 'Action', value: 'Approve-Primary-Name' },
|
|
461
|
+
{ name: 'Name', value: name },
|
|
462
|
+
{ name: 'Recipient', value: address },
|
|
463
|
+
{ name: 'IO-Process-Id', value: ioProcessId },
|
|
464
|
+
],
|
|
465
|
+
signer: this.signer,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
async removePrimaryNames({ names, ioProcessId }, options) {
|
|
469
|
+
return this.process.send({
|
|
470
|
+
tags: [
|
|
471
|
+
...(options?.tags ?? []),
|
|
472
|
+
{ name: 'Action', value: 'Remove-Primary-Names' },
|
|
473
|
+
{ name: 'Names', value: names.join(',') },
|
|
474
|
+
{ name: 'IO-Process-Id', value: ioProcessId },
|
|
475
|
+
],
|
|
476
|
+
signer: this.signer,
|
|
477
|
+
});
|
|
478
|
+
}
|
|
453
479
|
}
|
package/lib/esm/version.js
CHANGED
|
@@ -255,4 +255,16 @@ export declare class AoANTWriteable extends AoANTReadable implements AoANTWrite
|
|
|
255
255
|
ioProcessId: string;
|
|
256
256
|
antProcessId: string;
|
|
257
257
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
258
|
+
/**
|
|
259
|
+
* Approves a primary name request for a given name or address.
|
|
260
|
+
*/
|
|
261
|
+
approvePrimaryNameRequest({ name, address, ioProcessId, }: {
|
|
262
|
+
name: string;
|
|
263
|
+
address: WalletAddress;
|
|
264
|
+
ioProcessId: string;
|
|
265
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
266
|
+
removePrimaryNames({ names, ioProcessId }: {
|
|
267
|
+
names: string[];
|
|
268
|
+
ioProcessId: string;
|
|
269
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
258
270
|
}
|
package/lib/types/types/ant.d.ts
CHANGED
|
@@ -252,4 +252,13 @@ export interface AoANTWrite extends AoANTRead {
|
|
|
252
252
|
ioProcessId: string;
|
|
253
253
|
antProcessId: string;
|
|
254
254
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
255
|
+
approvePrimaryNameRequest({ name, address, ioProcessId, }: {
|
|
256
|
+
name: string;
|
|
257
|
+
address: WalletAddress;
|
|
258
|
+
ioProcessId: string;
|
|
259
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
260
|
+
removePrimaryNames({ names, ioProcessId }: {
|
|
261
|
+
names: string[];
|
|
262
|
+
ioProcessId: string;
|
|
263
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
255
264
|
}
|
package/lib/types/version.d.ts
CHANGED