Skip to content

Commit

Permalink
Remove I from INativeToken since it's a class (iotaledger#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Feb 7, 2024
1 parent c5a0d74 commit 812ca89
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions bindings/nodejs/lib/types/block/output/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from './block-issuer-key';
import { u256, u64 } from '../../utils/type-aliases';
import { EpochIndex } from '../../block/slot';
import { INativeToken } from '../../models/native-token';
import { NativeToken } from '../../models/native-token';
import { HexEncodedString } from '../../utils/hex-encoding';

/**
Expand Down Expand Up @@ -132,7 +132,7 @@ class NativeTokenFeature extends Feature {
* Creates a new `NativeTokenFeature`.
* @param nativeToken The native token stored with the feature.
*/
constructor(nativeToken: INativeToken) {
constructor(nativeToken: NativeToken) {
super(FeatureType.NativeToken);
this.id = nativeToken.id;
this.amount = nativeToken.amount;
Expand All @@ -141,7 +141,7 @@ class NativeTokenFeature extends Feature {
/**
* Returns the native token contained in this feature.
*/
public asNativeToken(): INativeToken {
public asNativeToken(): NativeToken {
return {
id: this.id,
amount: this.amount,
Expand Down
4 changes: 2 additions & 2 deletions bindings/nodejs/lib/types/block/output/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { HexEncodedString, NumericString, u64 } from '../../utils';
import { TokenScheme, TokenSchemeDiscriminator } from './token-scheme';
import { AccountId, NftId, AnchorId, DelegationId } from '../id';
import { EpochIndex } from '../../block/slot';
import { INativeToken } from '../../models/native-token';
import { NativeToken } from '../../models/native-token';

export type OutputId = HexEncodedString;

Expand Down Expand Up @@ -127,7 +127,7 @@ abstract class CommonOutput extends Output {
/**
* The native token held by the output.
*/
getNativeToken(): INativeToken | undefined {
getNativeToken(): NativeToken | undefined {
if (!this.features) {
return undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import {
UnlockCondition,
Feature,
INativeToken,
NativeToken,
NumericString,
u64,
} from '../..';
Expand All @@ -20,7 +20,7 @@ export interface BasicOutputBuilderParams {
/**
* The native tokens to be held by the output.
*/
nativeTokens?: INativeToken[];
nativeTokens?: NativeToken[];
/**
* The unlock conditions for the output.
*/
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/types/models/native-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { hexToBigInt } from '../utils/hex-encoding';
/**
* Native token.
*/
export class INativeToken {
export class NativeToken {
/**
* Identifier of the native token.
*/
Expand Down
4 changes: 2 additions & 2 deletions bindings/nodejs/lib/types/wallet/output-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { SlotIndex } from '../block/slot';
import { INativeToken } from '../models';
import { NativeToken } from '../models';
import { u64 } from '../utils';
import { HexEncodedString } from '../utils/hex-encoding';

Expand Down Expand Up @@ -39,7 +39,7 @@ export interface Features {
/** An Issuer feature to include. */
issuer?: string;
/** Native Token to include. */
nativeToken?: INativeToken;
nativeToken?: NativeToken;
}

/** Time unlocks to include in the output. */
Expand Down

0 comments on commit 812ca89

Please sign in to comment.