@ar.io/sdk 2.0.0-alpha.10 → 2.0.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.
@@ -130,12 +130,17 @@ class ArNSEventEmitter extends eventemitter3_1.EventEmitter {
130
130
  exports.ArNSEventEmitter = ArNSEventEmitter;
131
131
  const fetchAllArNSRecords = async ({ contract = io_js_1.IO.init({
132
132
  processId: constants_js_1.IO_TESTNET_PROCESS_ID,
133
- }), }) => {
133
+ }), logger, }) => {
134
134
  let cursor;
135
135
  const records = {};
136
136
  do {
137
- const pageResult = await contract.getArNSRecords({ cursor }).catch((e) => {
138
- console.error(`Error getting ArNS records: ${e}`);
137
+ const pageResult = await contract
138
+ .getArNSRecords({ cursor })
139
+ .catch((e) => {
140
+ logger?.error(`Error getting ArNS records`, {
141
+ message: e?.message,
142
+ stack: e?.stack,
143
+ });
139
144
  return undefined;
140
145
  });
141
146
  if (!pageResult) {
@@ -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.0.0-alpha.10';
21
+ exports.version = '2.0.0-alpha.11';
@@ -125,12 +125,17 @@ export class ArNSEventEmitter extends EventEmitter {
125
125
  }
126
126
  export const fetchAllArNSRecords = async ({ contract = IO.init({
127
127
  processId: IO_TESTNET_PROCESS_ID,
128
- }), }) => {
128
+ }), logger, }) => {
129
129
  let cursor;
130
130
  const records = {};
131
131
  do {
132
- const pageResult = await contract.getArNSRecords({ cursor }).catch((e) => {
133
- console.error(`Error getting ArNS records: ${e}`);
132
+ const pageResult = await contract
133
+ .getArNSRecords({ cursor })
134
+ .catch((e) => {
135
+ logger?.error(`Error getting ArNS records`, {
136
+ message: e?.message,
137
+ stack: e?.stack,
138
+ });
134
139
  return undefined;
135
140
  });
136
141
  if (!pageResult) {
@@ -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.0.0-alpha.10';
18
+ export const version = '2.0.0-alpha.11';
@@ -15,6 +15,7 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  import { EventEmitter } from 'eventemitter3';
18
+ import { ILogger } from '../common/logger.js';
18
19
  import { AoArNSNameData, AoIORead, ProcessId, WalletAddress } from '../types.js';
19
20
  export declare const getANTProcessesOwnedByWallet: ({ address, contract, }: {
20
21
  address: WalletAddress;
@@ -33,6 +34,7 @@ export declare class ArNSEventEmitter extends EventEmitter {
33
34
  address: WalletAddress;
34
35
  }): Promise<void>;
35
36
  }
36
- export declare const fetchAllArNSRecords: ({ contract, }: {
37
+ export declare const fetchAllArNSRecords: ({ contract, logger, }: {
37
38
  contract?: AoIORead;
39
+ logger?: ILogger;
38
40
  }) => Promise<Record<string, AoArNSNameData>>;
@@ -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.0.0-alpha.9";
17
+ export declare const version = "2.0.0-alpha.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"