diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9181fdc105f..3a2f0c4e5c4 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,7 +13,7 @@ jobs: outputs: isWallet: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-wallet')) }} isExplorer: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-explorer')) }} - isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota.js')) }} + isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }} isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }} isRust: ${{ steps.diff.outputs.isRust }} steps: @@ -67,7 +67,7 @@ jobs: - name: Run TS SDK e2e tests if: ${{ needs.diff.outputs.isTypescriptSDK == 'true' || needs.diff.outputs.isRust == 'true'}} - run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/iota.js test:e2e' + run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/iota-sdk test:e2e' - name: Run RPC/GraphQL compatibility e2e tests if: ${{ needs.diff.outputs.isGraphQlTransport == 'true' || needs.diff.outputs.isRust == 'true'}} diff --git a/apps/apps-backend/package.json b/apps/apps-backend/package.json index a3bef261e04..a279e5e0bf5 100644 --- a/apps/apps-backend/package.json +++ b/apps/apps-backend/package.json @@ -10,7 +10,7 @@ "lint": "eslint --max-warnings=0 \"{src,apps,libs,test}/**/*.ts\"" }, "dependencies": { - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@nestjs/cache-manager": "^2.2.2", "@nestjs/common": "^10.0.0", "@nestjs/config": "^3.2.2", diff --git a/apps/apps-backend/src/features/features.mock.ts b/apps/apps-backend/src/features/features.mock.ts index 0dcc2a774b5..67894cf0488 100644 --- a/apps/apps-backend/src/features/features.mock.ts +++ b/apps/apps-backend/src/features/features.mock.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getDefaultNetwork, Network } from '@iota/iota.js/client'; +import { getDefaultNetwork, Network } from '@iota/iota-sdk/client'; const walletDapps = [ { diff --git a/apps/core/package.json b/apps/core/package.json index 6530e82c2b5..66e26224d2e 100644 --- a/apps/core/package.json +++ b/apps/core/package.json @@ -27,7 +27,7 @@ "@growthbook/growthbook-react": "^1.0.0", "@hookform/resolvers": "^3.1.1", "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/kiosk": "workspace:*", "@sentry/react": "^7.59.2", "@tanstack/react-query": "^5.0.0", diff --git a/apps/core/src/api/SentryHttpTransport.ts b/apps/core/src/api/SentryHttpTransport.ts index daec18660c6..7ed5331c0e2 100644 --- a/apps/core/src/api/SentryHttpTransport.ts +++ b/apps/core/src/api/SentryHttpTransport.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaHTTPTransport } from '@iota/iota.js/client'; +import { IotaHTTPTransport } from '@iota/iota-sdk/client'; import * as Sentry from '@sentry/react'; const IGNORED_METHODS = ['iotax_resolveNameServiceNames', 'iotax_resolveNameServiceAddresses']; diff --git a/apps/core/src/constants/recognizedPackages.constants.ts b/apps/core/src/constants/recognizedPackages.constants.ts index 2c1335ae1ea..5507109c15a 100644 --- a/apps/core/src/constants/recognizedPackages.constants.ts +++ b/apps/core/src/constants/recognizedPackages.constants.ts @@ -1,6 +1,6 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS } from '@iota/iota.js/utils'; +import { IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS } from '@iota/iota-sdk/utils'; export const DEFAULT_RECOGNIZED_PACKAGES = [IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS]; diff --git a/apps/core/src/hooks/stake/useGetDelegatedStake.ts b/apps/core/src/hooks/stake/useGetDelegatedStake.ts index 5b4cd55e914..00132438594 100644 --- a/apps/core/src/hooks/stake/useGetDelegatedStake.ts +++ b/apps/core/src/hooks/stake/useGetDelegatedStake.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import type { DelegatedStake } from '@iota/iota.js/client'; +import type { DelegatedStake } from '@iota/iota-sdk/client'; import { useQuery, type UseQueryOptions } from '@tanstack/react-query'; type UseGetDelegatedStakesOptions = { diff --git a/apps/core/src/hooks/useAppsBackend.ts b/apps/core/src/hooks/useAppsBackend.ts index e57dd842439..9492fdde236 100644 --- a/apps/core/src/hooks/useAppsBackend.ts +++ b/apps/core/src/hooks/useAppsBackend.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getAppsBackend } from '@iota/iota.js/client'; +import { getAppsBackend } from '@iota/iota-sdk/client'; import { useCallback } from 'react'; export function useAppsBackend() { diff --git a/apps/core/src/hooks/useBalance.ts b/apps/core/src/hooks/useBalance.ts index cc30b54769c..af3741d1626 100644 --- a/apps/core/src/hooks/useBalance.ts +++ b/apps/core/src/hooks/useBalance.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClientQuery } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; const DEFAULT_REFETCH_INTERVAL = 1000; const DEFAULT_STALE_TIME = 5000; diff --git a/apps/core/src/hooks/useExtendedTransactionSummary.ts b/apps/core/src/hooks/useExtendedTransactionSummary.ts index 53111e72d5b..8fb9ccc3b36 100644 --- a/apps/core/src/hooks/useExtendedTransactionSummary.ts +++ b/apps/core/src/hooks/useExtendedTransactionSummary.ts @@ -3,7 +3,7 @@ import { useTransactionSummary } from './'; import { useCurrentAccount, useIotaClient } from '@iota/dapp-kit'; -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; export function useExtendedTransactionSummary( diff --git a/apps/core/src/hooks/useFormatCoin.ts b/apps/core/src/hooks/useFormatCoin.ts index e8fed32dda3..f9212f97846 100644 --- a/apps/core/src/hooks/useFormatCoin.ts +++ b/apps/core/src/hooks/useFormatCoin.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { CoinMetadata } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { CoinMetadata } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useQuery, type UseQueryResult } from '@tanstack/react-query'; import BigNumber from 'bignumber.js'; import { useMemo } from 'react'; diff --git a/apps/core/src/hooks/useGetAllCoins.ts b/apps/core/src/hooks/useGetAllCoins.ts index ce4af8de50b..f08325b5780 100644 --- a/apps/core/src/hooks/useGetAllCoins.ts +++ b/apps/core/src/hooks/useGetAllCoins.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import type { CoinStruct, PaginatedCoins } from '@iota/iota.js/client'; +import type { CoinStruct, PaginatedCoins } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; const MAX_COINS_PER_REQUEST = 100; diff --git a/apps/core/src/hooks/useGetAllTimelockedObjects.ts b/apps/core/src/hooks/useGetAllTimelockedObjects.ts index b5279c153ee..7b3880d869b 100644 --- a/apps/core/src/hooks/useGetAllTimelockedObjects.ts +++ b/apps/core/src/hooks/useGetAllTimelockedObjects.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { IotaObjectData, type IotaObjectDataFilter } from '@iota/iota.js/client'; +import { IotaObjectData, type IotaObjectDataFilter } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { TIMELOCK_TYPE } from '../constants'; diff --git a/apps/core/src/hooks/useGetCoins.ts b/apps/core/src/hooks/useGetCoins.ts index 34c87b136df..51065f6f754 100644 --- a/apps/core/src/hooks/useGetCoins.ts +++ b/apps/core/src/hooks/useGetCoins.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { PaginatedCoins } from '@iota/iota.js/client'; +import { PaginatedCoins } from '@iota/iota-sdk/client'; import { useInfiniteQuery } from '@tanstack/react-query'; const MAX_COINS_PER_REQUEST = 10; diff --git a/apps/core/src/hooks/useGetDynamicFields.ts b/apps/core/src/hooks/useGetDynamicFields.ts index 8e466b30267..3a1762f2a3f 100644 --- a/apps/core/src/hooks/useGetDynamicFields.ts +++ b/apps/core/src/hooks/useGetDynamicFields.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { DynamicFieldPage } from '@iota/iota.js/client'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { DynamicFieldPage } from '@iota/iota-sdk/client'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import { useInfiniteQuery } from '@tanstack/react-query'; const MAX_PAGE_SIZE = 10; diff --git a/apps/core/src/hooks/useGetKioskContents.ts b/apps/core/src/hooks/useGetKioskContents.ts index 3f9a4ca8b79..47e70b349ac 100644 --- a/apps/core/src/hooks/useGetKioskContents.ts +++ b/apps/core/src/hooks/useGetKioskContents.ts @@ -4,7 +4,7 @@ import { useIotaClientContext } from '@iota/dapp-kit'; import { KIOSK_ITEM, KioskClient, KioskItem, KioskOwnerCap } from '@iota/kiosk'; -import { IotaClient } from '@iota/iota.js/client'; +import { IotaClient } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { getKioskIdFromOwnerCap, ORIGINBYTE_KIOSK_OWNER_TOKEN } from '../utils/kiosk'; diff --git a/apps/core/src/hooks/useGetObject.ts b/apps/core/src/hooks/useGetObject.ts index e2ab0f8bc1e..29f900b1cef 100644 --- a/apps/core/src/hooks/useGetObject.ts +++ b/apps/core/src/hooks/useGetObject.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import { useQuery } from '@tanstack/react-query'; const defaultOptions = { diff --git a/apps/core/src/hooks/useGetOwnedObjects.ts b/apps/core/src/hooks/useGetOwnedObjects.ts index 578a2e5c5cb..b931dd60a94 100644 --- a/apps/core/src/hooks/useGetOwnedObjects.ts +++ b/apps/core/src/hooks/useGetOwnedObjects.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { PaginatedObjectsResponse, type IotaObjectDataFilter } from '@iota/iota.js/client'; +import { PaginatedObjectsResponse, type IotaObjectDataFilter } from '@iota/iota-sdk/client'; import { useInfiniteQuery } from '@tanstack/react-query'; const MAX_OBJECTS_PER_REQ = 6; diff --git a/apps/core/src/hooks/useGetTransaction.ts b/apps/core/src/hooks/useGetTransaction.ts index 05fb3a26b3b..8ceab13c2cf 100644 --- a/apps/core/src/hooks/useGetTransaction.ts +++ b/apps/core/src/hooks/useGetTransaction.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; export function useGetTransaction( diff --git a/apps/core/src/hooks/useGetTransferAmount.ts b/apps/core/src/hooks/useGetTransferAmount.ts index 1789dd6dd97..11d0c41472a 100644 --- a/apps/core/src/hooks/useGetTransferAmount.ts +++ b/apps/core/src/hooks/useGetTransferAmount.ts @@ -1,8 +1,8 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useMemo } from 'react'; import { getTotalGasUsed } from '../utils/transaction'; diff --git a/apps/core/src/hooks/useGetValidatorsEvents.ts b/apps/core/src/hooks/useGetValidatorsEvents.ts index f4723d90f15..c0511d73aae 100644 --- a/apps/core/src/hooks/useGetValidatorsEvents.ts +++ b/apps/core/src/hooks/useGetValidatorsEvents.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { IotaEvent, type EventId } from '@iota/iota.js/client'; +import { IotaEvent, type EventId } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; type GetValidatorsEvent = { diff --git a/apps/core/src/hooks/useMultiGetObjects.ts b/apps/core/src/hooks/useMultiGetObjects.ts index db645fca8ce..17f0210cf2f 100644 --- a/apps/core/src/hooks/useMultiGetObjects.ts +++ b/apps/core/src/hooks/useMultiGetObjects.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { IotaObjectDataOptions, IotaObjectResponse } from '@iota/iota.js/client'; +import { IotaObjectDataOptions, IotaObjectResponse } from '@iota/iota-sdk/client'; import { useQuery, UseQueryOptions } from '@tanstack/react-query'; import { chunkArray } from '../utils/chunkArray'; diff --git a/apps/core/src/hooks/useQueryTransactionsByAddress.ts b/apps/core/src/hooks/useQueryTransactionsByAddress.ts index 7ab0ba650a1..f11e7f87841 100644 --- a/apps/core/src/hooks/useQueryTransactionsByAddress.ts +++ b/apps/core/src/hooks/useQueryTransactionsByAddress.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; export function useQueryTransactionsByAddress(address?: string | null) { diff --git a/apps/core/src/hooks/useSortedCoinsByCategories.ts b/apps/core/src/hooks/useSortedCoinsByCategories.ts index 33a912d0846..0cc4a649f3f 100644 --- a/apps/core/src/hooks/useSortedCoinsByCategories.ts +++ b/apps/core/src/hooks/useSortedCoinsByCategories.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CoinBalance } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { type CoinBalance } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useMemo } from 'react'; import { DEFAULT_RECOGNIZED_PACKAGES } from '../constants'; diff --git a/apps/core/src/hooks/useTransactionSummary.ts b/apps/core/src/hooks/useTransactionSummary.ts index a0315a79353..aab6f4613c3 100644 --- a/apps/core/src/hooks/useTransactionSummary.ts +++ b/apps/core/src/hooks/useTransactionSummary.ts @@ -4,7 +4,7 @@ import { DryRunTransactionBlockResponse, type IotaTransactionBlockResponse, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import { useMemo } from 'react'; import { getBalanceChangeSummary } from '../utils/transaction/getBalanceChangeSummary'; diff --git a/apps/core/src/utils/filterAndSortTokenBalances.ts b/apps/core/src/utils/filterAndSortTokenBalances.ts index c7bb8d48e74..86991d5e215 100644 --- a/apps/core/src/utils/filterAndSortTokenBalances.ts +++ b/apps/core/src/utils/filterAndSortTokenBalances.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CoinBalance } from '@iota/iota.js/client'; +import { type CoinBalance } from '@iota/iota-sdk/client'; import { getCoinSymbol } from '../hooks'; /** diff --git a/apps/core/src/utils/getOwnerDisplay.ts b/apps/core/src/utils/getOwnerDisplay.ts index 68a34be240a..b81dc469b19 100644 --- a/apps/core/src/utils/getOwnerDisplay.ts +++ b/apps/core/src/utils/getOwnerDisplay.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { formatAddress, isValidIotaAddress } from '@iota/iota.js/utils'; +import { formatAddress, isValidIotaAddress } from '@iota/iota-sdk/utils'; export function getOwnerDisplay( owner?: string, diff --git a/apps/core/src/utils/getRefGasPrice.ts b/apps/core/src/utils/getRefGasPrice.ts index 21690dbac59..5e4b18dde1c 100644 --- a/apps/core/src/utils/getRefGasPrice.ts +++ b/apps/core/src/utils/getRefGasPrice.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaValidatorSummary } from '@iota/iota.js/client'; +import { IotaValidatorSummary } from '@iota/iota-sdk/client'; import { calculateStakeShare } from './calculateStakeShare'; diff --git a/apps/core/src/utils/hasDisplayData.ts b/apps/core/src/utils/hasDisplayData.ts index da82d6342a4..9742be99d70 100644 --- a/apps/core/src/utils/hasDisplayData.ts +++ b/apps/core/src/utils/hasDisplayData.ts @@ -2,6 +2,6 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectResponse } from '@iota/iota.js/client'; +import { IotaObjectResponse } from '@iota/iota-sdk/client'; export const hasDisplayData = (obj: IotaObjectResponse) => !!obj.data?.display?.data; diff --git a/apps/core/src/utils/isAssetTransferable.ts b/apps/core/src/utils/isAssetTransferable.ts index 9fc60e9696c..3f91570a6d5 100644 --- a/apps/core/src/utils/isAssetTransferable.ts +++ b/apps/core/src/utils/isAssetTransferable.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectData } from '@iota/iota.js/client'; +import { IotaObjectData } from '@iota/iota-sdk/client'; export const isAssetTransferable = (obj: IotaObjectData | null | undefined): boolean => !!obj && obj.content?.dataType === 'moveObject' && obj.content.hasPublicTransfer; diff --git a/apps/core/src/utils/kiosk.ts b/apps/core/src/utils/kiosk.ts index 4804f036f2f..21a9065f1ee 100644 --- a/apps/core/src/utils/kiosk.ts +++ b/apps/core/src/utils/kiosk.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { KIOSK_OWNER_CAP } from '@iota/kiosk'; -import { IotaObjectData, IotaObjectResponse, NetworkId, getNetwork } from '@iota/iota.js/client'; +import { IotaObjectData, IotaObjectResponse, NetworkId, getNetwork } from '@iota/iota-sdk/client'; export const ORIGINBYTE_KIOSK_MODULE = '0x95a441d389b07437d00dd07e0b6f05f513d7659b13fd7c5d3923c7d9d847199b::ob_kiosk'; diff --git a/apps/core/src/utils/parseObjectDetails.ts b/apps/core/src/utils/parseObjectDetails.ts index 67ee889794d..76a9884c5d8 100644 --- a/apps/core/src/utils/parseObjectDetails.ts +++ b/apps/core/src/utils/parseObjectDetails.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { IotaObjectChangeWithDisplay } from '..'; -import { IotaObjectChange } from '@iota/iota.js/client'; +import { IotaObjectChange } from '@iota/iota-sdk/client'; type ObjectChangeWithObjectType = Extract< IotaObjectChange | IotaObjectChangeWithDisplay, diff --git a/apps/core/src/utils/stake/createStakeTransaction.ts b/apps/core/src/utils/stake/createStakeTransaction.ts index 859b7d3cb7d..f90265c13d7 100644 --- a/apps/core/src/utils/stake/createStakeTransaction.ts +++ b/apps/core/src/utils/stake/createStakeTransaction.ts @@ -1,8 +1,8 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { IOTA_SYSTEM_STATE_OBJECT_ID } from '@iota/iota.js/utils'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { IOTA_SYSTEM_STATE_OBJECT_ID } from '@iota/iota-sdk/utils'; export function createStakeTransaction(amount: bigint, validator: string) { const tx = new TransactionBlock(); diff --git a/apps/core/src/utils/stake/createUnstakeTransaction.ts b/apps/core/src/utils/stake/createUnstakeTransaction.ts index 48b322343c7..9d390c9cb8f 100644 --- a/apps/core/src/utils/stake/createUnstakeTransaction.ts +++ b/apps/core/src/utils/stake/createUnstakeTransaction.ts @@ -1,8 +1,8 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { IOTA_SYSTEM_STATE_OBJECT_ID } from '@iota/iota.js/utils'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { IOTA_SYSTEM_STATE_OBJECT_ID } from '@iota/iota-sdk/utils'; export function createUnstakeTransaction(stakedIotaId: string) { const tx = new TransactionBlock(); diff --git a/apps/core/src/utils/stake/formatDelegatedStake.ts b/apps/core/src/utils/stake/formatDelegatedStake.ts index fbdeee85013..a4fe3dde0b8 100644 --- a/apps/core/src/utils/stake/formatDelegatedStake.ts +++ b/apps/core/src/utils/stake/formatDelegatedStake.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { DelegatedStake, StakeObject } from '@iota/iota.js/client'; +import { DelegatedStake, StakeObject } from '@iota/iota-sdk/client'; export type ExtendedDelegatedStake = StakeObject & { validatorAddress: string; diff --git a/apps/core/src/utils/transaction/createNftSendValidationSchema.ts b/apps/core/src/utils/transaction/createNftSendValidationSchema.ts index 12574ef6ff3..ba41c8b87ed 100644 --- a/apps/core/src/utils/transaction/createNftSendValidationSchema.ts +++ b/apps/core/src/utils/transaction/createNftSendValidationSchema.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaClient } from '@iota/iota.js/client'; +import { type IotaClient } from '@iota/iota-sdk/client'; import * as Yup from 'yup'; import { createIotaAddressValidation } from '../validation'; import { ValidationError } from 'yup'; diff --git a/apps/core/src/utils/transaction/createTokenTransferTransaction.ts b/apps/core/src/utils/transaction/createTokenTransferTransaction.ts index 850c1afa101..6721b75f79e 100644 --- a/apps/core/src/utils/transaction/createTokenTransferTransaction.ts +++ b/apps/core/src/utils/transaction/createTokenTransferTransaction.ts @@ -2,9 +2,9 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CoinStruct } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { type CoinStruct } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { parseAmount } from '../parseAmount'; interface Options { diff --git a/apps/core/src/utils/transaction/getBalanceChangeSummary.ts b/apps/core/src/utils/transaction/getBalanceChangeSummary.ts index f42c71a285b..d32cb908a8d 100644 --- a/apps/core/src/utils/transaction/getBalanceChangeSummary.ts +++ b/apps/core/src/utils/transaction/getBalanceChangeSummary.ts @@ -5,8 +5,8 @@ import { type DryRunTransactionBlockResponse, type ObjectOwner, type IotaTransactionBlockResponse, -} from '@iota/iota.js/client'; -import { normalizeIotaObjectId, parseStructTag } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { normalizeIotaObjectId, parseStructTag } from '@iota/iota-sdk/utils'; export type BalanceChange = { coinType: string; diff --git a/apps/core/src/utils/transaction/getGasSummary.ts b/apps/core/src/utils/transaction/getGasSummary.ts index 975dde35d4d..934002b6da2 100644 --- a/apps/core/src/utils/transaction/getGasSummary.ts +++ b/apps/core/src/utils/transaction/getGasSummary.ts @@ -7,7 +7,7 @@ import { IotaGasData, IotaTransactionBlockResponse, TransactionEffects, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; type Optional = { [K in keyof T]?: T[K]; diff --git a/apps/core/src/utils/transaction/getLabel.ts b/apps/core/src/utils/transaction/getLabel.ts index de486be930b..fbcd0e57649 100644 --- a/apps/core/src/utils/transaction/getLabel.ts +++ b/apps/core/src/utils/transaction/getLabel.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; // todo: add more logic for deriving transaction label export const getLabel = (transaction: IotaTransactionBlockResponse, currentAddress?: string) => { diff --git a/apps/core/src/utils/transaction/getObjectChangeSummary.ts b/apps/core/src/utils/transaction/getObjectChangeSummary.ts index 308ca7d8088..a2a5dd010a1 100644 --- a/apps/core/src/utils/transaction/getObjectChangeSummary.ts +++ b/apps/core/src/utils/transaction/getObjectChangeSummary.ts @@ -10,7 +10,7 @@ import { IotaObjectChangePublished, IotaObjectChangeTransferred, IotaObjectChangeWrapped, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import { groupByOwner } from './groupByOwner'; import { IotaObjectChangeTypes } from './types'; diff --git a/apps/core/src/utils/transaction/getObjectDisplayLookup.ts b/apps/core/src/utils/transaction/getObjectDisplayLookup.ts index 69d63632476..bb234bd1878 100644 --- a/apps/core/src/utils/transaction/getObjectDisplayLookup.ts +++ b/apps/core/src/utils/transaction/getObjectDisplayLookup.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { DisplayFieldsResponse, IotaObjectResponse } from '@iota/iota.js/client'; +import { DisplayFieldsResponse, IotaObjectResponse } from '@iota/iota-sdk/client'; import { hasDisplayData } from '../hasDisplayData'; diff --git a/apps/core/src/utils/transaction/getOwnerType.ts b/apps/core/src/utils/transaction/getOwnerType.ts index b6aa01fa307..18d08bdd9ab 100644 --- a/apps/core/src/utils/transaction/getOwnerType.ts +++ b/apps/core/src/utils/transaction/getOwnerType.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaObjectChange } from '@iota/iota.js/client'; +import type { IotaObjectChange } from '@iota/iota-sdk/client'; export const getOwnerType = (change: IotaObjectChange) => { if (!('owner' in change)) return ''; diff --git a/apps/core/src/utils/validation/createIotaAdressValidation.ts b/apps/core/src/utils/validation/createIotaAdressValidation.ts index 27f86591f31..bb49fe71aca 100644 --- a/apps/core/src/utils/validation/createIotaAdressValidation.ts +++ b/apps/core/src/utils/validation/createIotaAdressValidation.ts @@ -2,9 +2,9 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaClient } from '@iota/iota.js/client'; +import { IotaClient } from '@iota/iota-sdk/client'; import { isIotaNSName } from '../../hooks'; -import { isValidIotaAddress } from '@iota/iota.js/utils'; +import { isValidIotaAddress } from '@iota/iota-sdk/utils'; import * as Yup from 'yup'; import { ValidationError } from 'yup'; diff --git a/apps/explorer/package.json b/apps/explorer/package.json index 081150ba001..31d2783cce5 100644 --- a/apps/explorer/package.json +++ b/apps/explorer/package.json @@ -30,7 +30,7 @@ "@iota/core": "workspace:*", "@iota/dapp-kit": "workspace:*", "@iota/icons": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/ui": "workspace:*", "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-dropdown-menu": "^2.0.5", diff --git a/apps/explorer/src/components/AccountCardGraph.tsx b/apps/explorer/src/components/AccountCardGraph.tsx index 1da31d7d01f..3f99d07ed71 100644 --- a/apps/explorer/src/components/AccountCardGraph.tsx +++ b/apps/explorer/src/components/AccountCardGraph.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { formatAmount, formatDate } from '@iota/core'; -import { type AllEpochsAddressMetrics } from '@iota/iota.js/client'; +import { type AllEpochsAddressMetrics } from '@iota/iota-sdk/client'; import { Heading, LoadingIndicator, Text } from '@iota/ui'; import { ParentSize } from '@visx/responsive'; import clsx from 'clsx'; diff --git a/apps/explorer/src/components/gas-breakdown/GasBreakdown.tsx b/apps/explorer/src/components/gas-breakdown/GasBreakdown.tsx index fb6ac2c0774..b0dda4402b3 100644 --- a/apps/explorer/src/components/gas-breakdown/GasBreakdown.tsx +++ b/apps/explorer/src/components/gas-breakdown/GasBreakdown.tsx @@ -8,7 +8,7 @@ import { useFormatCoin, useResolveIotaNSName, } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Heading, Text } from '@iota/ui'; import { diff --git a/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx b/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx index cb05ac5c869..2ba91446238 100644 --- a/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx +++ b/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx @@ -9,7 +9,7 @@ import { Heading } from '@iota/ui'; import { Card, Divider } from '~/components/ui'; import { useGetNetworkMetrics } from '~/hooks/useGetNetworkMetrics'; import { FormattedStatsAmount, StatsWrapper } from './FormattedStatsAmount'; -import { IOTA_DECIMALS, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_DECIMALS, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; export function OnTheNetwork(): JSX.Element { const { data: networkMetrics } = useGetNetworkMetrics(); diff --git a/apps/explorer/src/components/layout/Layout.tsx b/apps/explorer/src/components/layout/Layout.tsx index 64b033974f5..3b99f1a6988 100644 --- a/apps/explorer/src/components/layout/Layout.tsx +++ b/apps/explorer/src/components/layout/Layout.tsx @@ -4,7 +4,7 @@ import { KioskClientProvider, useCookieConsentBanner } from '@iota/core'; import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import type { Network } from '@iota/iota.js/client'; +import type { Network } from '@iota/iota-sdk/client'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { Fragment } from 'react'; import { resolveValue, Toaster, type ToastType } from 'react-hot-toast'; diff --git a/apps/explorer/src/components/layout/PageLayout.tsx b/apps/explorer/src/components/layout/PageLayout.tsx index c1181bbd489..6c3f4565d88 100644 --- a/apps/explorer/src/components/layout/PageLayout.tsx +++ b/apps/explorer/src/components/layout/PageLayout.tsx @@ -5,7 +5,7 @@ import { useFeatureIsOn } from '@growthbook/growthbook-react'; import { useAppsBackend, useElementDimensions } from '@iota/core'; import { LoadingIndicator } from '@iota/ui'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import clsx from 'clsx'; import { type ReactNode, useRef } from 'react'; diff --git a/apps/explorer/src/components/module/ModuleView.tsx b/apps/explorer/src/components/module/ModuleView.tsx index 156e8fced73..37fc97b8031 100644 --- a/apps/explorer/src/components/module/ModuleView.tsx +++ b/apps/explorer/src/components/module/ModuleView.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaMoveNormalizedType } from '@iota/iota.js/client'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { type IotaMoveNormalizedType } from '@iota/iota-sdk/client'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import cl from 'clsx'; import { Highlight, Prism } from 'prism-react-renderer'; import 'prism-themes/themes/prism-one-light.css'; diff --git a/apps/explorer/src/components/module/module-functions-interaction/FunctionExecutionResult.tsx b/apps/explorer/src/components/module/module-functions-interaction/FunctionExecutionResult.tsx index 7e94d3fda84..5af84bcb125 100644 --- a/apps/explorer/src/components/module/module-functions-interaction/FunctionExecutionResult.tsx +++ b/apps/explorer/src/components/module/module-functions-interaction/FunctionExecutionResult.tsx @@ -5,7 +5,7 @@ import { LinkGroup } from './LinkGroup'; import { Banner } from '~/components/ui'; -import type { IotaTransactionBlockResponse, OwnedObjectRef } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse, OwnedObjectRef } from '@iota/iota-sdk/client'; interface ToObjectLink { text: string; diff --git a/apps/explorer/src/components/module/module-functions-interaction/ModuleFunction.tsx b/apps/explorer/src/components/module/module-functions-interaction/ModuleFunction.tsx index f901cf614d1..2d11a98b556 100644 --- a/apps/explorer/src/components/module/module-functions-interaction/ModuleFunction.tsx +++ b/apps/explorer/src/components/module/module-functions-interaction/ModuleFunction.tsx @@ -9,7 +9,7 @@ import { useSignAndExecuteTransactionBlock, } from '@iota/dapp-kit'; import { ArrowRight12 } from '@iota/icons'; -import { TransactionBlock, getPureSerializationType } from '@iota/iota.js/transactions'; +import { TransactionBlock, getPureSerializationType } from '@iota/iota-sdk/transactions'; import { Button } from '@iota/ui'; import { useMutation } from '@tanstack/react-query'; import clsx from 'clsx'; @@ -21,7 +21,7 @@ import { DisclosureBox, Input } from '~/components/ui'; import { useFunctionParamsDetails, useFunctionTypeArguments } from '~/hooks'; import { FunctionExecutionResult } from './FunctionExecutionResult'; -import type { IotaMoveNormalizedFunction } from '@iota/iota.js/client'; +import type { IotaMoveNormalizedFunction } from '@iota/iota-sdk/client'; import type { TypeOf } from 'zod'; const argsSchema = z.object({ diff --git a/apps/explorer/src/components/network/WrappedNetworkSelect.tsx b/apps/explorer/src/components/network/WrappedNetworkSelect.tsx index 26c00d92be2..eefc1df8601 100644 --- a/apps/explorer/src/components/network/WrappedNetworkSelect.tsx +++ b/apps/explorer/src/components/network/WrappedNetworkSelect.tsx @@ -8,7 +8,7 @@ import { useContext } from 'react'; import { NetworkContext } from '~/contexts'; import { NetworkSelect, type NetworkOption } from '~/components/ui'; import { ampli } from '~/lib/utils'; -import { getAllNetworks } from '@iota/iota.js/client'; +import { getAllNetworks } from '@iota/iota-sdk/client'; export function NetworkSelector(): JSX.Element { const [network, setNetwork] = useContext(NetworkContext); diff --git a/apps/explorer/src/components/object/DynamicFieldsCard.tsx b/apps/explorer/src/components/object/DynamicFieldsCard.tsx index dd7f2fe6253..ed116a40efe 100644 --- a/apps/explorer/src/components/object/DynamicFieldsCard.tsx +++ b/apps/explorer/src/components/object/DynamicFieldsCard.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useGetDynamicFields, useOnScreen } from '@iota/core'; -import { type DynamicFieldInfo } from '@iota/iota.js/client'; +import { type DynamicFieldInfo } from '@iota/iota-sdk/client'; import { LoadingIndicator } from '@iota/ui'; import { useRef, useEffect, useState, useMemo } from 'react'; diff --git a/apps/explorer/src/components/object/FieldItem.tsx b/apps/explorer/src/components/object/FieldItem.tsx index 301cb092ffa..b985ab180ce 100644 --- a/apps/explorer/src/components/object/FieldItem.tsx +++ b/apps/explorer/src/components/object/FieldItem.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaMoveNormalizedType } from '@iota/iota.js/client'; +import { type IotaMoveNormalizedType } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { SyntaxHighlighter } from '~/components'; diff --git a/apps/explorer/src/components/object/ObjectFieldsCard.tsx b/apps/explorer/src/components/object/ObjectFieldsCard.tsx index f6e2a9cc652..861f1138e6a 100644 --- a/apps/explorer/src/components/object/ObjectFieldsCard.tsx +++ b/apps/explorer/src/components/object/ObjectFieldsCard.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Search24 } from '@iota/icons'; -import { type IotaMoveNormalizedStruct, type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaMoveNormalizedStruct, type IotaObjectResponse } from '@iota/iota-sdk/client'; import { Combobox, ComboboxInput, ComboboxList, LoadingIndicator, Text } from '@iota/ui'; import clsx from 'clsx'; import { useCallback, useEffect, useState } from 'react'; diff --git a/apps/explorer/src/components/object/UnderlyingObjectCard.tsx b/apps/explorer/src/components/object/UnderlyingObjectCard.tsx index 27814429b73..8ef1acd8ea9 100644 --- a/apps/explorer/src/components/object/UnderlyingObjectCard.tsx +++ b/apps/explorer/src/components/object/UnderlyingObjectCard.tsx @@ -8,7 +8,7 @@ import { LoadingIndicator } from '@iota/ui'; import { FieldItem } from './FieldItem'; import { Banner } from '~/components/ui'; -import type { DynamicFieldName } from '@iota/iota.js/client'; +import type { DynamicFieldName } from '@iota/iota-sdk/client'; interface UnderlyingObjectCardProps { parentId: string; diff --git a/apps/explorer/src/components/owned-coins/CoinIcon.tsx b/apps/explorer/src/components/owned-coins/CoinIcon.tsx index 6304c77f1bd..db30e9b6b0a 100644 --- a/apps/explorer/src/components/owned-coins/CoinIcon.tsx +++ b/apps/explorer/src/components/owned-coins/CoinIcon.tsx @@ -4,7 +4,7 @@ import { useCoinMetadata } from '@iota/core'; import { Iota, Unstaked } from '@iota/icons'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { cva, type VariantProps } from 'class-variance-authority'; import { ImageIcon } from '~/components/ui'; diff --git a/apps/explorer/src/components/owned-coins/CoinItem.tsx b/apps/explorer/src/components/owned-coins/CoinItem.tsx index 8f890409af2..9f9d6217fa0 100644 --- a/apps/explorer/src/components/owned-coins/CoinItem.tsx +++ b/apps/explorer/src/components/owned-coins/CoinItem.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useFormatCoin } from '@iota/core'; -import { type CoinStruct } from '@iota/iota.js/client'; +import { type CoinStruct } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { ObjectLink } from '~/components/ui'; diff --git a/apps/explorer/src/components/owned-coins/OwnedCoinView.tsx b/apps/explorer/src/components/owned-coins/OwnedCoinView.tsx index 5b730365805..466972270a2 100644 --- a/apps/explorer/src/components/owned-coins/OwnedCoinView.tsx +++ b/apps/explorer/src/components/owned-coins/OwnedCoinView.tsx @@ -4,7 +4,7 @@ import { useFormatCoin } from '@iota/core'; import { ArrowShowAndHideRight12, Warning16 } from '@iota/icons'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text } from '@iota/ui'; import * as Collapsible from '@radix-ui/react-collapsible'; import clsx from 'clsx'; diff --git a/apps/explorer/src/components/owned-coins/OwnedCoins.tsx b/apps/explorer/src/components/owned-coins/OwnedCoins.tsx index 867dac719f3..e900a0dcf80 100644 --- a/apps/explorer/src/components/owned-coins/OwnedCoins.tsx +++ b/apps/explorer/src/components/owned-coins/OwnedCoins.tsx @@ -5,8 +5,8 @@ import { getCoinSymbol } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { Info16 } from '@iota/icons'; -import { type CoinBalance } from '@iota/iota.js/client'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { type CoinBalance } from '@iota/iota-sdk/client'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import { Heading, Text, LoadingIndicator, RadioGroup, RadioGroupItem } from '@iota/ui'; import { useMemo, useState } from 'react'; diff --git a/apps/explorer/src/components/owned-objects/ListView.tsx b/apps/explorer/src/components/owned-objects/ListView.tsx index 7d705b8e259..86032e74498 100644 --- a/apps/explorer/src/components/owned-objects/ListView.tsx +++ b/apps/explorer/src/components/owned-objects/ListView.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; -import { formatAddress } from '@iota/iota.js/utils'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Placeholder, Text } from '@iota/ui'; import { type ReactNode } from 'react'; diff --git a/apps/explorer/src/components/owned-objects/OwnedObject.tsx b/apps/explorer/src/components/owned-objects/OwnedObject.tsx index bccb9d4bce4..767d7006123 100644 --- a/apps/explorer/src/components/owned-objects/OwnedObject.tsx +++ b/apps/explorer/src/components/owned-objects/OwnedObject.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; import { useResolveVideo } from '~/hooks/useResolveVideo'; import { parseObjectType, trimStdLibPrefix } from '~/lib/utils'; diff --git a/apps/explorer/src/components/owned-objects/SmallThumbnailsView.tsx b/apps/explorer/src/components/owned-objects/SmallThumbnailsView.tsx index 04a537be28a..9a3c97b3e2d 100644 --- a/apps/explorer/src/components/owned-objects/SmallThumbnailsView.tsx +++ b/apps/explorer/src/components/owned-objects/SmallThumbnailsView.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; -import { formatAddress } from '@iota/iota.js/utils'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Placeholder } from '@iota/ui'; import { type ReactNode } from 'react'; diff --git a/apps/explorer/src/components/owned-objects/ThumbnailsView.tsx b/apps/explorer/src/components/owned-objects/ThumbnailsView.tsx index 03ddf408acb..ef926db4fdb 100644 --- a/apps/explorer/src/components/owned-objects/ThumbnailsView.tsx +++ b/apps/explorer/src/components/owned-objects/ThumbnailsView.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; -import { formatAddress } from '@iota/iota.js/utils'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Placeholder, Text } from '@iota/ui'; import { ObjectLink, ObjectVideoImage } from '~/components/ui'; diff --git a/apps/explorer/src/components/table/IotaAmount.tsx b/apps/explorer/src/components/table/IotaAmount.tsx index a5b2b96f843..56e191560d0 100644 --- a/apps/explorer/src/components/table/IotaAmount.tsx +++ b/apps/explorer/src/components/table/IotaAmount.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { CoinFormat, useFormatCoin } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text } from '@iota/ui'; interface IotaAmountProps { diff --git a/apps/explorer/src/components/top-packages/TopPackagesTable.tsx b/apps/explorer/src/components/top-packages/TopPackagesTable.tsx index 6bd1f5a26e0..661ba983a24 100644 --- a/apps/explorer/src/components/top-packages/TopPackagesTable.tsx +++ b/apps/explorer/src/components/top-packages/TopPackagesTable.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type MoveCallMetric } from '@iota/iota.js/client'; +import { type MoveCallMetric } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { useMemo } from 'react'; diff --git a/apps/explorer/src/components/top-validators-card/StakeColumn.tsx b/apps/explorer/src/components/top-validators-card/StakeColumn.tsx index 17be174f5c2..5b7cce8de1a 100644 --- a/apps/explorer/src/components/top-validators-card/StakeColumn.tsx +++ b/apps/explorer/src/components/top-validators-card/StakeColumn.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useFormatCoin, CoinFormat, formatBalance } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text } from '@iota/ui'; type StakeColumnProps = { diff --git a/apps/explorer/src/components/top-validators-card/TopValidatorsCard.tsx b/apps/explorer/src/components/top-validators-card/TopValidatorsCard.tsx index a379b125f46..2b7d39db16b 100644 --- a/apps/explorer/src/components/top-validators-card/TopValidatorsCard.tsx +++ b/apps/explorer/src/components/top-validators-card/TopValidatorsCard.tsx @@ -4,7 +4,7 @@ import { useIotaClientQuery } from '@iota/dapp-kit'; import { ArrowRight12 } from '@iota/icons'; -import { type IotaValidatorSummary } from '@iota/iota.js/client'; +import { type IotaValidatorSummary } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { type ReactNode, useMemo } from 'react'; diff --git a/apps/explorer/src/components/transaction-blocks-for-address/TransactionBlocksForAddress.tsx b/apps/explorer/src/components/transaction-blocks-for-address/TransactionBlocksForAddress.tsx index 2706953beb6..63c138594d9 100644 --- a/apps/explorer/src/components/transaction-blocks-for-address/TransactionBlocksForAddress.tsx +++ b/apps/explorer/src/components/transaction-blocks-for-address/TransactionBlocksForAddress.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type TransactionFilter } from '@iota/iota.js/client'; +import { type TransactionFilter } from '@iota/iota-sdk/client'; import { Heading, RadioGroup, RadioGroupItem } from '@iota/ui'; import { type Dispatch, type SetStateAction, useReducer, useState } from 'react'; diff --git a/apps/explorer/src/components/transactions/TransactionsForAddress.tsx b/apps/explorer/src/components/transactions/TransactionsForAddress.tsx index 289ec1c887c..5095ef24a89 100644 --- a/apps/explorer/src/components/transactions/TransactionsForAddress.tsx +++ b/apps/explorer/src/components/transactions/TransactionsForAddress.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { LoadingIndicator, Text } from '@iota/ui'; import { useQuery } from '@tanstack/react-query'; diff --git a/apps/explorer/src/components/transactions/TxCardUtils.tsx b/apps/explorer/src/components/transactions/TxCardUtils.tsx index 331f49167d6..f0634847892 100644 --- a/apps/explorer/src/components/transactions/TxCardUtils.tsx +++ b/apps/explorer/src/components/transactions/TxCardUtils.tsx @@ -4,7 +4,7 @@ import { getTotalGasUsed } from '@iota/core'; import { X12, Dot12 } from '@iota/icons'; -import { type IotaClient, type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaClient, type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { IotaAmount } from '../table/IotaAmount'; import { TxTimeType } from '../tx-time/TxTimeType'; diff --git a/apps/explorer/src/components/ui/CoinsStack.tsx b/apps/explorer/src/components/ui/CoinsStack.tsx index 7165c65af98..ec4dadafa3f 100644 --- a/apps/explorer/src/components/ui/CoinsStack.tsx +++ b/apps/explorer/src/components/ui/CoinsStack.tsx @@ -4,7 +4,7 @@ import { useCoinMetadata } from '@iota/core'; import { Iota, Unstaked } from '@iota/icons'; -import { type CoinMetadata } from '@iota/iota.js/client'; +import { type CoinMetadata } from '@iota/iota-sdk/client'; import clsx from 'clsx'; import { Image } from '~/components/ui'; diff --git a/apps/explorer/src/components/ui/InternalLink.tsx b/apps/explorer/src/components/ui/InternalLink.tsx index a3921a5205a..51275a99c36 100644 --- a/apps/explorer/src/components/ui/InternalLink.tsx +++ b/apps/explorer/src/components/ui/InternalLink.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { isIotaNSName } from '@iota/core'; -import { formatAddress, formatDigest } from '@iota/iota.js/utils'; +import { formatAddress, formatDigest } from '@iota/iota-sdk/utils'; import { type ReactNode } from 'react'; import { Link, type LinkProps } from '~/components/ui'; diff --git a/apps/explorer/src/components/validator-map/ValidatorMap.tsx b/apps/explorer/src/components/validator-map/ValidatorMap.tsx index 1014b2e10fc..ba786384f5d 100644 --- a/apps/explorer/src/components/validator-map/ValidatorMap.tsx +++ b/apps/explorer/src/components/validator-map/ValidatorMap.tsx @@ -4,7 +4,7 @@ import { useAppsBackend } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { Heading, Placeholder, Text } from '@iota/ui'; import { useQuery } from '@tanstack/react-query'; import { ParentSize } from '@visx/responsive'; diff --git a/apps/explorer/src/components/validator/DelegationAmount.tsx b/apps/explorer/src/components/validator/DelegationAmount.tsx index 0f6c923694e..a1f4c77b8cc 100644 --- a/apps/explorer/src/components/validator/DelegationAmount.tsx +++ b/apps/explorer/src/components/validator/DelegationAmount.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useFormatCoin, formatBalance, CoinFormat } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Heading, Text } from '@iota/ui'; type DelegationAmountProps = { diff --git a/apps/explorer/src/components/validator/ValidatorMeta.tsx b/apps/explorer/src/components/validator/ValidatorMeta.tsx index 2061052cef1..e0d77bbdf28 100644 --- a/apps/explorer/src/components/validator/ValidatorMeta.tsx +++ b/apps/explorer/src/components/validator/ValidatorMeta.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ArrowUpRight12 } from '@iota/icons'; -import { type IotaValidatorSummary } from '@iota/iota.js/client'; +import { type IotaValidatorSummary } from '@iota/iota-sdk/client'; import { Heading, Text } from '@iota/ui'; import { diff --git a/apps/explorer/src/components/validator/ValidatorStats.tsx b/apps/explorer/src/components/validator/ValidatorStats.tsx index 58988229cde..49d3af2baea 100644 --- a/apps/explorer/src/components/validator/ValidatorStats.tsx +++ b/apps/explorer/src/components/validator/ValidatorStats.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaValidatorSummary } from '@iota/iota.js/client'; +import { type IotaValidatorSummary } from '@iota/iota-sdk/client'; import { Heading } from '@iota/ui'; import { Card, Stats } from '~/components/ui'; diff --git a/apps/explorer/src/contexts/networkContext.ts b/apps/explorer/src/contexts/networkContext.ts index 71ab798fdb7..8b668dbbb52 100644 --- a/apps/explorer/src/contexts/networkContext.ts +++ b/apps/explorer/src/contexts/networkContext.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { createContext, useContext } from 'react'; -import { type Network } from '@iota/iota.js/client'; +import { type Network } from '@iota/iota-sdk/client'; export const NetworkContext = createContext< [Network | string, (network: Network | string) => void] diff --git a/apps/explorer/src/hooks/useEnhancedRpc.ts b/apps/explorer/src/hooks/useEnhancedRpc.ts index 7ec2321ab6b..7951f6fa2db 100644 --- a/apps/explorer/src/hooks/useEnhancedRpc.ts +++ b/apps/explorer/src/hooks/useEnhancedRpc.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { IotaClient, Network } from '@iota/iota.js/client'; +import { IotaClient, Network } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; import { useNetwork } from '~/hooks'; diff --git a/apps/explorer/src/hooks/useFunctionParamsDetails.ts b/apps/explorer/src/hooks/useFunctionParamsDetails.ts index fc65866d8cf..7c791d15afb 100644 --- a/apps/explorer/src/hooks/useFunctionParamsDetails.ts +++ b/apps/explorer/src/hooks/useFunctionParamsDetails.ts @@ -6,7 +6,7 @@ import { useMemo } from 'react'; import { getNormalizedFunctionParameterTypeDetails } from '~/lib/utils'; -import type { IotaMoveNormalizedType } from '@iota/iota.js/client'; +import type { IotaMoveNormalizedType } from '@iota/iota-sdk/client'; interface FunctionParamsDetails { params: IotaMoveNormalizedType[]; diff --git a/apps/explorer/src/hooks/useFunctionTypeArguments.ts b/apps/explorer/src/hooks/useFunctionTypeArguments.ts index 10266fbc274..eb82073219b 100644 --- a/apps/explorer/src/hooks/useFunctionTypeArguments.ts +++ b/apps/explorer/src/hooks/useFunctionTypeArguments.ts @@ -4,7 +4,7 @@ import { useMemo } from 'react'; -import type { IotaMoveAbilitySet } from '@iota/iota.js/client'; +import type { IotaMoveAbilitySet } from '@iota/iota-sdk/client'; export function useFunctionTypeArguments(typeArguments: IotaMoveAbilitySet[]) { return useMemo( diff --git a/apps/explorer/src/hooks/useGetAddressMetrics.ts b/apps/explorer/src/hooks/useGetAddressMetrics.ts index 755ba8c9faf..48ae48bb559 100644 --- a/apps/explorer/src/hooks/useGetAddressMetrics.ts +++ b/apps/explorer/src/hooks/useGetAddressMetrics.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type AddressMetrics } from '@iota/iota.js/src/client'; +import { type AddressMetrics } from '@iota/iota-sdk/src/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; export function useGetAddressMetrics(): UseQueryResult { diff --git a/apps/explorer/src/hooks/useGetAllEpochAddressMetrics.ts b/apps/explorer/src/hooks/useGetAllEpochAddressMetrics.ts index 725a8cc0ff4..06350528110 100644 --- a/apps/explorer/src/hooks/useGetAllEpochAddressMetrics.ts +++ b/apps/explorer/src/hooks/useGetAllEpochAddressMetrics.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type AllEpochsAddressMetrics, type IotaClient } from '@iota/iota.js/client'; +import { type AllEpochsAddressMetrics, type IotaClient } from '@iota/iota-sdk/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; export function useGetAllEpochAddressMetrics( diff --git a/apps/explorer/src/hooks/useGetCheckpoints.ts b/apps/explorer/src/hooks/useGetCheckpoints.ts index be870cd5a31..0576155f37a 100644 --- a/apps/explorer/src/hooks/useGetCheckpoints.ts +++ b/apps/explorer/src/hooks/useGetCheckpoints.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type CheckpointPage } from '@iota/iota.js/client'; +import { type CheckpointPage } from '@iota/iota-sdk/client'; import { type InfiniteData, type UseInfiniteQueryResult, diff --git a/apps/explorer/src/hooks/useGetNetworkMetrics.ts b/apps/explorer/src/hooks/useGetNetworkMetrics.ts index 485b973765a..70b2fafb108 100644 --- a/apps/explorer/src/hooks/useGetNetworkMetrics.ts +++ b/apps/explorer/src/hooks/useGetNetworkMetrics.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type NetworkMetrics } from '@iota/iota.js/src/client'; +import { type NetworkMetrics } from '@iota/iota-sdk/src/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; export function useGetNetworkMetrics(): UseQueryResult { diff --git a/apps/explorer/src/hooks/useGetTransactionBlocks.ts b/apps/explorer/src/hooks/useGetTransactionBlocks.ts index 6f1f86a7520..682d45e0046 100644 --- a/apps/explorer/src/hooks/useGetTransactionBlocks.ts +++ b/apps/explorer/src/hooks/useGetTransactionBlocks.ts @@ -10,7 +10,7 @@ import { useInfiniteQuery, } from '@tanstack/react-query'; -import { type PaginatedTransactionResponse, type TransactionFilter } from '@iota/iota.js/client'; +import { type PaginatedTransactionResponse, type TransactionFilter } from '@iota/iota-sdk/client'; export const DEFAULT_TRANSACTIONS_LIMIT = 20; diff --git a/apps/explorer/src/hooks/useNetwork.ts b/apps/explorer/src/hooks/useNetwork.ts index 216fdcd269c..e85a8e9df6d 100644 --- a/apps/explorer/src/hooks/useNetwork.ts +++ b/apps/explorer/src/hooks/useNetwork.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getDefaultNetwork, Network } from '@iota/iota.js/client'; +import { getDefaultNetwork, Network } from '@iota/iota-sdk/client'; import { useLayoutEffect, useMemo } from 'react'; // eslint-disable-next-line no-restricted-imports import { useSearchParams } from 'react-router-dom'; diff --git a/apps/explorer/src/hooks/useNormalizedMoveModule.ts b/apps/explorer/src/hooks/useNormalizedMoveModule.ts index 4d142b3ee0b..9b5ce67bf2e 100644 --- a/apps/explorer/src/hooks/useNormalizedMoveModule.ts +++ b/apps/explorer/src/hooks/useNormalizedMoveModule.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { type IotaMoveNormalizedModule } from '@iota/iota.js/src/client'; +import { type IotaMoveNormalizedModule } from '@iota/iota-sdk/src/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; export function useNormalizedMoveModule( diff --git a/apps/explorer/src/hooks/useRecognizedPackages.ts b/apps/explorer/src/hooks/useRecognizedPackages.ts index 88d31017fa7..8bbab783394 100644 --- a/apps/explorer/src/hooks/useRecognizedPackages.ts +++ b/apps/explorer/src/hooks/useRecognizedPackages.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useFeatureValue } from '@growthbook/growthbook-react'; -import { IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS } from '@iota/iota.js/utils'; -import { Network } from '@iota/iota.js/client'; +import { IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS } from '@iota/iota-sdk/utils'; +import { Network } from '@iota/iota-sdk/client'; import { useNetwork } from './'; diff --git a/apps/explorer/src/hooks/useResolveVideo.ts b/apps/explorer/src/hooks/useResolveVideo.ts index daafc9e4a27..e02ed15db19 100644 --- a/apps/explorer/src/hooks/useResolveVideo.ts +++ b/apps/explorer/src/hooks/useResolveVideo.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; import { useRecognizedPackages } from './useRecognizedPackages'; diff --git a/apps/explorer/src/hooks/useSearch.ts b/apps/explorer/src/hooks/useSearch.ts index 050676cb3e8..b77683cc876 100644 --- a/apps/explorer/src/hooks/useSearch.ts +++ b/apps/explorer/src/hooks/useSearch.ts @@ -4,13 +4,13 @@ import { isIotaNSName, useIotaNSEnabled } from '@iota/core'; import { useIotaClientQuery, useIotaClient } from '@iota/dapp-kit'; -import { type IotaClient, type IotaSystemStateSummary } from '@iota/iota.js/client'; +import { type IotaClient, type IotaSystemStateSummary } from '@iota/iota-sdk/client'; import { isValidTransactionDigest, isValidIotaAddress, isValidIotaObjectId, normalizeIotaObjectId, -} from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/utils'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; const isGenesisLibAddress = (value: string): boolean => /^(0x|0X)0{0,39}[12]$/.test(value); @@ -98,7 +98,15 @@ const getResultsForAddress = async ( }), ]); - if (!from.data?.length && !to.data?.length) return null; + // Note: we need to query owned objects separately + // because genesis addresses might not be involved in any transaction yet. + let ownedObjects = []; + if (!from.data?.length && !to.data?.length) { + const response = await client.getOwnedObjects({ owner: normalized, limit: 1 }); + ownedObjects = response.data; + } + + if (!from.data?.length && !to.data?.length && !ownedObjects?.length) return null; return [ { diff --git a/apps/explorer/src/hooks/useVerifiedSourceCode.ts b/apps/explorer/src/hooks/useVerifiedSourceCode.ts index 72aa9cea9b5..73b21357730 100644 --- a/apps/explorer/src/hooks/useVerifiedSourceCode.ts +++ b/apps/explorer/src/hooks/useVerifiedSourceCode.ts @@ -4,7 +4,7 @@ import { useFeatureIsOn } from '@growthbook/growthbook-react'; import { useIotaClientContext } from '@iota/dapp-kit'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { type UseQueryResult, useQuery } from '@tanstack/react-query'; type UseVerifiedSourceCodeArgs = { diff --git a/apps/explorer/src/lib/ui/utils/generateTableDataFromCheckpointsData.tsx b/apps/explorer/src/lib/ui/utils/generateTableDataFromCheckpointsData.tsx index e3ffdefedf7..cd26df37112 100644 --- a/apps/explorer/src/lib/ui/utils/generateTableDataFromCheckpointsData.tsx +++ b/apps/explorer/src/lib/ui/utils/generateTableDataFromCheckpointsData.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CheckpointPage } from '@iota/iota.js/client'; +import { type CheckpointPage } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { type ReactNode } from 'react'; diff --git a/apps/explorer/src/lib/ui/utils/generateTableDataFromEpochsData.tsx b/apps/explorer/src/lib/ui/utils/generateTableDataFromEpochsData.tsx index 667cc436d5b..bca907aa37b 100644 --- a/apps/explorer/src/lib/ui/utils/generateTableDataFromEpochsData.tsx +++ b/apps/explorer/src/lib/ui/utils/generateTableDataFromEpochsData.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type EpochMetricsPage } from '@iota/iota.js/client'; +import { type EpochMetricsPage } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { IotaAmount, TxTimeType, HighlightedTableCol } from '~/components'; diff --git a/apps/explorer/src/lib/ui/utils/objectField.ts b/apps/explorer/src/lib/ui/utils/objectField.ts index fdab97bc441..492fa56619f 100644 --- a/apps/explorer/src/lib/ui/utils/objectField.ts +++ b/apps/explorer/src/lib/ui/utils/objectField.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaMoveNormalizedType } from '@iota/iota.js/client'; +import { type IotaMoveNormalizedType } from '@iota/iota-sdk/client'; type TypeReference = | { diff --git a/apps/explorer/src/lib/utils/api/defaultRpcClient.ts b/apps/explorer/src/lib/utils/api/defaultRpcClient.ts index 83678cee750..35d35f5cf1c 100644 --- a/apps/explorer/src/lib/utils/api/defaultRpcClient.ts +++ b/apps/explorer/src/lib/utils/api/defaultRpcClient.ts @@ -10,7 +10,7 @@ import { Network, type NetworkId, getAllNetworks, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; export const SupportedNetworks = getAllNetworks(); // The Explorer always shows the Custom RPC input so there is no need to confuse it more by having a Custom Network here diff --git a/apps/explorer/src/lib/utils/getStorageFundFlow.ts b/apps/explorer/src/lib/utils/getStorageFundFlow.ts index 0a300d37074..ea14a3ca828 100644 --- a/apps/explorer/src/lib/utils/getStorageFundFlow.ts +++ b/apps/explorer/src/lib/utils/getStorageFundFlow.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type EndOfEpochInfo } from '@iota/iota.js/client'; +import { type EndOfEpochInfo } from '@iota/iota-sdk/client'; interface StorageFundFlow { netInflow: bigint | null; diff --git a/apps/explorer/src/lib/utils/getSupplyChangeAfterEpochEnd.ts b/apps/explorer/src/lib/utils/getSupplyChangeAfterEpochEnd.ts index 78beb84ef7c..2dcce33ed81 100644 --- a/apps/explorer/src/lib/utils/getSupplyChangeAfterEpochEnd.ts +++ b/apps/explorer/src/lib/utils/getSupplyChangeAfterEpochEnd.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type EndOfEpochInfo } from '@iota/iota.js/src/client'; +import { type EndOfEpochInfo } from '@iota/iota-sdk/src/client'; export function getSupplyChangeAfterEpochEnd(endOfEpochInfo: EndOfEpochInfo | null): bigint | null { if (endOfEpochInfo?.mintedTokensAmount == null || endOfEpochInfo?.burntTokensAmount == null) diff --git a/apps/explorer/src/lib/utils/getValidatorMoveEvent.ts b/apps/explorer/src/lib/utils/getValidatorMoveEvent.ts index 2a21aebf999..7d2441e4c5c 100644 --- a/apps/explorer/src/lib/utils/getValidatorMoveEvent.ts +++ b/apps/explorer/src/lib/utils/getValidatorMoveEvent.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaEvent } from '@iota/iota.js/client'; +import { type IotaEvent } from '@iota/iota-sdk/client'; export function getValidatorMoveEvent( validatorsEvent: IotaEvent[], diff --git a/apps/explorer/src/lib/utils/growthbook.ts b/apps/explorer/src/lib/utils/growthbook.ts index f5f5d4abb23..da926dac926 100644 --- a/apps/explorer/src/lib/utils/growthbook.ts +++ b/apps/explorer/src/lib/utils/growthbook.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { GrowthBook } from '@growthbook/growthbook'; -import { getAppsBackend } from '@iota/iota.js/client'; +import { getAppsBackend } from '@iota/iota-sdk/client'; export const growthbook = new GrowthBook({ // If you want to develop locally, you can set the API host to this: diff --git a/apps/explorer/src/lib/utils/iotaMoveTypeConverters.ts b/apps/explorer/src/lib/utils/iotaMoveTypeConverters.ts index 797659de471..ac20ef3b3b2 100644 --- a/apps/explorer/src/lib/utils/iotaMoveTypeConverters.ts +++ b/apps/explorer/src/lib/utils/iotaMoveTypeConverters.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaMoveNormalizedType } from '@iota/iota.js/client'; +import type { IotaMoveNormalizedType } from '@iota/iota-sdk/client'; /** * Converts a IotaMoveNormalizedType to string diff --git a/apps/explorer/src/lib/utils/objectUtils.ts b/apps/explorer/src/lib/utils/objectUtils.ts index 19f2ea0378c..641ff90207f 100644 --- a/apps/explorer/src/lib/utils/objectUtils.ts +++ b/apps/explorer/src/lib/utils/objectUtils.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type ObjectOwner, type IotaObjectResponse } from '@iota/iota.js/client'; +import { type ObjectOwner, type IotaObjectResponse } from '@iota/iota-sdk/client'; import { findIPFSvalue } from './stringUtils'; diff --git a/apps/explorer/src/pages/address-result/TotalStaked.tsx b/apps/explorer/src/pages/address-result/TotalStaked.tsx index b5f4f78e53c..984a832dcaf 100644 --- a/apps/explorer/src/pages/address-result/TotalStaked.tsx +++ b/apps/explorer/src/pages/address-result/TotalStaked.tsx @@ -8,7 +8,7 @@ import { useGetDelegatedStake, useTotalDelegatedStake, } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text, Heading } from '@iota/ui'; import { Iota } from '@iota/icons'; diff --git a/apps/explorer/src/pages/epochs/EpochDetail.tsx b/apps/explorer/src/pages/epochs/EpochDetail.tsx index 1d7c7ca450c..67967cc1fb6 100644 --- a/apps/explorer/src/pages/epochs/EpochDetail.tsx +++ b/apps/explorer/src/pages/epochs/EpochDetail.tsx @@ -4,7 +4,7 @@ import { useFormatCoin } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { LoadingIndicator } from '@iota/ui'; import { useQuery } from '@tanstack/react-query'; import { useMemo } from 'react'; diff --git a/apps/explorer/src/pages/home/Home.tsx b/apps/explorer/src/pages/home/Home.tsx index ac6b4cee70a..582cf753ce6 100644 --- a/apps/explorer/src/pages/home/Home.tsx +++ b/apps/explorer/src/pages/home/Home.tsx @@ -5,7 +5,7 @@ import clsx from 'clsx'; import { lazy, Suspense } from 'react'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { AccountsCardGraph, Activity, diff --git a/apps/explorer/src/pages/object-result/ObjectResultType.tsx b/apps/explorer/src/pages/object-result/ObjectResultType.tsx index f0108265353..a960de030fc 100644 --- a/apps/explorer/src/pages/object-result/ObjectResultType.tsx +++ b/apps/explorer/src/pages/object-result/ObjectResultType.tsx @@ -4,7 +4,7 @@ import { parseObjectType } from '../../lib/utils'; -import type { IotaObjectResponse, ObjectOwner, MoveStruct } from '@iota/iota.js/client'; +import type { IotaObjectResponse, ObjectOwner, MoveStruct } from '@iota/iota-sdk/client'; export type DataType = { id: string; diff --git a/apps/explorer/src/pages/object-result/views/ObjectView.tsx b/apps/explorer/src/pages/object-result/views/ObjectView.tsx index ce7323dc26a..5caddf0edcc 100644 --- a/apps/explorer/src/pages/object-result/views/ObjectView.tsx +++ b/apps/explorer/src/pages/object-result/views/ObjectView.tsx @@ -4,13 +4,13 @@ import { CoinFormat, useFormatCoin, useResolveIotaNSName } from '@iota/core'; import { ArrowUpRight16, Info16 } from '@iota/icons'; -import { type IotaObjectResponse, type ObjectOwner } from '@iota/iota.js/client'; +import { type IotaObjectResponse, type ObjectOwner } from '@iota/iota-sdk/client'; import { formatAddress, IOTA_TYPE_ARG, normalizeStructTag, parseStructTag, -} from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/utils'; import { Heading, Text } from '@iota/ui'; import { useQuery } from '@tanstack/react-query'; import clsx from 'clsx'; diff --git a/apps/explorer/src/pages/object-result/views/TokenView.tsx b/apps/explorer/src/pages/object-result/views/TokenView.tsx index ee9120b018e..a7ef7527524 100644 --- a/apps/explorer/src/pages/object-result/views/TokenView.tsx +++ b/apps/explorer/src/pages/object-result/views/TokenView.tsx @@ -4,7 +4,7 @@ import { useGetDynamicFields, useGetObject } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; import { Heading } from '@iota/ui'; import { type ReactNode, useState } from 'react'; diff --git a/apps/explorer/src/pages/transaction-result/Events.tsx b/apps/explorer/src/pages/transaction-result/Events.tsx index 5ccc1aff48b..04d4c2c48b9 100644 --- a/apps/explorer/src/pages/transaction-result/Events.tsx +++ b/apps/explorer/src/pages/transaction-result/Events.tsx @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { ChevronRight12 } from '@iota/icons'; -import { type IotaEvent } from '@iota/iota.js/client'; -import { formatAddress, parseStructTag } from '@iota/iota.js/utils'; +import { type IotaEvent } from '@iota/iota-sdk/client'; +import { formatAddress, parseStructTag } from '@iota/iota-sdk/utils'; import { Text } from '@iota/ui'; import * as Collapsible from '@radix-ui/react-collapsible'; import clsx from 'clsx'; diff --git a/apps/explorer/src/pages/transaction-result/Signatures.tsx b/apps/explorer/src/pages/transaction-result/Signatures.tsx index 82b41b87603..a96d4ffb983 100644 --- a/apps/explorer/src/pages/transaction-result/Signatures.tsx +++ b/apps/explorer/src/pages/transaction-result/Signatures.tsx @@ -2,15 +2,15 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { parseSerializedSignature, type PublicKey, type SignatureScheme, -} from '@iota/iota.js/cryptography'; -import { parsePartialSignatures } from '@iota/iota.js/multisig'; -import { normalizeIotaAddress, toB64 } from '@iota/iota.js/utils'; -import { publicKeyFromRawBytes } from '@iota/iota.js/verify'; +} from '@iota/iota-sdk/cryptography'; +import { parsePartialSignatures } from '@iota/iota-sdk/multisig'; +import { normalizeIotaAddress, toB64 } from '@iota/iota-sdk/utils'; +import { publicKeyFromRawBytes } from '@iota/iota-sdk/verify'; import { Text } from '@iota/ui'; import { AddressLink, DescriptionItem, DescriptionList, TabHeader } from '~/components/ui'; diff --git a/apps/explorer/src/pages/transaction-result/TransactionData.tsx b/apps/explorer/src/pages/transaction-result/TransactionData.tsx index b9e1a03b888..24eea304d00 100644 --- a/apps/explorer/src/pages/transaction-result/TransactionData.tsx +++ b/apps/explorer/src/pages/transaction-result/TransactionData.tsx @@ -6,7 +6,7 @@ import { useTransactionSummary } from '@iota/core'; import { type ProgrammableTransaction, type IotaTransactionBlockResponse, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import { TransactionDetailCard } from './transaction-summary/TransactionDetailCard'; import { GasBreakdown } from '~/components'; diff --git a/apps/explorer/src/pages/transaction-result/TransactionResult.tsx b/apps/explorer/src/pages/transaction-result/TransactionResult.tsx index ddb571117f6..4c717b7a343 100644 --- a/apps/explorer/src/pages/transaction-result/TransactionResult.tsx +++ b/apps/explorer/src/pages/transaction-result/TransactionResult.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useGetTransaction } from '@iota/core'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { useParams } from 'react-router-dom'; import { PageLayout } from '~/components'; diff --git a/apps/explorer/src/pages/transaction-result/TransactionView.tsx b/apps/explorer/src/pages/transaction-result/TransactionView.tsx index 5251589c9bf..966a9e53e8e 100644 --- a/apps/explorer/src/pages/transaction-result/TransactionView.tsx +++ b/apps/explorer/src/pages/transaction-result/TransactionView.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import clsx from 'clsx'; import { type ReactNode, useState } from 'react'; diff --git a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/InputsCard.tsx b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/InputsCard.tsx index 398e27c0dfc..c93e215676e 100644 --- a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/InputsCard.tsx +++ b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/InputsCard.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaCallArg } from '@iota/iota.js/client'; +import { type IotaCallArg } from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { ProgrammableTxnBlockCard } from '~/components'; diff --git a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx index 1af159812b3..2cad316f653 100644 --- a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx +++ b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx @@ -6,7 +6,7 @@ import { type MoveCallIotaTransaction, type IotaArgument, type IotaMovePackage, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import { Text } from '@iota/ui'; import { type ReactNode } from 'react'; diff --git a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/TransactionsCard.tsx b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/TransactionsCard.tsx index 8dcad913503..06e07d1b464 100644 --- a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/TransactionsCard.tsx +++ b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/TransactionsCard.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaTransaction } from '@iota/iota.js/client'; +import { type IotaTransaction } from '@iota/iota-sdk/client'; import { Transaction } from './Transaction'; import { ProgrammableTxnBlockCard } from '~/components'; diff --git a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/utils.ts b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/utils.ts index ce9126c5f14..92e2e32d939 100644 --- a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/utils.ts +++ b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaArgument } from '@iota/iota.js/client'; +import { type IotaArgument } from '@iota/iota-sdk/client'; export function flattenIotaArguments(data: (IotaArgument | IotaArgument[])[]): string { if (!data) { diff --git a/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectChanges.tsx b/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectChanges.tsx index 9a15b5fe7e0..739711f892d 100644 --- a/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectChanges.tsx +++ b/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectChanges.tsx @@ -15,8 +15,8 @@ import { type DisplayFieldsResponse, type IotaObjectChange, type IotaObjectChangePublished, -} from '@iota/iota.js/client'; -import { parseStructTag } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { parseStructTag } from '@iota/iota-sdk/utils'; import { Text } from '@iota/ui'; import * as Collapsible from '@radix-ui/react-collapsible'; import clsx from 'clsx'; diff --git a/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectDisplay.tsx b/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectDisplay.tsx index 68726374900..712b5249df3 100644 --- a/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectDisplay.tsx +++ b/apps/explorer/src/pages/transaction-result/transaction-summary/ObjectDisplay.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type DisplayFieldsResponse } from '@iota/iota.js/client'; +import { type DisplayFieldsResponse } from '@iota/iota-sdk/client'; import { useState } from 'react'; import { Image, ObjectLink, ObjectModal } from '~/components/ui'; diff --git a/apps/explorer/src/pages/transaction-result/transaction-summary/UpgradedSystemPackages.tsx b/apps/explorer/src/pages/transaction-result/transaction-summary/UpgradedSystemPackages.tsx index 8309cf75b7f..5dd1b78582e 100644 --- a/apps/explorer/src/pages/transaction-result/transaction-summary/UpgradedSystemPackages.tsx +++ b/apps/explorer/src/pages/transaction-result/transaction-summary/UpgradedSystemPackages.tsx @@ -6,7 +6,7 @@ import { Text } from '@iota/ui'; import { CollapsibleCard, CollapsibleSection, ObjectLink } from '~/components/ui'; -import type { OwnedObjectRef } from '@iota/iota.js/client'; +import type { OwnedObjectRef } from '@iota/iota-sdk/client'; export function UpgradedSystemPackages({ data }: { data: OwnedObjectRef[] }): JSX.Element | null { if (!data?.length) return null; diff --git a/apps/explorer/src/pages/transaction-result/transaction-summary/index.tsx b/apps/explorer/src/pages/transaction-result/transaction-summary/index.tsx index 372f49ba11c..be811790ffd 100644 --- a/apps/explorer/src/pages/transaction-result/transaction-summary/index.tsx +++ b/apps/explorer/src/pages/transaction-result/transaction-summary/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useTransactionSummary } from '@iota/core'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { BalanceChanges } from './BalanceChanges'; import { ObjectChanges } from './ObjectChanges'; diff --git a/apps/explorer/src/pages/validator/ValidatorDetails.tsx b/apps/explorer/src/pages/validator/ValidatorDetails.tsx index 15e439ca303..6756ab3308c 100644 --- a/apps/explorer/src/pages/validator/ValidatorDetails.tsx +++ b/apps/explorer/src/pages/validator/ValidatorDetails.tsx @@ -4,7 +4,7 @@ import { useGetValidatorsApy, useGetValidatorsEvents } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { type IotaSystemStateSummary } from '@iota/iota.js/client'; +import { type IotaSystemStateSummary } from '@iota/iota-sdk/client'; import { LoadingIndicator, Text } from '@iota/ui'; import React, { useMemo } from 'react'; import { useParams } from 'react-router-dom'; diff --git a/apps/explorer/src/pages/validators/Validators.tsx b/apps/explorer/src/pages/validators/Validators.tsx index 770f0f810c4..313bc1780c5 100644 --- a/apps/explorer/src/pages/validators/Validators.tsx +++ b/apps/explorer/src/pages/validators/Validators.tsx @@ -12,7 +12,7 @@ import { type ApyByValidator, } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { type IotaEvent, type IotaValidatorSummary } from '@iota/iota.js/client'; +import { type IotaEvent, type IotaValidatorSummary } from '@iota/iota-sdk/client'; import { Heading, Text } from '@iota/ui'; import { lazy, Suspense, useMemo } from 'react'; diff --git a/apps/explorer/tests/transaction.spec.ts b/apps/explorer/tests/transaction.spec.ts index 5bc8feba45e..133f19a6f27 100644 --- a/apps/explorer/tests/transaction.spec.ts +++ b/apps/explorer/tests/transaction.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type ProgrammableTransaction } from '@iota/iota.js/client'; +import { type ProgrammableTransaction } from '@iota/iota-sdk/client'; import { expect, test } from '@playwright/test'; import { faucet, split_coin } from './utils/localnet'; diff --git a/apps/explorer/tests/utils/localnet.ts b/apps/explorer/tests/utils/localnet.ts index c980f2afaaa..d1155967e83 100644 --- a/apps/explorer/tests/utils/localnet.ts +++ b/apps/explorer/tests/utils/localnet.ts @@ -4,10 +4,10 @@ import 'tsconfig-paths/register'; -import { IotaClient, getFullnodeUrl } from '@iota/iota.js/client'; -import { type Keypair } from '@iota/iota.js/cryptography'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaClient, getFullnodeUrl } from '@iota/iota-sdk/client'; +import { type Keypair } from '@iota/iota-sdk/cryptography'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const addressToKeypair = new Map(); diff --git a/apps/wallet-dashboard/app/dashboard/activity/page.tsx b/apps/wallet-dashboard/app/dashboard/activity/page.tsx index 9bff5f0d4d3..63a84224f75 100644 --- a/apps/wallet-dashboard/app/dashboard/activity/page.tsx +++ b/apps/wallet-dashboard/app/dashboard/activity/page.tsx @@ -8,7 +8,7 @@ import { useCurrentAccount } from '@iota/dapp-kit'; import { VirtualList, TransactionTile } from '@/components'; import { useQueryTransactionsByAddress } from '@iota/core'; import { getExtendedTransaction } from '@/lib/utils/transaction'; -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; function ActivityPage(): JSX.Element { const currentAccount = useCurrentAccount(); diff --git a/apps/wallet-dashboard/app/dashboard/assets/everything-else/page.tsx b/apps/wallet-dashboard/app/dashboard/assets/everything-else/page.tsx index a027d974758..4ac8510bc4c 100644 --- a/apps/wallet-dashboard/app/dashboard/assets/everything-else/page.tsx +++ b/apps/wallet-dashboard/app/dashboard/assets/everything-else/page.tsx @@ -4,7 +4,7 @@ 'use client'; import React from 'react'; -import { IotaObjectData, getNetwork } from '@iota/iota.js/client'; +import { IotaObjectData, getNetwork } from '@iota/iota-sdk/client'; import { VirtualList } from '@/components/index'; import { hasDisplayData, useGetOwnedObjects } from '@iota/core'; import { useCurrentAccount, useIotaClientContext } from '@iota/dapp-kit'; diff --git a/apps/wallet-dashboard/app/dashboard/assets/visual-assets/page.tsx b/apps/wallet-dashboard/app/dashboard/assets/visual-assets/page.tsx index 8f380fcb5b7..fe08f79fdfd 100644 --- a/apps/wallet-dashboard/app/dashboard/assets/visual-assets/page.tsx +++ b/apps/wallet-dashboard/app/dashboard/assets/visual-assets/page.tsx @@ -4,7 +4,7 @@ 'use client'; import React from 'react'; -import { IotaObjectData } from '@iota/iota.js/client'; +import { IotaObjectData } from '@iota/iota-sdk/client'; import { AssetCard, VirtualList } from '@/components/index'; import { useCurrentAccount } from '@iota/dapp-kit'; import { hasDisplayData, useGetOwnedObjects } from '@iota/core'; diff --git a/apps/wallet-dashboard/app/dashboard/staking/page.tsx b/apps/wallet-dashboard/app/dashboard/staking/page.tsx index a7a1def1cda..a073465e96c 100644 --- a/apps/wallet-dashboard/app/dashboard/staking/page.tsx +++ b/apps/wallet-dashboard/app/dashboard/staking/page.tsx @@ -16,7 +16,7 @@ import { DELEGATED_STAKES_QUERY_STALE_TIME, } from '@iota/core'; import { useCurrentAccount } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; function StakingDashboardPage(): JSX.Element { const account = useCurrentAccount(); diff --git a/apps/wallet-dashboard/app/layout.tsx b/apps/wallet-dashboard/app/layout.tsx index 011bb578eaa..badfa837057 100644 --- a/apps/wallet-dashboard/app/layout.tsx +++ b/apps/wallet-dashboard/app/layout.tsx @@ -7,7 +7,7 @@ import { Inter } from 'next/font/google'; import './globals.css'; import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getAllNetworks, getDefaultNetwork } from '@iota/iota.js/client'; +import { getAllNetworks, getDefaultNetwork } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import React from 'react'; diff --git a/apps/wallet-dashboard/components/AccountBalance/AccountBalance.tsx b/apps/wallet-dashboard/components/AccountBalance/AccountBalance.tsx index 06bc9ce866a..accc76d43e3 100644 --- a/apps/wallet-dashboard/components/AccountBalance/AccountBalance.tsx +++ b/apps/wallet-dashboard/components/AccountBalance/AccountBalance.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useCurrentAccount } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useBalance, useFormatCoin } from '@iota/core'; diff --git a/apps/wallet-dashboard/components/AppList/AppList.tsx b/apps/wallet-dashboard/components/AppList/AppList.tsx index e883b6c2f90..d73cb294207 100644 --- a/apps/wallet-dashboard/components/AppList/AppList.tsx +++ b/apps/wallet-dashboard/components/AppList/AppList.tsx @@ -6,7 +6,7 @@ import Image from 'next/image'; import { useAppsBackend } from '@iota/core'; import { useQuery } from '@tanstack/react-query'; import { AppListItem } from './AppList.types'; -import { getDefaultNetwork } from '@iota/iota.js/client'; +import { getDefaultNetwork } from '@iota/iota-sdk/client'; const AppListItem = (props: AppListItem) => { return ( diff --git a/apps/wallet-dashboard/components/Cards/AssetCard.tsx b/apps/wallet-dashboard/components/Cards/AssetCard.tsx index 5ee19acf379..1fda04703e9 100644 --- a/apps/wallet-dashboard/components/Cards/AssetCard.tsx +++ b/apps/wallet-dashboard/components/Cards/AssetCard.tsx @@ -3,7 +3,7 @@ 'use client'; -import { IotaObjectData } from '@iota/iota.js/client'; +import { IotaObjectData } from '@iota/iota-sdk/client'; import React from 'react'; import { Box, ExternalImage } from '@/components/index'; import { useGetNFTMeta } from '@iota/core'; diff --git a/apps/wallet-dashboard/components/Coins/MyCoins.tsx b/apps/wallet-dashboard/components/Coins/MyCoins.tsx index b870b01df99..6fb6e8eed49 100644 --- a/apps/wallet-dashboard/components/Coins/MyCoins.tsx +++ b/apps/wallet-dashboard/components/Coins/MyCoins.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { useCurrentAccount, useIotaClientQuery } from '@iota/dapp-kit'; import { CoinItem, SendCoinPopup } from '@/components'; import { usePopups } from '@/hooks'; -import { CoinBalance } from '@iota/iota.js/client'; +import { CoinBalance } from '@iota/iota-sdk/client'; import { COINS_QUERY_REFETCH_INTERVAL, COINS_QUERY_STALE_TIME, diff --git a/apps/wallet-dashboard/components/Popup/Popups/NewStakePopup/NewStakePopup.tsx b/apps/wallet-dashboard/components/Popup/Popups/NewStakePopup/NewStakePopup.tsx index 72258f06eab..20aef3ee0b1 100644 --- a/apps/wallet-dashboard/components/Popup/Popups/NewStakePopup/NewStakePopup.tsx +++ b/apps/wallet-dashboard/components/Popup/Popups/NewStakePopup/NewStakePopup.tsx @@ -6,7 +6,7 @@ import { EnterAmountView, SelectValidatorView } from './views'; import { useNotifications, useNewStakeTransaction } from '@/hooks'; import { parseAmount, useCoinMetadata, useGetValidatorsApy } from '@iota/core'; import { useCurrentAccount, useSignAndExecuteTransactionBlock } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { NotificationType } from '@/stores/notificationStore'; interface NewStakePopupProps { diff --git a/apps/wallet-dashboard/components/Popup/Popups/SendAssetPopup.tsx b/apps/wallet-dashboard/components/Popup/Popups/SendAssetPopup.tsx index 7eb40c8a209..305476e73f7 100644 --- a/apps/wallet-dashboard/components/Popup/Popups/SendAssetPopup.tsx +++ b/apps/wallet-dashboard/components/Popup/Popups/SendAssetPopup.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useCallback, useState } from 'react'; -import { IotaObjectData } from '@iota/iota.js/client'; +import { IotaObjectData } from '@iota/iota-sdk/client'; import { AssetCard, Input } from '@/components'; import { Button } from '@/components/Buttons'; import { FlexDirection } from '@/lib/ui/enums'; diff --git a/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/SendCoinPopup.tsx b/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/SendCoinPopup.tsx index cc4bf5f2473..bcf56fb00f9 100644 --- a/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/SendCoinPopup.tsx +++ b/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/SendCoinPopup.tsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import { EnterValuesFormView, ReviewValuesFormView } from './views'; -import { CoinBalance } from '@iota/iota.js/client'; +import { CoinBalance } from '@iota/iota-sdk/client'; import { useSendCoinTransaction, useNotifications } from '@/hooks'; import { useSignAndExecuteTransactionBlock } from '@iota/dapp-kit'; import { NotificationType } from '@/stores/notificationStore'; diff --git a/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/views/EnterValuesFormView.tsx b/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/views/EnterValuesFormView.tsx index 0eb0d978e0a..8c094ac8a90 100644 --- a/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/views/EnterValuesFormView.tsx +++ b/apps/wallet-dashboard/components/Popup/Popups/SendCoinPopup/views/EnterValuesFormView.tsx @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { CoinBalance } from '@iota/iota.js/client'; +import { CoinBalance } from '@iota/iota-sdk/client'; import { FormDataValues } from '../SendCoinPopup'; import { Button } from '@/components'; import { useFormatCoin } from '@iota/core'; diff --git a/apps/wallet-dashboard/components/Transaction/BalanceChanges/BalanceChangeEntry.tsx b/apps/wallet-dashboard/components/Transaction/BalanceChanges/BalanceChangeEntry.tsx index c176a1582bd..c4b9f85279f 100644 --- a/apps/wallet-dashboard/components/Transaction/BalanceChanges/BalanceChangeEntry.tsx +++ b/apps/wallet-dashboard/components/Transaction/BalanceChanges/BalanceChangeEntry.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { BalanceChange, CoinFormat, useFormatCoin, useCoinMetadata } from '@iota/core'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; interface BalanceChangeEntryProps { balanceChange: BalanceChange; diff --git a/apps/wallet-dashboard/components/Transaction/GasSummary.tsx b/apps/wallet-dashboard/components/Transaction/GasSummary.tsx index 554dbc06291..3b522432a40 100644 --- a/apps/wallet-dashboard/components/Transaction/GasSummary.tsx +++ b/apps/wallet-dashboard/components/Transaction/GasSummary.tsx @@ -4,7 +4,7 @@ import { useFormatCoin, type GasSummaryType } from '@iota/core'; import { useCurrentAccount } from '@iota/dapp-kit'; -import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; export default function GasSummary({ gasSummary }: { gasSummary: GasSummaryType }) { const [gas, symbol] = useFormatCoin(gasSummary?.totalGas, IOTA_TYPE_ARG); diff --git a/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectChangeEntry.tsx b/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectChangeEntry.tsx index faf6d687550..7b765fac8de 100644 --- a/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectChangeEntry.tsx +++ b/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectChangeEntry.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ObjectChangesByOwner, IotaObjectChangeTypes } from '@iota/core'; -import { IotaObjectChange } from '@iota/iota.js/client'; +import { IotaObjectChange } from '@iota/iota-sdk/client'; import { ObjectDetail } from './'; import React from 'react'; diff --git a/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectDetail.tsx b/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectDetail.tsx index 5011308dc0f..5bf22295311 100644 --- a/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectDetail.tsx +++ b/apps/wallet-dashboard/components/Transaction/ObjectChanges/ObjectDetail.tsx @@ -8,8 +8,8 @@ import { parseObjectChangeDetails, } from '@iota/core'; import { useCurrentAccount } from '@iota/dapp-kit'; -import { DisplayFieldsResponse, IotaObjectChange } from '@iota/iota.js/client'; -import { formatAddress, isValidIotaAddress } from '@iota/iota.js/utils'; +import { DisplayFieldsResponse, IotaObjectChange } from '@iota/iota-sdk/client'; +import { formatAddress, isValidIotaAddress } from '@iota/iota-sdk/utils'; enum ObjectDetailLabel { Package = 'Package', diff --git a/apps/wallet-dashboard/components/Transaction/StakeTransactionCard.tsx b/apps/wallet-dashboard/components/Transaction/StakeTransactionCard.tsx index d011a4b0f8e..adfc74a33ec 100644 --- a/apps/wallet-dashboard/components/Transaction/StakeTransactionCard.tsx +++ b/apps/wallet-dashboard/components/Transaction/StakeTransactionCard.tsx @@ -5,8 +5,8 @@ import { Box } from '..'; import { TransactionAmount } from './'; import { formatPercentageDisplay, useGetValidatorsApy } from '@iota/core'; -import type { IotaEvent } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { IotaEvent } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; interface StakeTransactionCardProps { event: IotaEvent; diff --git a/apps/wallet-dashboard/components/Transaction/UnstakeTransactionCard.tsx b/apps/wallet-dashboard/components/Transaction/UnstakeTransactionCard.tsx index 8427dca81ee..e10f8885583 100644 --- a/apps/wallet-dashboard/components/Transaction/UnstakeTransactionCard.tsx +++ b/apps/wallet-dashboard/components/Transaction/UnstakeTransactionCard.tsx @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useFormatCoin } from '@iota/core'; -import type { IotaEvent } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { IotaEvent } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Box } from '..'; import { TransactionAmount } from './'; diff --git a/apps/wallet-dashboard/hooks/useCreateSendAssetTransaction.ts b/apps/wallet-dashboard/hooks/useCreateSendAssetTransaction.ts index 685785c4350..d55e6e8fc26 100644 --- a/apps/wallet-dashboard/hooks/useCreateSendAssetTransaction.ts +++ b/apps/wallet-dashboard/hooks/useCreateSendAssetTransaction.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useSignAndExecuteTransactionBlock } from '@iota/dapp-kit'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMutation } from '@tanstack/react-query'; export function useCreateSendAssetTransaction( diff --git a/apps/wallet-dashboard/hooks/useSendCoinTransaction.ts b/apps/wallet-dashboard/hooks/useSendCoinTransaction.ts index bd2022535df..4f78ab7b84b 100644 --- a/apps/wallet-dashboard/hooks/useSendCoinTransaction.ts +++ b/apps/wallet-dashboard/hooks/useSendCoinTransaction.ts @@ -3,7 +3,7 @@ import { useCoinMetadata, createTokenTransferTransaction } from '@iota/core'; import { useIotaClient } from '@iota/dapp-kit'; -import { CoinStruct } from '@iota/iota.js/client'; +import { CoinStruct } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; export function useSendCoinTransaction( diff --git a/apps/wallet-dashboard/lib/interfaces/transactions.interface.ts b/apps/wallet-dashboard/lib/interfaces/transactions.interface.ts index 852f0d8af44..3a7b9c789d8 100644 --- a/apps/wallet-dashboard/lib/interfaces/transactions.interface.ts +++ b/apps/wallet-dashboard/lib/interfaces/transactions.interface.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; export interface ExtendedTransaction { action: TransactionAction; diff --git a/apps/wallet-dashboard/lib/utils/transaction.ts b/apps/wallet-dashboard/lib/utils/transaction.ts index 125111c0d82..bc7f08c2756 100644 --- a/apps/wallet-dashboard/lib/utils/transaction.ts +++ b/apps/wallet-dashboard/lib/utils/transaction.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ExtendedTransaction, TransactionAction, TransactionState } from '@/lib/interfaces'; -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { parseTimestamp } from './time'; const getTransactionTransactionState = (tx: IotaTransactionBlockResponse): TransactionState => { diff --git a/apps/wallet-dashboard/lib/utils/vesting/vesting.ts b/apps/wallet-dashboard/lib/utils/vesting/vesting.ts index a8ed8400c93..a2685591c5a 100644 --- a/apps/wallet-dashboard/lib/utils/vesting/vesting.ts +++ b/apps/wallet-dashboard/lib/utils/vesting/vesting.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectData } from '@iota/iota.js/client'; +import { IotaObjectData } from '@iota/iota-sdk/client'; import { SUPPLY_INCREASE_INVESTOR_VESTING_DURATION, SUPPLY_INCREASE_STAKER_VESTING_DURATION, diff --git a/apps/wallet-dashboard/package.json b/apps/wallet-dashboard/package.json index 88178787bed..3e79a7a28fa 100644 --- a/apps/wallet-dashboard/package.json +++ b/apps/wallet-dashboard/package.json @@ -18,7 +18,7 @@ "@iota/core": "workspace:*", "@iota/dapp-kit": "workspace:*", "@iota/icons": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@tanstack/react-query": "^5.0.0", "@tanstack/react-virtual": "^3.5.0", "next": "14.2.3", diff --git a/apps/wallet/configs/ts/tsconfig.common.json b/apps/wallet/configs/ts/tsconfig.common.json index 3c062db658b..882b99089f4 100644 --- a/apps/wallet/configs/ts/tsconfig.common.json +++ b/apps/wallet/configs/ts/tsconfig.common.json @@ -43,8 +43,8 @@ "_values/*": ["./src/ui/styles/values/*"], "_utils": ["./src/ui/styles/utils"], "_utils/*": ["./src/ui/styles/utils/*"], - "@iota/iota.js/*": ["../../sdk/typescript/src/*"], - "@iota/iota.js": ["../../sdk/typescript/src/"], + "@iota/iota-sdk/*": ["../../sdk/typescript/src/*"], + "@iota/iota-sdk": ["../../sdk/typescript/src/"], "@iota/kiosk": ["../../sdk/kiosk/src/index.ts"], "@iota/bcs": ["../../sdk/bcs/src/"], "@iota/dapp-kit": ["../../sdk/dapp-kit/src/"], diff --git a/apps/wallet/configs/webpack/webpack.config.common.ts b/apps/wallet/configs/webpack/webpack.config.common.ts index 4e59e3b9cde..00f9aabcb26 100644 --- a/apps/wallet/configs/webpack/webpack.config.common.ts +++ b/apps/wallet/configs/webpack/webpack.config.common.ts @@ -121,7 +121,7 @@ const commonConfig: () => Promise = async () => { }, resolve: { extensions: ['.ts', '.tsx', '.js'], - // Fix .js imports from @iota/iota.js since we are importing it from source + // Fix .js imports from @iota/iota-sdk since we are importing it from source extensionAlias: { '.js': ['.js', '.ts', '.tsx', '.jsx'], '.mjs': ['.mjs', '.mts'], diff --git a/apps/wallet/package.json b/apps/wallet/package.json index 6d2afaa1798..a18a122a18d 100644 --- a/apps/wallet/package.json +++ b/apps/wallet/package.json @@ -96,7 +96,7 @@ "@iota/core": "workspace:*", "@iota/dapp-kit": "workspace:*", "@iota/icons": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/kiosk": "workspace:*", "@iota/ledgerjs-hw-app-iota": "workspace:*", "@iota/ui-icons": "workspace:*", diff --git a/apps/wallet/src/background/NetworkEnv.ts b/apps/wallet/src/background/NetworkEnv.ts index 9ec1e62216c..0686efaaa2e 100644 --- a/apps/wallet/src/background/NetworkEnv.ts +++ b/apps/wallet/src/background/NetworkEnv.ts @@ -4,7 +4,7 @@ import { type NetworkEnvType } from '_src/shared/api-env'; import { isValidUrl } from '_src/shared/utils'; -import { getDefaultNetwork, Network } from '@iota/iota.js/client'; +import { getDefaultNetwork, Network } from '@iota/iota-sdk/client'; import mitt from 'mitt'; import Browser from 'webextension-polyfill'; diff --git a/apps/wallet/src/background/Transactions.ts b/apps/wallet/src/background/Transactions.ts index 286ba77e47a..95590bf8c0f 100644 --- a/apps/wallet/src/background/Transactions.ts +++ b/apps/wallet/src/background/Transactions.ts @@ -11,7 +11,7 @@ import { type SignMessageRequest } from '_payloads/transactions/SignMessage'; import type { TransactionRequestResponse } from '_payloads/transactions/ui/TransactionRequestResponse'; import type { ContentScriptConnection } from '_src/background/connections/ContentScriptConnection'; import { type SignedTransaction } from '_src/ui/app/WalletSigner'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { type IotaSignMessageOutput } from '@iota/wallet-standard'; import { filter, lastValueFrom, map, race, Subject, take } from 'rxjs'; import { v4 as uuidV4 } from 'uuid'; diff --git a/apps/wallet/src/background/account-sources/MnemonicAccountSource.ts b/apps/wallet/src/background/account-sources/MnemonicAccountSource.ts index ef25aaf851e..72820f4497b 100644 --- a/apps/wallet/src/background/account-sources/MnemonicAccountSource.ts +++ b/apps/wallet/src/background/account-sources/MnemonicAccountSource.ts @@ -11,8 +11,8 @@ import { deriveKeypairFromSeed, } from '_src/shared/utils'; import { decrypt, encrypt } from '_src/shared/cryptography/keystore'; -import { mnemonicToSeedHex } from '@iota/iota.js/cryptography'; -import type { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { mnemonicToSeedHex } from '@iota/iota-sdk/cryptography'; +import type { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { sha256 } from '@noble/hashes/sha256'; import { bytesToHex } from '@noble/hashes/utils'; import Dexie from 'dexie'; diff --git a/apps/wallet/src/background/account-sources/SeedAccountSource.ts b/apps/wallet/src/background/account-sources/SeedAccountSource.ts index e74e71897e5..ff4b3e094b9 100644 --- a/apps/wallet/src/background/account-sources/SeedAccountSource.ts +++ b/apps/wallet/src/background/account-sources/SeedAccountSource.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { decrypt, encrypt } from '_src/shared/cryptography/keystore'; -import { Ed25519Keypair, type Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519Keypair, type Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { sha256 } from '@noble/hashes/sha256'; import { bytesToHex } from '@noble/hashes/utils'; import Dexie from 'dexie'; diff --git a/apps/wallet/src/background/accounts/Account.ts b/apps/wallet/src/background/accounts/Account.ts index abbfbc8a5b3..063af822342 100644 --- a/apps/wallet/src/background/accounts/Account.ts +++ b/apps/wallet/src/background/accounts/Account.ts @@ -7,7 +7,7 @@ import { toSerializedSignature, type Keypair, type SerializedSignature, -} from '@iota/iota.js/cryptography'; +} from '@iota/iota-sdk/cryptography'; import { blake2b } from '@noble/hashes/blake2b'; import { setupAutoLockAlarm } from '../auto-lock-accounts'; diff --git a/apps/wallet/src/background/accounts/MnemonicAccount.ts b/apps/wallet/src/background/accounts/MnemonicAccount.ts index 9bb5748743d..0167be027fd 100644 --- a/apps/wallet/src/background/accounts/MnemonicAccount.ts +++ b/apps/wallet/src/background/accounts/MnemonicAccount.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { fromExportedKeypair } from '_src/shared/utils'; -import { type Keypair } from '@iota/iota.js/cryptography'; +import { type Keypair } from '@iota/iota-sdk/cryptography'; import { MnemonicAccountSource } from '../account-sources/MnemonicAccountSource'; import { diff --git a/apps/wallet/src/background/accounts/SeedAccount.ts b/apps/wallet/src/background/accounts/SeedAccount.ts index 3171192cd68..e2667871adb 100644 --- a/apps/wallet/src/background/accounts/SeedAccount.ts +++ b/apps/wallet/src/background/accounts/SeedAccount.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { fromExportedKeypair } from '_src/shared/utils'; -import { type Keypair } from '@iota/iota.js/cryptography'; +import { type Keypair } from '@iota/iota-sdk/cryptography'; import { SeedAccountSource } from '../account-sources/SeedAccountSource'; import { diff --git a/apps/wallet/src/background/accounts/index.ts b/apps/wallet/src/background/accounts/index.ts index 880ef5dfef5..665a7b9eddb 100644 --- a/apps/wallet/src/background/accounts/index.ts +++ b/apps/wallet/src/background/accounts/index.ts @@ -8,7 +8,7 @@ import { type MethodPayload, } from '_src/shared/messaging/messages/payloads/MethodPayload'; import { type WalletStatusChange } from '_src/shared/messaging/messages/payloads/wallet-status-change'; -import { fromB64 } from '@iota/iota.js/utils'; +import { fromB64 } from '@iota/iota-sdk/utils'; import Dexie from 'dexie'; import { getAccountSourceByID } from '../account-sources'; diff --git a/apps/wallet/src/background/connections/ContentScriptConnection.ts b/apps/wallet/src/background/connections/ContentScriptConnection.ts index 6427bbe6f81..2cb2f454717 100644 --- a/apps/wallet/src/background/connections/ContentScriptConnection.ts +++ b/apps/wallet/src/background/connections/ContentScriptConnection.ts @@ -30,7 +30,7 @@ import { type SignMessageRequest, } from '_src/shared/messaging/messages/payloads/transactions/SignMessage'; import { type SignedTransaction } from '_src/ui/app/WalletSigner'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import type { Runtime } from 'webextension-polyfill'; import { getAccountsStatusData } from '../accounts'; diff --git a/apps/wallet/src/dapp-interface/WalletStandardInterface.ts b/apps/wallet/src/dapp-interface/WalletStandardInterface.ts index 4a3ebca3309..2781a8bbe58 100644 --- a/apps/wallet/src/dapp-interface/WalletStandardInterface.ts +++ b/apps/wallet/src/dapp-interface/WalletStandardInterface.ts @@ -24,9 +24,9 @@ import type { import { getCustomNetwork, type NetworkEnvType } from '_src/shared/api-env'; import { type SignMessageRequest } from '_src/shared/messaging/messages/payloads/transactions/SignMessage'; import { isWalletStatusChangePayload } from '_src/shared/messaging/messages/payloads/wallet-status-change'; -import { getNetwork, Network, type ChainType } from '@iota/iota.js/client'; -import { isTransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64, toB64 } from '@iota/iota.js/utils'; +import { getNetwork, Network, type ChainType } from '@iota/iota-sdk/client'; +import { isTransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64, toB64 } from '@iota/iota-sdk/utils'; import { ReadonlyWalletAccount, SUPPORTED_CHAINS, diff --git a/apps/wallet/src/shared/accounts.ts b/apps/wallet/src/shared/accounts.ts index 86662a1c934..582b019ee93 100644 --- a/apps/wallet/src/shared/accounts.ts +++ b/apps/wallet/src/shared/accounts.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CoinBalance } from '@iota/iota.js/client'; +import { type CoinBalance } from '@iota/iota-sdk/client'; export interface AddressFromFinder { publicKey: string; diff --git a/apps/wallet/src/shared/api-env.ts b/apps/wallet/src/shared/api-env.ts index 6bf85619b06..4331168b8bb 100644 --- a/apps/wallet/src/shared/api-env.ts +++ b/apps/wallet/src/shared/api-env.ts @@ -7,7 +7,7 @@ import { getNetwork, Network, type NetworkConfiguration, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; export type NetworkEnvType = | { network: Exclude; customRpcUrl: null } diff --git a/apps/wallet/src/shared/experimentation/features.ts b/apps/wallet/src/shared/experimentation/features.ts index 80df4ca97ae..c2797ab8331 100644 --- a/apps/wallet/src/shared/experimentation/features.ts +++ b/apps/wallet/src/shared/experimentation/features.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { GrowthBook } from '@growthbook/growthbook'; -import { Network, getAppsBackend } from '@iota/iota.js/client'; +import { Network, getAppsBackend } from '@iota/iota-sdk/client'; import Browser from 'webextension-polyfill'; export const growthbook = new GrowthBook({ diff --git a/apps/wallet/src/shared/iota-client.ts b/apps/wallet/src/shared/iota-client.ts index 01fdbaa401e..85904c928ec 100644 --- a/apps/wallet/src/shared/iota-client.ts +++ b/apps/wallet/src/shared/iota-client.ts @@ -5,7 +5,7 @@ import networkEnv from '_src/background/NetworkEnv'; import { type NetworkEnvType } from '_src/shared/api-env'; import { SentryHttpTransport } from '@iota/core'; -import { getNetwork, Network, IotaClient, IotaHTTPTransport } from '@iota/iota.js/client'; +import { getNetwork, Network, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; const iotaClientPerNetwork = new Map(); const SENTRY_MONITORED_ENVS = [Network.Custom]; diff --git a/apps/wallet/src/shared/messaging/messages/payloads/MethodPayload.ts b/apps/wallet/src/shared/messaging/messages/payloads/MethodPayload.ts index a95b531c51a..87f9ffb0365 100644 --- a/apps/wallet/src/shared/messaging/messages/payloads/MethodPayload.ts +++ b/apps/wallet/src/shared/messaging/messages/payloads/MethodPayload.ts @@ -8,7 +8,7 @@ import type { } from '_src/background/account-sources/AccountSource'; import type { AccountType, SerializedUIAccount } from '_src/background/accounts/Account'; import { type Status } from '_src/background/storage-migration'; -import { type SerializedSignature } from '@iota/iota.js/cryptography'; +import { type SerializedSignature } from '@iota/iota-sdk/cryptography'; import { isBasePayload } from './BasePayload'; import type { Payload } from './Payload'; diff --git a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ApprovalRequest.ts b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ApprovalRequest.ts index 2367c3582e5..49782caec47 100644 --- a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ApprovalRequest.ts +++ b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ApprovalRequest.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { type SignedTransaction } from '_src/ui/app/WalletSigner'; -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { type IotaSignAndExecuteTransactionBlockInput, type IotaSignMessageOutput, diff --git a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ExecuteTransactionResponse.ts b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ExecuteTransactionResponse.ts index 06f778ccf4b..b685c9007f5 100644 --- a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ExecuteTransactionResponse.ts +++ b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ExecuteTransactionResponse.ts @@ -4,7 +4,7 @@ import { isBasePayload } from '_payloads'; import type { BasePayload, Payload } from '_payloads'; -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { type IotaSignTransactionBlockOutput } from '@iota/wallet-standard'; export interface ExecuteTransactionResponse extends BasePayload { diff --git a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ui/TransactionRequestResponse.ts b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ui/TransactionRequestResponse.ts index 5f0c067c38b..8b04454b22e 100644 --- a/apps/wallet/src/shared/messaging/messages/payloads/transactions/ui/TransactionRequestResponse.ts +++ b/apps/wallet/src/shared/messaging/messages/payloads/transactions/ui/TransactionRequestResponse.ts @@ -5,7 +5,7 @@ import { isBasePayload } from '_payloads'; import type { BasePayload, Payload } from '_payloads'; import { type SignedTransaction } from '_src/ui/app/WalletSigner'; -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { type IotaSignMessageOutput } from '@iota/wallet-standard'; export interface TransactionRequestResponse extends BasePayload { diff --git a/apps/wallet/src/shared/utils/keypair.ts b/apps/wallet/src/shared/utils/keypair.ts index 35693ba8e0b..331c35c7bb8 100644 --- a/apps/wallet/src/shared/utils/keypair.ts +++ b/apps/wallet/src/shared/utils/keypair.ts @@ -2,10 +2,10 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { decodeIotaPrivateKey, type Keypair } from '@iota/iota.js/cryptography'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { Secp256k1Keypair } from '@iota/iota.js/keypairs/secp256k1'; -import { Secp256r1Keypair } from '@iota/iota.js/keypairs/secp256r1'; +import { decodeIotaPrivateKey, type Keypair } from '@iota/iota-sdk/cryptography'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { Secp256k1Keypair } from '@iota/iota-sdk/keypairs/secp256k1'; +import { Secp256r1Keypair } from '@iota/iota-sdk/keypairs/secp256r1'; export function deriveKeypairFromSeed(seedHex: string, derivationPath: string) { return Ed25519Keypair.deriveKeypairFromSeed(seedHex, derivationPath); diff --git a/apps/wallet/src/shared/utils/transform.ts b/apps/wallet/src/shared/utils/transform.ts index a84285931cd..7d36e32c8ce 100644 --- a/apps/wallet/src/shared/utils/transform.ts +++ b/apps/wallet/src/shared/utils/transform.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { fromB64, toB64 } from '@iota/iota.js/utils'; +import { fromB64, toB64 } from '@iota/iota-sdk/utils'; export function toUtf8OrB64(message: string | Uint8Array) { const messageBytes = typeof message === 'string' ? fromB64(message) : message; diff --git a/apps/wallet/src/ui/app/ApiProvider.ts b/apps/wallet/src/ui/app/ApiProvider.ts index 676316f5b87..578a0c9418f 100644 --- a/apps/wallet/src/ui/app/ApiProvider.ts +++ b/apps/wallet/src/ui/app/ApiProvider.ts @@ -4,7 +4,7 @@ import { AccountType, type SerializedUIAccount } from '_src/background/accounts/Account'; import { getIotaClient } from '_src/shared/iota-client'; -import { getDefaultNetwork, Network, type IotaClient } from '@iota/iota.js/client'; +import { getDefaultNetwork, Network, type IotaClient } from '@iota/iota-sdk/client'; import type { BackgroundClient } from './background-client'; import { BackgroundServiceSigner } from './background-client/BackgroundServiceSigner'; diff --git a/apps/wallet/src/ui/app/LedgerSigner.ts b/apps/wallet/src/ui/app/LedgerSigner.ts index 3a89c6a41f7..2dde8cf9187 100644 --- a/apps/wallet/src/ui/app/LedgerSigner.ts +++ b/apps/wallet/src/ui/app/LedgerSigner.ts @@ -3,13 +3,13 @@ // SPDX-License-Identifier: Apache-2.0 import type IotaLedgerClient from '@iota/ledgerjs-hw-app-iota'; -import { type IotaClient } from '@iota/iota.js/client'; +import { type IotaClient } from '@iota/iota-sdk/client'; import { toSerializedSignature, type SerializedSignature, type SignatureScheme, -} from '@iota/iota.js/cryptography'; -import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +} from '@iota/iota-sdk/cryptography'; +import { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { WalletSigner } from './WalletSigner'; diff --git a/apps/wallet/src/ui/app/WalletSigner.ts b/apps/wallet/src/ui/app/WalletSigner.ts index d1b8ea26879..c1caf09796e 100644 --- a/apps/wallet/src/ui/app/WalletSigner.ts +++ b/apps/wallet/src/ui/app/WalletSigner.ts @@ -2,17 +2,17 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; import { type DryRunTransactionBlockResponse, type ExecuteTransactionRequestType, type IotaClient, type IotaTransactionBlockResponse, type IotaTransactionBlockResponseOptions, -} from '@iota/iota.js/client'; -import { IntentScope, messageWithIntent } from '@iota/iota.js/cryptography'; -import { isTransactionBlock, type TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64, toB64 } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { IntentScope, messageWithIntent } from '@iota/iota-sdk/cryptography'; +import { isTransactionBlock, type TransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64, toB64 } from '@iota/iota-sdk/utils'; export type SignedTransaction = { transactionBlockBytes: string; diff --git a/apps/wallet/src/ui/app/accounts-finder/AccountsFinder.ts b/apps/wallet/src/ui/app/accounts-finder/AccountsFinder.ts index 846bed10906..8a5052a0b06 100644 --- a/apps/wallet/src/ui/app/accounts-finder/AccountsFinder.ts +++ b/apps/wallet/src/ui/app/accounts-finder/AccountsFinder.ts @@ -3,10 +3,10 @@ import type { AccountFromFinder, AddressFromFinder } from '_src/shared/accounts'; import { diffAddressesBipPaths, mergeAccounts, recoverAccounts } from './accounts-finder'; -import type { IotaClient } from '@iota/iota.js/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import { getEmptyBalance } from './helpers'; import type { FindBalance } from './types'; -import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; export enum AllowedAccountSourceTypes { MnemonicDerived = 'mnemonic-derived', diff --git a/apps/wallet/src/ui/app/accounts-finder/accounts-finder.ts b/apps/wallet/src/ui/app/accounts-finder/accounts-finder.ts index 93940c01400..44f001d3484 100644 --- a/apps/wallet/src/ui/app/accounts-finder/accounts-finder.ts +++ b/apps/wallet/src/ui/app/accounts-finder/accounts-finder.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type CoinBalance } from '@iota/iota.js/client'; +import { type CoinBalance } from '@iota/iota-sdk/client'; import type { AccountFromFinder, AddressFromFinder } from '_src/shared/accounts'; import type { FindBalance } from './types'; diff --git a/apps/wallet/src/ui/app/accounts-finder/helpers.ts b/apps/wallet/src/ui/app/accounts-finder/helpers.ts index 554fa036b66..0d07c2b5302 100644 --- a/apps/wallet/src/ui/app/accounts-finder/helpers.ts +++ b/apps/wallet/src/ui/app/accounts-finder/helpers.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { CoinBalance } from '@iota/iota.js/client'; +import type { CoinBalance } from '@iota/iota-sdk/client'; export const getEmptyBalance = (coinType: string): CoinBalance => ({ coinType: coinType, diff --git a/apps/wallet/src/ui/app/accounts-finder/types.ts b/apps/wallet/src/ui/app/accounts-finder/types.ts index 07900132c45..f34b8b51425 100644 --- a/apps/wallet/src/ui/app/accounts-finder/types.ts +++ b/apps/wallet/src/ui/app/accounts-finder/types.ts @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { CoinBalance } from '@iota/iota.js/client'; +import type { CoinBalance } from '@iota/iota-sdk/client'; export type FindBalance = (params: { accountIndex: number; diff --git a/apps/wallet/src/ui/app/background-client/BackgroundServiceSigner.ts b/apps/wallet/src/ui/app/background-client/BackgroundServiceSigner.ts index cc38616e17c..75965c4c3d1 100644 --- a/apps/wallet/src/ui/app/background-client/BackgroundServiceSigner.ts +++ b/apps/wallet/src/ui/app/background-client/BackgroundServiceSigner.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { type SerializedUIAccount } from '_src/background/accounts/Account'; -import { type IotaClient } from '@iota/iota.js/client'; -import type { SerializedSignature } from '@iota/iota.js/cryptography'; +import { type IotaClient } from '@iota/iota-sdk/client'; +import type { SerializedSignature } from '@iota/iota-sdk/cryptography'; import type { BackgroundClient } from '.'; import { WalletSigner } from '../WalletSigner'; diff --git a/apps/wallet/src/ui/app/background-client/index.ts b/apps/wallet/src/ui/app/background-client/index.ts index b6dcff12d7e..38d79053e42 100644 --- a/apps/wallet/src/ui/app/background-client/index.ts +++ b/apps/wallet/src/ui/app/background-client/index.ts @@ -28,9 +28,9 @@ import { } from '_src/shared/messaging/messages/payloads/MethodPayload'; import { type SignedMessage, type SignedTransaction } from '_src/ui/app/WalletSigner'; import type { AppDispatch } from '_store'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; -import { type SerializedSignature } from '@iota/iota.js/cryptography'; -import { toB64 } from '@iota/iota.js/utils'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; +import { type SerializedSignature } from '@iota/iota-sdk/cryptography'; +import { toB64 } from '@iota/iota-sdk/utils'; import { type QueryKey } from '@tanstack/react-query'; import { lastValueFrom, map, take } from 'rxjs'; diff --git a/apps/wallet/src/ui/app/components/WalletListSelectItem.tsx b/apps/wallet/src/ui/app/components/WalletListSelectItem.tsx index 0fcf45a9aa6..52a197c26ea 100644 --- a/apps/wallet/src/ui/app/components/WalletListSelectItem.tsx +++ b/apps/wallet/src/ui/app/components/WalletListSelectItem.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { CheckFill16, XFill16 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { cva, cx, type VariantProps } from 'class-variance-authority'; import { useEffect, useRef } from 'react'; diff --git a/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx b/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx index 6ffc864ac6d..0e867c9d2dd 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx @@ -3,7 +3,7 @@ import { Copy12 } from '@iota/icons'; import { Text } from '_src/ui/app/shared/text'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { useCopyToClipboard } from '../../hooks/useCopyToClipboard'; import { IconButton } from '../IconButton'; import { type SerializedUIAccount } from '_src/background/accounts/Account'; diff --git a/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx b/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx index 8ee227e3d37..01f4bfa0468 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx @@ -5,7 +5,7 @@ import { Text } from '_src/ui/app/shared/text'; import { useResolveIotaNSName } from '@iota/core'; import { ArrowUpRight12, Copy12 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import cn from 'clsx'; import { forwardRef, type ReactNode } from 'react'; diff --git a/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx b/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx index 751c2f56015..252607b21ce 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx @@ -8,7 +8,7 @@ import { useUnlockAccount } from '_components/accounts/UnlockAccountContext'; import { type SerializedUIAccount } from '_src/background/accounts/Account'; import { useResolveIotaNSName } from '@iota/core'; import { CheckFill16 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import clsx from 'clsx'; interface AccountItemApproveConnectionProps { diff --git a/apps/wallet/src/ui/app/components/active-coins-card/index.tsx b/apps/wallet/src/ui/app/components/active-coins-card/index.tsx index 86755c02ab7..570af3f5ddb 100644 --- a/apps/wallet/src/ui/app/components/active-coins-card/index.tsx +++ b/apps/wallet/src/ui/app/components/active-coins-card/index.tsx @@ -6,7 +6,7 @@ import { useActiveAddress } from '_app/hooks/useActiveAddress'; import Loading from '_components/loading'; import { useCoinsReFetchingConfig } from '_hooks'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Link } from 'react-router-dom'; import { CoinItem } from './CoinItem'; import { filterAndSortTokenBalances } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/components/address-input/index.tsx b/apps/wallet/src/ui/app/components/address-input/index.tsx index 2c59c6b885b..10db0ff757d 100644 --- a/apps/wallet/src/ui/app/components/address-input/index.tsx +++ b/apps/wallet/src/ui/app/components/address-input/index.tsx @@ -6,7 +6,7 @@ import { Text } from '_app/shared/text'; import Alert from '_src/ui/app/components/alert'; import { useIotaClient } from '@iota/dapp-kit'; import { QrCode, X12 } from '@iota/icons'; -import { isValidIotaAddress } from '@iota/iota.js/utils'; +import { isValidIotaAddress } from '@iota/iota-sdk/utils'; import { useQuery } from '@tanstack/react-query'; import { cx } from 'class-variance-authority'; import { useField, useFormikContext } from 'formik'; diff --git a/apps/wallet/src/ui/app/components/coin-icon/index.tsx b/apps/wallet/src/ui/app/components/coin-icon/index.tsx index 2a7d179cdea..e279e65a592 100644 --- a/apps/wallet/src/ui/app/components/coin-icon/index.tsx +++ b/apps/wallet/src/ui/app/components/coin-icon/index.tsx @@ -5,7 +5,7 @@ import { ImageIcon } from '_app/shared/image-icon'; import { useCoinMetadata } from '@iota/core'; import { Iota, Unstaked } from '@iota/icons'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { cva, type VariantProps } from 'class-variance-authority'; const imageStyle = cva(['rounded-full flex'], { diff --git a/apps/wallet/src/ui/app/components/explorer-link/Explorer.ts b/apps/wallet/src/ui/app/components/explorer-link/Explorer.ts index de216bbb0bb..cdd199ff3d9 100644 --- a/apps/wallet/src/ui/app/components/explorer-link/Explorer.ts +++ b/apps/wallet/src/ui/app/components/explorer-link/Explorer.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { getUrlWithDeviceId } from '_src/shared/analytics/amplitude'; -import { getNetwork, Network } from '@iota/iota.js/client'; +import { getNetwork, Network } from '@iota/iota-sdk/client'; function getExplorerUrl(path: string, network: Network, customExplorer: string) { const networkConfig = getNetwork(network); diff --git a/apps/wallet/src/ui/app/components/explorer-link/index.tsx b/apps/wallet/src/ui/app/components/explorer-link/index.tsx index b22e239d2da..a5324cef782 100644 --- a/apps/wallet/src/ui/app/components/explorer-link/index.tsx +++ b/apps/wallet/src/ui/app/components/explorer-link/index.tsx @@ -4,7 +4,7 @@ import ExternalLink from '_components/external-link'; import { ArrowUpRight16 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import type { ReactNode } from 'react'; import { useExplorerLink, type ExplorerLinkConfig } from '../../hooks/useExplorerLink'; diff --git a/apps/wallet/src/ui/app/components/iota-apps/DisconnectApp.tsx b/apps/wallet/src/ui/app/components/iota-apps/DisconnectApp.tsx index f138eaf24c0..2a7da892cb4 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/DisconnectApp.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/DisconnectApp.tsx @@ -6,7 +6,7 @@ import Overlay from '_components/overlay'; import { useAppSelector } from '_hooks'; import { permissionsSelectors } from '_redux/slices/permissions'; import { ampli } from '_src/shared/analytics/ampli'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { useMutation } from '@tanstack/react-query'; import { useEffect, useMemo, useState } from 'react'; import { toast } from 'react-hot-toast'; diff --git a/apps/wallet/src/ui/app/components/ledger/LedgerAccountRow.tsx b/apps/wallet/src/ui/app/components/ledger/LedgerAccountRow.tsx index 8c674fea22b..8dff991603b 100644 --- a/apps/wallet/src/ui/app/components/ledger/LedgerAccountRow.tsx +++ b/apps/wallet/src/ui/app/components/ledger/LedgerAccountRow.tsx @@ -5,7 +5,7 @@ import { Text } from '_src/ui/app/shared/text'; import { useBalance, useFormatCoin, useResolveIotaNSName } from '@iota/core'; import { CheckFill16 } from '@iota/icons'; -import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import cl from 'clsx'; interface LedgerAccountRowProps { diff --git a/apps/wallet/src/ui/app/components/ledger/useDeriveLedgerAccounts.ts b/apps/wallet/src/ui/app/components/ledger/useDeriveLedgerAccounts.ts index d3f593461a7..47b1a579a71 100644 --- a/apps/wallet/src/ui/app/components/ledger/useDeriveLedgerAccounts.ts +++ b/apps/wallet/src/ui/app/components/ledger/useDeriveLedgerAccounts.ts @@ -4,7 +4,7 @@ import { type LedgerAccountSerializedUI } from '_src/background/accounts/LedgerAccount'; import type IotaLedgerClient from '@iota/ledgerjs-hw-app-iota'; -import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { useQuery, type UseQueryOptions } from '@tanstack/react-query'; import { useIotaLedgerClient } from './IotaLedgerClientProvider'; diff --git a/apps/wallet/src/ui/app/components/logo/index.tsx b/apps/wallet/src/ui/app/components/logo/index.tsx index 85c1f787089..218dd869c3c 100644 --- a/apps/wallet/src/ui/app/components/logo/index.tsx +++ b/apps/wallet/src/ui/app/components/logo/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { IotaCustomRpc, IotaDevnet, IotaLocal, IotaMainnet, IotaTestnet } from '@iota/icons'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; interface LogoProps { network?: Network; diff --git a/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx b/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx index 22b182030e5..cfcd2210722 100644 --- a/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx @@ -9,7 +9,7 @@ import { import { Link } from '_src/ui/app/shared/Link'; import { Text } from '_src/ui/app/shared/text'; import { Check12, X12 } from '@iota/icons'; -import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { useState } from 'react'; import toast from 'react-hot-toast'; diff --git a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx index 4a97a0621e4..92f2b23a2b3 100644 --- a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx @@ -11,7 +11,7 @@ import FaucetRequestButton from '_src/ui/app/shared/faucet/FaucetRequestButton'; import { Link } from '_src/ui/app/shared/Link'; import { Text } from '_src/ui/app/shared/text'; import { ArrowUpRight12, Clipboard24, Domain24, LockLocked24, More24 } from '@iota/icons'; -import { getNetwork, Network } from '@iota/iota.js/client'; +import { getNetwork, Network } from '@iota/iota-sdk/client'; import Browser from 'webextension-polyfill'; import Loading from '../../loading'; diff --git a/apps/wallet/src/ui/app/components/network-selector/custom-rpc-input/index.tsx b/apps/wallet/src/ui/app/components/network-selector/custom-rpc-input/index.tsx index fcb5425ffc2..3eb36461cac 100644 --- a/apps/wallet/src/ui/app/components/network-selector/custom-rpc-input/index.tsx +++ b/apps/wallet/src/ui/app/components/network-selector/custom-rpc-input/index.tsx @@ -7,7 +7,7 @@ import { changeActiveNetwork } from '_redux/slices/app'; import { ampli } from '_src/shared/analytics/ampli'; import { isValidUrl } from '_src/shared/utils'; import { InputWithAction } from '_src/ui/app/shared/InputWithAction'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { Form, Formik } from 'formik'; import { useCallback } from 'react'; import { toast } from 'react-hot-toast'; diff --git a/apps/wallet/src/ui/app/components/network-selector/index.tsx b/apps/wallet/src/ui/app/components/network-selector/index.tsx index 807780b0812..b83697c5c6a 100644 --- a/apps/wallet/src/ui/app/components/network-selector/index.tsx +++ b/apps/wallet/src/ui/app/components/network-selector/index.tsx @@ -7,7 +7,7 @@ import { changeActiveNetwork } from '_redux/slices/app'; import { ampli } from '_src/shared/analytics/ampli'; import { getCustomNetwork } from '_src/shared/api-env'; import { Check24 } from '@iota/icons'; -import { getAllNetworks, Network, type NetworkConfiguration } from '@iota/iota.js/client'; +import { getAllNetworks, Network, type NetworkConfiguration } from '@iota/iota-sdk/client'; import cl from 'clsx'; import { AnimatePresence, motion } from 'framer-motion'; import { useEffect, useMemo, useState } from 'react'; diff --git a/apps/wallet/src/ui/app/components/nft-display/Kiosk.tsx b/apps/wallet/src/ui/app/components/nft-display/Kiosk.tsx index a4bc69c4335..176764b8fae 100644 --- a/apps/wallet/src/ui/app/components/nft-display/Kiosk.tsx +++ b/apps/wallet/src/ui/app/components/nft-display/Kiosk.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import { getKioskIdFromOwnerCap, hasDisplayData, useGetKioskContents } from '@iota/core'; -import { type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; import cl from 'clsx'; import { useActiveAddress } from '../../hooks'; diff --git a/apps/wallet/src/ui/app/components/nft-display/index.tsx b/apps/wallet/src/ui/app/components/nft-display/index.tsx index 8149be5d80f..117d9acd480 100644 --- a/apps/wallet/src/ui/app/components/nft-display/index.tsx +++ b/apps/wallet/src/ui/app/components/nft-display/index.tsx @@ -7,7 +7,7 @@ import Loading from '_components/loading'; import { NftImage, type NftImageProps } from '_components/nft-display/NftImage'; import { useFileExtensionType } from '_hooks'; import { isKioskOwnerToken, useGetNFTMeta, useGetObject, useKioskClient } from '@iota/core'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { cva } from 'class-variance-authority'; import type { VariantProps } from 'class-variance-authority'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/SponsoredTxnGasSummary.tsx b/apps/wallet/src/ui/app/components/receipt-card/SponsoredTxnGasSummary.tsx index 1dcca9eba75..df69918946e 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/SponsoredTxnGasSummary.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/SponsoredTxnGasSummary.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { GAS_SYMBOL } from '_redux/slices/iota-objects/Coin'; import { Text } from '_src/ui/app/shared/text'; import { useFormatCoin } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx b/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx index a2b1d0abb09..90b6ac28f81 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx @@ -16,8 +16,8 @@ import { useGetTimeBeforeEpochNumber, useGetValidatorsApy, } from '@iota/core'; -import type { IotaEvent } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { IotaEvent } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Card } from '../../shared/transaction-summary/Card'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx b/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx index e676a0fa925..c0f05caf06c 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx @@ -5,7 +5,7 @@ import ExplorerLink from '_components/explorer-link'; import { ExplorerLinkType } from '_components/explorer-link/ExplorerLinkType'; import { isIotaNSName } from '@iota/core'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; interface TxnAddressLinkProps { address: string; diff --git a/apps/wallet/src/ui/app/components/receipt-card/TxnGasSummary.tsx b/apps/wallet/src/ui/app/components/receipt-card/TxnGasSummary.tsx index 4dcbc1de26b..7e942e2668a 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/TxnGasSummary.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/TxnGasSummary.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text } from '_src/ui/app/shared/text'; import { useFormatCoin } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx b/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx index fab2cd99396..3edcee1ad1f 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx @@ -6,8 +6,8 @@ import { ValidatorLogo } from '_app/staking/validators/ValidatorLogo'; import { TxnAmount } from '_components/receipt-card/TxnAmount'; import { Text } from '_src/ui/app/shared/text'; import { useFormatCoin } from '@iota/core'; -import type { IotaEvent } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { IotaEvent } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Card } from '../../shared/transaction-summary/Card'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/index.tsx b/apps/wallet/src/ui/app/components/receipt-card/index.tsx index a5465c3d9cf..3cbddbf2ddb 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/index.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/index.tsx @@ -4,7 +4,7 @@ import { useRecognizedPackages } from '_src/ui/app/hooks/useRecognizedPackages'; import { useTransactionSummary, STAKING_REQUEST_EVENT, UNSTAKING_REQUEST_EVENT } from '@iota/core'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { DateCard } from '../../shared/date-card'; import { TransactionSummary } from '../../shared/transaction-summary'; diff --git a/apps/wallet/src/ui/app/components/transactions-card/TxnActionLabel.tsx b/apps/wallet/src/ui/app/components/transactions-card/TxnActionLabel.tsx index 4b83d17c063..8f969301e4b 100644 --- a/apps/wallet/src/ui/app/components/transactions-card/TxnActionLabel.tsx +++ b/apps/wallet/src/ui/app/components/transactions-card/TxnActionLabel.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Text } from '_app/shared/text'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; interface TxnTypeProps { address: string; diff --git a/apps/wallet/src/ui/app/components/transactions-card/index.tsx b/apps/wallet/src/ui/app/components/transactions-card/index.tsx index fc4c2316f16..41cad132191 100644 --- a/apps/wallet/src/ui/app/components/transactions-card/index.tsx +++ b/apps/wallet/src/ui/app/components/transactions-card/index.tsx @@ -7,7 +7,7 @@ import { Text } from '_app/shared/text'; import { useGetTxnRecipientAddress } from '_hooks'; import { useRecognizedPackages } from '_src/ui/app/hooks/useRecognizedPackages'; import { getLabel, useTransactionSummary } from '@iota/core'; -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { Link } from 'react-router-dom'; import { TxnTypeLabel } from './TxnActionLabel'; diff --git a/apps/wallet/src/ui/app/helpers/checkStakingTxn.ts b/apps/wallet/src/ui/app/helpers/checkStakingTxn.ts index cb358c7840b..a0022b8a10b 100644 --- a/apps/wallet/src/ui/app/helpers/checkStakingTxn.ts +++ b/apps/wallet/src/ui/app/helpers/checkStakingTxn.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; // TODO: Support programmable transactions: export function checkStakingTxn(_txn: IotaTransactionBlockResponse) { diff --git a/apps/wallet/src/ui/app/helpers/getAmount.ts b/apps/wallet/src/ui/app/helpers/getAmount.ts index 1b4e03bfafd..a3002919594 100644 --- a/apps/wallet/src/ui/app/helpers/getAmount.ts +++ b/apps/wallet/src/ui/app/helpers/getAmount.ts @@ -2,7 +2,11 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaEvent, IotaTransactionBlockKind, TransactionEffects } from '@iota/iota.js/client'; +import type { + IotaEvent, + IotaTransactionBlockKind, + TransactionEffects, +} from '@iota/iota-sdk/client'; type FormattedBalance = { amount?: number | null; diff --git a/apps/wallet/src/ui/app/helpers/getEventsSummary.ts b/apps/wallet/src/ui/app/helpers/getEventsSummary.ts index ac94c565a90..e6baefa2c33 100644 --- a/apps/wallet/src/ui/app/helpers/getEventsSummary.ts +++ b/apps/wallet/src/ui/app/helpers/getEventsSummary.ts @@ -9,7 +9,7 @@ export {}; // getTransferObjectEvent, // isEventType, // type TransactionEvents, -// } from '@iota/iota.js'; +// } from '@iota/iota-sdk'; // export type CoinsMetaProps = { // amount: number; diff --git a/apps/wallet/src/ui/app/helpers/validation/privateKeyValidation.ts b/apps/wallet/src/ui/app/helpers/validation/privateKeyValidation.ts index a54c64a0504..a09cf635346 100644 --- a/apps/wallet/src/ui/app/helpers/validation/privateKeyValidation.ts +++ b/apps/wallet/src/ui/app/helpers/validation/privateKeyValidation.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { decodeIotaPrivateKey, encodeIotaPrivateKey } from '@iota/iota.js/cryptography/keypair'; +import { decodeIotaPrivateKey, encodeIotaPrivateKey } from '@iota/iota-sdk/cryptography/keypair'; import { hexToBytes } from '@noble/hashes/utils'; import { z } from 'zod'; diff --git a/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts b/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts index 9f6b4fef434..36fa161b4a6 100644 --- a/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts +++ b/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts @@ -11,9 +11,9 @@ import type { SourceStrategyToPersist, } from '_src/shared/messaging/messages/payloads/accounts-finder'; import { makeDerivationPath } from '_src/background/account-sources/bip44Path'; -import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; import { IOTA_BIP44_COIN_TYPE } from '../redux/slices/iota-objects/Coin'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; export interface UseAccountFinderOptions { accountSourceType: AllowedAccountSourceTypes; diff --git a/apps/wallet/src/ui/app/hooks/useExplorerLink.ts b/apps/wallet/src/ui/app/hooks/useExplorerLink.ts index 25ca2bc81a8..c4c62424d83 100644 --- a/apps/wallet/src/ui/app/hooks/useExplorerLink.ts +++ b/apps/wallet/src/ui/app/hooks/useExplorerLink.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { getCustomNetwork } from '_src/shared/api-env'; -import { getNetwork, Network } from '@iota/iota.js/client'; +import { getNetwork, Network } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; import { diff --git a/apps/wallet/src/ui/app/hooks/useGetNFTs.ts b/apps/wallet/src/ui/app/hooks/useGetNFTs.ts index a75ee8e203e..b6f524bc9f4 100644 --- a/apps/wallet/src/ui/app/hooks/useGetNFTs.ts +++ b/apps/wallet/src/ui/app/hooks/useGetNFTs.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { hasDisplayData, isKioskOwnerToken, useGetOwnedObjects, useKioskClient } from '@iota/core'; -import { type IotaObjectData } from '@iota/iota.js/client'; +import { type IotaObjectData } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; import { useHiddenAssets } from '../pages/home/hidden-assets/HiddenAssetsProvider'; diff --git a/apps/wallet/src/ui/app/hooks/useGetTransferAmount.ts b/apps/wallet/src/ui/app/hooks/useGetTransferAmount.ts index cceedededcd..24dc6c0d62a 100644 --- a/apps/wallet/src/ui/app/hooks/useGetTransferAmount.ts +++ b/apps/wallet/src/ui/app/hooks/useGetTransferAmount.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { getAmount } from '_helpers'; -import type { IotaTransactionBlockResponse } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useMemo } from 'react'; export function useGetTransferAmount({ diff --git a/apps/wallet/src/ui/app/hooks/useGetTxnRecipientAddress.ts b/apps/wallet/src/ui/app/hooks/useGetTxnRecipientAddress.ts index 5aaa339b2ac..9696f82772d 100644 --- a/apps/wallet/src/ui/app/hooks/useGetTxnRecipientAddress.ts +++ b/apps/wallet/src/ui/app/hooks/useGetTxnRecipientAddress.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { getAmount } from '_helpers'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; type Props = { diff --git a/apps/wallet/src/ui/app/hooks/useInitialPageView.ts b/apps/wallet/src/ui/app/hooks/useInitialPageView.ts index b474adaac74..7ae9b3d2f54 100644 --- a/apps/wallet/src/ui/app/hooks/useInitialPageView.ts +++ b/apps/wallet/src/ui/app/hooks/useInitialPageView.ts @@ -4,7 +4,7 @@ import { ampli } from '_src/shared/analytics/ampli'; import { getCustomNetwork } from '_src/shared/api-env'; -import { getNetwork } from '@iota/iota.js/client'; +import { getNetwork } from '@iota/iota-sdk/client'; import { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; import Browser from 'webextension-polyfill'; diff --git a/apps/wallet/src/ui/app/hooks/useIsWalletDefiEnabled.ts b/apps/wallet/src/ui/app/hooks/useIsWalletDefiEnabled.ts index 277f2c40244..df81aa071df 100644 --- a/apps/wallet/src/ui/app/hooks/useIsWalletDefiEnabled.ts +++ b/apps/wallet/src/ui/app/hooks/useIsWalletDefiEnabled.ts @@ -5,7 +5,7 @@ import useAppSelector from '_app/hooks/useAppSelector'; import { Feature } from '_shared/experimentation/features'; import { useFeature } from '@growthbook/growthbook-react'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; export function useIsWalletDefiEnabled() { const isDefiWalletEnabled = useFeature(Feature.WalletDefi).value; diff --git a/apps/wallet/src/ui/app/hooks/useMediaUrl.ts b/apps/wallet/src/ui/app/hooks/useMediaUrl.ts index 5581c0cd6d7..bf4dc6cf4a6 100644 --- a/apps/wallet/src/ui/app/hooks/useMediaUrl.ts +++ b/apps/wallet/src/ui/app/hooks/useMediaUrl.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaParsedData } from '@iota/iota.js/client'; +import type { IotaParsedData } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; const parseIpfsUrl = (ipfsUrl: string) => ipfsUrl.replace(/^ipfs:\/\//, 'https://ipfs.io/ipfs/'); diff --git a/apps/wallet/src/ui/app/hooks/useNFTBasicData.ts b/apps/wallet/src/ui/app/hooks/useNFTBasicData.ts index 415ac17f191..2b9360bf94a 100644 --- a/apps/wallet/src/ui/app/hooks/useNFTBasicData.ts +++ b/apps/wallet/src/ui/app/hooks/useNFTBasicData.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaObjectData } from '@iota/iota.js/client'; +import type { IotaObjectData } from '@iota/iota-sdk/client'; import useFileExtensionType from './useFileExtensionType'; import useMediaUrl from './useMediaUrl'; diff --git a/apps/wallet/src/ui/app/hooks/useRecognizedPackages.ts b/apps/wallet/src/ui/app/hooks/useRecognizedPackages.ts index 079f080bf0f..8079d1fcb15 100644 --- a/apps/wallet/src/ui/app/hooks/useRecognizedPackages.ts +++ b/apps/wallet/src/ui/app/hooks/useRecognizedPackages.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useFeatureValue } from '@growthbook/growthbook-react'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import useAppSelector from './useAppSelector'; import { DEFAULT_RECOGNIZED_PACKAGES } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/hooks/useResolveVideo.ts b/apps/wallet/src/ui/app/hooks/useResolveVideo.ts index b3958a19522..da5c1389370 100644 --- a/apps/wallet/src/ui/app/hooks/useResolveVideo.ts +++ b/apps/wallet/src/ui/app/hooks/useResolveVideo.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaObjectResponse } from '@iota/iota.js/client'; +import { type IotaObjectResponse } from '@iota/iota-sdk/client'; import { useRecognizedPackages } from './useRecognizedPackages'; diff --git a/apps/wallet/src/ui/app/hooks/useRestrictedGuard.ts b/apps/wallet/src/ui/app/hooks/useRestrictedGuard.ts index 0f0d7a94af5..7c5be714ed7 100644 --- a/apps/wallet/src/ui/app/hooks/useRestrictedGuard.ts +++ b/apps/wallet/src/ui/app/hooks/useRestrictedGuard.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getAppsBackend } from '@iota/iota.js/client'; +import { getAppsBackend } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { useEffect } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/hooks/useTransactionData.ts b/apps/wallet/src/ui/app/hooks/useTransactionData.ts index 4de4bd31ed1..71408589c49 100644 --- a/apps/wallet/src/ui/app/hooks/useTransactionData.ts +++ b/apps/wallet/src/ui/app/hooks/useTransactionData.ts @@ -4,8 +4,8 @@ import { useFormatCoin } from '@iota/core'; import { useIotaClient } from '@iota/dapp-kit'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useQuery } from '@tanstack/react-query'; export function useTransactionData(sender?: string | null, transaction?: TransactionBlock | null) { diff --git a/apps/wallet/src/ui/app/hooks/useTransactionDryRun.ts b/apps/wallet/src/ui/app/hooks/useTransactionDryRun.ts index 68b7eff2ffb..e2dd87b9aff 100644 --- a/apps/wallet/src/ui/app/hooks/useTransactionDryRun.ts +++ b/apps/wallet/src/ui/app/hooks/useTransactionDryRun.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type TransactionBlock } from '@iota/iota.js/transactions'; +import { type TransactionBlock } from '@iota/iota-sdk/transactions'; import { useQuery } from '@tanstack/react-query'; import { useAccountByAddress } from './useAccountByAddress'; diff --git a/apps/wallet/src/ui/app/index.tsx b/apps/wallet/src/ui/app/index.tsx index 5963c326b73..418461b057a 100644 --- a/apps/wallet/src/ui/app/index.tsx +++ b/apps/wallet/src/ui/app/index.tsx @@ -7,7 +7,7 @@ import { setNavVisibility } from '_redux/slices/app'; import { isLedgerAccountSerializedUI } from '_src/background/accounts/LedgerAccount'; import { persistableStorage } from '_src/shared/analytics/amplitude'; import { type LedgerAccountsPublicKeys } from '_src/shared/messaging/messages/payloads/MethodPayload'; -import { toB64 } from '@iota/iota.js/utils'; +import { toB64 } from '@iota/iota-sdk/utils'; import { useEffect, useMemo } from 'react'; import { Navigate, Route, Routes, useLocation } from 'react-router-dom'; import { throttle } from 'throttle-debounce'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/GasFees.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/GasFees.tsx index 64a4e88019f..e8d61a7a23c 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/GasFees.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/GasFees.tsx @@ -4,8 +4,8 @@ import { useTransactionData, useTransactionGasBudget } from '_src/ui/app/hooks'; import { GAS_SYMBOL } from '_src/ui/app/redux/slices/iota-objects/Coin'; -import { type TransactionBlock } from '@iota/iota.js/transactions'; -import { formatAddress } from '@iota/iota.js/utils'; +import { type TransactionBlock } from '@iota/iota-sdk/transactions'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { DescriptionItem, DescriptionList } from './DescriptionList'; import { SummaryCard } from './SummaryCard'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Command.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Command.tsx index b20dd2cd238..620631903cc 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Command.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Command.tsx @@ -4,9 +4,9 @@ import { Text } from '_src/ui/app/shared/text'; import { ChevronDown12, ChevronRight12 } from '@iota/icons'; -import { TypeTagSerializer, type TypeTag } from '@iota/iota.js/bcs'; -import { type TransactionArgument, type Transactions } from '@iota/iota.js/transactions'; -import { formatAddress, normalizeIotaAddress, toB64 } from '@iota/iota.js/utils'; +import { TypeTagSerializer, type TypeTag } from '@iota/iota-sdk/bcs'; +import { type TransactionArgument, type Transactions } from '@iota/iota-sdk/transactions'; +import { formatAddress, normalizeIotaAddress, toB64 } from '@iota/iota-sdk/utils'; import { useState } from 'react'; type TransactionType = ReturnType<(typeof Transactions)[keyof typeof Transactions]>; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx index 8ba8834003a..1f207df9022 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx @@ -5,8 +5,8 @@ import ExplorerLink from '_src/ui/app/components/explorer-link'; import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; import { Text } from '_src/ui/app/shared/text'; -import { type TransactionBlockInput } from '@iota/iota.js/transactions'; -import { formatAddress, toB64 } from '@iota/iota.js/utils'; +import { type TransactionBlockInput } from '@iota/iota-sdk/transactions'; +import { formatAddress, toB64 } from '@iota/iota-sdk/utils'; interface InputProps { input: TransactionBlockInput; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/index.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/index.tsx index e22aecfee94..52e6909b79e 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/index.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/index.tsx @@ -4,7 +4,7 @@ import { useTransactionData } from '_src/ui/app/hooks'; import { Tab as HeadlessTab, type TabProps } from '@headlessui/react'; -import { type TransactionBlock } from '@iota/iota.js/transactions'; +import { type TransactionBlock } from '@iota/iota-sdk/transactions'; import { SummaryCard } from '../SummaryCard'; import { Command } from './Command'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx index df9ac0f7499..fa5f4942f17 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -// import { Transaction } from '@iota/iota.js'; +// import { Transaction } from '@iota/iota-sdk'; import { UserApproveContainer } from '_components/user-approve-container'; import { useAppDispatch, useTransactionData, useTransactionDryRun } from '_hooks'; import { type TransactionApprovalRequest } from '_payloads/transactions/ApprovalRequest'; @@ -14,7 +14,7 @@ import { useSigner } from '_src/ui/app/hooks/useSigner'; import { PageMainLayoutTitle } from '_src/ui/app/shared/page-main-layout/PageMainLayoutTitle'; import { TransactionSummary } from '_src/ui/app/shared/transaction-summary'; import { useTransactionSummary } from '@iota/core'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMemo, useState } from 'react'; import { ConfirmationModal } from '../../../shared/ConfirmationModal'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/utils/normalize.ts b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/utils/normalize.ts index b9f4a452c66..e481e49f945 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/utils/normalize.ts +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/utils/normalize.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type IotaMoveNormalizedType } from '@iota/iota.js/client'; +import { type IotaMoveNormalizedType } from '@iota/iota-sdk/client'; export interface TypeReference { address: string; diff --git a/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx b/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx index 3b0c2ee3cc3..dfc99976061 100644 --- a/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx @@ -14,7 +14,7 @@ import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { Collapsible } from '_src/ui/app/shared/collapse'; import PageTitle from '_src/ui/app/shared/PageTitle'; import { useGetKioskContents } from '@iota/core'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Link, useSearchParams } from 'react-router-dom'; function KioskDetailsPage() { diff --git a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx index 0325fc474c1..949604f2df0 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx @@ -17,7 +17,7 @@ import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import PageTitle from '_src/ui/app/shared/PageTitle'; import { useGetKioskContents, useGetNFTMeta } from '@iota/core'; import { ArrowRight16, ArrowUpRight12 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import cl from 'clsx'; import { Navigate, useSearchParams } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx b/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx index 944fd3c9ddf..86e4084855c 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx @@ -19,7 +19,7 @@ import { } from '@iota/core'; import { useIotaClient } from '@iota/dapp-kit'; import { ArrowRight16 } from '@iota/icons'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Field, Form, Formik } from 'formik'; import { toast } from 'react-hot-toast'; diff --git a/apps/wallet/src/ui/app/pages/home/nft-transfer/useTransferKioskItem.tsx b/apps/wallet/src/ui/app/pages/home/nft-transfer/useTransferKioskItem.tsx index 9314a5d2ee3..f19842fdb4c 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-transfer/useTransferKioskItem.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-transfer/useTransferKioskItem.tsx @@ -14,7 +14,7 @@ import { } from '@iota/core'; import { useIotaClient } from '@iota/dapp-kit'; import { KioskTransaction } from '@iota/kiosk'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMutation } from '@tanstack/react-query'; const ORIGINBYTE_PACKAGE_ID = '0x083b02db943238dcea0ff0938a54a17d7575f5b48034506446e501e963391480'; diff --git a/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx b/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx index 9380a0afd8b..9e96dd65b4a 100644 --- a/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx +++ b/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx @@ -5,8 +5,8 @@ import ExplorerLink from '_src/ui/app/components/explorer-link'; import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; import { Text } from '_src/ui/app/shared/text'; -import { type IotaObjectData } from '@iota/iota.js/client'; -import { formatAddress, parseStructTag } from '@iota/iota.js/utils'; +import { type IotaObjectData } from '@iota/iota-sdk/client'; +import { formatAddress, parseStructTag } from '@iota/iota-sdk/utils'; interface NonVisualAssetsProps { items: IotaObjectData[]; diff --git a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx index 5d0d70a4641..48e6a501060 100644 --- a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx +++ b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx @@ -7,7 +7,7 @@ import { ampli } from '_src/shared/analytics/ampli'; import { NFTDisplayCard } from '_src/ui/app/components/nft-display'; import { Button } from '_src/ui/app/shared/ButtonUI'; import { EyeClose16 } from '@iota/icons'; -import { type IotaObjectData } from '@iota/iota.js/client'; +import { type IotaObjectData } from '@iota/iota-sdk/client'; import { Link } from 'react-router-dom'; import { useHiddenAssets } from '../hidden-assets/HiddenAssetsProvider'; diff --git a/apps/wallet/src/ui/app/pages/home/receipt/index.tsx b/apps/wallet/src/ui/app/pages/home/receipt/index.tsx index 244f7ff449a..e6fdc2f5531 100644 --- a/apps/wallet/src/ui/app/pages/home/receipt/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/receipt/index.tsx @@ -10,7 +10,7 @@ import { useActiveAddress } from '_src/ui/app/hooks/useActiveAddress'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { useIotaClient } from '@iota/dapp-kit'; import { Check32 } from '@iota/icons'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { useCallback, useMemo, useState } from 'react'; import { Navigate, useLocation, useNavigate, useSearchParams } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokenIconLink.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokenIconLink.tsx index 9debe40256a..cfa1f443707 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokenIconLink.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokenIconLink.tsx @@ -14,7 +14,7 @@ import { DELEGATED_STAKES_QUERY_STALE_TIME, } from '@iota/core'; import { WalletActionStake24 } from '@iota/icons'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; export function TokenIconLink({ accountAddress, diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx index 1397525bd86..673bc0a12c5 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx @@ -4,8 +4,8 @@ import { CoinItem } from '_components/active-coins-card/CoinItem'; import { ampli } from '_src/shared/analytics/ampli'; -import { type CoinBalance } from '@iota/iota.js/client'; -import { MICROS_PER_IOTA } from '@iota/iota.js/utils'; +import { type CoinBalance } from '@iota/iota-sdk/client'; +import { MICROS_PER_IOTA } from '@iota/iota-sdk/utils'; import { type ReactNode } from 'react'; import { Link } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx index 9b757a5e151..6e91b43fce2 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx @@ -34,8 +34,8 @@ import { } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { Info12, Pin16, Unpin16 } from '@iota/icons'; -import { Network, type CoinBalance as CoinBalanceType } from '@iota/iota.js/client'; -import { formatAddress, parseStructTag, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { Network, type CoinBalance as CoinBalanceType } from '@iota/iota-sdk/client'; +import { formatAddress, parseStructTag, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useQuery } from '@tanstack/react-query'; import clsx from 'clsx'; import { useEffect, useState, type ReactNode } from 'react'; diff --git a/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/index.tsx b/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/index.tsx index ef695ea2243..c2192b32e78 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/index.tsx @@ -6,8 +6,8 @@ import { useAppSelector } from '_hooks'; import { Heading } from '_src/ui/app/shared/heading'; import { Text } from '_src/ui/app/shared/text'; import { useBalanceInUSD, useFormatCoin } from '@iota/core'; -import { Network } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { Network } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useMemo } from 'react'; export interface CoinProps { diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx index 9c3594b964d..7101a962a8a 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx @@ -5,7 +5,7 @@ import { ActiveCoinsCard } from '_components/active-coins-card'; import Overlay from '_components/overlay'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useNavigate, useSearchParams } from 'react-router-dom'; function CoinsSelectorPage() { diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx index 2d4aa2337b7..45fcb144a1c 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx @@ -23,8 +23,8 @@ import { } from '@iota/core'; import { useIotaClient } from '@iota/dapp-kit'; import { ArrowRight16 } from '@iota/icons'; -import { type CoinStruct } from '@iota/iota.js/client'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { type CoinStruct } from '@iota/iota-sdk/client'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useQuery } from '@tanstack/react-query'; import { Field, Form, Formik, useFormikContext } from 'formik'; import { useEffect, useMemo } from 'react'; diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/validation.ts b/apps/wallet/src/ui/app/pages/home/transfer-coin/validation.ts index 56646b7bb82..bbead006bd0 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/validation.ts +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/validation.ts @@ -4,7 +4,7 @@ import { createIotaAddressValidation } from '@iota/core'; import { createTokenValidation } from '_src/shared/validation'; -import { type IotaClient } from '@iota/iota.js/client'; +import { type IotaClient } from '@iota/iota-sdk/client'; import * as Yup from 'yup'; export function createValidationSchemaStepOne( diff --git a/apps/wallet/src/ui/app/redux/slices/app/index.ts b/apps/wallet/src/ui/app/redux/slices/app/index.ts index 391da3efbf4..8843a3f78b2 100644 --- a/apps/wallet/src/ui/app/redux/slices/app/index.ts +++ b/apps/wallet/src/ui/app/redux/slices/app/index.ts @@ -6,7 +6,7 @@ import { walletApiProvider } from '_app/ApiProvider'; import type { RootState } from '_redux/RootReducer'; import type { NetworkEnvType } from '_src/shared/api-env'; import type { AppThunkConfig } from '_store/thunk-extras'; -import { getDefaultNetwork, type Network } from '@iota/iota.js/client'; +import { getDefaultNetwork, type Network } from '@iota/iota-sdk/client'; import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; diff --git a/apps/wallet/src/ui/app/redux/slices/iota-objects/Coin.ts b/apps/wallet/src/ui/app/redux/slices/iota-objects/Coin.ts index 08d9d2e961a..8f0fdf452b8 100644 --- a/apps/wallet/src/ui/app/redux/slices/iota-objects/Coin.ts +++ b/apps/wallet/src/ui/app/redux/slices/iota-objects/Coin.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaMoveObject, IotaObjectData } from '@iota/iota.js/client'; +import type { IotaMoveObject, IotaObjectData } from '@iota/iota-sdk/client'; const COIN_TYPE = '0x2::coin::Coin'; const COIN_TYPE_ARG_REGEX = /^0x2::coin::Coin<(.+)>$/; diff --git a/apps/wallet/src/ui/app/redux/slices/transaction-requests/index.ts b/apps/wallet/src/ui/app/redux/slices/transaction-requests/index.ts index 2df8b2b3899..6529dd9906b 100644 --- a/apps/wallet/src/ui/app/redux/slices/transaction-requests/index.ts +++ b/apps/wallet/src/ui/app/redux/slices/transaction-requests/index.ts @@ -11,9 +11,9 @@ import { type WalletSigner, } from '_src/ui/app/WalletSigner'; import type { AppThunkConfig } from '_store/thunk-extras'; -import { type IotaTransactionBlockResponse } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64 } from '@iota/iota.js/utils'; +import { type IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64 } from '@iota/iota-sdk/utils'; import { createAsyncThunk, createEntityAdapter, createSlice } from '@reduxjs/toolkit'; import type { PayloadAction } from '@reduxjs/toolkit'; diff --git a/apps/wallet/src/ui/app/shared/coin-balance/index.tsx b/apps/wallet/src/ui/app/shared/coin-balance/index.tsx index 98286442076..fbfa8c2cfed 100644 --- a/apps/wallet/src/ui/app/shared/coin-balance/index.tsx +++ b/apps/wallet/src/ui/app/shared/coin-balance/index.tsx @@ -4,7 +4,7 @@ import { Text } from '_app/shared/text'; import { useFormatCoin } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; //TODO create variant for different use cases like heading4, subtitle, bodySmall and different symbols color interface CoinBalanceProps { diff --git a/apps/wallet/src/ui/app/shared/faucet/FaucetMessageInfo.tsx b/apps/wallet/src/ui/app/shared/faucet/FaucetMessageInfo.tsx index 90199378a53..ec16ac3e486 100644 --- a/apps/wallet/src/ui/app/shared/faucet/FaucetMessageInfo.tsx +++ b/apps/wallet/src/ui/app/shared/faucet/FaucetMessageInfo.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { useFormatCoin } from '@iota/core'; export interface FaucetMessageInfoProps { diff --git a/apps/wallet/src/ui/app/shared/faucet/FaucetRequestButton.tsx b/apps/wallet/src/ui/app/shared/faucet/FaucetRequestButton.tsx index 6105d7daf9a..4b869cebbe1 100644 --- a/apps/wallet/src/ui/app/shared/faucet/FaucetRequestButton.tsx +++ b/apps/wallet/src/ui/app/shared/faucet/FaucetRequestButton.tsx @@ -5,8 +5,8 @@ import { Button, type ButtonProps } from '_app/shared/ButtonUI'; import { useAppSelector } from '_hooks'; import { getCustomNetwork } from '_src/shared/api-env'; -import { getNetwork } from '@iota/iota.js/client'; -import { FaucetRateLimitError } from '@iota/iota.js/faucet'; +import { getNetwork } from '@iota/iota-sdk/client'; +import { FaucetRateLimitError } from '@iota/iota-sdk/faucet'; import { toast } from 'react-hot-toast'; import FaucetMessageInfo from './FaucetMessageInfo'; diff --git a/apps/wallet/src/ui/app/shared/faucet/useFaucetMutation.ts b/apps/wallet/src/ui/app/shared/faucet/useFaucetMutation.ts index 32da7ad44f8..527c780e200 100644 --- a/apps/wallet/src/ui/app/shared/faucet/useFaucetMutation.ts +++ b/apps/wallet/src/ui/app/shared/faucet/useFaucetMutation.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFaucetRequestStatus, requestIotaFromFaucetV1 } from '@iota/iota.js/faucet'; +import { getFaucetRequestStatus, requestIotaFromFaucetV1 } from '@iota/iota-sdk/faucet'; import { useIsMutating, useMutation, type UseMutationOptions } from '@tanstack/react-query'; import { useActiveAccount } from '../../hooks/useActiveAccount'; diff --git a/apps/wallet/src/ui/app/shared/header/Header.tsx b/apps/wallet/src/ui/app/shared/header/Header.tsx index dd12650769e..39f71b9d4c4 100644 --- a/apps/wallet/src/ui/app/shared/header/Header.tsx +++ b/apps/wallet/src/ui/app/shared/header/Header.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type Network } from '@iota/iota.js/client'; +import { type Network } from '@iota/iota-sdk/client'; import { type ReactNode } from 'react'; import { Link } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx index e33fcafcce0..40ec8a9d164 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx @@ -5,7 +5,7 @@ import ExplorerLink from '_src/ui/app/components/explorer-link'; import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; import { useActiveAddress } from '_src/ui/app/hooks'; import { useFormatCoin, type GasSummaryType } from '@iota/core'; -import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Text } from '../../text'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx index 78beadc60d3..ddba829c3e0 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx @@ -13,7 +13,7 @@ import { type IotaObjectChangeWithDisplay, } from '@iota/core'; import { ChevronDown12, ChevronRight12 } from '@iota/icons'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import cx from 'clsx'; import { ExpandableList } from '../../ExpandableList'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx index 38cc0b9f66c..42f4016e053 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx @@ -6,7 +6,7 @@ import ExplorerLink from '_src/ui/app/components/explorer-link'; import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; import { NftImage } from '_src/ui/app/components/nft-display/NftImage'; import { type IotaObjectChangeWithDisplay } from '@iota/core'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Text } from '../../../text'; diff --git a/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx b/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx index 1b1f25d6216..461b0d8597d 100644 --- a/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx +++ b/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx @@ -24,8 +24,8 @@ import { } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { ArrowLeft16, StakeAdd16, StakeRemove16 } from '@iota/icons'; -import { Network, type StakeObject } from '@iota/iota.js/client'; -import { MICROS_PER_IOTA, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { Network, type StakeObject } from '@iota/iota-sdk/client'; +import { MICROS_PER_IOTA, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import BigNumber from 'bignumber.js'; import { useMemo } from 'react'; diff --git a/apps/wallet/src/ui/app/staking/getAllStakeIota.ts b/apps/wallet/src/ui/app/staking/getAllStakeIota.ts index 451028d52f0..3f59e2a5a67 100644 --- a/apps/wallet/src/ui/app/staking/getAllStakeIota.ts +++ b/apps/wallet/src/ui/app/staking/getAllStakeIota.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type DelegatedStake } from '@iota/iota.js/client'; +import { type DelegatedStake } from '@iota/iota-sdk/client'; // Get staked Iota export function getAllStakeIota(allDelegation: DelegatedStake[]) { diff --git a/apps/wallet/src/ui/app/staking/getDelegationByStakeId.ts b/apps/wallet/src/ui/app/staking/getDelegationByStakeId.ts index 8378cb44469..e6b5b740afd 100644 --- a/apps/wallet/src/ui/app/staking/getDelegationByStakeId.ts +++ b/apps/wallet/src/ui/app/staking/getDelegationByStakeId.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { DelegatedStake } from '@iota/iota.js/client'; +import type { DelegatedStake } from '@iota/iota-sdk/client'; // Helper function to get the delegation by stakedIotaId export function getDelegationDataByStakeId( diff --git a/apps/wallet/src/ui/app/staking/getStakeIotaByIotaId.ts b/apps/wallet/src/ui/app/staking/getStakeIotaByIotaId.ts index 75597ea1c30..5bdaa2a01ee 100644 --- a/apps/wallet/src/ui/app/staking/getStakeIotaByIotaId.ts +++ b/apps/wallet/src/ui/app/staking/getStakeIotaByIotaId.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type DelegatedStake } from '@iota/iota.js/client'; +import { type DelegatedStake } from '@iota/iota-sdk/client'; // Get Stake IOTA by stakeIotaId export function getStakeIotaByIotaId(allDelegation: DelegatedStake[], stakeIotaId?: string | null) { diff --git a/apps/wallet/src/ui/app/staking/getTokenStakeIotaForValidator.ts b/apps/wallet/src/ui/app/staking/getTokenStakeIotaForValidator.ts index 09a79403648..95b5b8ff831 100644 --- a/apps/wallet/src/ui/app/staking/getTokenStakeIotaForValidator.ts +++ b/apps/wallet/src/ui/app/staking/getTokenStakeIotaForValidator.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { type DelegatedStake } from '@iota/iota.js/client'; +import { type DelegatedStake } from '@iota/iota-sdk/client'; // Get total Stake IOTA for a specific validator address export function getTokenStakeIotaForValidator( diff --git a/apps/wallet/src/ui/app/staking/home/StakeAmount.tsx b/apps/wallet/src/ui/app/staking/home/StakeAmount.tsx index 5a0eb00027d..037d13762fd 100644 --- a/apps/wallet/src/ui/app/staking/home/StakeAmount.tsx +++ b/apps/wallet/src/ui/app/staking/home/StakeAmount.tsx @@ -5,7 +5,7 @@ import { Heading } from '_app/shared/heading'; import { Text } from '_app/shared/text'; import { useFormatCoin } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; //TODO unify StakeAmount and CoinBalance interface StakeAmountProps { diff --git a/apps/wallet/src/ui/app/staking/home/StakedCard.tsx b/apps/wallet/src/ui/app/staking/home/StakedCard.tsx index 64de3508493..e07059d1539 100644 --- a/apps/wallet/src/ui/app/staking/home/StakedCard.tsx +++ b/apps/wallet/src/ui/app/staking/home/StakedCard.tsx @@ -11,7 +11,7 @@ import { useGetTimeBeforeEpochNumber, type ExtendedDelegatedStake, } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { cva, cx, type VariantProps } from 'class-variance-authority'; import type { ReactNode } from 'react'; import { Link } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx b/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx index b27cca25f42..0e24e25166b 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx @@ -24,8 +24,8 @@ import { } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { ArrowLeft16 } from '@iota/icons'; -import type { StakeObject } from '@iota/iota.js/client'; -import { MICROS_PER_IOTA, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import type { StakeObject } from '@iota/iota-sdk/client'; +import { MICROS_PER_IOTA, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; // import * as Sentry from '@sentry/react'; import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Formik } from 'formik'; diff --git a/apps/wallet/src/ui/app/staking/stake/UnstakeForm.tsx b/apps/wallet/src/ui/app/staking/stake/UnstakeForm.tsx index e99c723689f..d02952eb831 100644 --- a/apps/wallet/src/ui/app/staking/stake/UnstakeForm.tsx +++ b/apps/wallet/src/ui/app/staking/stake/UnstakeForm.tsx @@ -6,7 +6,7 @@ import { Card } from '_app/shared/card'; import { Text } from '_app/shared/text'; import { CountDownTimer } from '_src/ui/app/shared/countdown-timer'; import { createUnstakeTransaction, useFormatCoin, useGetTimeBeforeEpochNumber } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; +import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; import { Form } from 'formik'; import { useMemo } from 'react'; diff --git a/apps/wallet/src/ui/app/staking/validators/ValidatorLogo.tsx b/apps/wallet/src/ui/app/staking/validators/ValidatorLogo.tsx index 71f37a3241b..003c1b9b335 100644 --- a/apps/wallet/src/ui/app/staking/validators/ValidatorLogo.tsx +++ b/apps/wallet/src/ui/app/staking/validators/ValidatorLogo.tsx @@ -6,7 +6,7 @@ import { ImageIcon } from '_app/shared/image-icon'; import { Text } from '_app/shared/text'; import { Badge } from '_src/ui/app/shared/Badge'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import cl from 'clsx'; import { useMemo } from 'react'; diff --git a/apps/wallet/tests/demo-app/src/index.tsx b/apps/wallet/tests/demo-app/src/index.tsx index d36f3fa56b1..5925bc9c369 100644 --- a/apps/wallet/tests/demo-app/src/index.tsx +++ b/apps/wallet/tests/demo-app/src/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { type IotaWallet } from '_src/dapp-interface/WalletStandardInterface'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { getWallets, ReadonlyWalletAccount, type Wallet } from '@iota/wallet-standard'; import { useEffect, useState } from 'react'; import ReactDOM from 'react-dom/client'; diff --git a/apps/wallet/tests/utils/localnet.ts b/apps/wallet/tests/utils/localnet.ts index c8db4407a1f..d47e680d5c0 100644 --- a/apps/wallet/tests/utils/localnet.ts +++ b/apps/wallet/tests/utils/localnet.ts @@ -4,8 +4,8 @@ import 'tsconfig-paths/register'; -import { requestIotaFromFaucetV0 } from '@iota/iota.js/faucet'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import { requestIotaFromFaucetV0 } from '@iota/iota-sdk/faucet'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; import * as bip39 from '@scure/bip39'; import { wordlist } from '@scure/bip39/wordlists/english'; diff --git a/dapps/kiosk-cli/index.js b/dapps/kiosk-cli/index.js index 04f90a967ee..b57ab3435d0 100644 --- a/dapps/kiosk-cli/index.js +++ b/dapps/kiosk-cli/index.js @@ -31,13 +31,13 @@ import { isValidIotaAddress, isValidIotaObjectId, MICROS_PER_IOTA, -} from '@iota/iota.js/utils'; -import { bcs } from '@iota/iota.js/bcs'; +} from '@iota/iota-sdk/utils'; +import { bcs } from '@iota/iota-sdk/bcs'; import { program } from 'commander'; import { KIOSK_LISTING, KioskClient, KioskTransaction, Network } from '@iota/kiosk'; -import { IotaClient, getFullnodeUrl } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaClient, getFullnodeUrl } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; /** * List of known types for shorthand search in the `search` command. diff --git a/dapps/kiosk-cli/package.json b/dapps/kiosk-cli/package.json index 74fddd43f09..5a2472241b1 100644 --- a/dapps/kiosk-cli/package.json +++ b/dapps/kiosk-cli/package.json @@ -15,7 +15,7 @@ "trailingComma": "all" }, "dependencies": { - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/kiosk": "workspace:*", "commander": "^11.0.0" } diff --git a/dapps/kiosk/package.json b/dapps/kiosk/package.json index 43d39161d15..5487c48dd25 100644 --- a/dapps/kiosk/package.json +++ b/dapps/kiosk/package.json @@ -18,7 +18,7 @@ "dependencies": { "@headlessui/react": "^1.7.15", "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/kiosk": "workspace:*", "@tanstack/react-query": "^5.0.0", "clsx": "^2.0.0", diff --git a/dapps/kiosk/src/Root.tsx b/dapps/kiosk/src/Root.tsx index 3507655cccc..031e5bdf8e2 100644 --- a/dapps/kiosk/src/Root.tsx +++ b/dapps/kiosk/src/Root.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Toaster } from 'react-hot-toast'; import { Outlet } from 'react-router-dom'; diff --git a/dapps/kiosk/src/components/Kiosk/FindKiosk.tsx b/dapps/kiosk/src/components/Kiosk/FindKiosk.tsx index 36b74d55a22..3fda7a57c40 100644 --- a/dapps/kiosk/src/components/Kiosk/FindKiosk.tsx +++ b/dapps/kiosk/src/components/Kiosk/FindKiosk.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import classnames from 'clsx'; import { ChangeEvent, FormEvent, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; diff --git a/dapps/kiosk/src/components/Kiosk/KioskData.tsx b/dapps/kiosk/src/components/Kiosk/KioskData.tsx index df384a555ff..10f39f0b1e5 100644 --- a/dapps/kiosk/src/components/Kiosk/KioskData.tsx +++ b/dapps/kiosk/src/components/Kiosk/KioskData.tsx @@ -4,7 +4,7 @@ import { Tab } from '@headlessui/react'; import { useCurrentAccount } from '@iota/dapp-kit'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { useQueryClient } from '@tanstack/react-query'; import { toast } from 'react-hot-toast'; diff --git a/dapps/kiosk/src/components/Kiosk/KioskItems.tsx b/dapps/kiosk/src/components/Kiosk/KioskItems.tsx index f9306a1cf73..9bcd3da1152 100644 --- a/dapps/kiosk/src/components/Kiosk/KioskItems.tsx +++ b/dapps/kiosk/src/components/Kiosk/KioskItems.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useCurrentAccount } from '@iota/dapp-kit'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import { useEffect, useState } from 'react'; import { toast } from 'react-hot-toast'; import { useLocation, useNavigate } from 'react-router-dom'; diff --git a/dapps/kiosk/src/components/Kiosk/KioskSelector.tsx b/dapps/kiosk/src/components/Kiosk/KioskSelector.tsx index a7cc0605257..3f1f2e8b5bc 100644 --- a/dapps/kiosk/src/components/Kiosk/KioskSelector.tsx +++ b/dapps/kiosk/src/components/Kiosk/KioskSelector.tsx @@ -4,7 +4,7 @@ import { Listbox, Transition } from '@headlessui/react'; import { KioskOwnerCap } from '@iota/kiosk'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import classNames from 'clsx'; import { Fragment } from 'react'; diff --git a/dapps/kiosk/src/components/Modals/ListPrice.tsx b/dapps/kiosk/src/components/Modals/ListPrice.tsx index fd2f7b2916c..429a8e33229 100644 --- a/dapps/kiosk/src/components/Modals/ListPrice.tsx +++ b/dapps/kiosk/src/components/Modals/ListPrice.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { MICROS_PER_IOTA } from '@iota/iota.js/utils'; +import { MICROS_PER_IOTA } from '@iota/iota-sdk/utils'; import { useState } from 'react'; import { usePlaceAndListMutation } from '../../mutations/kiosk'; diff --git a/dapps/kiosk/src/context/KioskClientContext.tsx b/dapps/kiosk/src/context/KioskClientContext.tsx index d4ecbe49b55..97690aa2698 100644 --- a/dapps/kiosk/src/context/KioskClientContext.tsx +++ b/dapps/kiosk/src/context/KioskClientContext.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { Network } from '@iota/iota.js/client'; +import { Network } from '@iota/iota-sdk/client'; import { KioskClient } from '@iota/kiosk'; import { createContext, ReactNode, useContext, useMemo } from 'react'; diff --git a/dapps/kiosk/src/hooks/kiosk.ts b/dapps/kiosk/src/hooks/kiosk.ts index a031088a2bf..2e4bfff6d3c 100644 --- a/dapps/kiosk/src/hooks/kiosk.ts +++ b/dapps/kiosk/src/hooks/kiosk.ts @@ -12,7 +12,7 @@ import { KioskListing, KioskOwnerCap, } from '@iota/kiosk'; -import { IotaObjectResponse } from '@iota/iota.js/client'; +import { IotaObjectResponse } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { OwnedObjectType } from '../components/Inventory/OwnedObjects'; diff --git a/dapps/kiosk/src/hooks/useOwnedObjects.ts b/dapps/kiosk/src/hooks/useOwnedObjects.ts index 535b2675978..2b897cd5d48 100644 --- a/dapps/kiosk/src/hooks/useOwnedObjects.ts +++ b/dapps/kiosk/src/hooks/useOwnedObjects.ts @@ -4,7 +4,7 @@ /* eslint-disable @tanstack/query/exhaustive-deps */ import { useIotaClient } from '@iota/dapp-kit'; -import { PaginatedObjectsResponse } from '@iota/iota.js/client'; +import { PaginatedObjectsResponse } from '@iota/iota-sdk/client'; import { useQuery } from '@tanstack/react-query'; import { TANSTACK_OWNED_OBJECTS_KEY } from '../utils/constants'; diff --git a/dapps/kiosk/src/hooks/useTransactionExecution.ts b/dapps/kiosk/src/hooks/useTransactionExecution.ts index 5e1f9c2a2d4..fa1829dfc52 100644 --- a/dapps/kiosk/src/hooks/useTransactionExecution.ts +++ b/dapps/kiosk/src/hooks/useTransactionExecution.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useSignTransactionBlock, useIotaClient } from '@iota/dapp-kit'; -import { IotaTransactionBlockResponseOptions } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaTransactionBlockResponseOptions } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // A helper to execute transactions by: // 1. Signing them using the wallet diff --git a/dapps/kiosk/src/mutations/kiosk.ts b/dapps/kiosk/src/mutations/kiosk.ts index 73b9e7dafeb..5f1d4d64ae2 100644 --- a/dapps/kiosk/src/mutations/kiosk.ts +++ b/dapps/kiosk/src/mutations/kiosk.ts @@ -4,7 +4,7 @@ import { useCurrentAccount } from '@iota/dapp-kit'; import { Kiosk, KioskTransaction } from '@iota/kiosk'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMutation } from '@tanstack/react-query'; import { toast } from 'react-hot-toast'; diff --git a/dapps/kiosk/src/utils/utils.ts b/dapps/kiosk/src/utils/utils.ts index cca37a41487..ad9d054b4e1 100644 --- a/dapps/kiosk/src/utils/utils.ts +++ b/dapps/kiosk/src/utils/utils.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { KioskListing, KioskOwnerCap } from '@iota/kiosk'; -import { IotaObjectResponse } from '@iota/iota.js/client'; -import { MICROS_PER_IOTA, normalizeIotaAddress } from '@iota/iota.js/utils'; +import { IotaObjectResponse } from '@iota/iota-sdk/client'; +import { MICROS_PER_IOTA, normalizeIotaAddress } from '@iota/iota-sdk/utils'; // Parse the display of a list of objects into a simple {object_id: display} map // to use throughout the app. diff --git a/dapps/multisig-toolkit/package.json b/dapps/multisig-toolkit/package.json index 920ced6f5b7..8792a1f351f 100644 --- a/dapps/multisig-toolkit/package.json +++ b/dapps/multisig-toolkit/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@tailwindcss/forms": "^0.5.4", "@types/react": "^18.3.3", "@types/react-dom": "^18.2.7", diff --git a/dapps/multisig-toolkit/src/components/connect.tsx b/dapps/multisig-toolkit/src/components/connect.tsx index 6a6a848ff14..1b9d14be3d6 100644 --- a/dapps/multisig-toolkit/src/components/connect.tsx +++ b/dapps/multisig-toolkit/src/components/connect.tsx @@ -9,7 +9,7 @@ import { useDisconnectWallet, useSwitchAccount, } from '@iota/dapp-kit'; -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import { Check, ChevronsUpDown } from 'lucide-react'; import { useState } from 'react'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/EffectsPreview.tsx b/dapps/multisig-toolkit/src/components/preview-effects/EffectsPreview.tsx index 465ea08dcf8..9e8a0749c0c 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/EffectsPreview.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/EffectsPreview.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { DryRunTransactionBlockResponse } from '@iota/iota.js/src/client'; +import { DryRunTransactionBlockResponse } from '@iota/iota-sdk/src/client'; import * as Tabs from '@radix-ui/react-tabs'; import { useState } from 'react'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx b/dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx index 5d8e383b1da..0012aa49169 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import { useIotaClientContext } from '@iota/dapp-kit'; -import { ObjectOwner, IotaObjectChange } from '@iota/iota.js/src/client'; +import { ObjectOwner, IotaObjectChange } from '@iota/iota-sdk/src/client'; import { CheckIcon, CopyIcon } from 'lucide-react'; import { useState } from 'react'; import toast from 'react-hot-toast'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/PreviewCard.tsx b/dapps/multisig-toolkit/src/components/preview-effects/PreviewCard.tsx index ba855d8613f..6506ed3ef01 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/PreviewCard.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/PreviewCard.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ObjectOwner } from '@iota/iota.js/src/client'; +import { ObjectOwner } from '@iota/iota-sdk/src/client'; import { ReactNode } from 'react'; import { ObjectLink } from './ObjectLink'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/BalanceChanges.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/BalanceChanges.tsx index 2b4d4304db7..7579f22ad6d 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/BalanceChanges.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/BalanceChanges.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClientQuery } from '@iota/dapp-kit'; -import { type BalanceChange } from '@iota/iota.js/src/client'; +import { type BalanceChange } from '@iota/iota-sdk/src/client'; import { PreviewCard } from '../PreviewCard'; import { onChainAmountToFloat } from '../utils'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/Events.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/Events.tsx index 8fe1cd3871d..ae0b847f9d1 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/Events.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/Events.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaEvent } from '@iota/iota.js/src/client'; +import { IotaEvent } from '@iota/iota-sdk/src/client'; import { ReactNode } from 'react'; import { Textarea } from '@/components/ui/textarea'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/ObjectChanges.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/ObjectChanges.tsx index 63ef38f7c39..a6f02502a03 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/ObjectChanges.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/ObjectChanges.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectChange } from '@iota/iota.js/src/client'; +import { IotaObjectChange } from '@iota/iota-sdk/src/client'; import { ObjectLink } from '../ObjectLink'; import { PreviewCard } from '../PreviewCard'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx index 102e686d84b..1e6819e271f 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClientContext } from '@iota/dapp-kit'; -import { DryRunTransactionBlockResponse, GasCostSummary } from '@iota/iota.js/src/client'; +import { DryRunTransactionBlockResponse, GasCostSummary } from '@iota/iota-sdk/src/client'; import { ReactNode } from 'react'; import { ObjectLink } from '../ObjectLink'; diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/Transactions.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/Transactions.tsx index a7205a0629c..b4a4cfedd45 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/Transactions.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/Transactions.tsx @@ -7,7 +7,7 @@ import { IotaCallArg, IotaTransaction, TransactionBlockData, -} from '@iota/iota.js/src/client'; +} from '@iota/iota-sdk/src/client'; import { ReactNode } from 'react'; import { ObjectLink } from '../ObjectLink'; diff --git a/dapps/multisig-toolkit/src/main.tsx b/dapps/multisig-toolkit/src/main.tsx index 573b90f8c7d..1b92dd9d56e 100644 --- a/dapps/multisig-toolkit/src/main.tsx +++ b/dapps/multisig-toolkit/src/main.tsx @@ -8,7 +8,7 @@ import '@fontsource-variable/inter'; import '@fontsource-variable/red-hat-mono'; import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClientProvider } from '@tanstack/react-query'; import React from 'react'; import ReactDOM from 'react-dom/client'; diff --git a/dapps/multisig-toolkit/src/routes/combine-sigs.tsx b/dapps/multisig-toolkit/src/routes/combine-sigs.tsx index 11b653a387d..d48c2f0d0a4 100644 --- a/dapps/multisig-toolkit/src/routes/combine-sigs.tsx +++ b/dapps/multisig-toolkit/src/routes/combine-sigs.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { PublicKey, SerializedSignature } from '@iota/iota.js/cryptography'; -import { MultiSigPublicKey, publicKeyFromIotaBytes } from '@iota/iota.js/multisig'; +import { PublicKey, SerializedSignature } from '@iota/iota-sdk/cryptography'; +import { MultiSigPublicKey, publicKeyFromIotaBytes } from '@iota/iota-sdk/multisig'; import { useState } from 'react'; import { FieldValues, useFieldArray, useForm } from 'react-hook-form'; diff --git a/dapps/multisig-toolkit/src/routes/execute-transaction.tsx b/dapps/multisig-toolkit/src/routes/execute-transaction.tsx index 200065b8f50..87716ea56f9 100644 --- a/dapps/multisig-toolkit/src/routes/execute-transaction.tsx +++ b/dapps/multisig-toolkit/src/routes/execute-transaction.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { parseSerializedSignature } from '@iota/iota.js/cryptography'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { parseSerializedSignature } from '@iota/iota-sdk/cryptography'; import { useMutation } from '@tanstack/react-query'; import { AlertCircle } from 'lucide-react'; import { useState } from 'react'; diff --git a/dapps/multisig-toolkit/src/routes/multisig-address.tsx b/dapps/multisig-toolkit/src/routes/multisig-address.tsx index 7da79c6ea15..8089004eb91 100644 --- a/dapps/multisig-toolkit/src/routes/multisig-address.tsx +++ b/dapps/multisig-toolkit/src/routes/multisig-address.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { PublicKey } from '@iota/iota.js/cryptography'; -import { MultiSigPublicKey, publicKeyFromIotaBytes } from '@iota/iota.js/multisig'; +import { PublicKey } from '@iota/iota-sdk/cryptography'; +import { MultiSigPublicKey, publicKeyFromIotaBytes } from '@iota/iota-sdk/multisig'; import { useState } from 'react'; import { FieldValues, useFieldArray, useForm } from 'react-hook-form'; diff --git a/dapps/multisig-toolkit/src/routes/offline-signer.tsx b/dapps/multisig-toolkit/src/routes/offline-signer.tsx index a6044ca0e8a..8feb6137d62 100644 --- a/dapps/multisig-toolkit/src/routes/offline-signer.tsx +++ b/dapps/multisig-toolkit/src/routes/offline-signer.tsx @@ -8,7 +8,7 @@ import { useIotaClient, useIotaClientContext, } from '@iota/dapp-kit'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { useMutation } from '@tanstack/react-query'; import { AlertCircle, Terminal } from 'lucide-react'; import { useEffect, useState } from 'react'; diff --git a/dapps/multisig-toolkit/src/routes/signature-analyzer.tsx b/dapps/multisig-toolkit/src/routes/signature-analyzer.tsx index 6b1b963707b..88eb350d958 100644 --- a/dapps/multisig-toolkit/src/routes/signature-analyzer.tsx +++ b/dapps/multisig-toolkit/src/routes/signature-analyzer.tsx @@ -2,10 +2,10 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { parseSerializedSignature, PublicKey, SignatureScheme } from '@iota/iota.js/cryptography'; -import { parsePartialSignatures } from '@iota/iota.js/multisig'; -import { toB64 } from '@iota/iota.js/utils'; -import { publicKeyFromRawBytes } from '@iota/iota.js/verify'; +import { parseSerializedSignature, PublicKey, SignatureScheme } from '@iota/iota-sdk/cryptography'; +import { parsePartialSignatures } from '@iota/iota-sdk/multisig'; +import { toB64 } from '@iota/iota-sdk/utils'; +import { publicKeyFromRawBytes } from '@iota/iota-sdk/verify'; import { AlertCircle } from 'lucide-react'; import { useState } from 'react'; diff --git a/dapps/sponsored-transactions/package.json b/dapps/sponsored-transactions/package.json index 2e6874b9a3d..837cb14e6e8 100644 --- a/dapps/sponsored-transactions/package.json +++ b/dapps/sponsored-transactions/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@types/react": "^18.3.3", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", diff --git a/dapps/sponsored-transactions/src/App.tsx b/dapps/sponsored-transactions/src/App.tsx index c4f96b22676..ec44f452597 100644 --- a/dapps/sponsored-transactions/src/App.tsx +++ b/dapps/sponsored-transactions/src/App.tsx @@ -8,8 +8,8 @@ import { useSignTransactionBlock, useIotaClient, } from '@iota/dapp-kit'; -import { IotaTransactionBlockResponse } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaTransactionBlockResponse } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { ComponentProps, ReactNode, useMemo, useState } from 'react'; import { sponsorTransaction } from './utils/sponsorTransaction'; diff --git a/dapps/sponsored-transactions/src/main.tsx b/dapps/sponsored-transactions/src/main.tsx index e12e71d7022..44d75271575 100644 --- a/dapps/sponsored-transactions/src/main.tsx +++ b/dapps/sponsored-transactions/src/main.tsx @@ -12,7 +12,7 @@ import { App } from './App'; import '@iota/dapp-kit/dist/index.css'; import './index.css'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; const queryClient = new QueryClient(); diff --git a/dapps/sponsored-transactions/src/utils/rpc.ts b/dapps/sponsored-transactions/src/utils/rpc.ts index 949a4ef3c9e..e9344291df5 100644 --- a/dapps/sponsored-transactions/src/utils/rpc.ts +++ b/dapps/sponsored-transactions/src/utils/rpc.ts @@ -2,6 +2,6 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; export const client = new IotaClient({ url: getFullnodeUrl('testnet') }); diff --git a/dapps/sponsored-transactions/src/utils/sponsorTransaction.ts b/dapps/sponsored-transactions/src/utils/sponsorTransaction.ts index 168c4c02b68..cda59ecabd1 100644 --- a/dapps/sponsored-transactions/src/utils/sponsorTransaction.ts +++ b/dapps/sponsored-transactions/src/utils/sponsorTransaction.ts @@ -2,10 +2,10 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectRef } from '@iota/iota.js/client'; -import { getFaucetHost, requestIotaFromFaucetV1 } from '@iota/iota.js/faucet'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaObjectRef } from '@iota/iota-sdk/client'; +import { getFaucetHost, requestIotaFromFaucetV1 } from '@iota/iota-sdk/faucet'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { client } from './rpc'; diff --git a/docs/content/developer/advanced/iota-repository.mdx b/docs/content/developer/advanced/iota-repository.mdx index 6d6102eb586..d35727be8cc 100644 --- a/docs/content/developer/advanced/iota-repository.mdx +++ b/docs/content/developer/advanced/iota-repository.mdx @@ -1,6 +1,9 @@ --- description: "A guide to familiarizing yourself with the IOTA repository, including branch and network structure." -tags: [ environment setup, repository ] +tags: + - explanation + - repository + - crates --- # The IOTA Repository diff --git a/docs/content/developer/exchange-integration/exchange-integration.mdx b/docs/content/developer/exchange-integration/exchange-integration.mdx index f6b4a6e1feb..3e657fb921e 100644 --- a/docs/content/developer/exchange-integration/exchange-integration.mdx +++ b/docs/content/developer/exchange-integration/exchange-integration.mdx @@ -73,7 +73,7 @@ println!("Address: 0x{}", iota_address_string); This example generates a new address with the TypeScript SDK: ```ts -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; const keypair = new Ed25519Keypair(); const address = keypair.getPublicKey().toIotaAddress(); @@ -159,7 +159,7 @@ async fn main() -> Result<(), anyhow::Error> { This example does the same with TypeScript: ```ts -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const iotaClient = new IotaClient({ url: getFullnodeUrl('devnet') }); diff --git a/docs/content/developer/getting-started/connect.mdx b/docs/content/developer/getting-started/connect.mdx index 893ef38b158..acdb2ddc275 100644 --- a/docs/content/developer/getting-started/connect.mdx +++ b/docs/content/developer/getting-started/connect.mdx @@ -1,6 +1,6 @@ --- description: Guide to connecting to an IOTA network for development and production. -tags: [ network, development, Mainnet, Testnet, Devnet ] +tags: [ explanation, mainnet, testnet, devnet, cli, setup, install, getting-started ] --- import DataWipe from "../../_snippets/data-wipe.mdx"; diff --git a/docs/content/developer/getting-started/first-app/client-tssdk.mdx b/docs/content/developer/getting-started/first-app/client-tssdk.mdx index 0c6f4ef64b1..90c0a3840d8 100644 --- a/docs/content/developer/getting-started/first-app/client-tssdk.mdx +++ b/docs/content/developer/getting-started/first-app/client-tssdk.mdx @@ -21,7 +21,7 @@ yarn create @iota/dapp --template react-client-dapp ## What is the IOTA TypeScript SDK? -The IOTA TypeScript SDK (@iota/iota.js) provides all the low-level functionality needed to interact with IOTA ecosystem from TypeScript. You can use it in any TypeScript or JavaScript project, including web apps, Node.js apps, or mobile apps written with tools like React Native that support TypeScript. +The IOTA TypeScript SDK (@iota/iota-sdk) provides all the low-level functionality needed to interact with IOTA ecosystem from TypeScript. You can use it in any TypeScript or JavaScript project, including web apps, Node.js apps, or mobile apps written with tools like React Native that support TypeScript. For more information on the IOTA TypeScript SDK, see the [IOTA TypeScript SDK documentation](../../../references/ts-sdk/typescript/index.mdx). @@ -42,7 +42,7 @@ npm init vite Now that you have a React app, you can install the necessary dependencies to use dApp Kit: ```bash npm2yarn -npm install @iota/iota.js @iota/dapp-kit @tanstack/react-query +npm install @iota/iota-sdk @iota/dapp-kit @tanstack/react-query ``` :::info Local version of the SDK @@ -74,11 +74,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render( ``` -Next, set up the `IOTAClientProvider`. This `Provider` delivers a `IOTAClient` instance from `@iota/iota.js` to all the hooks in dApp Kit. This provider manages which network dApp Kit connects to, and can accept configuration for multiple networks. This exercise connects to `devnet`. +Next, set up the `IOTAClientProvider`. This `Provider` delivers a `IOTAClient` instance from `@iota/iota-sdk` to all the hooks in dApp Kit. This provider manages which network dApp Kit connects to, and can accept configuration for multiple networks. This exercise connects to `devnet`. ```ts import { IOTAClientProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); @@ -104,7 +104,7 @@ Finally, set up the `WalletProvider` from `@iota/dapp-kit`, and import styles fo import '@iota/dapp-kit/dist/index.css'; import { IOTAClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); diff --git a/docs/content/developer/getting-started/get-address.mdx b/docs/content/developer/getting-started/get-address.mdx index 7f23fa92257..cbaaa41a7b6 100644 --- a/docs/content/developer/getting-started/get-address.mdx +++ b/docs/content/developer/getting-started/get-address.mdx @@ -1,6 +1,9 @@ --- description: Guide to creating an IOTA address for accounts and transactions. -tags: [ address, account, CLI, wallet] +tags: + - explanation + - cli + - address --- # Create an Address diff --git a/docs/content/developer/getting-started/get-coins.mdx b/docs/content/developer/getting-started/get-coins.mdx index 8c949e657a4..7e9972a6241 100644 --- a/docs/content/developer/getting-started/get-coins.mdx +++ b/docs/content/developer/getting-started/get-coins.mdx @@ -1,6 +1,6 @@ --- description: Get test IOTA tokens using the IOTA CLI, SDK, or cURL. -tags: [test tokens, faucet, CLI, cURL, TypeScript SDK] +tags: [how-to, cli, typescript, sdk, faucet] --- import AlphaNet from "../../_snippets/alphanet.mdx"; @@ -52,7 +52,7 @@ You can also get tokens from your [local faucet](local-network.mdx#use-the-local You can also access the faucet using the IOTA TypeScript-SDK, as shown in the example below: ```typescript -import { requestIOTAFromFaucetV0, getFaucetHost } from '@iota/iota.js/faucet'; +import { requestIOTAFromFaucetV0, getFaucetHost } from '@iota/iota-sdk/faucet'; // get tokens from the Devnet faucet server await requestIOTAFromFaucetV0({ diff --git a/docs/content/developer/getting-started/getting-started.mdx b/docs/content/developer/getting-started/getting-started.mdx index 40e9bd5a594..fc610bfa247 100644 --- a/docs/content/developer/getting-started/getting-started.mdx +++ b/docs/content/developer/getting-started/getting-started.mdx @@ -1,6 +1,10 @@ --- description: An introduction to getting started with IOTA Rebased development. -tags: [ IOTA, blockchain, development, setup, installation ] +tags: + - explanation + - getting-started + - setup + - install --- # Getting Started diff --git a/docs/content/developer/getting-started/iota-environment.mdx b/docs/content/developer/getting-started/iota-environment.mdx index 8d758620c62..3c3360d1cf9 100644 --- a/docs/content/developer/getting-started/iota-environment.mdx +++ b/docs/content/developer/getting-started/iota-environment.mdx @@ -1,6 +1,13 @@ --- description: "A guide to familiarizing yourself with the IOTA repository, branch and network structure, SDKs, CLI, and recommended IDEs and plugins." -tags: [ environment setup, repository, CLI, SDK, Move ] +tags: + - explanation + - setup + - cli + - sdk + - typescript + - rust + - move --- # Before You Start diff --git a/docs/content/developer/getting-started/iota-install.mdx b/docs/content/developer/getting-started/iota-install.mdx index 58d155c2673..d069f0d9591 100644 --- a/docs/content/developer/getting-started/iota-install.mdx +++ b/docs/content/developer/getting-started/iota-install.mdx @@ -1,13 +1,13 @@ --- title: Install IOTA description: Install the IOTA framework and required prerequisites on your system, including the IOTA command line interface to interact with the IOTA network. -tags: [ installation, setup, prerequisites, CLI ] +tags: [ how-to, cli, getting-started, install, setup ] --- import MacosDeps from "../../_snippets/macos-deps.mdx"; import LinuxDeps from "../../_snippets/linux-deps.mdx"; -In order to deploy your contracts and interact with the chains some tooling is required. IOTA Rebased has a excellent command-line tool that can be used for the most common tasks. +In order to deploy your contracts and interact with the chains some tooling is required. IOTA Rebased has an excellent command-line tool that can be used for the most common tasks. The simplest way to get up and running with IOTA is to [install the binary](#install-from-binaries) from the latest release available in the [IOTA Rebased GitHub Repository](https://github.com/iotaledger/iota/). Make sure to download diff --git a/docs/content/developer/getting-started/local-network.mdx b/docs/content/developer/getting-started/local-network.mdx index bedff5e5d07..6c74dae57d9 100644 --- a/docs/content/developer/getting-started/local-network.mdx +++ b/docs/content/developer/getting-started/local-network.mdx @@ -1,6 +1,6 @@ --- description: Guide to setting up and using a local IOTA network for development and testing. -tags: [ local network, development, testing, CLI, wallet, ts, sdk] +tags: [ how-to, install, setup, cli, typescript, sdk, testing ] --- # Local Development @@ -224,7 +224,7 @@ Before running the command, you must complete the `Prerequisites for Building Ap Run the following command from the `iota` root folder: ```bash -pnpm --filter @iota/iota.js test:e2e +pnpm --filter @iota/iota-sdk test:e2e ``` For additional information about example data for testing, see [https://github.com/iotaledger/iota/tree/develop/sdk/typescript#testing](https://github.com/iotaledger/iota/tree/develop/sdk/typescript#testing). @@ -255,4 +255,4 @@ To use the local built SDK in your project go to your project folder and execute pnpm add /sdk/typescript ``` -and the locally compiled version of `iota/iota.js` package will be installed for your application. +and the locally compiled version of `@iota/iota-sdk` package will be installed for your application. diff --git a/docs/content/developer/iota-101/iota-move-concepts/packages/custom-policies.mdx b/docs/content/developer/iota-101/iota-move-concepts/packages/custom-policies.mdx index 85d119b4470..2975bce309b 100644 --- a/docs/content/developer/iota-101/iota-move-concepts/packages/custom-policies.mdx +++ b/docs/content/developer/iota-101/iota-move-concepts/packages/custom-policies.mdx @@ -529,7 +529,7 @@ Create a new directory to store a Node.js project. You can use the `npm init` fu Open a terminal or console to the root of your Node.js project. Run the following command to add the IOTA TypeScript SDK as a dependency: ```bash -npm install @iota/iota.js +npm install @iota/iota-sdk ``` ### Publishing a package with custom policy {#publishing-custom-policy} @@ -552,8 +552,8 @@ import { readFileSync } from 'fs'; import { homedir } from 'os'; import path from 'path'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { fromB64 } from '@iota/iota.js/utils'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { fromB64 } from '@iota/iota-sdk/utils'; const sender = execSync(`${IOTA} client active-address`, { encoding: 'utf8' }).trim(); const signer = (() => { @@ -605,7 +605,7 @@ const { modules, dependencies } = JSON.parse( Next, construct the transaction to publish the package. Wrap its `UpgradeCap` in a "day of the week" policy, which permits upgrades on Tuesdays, and send the new policy back: ```js -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const tx = new TransactionBlock(); const packageUpgradeCap = tx.publish({ modules, dependencies }); @@ -623,7 +623,7 @@ tx.transferObjects([tuesdayUpgradeCap], tx.pure(sender)); And finally, execute that transaction and display its effects to the console. The following snippet assumes that you're running your examples against a local network. Pass `devnet`, `testnet`, or `mainnet` to the `getFullnodeUrl()` function to run on Devnet, Testnet, or Mainnet respectively: ```js -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('localnet')}) const result = await client.signAndExecuteTransactionBlock({ @@ -653,10 +653,10 @@ import { homedir } from 'os'; import path from 'path'; import { fileURLToPath } from 'url'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64 } from '@iota/iota.js/utils'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64 } from '@iota/iota-sdk/utils'; const IOTA = 'iota'; const POLICY_PACKAGE_ID = ''; @@ -903,10 +903,10 @@ import { homedir } from 'os'; import path from 'path'; import { fileURLToPath } from 'url'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock, UpgradePolicy } from '@iota/iota.js/transactions'; -import { fromB64 } from '@iota/iota.js/utils'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock, UpgradePolicy } from '@iota/iota-sdk/transactions'; +import { fromB64 } from '@iota/iota-sdk/utils'; const IOTA = 'iota'; const POLICY_PACKAGE_ID = ''; diff --git a/docs/content/developer/iota-101/transactions/ptb/building-ptb.mdx b/docs/content/developer/iota-101/transactions/ptb/building-ptb.mdx index 95a75b2ffce..8f53a7f18ac 100644 --- a/docs/content/developer/iota-101/transactions/ptb/building-ptb.mdx +++ b/docs/content/developer/iota-101/transactions/ptb/building-ptb.mdx @@ -8,7 +8,7 @@ This guide explores creating a programmable transaction block (PTB) on IOTA usin This example starts by constructing a PTB to send IOTA. If you are familiar with the legacy IOTA transaction types, this is similar to a `payIota` transaction. To construct transactions, import the `TransactionBlock` class, and construct it: ```ts -import { TransactionBlock } from "@iota/iota.js"; +import { TransactionBlock } from "@iota/iota-sdk"; const txb = new TransactionBlock(); ``` @@ -142,7 +142,7 @@ const txb = TransactionBlock.from(bytes); In the event that you want to build a PTB offline (as in with no `provider` required), you need to fully define all of your input values, and gas configuration (see the following example). For pure values, you can provide a `Uint8Array` which is used directly in the transaction. For objects, you can use the `Inputs` helper to construct an object reference. ```ts -import { Inputs } from "@iota/iota.js"; +import { Inputs } from "@iota/iota-sdk"; // For pure values: txb.pure(pureValueAsBytes); diff --git a/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx b/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx index be4234ac070..c0431327a75 100644 --- a/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx +++ b/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx @@ -44,12 +44,12 @@ There are various ways to instantiate a key pair and to derive its public key an ```tsx import { fromHEX } from '@iota/bcs'; -import { getFullnodeUrl, IOTAClient } from '@iota/iota.js/client'; -import { type Keypair } from '@iota/iota.js/cryptography'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { Secp256k1Keypair } from '@iota/iota.js/keypairs/secp256k1'; -import { Secp256r1Keypair } from '@iota/iota.js/keypairs/secp256r1'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IOTAClient } from '@iota/iota-sdk/client'; +import { type Keypair } from '@iota/iota-sdk/cryptography'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { Secp256k1Keypair } from '@iota/iota-sdk/keypairs/secp256k1'; +import { Secp256r1Keypair } from '@iota/iota-sdk/keypairs/secp256r1'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const kp_rand_0 = new Ed25519Keypair(); const kp_rand_1 = new Secp256k1Keypair(); diff --git a/docs/content/developer/iota-101/using-events.mdx b/docs/content/developer/iota-101/using-events.mdx index 7c1d82697a4..d1918662458 100644 --- a/docs/content/developer/iota-101/using-events.mdx +++ b/docs/content/developer/iota-101/using-events.mdx @@ -126,10 +126,10 @@ This example leverages the IOTA TypeScript SDK to subscribe to events the packag ### TypeScript -To create the event subscription, you can use a basic Node.js app. You need the IOTA TypeScript SDK, so install the module using `npm install @iota/iota.js` at the root of your project. In your TypeScript code, import `JsonRpcProvider` and a connection from the library. +To create the event subscription, you can use a basic Node.js app. You need the IOTA TypeScript SDK, so install the module using `npm install @iota/iota-sdk` at the root of your project. In your TypeScript code, import `JsonRpcProvider` and a connection from the library. ```ts -import { JsonRpcProvider, testnetConnection } from '@iota/iota.js'; +import { JsonRpcProvider, testnetConnection } from '@iota/iota-sdk'; // Package is on Testnet. const provider = new JsonRpcProvider(testnetConnection); diff --git a/docs/content/developer/iota-evm/explanations/consensus.md b/docs/content/developer/iota-evm/explanations/consensus.md index 539e7c15adb..27d3f3a07a2 100644 --- a/docs/content/developer/iota-evm/explanations/consensus.md +++ b/docs/content/developer/iota-evm/explanations/consensus.md @@ -2,12 +2,10 @@ description: IOTA Smart Contracts consensus is how Layer 2 validators agree to change the chain state in the same way. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - consensus - - validator committee - - validators - - validator nodes + - validator - explanation + - evm --- # Consensus diff --git a/docs/content/developer/iota-evm/explanations/context.mdx b/docs/content/developer/iota-evm/explanations/context.mdx index ac2507210f4..f2fc48ae68e 100644 --- a/docs/content/developer/iota-evm/explanations/context.mdx +++ b/docs/content/developer/iota-evm/explanations/context.mdx @@ -1,12 +1,8 @@ --- description: The call context is a predefined parameter to each smart contract function, which allows you to access the functionality that the call environment provides. tags: - - WasmLib - - smart contract setup - - Func and View functions - - ScFuncContext - - ScViewContext - - Schema Tool + - explanation + - evm image: /img/logo/WASP_logo_dark.png --- diff --git a/docs/content/developer/iota-evm/explanations/core-contracts.md b/docs/content/developer/iota-evm/explanations/core-contracts.md index dd75eabab39..2aa793c4c0e 100644 --- a/docs/content/developer/iota-evm/explanations/core-contracts.md +++ b/docs/content/developer/iota-evm/explanations/core-contracts.md @@ -2,15 +2,9 @@ description: There currently are 6 core smart contracts that are always deployed on each chain, root, _default, accounts, blob, blocklog, and governance. image: /img/banner/banner_wasp_core_contracts_overview.png tags: - - smart contracts - - core - - initialization - - request handling - - on-chain ledger - - accounts - - data - - receipts - - reference + - core-contract + - reference + - evm --- # Core Contracts diff --git a/docs/content/developer/iota-evm/explanations/how-accounts-work.md b/docs/content/developer/iota-evm/explanations/how-accounts-work.md index 3225c4f7ffd..fc55265c225 100644 --- a/docs/content/developer/iota-evm/explanations/how-accounts-work.md +++ b/docs/content/developer/iota-evm/explanations/how-accounts-work.md @@ -1,15 +1,10 @@ --- -description: 'IOTA Smart Contracts chains keep a ledger of on-chain account balances. On-chain accounts are identified -by an AgentID.' +description: IOTA Smart Contracts chains keep a ledger of on-chain account balances. On-chain accounts are identified by an AgentID. image: /img/iota-evm/tutorial/accounts.png tags: - -- smart contracts -- on-chain account -- ownership -- accounts Contract -- explanation - + - explanation + - isc-accounts + - evm --- # How Accounts Work diff --git a/docs/content/developer/iota-evm/explanations/invocation.mdx b/docs/content/developer/iota-evm/explanations/invocation.mdx index b3599d33294..d8590794a66 100644 --- a/docs/content/developer/iota-evm/explanations/invocation.mdx +++ b/docs/content/developer/iota-evm/explanations/invocation.mdx @@ -1,17 +1,11 @@ --- -description: 'Smart contracts can be invoked through their entry points, from outside via a request, or from inside via a -call.' +description: Smart contracts can be invoked through their entry points, from outside via a request, or from inside via a call. image: /img/logo/WASP_logo_dark.png tags: - -- smart contracts -- requests -- on-ledger -- off-ledger -- calls -- invocation -- explanation - + - on-ledger + - off-ledger + - explanation + - evm --- import OnOffLedgerRequest from '../../../_snippets/iota-evm/on_off_ledger_request.md'; diff --git a/docs/content/developer/iota-evm/explanations/sandbox.md b/docs/content/developer/iota-evm/explanations/sandbox.md index 1a63b434aea..c2aba030c57 100644 --- a/docs/content/developer/iota-evm/explanations/sandbox.md +++ b/docs/content/developer/iota-evm/explanations/sandbox.md @@ -1,15 +1,9 @@ --- -description: 'Smart Contracts can only interact with the world by using the Sandbox interface which provides limited and -deterministic access to the state through a key/value storage abstraction.' +description: Smart Contracts can only interact with the world by using the Sandbox interface which provides limited and deterministic access to the state through a key/value storage abstraction. image: /img/iota-evm/sandbox.png tags: - -- smart contracts -- sandbox -- interface -- storage abstraction -- explanation - + - explanation + - evm --- # Sandbox Interface diff --git a/docs/content/developer/iota-evm/explanations/smart-contract-anatomy.md b/docs/content/developer/iota-evm/explanations/smart-contract-anatomy.md index db7752025da..a2dcee5e5aa 100644 --- a/docs/content/developer/iota-evm/explanations/smart-contract-anatomy.md +++ b/docs/content/developer/iota-evm/explanations/smart-contract-anatomy.md @@ -2,12 +2,8 @@ description: Each smart contract instance has a program with a collection of entry points and a state. image: /img/iota-evm/tutorial/SC-structure.png tags: - - smart contracts - - structure - - state - - entry points - - Wasm - - explanation + - explanation + - evm --- # Anatomy of a Smart Contract diff --git a/docs/content/developer/iota-evm/explanations/smart-contracts.md b/docs/content/developer/iota-evm/explanations/smart-contracts.md index b7b194d8749..697141f2c72 100644 --- a/docs/content/developer/iota-evm/explanations/smart-contracts.md +++ b/docs/content/developer/iota-evm/explanations/smart-contracts.md @@ -1,15 +1,9 @@ --- -description: 'Smart contracts are applications you can trust that run on a distributed network with multiple validators -all executing and validating the same code.' +description: Smart contracts are applications you can trust that run on a distributed network with multiple validators all executing and validating the same code. image: /img/banner/banner_wasp_core_concepts_smart_contracts.png tags: - -- smart contracts -- blockchain -- parallel -- scaling -- explanation - + - explanation + - evm --- # Smart Contracts diff --git a/docs/content/developer/iota-evm/explanations/state_manager.md b/docs/content/developer/iota-evm/explanations/state_manager.md index dcbbf0c9e06..2dbe85daef9 100644 --- a/docs/content/developer/iota-evm/explanations/state_manager.md +++ b/docs/content/developer/iota-evm/explanations/state_manager.md @@ -2,11 +2,9 @@ description: State manager is Wasp component, which is responsible for keeping the store up to date. image: /img/logo/WASP_logo_dark.png tags: - - state manager - pruning - snapshot - - write ahead log - - WAL + - evm --- # State Manager diff --git a/docs/content/developer/iota-evm/explanations/states.md b/docs/content/developer/iota-evm/explanations/states.md index 8608432fcf0..e018cd413b9 100644 --- a/docs/content/developer/iota-evm/explanations/states.md +++ b/docs/content/developer/iota-evm/explanations/states.md @@ -1,16 +1,10 @@ --- -description: 'The state of the chain consists of balances of native IOTA digital assets and a collection of key/value -pairs which represents use case-specific data stored in the chain by its smart contracts outside the UTXO ledger.' +description: The state of the chain consists of balances of native IOTA digital assets and a collection of key/value pairs which represents use case-specific data stored in the chain by its smart contracts outside the UTXO ledger. image: /img/iota-evm/chain0.png tags: - -- state -- transitions -- balances -- digital assets -- UTXO -- transitions -- explanation + - explanation + - state + - evm --- # State, Transitions, and State Anchoring diff --git a/docs/content/developer/iota-evm/explanations/validators.md b/docs/content/developer/iota-evm/explanations/validators.md index a9e6b7697f2..157713ef4df 100644 --- a/docs/content/developer/iota-evm/explanations/validators.md +++ b/docs/content/developer/iota-evm/explanations/validators.md @@ -2,12 +2,11 @@ description: Each chain is run by a network of validator nodes which run a consensus on the chain state update. image: /img/logo/WASP_logo_dark.png tags: - - validators - - validator nodes - - access nodes - - consensus - - state update - - explanation + - validator + - access-node + - consensus + - explanation + - evm --- # Validators diff --git a/docs/content/developer/iota-evm/getting-started/compatibility.md b/docs/content/developer/iota-evm/getting-started/compatibility.md index 363919295b0..1c9dd2125c1 100644 --- a/docs/content/developer/iota-evm/getting-started/compatibility.md +++ b/docs/content/developer/iota-evm/getting-started/compatibility.md @@ -2,14 +2,9 @@ description: Compatibility between the ISC EVM layer and existing Ethereum smart contracts and tooling. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - - EVM - - Ethereum - - Solidity - - limitations - - compatibility - - fees - - reference + - evm + - solidity + - reference --- # EVM Compatibility in IOTA Smart Contracts diff --git a/docs/content/developer/iota-evm/getting-started/languages-and-vms.mdx b/docs/content/developer/iota-evm/getting-started/languages-and-vms.mdx index 17436a53943..e9447352c63 100644 --- a/docs/content/developer/iota-evm/getting-started/languages-and-vms.mdx +++ b/docs/content/developer/iota-evm/getting-started/languages-and-vms.mdx @@ -2,13 +2,9 @@ description: Compatibility between languages and different virtual machines. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - - EVM - - Ethereum - - Solidity - - limitations - - compatibility - - reference + - evm + - solidity + - reference --- import EVMCompatibility from '../../../_snippets/iota-evm/EVM_compatibility.md'; diff --git a/docs/content/developer/iota-evm/getting-started/networks-and-chains.mdx b/docs/content/developer/iota-evm/getting-started/networks-and-chains.mdx index 4d74b0ca4a3..32cce7b9f33 100644 --- a/docs/content/developer/iota-evm/getting-started/networks-and-chains.mdx +++ b/docs/content/developer/iota-evm/getting-started/networks-and-chains.mdx @@ -1,12 +1,10 @@ --- description: Networks and endpoints in the IOTA ecosystem. tags: - - mainnet - - shimmer - - devnet - - EVM Testnet - - reference - - Endpoints + - mainnet + - testnet + - reference + - evm --- import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton'; diff --git a/docs/content/developer/iota-evm/getting-started/quick-start.mdx b/docs/content/developer/iota-evm/getting-started/quick-start.mdx index eb8d72976fe..e027fccd06d 100644 --- a/docs/content/developer/iota-evm/getting-started/quick-start.mdx +++ b/docs/content/developer/iota-evm/getting-started/quick-start.mdx @@ -2,15 +2,10 @@ description: This guide will help you quickly get started with the EVM image: /img/logo/WASP_logo_dark.png tags: - - quickstart - - developer - - using - - EVM - - Ethereum - - Solidity - - metamask - - JSON - - RPC + - quickstart + - evm + - solidity + - rpc --- import DeployAdmonition from '../../../_snippets/iota-evm/deploy_a_smart_contract.md'; diff --git a/docs/content/developer/iota-evm/getting-started/tools.mdx b/docs/content/developer/iota-evm/getting-started/tools.mdx index 5420c5e337e..845f92b31aa 100644 --- a/docs/content/developer/iota-evm/getting-started/tools.mdx +++ b/docs/content/developer/iota-evm/getting-started/tools.mdx @@ -1,20 +1,12 @@ --- -description: 'Existing EVM tooling is compatible and can be used directly with an IOTA Smart Contracts chain running EVM. -You can configure hardhat, metamask, remix, Ether.js and Web3.js among others.' +description: Existing EVM tooling is compatible and can be used directly with an IOTA Smart Contracts chain running EVM. You can configure hardhat, metamask, remix, Ether.js and Web3.js among others. image: /img/logo/WASP_logo_dark.png tags: - -- smart contracts -- chain -- EVM -- Solidity -- tooling -- wasp-cli -- hardhat -- metamask -- JSON-RPC -- reference - + - evm + - solidity + - cli + - rpc + - reference --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/how-tos/ERC20.mdx b/docs/content/developer/iota-evm/how-tos/ERC20.mdx index 127cf7a5cbc..ebe8e136752 100644 --- a/docs/content/developer/iota-evm/how-tos/ERC20.mdx +++ b/docs/content/developer/iota-evm/how-tos/ERC20.mdx @@ -2,14 +2,10 @@ description: Solidity smart contract ERC20. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - - EVM - - Solidity - - ERC20 - - eip-20 - - token creation - - mint tokens - - how to + - evm + - solidity + - how-to + - erc20 --- import DeployAdmonition from '../../../_snippets/iota-evm/deploy_a_smart_contract.md'; diff --git a/docs/content/developer/iota-evm/how-tos/ERC721.mdx b/docs/content/developer/iota-evm/how-tos/ERC721.mdx index 75144ab82b4..d3c5164003e 100644 --- a/docs/content/developer/iota-evm/how-tos/ERC721.mdx +++ b/docs/content/developer/iota-evm/how-tos/ERC721.mdx @@ -2,14 +2,10 @@ description: Create and deploy a Solidity smart contract to mint NFTs using the ERC721 standard. image: /img/iota-evm/evm/ozw-721.png tags: - - smart contracts - - EVM - - Solidity - - ERC721 - - eip-721 - - token creation - - mint tokens - - how to + - evm + - solidity + - how-to + - erc721 --- import DeployAdmonition from '../../../_snippets/iota-evm/deploy_a_smart_contract.md'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/allow.md b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/allow.md index 83339962775..a2ab2bb4797 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/allow.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/allow.md @@ -2,11 +2,11 @@ description: How to allow native assets and base token image: /img/logo/WASP_logo_dark.png tags: - - allow - allowance - - EVM + - evm - magic - solidity + - how-to --- # Allow diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/get-allowance.md b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/get-allowance.md index 353df44011c..40016cdcfb0 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/get-allowance.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/get-allowance.md @@ -3,9 +3,10 @@ description: How to get the allowance of native assets and base token image: /img/logo/WASP_logo_dark.png tags: - allowance - - EVM + - evm - magic - solidity + - how-to --- # Get Allowance diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/take-allowance.md b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/take-allowance.md index 9b3bf2cf15b..190c7455fa1 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/take-allowance.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/allowance/take-allowance.md @@ -3,9 +3,10 @@ description: How to take the allowance of native assets and base token image: /img/logo/WASP_logo_dark.png tags: - allowance - - EVM + - evm - magic - solidity + - how-to --- # Take allowed Funds diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/get-balance.md b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/get-balance.md index 225c4ae11a4..67c272bd5ce 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/get-balance.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/get-balance.md @@ -2,9 +2,8 @@ description: How to get the balance of L1 assets on L2 image: /img/logo/WASP_logo_dark.png tags: - - native assets + - evm - balance - - EVM - how-to --- diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/send-assets-to-l1.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/send-assets-to-l1.mdx index 8d828f15397..e9daf665b4d 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/basics/send-assets-to-l1.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/basics/send-assets-to-l1.mdx @@ -2,12 +2,9 @@ description: The ISC Magic Contract allows EVM contracts to access ISC functionality. image: /img/logo/WASP_logo_dark.png tags: - - configure - - using - - EVM - - magic - - Ethereum - - Solidity + - evm + - magic + - solidity --- import AboutAccounts from '../../../../../_snippets/iota-evm/about-accounts.md'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/call-view.md b/docs/content/developer/iota-evm/how-tos/core-contracts/call-view.md index b1343c20284..5ef9d261cfa 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/call-view.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/call-view.md @@ -2,12 +2,10 @@ description: With call and callView you can interact with any core contract image: /img/logo/WASP_logo_dark.png tags: - - magic contract - - core - - EVM - - Ethereum - - Solidity - - ISC + - magic + - core-contract + - evm + - solidity --- # Interact with any Core contract diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/get-randomness-on-l2.md b/docs/content/developer/iota-evm/how-tos/core-contracts/get-randomness-on-l2.md index e7977b29da7..73d72c5387b 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/get-randomness-on-l2.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/get-randomness-on-l2.md @@ -2,12 +2,10 @@ description: You can use the ISC Magic Contract in EVM contracts to access ISC functionality, such as randomness. image: /img/logo/WASP_logo_dark.png tags: - - magic contract + - magic - randomness - - EVM - - Ethereum - - Solidity - - ISC + - evm + - solidity --- # Get Randomness on L2 diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/introduction.md b/docs/content/developer/iota-evm/how-tos/core-contracts/introduction.md index 5b334cf62c6..bbbdc1d6fbb 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/introduction.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/introduction.md @@ -2,15 +2,10 @@ description: The ISC Core Contracts allows VMs to access ISC functionality. image: /img/logo/WASP_logo_dark.png tags: - - configure - - using - - EVM - - magic - - Ethereum - - Solidity - - metamask - - JSON - - RPC + - evm + - magic + - solidity + - rpc --- # The Core Contracts diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/introduction.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/introduction.mdx index d20e79504e0..0a257f8de35 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/introduction.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/introduction.mdx @@ -2,11 +2,11 @@ description: How to handle native NFTs on L2 and use them as ERC721 image: /img/logo/WASP_logo_dark.png tags: - - native - - NFT - - EVM + - nft + - evm - how-to --- + import DocCardList from '@theme/DocCardList'; # Native NFT and ERC721 diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/mint-nft.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/mint-nft.mdx index 14a9ce812e8..50fc26f91b3 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/mint-nft.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/mint-nft.mdx @@ -2,9 +2,9 @@ description: How to mint L1 NFT image: /img/logo/WASP_logo_dark.png tags: - - NFT - - EVM - - how-to + - nft + - evm + - how-to --- import ExampleCodeIntro from '../../../../../_snippets/iota-evm/how-tos/token/example_code_intro.mdx'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/use-as-erc721.md b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/use-as-erc721.md index 93269d23bba..010174f7724 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/nft/use-as-erc721.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/nft/use-as-erc721.md @@ -2,9 +2,10 @@ description: How to use a native NFT like an ERC721 NFT image: /img/logo/WASP_logo_dark.png tags: - - NFT - - EVM + - nft + - evm - how-to + - erc721 --- # Use as ERC721 diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-foundry.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-foundry.mdx index 6995be75224..087d7816bdf 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-foundry.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-foundry.mdx @@ -2,11 +2,11 @@ description: How to create a L1 foundry image: /img/logo/WASP_logo_dark.png tags: - - foundry - - EVM - - how-to +- evm +- how-to --- + import ExampleCodeIntro from '../../../../../_snippets/iota-evm/how-tos/token/example_code_intro.mdx'; import ObsoleteTokenCreation from '../../../../../_snippets/iota-evm/how-tos/token/obsolete_token_creation.md'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-native-token.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-native-token.mdx index 4c68d6bfb44..9ea6be3c50b 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-native-token.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/create-native-token.mdx @@ -2,12 +2,9 @@ description: How to Create a Native Token Foundry. image: /img/logo/WASP_logo_dark.png tags: - - foundry - - EVM - - how-to - - native tokens - - mint - - register + - evm + - how-to + - native-token --- import ExampleCodeIntro from '../../../../../_snippets/iota-evm/how-tos/token/example_code_intro.mdx'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/erc20-native-token.md b/docs/content/developer/iota-evm/how-tos/core-contracts/token/erc20-native-token.md index 993fb2eaf7f..54c7baac6ef 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/erc20-native-token.md +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/erc20-native-token.md @@ -2,9 +2,8 @@ description: How to use the custom functionality of ERC20NativeToken image: /img/logo/WASP_logo_dark.png tags: - - native token + - evm - erc20 - - EVM - how-to --- diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/introduction.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/token/introduction.mdx index 5c86f899bf1..fd591602d3f 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/introduction.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/introduction.mdx @@ -2,10 +2,12 @@ description: How to handle native tokens on L2 and use them as ERC20 image: /img/logo/WASP_logo_dark.png tags: - - native token - - EVM + - evm + - erc20 + - native-token - how-to --- + import DocCardList from '@theme/DocCardList'; # Native Token and ERC20NativeToken diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/mint-token.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/token/mint-token.mdx index 5ec1215bd42..240f0252e4c 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/mint-token.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/mint-token.mdx @@ -2,11 +2,9 @@ description: How to mint native token on an L1 foundry. image: /img/logo/WASP_logo_dark.png tags: - - foundry - - EVM - - how-to - - native tokens - - mint + - evm + - how-to + - native-token --- import ExampleCodeIntro from '../../../../../_snippets/iota-evm/how-tos/token/example_code_intro.mdx'; diff --git a/docs/content/developer/iota-evm/how-tos/core-contracts/token/register-token.mdx b/docs/content/developer/iota-evm/how-tos/core-contracts/token/register-token.mdx index cc74183967d..f99280e79ba 100644 --- a/docs/content/developer/iota-evm/how-tos/core-contracts/token/register-token.mdx +++ b/docs/content/developer/iota-evm/how-tos/core-contracts/token/register-token.mdx @@ -2,9 +2,9 @@ description: How to register a native token as ERC20 image: /img/logo/WASP_logo_dark.png tags: - - ERC20 - - EVM - - how-to + - evm + - native-token + - how-to --- import ExampleCodeIntro from '../../../../../_snippets/iota-evm/how-tos/token/example_code_intro.mdx'; diff --git a/docs/content/developer/iota-evm/how-tos/create-a-basic-contract.mdx b/docs/content/developer/iota-evm/how-tos/create-a-basic-contract.mdx index 4e575a9e060..8445a773116 100644 --- a/docs/content/developer/iota-evm/how-tos/create-a-basic-contract.mdx +++ b/docs/content/developer/iota-evm/how-tos/create-a-basic-contract.mdx @@ -2,9 +2,8 @@ description: Basic smart contract example. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - - how to - - basic contract + - how-to + - evm --- import DeployAdmonition from '../../../_snippets/iota-evm/deploy_a_smart_contract.md'; diff --git a/docs/content/developer/iota-evm/how-tos/deploy-a-smart-contract.mdx b/docs/content/developer/iota-evm/how-tos/deploy-a-smart-contract.mdx index 5c084f701b1..21fb590bda8 100644 --- a/docs/content/developer/iota-evm/how-tos/deploy-a-smart-contract.mdx +++ b/docs/content/developer/iota-evm/how-tos/deploy-a-smart-contract.mdx @@ -1,13 +1,11 @@ --- +description: Learn how to deploy smart contracts to IOTA EVM, Shimmer EVM and EVM + Testnet using popular tools like Remix and Hardhat. tags: - - Smart Contract Deployment - - Shimmer EVM - - IOTA EVM - - Remix IDE - - Hardhat - - EVM Testnet + - how-to + - evm + - getting-started image: /img/logo/WASP_logo_dark.png -description: 'Learn how to deploy smart contracts to IOTA EVM, Shimmer EVM and EVM Testnet using popular tools like Remix and Hardhat.' --- import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton'; diff --git a/docs/content/developer/iota-evm/how-tos/introduction.md b/docs/content/developer/iota-evm/how-tos/introduction.md index cb6c63bbc87..e1456e89112 100644 --- a/docs/content/developer/iota-evm/how-tos/introduction.md +++ b/docs/content/developer/iota-evm/how-tos/introduction.md @@ -1,16 +1,11 @@ --- -description: 'Explore the how-to guides for IOTA Smart Contracts, offering step-by-step instructions on various topics and functionalities.' +description: Explore the how-to guides for IOTA Smart Contracts, offering step-by-step instructions on various topics and functionalities. image: /img/logo/WASP_logo_dark.png tags: - - - EVM - - Solidity - - smart contracts - - Ethereum + - evm + - solidity - explanation - - how-to guides - - instructions - - code examples + - how-to --- # About How-to Guides diff --git a/docs/content/developer/iota-evm/how-tos/send-funds-from-L1-to-L2.mdx b/docs/content/developer/iota-evm/how-tos/send-funds-from-L1-to-L2.mdx index 71a99849d94..bc0205d4b77 100644 --- a/docs/content/developer/iota-evm/how-tos/send-funds-from-L1-to-L2.mdx +++ b/docs/content/developer/iota-evm/how-tos/send-funds-from-L1-to-L2.mdx @@ -2,17 +2,10 @@ description: How to send funds from L1 to L2. image: /img/logo/WASP_logo_dark.png tags: - - configure - - using - - EVM - - Ethereum - - Solidity - - deploy - - hardhat - - metamask - - JSON - - RPC - - how to + - evm + - solidity + - rpc + - how-to --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/how-tos/test-smart-contracts.md b/docs/content/developer/iota-evm/how-tos/test-smart-contracts.md index 4319c914ae0..ff0f8d17d8c 100644 --- a/docs/content/developer/iota-evm/how-tos/test-smart-contracts.md +++ b/docs/content/developer/iota-evm/how-tos/test-smart-contracts.md @@ -1,13 +1,7 @@ --- -keywords: -- Smart Contract Testing -- Automated Testing -- Unit Tests -- Integration Tests -- Testing Frameworks -- EVM Testnet -- Solidity Testing -description: Learn how to test smart contracts before deploying them on public networks to avoid vulnerabilities and ensure functionality aligns with requirements using unit, and integration testing, alongside frameworks and testing with the IOTA Sandbox and the EVM Testnet. +description: Learn how to test smart contracts before deploying them on public networks to avoid vulnerabilities and ensure functionality aligns with requirements using unit, and integration testing, alongside frameworks and testing with the IOTA Sandbox and the EVM Testnet. +tags: + - evm --- # Testing Smart Contracts diff --git a/docs/content/developer/iota-evm/introduction.mdx b/docs/content/developer/iota-evm/introduction.mdx index 68f854820e3..a5e98e7f9c8 100644 --- a/docs/content/developer/iota-evm/introduction.mdx +++ b/docs/content/developer/iota-evm/introduction.mdx @@ -1,15 +1,10 @@ --- -description: 'The current release of IOTA Smart Contracts also has experimental support for EVM/Solidity, providing -limited compatibility with existing smart contracts and tooling from other EVM based chains like Ethereum.' +description: The current release of IOTA Smart Contracts also has experimental support for EVM/Solidity, providing limited compatibility with existing smart contracts and tooling from other EVM based chains like Ethereum. image: /img/logo/WASP_logo_dark.png tags: - - - EVM - - Solidity - - smart contracts - - Ethereum + - evm + - solidity - explanation - --- import OnOffLedgerRequest from '../../_snippets/iota-evm/on_off_ledger_request.md'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/access.mdx b/docs/content/developer/iota-evm/schema/how-tos/access.mdx index a9c799a32a2..24c77f3d3e7 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/access.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/access.mdx @@ -1,12 +1,10 @@ --- -description: "This article explains how to define access controls for functions using the optional 'access' subsection in the schema definition file." -tags: - - Access Control - - Schema Tool - - Smart Contract - - AgentID - - Function Access +description: This article explains how to define access controls for functions using the optional 'access' subsection in the schema definition file. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- # Limit Access diff --git a/docs/content/developer/iota-evm/schema/how-tos/call.mdx b/docs/content/developer/iota-evm/schema/how-tos/call.mdx index 3a0f26d0df1..042c5863d7e 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/call.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/call.mdx @@ -1,13 +1,10 @@ --- -description: "Explore how synchronous function calls work between smart contracts, highlighting the role of function descriptors in parameter and token passage, and understanding the ISC host's role in this procedure." -tags: - - Synchronous Calls - - Smart Contracts - - Function Descriptors - - ISC Host - - Function Parameters - - Smart Contract Memory +description: Explore how synchronous function calls work between smart contracts, highlighting the role of function descriptors in parameter and token passage, and understanding the ISC host's role in this procedure. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/events.mdx b/docs/content/developer/iota-evm/schema/how-tos/events.mdx index 02bd5174e73..c91567a6465 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/events.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/events.mdx @@ -1,14 +1,10 @@ --- -description: "This article outlines how to trigger events in smart contracts utilizing ISC sandbox's ScFuncContext and the Schema Tool for structured events." -tags: - - Smart Contracts - - ISC Sandbox - - Schema Tool - - Event-driven - - Call Context - - ScFuncContext - - Event Triggering +description: This article outlines how to trigger events in smart contracts utilizing ISC sandbox's ScFuncContext and the Schema Tool for structured events. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/funcdesc.mdx b/docs/content/developer/iota-evm/schema/how-tos/funcdesc.mdx index bb4f18ee046..22c7d5c5f05 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/funcdesc.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/funcdesc.mdx @@ -1,14 +1,10 @@ --- -tags: - - descriptor - - view - - access - - contract functions - - schema tool - description: The schema tool provides us with an easy way to get access to smart contract functions through function descriptors, which allow you to initiate the function by calling it synchronously, or posting a request to run it asynchronously. - image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/funcs.mdx b/docs/content/developer/iota-evm/schema/how-tos/funcs.mdx index 0c48c6c85ed..29e3fe87de4 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/funcs.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/funcs.mdx @@ -1,14 +1,10 @@ --- -tags: - - functions - - views - - state - - access - - params - - results - -image: /img/logo/WASP_logo_dark.png description: The code generated for Funcs will be able to inspect and modify the smart contract state, whereas the code generated for Views will only be able to inspect the state. +image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/init.mdx b/docs/content/developer/iota-evm/schema/how-tos/init.mdx index 3425089182c..93b960f5e80 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/init.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/init.mdx @@ -1,15 +1,10 @@ --- -tags: - - init - - initialization - - owner - - initial state - - smart contract creator - - one-time - - contract deployment - description: The init function will automatically be called immediately after the first time the contract has been deployed to the VM. This is a one-time initialization call, meant to be performed by the contract deployment mechanism. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/params.mdx b/docs/content/developer/iota-evm/schema/how-tos/params.mdx index 60691771f75..84aeb462746 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/params.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/params.mdx @@ -1,12 +1,10 @@ --- -description: "Learn how to define function parameters using the 'params' subsection, and how the Schema Tool facilitates this process." -tags: - - Function Parameters - - Schema Tool - - Params Subsection - - Optional Parameters - - Parameter Proxy +description: Learn how to define function parameters using the 'params' subsection, and how the Schema Tool facilitates this process. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/post.mdx b/docs/content/developer/iota-evm/schema/how-tos/post.mdx index e4ef8b23b4d..c4017a60c47 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/post.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/post.mdx @@ -1,13 +1,10 @@ --- -tags: - - function descriptor - - return values - - request - - post - - smart contract chain - - Asynchronous function description: Asynchronous function calls between smart contracts are posted as requests on the Tangle. They allow you to invoke any smart contract function that is not a View on any smart contract chain. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/results.mdx b/docs/content/developer/iota-evm/schema/how-tos/results.mdx index d80691a6888..4ec65f1209b 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/results.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/results.mdx @@ -1,12 +1,10 @@ --- +description: Understand how to outline function results using the 'results' subsection and how the Schema Tool aids in this process. image: /img/logo/WASP_logo_dark.png -description: "Understand how to outline function results using the 'results' subsection and how the Schema Tool aids in this process." tags: - - Function Results - - Schema Tool - - Results Subsection - - Mutable Structure - - Result Variables + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/spec.mdx b/docs/content/developer/iota-evm/schema/how-tos/spec.mdx index 1c8c35fee58..f48767e805e 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/spec.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/spec.mdx @@ -1,10 +1,10 @@ --- -tags: - - spec - - meta-programming - - compile description: The spec of schema tool and how to develop schema tool. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- # Spec diff --git a/docs/content/developer/iota-evm/schema/how-tos/state.mdx b/docs/content/developer/iota-evm/schema/how-tos/state.mdx index 102870afb10..192bd27d6d6 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/state.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/state.mdx @@ -1,15 +1,10 @@ --- -tags: - - state - - access - - storage - - key - - data - - value - description: The smart contract state storage on the host consists of a single key/value map, as long as you access the data in the same way that you used to store it, you will always get valid data back. - image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/structs.mdx b/docs/content/developer/iota-evm/schema/how-tos/structs.mdx index 810c2f398b2..7228a2c3707 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/structs.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/structs.mdx @@ -1,14 +1,10 @@ --- -tags: - - functions - - state - - structures - - storage - - named fields - description: You can use structs directly as a type in state storage definitions and the schema tool will automatically generate the proxy code to access it properly. - image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/thunks.mdx b/docs/content/developer/iota-evm/schema/how-tos/thunks.mdx index 76531cd30a1..05d339c3499 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/thunks.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/thunks.mdx @@ -1,14 +1,10 @@ --- -description: 'Learn about thunk functions and how the Schema Tool uses them to facilitate smart contract function calls.' -tags: - - Thunk Functions - - Schema Tool - - Wrapper Function - - Smart Contract Functions - - Type-Safe - - Function Signature - - Code Injection +description: Learn about thunk functions and how the Schema Tool uses them to facilitate smart contract function calls. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/transfers.mdx b/docs/content/developer/iota-evm/schema/how-tos/transfers.mdx index ac4d6ab0726..04d1e8b5906 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/transfers.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/transfers.mdx @@ -1,12 +1,10 @@ --- -description: 'Explore methods in the Call Context that facilitate the handling and transfer of asset balances in smart contracts using the `dividend` example.' -tags: - - Call Context - - Asset Balances - - ScBalances Proxy - - ScTransfer Proxy - - Dividend Smart Contract +description: Explore methods in the Call Context that facilitate the handling and transfer of asset balances in smart contracts using the `dividend` example. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/typedefs.mdx b/docs/content/developer/iota-evm/schema/how-tos/typedefs.mdx index 195ce73d054..304cc36f314 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/typedefs.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/typedefs.mdx @@ -1,15 +1,10 @@ --- -tags: - - containers - - types - - container types - - single type - - array - - schema definition file - description: You can add a typedefs section to the schema definition file, where you can define a single type name for a container type. This way you can easily create containers that contain container types. - image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/usage.mdx b/docs/content/developer/iota-evm/schema/how-tos/usage.mdx index 4114e328ccc..979f946a742 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/usage.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/usage.mdx @@ -1,16 +1,10 @@ --- -tags: - - functions - - schema tool - - definition file - - Rust - - Go - - init - - json - - yml - description: The `schema` tool will assist in creating a smart contract as unobtrusively as possible. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/views.mdx b/docs/content/developer/iota-evm/schema/how-tos/views.mdx index b9aef699f09..9cc614ba7bd 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/views.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/views.mdx @@ -1,13 +1,10 @@ --- -description: "Explore the characteristics and constraints of view-only functions in smart contracts, -illustrated through a 'getFactor' function example." -tags: -- View-Only Functions -- Smart Contracts -- Call Context -- Immutable Proxies -- Cross-Chain Requests +description: Explore the characteristics and constraints of view-only functions in smart contracts, illustrated through a 'getFactor' function example. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/schema/how-tos/yaml.mdx b/docs/content/developer/iota-evm/schema/how-tos/yaml.mdx index f239b3f356f..30368b2cbc8 100644 --- a/docs/content/developer/iota-evm/schema/how-tos/yaml.mdx +++ b/docs/content/developer/iota-evm/schema/how-tos/yaml.mdx @@ -1,13 +1,10 @@ --- -tags: - - definition - - yaml - - smart contract creator - - one-time - - contract generation - - datatypes description: the syntax of a schema definition file will be described here. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - schema --- # YAML Schema Definition: Level 1 Attributes diff --git a/docs/content/developer/iota-evm/schema/proxies.mdx b/docs/content/developer/iota-evm/schema/proxies.mdx index 1b5bbb07803..39c52b2f2c7 100644 --- a/docs/content/developer/iota-evm/schema/proxies.mdx +++ b/docs/content/developer/iota-evm/schema/proxies.mdx @@ -1,15 +1,12 @@ --- -tags: - - proxies - - sandbox - - wasm - - value proxies - - container proxies - - array proxies - - map proxies - - explanation -description: As there is no way for the Wasm code to access any memory outside its own memory space, the WasmLib interface provides a number of proxies to make accessing data within the ISC sandbox as seamless as possible. +description: As there is no way for the Wasm code to access any memory outside its + own memory space, the WasmLib interface provides a number of proxies to make accessing + data within the ISC sandbox as seamless as possible. image: /img/iota-evm/wasm_vm/Proxies.png +tags: + - how-to + - evm + - schema --- # Data Access Proxies diff --git a/docs/content/developer/iota-evm/solo/getting-started.md b/docs/content/developer/iota-evm/solo/getting-started.md index 6fe73a027ce..0566990e16b 100644 --- a/docs/content/developer/iota-evm/solo/getting-started.md +++ b/docs/content/developer/iota-evm/solo/getting-started.md @@ -1,16 +1,11 @@ --- -description: 'Solo is a testing framework that allows developers to validate real smart contracts and entire inter-chain -protocols.' +description: Solo is a testing framework that allows developers to validate real smart contracts and entire inter-chain protocols. image: /img/logo/WASP_logo_dark.png tags: - -- testing framework -- golang -- rust -- inter-chain protocols -- validate smart contracts -- install -- how-tos + - how-to + - evm + - solo + - testing --- # Testing Smart Contracts with Solo diff --git a/docs/content/developer/iota-evm/solo/how-tos/deploying-sc.md b/docs/content/developer/iota-evm/solo/how-tos/deploying-sc.md index aa3a6ec9cd6..a74d1dbac63 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/deploying-sc.md +++ b/docs/content/developer/iota-evm/solo/how-tos/deploying-sc.md @@ -2,16 +2,10 @@ description: Deploying Wasm smart contracts with Solo. image: /img/iota-evm/tutorial/send_request.png tags: - - testing - - PostRequestSync - - PostRequestOffLedger - - send - - requests - - post + - how-to + - evm - solo - - on-ledger - - off-ledger - - how-tos + - testing --- # Deploying Wasm Smart Contracts diff --git a/docs/content/developer/iota-evm/solo/how-tos/error-handling.md b/docs/content/developer/iota-evm/solo/how-tos/error-handling.md index ae4c00683ee..1056b5b004a 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/error-handling.md +++ b/docs/content/developer/iota-evm/solo/how-tos/error-handling.md @@ -2,12 +2,10 @@ description: What happens when a smart contract invocation fails? image: /img/logo/WASP_logo_dark.png tags: - - testing - - solo - - error handling - - panic - - state - - transition + - how-to + - evm + - solo + - testing --- # Error Handling diff --git a/docs/content/developer/iota-evm/solo/how-tos/examples.mdx b/docs/content/developer/iota-evm/solo/how-tos/examples.mdx index c924b0b67fe..7359ac35606 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/examples.mdx +++ b/docs/content/developer/iota-evm/solo/how-tos/examples.mdx @@ -1,17 +1,11 @@ --- +description: Use the SoloContext to create full-blown tests for the dividend example smart contract. +image: /img/logo/WASP_logo_dark.png tags: + - how-to + - evm - solo - testing - - errors - - member function - - post - - ctx - - divide function - - error message - -description: Use the SoloContext to create full-blown tests for the dividend example smart contract. - -image: /img/logo/WASP_logo_dark.png --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/solo/how-tos/first-example.md b/docs/content/developer/iota-evm/solo/how-tos/first-example.md index ead55d579aa..57d3a74ef41 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/first-example.md +++ b/docs/content/developer/iota-evm/solo/how-tos/first-example.md @@ -2,12 +2,10 @@ description: Example of a _Solo_ test. It deploys a new chain and invokes some view calls. image: /img/logo/WASP_logo_dark.png tags: - - testing framework - - golang - - solo - - example - - new chain - - how-tos + - how-to + - evm + - solo + - testing --- # First Example diff --git a/docs/content/developer/iota-evm/solo/how-tos/invoking-sc.md b/docs/content/developer/iota-evm/solo/how-tos/invoking-sc.md index 2ff6fd68f1d..4922a23d45a 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/invoking-sc.md +++ b/docs/content/developer/iota-evm/solo/how-tos/invoking-sc.md @@ -3,16 +3,11 @@ description: Invoking smart contracts with on-ledger and off-ledger requests wit image: /img/iota-evm/tutorial/send_request.png tags: - how-to - - explanation - - testing - - PostRequestSync - - PostRequestOffLedger - - send - - requests - - post - - solo - on-ledger - off-ledger + - evm + - solo + - testing --- # Invoking Smart Contracts diff --git a/docs/content/developer/iota-evm/solo/how-tos/test.mdx b/docs/content/developer/iota-evm/solo/how-tos/test.mdx index cbf7eb53b59..13df273b850 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/test.mdx +++ b/docs/content/developer/iota-evm/solo/how-tos/test.mdx @@ -1,15 +1,11 @@ --- -tags: - - testing - - solo testing environment - - call context - - smart contract functionalities - - data types - - type conversions - - Go - description: Testing of smart contracts happens in the Solo testing environment. This enables synchronous, deterministic testing of smart contract functionality without the overhead of having to start nodes, set up a committee, and send transactions over the _Tangle_. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - solo + - testing --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/solo/how-tos/the-l1-ledger.md b/docs/content/developer/iota-evm/solo/how-tos/the-l1-ledger.md index ed3c5b84c53..47302b43680 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/the-l1-ledger.md +++ b/docs/content/developer/iota-evm/solo/how-tos/the-l1-ledger.md @@ -2,13 +2,10 @@ description: How to interact with the L1 ledger in Solo. image: /img/logo/WASP_logo_dark.png tags: - - testing + - how-to + - evm - solo - - UTXO - - tokens - - ledger - - l1 - - how-tos + - testing --- # The L1 Ledger diff --git a/docs/content/developer/iota-evm/solo/how-tos/the-l2-ledger.md b/docs/content/developer/iota-evm/solo/how-tos/the-l2-ledger.md index de7727d489b..86c90e654a9 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/the-l2-ledger.md +++ b/docs/content/developer/iota-evm/solo/how-tos/the-l2-ledger.md @@ -1,17 +1,11 @@ --- -description: 'Smart contracts can exchange assets between themselves on the same chain and between different chains, as -well as with addresses on the L1 ledger.' +description: Smart contracts can exchange assets between themselves on the same chain and between different chains, as well as with addresses on the L1 ledger. image: /img/logo/WASP_logo_dark.png tags: - -- testing -- solo -- account -- address -- wallet -- balances -- ledger - + - how-to + - evm + - solo + - testing --- # The L2 Ledger diff --git a/docs/content/developer/iota-evm/solo/how-tos/timelock.mdx b/docs/content/developer/iota-evm/solo/how-tos/timelock.mdx index d30cfade07b..8f32b5f197f 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/timelock.mdx +++ b/docs/content/developer/iota-evm/solo/how-tos/timelock.mdx @@ -1,16 +1,11 @@ --- -tags: - - testing - - colored tokens - - time locks - - solo - - plain iotas - - balance - - mint - - delay - description: You can post a time-locked request by using the Delay() method. You can mint NFTs by using the MintNFT() method. image: /img/logo/WASP_logo_dark.png +tags: + - how-to + - evm + - solo + - testing --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/developer/iota-evm/solo/how-tos/view-sc.md b/docs/content/developer/iota-evm/solo/how-tos/view-sc.md index 9650295b3e0..60d34fa961f 100644 --- a/docs/content/developer/iota-evm/solo/how-tos/view-sc.md +++ b/docs/content/developer/iota-evm/solo/how-tos/view-sc.md @@ -2,13 +2,10 @@ description: Calling smart contract view functions with Solo. image: /img/iota-evm/tutorial/call_view.png tags: - - how to - - testing - - solo - - views - - call - - synchronous - - entry points + - how-to + - evm + - solo + - testing --- # Calling a View diff --git a/docs/content/developer/standards/closed-loop-token/action-request.mdx b/docs/content/developer/standards/closed-loop-token/action-request.mdx index 9d7d2498313..2bc9f9a9f91 100644 --- a/docs/content/developer/standards/closed-loop-token/action-request.mdx +++ b/docs/content/developer/standards/closed-loop-token/action-request.mdx @@ -65,7 +65,7 @@ public fun confirm_with_treasury_cap( ): (String, u64, address, Option
); ``` -An example of a transaction implemented in TypeScript with iota.js, confirming an action request with a `TreasuryCap`. Here the admin account owns the `TreasuryCap`, which is used to mint and confirm the transfer request for the token: +An example of a transaction implemented in TypeScript with @iota/iota-sdk, confirming an action request with a `TreasuryCap`. Here the admin account owns the `TreasuryCap`, which is used to mint and confirm the transfer request for the token: ```js let tx = new TransactionBlock(); diff --git a/docs/content/developer/stardust/addresses.mdx b/docs/content/developer/stardust/addresses.mdx index f56dce13c0c..e705d7f780d 100644 --- a/docs/content/developer/stardust/addresses.mdx +++ b/docs/content/developer/stardust/addresses.mdx @@ -1,6 +1,6 @@ --- - title: Addresses and Keys - description: Explains how "previous" addresses are treated in the new ledger +title: Addresses and Keys +description: Explains how "previous" addresses are treated in the new ledger --- ## Addresses diff --git a/docs/content/developer/stardust/advanced.mdx b/docs/content/developer/stardust/advanced.mdx index 4d8a3ac3bda..85e24305d97 100644 --- a/docs/content/developer/stardust/advanced.mdx +++ b/docs/content/developer/stardust/advanced.mdx @@ -1,6 +1,6 @@ --- - title: Advanced Topics - description: Explains how new models can be initialized with migrated stardust aliases and NFTs +title: Advanced Topics +description: Explains how new models can be initialized with migrated stardust aliases and NFTs --- ## Initialization diff --git a/docs/content/developer/stardust/claiming.mdx b/docs/content/developer/stardust/claiming.mdx index 42d36b362b7..3d1e87e6d24 100644 --- a/docs/content/developer/stardust/claiming.mdx +++ b/docs/content/developer/stardust/claiming.mdx @@ -1,6 +1,6 @@ --- - title: Claiming Stardust Assets - description: Describes how to access the migrated assets and tokens +title: Claiming Stardust Assets +description: Describes how to access the migrated assets and tokens --- - Explains the resulting migrated state for simple coins (exchanges) diff --git a/docs/content/developer/stardust/faq.mdx b/docs/content/developer/stardust/faq.mdx index b894a2361db..59510ec5ca3 100644 --- a/docs/content/developer/stardust/faq.mdx +++ b/docs/content/developer/stardust/faq.mdx @@ -1,4 +1,4 @@ --- - title: Frequently Asked Questions - description: Answers to frequently asked questions +title: Frequently Asked Questions +description: Answers to frequently asked questions --- diff --git a/docs/content/developer/stardust/if-tools.mdx b/docs/content/developer/stardust/if-tools.mdx index e0db8f4ed04..29ff9cdc791 100644 --- a/docs/content/developer/stardust/if-tools.mdx +++ b/docs/content/developer/stardust/if-tools.mdx @@ -1,4 +1,4 @@ --- - title: IOTA Foundation Tools - description: Introduces tools developed for users and developers by the IOTA Foundation for the migration. +title: IOTA Foundation Tools +description: Introduces tools developed for users and developers by the IOTA Foundation for the migration. --- \ No newline at end of file diff --git a/docs/content/developer/stardust/testing.mdx b/docs/content/developer/stardust/testing.mdx index 92dd19457f9..f00e0f1b4e4 100644 --- a/docs/content/developer/stardust/testing.mdx +++ b/docs/content/developer/stardust/testing.mdx @@ -1,6 +1,6 @@ --- - title: Testing & Local Development - description: Explains how to test and develop Stardust migration apps locally +title: Testing & Local Development +description: Explains how to test and develop Stardust migration apps locally --- - How to monitor txs, query objects, etc. diff --git a/docs/content/developer/stardust/units.mdx b/docs/content/developer/stardust/units.mdx index c319fd00955..34cd8c58801 100644 --- a/docs/content/developer/stardust/units.mdx +++ b/docs/content/developer/stardust/units.mdx @@ -1,6 +1,6 @@ --- - title: Units and Conversions - description: Explains the units for IOTA and Shimmer tokens +title: Units and Conversions +description: Explains the units for IOTA and Shimmer tokens --- ## IOTA diff --git a/docs/content/developer/stardust/vested.mdx b/docs/content/developer/stardust/vested.mdx index 792180e244c..d56b64a8322 100644 --- a/docs/content/developer/stardust/vested.mdx +++ b/docs/content/developer/stardust/vested.mdx @@ -1,6 +1,6 @@ --- - title: Vested Rewards & Staking - description: Describes how vested rewards can be staked and unstaked. +title: Vested Rewards & Staking +description: Describes how vested rewards can be staked and unstaked. --- - Introduce timelock package diff --git a/docs/content/operator/iota-evm/how-tos/chain-management.md b/docs/content/operator/iota-evm/how-tos/chain-management.md index 7170f63b3a6..8df49333c90 100644 --- a/docs/content/operator/iota-evm/how-tos/chain-management.md +++ b/docs/content/operator/iota-evm/how-tos/chain-management.md @@ -3,12 +3,8 @@ description: 'How to manage a chain using the Grafana dashboard, a client to re validators.' image: /img/logo/WASP_logo_dark.png tags: - - - Smart Contracts - - Chain - - Management - - Grafana - + - how-to + - isc --- # Manage a Chain diff --git a/docs/content/operator/iota-evm/how-tos/running-a-node.md b/docs/content/operator/iota-evm/how-tos/running-a-node.md index 18e1893e952..83dcbf47aae 100644 --- a/docs/content/operator/iota-evm/how-tos/running-a-node.md +++ b/docs/content/operator/iota-evm/how-tos/running-a-node.md @@ -2,15 +2,8 @@ description: How to run a node. Requirements, configuration parameters, dashboard configuration, and tests. image: /img/logo/WASP_logo_dark.png tags: - - Smart Contracts - - Running a node - - Go-lang - - Hornet - - Requirements - - Configuration - - Dashboard - - Grafana - - Prometheus + - how-to + - isc --- # Running a Node diff --git a/docs/content/operator/iota-evm/how-tos/running-an-access-node.mdx b/docs/content/operator/iota-evm/how-tos/running-an-access-node.mdx index 871f528599b..bf0e48e58f4 100644 --- a/docs/content/operator/iota-evm/how-tos/running-an-access-node.mdx +++ b/docs/content/operator/iota-evm/how-tos/running-an-access-node.mdx @@ -2,9 +2,8 @@ description: How to setup an access node. image: /img/logo/WASP_logo_dark.png tags: - - Smart Contracts - - Running a node - - ISC + - how-to + - isc --- import Tabs from '@theme/Tabs'; diff --git a/docs/content/operator/iota-evm/how-tos/setting-up-a-chain.md b/docs/content/operator/iota-evm/how-tos/setting-up-a-chain.md index 1c412a91389..0d0ab473798 100644 --- a/docs/content/operator/iota-evm/how-tos/setting-up-a-chain.md +++ b/docs/content/operator/iota-evm/how-tos/setting-up-a-chain.md @@ -2,12 +2,9 @@ description: 'Setting up a chain: requirements, configuration parameters, validators, and tests.' image: /img/logo/WASP_logo_dark.png tags: - - Smart Contracts - - Chain - - Set up - - Configuration - - Nodes - - Tests + - how-to + - isc + - setup --- # Set Up a Chain diff --git a/docs/content/operator/iota-evm/how-tos/wasp-cli.md b/docs/content/operator/iota-evm/how-tos/wasp-cli.md index a09445e0aaf..3edd7866f65 100644 --- a/docs/content/operator/iota-evm/how-tos/wasp-cli.md +++ b/docs/content/operator/iota-evm/how-tos/wasp-cli.md @@ -2,10 +2,9 @@ description: How to configure wasp-cli. Requirements and configuration parameters. image: /img/logo/WASP_logo_dark.png tags: - - Wasp-cli - - Configuration - - Hornet - - command line + - cli + - how-to + - isc --- # Configure wasp-cli diff --git a/docs/content/operator/iota-evm/reference/configuration.md b/docs/content/operator/iota-evm/reference/configuration.md index 483a12a7f88..a8dbc31e0d7 100755 --- a/docs/content/operator/iota-evm/reference/configuration.md +++ b/docs/content/operator/iota-evm/reference/configuration.md @@ -3,15 +3,6 @@ # This file is auto-generated by the gendoc tool based on the source code of the app. description: This section describes the configuration parameters and their types for WASP. tags: - - IOTA Node - - Hornet Node - - WASP Node - - Smart Contracts - - L2 - - Configuration - - JSON - - Customize - - Config - reference --- diff --git a/docs/content/operator/iota-evm/reference/metrics.md b/docs/content/operator/iota-evm/reference/metrics.md index 5891b555088..b98cee134ff 100644 --- a/docs/content/operator/iota-evm/reference/metrics.md +++ b/docs/content/operator/iota-evm/reference/metrics.md @@ -2,8 +2,6 @@ description: IOTA Smart Contract Protocol is IOTA's solution for running smart contracts on top of the IOTA _tangle_. image: /img/logo/WASP_logo_dark.png tags: - - smart contracts - - metrics - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/accounts.md b/docs/content/references/iota-evm/core-contracts/accounts.md index 9300a6444be..4ddf76bf956 100644 --- a/docs/content/references/iota-evm/core-contracts/accounts.md +++ b/docs/content/references/iota-evm/core-contracts/accounts.md @@ -2,12 +2,8 @@ description: 'The `accounts` contract keeps the ledger of on-chain accounts.' image: /img/logo/WASP_logo_dark.png tags: - - core contracts - - accounts - - deposit - - withdraw - - assets - - balance + - core-contract + - isc-accounts - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/blob.md b/docs/content/references/iota-evm/core-contracts/blob.md index 67e516e2a0a..2bc0cbec425 100644 --- a/docs/content/references/iota-evm/core-contracts/blob.md +++ b/docs/content/references/iota-evm/core-contracts/blob.md @@ -2,13 +2,8 @@ description: The `blobs` contract maintains a registry of _blobs_ (a collection of arbitrary binary data) referenced from smart contracts via their hashes. image: /img/logo/WASP_logo_dark.png tags: - - core contracts - - bloc - - binary data - - store - - get - - entry points - - views + - core-contract + - core-contract-blob - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/blocklog.md b/docs/content/references/iota-evm/core-contracts/blocklog.md index c5dbfd15faa..c1e7e22dc17 100644 --- a/docs/content/references/iota-evm/core-contracts/blocklog.md +++ b/docs/content/references/iota-evm/core-contracts/blocklog.md @@ -2,13 +2,8 @@ description: The `blocklog` contract keeps track of the blocks of requests processed by the chain. image: /img/logo/WASP_logo_dark.png tags: - - core contracts - - blocklog - - views - - information - - request status - - receipts - - events + - core-contract + - core-contract-blocklog - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/errors.md b/docs/content/references/iota-evm/core-contracts/errors.md index e4e5dbb2244..7d8141c3e28 100644 --- a/docs/content/references/iota-evm/core-contracts/errors.md +++ b/docs/content/references/iota-evm/core-contracts/errors.md @@ -3,15 +3,8 @@ description: 'The errors contract keeps a map of error codes to error message te request receipts.' image: /img/logo/WASP_logo_dark.png tags: - -- smart contracts -- core -- root -- initialization -- entry points -- fees -- ownership -- views +- core-contract +- core-contract-errors - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/evm.md b/docs/content/references/iota-evm/core-contracts/evm.md index ff09d50cfbd..f0918bc47d6 100644 --- a/docs/content/references/iota-evm/core-contracts/evm.md +++ b/docs/content/references/iota-evm/core-contracts/evm.md @@ -3,15 +3,8 @@ description: 'The evm core contract provides the necessary infrastructure to acc EVM code.' image: /img/logo/WASP_logo_dark.png tags: - -- smart contracts -- core -- root -- initialization -- entry points -- fees -- ownership -- views +- core-contract +- evm - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/governance.md b/docs/content/references/iota-evm/core-contracts/governance.md index ab8e092379b..398d06f003b 100644 --- a/docs/content/references/iota-evm/core-contracts/governance.md +++ b/docs/content/references/iota-evm/core-contracts/governance.md @@ -3,18 +3,8 @@ description: 'The `governance` contract defines the set of identities that const who is the chain owner, and the fees for request execution.' image: /img/logo/WASP_logo_dark.png tags: - -- core contracts -- governance -- state controller -- identities -- chain owner -- rotate -- remove -- claim -- add -- chain info -- fee info +- core-contract +- core-contract-governance - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/overview.md b/docs/content/references/iota-evm/core-contracts/overview.md index e3d70cd2419..601e509920e 100644 --- a/docs/content/references/iota-evm/core-contracts/overview.md +++ b/docs/content/references/iota-evm/core-contracts/overview.md @@ -2,14 +2,7 @@ description: There currently are 6 core smart contracts that are always deployed on each chain, root, _default, accounts, blob, blocklog, and governance. image: /img/banner/banner_wasp_core_contracts_overview.png tags: - - smart contracts - - core - - initialization - - request handling - - on-chain ledger - - accounts - - data - - receipts + - core-contract - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/root.md b/docs/content/references/iota-evm/core-contracts/root.md index 439e438befb..09450bfd98b 100644 --- a/docs/content/references/iota-evm/core-contracts/root.md +++ b/docs/content/references/iota-evm/core-contracts/root.md @@ -3,15 +3,8 @@ description: 'The root contract is the first smart contract deployed on the chai factory for the chain.' image: /img/logo/WASP_logo_dark.png tags: - -- smart contracts -- core -- root -- initialization -- entry points -- fees -- ownership -- views +- core-contract +- core-contract-root - reference --- diff --git a/docs/content/references/iota-evm/core-contracts/xfer.md b/docs/content/references/iota-evm/core-contracts/xfer.md index 208316b58c8..dc0affd0dce 100644 --- a/docs/content/references/iota-evm/core-contracts/xfer.md +++ b/docs/content/references/iota-evm/core-contracts/xfer.md @@ -2,12 +2,7 @@ description: 'The `transferAccountToChain` contract needs special consideration.' image: /img/logo/WASP_logo_dark.png tags: - - core contracts - - accounts - - deposit - - withdraw - - assets - - balance + - core-contract - reference --- diff --git a/docs/content/references/iota-evm/wasm-lib-data-types.mdx b/docs/content/references/iota-evm/wasm-lib-data-types.mdx index b65983a3444..e7f3bbe790e 100644 --- a/docs/content/references/iota-evm/wasm-lib-data-types.mdx +++ b/docs/content/references/iota-evm/wasm-lib-data-types.mdx @@ -1,12 +1,6 @@ --- tags: - - data types - - WasmLib - - array - - proxies - - map - reference - description: The WasmLib provides direct support for the basic value data types that are found in all programming languages, and WasmLib versions of ISC-specific value data types. image: /img/logo/WASP_logo_dark.png --- diff --git a/docs/content/references/ts-sdk/bcs.mdx b/docs/content/references/ts-sdk/bcs.mdx index 74dfc8966b8..74db26bcf59 100644 --- a/docs/content/references/ts-sdk/bcs.mdx +++ b/docs/content/references/ts-sdk/bcs.mdx @@ -253,7 +253,7 @@ when calling `serialize`. The `output` type can generally be inferred from the d input type will need to be provided explicitly. In some cases, for complex transforms, you'll need to manually type the return -transforms can also handle more complex types. For instance, `@iota/iota.js` uses the following +transforms can also handle more complex types. For instance, `@iota/iota-sdk` uses the following definition to transform enums into a more TypeScript friends format: ```ts diff --git a/docs/content/references/ts-sdk/dapp-kit/index.mdx b/docs/content/references/ts-sdk/dapp-kit/index.mdx index 8fcd6bf3c45..eea63254587 100644 --- a/docs/content/references/ts-sdk/dapp-kit/index.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/index.mdx @@ -21,7 +21,7 @@ Some of the core features of the dApp Kit include: To use the Iota dApp Kit in your project, run the following command in your project root: ```sh npm2yarn -npm i --save @iota/dapp-kit @iota/iota.js @tanstack/react-query +npm i --save @iota/dapp-kit @iota/iota-sdk @tanstack/react-query ``` ## Setting up providers @@ -34,7 +34,7 @@ respective pages. ```tsx import { createNetworkConfig, IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; // Config options for the networks you want to connect to diff --git a/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx b/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx index c44b4e1b1a6..397c7de7b2c 100644 --- a/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx @@ -13,7 +13,7 @@ currently active network. ```tsx import { createNetworkConfig, IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; // Config options for the networks you want to connect to const { networkConfig } = createNetworkConfig({ @@ -49,7 +49,7 @@ The following example demonstrates a `IotaClientProvider` used as a controlled c ```tsx import { createNetworkConfig, IotaClientProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { useState } from 'react'; // Config options for the networks you want to connect to @@ -81,7 +81,7 @@ The following example demonstrates how to create a custom `IotaClient`. ```tsx import { IotaClientProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; // Config options for the networks you want to connect to const networks = { @@ -166,7 +166,7 @@ to get the variables defined in your configuration. import { createNetworkConfig, IotaClientProvider } from '@iota/dapp-kit'; import { createNetworkConfig, IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; // Config options for the networks you want to connect to diff --git a/docs/content/references/ts-sdk/kiosk/from-v1.mdx b/docs/content/references/ts-sdk/kiosk/from-v1.mdx index 6deb4062d0c..3e697ce97ee 100644 --- a/docs/content/references/ts-sdk/kiosk/from-v1.mdx +++ b/docs/content/references/ts-sdk/kiosk/from-v1.mdx @@ -21,7 +21,7 @@ The following example is from the original Kiosk SDK V1 documentation. ```typescript import { placeAndList } from '@iota/kiosk'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const placeAndListToKiosk = async () => { const kiosk = 'SomeKioskId'; @@ -79,7 +79,7 @@ The following example is from the original Kiosk SDK V1 documentation. ```typescript import { createKioskAndShare } from '@iota/kiosk'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const createKiosk = async () => { const accountAddress = '0xSomeIotaAddress'; @@ -126,7 +126,7 @@ The following example is from the original Kiosk SDK V1 documentation. ```typescript import { queryTransferPolicy, purchaseAndResolvePolicies, place, testnetEnvironment } from '@iota/kiosk'; -import { IotaClient } from '@iota/iota.js/client'; +import { IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient( url: 'https://fullnode.testnet.iota.io:443', @@ -245,7 +245,7 @@ import { percentageToBasisPoints, testnetEnvironment, } from '@iota/kiosk'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // Attaches a royalty rule of 1% or 0.1 IOTA (whichever is bigger) // as well as a kiosk lock, making the objects trade-able only from/to a kiosk. diff --git a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx index 7c40976dc6e..4039ef2ceee 100644 --- a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx +++ b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx @@ -19,7 +19,7 @@ require constantly changing the package IDs)._ ```typescript import { KioskClient, Network } from '@iota/kiosk'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // We need a IOTA Client. You can re-use the IotaClient of your project // (it's not recommended to create a new one). diff --git a/docs/content/references/ts-sdk/typescript/bcs.mdx b/docs/content/references/ts-sdk/typescript/bcs.mdx index d17e2d4a9b4..f1cb32ccd84 100644 --- a/docs/content/references/ts-sdk/typescript/bcs.mdx +++ b/docs/content/references/ts-sdk/typescript/bcs.mdx @@ -1,10 +1,10 @@ # BCS -The `@iota/iota.js/bcs` package extends `@iota/bcs` with Iota specific scheme definitions. +The `@iota/iota-sdk/bcs` package extends `@iota/bcs` with Iota specific scheme definitions. To learn more about using BCS see the [BCS documentation](../bcs.mdx). -the `bcs` export of `@iota/iota.js/bcs` contains all the same exports as `bcs` from `@iota/bcs` +the `bcs` export of `@iota/iota-sdk/bcs` contains all the same exports as `bcs` from `@iota/bcs` plus the following pre-defined schemes: - `U8` @@ -44,7 +44,7 @@ All the upper-cased values are `BcsType` instances, and can be used directly to data. ```typescript -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; bcs.U8.serialize(1); bcs.Address.serialize('0x1'); diff --git a/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx b/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx index e49162d0049..32b2203c9ad 100644 --- a/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx +++ b/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx @@ -11,19 +11,19 @@ The IOTA TypeScript SDK supports three signing schemes: | Sign scheme | Class name | Import folder | | --------------- | ------------------ | ----------------------------------- | -| Ed25519 | `Ed25519Keypair` | `@iota/iota.js/keypairs/ed25519` | -| ECDSA Secp256k1 | `Secp256k1Keypair` | `@iota/iota.js/keypairs/secp256k1` | -| ECDSA Secp256r1 | `Secp256r1Keypair` | `@iota/iota.js/keypairs/secp256r1` | +| Ed25519 | `Ed25519Keypair` | `@iota/iota-sdk/keypairs/ed25519` | +| ECDSA Secp256k1 | `Secp256k1Keypair` | `@iota/iota-sdk/keypairs/secp256k1` | +| ECDSA Secp256r1 | `Secp256r1Keypair` | `@iota/iota-sdk/keypairs/secp256r1` | For information on these schemes, see the [Signatures](../../../../developer/cryptography/transaction-auth/signatures.mdx) topic. -To use, import the key pair class your project uses from the `@iota/iota.js/keypairs` folder. For +To use, import the key pair class your project uses from the `@iota/iota-sdk/keypairs` folder. For example, to use the Ed25519 scheme, import the `Ed25519Keypair` class from -`@iota/iota.js/keypairs/ed25519`. +`@iota/iota-sdk/keypairs/ed25519`. ```typescript -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; ``` To create a random key pair (which identifies a Iota address), instantiate a new `Keypair` class. To @@ -55,7 +55,7 @@ to retrieve its associated Iota address. You can access a `Keypair` from its `Pu it from the bytes (as a `Uint8Array`) of the `PublicKey`, as in the following code: ```typescript -import { Ed25519Keypair, Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519Keypair, Ed25519PublicKey } from '@iota/iota-sdk/keypairs/ed25519'; const keypair = new Ed25519Keypair(); const bytes = keypair.getPublicKey().toBytes(); @@ -75,8 +75,8 @@ then verifies the message to retrieve the public key. The code then uses `toIota if the address associated with the public key matches the address that the key pair defines. ```typescript -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { verifyPersonalMessage } from '@iota/iota.js/verify'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { verifyPersonalMessage } from '@iota/iota-sdk/verify'; const keypair = new Ed25519Keypair(); const message = new TextEncoder().encode('hello world'); @@ -96,9 +96,9 @@ Verifying transaction blocks is similar to signature verification, except you us ```typescript // import IotaClient to create a network client and the getFullnodeUrl helper function -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { verifyTransactionBlock } from '@iota/iota.js/verify'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { verifyTransactionBlock } from '@iota/iota-sdk/verify'; // see Network Interactions with IotaClient for more info on creating clients const client = new IotaClient({ url: getFullnodeUrl('testnet') }); @@ -136,8 +136,8 @@ You can derive a `Keypair` by converting the 33-byte secret key encoded in Bech3 `Uint8Array` and passing it to the `fromSecretKey` method of a `Keypair` class. ```typescript -import { decodeIotaPrivateKey, encodeIotaPrivateKey } from '@iota/iota.js/cryptography/keypair'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import { decodeIotaPrivateKey, encodeIotaPrivateKey } from '@iota/iota-sdk/cryptography/keypair'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; const encoded = encodeIotaPrivateKey( [ @@ -161,8 +161,8 @@ converting the secret key to a `Uint8Array` and passing it to the `fromSecretKey `Keypair` class. ```typescript -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { fromHex } from '@iota/iota.js/utils'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { fromHex } from '@iota/iota-sdk/utils'; const secret = '0x...'; const keypair = Ed25519Keypair.fromSecretKey(fromHex(secret)); diff --git a/docs/content/references/ts-sdk/typescript/cryptography/multisig.mdx b/docs/content/references/ts-sdk/typescript/cryptography/multisig.mdx index 8b249ca6563..202fcbdbf73 100644 --- a/docs/content/references/ts-sdk/typescript/cryptography/multisig.mdx +++ b/docs/content/references/ts-sdk/typescript/cryptography/multisig.mdx @@ -15,8 +15,8 @@ transaction is equal to or greater than the threshold value, then the IOTA netwo transdaction valid. ```typescript -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { MultiSigPublicKey } from '@iota/iota.js/multisig'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { MultiSigPublicKey } from '@iota/iota-sdk/multisig'; const kp1 = new Ed25519Keypair(); const kp2 = new Ed25519Keypair(); diff --git a/docs/content/references/ts-sdk/typescript/faucet.mdx b/docs/content/references/ts-sdk/typescript/faucet.mdx index b577899869d..76662bcdd23 100644 --- a/docs/content/references/ts-sdk/typescript/faucet.mdx +++ b/docs/content/references/ts-sdk/typescript/faucet.mdx @@ -6,10 +6,10 @@ Devnet, Testnet, and local networks include faucets that mint IOTA. You can use SDK to call a network's faucet and provide IOTA to the address you provide. To request IOTA from a faucet, import the `requestIotaFromFaucetV0` function from the -`@iota/iota.js/faucet` package to your project. +`@iota/iota-sdk/faucet` package to your project. ```typescript -import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota.js/faucet'; +import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota-sdk/faucet'; ``` Use `requestIotaFromFaucetV0` in your TypeScript code to request IOTA from the network's faucet. diff --git a/docs/content/references/ts-sdk/typescript/hello-iota.mdx b/docs/content/references/ts-sdk/typescript/hello-iota.mdx index 233d87e47cd..834a3f4f8e0 100644 --- a/docs/content/references/ts-sdk/typescript/hello-iota.mdx +++ b/docs/content/references/ts-sdk/typescript/hello-iota.mdx @@ -33,15 +33,15 @@ When you use a package manager to install the necessary packages, it downloads t doesn't already exist. For this example, you need only the IOTA TypeScript SDK: ```sh npm2yarn -npm i -D @iota/iota.js +npm i -D @iota/iota-sdk ``` -Your `package.json` file now has a _dependencies_ section with `@iota/iota.js` listed with the +Your `package.json` file now has a _dependencies_ section with `@iota/iota-sdk` listed with the package version number. ```json "dependencies": { - "@iota/iota.js": "^" + "@iota/iota-sdk": "^" } ``` @@ -55,9 +55,9 @@ Create a new `index.js` file in the root of your project with the following code ```js -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { getFaucetHost, requestIotaFromFaucetv1 } from '@iota/iota.js/faucet'; -import { NANOS_PER_IOTA } from '@iota/iota.js/utils'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { getFaucetHost, requestIotaFromFaucetv1 } from '@iota/iota-sdk/faucet'; +import { NANOS_PER_IOTA } from '@iota/iota-sdk/utils'; // replace with your actual address, which is in the form 0x123... const MY_ADDRESS = ''; diff --git a/docs/content/references/ts-sdk/typescript/index.mdx b/docs/content/references/ts-sdk/typescript/index.mdx index c80d856c43d..00b924ab0c1 100644 --- a/docs/content/references/ts-sdk/typescript/index.mdx +++ b/docs/content/references/ts-sdk/typescript/index.mdx @@ -8,7 +8,7 @@ to send queries to RPC nodes, build and sign transactions, and interact with a I ## Installation ```sh npm2yarn -npm i @iota/iota.js +npm i @iota/iota-sdk ``` ## Network locations @@ -64,7 +64,7 @@ The IOTA TypeScript SDK deprecates the following classes with version 0.38.0: have been deprecated in favor of using `iotaClient` for establishing the connection. See [Network Interactions with IotaClient](./iota-client.mdx) for more information. - The `superstruct` type definitions for `JsonRPCProvider` types are replaced with generated types - exported from `@iota/iota.js/client`. The new type definitions are pure TypeScript types that + exported from `@iota/iota-sdk/client`. The new type definitions are pure TypeScript types that you can't use for runtime validation. - A more stable JSON-RPC API has reduced the need for many of the SDK "getter" methods, which are now deprecated. @@ -79,11 +79,11 @@ pattern. For an example of transaction signing, see the The ability to request IOTA from a faucet is not part of `IotaClient` as it was with `JsonRpcProvider`. Instead, you must use the `requestIotaFromFaucetV0` method from -`@iota/iota.js/faucet`. The `@iota/iota.js/faucet` import also provides a `getFaucetHost` method +`@iota/iota-sdk/faucet`. The `@iota/iota-sdk/faucet` import also provides a `getFaucetHost` method to retrieve the faucet URL for `localnet`, `testnet`, or `devnet` networks. ```ts -import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota.js/faucet'; +import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota-sdk/faucet'; await requestIotaFromFaucetV0({ host: getFaucetHost('devnet'), @@ -96,18 +96,18 @@ await requestIotaFromFaucetV0({ The SDK contains a set of modular packages that you can use independently or together. Import just what you need to keep your code light and compact. -- [`@iota/iota.js/client`](./iota-client.mdx) - A client for interacting with IOTA RPC nodes. -- [`@iota/iota.js/bcs`](bcs.mdx) - A BCS builder with pre-defined types for IOTA. -- [`@iota/iota.js/transaction`](./transaction-building/basics.mdx) - Utilities for building +- [`@iota/iota-sdk/client`](./iota-client.mdx) - A client for interacting with IOTA RPC nodes. +- [`@iota/iota-sdk/bcs`](bcs.mdx) - A BCS builder with pre-defined types for IOTA. +- [`@iota/iota-sdk/transaction`](./transaction-building/basics.mdx) - Utilities for building and interacting with transactions. -- [`@iota/iota.js/keypairs/*`](./cryptography/keypairs.mdx) - Modular exports for specific +- [`@iota/iota-sdk/keypairs/*`](./cryptography/keypairs.mdx) - Modular exports for specific KeyPair implementations. -- [`@iota/iota.js/verify`](./cryptography/keypairs.mdx#verifying-signatures-without-a-key-pair) - +- [`@iota/iota-sdk/verify`](./cryptography/keypairs.mdx#verifying-signatures-without-a-key-pair) - Methods for verifying transactions and messages. -- [`@iota/iota.js/cryptography`](./cryptography/keypairs.mdx) - Shared types and classes +- [`@iota/iota-sdk/cryptography`](./cryptography/keypairs.mdx) - Shared types and classes for cryptography. -- [`@iota/iota.js/multisig`](./cryptography/multisig.mdx) - Utilities for working with +- [`@iota/iota-sdk/multisig`](./cryptography/multisig.mdx) - Utilities for working with multisig signatures. -- [`@iota/iota.js/utils`](./utils.mdx) - Utilities for formatting and parsing various IOTA +- [`@iota/iota-sdk/utils`](./utils.mdx) - Utilities for formatting and parsing various IOTA types. -- [`@iota/iota.js/faucet`](./faucet.mdx) - Methods for requesting IOTA from a faucet. \ No newline at end of file +- [`@iota/iota-sdk/faucet`](./faucet.mdx) - Methods for requesting IOTA from a faucet. \ No newline at end of file diff --git a/docs/content/references/ts-sdk/typescript/install.mdx b/docs/content/references/ts-sdk/typescript/install.mdx index bbf3ff7a0e9..c041f440d80 100644 --- a/docs/content/references/ts-sdk/typescript/install.mdx +++ b/docs/content/references/ts-sdk/typescript/install.mdx @@ -8,7 +8,7 @@ The IOTA TypeScript SDK is available in the To use the IOTA TypeScript SDK in your project, run the following command in your project root: ```sh npm2yarn -npm i @iota/iota.js +npm i @iota/iota-sdk ``` ## Experimental tag for use with a local IOTA network @@ -21,7 +21,7 @@ relevant JSON-RPC. If your developing against a it contains the latest features (or a local build detailed in the section that follows). ```sh npm2yarn -npm i @iota/iota.js@experimental +npm i @iota/iota-sdk@experimental ``` ## Install from local build diff --git a/docs/content/references/ts-sdk/typescript/iota-client.mdx b/docs/content/references/ts-sdk/typescript/iota-client.mdx index 6e6bf308360..708de02725e 100644 --- a/docs/content/references/ts-sdk/typescript/iota-client.mdx +++ b/docs/content/references/ts-sdk/typescript/iota-client.mdx @@ -5,12 +5,12 @@ The IOTA TypeScript SDK provides a `IotaClient` class to connect to a network's ## Connecting to an IOTA network -To establish a connection to a network, import `IotaClient` from `@iota/iota.js/client` and pass the +To establish a connection to a network, import `IotaClient` from `@iota/iota-sdk/client` and pass the relevant URL to the `url` parameter. The following example establishes a connection to Testnet and requests IOTA from that network's faucet. ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // use getFullnodeUrl to define Devnet RPC location const rpcUrl = getFullnodeUrl('devnet'); @@ -46,7 +46,7 @@ methods are built into `IotaClient`, but you can use `call` to leverage any meth RPC. ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('devnet') }); @@ -62,7 +62,7 @@ For a full list of available RPC methods, see the In addition to calling RPC methods, you can use `IotaClient` to subscribe to network events: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -90,7 +90,7 @@ IotaClient. You can either use a global polyfill for the WebSocket class, or pas WebSocket implementation into IotaHTTPTransport (eg, using the `ws` package) ```typescript -import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; import { WebSocket } from 'ws'; new IotaClient({ @@ -107,7 +107,7 @@ new IotaClient({ Similar to subscribing to events, the `IotaClient` also supports subscribing to transactions: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -134,7 +134,7 @@ You can construct a custom transport instance if you need to pass any custom opt headers or timeout values. ```typescript -import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; const client = new IotaClient({ transport: new IotaHTTPTransport({ diff --git a/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx b/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx index 88dcb1f815e..e79891fd2e9 100644 --- a/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx +++ b/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx @@ -30,9 +30,9 @@ coins to your address: ```ts -import { IotaClient } from '@iota/iota.js/client/'; -import type { IotaObjectRef, IotaObjectResponse } from '@iota/iota.js/client/'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { IotaClient } from '@iota/iota-sdk/client/'; +import type { IotaObjectRef, IotaObjectResponse } from '@iota/iota-sdk/client/'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const client = new IotaClient({ url: 'https://fullnode.testnet.iota.io:443', diff --git a/docs/content/references/ts-sdk/typescript/owned-object-pool/overview.mdx b/docs/content/references/ts-sdk/typescript/owned-object-pool/overview.mdx index 5f83487ccc0..18ffccbdb01 100644 --- a/docs/content/references/ts-sdk/typescript/owned-object-pool/overview.mdx +++ b/docs/content/references/ts-sdk/typescript/owned-object-pool/overview.mdx @@ -66,10 +66,10 @@ transaction. If you need IOTA for a test network, you can [use a faucet](../../../../developer/getting-started/get-coins.mdx) to mint some. ```ts -import { IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64 } from '@iota/iota.js/utils'; +import { IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64 } from '@iota/iota-sdk/utils'; /* HERE ARE DEFINED THE PREPARATORY STEPS IF YOU WANT TO CODE ALONG*/ // Define the transaction block diff --git a/docs/content/references/ts-sdk/typescript/transaction-building/basics.mdx b/docs/content/references/ts-sdk/typescript/transaction-building/basics.mdx index 3489b904462..093822c6b1f 100644 --- a/docs/content/references/ts-sdk/typescript/transaction-building/basics.mdx +++ b/docs/content/references/ts-sdk/typescript/transaction-building/basics.mdx @@ -4,7 +4,7 @@ This example starts by constructing a transaction block to send IOTA. To constru blocks, import the `TransactionBlock` class and construct it: ```tsx -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const txb = new TransactionBlock(); ``` diff --git a/docs/content/references/ts-sdk/typescript/transaction-building/offline.mdx b/docs/content/references/ts-sdk/typescript/transaction-building/offline.mdx index 78912892ca6..4ab67d42484 100644 --- a/docs/content/references/ts-sdk/typescript/transaction-building/offline.mdx +++ b/docs/content/references/ts-sdk/typescript/transaction-building/offline.mdx @@ -6,7 +6,7 @@ provide a `Uint8Array` which is used directly in the transaction. For objects, y `Inputs` helper to construct an object reference. ```tsx -import { Inputs } from '@iota/iota.js/transactions'; +import { Inputs } from '@iota/iota-sdk/transactions'; // for pure values txb.pure(pureValueAsBytes); diff --git a/docs/content/references/ts-sdk/typescript/utils.mdx b/docs/content/references/ts-sdk/typescript/utils.mdx index cbc7fe1a669..870c55aa2ff 100644 --- a/docs/content/references/ts-sdk/typescript/utils.mdx +++ b/docs/content/references/ts-sdk/typescript/utils.mdx @@ -1,4 +1,4 @@ -# The `@iota/iota.js/utils` package +# The `@iota/iota-sdk/utils` package This package contains some utilities that simplify common operations when working with the IOTA TypeScript SDK. diff --git a/docs/content/tags.yml b/docs/content/tags.yml new file mode 100644 index 00000000000..0c178717ed7 --- /dev/null +++ b/docs/content/tags.yml @@ -0,0 +1,212 @@ +# Add tags that are used in the documentation here. +# Tags are used to categorize content and make it easier to find. +# Tags should be in alphabetical order and kebab-case. + +# Diataxis +explanation: + label: Explanation + description: Content that explains and helps understand a concept. + +how-to: + label: How-To + description: Goal orientated direction. + +reference: + label: Reference + description: Technical documentation. + +tutorial: + label: Tutorial + description: Learning orientated guide. + +# Programming languages +move: + label: Move + description: Move programming language. + +python: + label: Python + description: Python programming language. + +rust: + label: Rust + description: Rust programming language. + +solidity: + label: Solidity + description: Solidity programming language. + +typescript: + label: TypeScript + description: TypeScript programming language. + +# VMs +evm: + label: EVM + description: Ethereum Virtual Machine. + +move-vm: + label: Move VM + description: Move Virtual Machine. + +# Networks +devnet: + label: Devnet + description: Development network. + +mainnet: + label: Mainnet + description: Main network. + +testnet: + label: Testnet + description: Test network. + +# Node +access-node: + label: Access Node + description: Node that provides access to the network. + +pruning: + label: Pruning + +rpc: + label: RPC + description: Remote Procedure Call. + +snapshot: + label: Snapshot + +validator: + label: Validator + description: Node that validates transactions. + +# ISC +allowance: + label: Allowance + description: Allowance for L1 interactions. + +core-contract: + label: Core Contract + description: Core Contract for interacting with L1. + +core-contract-blob: + label: Blob Core Contract + +core-contract-blocklog: + label: Blocklog Core Contract + +core-contract-errors: + label: Errors Core Contract + +core-contract-governance: + label: Governance Core Contract + +core-contract-root: + label: Root Core Contract + +erc20: + label: ERC20 + description: ERC20 token standard. + +erc721: + label: ERC721 + description: ERC721 token standard. + +isc: + label: ISC + description: IOTA L2 Smart Contracts. + +isc-accounts: + label: ISC Accounts + description: IOTA Smart Contract accounts. + +magic: + label: Magic Smart Contract + description: Magic Smart Contract. + +off-ledger: + label: Off-Ledger Request + description: Off-Ledger Request. + +on-ledger: + label: On-Ledger Request + description: On-Ledger Request. + +schema: + label: Schema Tool + description: Schema Tool for ISC WASM. + +solo: + label: Solo Testing Tool + description: Solo Testing Tool for ISC. + +# Crypto +address: + label: Address + description: Identifier for a wallet. + +balance: + label: Balance + description: Amount of tokens. + +consensus: + label: Consensus + description: Agreement among a group of people. + +faucet: + label: Faucet + description: Service that provides tokens. + +native-token: + label: Native Token + description: Token on L1. + +nft: + label: NFT + description: Non-fungible token. + +state: + label: State + description: Current condition of a system. + +# Development +sdk: + label: SDK + description: Software Development Kit. + +cli: + label: CLI + description: Command Line Interface. + +crates: + label: Crates + description: The IOTA Rust crates. + +getting-started: + label: Getting Started + description: Initial steps to start using IOTA. + +install: + label: Install + description: Add to a system. + +quickstart: + label: Quickstart + description: Get started quickly. + +randomness: + label: Randomness + description: On chain randomness. + +repository: + label: Repository + description: The IOTA repository. + +setup: + label: Setup + description: Prepare for use. + +testing: + label: Testing + description: Process of evaluating code. diff --git a/docs/site/docusaurus.config.js b/docs/site/docusaurus.config.js index 6c401d13468..ff18188ed04 100644 --- a/docs/site/docusaurus.config.js +++ b/docs/site/docusaurus.config.js @@ -28,7 +28,7 @@ const config = { onBrokenLinks: "throw", onBrokenMarkdownLinks: "throw", - onBrokenAnchors: "throw", + onBrokenAnchors: "warn", // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you @@ -89,6 +89,8 @@ const config = { sidebarPath: require.resolve("./sidebars.js"), // the double docs below is a fix for having the path set to ../content editUrl: "https://github.com/iotaledger/iota/tree/develop/docs/docs", + onInlineTags: "throw", + /*disableVersioning: true, lastVersion: "current", versions: { diff --git a/docs/site/package.json b/docs/site/package.json index ad1105deb53..5665f2419fe 100644 --- a/docs/site/package.json +++ b/docs/site/package.json @@ -31,7 +31,7 @@ "@graphql-markdown/docusaurus": "^1.24.1", "@graphql-tools/graphql-file-loader": "^8.0.1", "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@mdx-js/react": "^3.0.1", "@mui/material": "^5.15.19", "@tanstack/react-query": "^5.0.0", diff --git a/docs/site/src/components/sdk-examples/wallet-components.tsx b/docs/site/src/components/sdk-examples/wallet-components.tsx index d55beb3b423..1c568d53d12 100644 --- a/docs/site/src/components/sdk-examples/wallet-components.tsx +++ b/docs/site/src/components/sdk-examples/wallet-components.tsx @@ -9,7 +9,7 @@ import { useCurrentAccount, WalletProvider, } from '@iota/dapp-kit'; -import { getDefaultNetwork, getFullnodeUrl } from '@iota/iota.js/client'; +import { getDefaultNetwork, getFullnodeUrl } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useMemo, useState } from 'react'; diff --git a/docs/site/src/components/sdk-examples/wallet-hooks.tsx b/docs/site/src/components/sdk-examples/wallet-hooks.tsx index 8670b4cc800..46af03ae9f8 100644 --- a/docs/site/src/components/sdk-examples/wallet-hooks.tsx +++ b/docs/site/src/components/sdk-examples/wallet-hooks.tsx @@ -18,8 +18,8 @@ import { useWallets, WalletProvider, } from '@iota/dapp-kit'; -import { getFullnodeUrl } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { ComponentProps } from 'react'; import { useEffect, useState } from 'react'; diff --git a/examples/trading/api/helpers/cancel-escrow.ts b/examples/trading/api/helpers/cancel-escrow.ts index c004fa72524..640a035adf0 100644 --- a/examples/trading/api/helpers/cancel-escrow.ts +++ b/examples/trading/api/helpers/cancel-escrow.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { CONFIG } from '../config'; import { getActiveAddress, signAndExecute } from '../iota-utils'; diff --git a/examples/trading/api/helpers/create-demo-data.ts b/examples/trading/api/helpers/create-demo-data.ts index a60729bcc5b..1ac7f95638b 100644 --- a/examples/trading/api/helpers/create-demo-data.ts +++ b/examples/trading/api/helpers/create-demo-data.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { CONFIG } from '../config'; import { ACTIVE_NETWORK, getActiveAddress, signAndExecute } from '../iota-utils'; diff --git a/examples/trading/api/helpers/create-demo-escrows.ts b/examples/trading/api/helpers/create-demo-escrows.ts index bea2df250de..b52d0442563 100644 --- a/examples/trading/api/helpers/create-demo-escrows.ts +++ b/examples/trading/api/helpers/create-demo-escrows.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { CONFIG } from '../config'; import { getActiveAddress, getClient, signAndExecute } from '../iota-utils'; diff --git a/examples/trading/api/indexer/escrow-handler.ts b/examples/trading/api/indexer/escrow-handler.ts index c8a37add778..b8188b3f4ad 100644 --- a/examples/trading/api/indexer/escrow-handler.ts +++ b/examples/trading/api/indexer/escrow-handler.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaEvent } from '@iota/iota.js/client'; +import { IotaEvent } from '@iota/iota-sdk/client'; import { Prisma } from '@prisma/client'; import { prisma } from '../db'; diff --git a/examples/trading/api/indexer/event-indexer.ts b/examples/trading/api/indexer/event-indexer.ts index a64571608c5..b1f32ecb550 100644 --- a/examples/trading/api/indexer/event-indexer.ts +++ b/examples/trading/api/indexer/event-indexer.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { EventId, IotaClient, IotaEvent, IotaEventFilter } from '@iota/iota.js/client'; +import { EventId, IotaClient, IotaEvent, IotaEventFilter } from '@iota/iota-sdk/client'; import { CONFIG } from '../config'; import { prisma } from '../db'; diff --git a/examples/trading/api/indexer/locked-handler.ts b/examples/trading/api/indexer/locked-handler.ts index 9446a0dfc9c..9b209af1bd2 100644 --- a/examples/trading/api/indexer/locked-handler.ts +++ b/examples/trading/api/indexer/locked-handler.ts @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaEvent } from '@iota/iota.js/client'; +import { IotaEvent } from '@iota/iota-sdk/client'; import { Prisma } from '@prisma/client'; import { prisma } from '../db'; diff --git a/examples/trading/api/iota-utils.ts b/examples/trading/api/iota-utils.ts index 21c1351216b..124e618d68c 100644 --- a/examples/trading/api/iota-utils.ts +++ b/examples/trading/api/iota-utils.ts @@ -6,10 +6,10 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { homedir } from 'os'; import path from 'path'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64 } from '@iota/iota.js/utils'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { fromB64 } from '@iota/iota-sdk/utils'; export type Network = 'mainnet' | 'testnet' | 'devnet' | 'localnet'; diff --git a/examples/trading/api/package.json b/examples/trading/api/package.json index 8bf9a23eb63..383a975bc5f 100644 --- a/examples/trading/api/package.json +++ b/examples/trading/api/package.json @@ -25,7 +25,7 @@ "typescript": "^5.3.3" }, "dependencies": { - "@iota/iota.js": "^0.50.1", + "@iota/iota-sdk": "^0.50.1", "@prisma/client": "^5.8.1", "cors": "^2.8.5", "express": "^4.18.2" diff --git a/examples/trading/api/pnpm-lock.yaml b/examples/trading/api/pnpm-lock.yaml index d12b35c1c71..3efa4fa63ab 100644 --- a/examples/trading/api/pnpm-lock.yaml +++ b/examples/trading/api/pnpm-lock.yaml @@ -5,7 +5,7 @@ settings: excludeLinksFromLockfile: false dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: ^0.50.1 version: 0.50.1 '@prisma/client': @@ -98,7 +98,7 @@ packages: bs58: 5.0.0 dev: false - /@iota/iota.js@0.50.1: + /@iota/iota-sdk@0.50.1: resolution: {integrity: sha512-AY0wb4n6PMTRsDGygzrrTHUK/m5KwKZ4aQcN9cayiwsq2iIhfjGo7uuqMA7Y5UiqvLCoF+z7Ig14Q5qejQ/S/w==} engines: {node: '>=16'} dependencies: diff --git a/examples/trading/frontend/package.json b/examples/trading/frontend/package.json index 0cd86052fdf..4b2ef73d28a 100644 --- a/examples/trading/frontend/package.json +++ b/examples/trading/frontend/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@iota/dapp-kit": "^0.12.2", - "@iota/iota.js": "^0.50.1", + "@iota/iota-sdk": "^0.50.1", "@radix-ui/colors": "^3.0.0", "@radix-ui/react-icons": "^1.3.0", "@radix-ui/themes": "^2.0.0", diff --git a/examples/trading/frontend/pnpm-lock.yaml b/examples/trading/frontend/pnpm-lock.yaml index c0500461ea2..718eb2d9c87 100644 --- a/examples/trading/frontend/pnpm-lock.yaml +++ b/examples/trading/frontend/pnpm-lock.yaml @@ -8,7 +8,7 @@ dependencies: "@iota/dapp-kit": specifier: ^0.12.2 version: 0.12.2(@tanstack/react-query@5.0.0)(@types/react-dom@18.2.7)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0) - "@iota/iota.js": + "@iota/iota-sdk": specifier: ^0.50.1 version: 0.50.1 "@radix-ui/colors": @@ -601,7 +601,7 @@ packages: "@tanstack/react-query": ^5.0.0 react: "*" dependencies: - "@iota/iota.js": 0.50.1 + "@iota/iota-sdk": 0.50.1 "@iota/wallet-standard": 0.10.3 "@iota/zksend": 0.2.2 "@radix-ui/react-dialog": 1.0.5(@types/react-dom@18.2.7)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0) @@ -621,7 +621,7 @@ packages: - react-dom dev: false - /@iota/iota.js@0.50.1: + /@iota/iota-sdk@0.50.1: resolution: { integrity: sha512-AY0wb4n6PMTRsDGygzrrTHUK/m5KwKZ4aQcN9cayiwsq2iIhfjGo7uuqMA7Y5UiqvLCoF+z7Ig14Q5qejQ/S/w==, @@ -648,7 +648,7 @@ packages: integrity: sha512-StEMbJ7YkdjxoScmOJJjt9JaNgoRLD3FgU4LGFrKFtMXOhPu1Z4WF3qgfYBr+C3UgDh+JNiDIfN9TiGeM/Ahpw==, } dependencies: - "@iota/iota.js": 0.50.1 + "@iota/iota-sdk": 0.50.1 "@wallet-standard/core": 1.0.3 dev: false @@ -658,7 +658,7 @@ packages: integrity: sha512-T5CXU8Bmtbq1mMDgi3gCpDEVn+2XbjgmjzIW5XifMnjMdlBvM4EvQJr6Mr0dneKv3qgBMKoEkmRIKW3f+etnGg==, } dependencies: - "@iota/iota.js": 0.50.1 + "@iota/iota-sdk": 0.50.1 "@iota/wallet-standard": 0.10.3 mitt: 3.0.1 nanostores: 0.9.5 diff --git a/examples/trading/frontend/src/components/ExplorerLink.tsx b/examples/trading/frontend/src/components/ExplorerLink.tsx index 80594bf653c..6ddea3f9264 100644 --- a/examples/trading/frontend/src/components/ExplorerLink.tsx +++ b/examples/trading/frontend/src/components/ExplorerLink.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClientContext } from "@iota/dapp-kit"; -import { formatAddress } from "@iota/iota.js/utils"; +import { formatAddress } from "@iota/iota-sdk/utils"; import { CheckIcon, CopyIcon } from "@radix-ui/react-icons"; import { useState } from "react"; import toast from "react-hot-toast"; diff --git a/examples/trading/frontend/src/components/IotaObjectDisplay.tsx b/examples/trading/frontend/src/components/IotaObjectDisplay.tsx index b7a5bbfbf5f..1ac73488654 100644 --- a/examples/trading/frontend/src/components/IotaObjectDisplay.tsx +++ b/examples/trading/frontend/src/components/IotaObjectDisplay.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaObjectData } from "@iota/iota.js/client"; +import { IotaObjectData } from "@iota/iota-sdk/client"; import { Avatar, Box, Card, Flex, Inset, Text } from "@radix-ui/themes"; import { ReactNode } from "react"; import { ExplorerLink } from "./ExplorerLink"; diff --git a/examples/trading/frontend/src/components/escrows/CreateEscrow.tsx b/examples/trading/frontend/src/components/escrows/CreateEscrow.tsx index 9154cd1a22a..5d5a77d1168 100644 --- a/examples/trading/frontend/src/components/escrows/CreateEscrow.tsx +++ b/examples/trading/frontend/src/components/escrows/CreateEscrow.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ApiLockedObject } from "@/types/types"; import { useCurrentAccount, useIotaClientInfiniteQuery } from "@iota/dapp-kit"; -import { formatAddress } from "@iota/iota.js/utils"; +import { formatAddress } from "@iota/iota-sdk/utils"; import { Avatar, Button, Select } from "@radix-ui/themes"; import { InfiniteScrollArea } from "@/components/InfiniteScrollArea"; import { useState } from "react"; diff --git a/examples/trading/frontend/src/components/locked/LockedObject.tsx b/examples/trading/frontend/src/components/locked/LockedObject.tsx index e2a74384625..c77ca7b918d 100644 --- a/examples/trading/frontend/src/components/locked/LockedObject.tsx +++ b/examples/trading/frontend/src/components/locked/LockedObject.tsx @@ -5,7 +5,7 @@ import { CONSTANTS } from "@/constants"; import { useIotaClientQuery } from "@iota/dapp-kit"; import { Locked } from "./partials/Locked"; -import { IotaObjectData } from "@iota/iota.js/client"; +import { IotaObjectData } from "@iota/iota-sdk/client"; /** * Acts as a wrapper between the `Locked` object fetched from API diff --git a/examples/trading/frontend/src/hooks/useTransactionExecution.ts b/examples/trading/frontend/src/hooks/useTransactionExecution.ts index cbbc63dc151..7afa04e01d3 100644 --- a/examples/trading/frontend/src/hooks/useTransactionExecution.ts +++ b/examples/trading/frontend/src/hooks/useTransactionExecution.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import { useSignTransactionBlock, useIotaClient } from "@iota/dapp-kit"; -import { IotaTransactionBlockResponse } from "@iota/iota.js/client"; -import { TransactionBlock } from "@iota/iota.js/transactions"; +import { IotaTransactionBlockResponse } from "@iota/iota-sdk/client"; +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import toast from "react-hot-toast"; /** diff --git a/examples/trading/frontend/src/main.tsx b/examples/trading/frontend/src/main.tsx index 4829bed6133..49f7874f5f7 100644 --- a/examples/trading/frontend/src/main.tsx +++ b/examples/trading/frontend/src/main.tsx @@ -7,7 +7,7 @@ import "@iota/dapp-kit/dist/index.css"; import "@radix-ui/themes/styles.css"; import "./styles/base.css"; -import { getFullnodeUrl } from "@iota/iota.js/client"; +import { getFullnodeUrl } from "@iota/iota-sdk/client"; import { IotaClientProvider, WalletProvider, diff --git a/examples/trading/frontend/src/mutations/demo.ts b/examples/trading/frontend/src/mutations/demo.ts index 9d93b238621..b2962f25ced 100644 --- a/examples/trading/frontend/src/mutations/demo.ts +++ b/examples/trading/frontend/src/mutations/demo.ts @@ -5,7 +5,7 @@ import { CONSTANTS, QueryKey } from "@/constants"; import { useTransactionExecution } from "@/hooks/useTransactionExecution"; import { useCurrentAccount } from "@iota/dapp-kit"; -import { TransactionBlock } from "@iota/iota.js/transactions"; +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import { useMutation, useQueryClient } from "@tanstack/react-query"; /** diff --git a/examples/trading/frontend/src/mutations/escrow.ts b/examples/trading/frontend/src/mutations/escrow.ts index bbc255d0d32..fa71bd930f1 100644 --- a/examples/trading/frontend/src/mutations/escrow.ts +++ b/examples/trading/frontend/src/mutations/escrow.ts @@ -6,8 +6,8 @@ import { CONSTANTS, QueryKey } from "@/constants"; import { useTransactionExecution } from "@/hooks/useTransactionExecution"; import { ApiEscrowObject, ApiLockedObject } from "@/types/types"; import { useCurrentAccount, useIotaClient } from "@iota/dapp-kit"; -import { IotaObjectData } from "@iota/iota.js/client"; -import { TransactionBlock } from "@iota/iota.js/transactions"; +import { IotaObjectData } from "@iota/iota-sdk/client"; +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import { useMutation, useQueryClient } from "@tanstack/react-query"; /** diff --git a/examples/trading/frontend/src/mutations/locked.ts b/examples/trading/frontend/src/mutations/locked.ts index 36f9a916f3b..adbfe0f6e3d 100644 --- a/examples/trading/frontend/src/mutations/locked.ts +++ b/examples/trading/frontend/src/mutations/locked.ts @@ -5,8 +5,8 @@ import { CONSTANTS, QueryKey } from "@/constants"; import { useTransactionExecution } from "@/hooks/useTransactionExecution"; import { useCurrentAccount, useIotaClient } from "@iota/dapp-kit"; -import { IotaObjectData } from "@iota/iota.js/client"; -import { TransactionBlock } from "@iota/iota.js/transactions"; +import { IotaObjectData } from "@iota/iota-sdk/client"; +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import toast from "react-hot-toast"; diff --git a/package.json b/package.json index a01b6ca1d26..6767038ef49 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "bcs": "turbo --filter ./sdk/bcs", "apps-backend": "turbo --filter apps-backend", "iota-docs": "turbo --filter iota-docs", - "changeset-version": "pnpm changeset version && pnpm --filter @iota/iota.js codegen:version", + "changeset-version": "pnpm changeset version && pnpm --filter @iota/iota-sdk codegen:version", "prettier:check": "prettier -c --ignore-unknown .", "prettier:fix": "prettier -w --ignore-unknown .", "prettier:fix:watch": "onchange '**' -i -f add -f change -j 5 -- prettier -w --ignore-unknown {{file}}", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dccffcb4b77..fe4744c8f02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,7 +102,7 @@ importers: apps/apps-backend: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@nestjs/cache-manager': @@ -214,7 +214,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../sdk/dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@iota/kiosk': @@ -314,7 +314,7 @@ importers: '@iota/icons': specifier: workspace:* version: link:../icons - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@iota/ui': @@ -764,7 +764,7 @@ importers: '@iota/icons': specifier: workspace:* version: link:../icons - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@iota/kiosk': @@ -1086,7 +1086,7 @@ importers: '@iota/icons': specifier: workspace:* version: link:../icons - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@tanstack/react-query': @@ -1144,7 +1144,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../sdk/dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@iota/kiosk': @@ -1199,7 +1199,7 @@ importers: dapps/kiosk-cli: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@iota/kiosk': @@ -1278,7 +1278,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../sdk/dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@tailwindcss/forms': @@ -1330,7 +1330,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../sdk/dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@types/react': @@ -1399,7 +1399,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../sdk/dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../sdk/typescript '@mdx-js/react': @@ -1564,7 +1564,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript '@types/node': @@ -1586,7 +1586,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../../dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../../typescript '@radix-ui/colors': @@ -1647,7 +1647,7 @@ importers: '@iota/dapp-kit': specifier: workspace:* version: link:../../../dapp-kit - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../../../typescript '@radix-ui/colors': @@ -1705,7 +1705,7 @@ importers: sdk/dapp-kit: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript '@iota/wallet-standard': @@ -1802,7 +1802,7 @@ importers: '@iota/bcs': specifier: workspace:* version: link:../bcs - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript graphql: @@ -1854,7 +1854,7 @@ importers: sdk/iotans-toolkit: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript devDependencies: @@ -1879,7 +1879,7 @@ importers: sdk/kiosk: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript devDependencies: @@ -2065,7 +2065,7 @@ importers: sdk/wallet-standard: dependencies: - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript '@wallet-standard/core': @@ -2084,7 +2084,7 @@ importers: '@iota/bcs': specifier: workspace:* version: link:../bcs - '@iota/iota.js': + '@iota/iota-sdk': specifier: workspace:* version: link:../typescript '@noble/hashes': diff --git a/sdk/bcs/README.md b/sdk/bcs/README.md index 3b767b80d9f..cad2a6a9ab2 100644 --- a/sdk/bcs/README.md +++ b/sdk/bcs/README.md @@ -252,7 +252,7 @@ when calling `serialize`. The `output` type can generally be inferred from the d input type will need to be provided explicitly. In some cases, for complex transforms, you'll need to manually type the return -transforms can also handle more complex types. For instance, `@iota/iota.js` uses the following +transforms can also handle more complex types. For instance, `@iota/iota-sdk` uses the following definition to transform enums into a more TypeScript friends format: ```ts diff --git a/sdk/create-dapp/CHANGELOG.md b/sdk/create-dapp/CHANGELOG.md index 7d9e8d1954d..cdd01ef2932 100644 --- a/sdk/create-dapp/CHANGELOG.md +++ b/sdk/create-dapp/CHANGELOG.md @@ -5,7 +5,7 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 - @iota/dapp-kit@0.12.7 ## 0.2.8 @@ -31,7 +31,7 @@ ### Patch Changes - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 - @iota/dapp-kit@0.12.3 ## 0.2.4 @@ -40,7 +40,7 @@ - 4830361fa4: Updated typescript version - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 - @iota/dapp-kit@0.12.2 ## 0.2.3 @@ -61,7 +61,7 @@ - Updated dependencies [7b8d044603] - Updated dependencies [a34f1cb67d] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 - @iota/dapp-kit@0.12.0 ## 0.2.1 @@ -70,7 +70,7 @@ - 9ac0a4ec01: Add extensions to all sdk import paths - Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 - @iota/dapp-kit@0.11.1 ## 0.2.0 @@ -84,7 +84,7 @@ - Updated dependencies [9ba167b0af] - Updated dependencies [e5f9e3ba21] - @iota/dapp-kit@0.11.0 - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 ## 0.1.8 @@ -96,7 +96,7 @@ - Updated dependencies [dd362ec1d6] - Updated dependencies [d55db38647] - @iota/dapp-kit@0.10.3 - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 ## 0.1.7 @@ -106,7 +106,7 @@ - Updated dependencies [b30fecbbca] - Updated dependencies [cdcfa76c43] - @iota/dapp-kit@0.10.2 - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 ## 0.1.6 @@ -130,7 +130,7 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 - @iota/dapp-kit@0.9.1 ## 0.1.3 @@ -140,7 +140,7 @@ - Updated dependencies [c5d4db238] - Updated dependencies [652bcdd92] - @iota/dapp-kit@0.9.0 - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 ## 0.1.2 @@ -152,7 +152,7 @@ - Updated dependencies [103ad29c0] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 - @iota/dapp-kit@0.8.0 ## 0.1.1 @@ -163,7 +163,7 @@ - Updated dependencies [5d7055365] - Updated dependencies [30b47b758] - @iota/dapp-kit@0.7.0 - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 ## 0.1.0 @@ -179,7 +179,7 @@ - Updated dependencies [e0578094b] - Updated dependencies [b9afb5567] - @iota/dapp-kit@0.6.0 - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 ## 0.0.5 @@ -218,4 +218,4 @@ - Updated dependencies [0c5cdc049] - Updated dependencies [c7e12c928] - @iota/dapp-kit@0.3.0 - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 diff --git a/sdk/create-dapp/package.json b/sdk/create-dapp/package.json index 884b0a2c59e..2e3f2e6c484 100644 --- a/sdk/create-dapp/package.json +++ b/sdk/create-dapp/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@types/node": "^20.4.2", "enquirer": "^2.4.1" }, diff --git a/sdk/create-dapp/src/index.ts b/sdk/create-dapp/src/index.ts index b93dbebea19..5569084af66 100644 --- a/sdk/create-dapp/src/index.ts +++ b/sdk/create-dapp/src/index.ts @@ -97,7 +97,7 @@ async function collectFiles(template: string, dAppName: string) { if (entry === 'package.json') { const json = JSON.parse(content.toString()); json.name = dAppName; - json.dependencies['@iota/iota.js'] = dependencies['@iota/iota.js']; + json.dependencies['@iota/iota-sdk'] = dependencies['@iota/iota-sdk']; json.dependencies['@iota/dapp-kit'] = dependencies['@iota/dapp-kit']; content = Buffer.from(JSON.stringify(json, null, 2)); diff --git a/sdk/create-dapp/templates/react-client-dapp/package.json b/sdk/create-dapp/templates/react-client-dapp/package.json index 228b2f62043..081c94b6bfa 100644 --- a/sdk/create-dapp/templates/react-client-dapp/package.json +++ b/sdk/create-dapp/templates/react-client-dapp/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@radix-ui/colors": "^3.0.0", "@radix-ui/react-icons": "^1.3.0", "@radix-ui/themes": "^2.0.0", diff --git a/sdk/create-dapp/templates/react-client-dapp/src/main.tsx b/sdk/create-dapp/templates/react-client-dapp/src/main.tsx index 8b4618e27cf..2ba109ed476 100644 --- a/sdk/create-dapp/templates/react-client-dapp/src/main.tsx +++ b/sdk/create-dapp/templates/react-client-dapp/src/main.tsx @@ -1,9 +1,12 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + import React from "react"; import ReactDOM from "react-dom/client"; import "@iota/dapp-kit/dist/index.css"; import "@radix-ui/themes/styles.css"; -import { getFullnodeUrl } from "@iota/iota.js/client"; +import { getFullnodeUrl } from "@iota/iota-sdk/client"; import { IotaClientProvider, WalletProvider, diff --git a/sdk/create-dapp/templates/react-e2e-counter/package.json b/sdk/create-dapp/templates/react-e2e-counter/package.json index ae42d2f6b61..b8105c3b38e 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/package.json +++ b/sdk/create-dapp/templates/react-e2e-counter/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@iota/dapp-kit": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@radix-ui/colors": "^3.0.0", "@radix-ui/react-icons": "^1.3.0", "@radix-ui/themes": "^2.0.0", diff --git a/sdk/create-dapp/templates/react-e2e-counter/src/App.tsx b/sdk/create-dapp/templates/react-e2e-counter/src/App.tsx index 87a522dc72c..843b6072e19 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/src/App.tsx +++ b/sdk/create-dapp/templates/react-e2e-counter/src/App.tsx @@ -1,5 +1,8 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + import { ConnectButton, useCurrentAccount } from "@iota/dapp-kit"; -import { isValidIotaObjectId } from "@iota/iota.js/utils"; +import { isValidIotaObjectId } from "@iota/iota-sdk/utils"; import { Box, Container, Flex, Heading } from "@radix-ui/themes"; import { useState } from "react"; import { Counter } from "./Counter"; diff --git a/sdk/create-dapp/templates/react-e2e-counter/src/Counter.tsx b/sdk/create-dapp/templates/react-e2e-counter/src/Counter.tsx index b4b5227955c..33aee3a2a87 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/src/Counter.tsx +++ b/sdk/create-dapp/templates/react-e2e-counter/src/Counter.tsx @@ -1,11 +1,14 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + import { useCurrentAccount, useSignAndExecuteTransactionBlock, useIotaClient, useIotaClientQuery, } from "@iota/dapp-kit"; -import type { IotaObjectData } from "@iota/iota.js/client"; -import { TransactionBlock } from "@iota/iota.js/transactions"; +import type { IotaObjectData } from "@iota/iota-sdk/client"; +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import { Button, Flex, Heading, Text } from "@radix-ui/themes"; import { useNetworkVariable } from "./networkConfig"; diff --git a/sdk/create-dapp/templates/react-e2e-counter/src/CreateCounter.tsx b/sdk/create-dapp/templates/react-e2e-counter/src/CreateCounter.tsx index 8f476fa8385..2dfdf77afc8 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/src/CreateCounter.tsx +++ b/sdk/create-dapp/templates/react-e2e-counter/src/CreateCounter.tsx @@ -1,4 +1,7 @@ -import { TransactionBlock } from "@iota/iota.js/transactions"; +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { TransactionBlock } from "@iota/iota-sdk/transactions"; import { Button, Container } from "@radix-ui/themes"; import { useSignAndExecuteTransactionBlock, diff --git a/sdk/create-dapp/templates/react-e2e-counter/src/networkConfig.ts b/sdk/create-dapp/templates/react-e2e-counter/src/networkConfig.ts index 8b7e23feb72..1f4c0aa56c3 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/src/networkConfig.ts +++ b/sdk/create-dapp/templates/react-e2e-counter/src/networkConfig.ts @@ -1,4 +1,7 @@ -import { getFullnodeUrl } from "@iota/iota.js/client"; +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { getFullnodeUrl } from "@iota/iota-sdk/client"; import { DEVNET_COUNTER_PACKAGE_ID, MAINNET_COUNTER_PACKAGE_ID, diff --git a/sdk/dapp-kit/CHANGELOG.md b/sdk/dapp-kit/CHANGELOG.md index 90744800c75..e9586dfa8aa 100644 --- a/sdk/dapp-kit/CHANGELOG.md +++ b/sdk/dapp-kit/CHANGELOG.md @@ -5,7 +5,7 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 - @iota/wallet-standard@0.11.1 - @iota/zksend@0.4.1 @@ -40,7 +40,7 @@ - Updated dependencies [0cafa94027] - Updated dependencies [437f0ca2ef] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 - @iota/wallet-standard@0.11.0 - @iota/zksend@0.2.3 @@ -52,7 +52,7 @@ - Updated dependencies [4830361fa4] - Updated dependencies [4fd676671b] - @iota/wallet-standard@0.10.3 - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 - @iota/zksend@0.2.2 ## 0.12.1 @@ -98,7 +98,7 @@ - Updated dependencies [a34f1cb67d] - Updated dependencies [ae9ae17eea] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 - @iota/zksend@0.2.0 - @iota/wallet-standard@0.10.2 @@ -108,7 +108,7 @@ - Updated dependencies [9ac0a4ec01] - @iota/wallet-standard@0.10.1 - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 ## 0.11.0 @@ -121,7 +121,7 @@ - 9ba167b0af: Default storage to memory storage when local storage isn't available during SSR - Updated dependencies [e5f9e3ba21] - @iota/wallet-standard@0.10.0 - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 ## 0.10.3 @@ -133,7 +133,7 @@ - Updated dependencies [dd362ec1d6] - Updated dependencies [165ad6b21d] - @iota/wallet-standard@0.9.0 - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 ## 0.10.2 @@ -142,7 +142,7 @@ - 2ae1a6a108: Early return on `useAutoConnectWallet` to improve account switching performance - b30fecbbca: Fix missing export of useIotaClientQueries - Updated dependencies [cdcfa76c43] - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 - @iota/wallet-standard@0.8.11 ## 0.10.1 @@ -165,7 +165,7 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 - @iota/wallet-standard@0.8.10 ## 0.9.0 @@ -177,7 +177,7 @@ ### Patch Changes - Updated dependencies [652bcdd92] - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 - @iota/wallet-standard@0.8.9 ## 0.8.0 @@ -193,7 +193,7 @@ - Updated dependencies [8d1e74e52] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 - @iota/wallet-standard@0.8.8 ## 0.7.0 @@ -206,7 +206,7 @@ ### Patch Changes - Updated dependencies [30b47b758] - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 - @iota/wallet-standard@0.8.7 ## 0.6.0 @@ -228,7 +228,7 @@ - 09c103002: fix pagination in useIotaClientInfiniteQuery - e0578094b: Fix typing of data for useIotaClientInfiniteQuery - Updated dependencies [b9afb5567] - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 - @iota/wallet-standard@0.8.6 ## 0.5.0 @@ -257,14 +257,14 @@ - Updated dependencies [b48289346] - Updated dependencies [11cf4e68b] - @iota/wallet-standard@0.8.5 - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 ## 0.2.4 ### Patch Changes - Updated dependencies [004fb1991] - - @iota/iota.js@0.43.3 + - @iota/iota-sdk@0.43.3 - @iota/wallet-standard@0.8.4 ## 0.2.3 @@ -272,7 +272,7 @@ ### Patch Changes - Updated dependencies [9b052166d] - - @iota/iota.js@0.43.2 + - @iota/iota-sdk@0.43.2 - @iota/wallet-standard@0.8.3 ## 0.2.2 @@ -287,7 +287,7 @@ - Updated dependencies [faa13ded9] - Updated dependencies [c5684bb52] - - @iota/iota.js@0.43.1 + - @iota/iota-sdk@0.43.1 - @iota/wallet-standard@0.8.2 ## 0.2.0 @@ -312,7 +312,7 @@ - Updated dependencies [e4484852b] - Updated dependencies [71e0a3197] - Updated dependencies [1bc430161] - - @iota/iota.js@0.43.0 + - @iota/iota-sdk@0.43.0 - @iota/wallet-standard@0.8.1 ## 0.0.5 @@ -323,13 +323,13 @@ - Updated dependencies [fd8589806] - Updated dependencies [8b9e5f737] - @iota/wallet-standard@0.8.0 - - @iota/iota.js@0.42.0 + - @iota/iota-sdk@0.42.0 ## 0.0.4 ### Patch Changes -- @iota/iota.js@0.41.2 +- @iota/iota-sdk@0.41.2 - @iota/wallet-standard@0.7.2 ## 0.0.3 @@ -337,7 +337,7 @@ ### Patch Changes - Updated dependencies [24c21e1f0] - - @iota/iota.js@0.41.1 + - @iota/iota-sdk@0.41.1 ## 0.0.2 @@ -345,7 +345,7 @@ - Updated dependencies [ba8e3b857] - Updated dependencies [f4b7b3474] - - @iota/iota.js@0.41.0 + - @iota/iota-sdk@0.41.0 ## 0.0.1 @@ -353,4 +353,4 @@ - Updated dependencies [a503cad34] - Updated dependencies [8281e3d25] - - @iota/iota.js@0.40.0 + - @iota/iota-sdk@0.40.0 diff --git a/sdk/dapp-kit/README.md b/sdk/dapp-kit/README.md index 1ad75901278..9ae129ff873 100644 --- a/sdk/dapp-kit/README.md +++ b/sdk/dapp-kit/README.md @@ -24,7 +24,7 @@ See https://sdk.mystenlabs.com/typescript for full documentation To use the Iota dApp Kit in your project, run the following command in your project root: ```sh npm2yarn -npm i --save @iota/dapp-kit @iota/iota.js @tanstack/react-query +npm i --save @iota/dapp-kit @iota/iota-sdk @tanstack/react-query ``` ## Setting up providers @@ -35,7 +35,7 @@ pages. ```tsx import { createNetworkConfig, IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; -import { getFullnodeUrl, type IotaClientOptions } from '@iota/iota.js/client'; +import { getFullnodeUrl, type IotaClientOptions } from '@iota/iota-sdk/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; // Config options for the networks you want to connect to diff --git a/sdk/dapp-kit/package.json b/sdk/dapp-kit/package.json index 9879679efa1..b8f3aba7777 100644 --- a/sdk/dapp-kit/package.json +++ b/sdk/dapp-kit/package.json @@ -79,7 +79,7 @@ "vitest": "^0.33.0" }, "dependencies": { - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@iota/wallet-standard": "workspace:*", "@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-dropdown-menu": "^2.0.5", diff --git a/sdk/dapp-kit/src/components/AccountDropdownMenu.tsx b/sdk/dapp-kit/src/components/AccountDropdownMenu.tsx index 7d026b8ee01..cb242c23397 100644 --- a/sdk/dapp-kit/src/components/AccountDropdownMenu.tsx +++ b/sdk/dapp-kit/src/components/AccountDropdownMenu.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { formatAddress } from '@iota/iota.js/utils'; +import { formatAddress } from '@iota/iota-sdk/utils'; import type { WalletAccount } from '@iota/wallet-standard'; import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import clsx from 'clsx'; diff --git a/sdk/dapp-kit/src/components/IotaClientProvider.tsx b/sdk/dapp-kit/src/components/IotaClientProvider.tsx index 61fc2bd9139..4f9d149dbbc 100644 --- a/sdk/dapp-kit/src/components/IotaClientProvider.tsx +++ b/sdk/dapp-kit/src/components/IotaClientProvider.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getNetwork, isIotaClient, Network, IotaClient } from '@iota/iota.js/client'; -import type { IotaClientOptions } from '@iota/iota.js/client'; +import { getNetwork, isIotaClient, Network, IotaClient } from '@iota/iota-sdk/client'; +import type { IotaClientOptions } from '@iota/iota-sdk/client'; import { createContext, useMemo, useState } from 'react'; import type { NetworkConfig } from '../hooks/networkConfig.js'; diff --git a/sdk/dapp-kit/src/hooks/networkConfig.ts b/sdk/dapp-kit/src/hooks/networkConfig.ts index 66a6b18b29f..d21a3a64efb 100644 --- a/sdk/dapp-kit/src/hooks/networkConfig.ts +++ b/sdk/dapp-kit/src/hooks/networkConfig.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClientOptions } from '@iota/iota.js/client'; +import type { IotaClientOptions } from '@iota/iota-sdk/client'; import { useIotaClientContext } from './useIotaClient.js'; diff --git a/sdk/dapp-kit/src/hooks/useIotaClient.ts b/sdk/dapp-kit/src/hooks/useIotaClient.ts index a877d0845aa..145d79812f2 100644 --- a/sdk/dapp-kit/src/hooks/useIotaClient.ts +++ b/sdk/dapp-kit/src/hooks/useIotaClient.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import { useContext } from 'react'; import { IotaClientContext } from '../components/IotaClientProvider.js'; diff --git a/sdk/dapp-kit/src/hooks/useIotaClientInfiniteQuery.ts b/sdk/dapp-kit/src/hooks/useIotaClientInfiniteQuery.ts index e3d7f4980f4..1e461862f54 100644 --- a/sdk/dapp-kit/src/hooks/useIotaClientInfiniteQuery.ts +++ b/sdk/dapp-kit/src/hooks/useIotaClientInfiniteQuery.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import type { InfiniteData, UseInfiniteQueryOptions, diff --git a/sdk/dapp-kit/src/hooks/useIotaClientQuery.ts b/sdk/dapp-kit/src/hooks/useIotaClientQuery.ts index 19d4413ef07..95548f1bf1b 100644 --- a/sdk/dapp-kit/src/hooks/useIotaClientQuery.ts +++ b/sdk/dapp-kit/src/hooks/useIotaClientQuery.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query'; diff --git a/sdk/dapp-kit/src/hooks/useResolveIotaNSNames.ts b/sdk/dapp-kit/src/hooks/useResolveIotaNSNames.ts index 818f09e0da9..b44bbfe8247 100644 --- a/sdk/dapp-kit/src/hooks/useResolveIotaNSNames.ts +++ b/sdk/dapp-kit/src/hooks/useResolveIotaNSNames.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { ResolvedNameServiceNames } from '@iota/iota.js/client'; +import type { ResolvedNameServiceNames } from '@iota/iota-sdk/client'; import type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query'; import { useIotaClientQuery } from './useIotaClientQuery.js'; diff --git a/sdk/dapp-kit/src/hooks/wallet/useUnsafeBurnerWallet.ts b/sdk/dapp-kit/src/hooks/wallet/useUnsafeBurnerWallet.ts index b477287f0ce..2964cc61168 100644 --- a/sdk/dapp-kit/src/hooks/wallet/useUnsafeBurnerWallet.ts +++ b/sdk/dapp-kit/src/hooks/wallet/useUnsafeBurnerWallet.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import type { IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; import type { StandardConnectFeature, StandardConnectMethod, diff --git a/sdk/dapp-kit/test/components/IotaClientProvider.test.tsx b/sdk/dapp-kit/test/components/IotaClientProvider.test.tsx index d0a40e67701..1034d289e95 100644 --- a/sdk/dapp-kit/test/components/IotaClientProvider.test.tsx +++ b/sdk/dapp-kit/test/components/IotaClientProvider.test.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { IotaClient } from '@iota/iota.js/client'; +import { IotaClient } from '@iota/iota-sdk/client'; import { screen } from '@testing-library/dom'; import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/sdk/dapp-kit/test/hooks/useIotaClient.test.tsx b/sdk/dapp-kit/test/hooks/useIotaClient.test.tsx index 8ab07fd525d..b0bd48bd0ae 100644 --- a/sdk/dapp-kit/test/hooks/useIotaClient.test.tsx +++ b/sdk/dapp-kit/test/hooks/useIotaClient.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { renderHook } from '@testing-library/react'; import { useIotaClient } from '../../src/index.js'; diff --git a/sdk/dapp-kit/test/hooks/useIotaClientInfiniteQuery.test.tsx b/sdk/dapp-kit/test/hooks/useIotaClientInfiniteQuery.test.tsx index 8828498727b..b5e2304d528 100644 --- a/sdk/dapp-kit/test/hooks/useIotaClientInfiniteQuery.test.tsx +++ b/sdk/dapp-kit/test/hooks/useIotaClientInfiniteQuery.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { act, renderHook, waitFor } from '@testing-library/react'; import { useIotaClientInfiniteQuery } from '../../src/hooks/useIotaClientInfiniteQuery.js'; diff --git a/sdk/dapp-kit/test/hooks/useIotaClientMutation.test.tsx b/sdk/dapp-kit/test/hooks/useIotaClientMutation.test.tsx index a1cdf998924..077e5322a99 100644 --- a/sdk/dapp-kit/test/hooks/useIotaClientMutation.test.tsx +++ b/sdk/dapp-kit/test/hooks/useIotaClientMutation.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { act, renderHook, waitFor } from '@testing-library/react'; import { useIotaClientMutation } from '../../src/hooks/useIotaClientMutation.js'; diff --git a/sdk/dapp-kit/test/hooks/useIotaClientQueries.test.tsx b/sdk/dapp-kit/test/hooks/useIotaClientQueries.test.tsx index f2114e42290..e20cd82b62a 100644 --- a/sdk/dapp-kit/test/hooks/useIotaClientQueries.test.tsx +++ b/sdk/dapp-kit/test/hooks/useIotaClientQueries.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { renderHook, waitFor } from '@testing-library/react'; import { useIotaClientQueries } from '../../src/hooks/useIotaClientQueries.js'; diff --git a/sdk/dapp-kit/test/hooks/useIotaClientQuery.test.tsx b/sdk/dapp-kit/test/hooks/useIotaClientQuery.test.tsx index 70b70326553..a86ce8525eb 100644 --- a/sdk/dapp-kit/test/hooks/useIotaClientQuery.test.tsx +++ b/sdk/dapp-kit/test/hooks/useIotaClientQuery.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { renderHook, waitFor } from '@testing-library/react'; import { useIotaClientQuery } from '../../src/hooks/useIotaClientQuery.js'; diff --git a/sdk/dapp-kit/test/hooks/useSignAndExecuteTransactionBlock.test.tsx b/sdk/dapp-kit/test/hooks/useSignAndExecuteTransactionBlock.test.tsx index 5a8f853805c..0fa16a8e86b 100644 --- a/sdk/dapp-kit/test/hooks/useSignAndExecuteTransactionBlock.test.tsx +++ b/sdk/dapp-kit/test/hooks/useSignAndExecuteTransactionBlock.test.tsx @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { act, renderHook, waitFor } from '@testing-library/react'; import type { Mock } from 'vitest'; diff --git a/sdk/dapp-kit/test/hooks/useSignTransactionBlock.test.tsx b/sdk/dapp-kit/test/hooks/useSignTransactionBlock.test.tsx index 31434a22731..6b470cf0cf7 100644 --- a/sdk/dapp-kit/test/hooks/useSignTransactionBlock.test.tsx +++ b/sdk/dapp-kit/test/hooks/useSignTransactionBlock.test.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { act, renderHook, waitFor } from '@testing-library/react'; import type { Mock } from 'vitest'; diff --git a/sdk/dapp-kit/test/mocks/mockAccount.ts b/sdk/dapp-kit/test/mocks/mockAccount.ts index 5e29f6884ba..49c1742d62f 100644 --- a/sdk/dapp-kit/test/mocks/mockAccount.ts +++ b/sdk/dapp-kit/test/mocks/mockAccount.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; import type { WalletAccount } from '@iota/wallet-standard'; import { ReadonlyWalletAccount } from '@iota/wallet-standard'; diff --git a/sdk/dapp-kit/test/test-utils.tsx b/sdk/dapp-kit/test/test-utils.tsx index 5258dcb5886..68d9caf0bfa 100644 --- a/sdk/dapp-kit/test/test-utils.tsx +++ b/sdk/dapp-kit/test/test-utils.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import type { IdentifierRecord, ReadonlyWalletAccount } from '@iota/wallet-standard'; import { getWallets } from '@iota/wallet-standard'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; diff --git a/sdk/dapp-kit/vitest.config.ts b/sdk/dapp-kit/vitest.config.ts index 5fdf419c7e1..a4d6e347d98 100644 --- a/sdk/dapp-kit/vitest.config.ts +++ b/sdk/dapp-kit/vitest.config.ts @@ -26,14 +26,16 @@ export default defineConfig({ // TODO: Figure out a better way to run tests that avoids these aliases: '@iota/wallet-standard': new URL('../wallet-standard/src', import.meta.url).pathname, '@iota/bcs': new URL('../bcs/src', import.meta.url).pathname, - '@iota/iota.js/keypairs/ed25519': new URL( + '@iota/iota-sdk/keypairs/ed25519': new URL( '../typescript/src/keypairs/ed25519', import.meta.url, ).pathname, - '@iota/iota.js/client': new URL('../typescript/src/client', import.meta.url).pathname, - '@iota/iota.js/utils': new URL('../typescript/src/utils', import.meta.url).pathname, - '@iota/iota.js/transactions': new URL('../typescript/src/transactions', import.meta.url) - .pathname, + '@iota/iota-sdk/client': new URL('../typescript/src/client', import.meta.url).pathname, + '@iota/iota-sdk/utils': new URL('../typescript/src/utils', import.meta.url).pathname, + '@iota/iota-sdk/transactions': new URL( + '../typescript/src/transactions', + import.meta.url, + ).pathname, }, }, }); diff --git a/sdk/graphql-transport/CHANGELOG.md b/sdk/graphql-transport/CHANGELOG.md index 7dc99402e59..88ea5ce7bc2 100644 --- a/sdk/graphql-transport/CHANGELOG.md +++ b/sdk/graphql-transport/CHANGELOG.md @@ -5,7 +5,7 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 ## 0.0.2 @@ -13,12 +13,12 @@ - a63b9327a6: Protocol config update - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 ## 0.0.1 ### Patch Changes - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 - @iota/bcs@0.11.1 diff --git a/sdk/graphql-transport/README.md b/sdk/graphql-transport/README.md index 6f9a71bf7e1..364213b0bbf 100644 --- a/sdk/graphql-transport/README.md +++ b/sdk/graphql-transport/README.md @@ -13,7 +13,7 @@ npm install --save @iota/graphql-transport ```ts import { IotaClientGraphQLTransport } from '@iota/graphql-transport'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ transport: new IotaClientGraphQLTransport({ diff --git a/sdk/graphql-transport/package.json b/sdk/graphql-transport/package.json index bc6a9a2b47a..427d12763a0 100644 --- a/sdk/graphql-transport/package.json +++ b/sdk/graphql-transport/package.json @@ -61,7 +61,7 @@ "dependencies": { "@graphql-typed-document-node/core": "^3.2.0", "@iota/bcs": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "graphql": "^16.8.1" } } diff --git a/sdk/graphql-transport/src/mappers/bcs.ts b/sdk/graphql-transport/src/mappers/bcs.ts index cea56cabf4c..564bb8a5595 100644 --- a/sdk/graphql-transport/src/mappers/bcs.ts +++ b/sdk/graphql-transport/src/mappers/bcs.ts @@ -4,7 +4,7 @@ import { toB64 } from '@iota/bcs'; import type { BcsType } from '@iota/bcs'; -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; import type { MoveTypeLayout } from './move.js'; import { toShortTypeString } from './util.js'; diff --git a/sdk/graphql-transport/src/mappers/checkpint.ts b/sdk/graphql-transport/src/mappers/checkpint.ts index a3e2f0739d4..12be9b8dd79 100644 --- a/sdk/graphql-transport/src/mappers/checkpint.ts +++ b/sdk/graphql-transport/src/mappers/checkpint.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { Checkpoint, EndOfEpochData } from '@iota/iota.js/client'; +import type { Checkpoint, EndOfEpochData } from '@iota/iota-sdk/client'; import type { Rpc_Checkpoint_FieldsFragment } from '../generated/queries.js'; diff --git a/sdk/graphql-transport/src/mappers/display.ts b/sdk/graphql-transport/src/mappers/display.ts index bb483a7531f..a3d054e992a 100644 --- a/sdk/graphql-transport/src/mappers/display.ts +++ b/sdk/graphql-transport/src/mappers/display.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { DisplayFieldsResponse } from '@iota/iota.js/client'; +import type { DisplayFieldsResponse } from '@iota/iota-sdk/client'; export function formatDisplay(object: { display?: diff --git a/sdk/graphql-transport/src/mappers/move.ts b/sdk/graphql-transport/src/mappers/move.ts index 8d3805978a6..30b6d73826d 100644 --- a/sdk/graphql-transport/src/mappers/move.ts +++ b/sdk/graphql-transport/src/mappers/move.ts @@ -10,8 +10,8 @@ import type { IotaMoveNormalizedModule, IotaMoveNormalizedStruct, IotaMoveNormalizedType, -} from '@iota/iota.js/client'; -import { normalizeIotaAddress, parseStructTag } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { normalizeIotaAddress, parseStructTag } from '@iota/iota-sdk/utils'; import type { Rpc_Move_Function_FieldsFragment, diff --git a/sdk/graphql-transport/src/mappers/object.ts b/sdk/graphql-transport/src/mappers/object.ts index e1e53338c76..076bf1ef919 100644 --- a/sdk/graphql-transport/src/mappers/object.ts +++ b/sdk/graphql-transport/src/mappers/object.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaObjectResponse } from '@iota/iota.js/client'; +import type { IotaObjectResponse } from '@iota/iota-sdk/client'; import type { MoveValue, diff --git a/sdk/graphql-transport/src/mappers/owner.ts b/sdk/graphql-transport/src/mappers/owner.ts index f5f6bb25751..6a3a476b38a 100644 --- a/sdk/graphql-transport/src/mappers/owner.ts +++ b/sdk/graphql-transport/src/mappers/owner.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { ObjectOwner } from '@iota/iota.js/client'; +import type { ObjectOwner } from '@iota/iota-sdk/client'; import type { Rpc_Object_FieldsFragment } from '../generated/queries.js'; diff --git a/sdk/graphql-transport/src/mappers/stakes.ts b/sdk/graphql-transport/src/mappers/stakes.ts index bc878b1edf9..6490c194632 100644 --- a/sdk/graphql-transport/src/mappers/stakes.ts +++ b/sdk/graphql-transport/src/mappers/stakes.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { DelegatedStake } from '@iota/iota.js/client'; +import type { DelegatedStake } from '@iota/iota-sdk/client'; import type { Rpc_Stake_FieldsFragment } from '../generated/queries.js'; diff --git a/sdk/graphql-transport/src/mappers/transaction-block.ts b/sdk/graphql-transport/src/mappers/transaction-block.ts index ad6885499de..d0d9e9d20aa 100644 --- a/sdk/graphql-transport/src/mappers/transaction-block.ts +++ b/sdk/graphql-transport/src/mappers/transaction-block.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { fromB64, toB64 } from '@iota/bcs'; -import { bcs, TypeTagSerializer } from '@iota/iota.js/bcs'; +import { bcs, TypeTagSerializer } from '@iota/iota-sdk/bcs'; import type { ExecutionStatus, IotaArgument, @@ -13,7 +13,7 @@ import type { IotaTransactionBlockKind, IotaTransactionBlockResponse, IotaTransactionBlockResponseOptions, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import type { Rpc_Transaction_FieldsFragment } from '../generated/queries.js'; import { mapGraphQLOwnerToRpcOwner } from './owner.js'; diff --git a/sdk/graphql-transport/src/mappers/validator.ts b/sdk/graphql-transport/src/mappers/validator.ts index 513933293c8..879ab64538a 100644 --- a/sdk/graphql-transport/src/mappers/validator.ts +++ b/sdk/graphql-transport/src/mappers/validator.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaValidatorSummary } from '@iota/iota.js/client'; +import type { IotaValidatorSummary } from '@iota/iota-sdk/client'; import type { Rpc_Validator_FieldsFragment } from '../generated/queries.js'; diff --git a/sdk/graphql-transport/src/methods.ts b/sdk/graphql-transport/src/methods.ts index d0a565417e8..541fd744c00 100644 --- a/sdk/graphql-transport/src/methods.ts +++ b/sdk/graphql-transport/src/methods.ts @@ -9,9 +9,9 @@ import type { IotaArgument, IotaClient, IotaMoveNormalizedModule, -} from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { normalizeStructTag, normalizeIotaAddress, parseStructTag } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { normalizeStructTag, normalizeIotaAddress, parseStructTag } from '@iota/iota-sdk/utils'; import type { ObjectFilter, diff --git a/sdk/graphql-transport/src/transport.ts b/sdk/graphql-transport/src/transport.ts index 3882e83dc27..d84ad4a225d 100644 --- a/sdk/graphql-transport/src/transport.ts +++ b/sdk/graphql-transport/src/transport.ts @@ -7,8 +7,8 @@ import type { IotaTransport, IotaTransportRequestOptions, IotaTransportSubscribeOptions, -} from '@iota/iota.js/client'; -import { IotaHTTPTransport } from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; +import { IotaHTTPTransport } from '@iota/iota-sdk/client'; import type { DocumentNode } from 'graphql'; import { print } from 'graphql'; diff --git a/sdk/graphql-transport/tsconfig.json b/sdk/graphql-transport/tsconfig.json index 9ee2d4f8012..c650adf1999 100644 --- a/sdk/graphql-transport/tsconfig.json +++ b/sdk/graphql-transport/tsconfig.json @@ -7,8 +7,8 @@ "isolatedModules": true, "rootDir": "src", "paths": { - "@iota/iota.js/client": ["../../typescrupt/src/client"], - "@iota/iota.js/transactions": ["../../typescript/src/transactions"] + "@iota/iota-sdk/client": ["../../typescrupt/src/client"], + "@iota/iota-sdk/transactions": ["../../typescript/src/transactions"] } }, "references": [{ "path": "../wallet-standard" }, { "path": "../typescript" }] diff --git a/sdk/graphql-transport/vitest.config.ts b/sdk/graphql-transport/vitest.config.ts index 18666f271f0..c97b392efa8 100644 --- a/sdk/graphql-transport/vitest.config.ts +++ b/sdk/graphql-transport/vitest.config.ts @@ -19,11 +19,11 @@ export default defineConfig({ resolve: { alias: { '@iota/bcs': new URL('../bcs/src', import.meta.url).toString(), - '@iota/iota.js/transactions': new URL( + '@iota/iota-sdk/transactions': new URL( '../typescript/src/transactions', import.meta.url, ).toString(), - '@iota/iota.js': new URL('../typescript/src', import.meta.url).toString(), + '@iota/iota-sdk': new URL('../typescript/src', import.meta.url).toString(), }, }, }); diff --git a/sdk/iotans-toolkit/CHANGELOG.md b/sdk/iotans-toolkit/CHANGELOG.md index ac92712e19e..346b0ee0dad 100644 --- a/sdk/iotans-toolkit/CHANGELOG.md +++ b/sdk/iotans-toolkit/CHANGELOG.md @@ -5,14 +5,14 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 ## 0.4.4 ### Patch Changes - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 ## 0.4.3 @@ -20,7 +20,7 @@ - 4830361fa4: Updated typescript version - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 ## 0.4.2 @@ -32,7 +32,7 @@ - Updated dependencies [13e922d9b1] - Updated dependencies [a34f1cb67d] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 ## 0.4.1 @@ -40,7 +40,7 @@ - 9ac0a4ec01: Add extensions to all sdk import paths - Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 ## 0.4.0 @@ -51,21 +51,21 @@ ### Patch Changes - Updated dependencies [e5f9e3ba21] - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 ## 0.3.18 ### Patch Changes - Updated dependencies [dd362ec1d6] - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 ## 0.3.17 ### Patch Changes - Updated dependencies [cdcfa76c43] - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 ## 0.3.16 @@ -75,14 +75,14 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 ## 0.3.15 ### Patch Changes - Updated dependencies [652bcdd92] - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 ## 0.3.14 @@ -93,21 +93,21 @@ - Updated dependencies [8d1e74e52] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 ## 0.3.13 ### Patch Changes - Updated dependencies [30b47b758] - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 ## 0.3.12 ### Patch Changes - Updated dependencies [b9afb5567] - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 ## 0.3.11 @@ -115,21 +115,21 @@ - Updated dependencies [b48289346] - Updated dependencies [11cf4e68b] - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 ## 0.3.10 ### Patch Changes - Updated dependencies [004fb1991] - - @iota/iota.js@0.43.3 + - @iota/iota-sdk@0.43.3 ## 0.3.9 ### Patch Changes - Updated dependencies [9b052166d] - - @iota/iota.js@0.43.2 + - @iota/iota-sdk@0.43.2 ## 0.3.8 @@ -137,7 +137,7 @@ - Updated dependencies [faa13ded9] - Updated dependencies [c5684bb52] - - @iota/iota.js@0.43.1 + - @iota/iota-sdk@0.43.1 ## 0.3.7 @@ -148,27 +148,27 @@ - Updated dependencies [e4484852b] - Updated dependencies [71e0a3197] - Updated dependencies [1bc430161] - - @iota/iota.js@0.43.0 + - @iota/iota-sdk@0.43.0 ## 0.3.6 ### Patch Changes - Updated dependencies [fd8589806] - - @iota/iota.js@0.42.0 + - @iota/iota-sdk@0.42.0 ## 0.3.5 ### Patch Changes -- @iota/iota.js@0.41.2 +- @iota/iota-sdk@0.41.2 ## 0.3.4 ### Patch Changes - Updated dependencies [24c21e1f0] - - @iota/iota.js@0.41.1 + - @iota/iota-sdk@0.41.1 ## 0.3.3 @@ -176,7 +176,7 @@ - Updated dependencies [ba8e3b857] - Updated dependencies [f4b7b3474] - - @iota/iota.js@0.41.0 + - @iota/iota-sdk@0.41.0 ## 0.3.2 @@ -184,23 +184,23 @@ - Updated dependencies [a503cad34] - Updated dependencies [8281e3d25] - - @iota/iota.js@0.40.0 + - @iota/iota-sdk@0.40.0 ## 0.3.1 ### Patch Changes - Updated dependencies [47ea5ec7c] - - @iota/iota.js@0.39.0 + - @iota/iota-sdk@0.39.0 ## 0.3.0 ### Minor Changes -- cc6441f46: Updated types and imports to use new modular exports from the `@iota/iota.js` refactor -- 6d41059c7: Update to use modular imports from @iota/iota.js +- cc6441f46: Updated types and imports to use new modular exports from the `@iota/iota-sdk` refactor +- 6d41059c7: Update to use modular imports from @iota/iota-sdk - Some methods now accept a `IotaClient` imported from `@iota/iota.js/client` rather than a `JsonRpcProvider` + Some methods now accept a `IotaClient` imported from `@iota/iota-sdk/client` rather than a `JsonRpcProvider` ### Patch Changes @@ -215,14 +215,14 @@ - Updated dependencies [6d41059c7] - Updated dependencies [cc6441f46] - Updated dependencies [001148443] - - @iota/iota.js@0.38.0 + - @iota/iota-sdk@0.38.0 ## 0.2.3 ### Patch Changes - Updated dependencies [34cc7d610] - - @iota/iota.js@0.37.1 + - @iota/iota-sdk@0.37.1 ## 0.2.2 @@ -235,7 +235,7 @@ - Updated dependencies [a17d3678a] - Updated dependencies [2f37537d5] - Updated dependencies [00484bcc3] - - @iota/iota.js@0.37.0 + - @iota/iota-sdk@0.37.0 ## 0.2.1 @@ -245,7 +245,7 @@ - Updated dependencies [1cfb1c9da3] - Updated dependencies [1cfb1c9da3] - Updated dependencies [fb3bb9118a] - - @iota/iota.js@0.36.0 + - @iota/iota-sdk@0.36.0 ## 0.2.0 @@ -256,4 +256,4 @@ ### Patch Changes - Updated dependencies [09d77325a9] - - @iota/iota.js@0.35.1 + - @iota/iota-sdk@0.35.1 diff --git a/sdk/iotans-toolkit/README.md b/sdk/iotans-toolkit/README.md index d1e072ee92b..75bb3a97a75 100644 --- a/sdk/iotans-toolkit/README.md +++ b/sdk/iotans-toolkit/README.md @@ -20,7 +20,7 @@ You can also use yarn or pnpm. Create an instance of IotansClient: ```typescript -import { IotaClient } from '@iota/iota.js/client'; +import { IotaClient } from '@iota/iota-sdk/client'; import { IotansClient } from '@iota/iotans-toolkit'; const client = new IotaClient(); diff --git a/sdk/iotans-toolkit/package.json b/sdk/iotans-toolkit/package.json index 372aad32659..04d302b48da 100644 --- a/sdk/iotans-toolkit/package.json +++ b/sdk/iotans-toolkit/package.json @@ -43,6 +43,6 @@ "vitest": "^0.33.0" }, "dependencies": { - "@iota/iota.js": "workspace:*" + "@iota/iota-sdk": "workspace:*" } } diff --git a/sdk/iotans-toolkit/src/client.ts b/sdk/iotans-toolkit/src/client.ts index 798786af398..ae9e953e5b5 100644 --- a/sdk/iotans-toolkit/src/client.ts +++ b/sdk/iotans-toolkit/src/client.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import type { DataFields, NameObject, NetworkType, IotaNSContract } from './types/objects.js'; import { DEVNET_JSON_FILE, GCS_URL, TESTNET_JSON_FILE } from './utils/constants.js'; diff --git a/sdk/iotans-toolkit/src/utils/parser.ts b/sdk/iotans-toolkit/src/utils/parser.ts index 338abaab16f..5175672a843 100644 --- a/sdk/iotans-toolkit/src/utils/parser.ts +++ b/sdk/iotans-toolkit/src/utils/parser.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaMoveObject, IotaObjectData, IotaObjectResponse } from '@iota/iota.js/client'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import type { IotaMoveObject, IotaObjectData, IotaObjectResponse } from '@iota/iota-sdk/client'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; export const camelCase = (string: string) => string.replace(/(_\w)/g, (g) => g[1].toUpperCase()); diff --git a/sdk/iotans-toolkit/src/utils/queries.ts b/sdk/iotans-toolkit/src/utils/queries.ts index e0df915228e..5eae7bfca30 100644 --- a/sdk/iotans-toolkit/src/utils/queries.ts +++ b/sdk/iotans-toolkit/src/utils/queries.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient, IotaObjectResponse } from '@iota/iota.js/client'; +import type { IotaClient, IotaObjectResponse } from '@iota/iota-sdk/client'; // get NFT's owner from RPC. export const getOwner = async (client: IotaClient, nftId: string): Promise => { diff --git a/sdk/iotans-toolkit/tests/app.test.ts b/sdk/iotans-toolkit/tests/app.test.ts index f692257a9b7..74a12509fa0 100644 --- a/sdk/iotans-toolkit/tests/app.test.ts +++ b/sdk/iotans-toolkit/tests/app.test.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // import { faker } from '@faker-js/faker'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { beforeEach, describe, expect, it } from 'vitest'; import { IotansClient } from '../src'; diff --git a/sdk/iotans-toolkit/vitest.config.ts b/sdk/iotans-toolkit/vitest.config.ts index 6a2e27bc73b..7d80da00a9c 100644 --- a/sdk/iotans-toolkit/vitest.config.ts +++ b/sdk/iotans-toolkit/vitest.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ resolve: { alias: { '@iota/bcs': new URL('../bcs/src', import.meta.url).toString(), - '@iota/iota.js': new URL('../typescript/src', import.meta.url).toString(), + '@iota/iota-sdk': new URL('../typescript/src', import.meta.url).toString(), }, }, }); diff --git a/sdk/kiosk/CHANGELOG.md b/sdk/kiosk/CHANGELOG.md index 00e598696e7..3ee581dcfd4 100644 --- a/sdk/kiosk/CHANGELOG.md +++ b/sdk/kiosk/CHANGELOG.md @@ -5,14 +5,14 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 ## 0.8.4 ### Patch Changes - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 ## 0.8.3 @@ -20,7 +20,7 @@ - 4830361fa4: Updated typescript version - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 ## 0.8.2 @@ -33,7 +33,7 @@ - Updated dependencies [13e922d9b1] - Updated dependencies [a34f1cb67d] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 ## 0.8.1 @@ -41,7 +41,7 @@ - 9ac0a4ec01: Add extensions to all sdk import paths - Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 ## 0.8.0 @@ -52,7 +52,7 @@ ### Patch Changes - Updated dependencies [e5f9e3ba21] - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 ## 0.7.13 @@ -60,14 +60,14 @@ - dd362ec1d6: Update docs url to sdk.mystenlabs.com - Updated dependencies [dd362ec1d6] - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 ## 0.7.12 ### Patch Changes - Updated dependencies [cdcfa76c43] - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 ## 0.7.11 @@ -77,14 +77,14 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 ## 0.7.10 ### Patch Changes - Updated dependencies [652bcdd92] - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 ## 0.7.9 @@ -97,21 +97,21 @@ - Updated dependencies [8d1e74e52] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 ## 0.7.8 ### Patch Changes - Updated dependencies [30b47b758] - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 ## 0.7.7 ### Patch Changes - Updated dependencies [b9afb5567] - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 ## 0.7.6 @@ -121,21 +121,21 @@ - 3699dd364: Adds support for extensions (on `getKiosk()`), and exports a `getKioskExtension()` function on kioskClient to get extension's content - Updated dependencies [b48289346] - Updated dependencies [11cf4e68b] - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 ## 0.7.5 ### Patch Changes - Updated dependencies [004fb1991] - - @iota/iota.js@0.43.3 + - @iota/iota-sdk@0.43.3 ## 0.7.4 ### Patch Changes - Updated dependencies [9b052166d] - - @iota/iota.js@0.43.2 + - @iota/iota-sdk@0.43.2 ## 0.7.3 @@ -143,7 +143,7 @@ - Updated dependencies [faa13ded9] - Updated dependencies [c5684bb52] - - @iota/iota.js@0.43.1 + - @iota/iota-sdk@0.43.1 ## 0.7.2 @@ -160,7 +160,7 @@ - Updated dependencies [e4484852b] - Updated dependencies [71e0a3197] - Updated dependencies [1bc430161] - - @iota/iota.js@0.43.0 + - @iota/iota-sdk@0.43.0 ## 0.7.0 @@ -172,25 +172,25 @@ ### Minor Changes -- fd8589806: Remove uses of deprecated imports from @iota/iota.js +- fd8589806: Remove uses of deprecated imports from @iota/iota-sdk ### Patch Changes - Updated dependencies [fd8589806] - - @iota/iota.js@0.42.0 + - @iota/iota-sdk@0.42.0 ## 0.5.3 ### Patch Changes -- @iota/iota.js@0.41.2 +- @iota/iota-sdk@0.41.2 ## 0.5.2 ### Patch Changes - Updated dependencies [24c21e1f0] - - @iota/iota.js@0.41.1 + - @iota/iota-sdk@0.41.1 ## 0.5.1 @@ -198,7 +198,7 @@ - Updated dependencies [ba8e3b857] - Updated dependencies [f4b7b3474] - - @iota/iota.js@0.41.0 + - @iota/iota-sdk@0.41.0 ## 0.5.0 @@ -210,23 +210,23 @@ - Updated dependencies [a503cad34] - Updated dependencies [8281e3d25] - - @iota/iota.js@0.40.0 + - @iota/iota-sdk@0.40.0 ## 0.4.1 ### Patch Changes - Updated dependencies [47ea5ec7c] - - @iota/iota.js@0.39.0 + - @iota/iota-sdk@0.39.0 ## 0.4.0 ### Minor Changes -- cc6441f46: Updated types and imports to use new modular exports from the `@iota/iota.js` refactor -- 6d41059c7: Update to use modular imports from @iota/iota.js +- cc6441f46: Updated types and imports to use new modular exports from the `@iota/iota-sdk` refactor +- 6d41059c7: Update to use modular imports from @iota/iota-sdk - Some methods now accept a `IotaClient` imported from `@iota/iota.js/client` rather than a `JsonRpcProvider` + Some methods now accept a `IotaClient` imported from `@iota/iota-sdk/client` rather than a `JsonRpcProvider` ### Patch Changes @@ -241,14 +241,14 @@ - Updated dependencies [6d41059c7] - Updated dependencies [cc6441f46] - Updated dependencies [001148443] - - @iota/iota.js@0.38.0 + - @iota/iota-sdk@0.38.0 ## 0.3.3 ### Patch Changes - Updated dependencies [34cc7d610] - - @iota/iota.js@0.37.1 + - @iota/iota-sdk@0.37.1 ## 0.3.2 @@ -261,7 +261,7 @@ - Updated dependencies [a17d3678a] - Updated dependencies [2f37537d5] - Updated dependencies [00484bcc3] - - @iota/iota.js@0.37.0 + - @iota/iota-sdk@0.37.0 ## 0.3.1 @@ -274,7 +274,7 @@ - Updated dependencies [1cfb1c9da3] - Updated dependencies [1cfb1c9da3] - Updated dependencies [fb3bb9118a] - - @iota/iota.js@0.36.0 + - @iota/iota-sdk@0.36.0 ## 0.3.0 @@ -285,7 +285,7 @@ ### Patch Changes - Updated dependencies [09d77325a9] - - @iota/iota.js@0.35.1 + - @iota/iota-sdk@0.35.1 ## 0.2.0 @@ -310,4 +310,4 @@ - Updated dependencies [9ce7e051b4] - Updated dependencies [9ce7e051b4] - Updated dependencies [bb50698551] - - @iota/iota.js@0.35.0 + - @iota/iota-sdk@0.35.0 diff --git a/sdk/kiosk/package.json b/sdk/kiosk/package.json index a7e9e30d5de..42c15c656a9 100644 --- a/sdk/kiosk/package.json +++ b/sdk/kiosk/package.json @@ -38,7 +38,7 @@ "prepare:e2e": "cargo build --bin iota-test-validator --bin iota --profile dev && cross-env RUST_LOG=info,iota=error,anemo_tower=warn,consensus=off cargo run --bin iota-test-validator" }, "dependencies": { - "@iota/iota.js": "workspace:*" + "@iota/iota-sdk": "workspace:*" }, "devDependencies": { "@iota/build-scripts": "workspace:*", diff --git a/sdk/kiosk/src/bcs.ts b/sdk/kiosk/src/bcs.ts index b4788e5fa21..033d0ca2dcb 100644 --- a/sdk/kiosk/src/bcs.ts +++ b/sdk/kiosk/src/bcs.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; import { KIOSK_PURCHASE_CAP, diff --git a/sdk/kiosk/src/client/kiosk-client.ts b/sdk/kiosk/src/client/kiosk-client.ts index 9275cad352b..8066c22e6df 100644 --- a/sdk/kiosk/src/client/kiosk-client.ts +++ b/sdk/kiosk/src/client/kiosk-client.ts @@ -2,9 +2,9 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { NetworkId } from '@iota/iota.js/client'; -import { getNetwork } from '@iota/iota.js/client'; -import type { IotaClient } from '@iota/iota.js/client'; +import type { NetworkId } from '@iota/iota-sdk/client'; +import { getNetwork } from '@iota/iota-sdk/client'; +import type { IotaClient } from '@iota/iota-sdk/client'; import { getBaseRules, rules } from '../constants.js'; import type { BaseRulePackageIds, TransferPolicyRule } from '../constants.js'; diff --git a/sdk/kiosk/src/client/kiosk-transaction.ts b/sdk/kiosk/src/client/kiosk-transaction.ts index 2ecca67479e..dd5c0cbbcc9 100644 --- a/sdk/kiosk/src/client/kiosk-transaction.ts +++ b/sdk/kiosk/src/client/kiosk-transaction.ts @@ -6,7 +6,7 @@ import type { TransactionArgument, TransactionBlock, TransactionObjectArgument, -} from '@iota/iota.js/transactions'; +} from '@iota/iota-sdk/transactions'; import * as kioskTx from '../tx/kiosk.js'; import { convertToPersonalTx, transferPersonalCapTx } from '../tx/personal-kiosk.js'; diff --git a/sdk/kiosk/src/client/tp-transaction.ts b/sdk/kiosk/src/client/tp-transaction.ts index 85189134b4e..b9934e7c29f 100644 --- a/sdk/kiosk/src/client/tp-transaction.ts +++ b/sdk/kiosk/src/client/tp-transaction.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota.js/transactions'; +import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota-sdk/transactions'; import { attachFloorPriceRuleTx, diff --git a/sdk/kiosk/src/constants.ts b/sdk/kiosk/src/constants.ts index 95eb4b81251..2c0ada13927 100644 --- a/sdk/kiosk/src/constants.ts +++ b/sdk/kiosk/src/constants.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // eslint-disable-next-line import/no-cycle -import type { KioskConfiguration } from '@iota/iota.js/client'; -import { getAllNetworks } from '@iota/iota.js/client'; +import type { KioskConfiguration } from '@iota/iota-sdk/client'; +import { getAllNetworks } from '@iota/iota-sdk/client'; import { resolveFloorPriceRule, resolveKioskLockRule, diff --git a/sdk/kiosk/src/query/kiosk.ts b/sdk/kiosk/src/query/kiosk.ts index 11e5b3a6e27..a31da8bf5a1 100644 --- a/sdk/kiosk/src/query/kiosk.ts +++ b/sdk/kiosk/src/query/kiosk.ts @@ -8,8 +8,8 @@ import type { IotaObjectData, IotaObjectDataFilter, IotaObjectResponse, -} from '@iota/iota.js/client'; -import { isValidIotaAddress } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { isValidIotaAddress } from '@iota/iota-sdk/utils'; import type { FetchKioskOptions, diff --git a/sdk/kiosk/src/query/transfer-policy.ts b/sdk/kiosk/src/query/transfer-policy.ts index 9bcd9de747b..f4144d95ccc 100644 --- a/sdk/kiosk/src/query/transfer-policy.ts +++ b/sdk/kiosk/src/query/transfer-policy.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient } from '@iota/iota.js/client'; -import { isValidIotaAddress } from '@iota/iota.js/utils'; +import type { IotaClient } from '@iota/iota-sdk/client'; +import { isValidIotaAddress } from '@iota/iota-sdk/utils'; import { bcs } from '../bcs.js'; import type { TransferPolicy, TransferPolicyCap } from '../types/index.js'; diff --git a/sdk/kiosk/src/tx/kiosk.ts b/sdk/kiosk/src/tx/kiosk.ts index 2ca2eb738a5..6ea0330cb98 100644 --- a/sdk/kiosk/src/tx/kiosk.ts +++ b/sdk/kiosk/src/tx/kiosk.ts @@ -2,12 +2,12 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; import type { TransactionArgument, TransactionBlock, TransactionObjectArgument, -} from '@iota/iota.js/transactions'; +} from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from '../types/index.js'; import { KIOSK_MODULE, KIOSK_TYPE } from '../types/index.js'; diff --git a/sdk/kiosk/src/tx/personal-kiosk.ts b/sdk/kiosk/src/tx/personal-kiosk.ts index c6784cd98db..c3ee7220eb2 100644 --- a/sdk/kiosk/src/tx/personal-kiosk.ts +++ b/sdk/kiosk/src/tx/personal-kiosk.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota.js/transactions'; +import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from '../types/index.js'; diff --git a/sdk/kiosk/src/tx/rules/attach.ts b/sdk/kiosk/src/tx/rules/attach.ts index d47b15d3fa8..ea87d317ddc 100644 --- a/sdk/kiosk/src/tx/rules/attach.ts +++ b/sdk/kiosk/src/tx/rules/attach.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { TransactionBlock } from '@iota/iota.js/transactions'; +import type { TransactionBlock } from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from '../../types/index.js'; diff --git a/sdk/kiosk/src/tx/transfer-policy.ts b/sdk/kiosk/src/tx/transfer-policy.ts index 18442430a06..8d2cf51fced 100644 --- a/sdk/kiosk/src/tx/transfer-policy.ts +++ b/sdk/kiosk/src/tx/transfer-policy.ts @@ -2,12 +2,12 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { bcs } from '@iota/iota.js/bcs'; +import { bcs } from '@iota/iota-sdk/bcs'; import type { TransactionArgument, TransactionBlock, TransactionObjectArgument, -} from '@iota/iota.js/transactions'; +} from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from '../types/index.js'; import { TRANSFER_POLICY_MODULE, TRANSFER_POLICY_TYPE } from '../types/index.js'; diff --git a/sdk/kiosk/src/types/index.ts b/sdk/kiosk/src/types/index.ts index 4c2b53ecd76..5f05798112c 100644 --- a/sdk/kiosk/src/types/index.ts +++ b/sdk/kiosk/src/types/index.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { IotaClient, NetworkId } from '@iota/iota.js/client'; -import type { TransactionObjectArgument } from '@iota/iota.js/transactions'; +import type { IotaClient, NetworkId } from '@iota/iota-sdk/client'; +import type { TransactionObjectArgument } from '@iota/iota-sdk/transactions'; import type { BaseRulePackageIds } from '../constants.js'; diff --git a/sdk/kiosk/src/types/kiosk.ts b/sdk/kiosk/src/types/kiosk.ts index 31bac98e5dd..8b2d5c2972c 100644 --- a/sdk/kiosk/src/types/kiosk.ts +++ b/sdk/kiosk/src/types/kiosk.ts @@ -6,8 +6,8 @@ import type { PaginatedObjectsResponse, IotaObjectData, IotaObjectDataOptions, -} from '@iota/iota.js/client'; -import type { TransactionArgument } from '@iota/iota.js/transactions'; +} from '@iota/iota-sdk/client'; +import type { TransactionArgument } from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from './index.js'; diff --git a/sdk/kiosk/src/types/transfer-policy.ts b/sdk/kiosk/src/types/transfer-policy.ts index 729298a98b4..f35645a1316 100644 --- a/sdk/kiosk/src/types/transfer-policy.ts +++ b/sdk/kiosk/src/types/transfer-policy.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { ObjectOwner } from '@iota/iota.js/client'; -import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota.js/transactions'; +import type { ObjectOwner } from '@iota/iota-sdk/client'; +import type { TransactionBlock, TransactionObjectArgument } from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from './index.js'; diff --git a/sdk/kiosk/src/utils.ts b/sdk/kiosk/src/utils.ts index bee906dbe12..731b8e56a0f 100644 --- a/sdk/kiosk/src/utils.ts +++ b/sdk/kiosk/src/utils.ts @@ -10,8 +10,8 @@ import type { IotaObjectDataFilter, IotaObjectDataOptions, IotaObjectResponse, -} from '@iota/iota.js/client'; -import { normalizeStructTag, normalizeIotaAddress, parseStructTag } from '@iota/iota.js/utils'; +} from '@iota/iota-sdk/client'; +import { normalizeStructTag, normalizeIotaAddress, parseStructTag } from '@iota/iota-sdk/utils'; import { bcs } from './bcs.js'; import type { Kiosk, KioskData, KioskListing, TransferPolicyCap } from './types/index.js'; diff --git a/sdk/kiosk/test/e2e/e2e.test.ts b/sdk/kiosk/test/e2e/e2e.test.ts index b7acf9c947f..0c0f14d215d 100644 --- a/sdk/kiosk/test/e2e/e2e.test.ts +++ b/sdk/kiosk/test/e2e/e2e.test.ts @@ -2,8 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { normalizeIotaAddress } from '@iota/iota.js/utils'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; +import { normalizeIotaAddress } from '@iota/iota-sdk/utils'; import { beforeAll, describe, expect, it } from 'vitest'; import { diff --git a/sdk/kiosk/test/e2e/helper.ts b/sdk/kiosk/test/e2e/helper.ts index d5321c24d0a..cf7c49cab9f 100644 --- a/sdk/kiosk/test/e2e/helper.ts +++ b/sdk/kiosk/test/e2e/helper.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import { expect } from 'vitest'; import type { KioskClient, KioskOwnerCap } from '../../src/index.js'; diff --git a/sdk/kiosk/test/e2e/setup.ts b/sdk/kiosk/test/e2e/setup.ts index e85a8c25600..770cbcb9ad9 100644 --- a/sdk/kiosk/test/e2e/setup.ts +++ b/sdk/kiosk/test/e2e/setup.ts @@ -7,11 +7,15 @@ import type { DevInspectResults, IotaObjectChangePublished, IotaTransactionBlockResponse, -} from '@iota/iota.js/client'; -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { FaucetRateLimitError, getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota.js/faucet'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +} from '@iota/iota-sdk/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { + FaucetRateLimitError, + getFaucetHost, + requestIotaFromFaucetV0, +} from '@iota/iota-sdk/faucet'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; import tmp from 'tmp'; import { retry } from 'ts-retry-promise'; import { expect } from 'vitest'; @@ -50,7 +54,7 @@ export function getClient(): IotaClient { }); } -// TODO: expose these testing utils from @iota/iota.js +// TODO: expose these testing utils from @iota/iota-sdk export async function setupIotaClient() { const keypair = Ed25519Keypair.generate(); const address = keypair.getPublicKey().toIotaAddress(); @@ -66,7 +70,7 @@ export async function setupIotaClient() { return new TestToolbox(keypair, client); } -// TODO: expose these testing utils from @iota/iota.js +// TODO: expose these testing utils from @iota/iota-sdk export async function publishPackage(packagePath: string, toolbox?: TestToolbox) { // TODO: We create a unique publish address per publish, but we really could share one for all publishes. if (!toolbox) { diff --git a/sdk/typescript/CHANGELOG.md b/sdk/typescript/CHANGELOG.md index d93d49f680a..81124e71d2f 100644 --- a/sdk/typescript/CHANGELOG.md +++ b/sdk/typescript/CHANGELOG.md @@ -1,4 +1,4 @@ -# @iota/iota.js +# @iota/iota-sdk ## 0.51.1 @@ -83,7 +83,7 @@ If you are using the `subscribeEvent` or `subscribeTransaction` in environments that do not support the `WebSocket` api natively (This will be true for most versions of Node.js) you will need to provide a WebSocket implementation when creating your IotaClient. You can either use a global polyfill for the WebSocket class, or pass a compatible WebSocket implementation into IotaHTTPTransport (eg, using the `ws` package) ```typescript - import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota.js/client'; + import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; import { WebSocket } from 'ws'; new IotaClient({ @@ -198,7 +198,7 @@ ### Minor Changes -- fd8589806: Remove all previously deprecated exports from @iota/iota.js +- fd8589806: Remove all previously deprecated exports from @iota/iota-sdk ## 0.41.2 @@ -217,7 +217,7 @@ ### Minor Changes -- ba8e3b857: Rename TransactionBlock generated type in @iota/iota.js/client to IotaTransactionBlock to avoid conflicting names in exports +- ba8e3b857: Rename TransactionBlock generated type in @iota/iota-sdk/client to IotaTransactionBlock to avoid conflicting names in exports ### Patch Changes @@ -227,7 +227,7 @@ ### Minor Changes -- a503cad34: Add exports to `@iota/iota.js/client` for rpc method params +- a503cad34: Add exports to `@iota/iota-sdk/client` for rpc method params ### Patch Changes @@ -251,15 +251,15 @@ - cc6441f46: The Iota TS SDK has been broken up into a set of modular exports, and all exports from the root of the package have been deprecated. The following export paths have been added: - - `@iota/iota.js/client` - A client for interacting with Iota RPC nodes. - - `@iota/iota.js/bcs` - A BCS builder with pre-defined types for Iota. - - `@iota/iota.js/transaction` - Utilities for building and interacting with transactions. - - `@iota/iota.js/keypairs/*` - Modular exports for specific KeyPair implementations. - - `@iota/iota.js/verify` - Methods for verifying transactions and messages. - - `@iota/iota.js/cryptography` - Shared types and classes for cryptography. - - `@iota/iota.js/multisig` - Utilities for working with multisig signatures. - - `@iota/iota.js/utils` - Utilities for formatting and parsing various Iota types. - - `@iota/iota.js/faucet`- Methods for requesting iota from a faucet. + - `@iota/iota-sdk/client` - A client for interacting with Iota RPC nodes. + - `@iota/iota-sdk/bcs` - A BCS builder with pre-defined types for Iota. + - `@iota/iota-sdk/transaction` - Utilities for building and interacting with transactions. + - `@iota/iota-sdk/keypairs/*` - Modular exports for specific KeyPair implementations. + - `@iota/iota-sdk/verify` - Methods for verifying transactions and messages. + - `@iota/iota-sdk/cryptography` - Shared types and classes for cryptography. + - `@iota/iota-sdk/multisig` - Utilities for working with multisig signatures. + - `@iota/iota-sdk/utils` - Utilities for formatting and parsing various Iota types. + - `@iota/iota-sdk/faucet`- Methods for requesting iota from a faucet. As part of this refactor we are deprecating a number of existing APIs: @@ -268,7 +268,7 @@ in verifying has been moved to the KeyPair classes, and the `signAndExecuteTransactionBlock` method has been moved to the new `IotaClient`. - The `superstruct` type definitions for types used by JsonRPCProvider are being replaced with - generated types exported from `@iota/iota.js/client`. The new type definitions are pure + generated types exported from `@iota/iota-sdk/client`. The new type definitions are pure typescript types and can't be used for runtime validation. By generating these as types, it will be easier to keep them in sync with the RPC definitions and avoid discrepancies between the type definitions in the SDK and the data returned by RPC methods. @@ -298,8 +298,8 @@ provider. ```diff - - import { JsonRpcProvider, devnetConnection } from '@iota/iota.js'; - + import { IotaClient, getFullnodeUrl } from '@iota/iota.js/client'; + - import { JsonRpcProvider, devnetConnection } from '@iota/iota-sdk'; + + import { IotaClient, getFullnodeUrl } from '@iota/iota-sdk/client'; - const provider = new JsonRpcProvider(localnetConnection); + const client = new IotaClient({ url: getFullnodeUrl('localnet')}); @@ -317,10 +317,10 @@ - RawSigner, - TransactionBlock, - localnetConnection, - - } from '@iota/iota.js'; - + import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; - + import { IotaClient, getFullnodeUrl } from '@iota/iota.js/client'; - + import { TransactionBlock } from '@iota/iota.js/transactions'; + - } from '@iota/iota-sdk'; + + import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; + + import { IotaClient, getFullnodeUrl } from '@iota/iota-sdk/client'; + + import { TransactionBlock } from '@iota/iota-sdk/transactions'; const keypair = new Ed25519Keypair() - const provider = new JsonRpcProvider(localnetConnection); @@ -338,12 +338,12 @@ #### Migrating faucet requests The ability to request Iota from a faucet was not added to `IotaClient`, instead you will need to use - a method `@iota/iota.js/faucet` to make these requests + a method `@iota/iota-sdk/faucet` to make these requests ```diff - - import { JsonRpcProvider, devnetConnection } from '@iota/iota.js'; + - import { JsonRpcProvider, devnetConnection } from '@iota/iota-sdk'; - const provider = new JsonRpcProvider(devnetConnection); - + import { requestIotaFromFaucetV0, getFaucetHost } from '@iota/iota.js/faucet'; + + import { requestIotaFromFaucetV0, getFaucetHost } from '@iota/iota-sdk/faucet'; - await provider.requestIotaFromFaucet( - '' @@ -354,7 +354,7 @@ +}); ``` -- 001148443: Introduce new `@iota/iota.js/faucet` export, which should be used for all faucet interactions. This deprecates the previous `requestIotaFromFaucet` APIs that existed on the `JsonRpcProvider` and `Signer` classes. +- 001148443: Introduce new `@iota/iota-sdk/faucet` export, which should be used for all faucet interactions. This deprecates the previous `requestIotaFromFaucet` APIs that existed on the `JsonRpcProvider` and `Signer` classes. ### Patch Changes diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md index fa8f6ca7b98..87bfc0c051d 100644 --- a/sdk/typescript/README.md +++ b/sdk/typescript/README.md @@ -15,26 +15,26 @@ upcoming TestNet launch. ## Working with Devnet -The SDK will be published to [npm registry](https://www.npmjs.com/package/@iota/iota.js) with the +The SDK will be published to [npm registry](https://www.npmjs.com/package/@iota/iota-sdk) with the same bi-weekly release cycle as the Devnet validators and [RPC Server](https://github.com/iotaledger/iota/blob/main/docs/content/references/iota-api.mdx). To use the SDK in your project, you can do: ```bash -$ npm install @iota/iota.js +$ npm install @iota/iota-sdk ``` You can also use your preferred npm client, such as yarn or pnpm. ## Working with local network -Note that the `latest` tag for the [published SDK](https://www.npmjs.com/package/@iota/iota.js) +Note that the `latest` tag for the [published SDK](https://www.npmjs.com/package/@iota/iota-sdk) might go out of sync with the RPC server on the `main` branch until the next release. If you're developing against a local network, we recommend using the `experimental`-tagged packages, which contain the latest changes from `main`. ```bash -npm install @iota/iota.js@experimental +npm install @iota/iota-sdk@experimental ``` Refer to the @@ -57,7 +57,7 @@ $ pnpm sdk build ## Type Doc You can view the generated [Type Doc](https://typedoc.org/) for the -[current release of the SDK](https://www.npmjs.com/package/@iota/iota.js) at +[current release of the SDK](https://www.npmjs.com/package/@iota/iota-sdk) at http://typescript-sdk-docs.s3-website-us-east-1.amazonaws.com/. For the latest docs for the `main` branch, run `pnpm doc` and open the @@ -68,16 +68,16 @@ For the latest docs for the `main` branch, run `pnpm doc` and open the To run unit tests ``` -pnpm --filter @iota/iota.js test:unit +pnpm --filter @iota/iota-sdk test:unit ``` To run E2E tests against local network ``` -pnpm --filter @iota/iota.js prepare:e2e +pnpm --filter @iota/iota-sdk prepare:e2e // This will run all e2e tests -pnpm --filter @iota/iota.js test:e2e +pnpm --filter @iota/iota-sdk test:e2e // Alternatively you can choose to run only one test file npx vitest txn-builder.test.ts @@ -96,7 +96,7 @@ https://stackoverflow.com/questions/52676244/node-version-not-updating-after-nvm To run E2E tests against Devnet ``` -VITE_FAUCET_URL='https://faucet.devnet.iota.io:443/gas' VITE_FULLNODE_URL='https://fullnode.devnet.iota.io' pnpm --filter @iota/iota.js exec vitest e2e +VITE_FAUCET_URL='https://faucet.devnet.iota.io:443/gas' VITE_FULLNODE_URL='https://fullnode.devnet.iota.io' pnpm --filter @iota/iota-sdk exec vitest e2e ``` ## Connecting to Iota Network @@ -108,7 +108,7 @@ read-only operations. The default URLs to connect with the RPC server are: - Devnet: https://fullnode.devnet.iota.io ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // create a client connected to devnet const client = new IotaClient({ url: getFullnodeUrl('devnet') }); @@ -124,7 +124,7 @@ with a local validator, a fullnode, and a faucet server. Refer to [this guide](https://docs.iota.io/build/iota-local-network) for more information. ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // create a client connected to devnet const client = new IotaClient({ url: getFullnodeUrl('localnet') }); @@ -138,7 +138,7 @@ await client.getCoins({ You can also construct your own in custom connections, with the URL for your own fullnode ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // create a client connected to devnet const client = new IotaClient({ @@ -156,7 +156,7 @@ await client.getCoins({ You can request iota from the faucet when running against devnet, testnet, or localnet ```typescript -import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota.js/faucet'; +import { getFaucetHost, requestIotaFromFaucetV0 } from '@iota/iota-sdk/faucet'; await requestIotaFromFaucetV0({ host: getFaucetHost('testnet'), @@ -172,9 +172,9 @@ For a primer for building transactions, refer to ### Transfer Object ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // Generate a new Ed25519 Keypair const keypair = new Ed25519Keypair(); @@ -199,9 +199,9 @@ console.log({ result }); To transfer `1000` MICROS to another address: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // Generate a new Ed25519 Keypair const keypair = new Ed25519Keypair(); @@ -222,9 +222,9 @@ console.log({ result }); ### Merge coins ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // Generate a new Ed25519 Keypair const keypair = new Ed25519Keypair(); @@ -246,9 +246,9 @@ console.log({ result }); ### Move Call ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; // Generate a new Ed25519 Keypair const keypair = new Ed25519Keypair(); @@ -273,9 +273,9 @@ console.log({ result }); To publish a package: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import { TransactionBlock } from '@iota/iota.js/transactions'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; +import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519'; +import { TransactionBlock } from '@iota/iota-sdk/transactions'; const { execSync } = require('child_process'); // Generate a new Ed25519 Keypair @@ -309,7 +309,7 @@ Fetch objects owned by the address `0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231` ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -325,7 +325,7 @@ Fetch object details for the object with id `0xe19739da1a701eadc21683c5b127e62b553e833e8a15a4f292f4f48b4afea3f2` ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -351,7 +351,7 @@ const txns = await client.multiGetObjects({ Fetch transaction details from transaction digests: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -419,7 +419,7 @@ Fetch coins of type `0x65b0553a591d7b13376e03a408e112c706dc0909a79080c810b93b06f owned by an address: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -433,7 +433,7 @@ const coins = await client.getCoins({ Fetch all coin objects owned by an address: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -446,7 +446,7 @@ const allCoins = await client.getAllCoins({ Fetch the total coin balance for one coin type, owned by an address: ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -464,7 +464,7 @@ Querying events created by transactions sent by account `0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231` ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -479,7 +479,7 @@ Subscribe to all events created by transactions sent by account `0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231` ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), @@ -502,7 +502,7 @@ await unsubscribe(); Subscribe to all events created by a package's `nft` module ```typescript -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; +import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient({ url: getFullnodeUrl('testnet'), diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index 5475928c9e3..4e2d82e5354 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -1,5 +1,5 @@ { - "name": "@iota/iota.js", + "name": "@iota/iota-sdk", "author": "Mysten Labs ", "description": "Iota TypeScript API(Work in Progress)", "homepage": "https://sdk.mystenlabs.com", diff --git a/sdk/wallet-standard/CHANGELOG.md b/sdk/wallet-standard/CHANGELOG.md index e3d9784512c..46ef1337833 100644 --- a/sdk/wallet-standard/CHANGELOG.md +++ b/sdk/wallet-standard/CHANGELOG.md @@ -5,7 +5,7 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 ## 0.11.0 @@ -16,7 +16,7 @@ ### Patch Changes - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 ## 0.10.3 @@ -24,7 +24,7 @@ - 4830361fa4: Updated typescript version - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 ## 0.10.2 @@ -36,7 +36,7 @@ - Updated dependencies [13e922d9b1] - Updated dependencies [a34f1cb67d] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 ## 0.10.1 @@ -44,7 +44,7 @@ - 9ac0a4ec01: Add extensions to all sdk import paths - Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 ## 0.10.0 @@ -55,7 +55,7 @@ ### Patch Changes - Updated dependencies [e5f9e3ba21] - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 ## 0.9.0 @@ -67,14 +67,14 @@ - dd362ec1d6: Update docs url to sdk.mystenlabs.com - Updated dependencies [dd362ec1d6] - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 ## 0.8.11 ### Patch Changes - Updated dependencies [cdcfa76c43] - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 ## 0.8.10 @@ -84,14 +84,14 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 ## 0.8.9 ### Patch Changes - Updated dependencies [652bcdd92] - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 ## 0.8.8 @@ -102,21 +102,21 @@ - Updated dependencies [8d1e74e52] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 ## 0.8.7 ### Patch Changes - Updated dependencies [30b47b758] - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 ## 0.8.6 ### Patch Changes - Updated dependencies [b9afb5567] - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 ## 0.8.5 @@ -125,21 +125,21 @@ - b48289346: Mark packages as being side-effect free. - Updated dependencies [b48289346] - Updated dependencies [11cf4e68b] - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 ## 0.8.4 ### Patch Changes - Updated dependencies [004fb1991] - - @iota/iota.js@0.43.3 + - @iota/iota-sdk@0.43.3 ## 0.8.3 ### Patch Changes - Updated dependencies [9b052166d] - - @iota/iota.js@0.43.2 + - @iota/iota-sdk@0.43.2 ## 0.8.2 @@ -147,7 +147,7 @@ - Updated dependencies [faa13ded9] - Updated dependencies [c5684bb52] - - @iota/iota.js@0.43.1 + - @iota/iota-sdk@0.43.1 ## 0.8.1 @@ -158,25 +158,25 @@ - Updated dependencies [e4484852b] - Updated dependencies [71e0a3197] - Updated dependencies [1bc430161] - - @iota/iota.js@0.43.0 + - @iota/iota-sdk@0.43.0 ## 0.8.0 ### Minor Changes -- fd8589806: Remove uses of deprecated imports from @iota/iota.js +- fd8589806: Remove uses of deprecated imports from @iota/iota-sdk - 8b9e5f737: Added new isWalletWithRequiredFeatureSet utility and accompanying type ### Patch Changes - Updated dependencies [fd8589806] - - @iota/iota.js@0.42.0 + - @iota/iota-sdk@0.42.0 ## 0.7.2 ### Patch Changes -- @iota/iota.js@0.41.2 +- @iota/iota-sdk@0.41.2 ## 0.7.1 @@ -184,7 +184,7 @@ - 189e02aba: Fix broken documentation link for the wallet-standard SDK - Updated dependencies [24c21e1f0] - - @iota/iota.js@0.41.1 + - @iota/iota-sdk@0.41.1 ## 0.7.0 @@ -196,7 +196,7 @@ - Updated dependencies [ba8e3b857] - Updated dependencies [f4b7b3474] - - @iota/iota.js@0.41.0 + - @iota/iota-sdk@0.41.0 ## 0.6.0 @@ -208,14 +208,14 @@ - Updated dependencies [a503cad34] - Updated dependencies [8281e3d25] - - @iota/iota.js@0.40.0 + - @iota/iota-sdk@0.40.0 ## 0.5.14 ### Patch Changes - Updated dependencies [47ea5ec7c] - - @iota/iota.js@0.39.0 + - @iota/iota-sdk@0.39.0 ## 0.5.13 @@ -232,14 +232,14 @@ - Updated dependencies [6d41059c7] - Updated dependencies [cc6441f46] - Updated dependencies [001148443] - - @iota/iota.js@0.38.0 + - @iota/iota-sdk@0.38.0 ## 0.5.12 ### Patch Changes - Updated dependencies [34cc7d610] - - @iota/iota.js@0.37.1 + - @iota/iota-sdk@0.37.1 ## 0.5.11 @@ -252,7 +252,7 @@ - Updated dependencies [a17d3678a] - Updated dependencies [2f37537d5] - Updated dependencies [00484bcc3] - - @iota/iota.js@0.37.0 + - @iota/iota-sdk@0.37.0 ## 0.5.10 @@ -262,14 +262,14 @@ - Updated dependencies [1cfb1c9da3] - Updated dependencies [1cfb1c9da3] - Updated dependencies [fb3bb9118a] - - @iota/iota.js@0.36.0 + - @iota/iota-sdk@0.36.0 ## 0.5.9 ### Patch Changes - Updated dependencies [09d77325a9] - - @iota/iota.js@0.35.1 + - @iota/iota-sdk@0.35.1 ## 0.5.8 @@ -283,7 +283,7 @@ - Updated dependencies [9ce7e051b4] - Updated dependencies [9ce7e051b4] - Updated dependencies [bb50698551] - - @iota/iota.js@0.35.0 + - @iota/iota-sdk@0.35.0 ## 0.5.7 @@ -292,7 +292,7 @@ - Updated dependencies [85719ac933] - Updated dependencies [c3d9cc87f3] - Updated dependencies [02a6063f82] - - @iota/iota.js@0.34.1 + - @iota/iota-sdk@0.34.1 ## 0.5.6 @@ -300,7 +300,7 @@ - Updated dependencies [280821e0ab] - Updated dependencies [6a9abe9e38] - - @iota/iota.js@0.34.0 + - @iota/iota-sdk@0.34.0 ## 0.5.5 @@ -314,7 +314,7 @@ - Updated dependencies [91c63e4f8] - Updated dependencies [e61ed2bac] - Updated dependencies [5053a8dc8] - - @iota/iota.js@0.33.0 + - @iota/iota-sdk@0.33.0 ## 0.5.4 @@ -329,21 +329,21 @@ - Updated dependencies [c219e7470] - Updated dependencies [4e463c691] - Updated dependencies [b4f0bfc76] - - @iota/iota.js@0.32.2 + - @iota/iota-sdk@0.32.2 ## 0.5.3 ### Patch Changes - Updated dependencies [3224ffcd0] - - @iota/iota.js@0.32.1 + - @iota/iota-sdk@0.32.1 ## 0.5.2 ### Patch Changes - Updated dependencies [9b42d0ada] - - @iota/iota.js@0.32.0 + - @iota/iota-sdk@0.32.0 ## 0.5.1 @@ -354,7 +354,7 @@ - Updated dependencies [f3c096e3a] - Updated dependencies [5a4e3e416] - Updated dependencies [27dec39eb] - - @iota/iota.js@0.31.0 + - @iota/iota-sdk@0.31.0 ## 0.5.0 @@ -437,14 +437,14 @@ - Updated dependencies [9b60bf700] - Updated dependencies [64fb649eb] - Updated dependencies [a6b0c4e5f] - - @iota/iota.js@0.30.0 + - @iota/iota-sdk@0.30.0 ## 0.4.3 ### Patch Changes - Updated dependencies [31bfcae6a] - - @iota/iota.js@0.29.1 + - @iota/iota-sdk@0.29.1 ## 0.4.2 @@ -458,7 +458,7 @@ - Updated dependencies [4baf554f1] - Updated dependencies [aa650aa3b] - Updated dependencies [6ff0c785f] - - @iota/iota.js@0.29.0 + - @iota/iota-sdk@0.29.0 ## 0.4.1 @@ -468,7 +468,7 @@ - Updated dependencies [24bdb66c6] - Updated dependencies [a67cc044b] - Updated dependencies [a67cc044b] - - @iota/iota.js@0.28.0 + - @iota/iota-sdk@0.28.0 ## 0.4.0 @@ -485,14 +485,14 @@ - Updated dependencies [629804d26] - Updated dependencies [f51c85e85] - Updated dependencies [e630f6832] - - @iota/iota.js@0.27.0 + - @iota/iota-sdk@0.27.0 ## 0.3.1 ### Patch Changes - Updated dependencies [97c46ca9d] - - @iota/iota.js@0.26.1 + - @iota/iota-sdk@0.26.1 ## 0.3.0 @@ -510,7 +510,7 @@ - Updated dependencies [e6a71882f] - Updated dependencies [21781ba52] - Updated dependencies [b3ba6dfbc] - - @iota/iota.js@0.26.0 + - @iota/iota-sdk@0.26.0 ## 0.2.11 @@ -520,7 +520,7 @@ - Updated dependencies [7b4bf43bc] - Updated dependencies [72481e759] - Updated dependencies [969a88669] - - @iota/iota.js@0.25.0 + - @iota/iota-sdk@0.25.0 ## 0.2.10 @@ -531,7 +531,7 @@ - Updated dependencies [88a687834] - Updated dependencies [89091ddab] - Updated dependencies [71bee7563] - - @iota/iota.js@0.24.0 + - @iota/iota-sdk@0.24.0 ## 0.2.9 @@ -546,7 +546,7 @@ - Updated dependencies [8474242af] - Updated dependencies [01efa8bc6] - Updated dependencies [f74181212] - - @iota/iota.js@0.23.0 + - @iota/iota-sdk@0.23.0 ## 0.2.8 @@ -554,7 +554,7 @@ - Updated dependencies [a55236e48] - Updated dependencies [8ae226dae] - - @iota/iota.js@0.22.0 + - @iota/iota-sdk@0.22.0 ## 0.2.7 @@ -565,7 +565,7 @@ - Updated dependencies [9fbe2714b] - Updated dependencies [d2015f815] - Updated dependencies [7d0f25b61] - - @iota/iota.js@0.21.0 + - @iota/iota-sdk@0.21.0 ## 0.2.6 @@ -573,7 +573,7 @@ - Updated dependencies [f93b59f3a] - Updated dependencies [ea71d8216] - - @iota/iota.js@0.20.0 + - @iota/iota-sdk@0.20.0 ## 0.2.5 @@ -585,7 +585,7 @@ - Updated dependencies [b03bfaec2] - Updated dependencies [f9be28a42] - Updated dependencies [24987df35] - - @iota/iota.js@0.19.0 + - @iota/iota-sdk@0.19.0 ## 0.2.4 @@ -596,14 +596,14 @@ - Updated dependencies [45293b6ff] - Updated dependencies [7a67d61e2] - Updated dependencies [2a0b8e85d] - - @iota/iota.js@0.18.0 + - @iota/iota-sdk@0.18.0 ## 0.2.3 ### Patch Changes - Updated dependencies [623505886] - - @iota/iota.js@0.17.1 + - @iota/iota-sdk@0.17.1 ## 0.2.2 @@ -612,7 +612,7 @@ - Updated dependencies [a9602e533] - Updated dependencies [db22728c1] - Updated dependencies [3b510d0fc] - - @iota/iota.js@0.17.0 + - @iota/iota-sdk@0.17.0 ## 0.2.1 @@ -620,7 +620,7 @@ - Updated dependencies [01989d3d5] - Updated dependencies [5e20e6569] - - @iota/iota.js@0.16.0 + - @iota/iota-sdk@0.16.0 ## 0.2.0 @@ -635,7 +635,7 @@ - Updated dependencies [90898d366] - Updated dependencies [c27933292] - Updated dependencies [c27933292] - - @iota/iota.js@0.15.0 + - @iota/iota-sdk@0.15.0 ## 0.1.2 @@ -649,7 +649,7 @@ - Updated dependencies [e45b188a8] - Updated dependencies [2dc594ef7] - Updated dependencies [4f0c611ff] - - @iota/iota.js@0.14.0 + - @iota/iota-sdk@0.14.0 ## 0.1.1 @@ -659,7 +659,7 @@ - Updated dependencies [b11b69262] - Updated dependencies [b11b69262] - Updated dependencies [b11b69262] - - @iota/iota.js@0.13.0 + - @iota/iota-sdk@0.13.0 ## 0.1.0 @@ -676,4 +676,4 @@ - Updated dependencies [4575c0a02] - Updated dependencies [e0b173b9e] - Updated dependencies [ccf7f148d] - - @iota/iota.js@0.12.0 + - @iota/iota-sdk@0.12.0 diff --git a/sdk/wallet-standard/package.json b/sdk/wallet-standard/package.json index a250a1c19d6..34e8aed3447 100644 --- a/sdk/wallet-standard/package.json +++ b/sdk/wallet-standard/package.json @@ -32,7 +32,7 @@ "lint:fix": "pnpm run eslint:fix && pnpm run prettier:fix" }, "dependencies": { - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@wallet-standard/core": "1.0.3" }, "devDependencies": { diff --git a/sdk/wallet-standard/src/chains.ts b/sdk/wallet-standard/src/chains.ts index 96dd5c9c359..f3614acdccb 100644 --- a/sdk/wallet-standard/src/chains.ts +++ b/sdk/wallet-standard/src/chains.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { getAllNetworks } from '@iota/iota.js/client'; +import { getAllNetworks } from '@iota/iota-sdk/client'; import type { IdentifierString } from '@wallet-standard/core'; export const SUPPORTED_CHAINS = Object.values(getAllNetworks()).map((network) => network.chain); diff --git a/sdk/wallet-standard/src/features/iotaSignAndExecuteTransactionBlock.ts b/sdk/wallet-standard/src/features/iotaSignAndExecuteTransactionBlock.ts index 601f55dbb2a..d1d63c54524 100644 --- a/sdk/wallet-standard/src/features/iotaSignAndExecuteTransactionBlock.ts +++ b/sdk/wallet-standard/src/features/iotaSignAndExecuteTransactionBlock.ts @@ -6,7 +6,7 @@ import type { ExecuteTransactionRequestType, IotaTransactionBlockResponse, IotaTransactionBlockResponseOptions, -} from '@iota/iota.js/client'; +} from '@iota/iota-sdk/client'; import type { IotaSignTransactionBlockInput } from './iotaSignTransactionBlock.js'; diff --git a/sdk/wallet-standard/src/features/iotaSignTransactionBlock.ts b/sdk/wallet-standard/src/features/iotaSignTransactionBlock.ts index 1e2d7caa9ae..a0fb03bb34b 100644 --- a/sdk/wallet-standard/src/features/iotaSignTransactionBlock.ts +++ b/sdk/wallet-standard/src/features/iotaSignTransactionBlock.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { TransactionBlock } from '@iota/iota.js/transactions'; +import type { TransactionBlock } from '@iota/iota-sdk/transactions'; import type { IdentifierString, WalletAccount } from '@wallet-standard/core'; /** The latest API version of the signTransactionBlock API. */ diff --git a/sdk/zklogin/CHANGELOG.md b/sdk/zklogin/CHANGELOG.md index 1de76d5fcb2..faa49355973 100644 --- a/sdk/zklogin/CHANGELOG.md +++ b/sdk/zklogin/CHANGELOG.md @@ -5,7 +5,7 @@ ### Patch Changes - Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 + - @iota/iota-sdk@0.51.1 ## 0.5.0 @@ -16,7 +16,7 @@ ### Patch Changes - Updated dependencies [0cafa94027] - - @iota/iota.js@0.51.0 + - @iota/iota-sdk@0.51.0 ## 0.4.3 @@ -24,7 +24,7 @@ - 4830361fa4: Updated typescript version - Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 + - @iota/iota-sdk@0.50.1 - @iota/bcs@0.11.1 ## 0.4.2 @@ -38,7 +38,7 @@ - Updated dependencies [13e922d9b1] - Updated dependencies [a34f1cb67d] - Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 + - @iota/iota-sdk@0.50.0 - @iota/bcs@0.11.0 ## 0.4.1 @@ -46,7 +46,7 @@ ### Patch Changes - Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 + - @iota/iota-sdk@0.49.1 - @iota/bcs@0.10.1 ## 0.4.0 @@ -58,7 +58,7 @@ ### Patch Changes - Updated dependencies [e5f9e3ba21] - - @iota/iota.js@0.49.0 + - @iota/iota-sdk@0.49.0 - @iota/bcs@0.10.0 ## 0.3.10 @@ -66,7 +66,7 @@ ### Patch Changes - Updated dependencies [dd362ec1d6] - - @iota/iota.js@0.48.1 + - @iota/iota-sdk@0.48.1 - @iota/bcs@0.9.1 ## 0.3.9 @@ -75,7 +75,7 @@ - Updated dependencies [cdcfa76c43] - Updated dependencies [fce0a08d0f] - - @iota/iota.js@0.48.0 + - @iota/iota-sdk@0.48.0 - @iota/bcs@0.9.0 ## 0.3.8 @@ -93,14 +93,14 @@ - Updated dependencies [9ac7e2f3d] - Updated dependencies [0259aec82] - Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 + - @iota/iota-sdk@0.47.0 ## 0.3.6 ### Patch Changes - Updated dependencies [652bcdd92] - - @iota/iota.js@0.46.1 + - @iota/iota-sdk@0.46.1 ## 0.3.5 @@ -112,21 +112,21 @@ - Updated dependencies [8d1e74e52] - Updated dependencies [093554a0d] - Updated dependencies [3718a230b] - - @iota/iota.js@0.46.0 + - @iota/iota-sdk@0.46.0 ## 0.3.4 ### Patch Changes - Updated dependencies [30b47b758] - - @iota/iota.js@0.45.1 + - @iota/iota-sdk@0.45.1 ## 0.3.3 ### Patch Changes - Updated dependencies [b9afb5567] - - @iota/iota.js@0.45.0 + - @iota/iota-sdk@0.45.0 ## 0.3.2 @@ -164,7 +164,7 @@ - b48289346: Mark packages as being side-effect free. - Updated dependencies [b48289346] - Updated dependencies [11cf4e68b] - - @iota/iota.js@0.44.0 + - @iota/iota-sdk@0.44.0 - @iota/bcs@0.8.1 ## 0.1.8 @@ -172,14 +172,14 @@ ### Patch Changes - Updated dependencies [004fb1991] - - @iota/iota.js@0.43.3 + - @iota/iota-sdk@0.43.3 ## 0.1.7 ### Patch Changes - Updated dependencies [9b052166d] - - @iota/iota.js@0.43.2 + - @iota/iota-sdk@0.43.2 ## 0.1.6 @@ -188,13 +188,13 @@ - c5684bb52: rename zk to zkLogin - Updated dependencies [faa13ded9] - Updated dependencies [c5684bb52] - - @iota/iota.js@0.43.1 + - @iota/iota-sdk@0.43.1 ## 0.1.5 ### Patch Changes -- 3764c464f: - use new zklogin package from @iota/iota.js for some of the zklogin functionality +- 3764c464f: - use new zklogin package from @iota/iota-sdk for some of the zklogin functionality - rename `getZkSignature` to `getZkLoginSignature` - 71e0a3197: - stop exporting `ZkSignatureInputs` - use `toBigEndianBytes` instead of `toBufferBE` that was renamed @@ -205,7 +205,7 @@ - Updated dependencies [e4484852b] - Updated dependencies [71e0a3197] - Updated dependencies [1bc430161] - - @iota/iota.js@0.43.0 + - @iota/iota-sdk@0.43.0 - @iota/bcs@0.8.0 ## 0.1.4 @@ -216,7 +216,7 @@ - updated zklogin signature bcs struct for new camelCase fields - d257d20ee: Improve nodejs compatibility - Updated dependencies [fd8589806] - - @iota/iota.js@0.42.0 + - @iota/iota-sdk@0.42.0 ## 0.1.3 @@ -229,7 +229,7 @@ - d89fff405: Expose new randomness function - Updated dependencies [290c8e640] - @iota/bcs@0.7.4 - - @iota/iota.js@0.41.2 + - @iota/iota-sdk@0.41.2 ## 0.1.2 @@ -238,7 +238,7 @@ - d0750ea0f: rename pin to salt - a82600f2d: fix nonce calculation - Updated dependencies [24c21e1f0] - - @iota/iota.js@0.41.1 + - @iota/iota-sdk@0.41.1 ## 0.1.1 diff --git a/sdk/zklogin/package.json b/sdk/zklogin/package.json index 50c25ec0736..343ae13804b 100644 --- a/sdk/zklogin/package.json +++ b/sdk/zklogin/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@iota/bcs": "workspace:*", - "@iota/iota.js": "workspace:*", + "@iota/iota-sdk": "workspace:*", "@noble/hashes": "^1.3.1", "jose": "^5.2.3", "poseidon-lite": "^0.2.0" diff --git a/sdk/zklogin/src/address.ts b/sdk/zklogin/src/address.ts index 230327a36ee..b3793807a12 100644 --- a/sdk/zklogin/src/address.ts +++ b/sdk/zklogin/src/address.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { computeZkLoginAddressFromSeed } from '@iota/iota.js/zklogin'; +import { computeZkLoginAddressFromSeed } from '@iota/iota-sdk/zklogin'; import { decodeJwt } from 'jose'; import { genAddressSeed } from './utils.js'; diff --git a/sdk/zklogin/src/index.ts b/sdk/zklogin/src/index.ts index 3b62d0becf2..54ece6f1ac4 100644 --- a/sdk/zklogin/src/index.ts +++ b/sdk/zklogin/src/index.ts @@ -5,7 +5,7 @@ export { computeZkLoginAddress, jwtToAddress } from './address.js'; export type { ComputeZkLoginAddressOptions } from './address.js'; -export { getZkLoginSignature } from '@iota/iota.js/zklogin'; +export { getZkLoginSignature } from '@iota/iota-sdk/zklogin'; export { poseidonHash } from './poseidon.js'; diff --git a/sdk/zklogin/src/nonce.ts b/sdk/zklogin/src/nonce.ts index 93cea54d130..9f2cd4c1ce9 100644 --- a/sdk/zklogin/src/nonce.ts +++ b/sdk/zklogin/src/nonce.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { toHEX } from '@iota/bcs'; -import type { PublicKey } from '@iota/iota.js/cryptography'; -import { toBigEndianBytes } from '@iota/iota.js/zklogin'; +import type { PublicKey } from '@iota/iota-sdk/cryptography'; +import { toBigEndianBytes } from '@iota/iota-sdk/zklogin'; import { randomBytes } from '@noble/hashes/utils'; import { base64url } from 'jose'; diff --git a/sdk/zklogin/src/utils.ts b/sdk/zklogin/src/utils.ts index c1e6400224f..41ee8b39aef 100644 --- a/sdk/zklogin/src/utils.ts +++ b/sdk/zklogin/src/utils.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { PublicKey } from '@iota/iota.js/cryptography'; +import type { PublicKey } from '@iota/iota-sdk/cryptography'; import { poseidonHash } from './poseidon.js'; diff --git a/sdk/zklogin/vitest.config.ts b/sdk/zklogin/vitest.config.ts index 97cd48bbb46..1ef29e5f34d 100644 --- a/sdk/zklogin/vitest.config.ts +++ b/sdk/zklogin/vitest.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ resolve: { alias: { '@iota/bcs': new URL('../bcs/src', import.meta.url).toString(), - '@iota/iota.js': new URL('../typescript/src', import.meta.url).toString(), + '@iota/iota-sdk': new URL('../typescript/src', import.meta.url).toString(), }, }, });