From 812ca8922bd5e7ca61059092936b3e7567f46ca8 Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:52:30 +0100 Subject: [PATCH] Remove I from INativeToken since it's a class (#1967) --- bindings/nodejs/lib/types/block/output/feature.ts | 6 +++--- bindings/nodejs/lib/types/block/output/output.ts | 4 ++-- .../client/output_builder_params/basic-output-params.ts | 4 ++-- bindings/nodejs/lib/types/models/native-token.ts | 2 +- bindings/nodejs/lib/types/wallet/output-params.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bindings/nodejs/lib/types/block/output/feature.ts b/bindings/nodejs/lib/types/block/output/feature.ts index a9fefdd2be..1d56e6d08a 100644 --- a/bindings/nodejs/lib/types/block/output/feature.ts +++ b/bindings/nodejs/lib/types/block/output/feature.ts @@ -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'; /** @@ -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; @@ -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, diff --git a/bindings/nodejs/lib/types/block/output/output.ts b/bindings/nodejs/lib/types/block/output/output.ts index d93e929c7e..c72e96dd8c 100644 --- a/bindings/nodejs/lib/types/block/output/output.ts +++ b/bindings/nodejs/lib/types/block/output/output.ts @@ -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; @@ -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; } diff --git a/bindings/nodejs/lib/types/client/output_builder_params/basic-output-params.ts b/bindings/nodejs/lib/types/client/output_builder_params/basic-output-params.ts index 0ec7993f93..9dba6425a5 100644 --- a/bindings/nodejs/lib/types/client/output_builder_params/basic-output-params.ts +++ b/bindings/nodejs/lib/types/client/output_builder_params/basic-output-params.ts @@ -4,7 +4,7 @@ import { UnlockCondition, Feature, - INativeToken, + NativeToken, NumericString, u64, } from '../..'; @@ -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. */ diff --git a/bindings/nodejs/lib/types/models/native-token.ts b/bindings/nodejs/lib/types/models/native-token.ts index f9c91a21e7..4153ff7720 100644 --- a/bindings/nodejs/lib/types/models/native-token.ts +++ b/bindings/nodejs/lib/types/models/native-token.ts @@ -9,7 +9,7 @@ import { hexToBigInt } from '../utils/hex-encoding'; /** * Native token. */ -export class INativeToken { +export class NativeToken { /** * Identifier of the native token. */ diff --git a/bindings/nodejs/lib/types/wallet/output-params.ts b/bindings/nodejs/lib/types/wallet/output-params.ts index eaba4bb4d0..a41fbea191 100644 --- a/bindings/nodejs/lib/types/wallet/output-params.ts +++ b/bindings/nodejs/lib/types/wallet/output-params.ts @@ -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'; @@ -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. */