Skip to content

Commit 309e538

Browse files
marc2332evavirseda
andauthored
fix imports and make the ts sdk a peer dependency (#482)
Co-authored-by: evavirseda <evirseda@boxfish.studio>
1 parent 4755846 commit 309e538

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"engines": {
4141
"node": ">=20"
4242
},
43-
"dependencies": {
43+
"peerDependencies": {
4444
"@iota/iota-sdk": "0.0.0-experimental-20250620081851"
4545
},
4646
"devDependencies": {

sdk/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import type { Transaction } from '@iota/iota-sdk/transactions';
66

7-
import { normalizeIotaName } from './utils';
7+
import { normalizeIotaName } from './utils.js';
88

99
export function isSubname(name: string): boolean {
1010
return normalizeIotaName(name, 'dot').split('.').length > 2;

sdk/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Modifications Copyright (c) 2025 IOTA Stiftung
33
// SPDX-License-Identifier: Apache-2.0
44

5-
export { IotaNamesClient } from './iota-names-client';
6-
export { IotaNamesTransaction } from './iota-names-transaction';
5+
export { IotaNamesClient } from './iota-names-client.js';
6+
export { IotaNamesTransaction } from './iota-names-transaction.js';
77
export type { IotaNamesClientConfig, NameRecord } from './types';
8-
export { ALLOWED_METADATA, MIN_LABEL_SIZE, GRACE_PERIOD_MS, packages } from './constants';
8+
export { ALLOWED_METADATA, MIN_LABEL_SIZE, GRACE_PERIOD_MS, packages } from './constants.js';
99
export {
1010
isSubname,
1111
isNestedSubname,

sdk/src/iota-names-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import type {
2424
NameRecord,
2525
PackageInfo,
2626
} from './types.js';
27-
import { isValidIotaName, normalizeIotaName } from './utils';
27+
import { isValidIotaName, normalizeIotaName } from './utils.js';
2828

2929
/// The IotaNamesClient is the main entry point for the IotaNames SDK.
3030
/// It allows you to interact with IOTA-Names.

sdk/src/iota-names-transaction.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import type {
1010
} from '@iota/iota-sdk/transactions';
1111
import { IOTA_CLOCK_OBJECT_ID } from '@iota/iota-sdk/utils';
1212

13-
import { ALLOWED_METADATA } from './constants';
14-
import { isNestedSubname, isSubname } from './helpers';
15-
import type { IotaNamesClient } from './iota-names-client';
13+
import { ALLOWED_METADATA } from './constants.js';
14+
import { isNestedSubname, isSubname } from './helpers.js';
15+
import type { IotaNamesClient } from './iota-names-client.js';
1616
import type { ReceiptParams, RegistrationParams, RenewalParams } from './types';
17-
import { isValidIotaName, normalizeIotaName } from './utils';
17+
import { isValidIotaName, normalizeIotaName } from './utils.js';
1818

1919
export class IotaNamesTransaction {
2020
iotaNamesClient: IotaNamesClient;

0 commit comments

Comments
 (0)