@ar.io/sdk 3.5.1 → 3.6.0-alpha.2

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.
@@ -29,7 +29,7 @@ exports.arioDevnetProcessId = exports.ARIO_DEVNET_PROCESS_ID;
29
29
  exports.ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
30
30
  exports.ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
31
31
  exports.MARIO_PER_ARIO = 1_000_000;
32
- exports.AOS_MODULE_ID = 'gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU';
33
- exports.ANT_LUA_ID = 'W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4';
32
+ exports.AOS_MODULE_ID = 'pb4fCvdJqwT-_bn38ERMdqnOF4weRMjoJ6bY6yfl4a8';
33
+ exports.ANT_LUA_ID = 'OO2ewZKq4AHoqGQmYUIl-NhJ-llQyFJ3ha4Uf4-w5RI';
34
34
  exports.AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
35
35
  exports.DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -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';
20
+ exports.version = '3.6.0-alpha.2';
@@ -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.
@@ -26,7 +26,7 @@ export const arioDevnetProcessId = ARIO_DEVNET_PROCESS_ID;
26
26
  export const ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
27
27
  export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
28
28
  export const MARIO_PER_ARIO = 1_000_000;
29
- export const AOS_MODULE_ID = 'gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU';
30
- export const ANT_LUA_ID = 'W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4';
29
+ export const AOS_MODULE_ID = 'pb4fCvdJqwT-_bn38ERMdqnOF4weRMjoJ6bY6yfl4a8';
30
+ export const ANT_LUA_ID = 'OO2ewZKq4AHoqGQmYUIl-NhJ-llQyFJ3ha4Uf4-w5RI';
31
31
  export const AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
32
32
  export const DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -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';
17
+ export const version = '3.6.0-alpha.2';
@@ -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
@@ -24,7 +24,7 @@ export declare const arioDevnetProcessId = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6
24
24
  export declare const ARIO_TESTNET_PROCESS_ID = "agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA";
25
25
  export declare const ANT_REGISTRY_ID = "i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc";
26
26
  export declare const MARIO_PER_ARIO = 1000000;
27
- export declare const AOS_MODULE_ID = "gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU";
28
- export declare const ANT_LUA_ID = "W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4";
27
+ export declare const AOS_MODULE_ID = "pb4fCvdJqwT-_bn38ERMdqnOF4weRMjoJ6bY6yfl4a8";
28
+ export declare const ANT_LUA_ID = "OO2ewZKq4AHoqGQmYUIl-NhJ-llQyFJ3ha4Uf4-w5RI";
29
29
  export declare const AO_AUTHORITY = "fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY";
30
30
  export declare const DEFAULT_SCHEDULER_ID = "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";
@@ -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.6.0-alpha.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.5.1",
3
+ "version": "3.6.0-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"