@ar.io/sdk 3.5.1-alpha.4 → 3.6.0-alpha.1
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/bundles/web.bundle.min.js +48 -48
- package/lib/cjs/common/ant.js +4 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/ant.js +4 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/common/ant.d.ts +3 -3
- package/lib/types/types/ant.d.ts +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/ant.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.AoANTWriteable = exports.AoANTReadable = exports.ANT = void 0;
|
|
|
19
19
|
const zod_1 = require("zod");
|
|
20
20
|
const ant_js_1 = require("../types/ant.js");
|
|
21
21
|
const index_js_1 = require("../types/index.js");
|
|
22
|
+
const ant_js_2 = require("../utils/ant.js");
|
|
22
23
|
const ao_js_1 = require("../utils/ao.js");
|
|
23
24
|
const schema_js_1 = require("../utils/schema.js");
|
|
24
25
|
const index_js_2 = require("./index.js");
|
|
@@ -102,7 +103,7 @@ class AoANTReadable {
|
|
|
102
103
|
return record;
|
|
103
104
|
}
|
|
104
105
|
/**
|
|
105
|
-
* @returns {Promise<
|
|
106
|
+
* @returns {Promise<SortedANTRecords>} All the undernames managed by the ANT.
|
|
106
107
|
* @example
|
|
107
108
|
* Get the current records
|
|
108
109
|
* ```ts
|
|
@@ -116,7 +117,8 @@ class AoANTReadable {
|
|
|
116
117
|
});
|
|
117
118
|
if (strict)
|
|
118
119
|
(0, schema_js_1.parseSchemaResult)(ant_js_1.AntRecordsSchema, records);
|
|
119
|
-
|
|
120
|
+
// sort the records using the deterministic sort used by ar-io nodes
|
|
121
|
+
return (0, ant_js_2.sortANTRecords)(records);
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
122
124
|
* @returns {Promise<string>} The owner of the ANT.
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/ant.js
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { z } from 'zod';
|
|
17
17
|
import { AntBalancesSchema, AntControllersSchema, AntInfoSchema, AntRecordSchema, AntRecordsSchema, AntStateSchema, } from '../types/ant.js';
|
|
18
18
|
import { isProcessConfiguration, isProcessIdConfiguration, } from '../types/index.js';
|
|
19
|
+
import { sortANTRecords } from '../utils/ant.js';
|
|
19
20
|
import { createAoSigner } from '../utils/ao.js';
|
|
20
21
|
import { parseSchemaResult } from '../utils/schema.js';
|
|
21
22
|
import { AOProcess, InvalidContractConfigurationError } from './index.js';
|
|
@@ -98,7 +99,7 @@ export class AoANTReadable {
|
|
|
98
99
|
return record;
|
|
99
100
|
}
|
|
100
101
|
/**
|
|
101
|
-
* @returns {Promise<
|
|
102
|
+
* @returns {Promise<SortedANTRecords>} All the undernames managed by the ANT.
|
|
102
103
|
* @example
|
|
103
104
|
* Get the current records
|
|
104
105
|
* ```ts
|
|
@@ -112,7 +113,8 @@ export class AoANTReadable {
|
|
|
112
113
|
});
|
|
113
114
|
if (strict)
|
|
114
115
|
parseSchemaResult(AntRecordsSchema, records);
|
|
115
|
-
|
|
116
|
+
// sort the records using the deterministic sort used by ar-io nodes
|
|
117
|
+
return sortANTRecords(records);
|
|
116
118
|
}
|
|
117
119
|
/**
|
|
118
120
|
* @returns {Promise<string>} The owner of the ANT.
|
package/lib/esm/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AntReadOptions, AoANTHandler, AoANTInfo, AoANTRead, AoANTRecord, AoANTSetBaseNameRecordParams, AoANTSetUndernameRecordParams, AoANTState, AoANTWrite } from '../types/ant.js';
|
|
1
|
+
import { AntReadOptions, AoANTHandler, AoANTInfo, AoANTRead, AoANTRecord, AoANTSetBaseNameRecordParams, AoANTSetUndernameRecordParams, AoANTState, AoANTWrite, SortedANTRecords } from '../types/ant.js';
|
|
2
2
|
import { AoMessageResult, ProcessConfiguration, WalletAddress, WithSigner, WriteOptions } from '../types/index.js';
|
|
3
3
|
import { AOProcess } from './index.js';
|
|
4
4
|
type ANTConfigOptionalStrict = Required<ProcessConfiguration> & {
|
|
@@ -34,14 +34,14 @@ export declare class AoANTReadable implements AoANTRead {
|
|
|
34
34
|
undername: string;
|
|
35
35
|
}, { strict }?: AntReadOptions): Promise<AoANTRecord>;
|
|
36
36
|
/**
|
|
37
|
-
* @returns {Promise<
|
|
37
|
+
* @returns {Promise<SortedANTRecords>} All the undernames managed by the ANT.
|
|
38
38
|
* @example
|
|
39
39
|
* Get the current records
|
|
40
40
|
* ```ts
|
|
41
41
|
* ant.getRecords();
|
|
42
42
|
* ````
|
|
43
43
|
*/
|
|
44
|
-
getRecords({ strict }?: AntReadOptions): Promise<
|
|
44
|
+
getRecords({ strict }?: AntReadOptions): Promise<SortedANTRecords>;
|
|
45
45
|
/**
|
|
46
46
|
* @returns {Promise<string>} The owner of the ANT.
|
|
47
47
|
* @example
|
package/lib/types/types/ant.d.ts
CHANGED
|
@@ -183,7 +183,7 @@ export interface AoANTRead {
|
|
|
183
183
|
getRecord({ undername }: {
|
|
184
184
|
undername: string;
|
|
185
185
|
}, opts?: AntReadOptions): Promise<AoANTRecord | undefined>;
|
|
186
|
-
getRecords(opts?: AntReadOptions): Promise<
|
|
186
|
+
getRecords(opts?: AntReadOptions): Promise<SortedANTRecords>;
|
|
187
187
|
getOwner(opts?: AntReadOptions): Promise<WalletAddress>;
|
|
188
188
|
getControllers(): Promise<WalletAddress[]>;
|
|
189
189
|
getTicker(opts?: AntReadOptions): Promise<string>;
|
package/lib/types/version.d.ts
CHANGED