@ar.io/sdk 2.2.0-alpha.3 → 2.2.0

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.
@@ -24,10 +24,12 @@ const arweave_js_1 = require("../common/arweave.js");
24
24
  const index_js_1 = require("../common/index.js");
25
25
  const constants_js_1 = require("../constants.js");
26
26
  async function spawnANT({ signer, module = constants_js_1.AOS_MODULE_ID, luaCodeTxId = constants_js_1.ANT_LUA_ID, ao = (0, aoconnect_1.connect)(), scheduler = constants_js_1.DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = constants_js_1.ANT_REGISTRY_ID, }) {
27
- // AoSigner is not a Contract Signer - should probably add that to the contract signer type
28
- const registryClient = new index_js_1.AOProcess({
29
- processId: antRegistryId,
30
- ao,
27
+ const registryClient = index_js_1.ANTRegistry.init({
28
+ process: new index_js_1.AOProcess({
29
+ processId: antRegistryId,
30
+ ao,
31
+ }),
32
+ signer: signer,
31
33
  });
32
34
  //TODO: cache locally and only fetch if not cached
33
35
  const luaString = (await arweave_js_1.defaultArweave.transactions.getData(luaCodeTxId, {
@@ -70,13 +72,7 @@ async function spawnANT({ signer, module = constants_js_1.AOS_MODULE_ID, luaCode
70
72
  signer,
71
73
  });
72
74
  }
73
- await registryClient.send({
74
- tags: [
75
- { name: 'Action', value: 'Register' },
76
- { name: 'Process-Id', value: processId },
77
- ],
78
- signer,
79
- });
75
+ await registryClient.register({ processId });
80
76
  return processId;
81
77
  }
82
78
  exports.spawnANT = spawnANT;
@@ -18,4 +18,4 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.version = void 0;
20
20
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
21
- exports.version = '2.2.0-alpha.3';
21
+ exports.version = '2.2.0';
@@ -18,13 +18,15 @@ import { connect, createDataItemSigner } from '@permaweb/aoconnect';
18
18
  import { createData } from 'arbundles';
19
19
  import { z } from 'zod';
20
20
  import { defaultArweave } from '../common/arweave.js';
21
- import { AOProcess, Logger } from '../common/index.js';
21
+ import { ANTRegistry, AOProcess, Logger } from '../common/index.js';
22
22
  import { ANT_LUA_ID, ANT_REGISTRY_ID, AOS_MODULE_ID, DEFAULT_SCHEDULER_ID, } from '../constants.js';
23
23
  export async function spawnANT({ signer, module = AOS_MODULE_ID, luaCodeTxId = ANT_LUA_ID, ao = connect(), scheduler = DEFAULT_SCHEDULER_ID, state, stateContractTxId, antRegistryId = ANT_REGISTRY_ID, }) {
24
- // AoSigner is not a Contract Signer - should probably add that to the contract signer type
25
- const registryClient = new AOProcess({
26
- processId: antRegistryId,
27
- ao,
24
+ const registryClient = ANTRegistry.init({
25
+ process: new AOProcess({
26
+ processId: antRegistryId,
27
+ ao,
28
+ }),
29
+ signer: signer,
28
30
  });
29
31
  //TODO: cache locally and only fetch if not cached
30
32
  const luaString = (await defaultArweave.transactions.getData(luaCodeTxId, {
@@ -67,13 +69,7 @@ export async function spawnANT({ signer, module = AOS_MODULE_ID, luaCodeTxId = A
67
69
  signer,
68
70
  });
69
71
  }
70
- await registryClient.send({
71
- tags: [
72
- { name: 'Action', value: 'Register' },
73
- { name: 'Process-Id', value: processId },
74
- ],
75
- signer,
76
- });
72
+ await registryClient.register({ processId });
77
73
  return processId;
78
74
  }
79
75
  export async function evolveANT({ signer, processId, luaCodeTxId = ANT_LUA_ID, ao = connect(), }) {
@@ -15,4 +15,4 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
18
- export const version = '2.2.0-alpha.3';
18
+ export const version = '2.2.0';
@@ -5,7 +5,7 @@ export declare class ANTRegistry {
5
5
  static init(config: Required<ProcessConfiguration> & {
6
6
  signer?: undefined;
7
7
  }): AoANTRegistryRead;
8
- static init({ signer, ...config }: WithSigner<Required<ProcessConfiguration>>): AoANTRegistryRead;
8
+ static init({ signer, ...config }: WithSigner<Required<ProcessConfiguration>>): AoANTRegistryWrite;
9
9
  }
10
10
  export declare class AoANTRegistryReadable implements AoANTRegistryRead {
11
11
  protected process: AOProcess;
@@ -14,4 +14,4 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- export declare const version = "2.2.0-alpha.2";
17
+ export declare const version = "2.2.0-alpha.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.2.0-alpha.3",
3
+ "version": "2.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"