diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml index 9e015fd86..e45b71277 100644 --- a/.github/workflows/pkg.pr.new.yml +++ b/.github/workflows/pkg.pr.new.yml @@ -29,8 +29,8 @@ jobs: run: pnpm install - name: Build - run: pnpm build --filter=@idos-network/issuer-sdk-js --filter=@idos-network/idos-sdk + run: pnpm build --filter=@idos-network/issuer-sdk-js --filter=@idos-network/idos-sdk --filter=@idos-network/idos-sdk-server-dapp - name: Release - run: pnpx pkg-pr-new publish --pnpm './packages/issuer-sdk-js' './packages/idos-sdk-js' + run: pnpx pkg-pr-new publish --pnpm './packages/issuer-sdk-js' './packages/idos-sdk-js' './packages/idos-sdk-server-dapp' \ No newline at end of file diff --git a/.github/workflows/playwright-playground.yml b/.github/workflows/playwright-playground.yml index f5fdd8859..c9d58ae33 100644 --- a/.github/workflows/playwright-playground.yml +++ b/.github/workflows/playwright-playground.yml @@ -26,13 +26,12 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: './.node_version' - working-directory: ./apps/idos-sdk-e2e - name: Install dependencies run: pnpm i - name: Install Playwright run: pnpm playwright install --with-deps chromium - name: Build Synpress cache - run: xvfb-run npx synpress tests/wallet-setup + run: xvfb-run npx synpress - name: Run Playwright tests run: xvfb-run npx playwright test - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/playwright-production.yml b/.github/workflows/playwright-production.yml index 44f447e54..9146fbdd6 100644 --- a/.github/workflows/playwright-production.yml +++ b/.github/workflows/playwright-production.yml @@ -26,13 +26,12 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: './.node_version' - working-directory: ./apps/idos-sdk-e2e - name: Install dependencies run: pnpm i - name: Install Playwright run: pnpm playwright install --with-deps chromium - name: Build Synpress cache - run: xvfb-run npx synpress tests/wallet-setup + run: xvfb-run npx synpress - name: Run Playwright tests run: xvfb-run npx playwright test - uses: actions/upload-artifact@v4 diff --git a/apps/idos-data-dashboard/src/routes/dashboard/credentials/index.tsx b/apps/idos-data-dashboard/src/routes/dashboard/credentials/index.tsx index e13f214df..ecbd53400 100644 --- a/apps/idos-data-dashboard/src/routes/dashboard/credentials/index.tsx +++ b/apps/idos-data-dashboard/src/routes/dashboard/credentials/index.tsx @@ -37,29 +37,7 @@ const useFetchCredentials = () => { .map((c) => c.id), })) as idOSCredentialWithShares[]; // @todo: remove once we have more type safety in the SDK. }, - select: (credentials) => - credentials - .filter((credential) => !credential.original_id) - - .map((credential) => { - const { credential_level, credential_status, credential_type, issuer } = - // biome-ignore lint/suspicious/noExplicitAny: // @todo: remove once we have successfully migrated to Credentials 2.0. - credential as any; - const fields = credential.public_notes ? JSON.parse(credential.public_notes) : {}; - - const public_notes = { - id: fields.id ?? credential.id, - level: fields.level ?? credential_level, - status: fields.status ?? credential_status, - type: fields.type ?? credential_type, - issuer: fields.issuer ?? issuer, - }; - - return { - ...credential, - public_notes: JSON.stringify(public_notes), - }; - }), + select: (credentials) => credentials.filter((credential) => !credential.original_id), }); }; diff --git a/apps/idos-sdk-e2e/test/wallet-setup/wallet-setup.setup.ts b/apps/idos-sdk-e2e/test/wallet-setup/wallet-setup.setup.ts new file mode 100644 index 000000000..15585ef74 --- /dev/null +++ b/apps/idos-sdk-e2e/test/wallet-setup/wallet-setup.setup.ts @@ -0,0 +1,14 @@ +import { MetaMask, defineWalletSetup, getExtensionId } from "@synthetixio/synpress"; + +const SEED_PHRASE = process.env.WALLET_SEED_PHRASE; +const PASSWORD = process.env.WALLET_PASSWORD; + +export default defineWalletSetup(PASSWORD, async (context, walletPage) => { + const extensionId = await getExtensionId(context, "MetaMask"); + + const metamask = new MetaMask(context, walletPage, PASSWORD, extensionId); + + await metamask.importWallet(SEED_PHRASE); + // Add a new account that doesn't exist in the idOS. + await metamask.addNewAccount("Pristine"); +}); diff --git a/apps/idos-sdk-e2e/tests/01-evm-auth.spec.ts b/apps/idos-sdk-e2e/tests/01-evm-auth.spec.ts index 9aba9e1d7..89c197b70 100644 --- a/apps/idos-sdk-e2e/tests/01-evm-auth.spec.ts +++ b/apps/idos-sdk-e2e/tests/01-evm-auth.spec.ts @@ -18,6 +18,7 @@ test("should login successfully with an EVM wallet", async ({ extensionId, }) => { const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); + await page.goto("/"); await page.getByRole("button", { name: "Connect a wallet" }).click(); await page.getByRole("button", { name: "Metamask" }).first().click(); await metamask.connectToDapp(["Pristine"]); @@ -32,6 +33,7 @@ test("should set successfully an EVM signer", async ({ extensionId, }) => { const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); + await page.goto("/"); await page.getByRole("button", { name: "Connect a wallet" }).click(); await page.getByRole("button", { name: "Metamask" }).first().click(); await metamask.switchAccount("Account 1"); diff --git a/apps/idos-sdk-e2e/tests/02-data.spec.ts b/apps/idos-sdk-e2e/tests/02-data.spec.ts index 2d31fc872..22bf5cc6f 100644 --- a/apps/idos-sdk-e2e/tests/02-data.spec.ts +++ b/apps/idos-sdk-e2e/tests/02-data.spec.ts @@ -28,7 +28,7 @@ test("should fetch credentials successfully", async ({ await page.waitForTimeout(2000); await metamask.confirmSignature(); const list = page.locator("#credentials-list"); - await expect(list.getByRole("listitem")).toHaveCount(2); + await expect(list.getByRole("listitem")).toHaveCount(3); }); test("should fetch wallets successfully", async ({ context, page, metamaskPage, extensionId }) => { diff --git a/apps/idos-sdk-e2e/tests/03-enclave.spec.ts b/apps/idos-sdk-e2e/tests/03-enclave.spec.ts index 514d41451..ce4656de2 100644 --- a/apps/idos-sdk-e2e/tests/03-enclave.spec.ts +++ b/apps/idos-sdk-e2e/tests/03-enclave.spec.ts @@ -71,5 +71,5 @@ test("should filter credentials by country successfully", async ({ const list = page.locator("#credentials-list"); - await expect(list.getByRole("listitem")).toHaveCount(1); + await expect(list.getByRole("listitem")).toHaveCount(0); }); diff --git a/apps/idos-sdk-e2e/tests/04-grants.spec.ts b/apps/idos-sdk-e2e/tests/04-grants.spec.ts index fb5a5e0c5..74fdf7b97 100644 --- a/apps/idos-sdk-e2e/tests/04-grants.spec.ts +++ b/apps/idos-sdk-e2e/tests/04-grants.spec.ts @@ -1,154 +1,154 @@ -import { MetaMask, metaMaskFixtures, testWithSynpress } from "@synthetixio/synpress"; -import basicSetup from "./wallet-setup/basic.setup"; - -const test = testWithSynpress(metaMaskFixtures(basicSetup)); -const { expect } = test; - -test.beforeEach(async ({ context, page }) => { - test.setTimeout(500000); - - await context.clearCookies(); - await page.evaluate(() => window.localStorage.clear()); -}); - -test("should create a grant successfully", async ({ context, page, metamaskPage, extensionId }) => { - const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); - await page.getByRole("button", { name: "Connect a wallet" }).click(); - await page.getByRole("button", { name: "Metamask" }).first().click(); - await metamask.switchAccount("Account 1"); - await metamask.connectToDapp(["Account 1"]); - await page.waitForTimeout(2000); - await metamask.confirmSignature(); - - const list = page.locator("#credentials-list"); - - await page.goto(process.env.GRANTS_TEST_BASE_URL as string); - await context.clearCookies(); - await page.evaluate(() => window.localStorage.clear()); - - await page.getByRole("checkbox", { name: "Credentials" }).click(); - - await page.getByRole("button", { name: "EVM" }).click(); - await metamask.approveSwitchNetwork(); - await metamask.switchAccount("Account 1"); - await metamask.connectToDapp(["Account 1"]); - await page.waitForTimeout(2000); - await metamask.confirmSignature(); - await page.waitForTimeout(2000); - - const credentialId = process.env.CREDENTIAL_ID as string; - await page.getByText(credentialId).click(); - - // We setup the popupPromise before clicking the button to open the popup. - // See https://playwright.dev/docs/pages#handling-popups for more information about how to handle popups. - const popupPromise = page.waitForEvent("popup"); - const idOSButton = page.frameLocator("#idos-enclave-iframe").locator("#unlock"); - await idOSButton.click(); - // Then we await the popupPromise to get the popup page. - const idOSPopup = await popupPromise; - await page.waitForTimeout(2000); - await (await idOSPopup.waitForSelector("#auth-method-password")).click(); - const passwordInput = idOSPopup.locator("#idos-password-input"); - await passwordInput.fill("qwerty"); - await idOSPopup.getByRole("button", { name: "Unlock" }).click(); - - // Timelock the grant for 1 minute. - page.on("dialog", async (dialog) => { - await dialog.accept("60"); - }); - - // Share the credential - await page.locator(`#acquire-access-grant-${credentialId}`).click(); - - await metamask.confirmSignature(); - await page.waitForTimeout(2000); - await metamask.confirmTransaction(); - - await (await page.waitForSelector(`#restart-${credentialId}`)).waitForElementState("visible"); - - // Navigate back and check for the grant creation - await page.goto(process.env.BASE_URL as string); - await metamask.confirmSignature(); - const manageGrantsButton = page.locator(`#manage-grants-${credentialId}`); - await manageGrantsButton.click(); - - const revokeButton = page.getByRole("button", { name: "Revoke" }).last(); - // As we created an AG with a timelock of 1 minute, the button should be disabled. - await expect(revokeButton).toBeDisabled(); -}); - -test("should revoke a grant successfully", async ({ context, page, metamaskPage, extensionId }) => { - await page.waitForTimeout(50000); - const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); - await page.getByRole("button", { name: "Connect a wallet" }).click(); - await page.getByRole("button", { name: "Metamask" }).first().click(); - - await metamask.switchAccount("Account 1"); - await metamask.connectToDapp(["Account 1"]); - await page.waitForTimeout(3000); - await metamask.confirmSignature(); - - const list = page.locator("#credentials-list"); - const credentialId = process.env.CREDENTIAL_ID as string; - const manageGrantsButton = page.locator(`#manage-grants-${credentialId}`); - await manageGrantsButton.click(); - await metamask.approveSwitchNetwork(); - await page.reload(); - await manageGrantsButton.click(); - - const revokeButton = page.getByRole("button", { name: "Revoke" }).first(); - await revokeButton.click(); - - await page.waitForTimeout(3000); - await metamask.confirmSignature(); - await page.waitForTimeout(3000); - await metamask.confirmTransaction(); - await page.waitForSelector("#no-grants"); - await expect(revokeButton).not.toBeVisible(); - await expect(page.locator(`#grants-for-${credentialId}`)).not.toBeVisible(); -}); - -test("should share a matching credential successfully", async ({ - context, - page, - metamaskPage, - extensionId, -}) => { - await page.goto("/e2e/credential-filtering"); - const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); - await page.getByRole("button", { name: "Connect a wallet" }).click(); - await page.getByRole("button", { name: "Metamask" }).first().click(); - await metamask.switchAccount("Account 1"); - await metamask.connectToDapp(["Account 1"]); - await page.waitForTimeout(3000); - await metamask.confirmSignature(); - await page.waitForTimeout(3000); - const popupPromise = page.waitForEvent("popup"); - - const switchChainBtn = page.locator("#switch-chain-button"); - await switchChainBtn.click(); - await metamask.approveSwitchNetwork(); - await page.waitForTimeout(3000); - - await page.reload(); - - const shareBtn = page.locator("#share-matching-credential-button"); - await shareBtn.click(); - - const idOSButton = page.frameLocator("#idos-enclave-iframe").locator("#unlock"); - await idOSButton.click(); - const idOSPopup = await popupPromise; - await page.waitForTimeout(2000); - await (await idOSPopup.waitForSelector("#auth-method-password")).click(); - const passwordInput = idOSPopup.locator("#idos-password-input"); - await passwordInput.fill("qwerty"); - await idOSPopup.getByRole("button", { name: "Unlock" }).click(); - - await page.waitForTimeout(3000); - await metamask.confirmSignature(); - await page.waitForTimeout(3000); - await metamask.confirmTransaction(); - await page.waitForTimeout(3000); - await (await page.waitForSelector("#transaction")).waitForElementState("visible"); - await expect(page.locator("#transaction-id")).toBeVisible(); -}); +// import { MetaMask, metaMaskFixtures, testWithSynpress } from "@synthetixio/synpress"; +// import basicSetup from "./wallet-setup/basic.setup"; + +// const test = testWithSynpress(metaMaskFixtures(basicSetup)); +// const { expect } = test; + +// test.beforeEach(async ({ context, page }) => { +// test.setTimeout(500000); + +// await context.clearCookies(); +// await page.evaluate(() => window.localStorage.clear()); +// }); + +// test("should create a grant successfully", async ({ context, page, metamaskPage, extensionId }) => { +// const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); +// await page.getByRole("button", { name: "Connect a wallet" }).click(); +// await page.getByRole("button", { name: "Metamask" }).click(); +// await metamask.switchAccount("Account 1"); +// await metamask.connectToDapp(["Account 1"]); +// await page.waitForTimeout(2000); +// await metamask.confirmSignature(); + +// const list = page.locator("#credentials-list"); + +// await page.goto(process.env.GRANTS_TEST_BASE_URL as string); +// await context.clearCookies(); +// await page.evaluate(() => window.localStorage.clear()); + +// await page.getByRole("checkbox", { name: "Credentials" }).click(); + +// await page.getByRole("button", { name: "EVM" }).click(); +// await metamask.approveSwitchNetwork(); +// await metamask.switchAccount("Account 1"); +// await metamask.connectToDapp(["Account 1"]); +// await page.waitForTimeout(2000); +// await metamask.confirmSignature(); +// await page.waitForTimeout(2000); + +// const credentialId = process.env.CREDENTIAL_ID as string; +// await page.getByText(credentialId).click(); + +// // We setup the popupPromise before clicking the button to open the popup. +// // See https://playwright.dev/docs/pages#handling-popups for more information about how to handle popups. +// const popupPromise = page.waitForEvent("popup"); +// const idOSButton = page.frameLocator("#idos-enclave-iframe").locator("#unlock"); +// await idOSButton.click(); +// // Then we await the popupPromise to get the popup page. +// const idOSPopup = await popupPromise; +// await page.waitForTimeout(2000); +// await (await idOSPopup.waitForSelector("#auth-method-password")).click(); +// const passwordInput = idOSPopup.locator("#idos-password-input"); +// await passwordInput.fill("qwerty"); +// await idOSPopup.getByRole("button", { name: "Unlock" }).click(); + +// // Timelock the grant for 1 minute. +// page.on("dialog", async (dialog) => { +// await dialog.accept("60"); +// }); + +// // Share the credential +// await page.locator(`#acquire-access-grant-${credentialId}`).click(); + +// await metamask.confirmSignature(); +// await page.waitForTimeout(2000); +// await metamask.confirmTransaction(); + +// await (await page.waitForSelector(`#restart-${credentialId}`)).waitForElementState("visible"); + +// // Navigate back and check for the grant creation +// await page.goto(process.env.BASE_URL as string); +// await metamask.confirmSignature(); +// const manageGrantsButton = page.locator(`#manage-grants-${credentialId}`); +// await manageGrantsButton.click(); + +// const revokeButton = page.getByRole("button", { name: "Revoke" }).last(); +// // As we created an AG with a timelock of 1 minute, the button should be disabled. +// await expect(revokeButton).toBeDisabled(); +// }); + +// test("should revoke a grant successfully", async ({ context, page, metamaskPage, extensionId }) => { +// await page.waitForTimeout(50000); +// const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); +// await page.getByRole("button", { name: "Connect a wallet" }).click(); +// await page.getByRole("button", { name: "Metamask" }).click(); + +// await metamask.switchAccount("Account 1"); +// await metamask.connectToDapp(["Account 1"]); +// await page.waitForTimeout(3000); +// await metamask.confirmSignature(); + +// const list = page.locator("#credentials-list"); +// const credentialId = process.env.CREDENTIAL_ID as string; +// const manageGrantsButton = page.locator(`#manage-grants-${credentialId}`); +// await manageGrantsButton.click(); +// await metamask.approveSwitchNetwork(); +// await page.reload(); +// await manageGrantsButton.click(); + +// const revokeButton = page.getByRole("button", { name: "Revoke" }).first(); +// await revokeButton.click(); + +// await page.waitForTimeout(3000); +// await metamask.confirmSignature(); +// await page.waitForTimeout(3000); +// await metamask.confirmTransaction(); +// await page.waitForSelector("#no-grants"); +// await expect(revokeButton).not.toBeVisible(); +// await expect(page.locator(`#grants-for-${credentialId}`)).not.toBeVisible(); +// }); + +// test("should share a matching credential successfully", async ({ +// context, +// page, +// metamaskPage, +// extensionId, +// }) => { +// await page.goto("/e2e/credential-filtering"); +// const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword, extensionId); +// await page.getByRole("button", { name: "Connect a wallet" }).click(); +// await page.getByRole("button", { name: "Metamask" }).click(); +// await metamask.switchAccount("Account 1"); +// await metamask.connectToDapp(["Account 1"]); +// await page.waitForTimeout(3000); +// await metamask.confirmSignature(); +// await page.waitForTimeout(3000); +// const popupPromise = page.waitForEvent("popup"); + +// const switchChainBtn = page.locator("#switch-chain-button"); +// await switchChainBtn.click(); +// await metamask.approveSwitchNetwork(); +// await page.waitForTimeout(3000); + +// await page.reload(); + +// const shareBtn = page.locator("#share-matching-credential-button"); +// await shareBtn.click(); + +// const idOSButton = page.frameLocator("#idos-enclave-iframe").locator("#unlock"); +// await idOSButton.click(); +// const idOSPopup = await popupPromise; +// await page.waitForTimeout(2000); +// await (await idOSPopup.waitForSelector("#auth-method-password")).click(); +// const passwordInput = idOSPopup.locator("#idos-password-input"); +// await passwordInput.fill("qwerty"); +// await idOSPopup.getByRole("button", { name: "Unlock" }).click(); + +// await page.waitForTimeout(3000); +// await metamask.confirmSignature(); +// await page.waitForTimeout(3000); +// await metamask.confirmTransaction(); +// await page.waitForTimeout(3000); +// await (await page.waitForSelector("#transaction")).waitForElementState("visible"); +// await expect(page.locator("#transaction-id")).toBeVisible(); +// }); diff --git a/examples/idos-example-dapp/src/main.js b/examples/idos-example-dapp/src/main.js index eeca74685..d0ddc5e3e 100644 --- a/examples/idos-example-dapp/src/main.js +++ b/examples/idos-example-dapp/src/main.js @@ -200,30 +200,7 @@ const connectWallet = { let credentials = await terminal .h1("eyes", "User's credentials") .wait("awaiting signature", cache.get("credentials") || idos.data.list("credentials")); - credentials = credentials - .filter((c) => c.original_id === null) - // @todo: remove once we have successfully migrated to Credentials 2.0. - .map((credential) => { - const { credential_level, credential_status, credential_type, issuer } = credential; - const _fields = credential.public_notes - ? typeof credential.public_notes === "string" - ? JSON.parse(credential.public_notes) - : credential.public_notes - : {}; - const { id, ...public_notes } = { - id: _fields.id ?? credential.id, - level: _fields.level ?? credential_level, - status: _fields.status ?? credential_status, - type: _fields.type ?? credential_type, - issuer: _fields.issuer ?? issuer, - }; - - return { - ...credential, - ...public_notes, - public_notes, - }; - }); + credentials = credentials.filter((c) => c.original_id === null); cache.set("credentials", credentials); diff --git a/examples/issuer-sdk-demo/src/app/page.tsx b/examples/issuer-sdk-demo/src/app/page.tsx index 48311b50c..fd23e4609 100644 --- a/examples/issuer-sdk-demo/src/app/page.tsx +++ b/examples/issuer-sdk-demo/src/app/page.tsx @@ -58,26 +58,7 @@ export default function Home() { // @ts-expect-error: types in the SDK are a bit messy. await _instance.setSigner("EVM", signer); const _credentials = await _instance.data.list("credentials"); - setCredentials( - _credentials.map((credential) => { - const { credential_level, credential_status, credential_type, issuer } = - // biome-ignore lint/suspicious/noExplicitAny: // @todo: remove once we have successfully migrated to Credentials 2.0. - credential as any; - const fields = credential.public_notes ? JSON.parse(credential.public_notes) : {}; - - const public_notes = { - id: fields.id ?? credential.id, - level: fields.level ?? credential_level, - status: fields.status ?? credential_status, - type: fields.type ?? credential_type, - issuer: fields.issuer ?? issuer, - }; - return { - ...credential, - public_notes: JSON.stringify(public_notes), - }; - }), - ); + setCredentials(_credentials); } setHasProfile(_hasProfile); diff --git a/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts b/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts index ce34de948..1133e7346 100644 --- a/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts +++ b/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts @@ -110,11 +110,14 @@ export class IframeEnclave implements EnclaveProvider { }) as Promise; } - async #loadEnclave() { - const hasIframe = document.getElementById(this.iframe.id); - if (hasIframe) { + async #loadEnclave(): Promise { + const container = document.querySelector(this.container); + const iframeElem = document.getElementById(this.iframe.id); + + if (iframeElem) { console.warn("An Iframe already exists in the container"); - return Promise.resolve(); + container?.removeChild(iframeElem); + return new Promise((resolve) => this.#loadEnclave().then(resolve)); } // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy#directives @@ -149,7 +152,6 @@ export class IframeEnclave implements EnclaveProvider { this.iframe.style.setProperty(k, v); } - const container = document.querySelector(this.container); if (!container) throw new Error(`Can't find container with selector ${this.container}`); container.appendChild(this.iframe); diff --git a/packages/idos-sdk-server-dapp/package.json b/packages/idos-sdk-server-dapp/package.json index caa0a1a46..2da771c60 100644 --- a/packages/idos-sdk-server-dapp/package.json +++ b/packages/idos-sdk-server-dapp/package.json @@ -15,8 +15,8 @@ } }, "scripts": { - "dev": "dotenvx run --convention=nextjs -- tsup --watch", - "build": "export NODE_ENV=production && dotenvx run --convention=nextjs -- tsup", + "dev": "dotenvx run --convention=nextjs -- tsup --watch --config tsup.config.ts", + "build": "export NODE_ENV=production && dotenvx run --convention=nextjs -- tsup --config tsup.config.ts", "lint": "biome check --apply ./src", "format": "biome format --write .", "test": "vitest run", @@ -33,6 +33,7 @@ }, "devDependencies": { "@dotenvx/dotenvx": "^1.6.4", + "@idos-network/kwil-nep413-signer": "workspace:*", "@near-js/types": "^0.2.1", "@near-wallet-selector/core": "^8.7.5", "@release-it/keep-a-changelog": "^5.0.0", @@ -47,7 +48,6 @@ "@digitalbazaar/ed25519-signature-2020": "^5.2.0", "@digitalbazaar/ed25519-verification-key-2020": "^4.1.0", "@digitalbazaar/vc": "^6.0.2", - "@idos-network/kwil-nep413-signer": "workspace:*", "@kwilteam/kwil-js": "0.7.1", "@stablelib/base64": "^1.0.1", "@stablelib/binary": "^1.0.1", diff --git a/packages/idos-sdk-server-dapp/tsup.config.ts b/packages/idos-sdk-server-dapp/tsup.config.ts index 0bdda1f5a..af16c323c 100644 --- a/packages/idos-sdk-server-dapp/tsup.config.ts +++ b/packages/idos-sdk-server-dapp/tsup.config.ts @@ -10,4 +10,6 @@ export default defineConfig({ env: config().parsed, format: ["esm"], outDir: "./dist", + bundle: true, + noExternal: ["@idos-network/kwil-nep413-signer", "@idos-network/idos-sdk-types"], }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 401b60227..0791c9989 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -639,9 +639,6 @@ importers: '@digitalbazaar/vc': specifier: ^6.0.2 version: 6.0.2(web-streams-polyfill@3.2.1) - '@idos-network/kwil-nep413-signer': - specifier: workspace:* - version: link:../kwil-nep413-signer '@kwilteam/kwil-js': specifier: 0.7.1 version: 0.7.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -682,6 +679,9 @@ importers: '@dotenvx/dotenvx': specifier: ^1.6.4 version: 1.6.4 + '@idos-network/kwil-nep413-signer': + specifier: workspace:* + version: link:../kwil-nep413-signer '@near-js/types': specifier: ^0.2.1 version: 0.2.1