@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.
@@ -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<Record<string, AoANTRecord>>} All the undernames managed by the ANT.
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
- return records;
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.
@@ -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 = '3.5.1-alpha.4';
20
+ exports.version = '3.6.0-alpha.1';
@@ -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<Record<string, AoANTRecord>>} All the undernames managed by the ANT.
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
- return records;
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.
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '3.5.1-alpha.4';
17
+ export const version = '3.6.0-alpha.1';
@@ -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<Record<string, AoANTRecord>>} All the undernames managed by the ANT.
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<Record<string, AoANTRecord>>;
44
+ getRecords({ strict }?: AntReadOptions): Promise<SortedANTRecords>;
45
45
  /**
46
46
  * @returns {Promise<string>} The owner of the ANT.
47
47
  * @example
@@ -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<ANTRecords>;
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>;
@@ -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 = "3.5.1-alpha.3";
16
+ export declare const version = "3.5.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.5.1-alpha.4",
3
+ "version": "3.6.0-alpha.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"