@strkfarm/sdk 1.0.63 → 1.1.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/dist/cli.js CHANGED
@@ -151,7 +151,7 @@ var Store = class _Store {
151
151
  logger.warn(`This not stored anywhere, please you backup this password for future use`);
152
152
  logger.warn(`\u26A0\uFE0F=========================================\u26A0\uFE0F`);
153
153
  }
154
- getAccount(accountKey, txVersion = import_starknet.constants.TRANSACTION_VERSION.V2) {
154
+ getAccount(accountKey, txVersion) {
155
155
  const accounts = this.loadAccounts();
156
156
  logger.verbose(`nAccounts loaded for network: ${Object.keys(accounts).length}`);
157
157
  const data = accounts[accountKey];
@@ -160,7 +160,13 @@ var Store = class _Store {
160
160
  }
161
161
  logger.verbose(`Account loaded: ${accountKey} from network: ${this.config.network}`);
162
162
  logger.verbose(`Address: ${data.address}`);
163
- const acc = new import_starknet.Account(this.config.provider, data.address, data.pk, void 0, txVersion);
163
+ const acc = new import_starknet.Account({
164
+ provider: this.config.provider,
165
+ address: data.address,
166
+ signer: data.pk,
167
+ cairoVersion: void 0,
168
+ transactionVersion: txVersion
169
+ });
164
170
  return acc;
165
171
  }
166
172
  addAccount(accountKey, address, pk) {
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import inquirer from "inquirer";
6
6
 
7
7
  // src/utils/store.ts
8
8
  import fs, { readFileSync, writeFileSync } from "fs";
9
- import { Account, constants } from "starknet";
9
+ import { Account } from "starknet";
10
10
  import * as crypto2 from "crypto";
11
11
 
12
12
  // src/utils/encrypt.ts
@@ -128,7 +128,7 @@ var Store = class _Store {
128
128
  logger.warn(`This not stored anywhere, please you backup this password for future use`);
129
129
  logger.warn(`\u26A0\uFE0F=========================================\u26A0\uFE0F`);
130
130
  }
131
- getAccount(accountKey, txVersion = constants.TRANSACTION_VERSION.V2) {
131
+ getAccount(accountKey, txVersion) {
132
132
  const accounts = this.loadAccounts();
133
133
  logger.verbose(`nAccounts loaded for network: ${Object.keys(accounts).length}`);
134
134
  const data = accounts[accountKey];
@@ -137,7 +137,13 @@ var Store = class _Store {
137
137
  }
138
138
  logger.verbose(`Account loaded: ${accountKey} from network: ${this.config.network}`);
139
139
  logger.verbose(`Address: ${data.address}`);
140
- const acc = new Account(this.config.provider, data.address, data.pk, void 0, txVersion);
140
+ const acc = new Account({
141
+ provider: this.config.provider,
142
+ address: data.address,
143
+ signer: data.pk,
144
+ cairoVersion: void 0,
145
+ transactionVersion: txVersion
146
+ });
141
147
  return acc;
142
148
  }
143
149
  addAccount(accountKey, address, pk) {