@ar.io/sdk 3.2.0-alpha.2 → 3.2.0-alpha.3
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 +5 -7
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/ant.js +2 -1
- package/lib/cjs/common/io.js +4 -4
- package/lib/cjs/types/io.js +7 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/ant.js +2 -1
- package/lib/esm/common/io.js +4 -4
- package/lib/esm/types/io.js +7 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/utils.d.ts +1 -1
- package/lib/types/common/ant.d.ts +2 -1
- package/lib/types/types/ant.d.ts +2 -1
- package/lib/types/types/io.d.ts +3 -3
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/ant.js
CHANGED
|
@@ -479,7 +479,7 @@ class AoANTWriteable extends AoANTReadable {
|
|
|
479
479
|
signer: this.signer,
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
|
-
async removePrimaryNames({ names, arioProcessId }, options) {
|
|
482
|
+
async removePrimaryNames({ names, arioProcessId, notifyOwners = false, }, options) {
|
|
483
483
|
return this.process.send({
|
|
484
484
|
tags: [
|
|
485
485
|
...(options?.tags ?? []),
|
|
@@ -487,6 +487,7 @@ class AoANTWriteable extends AoANTReadable {
|
|
|
487
487
|
{ name: 'Names', value: names.join(',') },
|
|
488
488
|
{ name: 'IO-Process-Id', value: arioProcessId },
|
|
489
489
|
{ name: 'ARIO-Process-Id', value: arioProcessId },
|
|
490
|
+
{ name: 'Notify-Owners', value: notifyOwners.toString() },
|
|
490
491
|
],
|
|
491
492
|
signer: this.signer,
|
|
492
493
|
});
|
package/lib/cjs/common/io.js
CHANGED
|
@@ -269,7 +269,7 @@ class ARIOReadable {
|
|
|
269
269
|
// TODO: Can overload this function to refine different types of cost details params
|
|
270
270
|
async getCostDetails({ intent, type, years, name, quantity, fromAddress, fundFrom, }) {
|
|
271
271
|
const allTags = [
|
|
272
|
-
{ name: 'Action', value: '
|
|
272
|
+
{ name: 'Action', value: 'Cost-Details' },
|
|
273
273
|
{
|
|
274
274
|
name: 'Intent',
|
|
275
275
|
value: intent,
|
|
@@ -302,7 +302,7 @@ class ARIOReadable {
|
|
|
302
302
|
}
|
|
303
303
|
async getRegistrationFees() {
|
|
304
304
|
return this.process.read({
|
|
305
|
-
tags: [{ name: 'Action', value: '
|
|
305
|
+
tags: [{ name: 'Action', value: 'Registration-Fees' }],
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
async getDemandFactor() {
|
|
@@ -658,7 +658,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
658
658
|
const { tags = [] } = options || {};
|
|
659
659
|
const allTags = [
|
|
660
660
|
...tags,
|
|
661
|
-
{ name: 'Action', value: 'Buy-
|
|
661
|
+
{ name: 'Action', value: 'Buy-Name' },
|
|
662
662
|
{ name: 'Name', value: params.name },
|
|
663
663
|
{ name: 'Years', value: params.years?.toString() ?? '1' },
|
|
664
664
|
{ name: 'Process-Id', value: params.processId },
|
|
@@ -682,7 +682,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
682
682
|
const { tags = [] } = options || {};
|
|
683
683
|
const allTags = [
|
|
684
684
|
...tags,
|
|
685
|
-
{ name: 'Action', value: 'Upgrade-Name' },
|
|
685
|
+
{ name: 'Action', value: 'Upgrade-Name' },
|
|
686
686
|
{ name: 'Name', value: params.name },
|
|
687
687
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
688
688
|
];
|
package/lib/cjs/types/io.js
CHANGED
|
@@ -3,13 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isLeasedArNSRecord = exports.isProcessIdConfiguration = exports.isProcessConfiguration = exports.isValidFundFrom = exports.fundFromOptions = exports.isValidIntent = exports.intentsUsingYears = exports.validIntents = void 0;
|
|
4
4
|
const arweave_js_1 = require("../utils/arweave.js");
|
|
5
5
|
exports.validIntents = [
|
|
6
|
-
'Buy-
|
|
6
|
+
'Buy-Name',
|
|
7
|
+
'Buy-Record', // for backwards compatibility
|
|
7
8
|
'Extend-Lease',
|
|
8
9
|
'Increase-Undername-Limit',
|
|
9
10
|
'Upgrade-Name',
|
|
10
11
|
'Primary-Name-Request',
|
|
11
12
|
];
|
|
12
|
-
exports.intentsUsingYears = [
|
|
13
|
+
exports.intentsUsingYears = [
|
|
14
|
+
'Buy-Record', // for backwards compatibility
|
|
15
|
+
'Buy-Name',
|
|
16
|
+
'Extend-Lease',
|
|
17
|
+
];
|
|
13
18
|
const isValidIntent = (intent) => {
|
|
14
19
|
return exports.validIntents.indexOf(intent) !== -1;
|
|
15
20
|
};
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/ant.js
CHANGED
|
@@ -474,7 +474,7 @@ export class AoANTWriteable extends AoANTReadable {
|
|
|
474
474
|
signer: this.signer,
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
-
async removePrimaryNames({ names, arioProcessId }, options) {
|
|
477
|
+
async removePrimaryNames({ names, arioProcessId, notifyOwners = false, }, options) {
|
|
478
478
|
return this.process.send({
|
|
479
479
|
tags: [
|
|
480
480
|
...(options?.tags ?? []),
|
|
@@ -482,6 +482,7 @@ export class AoANTWriteable extends AoANTReadable {
|
|
|
482
482
|
{ name: 'Names', value: names.join(',') },
|
|
483
483
|
{ name: 'IO-Process-Id', value: arioProcessId },
|
|
484
484
|
{ name: 'ARIO-Process-Id', value: arioProcessId },
|
|
485
|
+
{ name: 'Notify-Owners', value: notifyOwners.toString() },
|
|
485
486
|
],
|
|
486
487
|
signer: this.signer,
|
|
487
488
|
});
|
package/lib/esm/common/io.js
CHANGED
|
@@ -265,7 +265,7 @@ export class ARIOReadable {
|
|
|
265
265
|
// TODO: Can overload this function to refine different types of cost details params
|
|
266
266
|
async getCostDetails({ intent, type, years, name, quantity, fromAddress, fundFrom, }) {
|
|
267
267
|
const allTags = [
|
|
268
|
-
{ name: 'Action', value: '
|
|
268
|
+
{ name: 'Action', value: 'Cost-Details' },
|
|
269
269
|
{
|
|
270
270
|
name: 'Intent',
|
|
271
271
|
value: intent,
|
|
@@ -298,7 +298,7 @@ export class ARIOReadable {
|
|
|
298
298
|
}
|
|
299
299
|
async getRegistrationFees() {
|
|
300
300
|
return this.process.read({
|
|
301
|
-
tags: [{ name: 'Action', value: '
|
|
301
|
+
tags: [{ name: 'Action', value: 'Registration-Fees' }],
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
304
|
async getDemandFactor() {
|
|
@@ -653,7 +653,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
653
653
|
const { tags = [] } = options || {};
|
|
654
654
|
const allTags = [
|
|
655
655
|
...tags,
|
|
656
|
-
{ name: 'Action', value: 'Buy-
|
|
656
|
+
{ name: 'Action', value: 'Buy-Name' },
|
|
657
657
|
{ name: 'Name', value: params.name },
|
|
658
658
|
{ name: 'Years', value: params.years?.toString() ?? '1' },
|
|
659
659
|
{ name: 'Process-Id', value: params.processId },
|
|
@@ -677,7 +677,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
677
677
|
const { tags = [] } = options || {};
|
|
678
678
|
const allTags = [
|
|
679
679
|
...tags,
|
|
680
|
-
{ name: 'Action', value: 'Upgrade-Name' },
|
|
680
|
+
{ name: 'Action', value: 'Upgrade-Name' },
|
|
681
681
|
{ name: 'Name', value: params.name },
|
|
682
682
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
683
683
|
];
|
package/lib/esm/types/io.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { validateArweaveId } from '../utils/arweave.js';
|
|
2
2
|
export const validIntents = [
|
|
3
|
-
'Buy-
|
|
3
|
+
'Buy-Name',
|
|
4
|
+
'Buy-Record', // for backwards compatibility
|
|
4
5
|
'Extend-Lease',
|
|
5
6
|
'Increase-Undername-Limit',
|
|
6
7
|
'Upgrade-Name',
|
|
7
8
|
'Primary-Name-Request',
|
|
8
9
|
];
|
|
9
|
-
export const intentsUsingYears = [
|
|
10
|
+
export const intentsUsingYears = [
|
|
11
|
+
'Buy-Record', // for backwards compatibility
|
|
12
|
+
'Buy-Name',
|
|
13
|
+
'Extend-Lease',
|
|
14
|
+
];
|
|
10
15
|
export const isValidIntent = (intent) => {
|
|
11
16
|
return validIntents.indexOf(intent) !== -1;
|
|
12
17
|
};
|
package/lib/esm/version.js
CHANGED
package/lib/types/cli/utils.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare function getTokenCostParamsFromOptions(o: GetTokenCostCLIOptions)
|
|
|
79
79
|
type: "lease" | "permabuy";
|
|
80
80
|
quantity: number | undefined;
|
|
81
81
|
years: number;
|
|
82
|
-
intent: "Buy-Record" | "Extend-Lease" | "Increase-Undername-Limit" | "Upgrade-Name" | "Primary-Name-Request";
|
|
82
|
+
intent: "Buy-Name" | "Buy-Record" | "Extend-Lease" | "Increase-Undername-Limit" | "Upgrade-Name" | "Primary-Name-Request";
|
|
83
83
|
name: string;
|
|
84
84
|
fromAddress: string | undefined;
|
|
85
85
|
};
|
|
@@ -267,8 +267,9 @@ export declare class AoANTWriteable extends AoANTReadable implements AoANTWrite
|
|
|
267
267
|
address: WalletAddress;
|
|
268
268
|
arioProcessId: string;
|
|
269
269
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
270
|
-
removePrimaryNames({ names, arioProcessId }: {
|
|
270
|
+
removePrimaryNames({ names, arioProcessId, notifyOwners, }: {
|
|
271
271
|
names: string[];
|
|
272
272
|
arioProcessId: string;
|
|
273
|
+
notifyOwners?: boolean;
|
|
273
274
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
274
275
|
}
|
package/lib/types/types/ant.d.ts
CHANGED
|
@@ -225,8 +225,9 @@ export interface AoANTWrite extends AoANTRead {
|
|
|
225
225
|
address: WalletAddress;
|
|
226
226
|
arioProcessId: string;
|
|
227
227
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
228
|
-
removePrimaryNames({ names, arioProcessId }: {
|
|
228
|
+
removePrimaryNames({ names, arioProcessId, notifyOwners, }: {
|
|
229
229
|
names: string[];
|
|
230
230
|
arioProcessId: string;
|
|
231
|
+
notifyOwners?: boolean;
|
|
231
232
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
232
233
|
}
|
package/lib/types/types/io.d.ts
CHANGED
|
@@ -257,10 +257,10 @@ export type AoRedelegateStakeParams = {
|
|
|
257
257
|
stakeQty: number | mARIOToken;
|
|
258
258
|
vaultId?: string;
|
|
259
259
|
};
|
|
260
|
-
export declare const validIntents: readonly ["Buy-Record", "Extend-Lease", "Increase-Undername-Limit", "Upgrade-Name", "Primary-Name-Request"];
|
|
261
|
-
export declare const intentsUsingYears: readonly ["Buy-Record", "Extend-Lease"];
|
|
260
|
+
export declare const validIntents: readonly ["Buy-Name", "Buy-Record", "Extend-Lease", "Increase-Undername-Limit", "Upgrade-Name", "Primary-Name-Request"];
|
|
261
|
+
export declare const intentsUsingYears: readonly ["Buy-Record", "Buy-Name", "Extend-Lease"];
|
|
262
262
|
export type Intent = (typeof validIntents)[number];
|
|
263
|
-
export declare const isValidIntent: (intent: string) => intent is "Buy-Record" | "Extend-Lease" | "Increase-Undername-Limit" | "Upgrade-Name" | "Primary-Name-Request";
|
|
263
|
+
export declare const isValidIntent: (intent: string) => intent is "Buy-Name" | "Buy-Record" | "Extend-Lease" | "Increase-Undername-Limit" | "Upgrade-Name" | "Primary-Name-Request";
|
|
264
264
|
export type AoTokenCostParams = {
|
|
265
265
|
intent: Intent;
|
|
266
266
|
type?: 'permabuy' | 'lease';
|
package/lib/types/version.d.ts
CHANGED