@ar.io/sdk 3.3.0-alpha.10 → 3.3.0-alpha.11

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_SCHEDULER_ID = exports.ANT_LUA_ID = exports.AOS_MODULE_ID = exports.MARIO_PER_ARIO = exports.ANT_REGISTRY_ID = exports.ARIO_TESTNET_PROCESS_ID = exports.arioDevnetProcessId = exports.ARIO_DEVNET_PROCESS_ID = exports.ARNS_DEVNET_REGISTRY_TX = exports.ARNS_TESTNET_REGISTRY_TX = exports.SORT_KEY_REGEX = exports.FQDN_REGEX = exports.ARWEAVE_TX_REGEX = void 0;
3
+ exports.DEFAULT_SCHEDULER_ID = exports.AO_AUTHORITY = exports.ANT_LUA_ID = exports.AOS_MODULE_ID = exports.MARIO_PER_ARIO = exports.ANT_REGISTRY_ID = exports.ARIO_TESTNET_PROCESS_ID = exports.arioDevnetProcessId = exports.ARIO_DEVNET_PROCESS_ID = exports.ARNS_DEVNET_REGISTRY_TX = exports.ARNS_TESTNET_REGISTRY_TX = exports.SORT_KEY_REGEX = exports.FQDN_REGEX = exports.ARWEAVE_TX_REGEX = void 0;
4
4
  /**
5
5
  * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
6
6
  *
@@ -31,4 +31,5 @@ exports.ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
31
31
  exports.MARIO_PER_ARIO = 1_000_000;
32
32
  exports.AOS_MODULE_ID = 'BRyNPIJWZaQ4IudfNnsfvMrZBO2YDPjgKqg_wCYT2U8';
33
33
  exports.ANT_LUA_ID = 'k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg';
34
+ exports.AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
34
35
  exports.DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -22,13 +22,18 @@ const zod_1 = require("zod");
22
22
  const arweave_js_1 = require("../common/arweave.js");
23
23
  const index_js_1 = require("../common/index.js");
24
24
  const constants_js_1 = require("../constants.js");
25
- async function spawnANT({ signer, module = constants_js_1.AOS_MODULE_ID, ao = (0, aoconnect_1.connect)(), scheduler = constants_js_1.DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = constants_js_1.ANT_REGISTRY_ID, logger = index_js_1.Logger.default, }) {
25
+ async function spawnANT({ signer, module = constants_js_1.AOS_MODULE_ID, ao = (0, aoconnect_1.connect)(), scheduler = constants_js_1.DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = constants_js_1.ANT_REGISTRY_ID, logger = index_js_1.Logger.default, authority = constants_js_1.AO_AUTHORITY, }) {
26
26
  // TODO: use On-Boot data handler for bootstrapping state instead of initialize-state
27
27
  const processId = await ao.spawn({
28
28
  module,
29
29
  scheduler,
30
30
  signer,
31
31
  tags: [
32
+ // Required for AOS to initialize the authorities table
33
+ {
34
+ name: 'Authority',
35
+ value: authority,
36
+ },
32
37
  {
33
38
  name: 'ANT-Registry-Id',
34
39
  value: antRegistryId,
@@ -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.3.0-alpha.10';
20
+ exports.version = '3.3.0-alpha.11';
@@ -28,4 +28,5 @@ export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
28
28
  export const MARIO_PER_ARIO = 1_000_000;
29
29
  export const AOS_MODULE_ID = 'BRyNPIJWZaQ4IudfNnsfvMrZBO2YDPjgKqg_wCYT2U8';
30
30
  export const ANT_LUA_ID = 'k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg';
31
+ export const AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
31
32
  export const DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -18,14 +18,19 @@ import { connect, createDataItemSigner } from '@permaweb/aoconnect';
18
18
  import { z } from 'zod';
19
19
  import { defaultArweave } from '../common/arweave.js';
20
20
  import { ANTRegistry, AOProcess, Logger } from '../common/index.js';
21
- import { ANT_LUA_ID, ANT_REGISTRY_ID, AOS_MODULE_ID, DEFAULT_SCHEDULER_ID, } from '../constants.js';
22
- export async function spawnANT({ signer, module = AOS_MODULE_ID, ao = connect(), scheduler = DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = ANT_REGISTRY_ID, logger = Logger.default, }) {
21
+ import { ANT_LUA_ID, ANT_REGISTRY_ID, AOS_MODULE_ID, AO_AUTHORITY, DEFAULT_SCHEDULER_ID, } from '../constants.js';
22
+ export async function spawnANT({ signer, module = AOS_MODULE_ID, ao = connect(), scheduler = DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = ANT_REGISTRY_ID, logger = Logger.default, authority = AO_AUTHORITY, }) {
23
23
  // TODO: use On-Boot data handler for bootstrapping state instead of initialize-state
24
24
  const processId = await ao.spawn({
25
25
  module,
26
26
  scheduler,
27
27
  signer,
28
28
  tags: [
29
+ // Required for AOS to initialize the authorities table
30
+ {
31
+ name: 'Authority',
32
+ value: authority,
33
+ },
29
34
  {
30
35
  name: 'ANT-Registry-Id',
31
36
  value: antRegistryId,
@@ -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.3.0-alpha.10';
17
+ export const version = '3.3.0-alpha.11';
@@ -26,4 +26,5 @@ export declare const ANT_REGISTRY_ID = "i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgM
26
26
  export declare const MARIO_PER_ARIO = 1000000;
27
27
  export declare const AOS_MODULE_ID = "BRyNPIJWZaQ4IudfNnsfvMrZBO2YDPjgKqg_wCYT2U8";
28
28
  export declare const ANT_LUA_ID = "k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg";
29
+ export declare const AO_AUTHORITY = "fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY";
29
30
  export declare const DEFAULT_SCHEDULER_ID = "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";
@@ -21,6 +21,7 @@ export type SpawnANTParams = {
21
21
  stateContractTxId?: string;
22
22
  antRegistryId?: string;
23
23
  logger?: Logger;
24
+ authority?: string;
24
25
  /**
25
26
  * @deprecated Compiled modules are now being used instead of luaCodeTxId
26
27
  */
@@ -30,7 +31,7 @@ export type SpawnANTParams = {
30
31
  */
31
32
  arweave?: Arweave;
32
33
  };
33
- export declare function spawnANT({ signer, module, ao, scheduler, state, stateContractTxId, antRegistryId, logger, }: SpawnANTParams): Promise<string>;
34
+ export declare function spawnANT({ signer, module, ao, scheduler, state, stateContractTxId, antRegistryId, logger, authority, }: SpawnANTParams): Promise<string>;
34
35
  export declare function evolveANT({ signer, processId, luaCodeTxId, ao, logger, arweave, }: {
35
36
  signer: AoSigner;
36
37
  processId: 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.3.0-alpha.9";
16
+ export declare const version = "3.3.0-alpha.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.3.0-alpha.10",
3
+ "version": "3.3.0-alpha.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"