diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 546912714a..c0e5b43b37 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,7 +11,6 @@ /packages/internal/cryptofiat @immutable/commerce /packages/internal/dex @immutable/tokens /packages/internal/bridge @immutable/rollups -/packages/internal/guardian @immutable/passport /packages/orderbook @immutable/traders /packages/passport @immutable/passport /packages/x-provider @immutable/commerce @@ -22,3 +21,4 @@ /packages/webhook @shineli1984 /packages/game-bridge @immutable/sdk /examples @immutable/sdk +**/package.json @immutable/sdk \ No newline at end of file diff --git a/.github/actions/setup-examples/action.yaml b/.github/actions/setup-examples/action.yaml deleted file mode 100644 index d4e02c3c1f..0000000000 --- a/.github/actions/setup-examples/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ - -name: "Examples setup" -description: "Do necessary setup for examples" - -runs: - using: "composite" - steps: - - name: Prepare examples - shell: bash - run: yarn prepare:examples diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml new file mode 100644 index 0000000000..9d29b9e854 --- /dev/null +++ b/.github/workflows/dependency-review.yaml @@ -0,0 +1,26 @@ +name: 'Dependency Review' +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v4 + - name: Dependency Review + uses: actions/dependency-review-action@v4 + with: + # Possible values: "critical", "high", "moderate", "low" + fail-on-severity: critical + + # Address https://github.com/actions/dependency-review-action/issues/456 + base-ref: ${{ github.event.pull_request.base.sha || github.event.repository.default_branch }} + head-ref: ${{ github.event.pull_request.head.sha || github.ref }} diff --git a/.github/workflows/passport-sdk-sample-app-deployment.yaml b/.github/workflows/passport-sdk-sample-app-deployment.yaml index afdf516d42..3610d77eb0 100644 --- a/.github/workflows/passport-sdk-sample-app-deployment.yaml +++ b/.github/workflows/passport-sdk-sample-app-deployment.yaml @@ -33,8 +33,8 @@ jobs: - name: setup uses: ./.github/actions/setup - - name: Export Passport sample app - run: yarn nx run @imtbl/passport-sdk-sample-app:export --skip-nx-cache + - name: Build Static Passport sample app + run: yarn nx run @imtbl/passport-sdk-sample-app:build --skip-nx-cache - name: Update SDK version run: yarn workspace @imtbl/passport-sdk-sample-app update-sdk-version diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e7764b5428..f2076f2832 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -124,9 +124,8 @@ jobs: - name: Lint run: yarn lint - build-examples: - name: Build Examples - needs: build-sdk + build-lint-test-examples: + name: Build, Lint & Test Examples runs-on: ubuntu-latest-8-cores env: NODE_OPTIONS: --max-old-space-size=14366 @@ -137,47 +136,15 @@ jobs: - name: setup uses: ./.github/actions/setup - - name: Setup examples - uses: ./.github/actions/setup-examples + - name: Prepare examples + run: yarn prepare:examples - name: Build examples run: yarn build:examples - lint-examples: - name: Lint Examples - needs: build-sdk - runs-on: ubuntu-latest-4-cores - env: - NODE_OPTIONS: --max-old-space-size=14366 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: setup - uses: ./.github/actions/setup - - - name: Setup examples - uses: ./.github/actions/setup-examples - - name: Lint examples run: yarn lint:examples - test-examples: - name: Test Examples - needs: build-sdk - runs-on: ubuntu-latest-8-cores - env: - NODE_OPTIONS: --max-old-space-size=14366 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: setup - uses: ./.github/actions/setup - - - name: Setup examples - uses: ./.github/actions/setup-examples - - name: Setup playwright uses: ./.github/actions/setup-playwright diff --git a/examples/_deprecated/checkout-widget/basic-react/package.json b/examples/_deprecated/checkout-widget/basic-react/package.json index 51b5b55308..33ab9e2085 100644 --- a/examples/_deprecated/checkout-widget/basic-react/package.json +++ b/examples/_deprecated/checkout-widget/basic-react/package.json @@ -26,7 +26,7 @@ "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.7", "typescript": "^5.2.2", - "vite": "^5.2.12", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" } } diff --git a/examples/_deprecated/checkout-widget/passport-integration-react/package.json b/examples/_deprecated/checkout-widget/passport-integration-react/package.json index 524276adbb..1f2d5455bd 100644 --- a/examples/_deprecated/checkout-widget/passport-integration-react/package.json +++ b/examples/_deprecated/checkout-widget/passport-integration-react/package.json @@ -24,7 +24,7 @@ "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.7", - "vite": "^5.2.11", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" } } diff --git a/examples/_deprecated/free-mint-with-minting-backend/frontend/package.json b/examples/_deprecated/free-mint-with-minting-backend/frontend/package.json index 8390dc6be9..38aa81bec4 100644 --- a/examples/_deprecated/free-mint-with-minting-backend/frontend/package.json +++ b/examples/_deprecated/free-mint-with-minting-backend/frontend/package.json @@ -37,7 +37,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.7", "typescript": "^5.2.2", - "vite": "^5.1.6", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.21.0", "vite-plugin-svgr": "^4.2.0" } diff --git a/examples/_deprecated/vite-connect-kit/package.json b/examples/_deprecated/vite-connect-kit/package.json index 8ec5ff253a..20aa93cde2 100644 --- a/examples/_deprecated/vite-connect-kit/package.json +++ b/examples/_deprecated/vite-connect-kit/package.json @@ -17,7 +17,7 @@ "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.5.4", - "vite": "^5.3.5", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" }, "private": true, diff --git a/examples/_deprecated/vite-rainbow-kit/package.json b/examples/_deprecated/vite-rainbow-kit/package.json index 51d25c0447..14a7a78c48 100644 --- a/examples/_deprecated/vite-rainbow-kit/package.json +++ b/examples/_deprecated/vite-rainbow-kit/package.json @@ -17,7 +17,7 @@ "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.5.4", - "vite": "^5.3.5", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" }, "private": true, diff --git a/examples/_deprecated/vite-wagmi/package.json b/examples/_deprecated/vite-wagmi/package.json index 05332e497e..3953dddd20 100644 --- a/examples/_deprecated/vite-wagmi/package.json +++ b/examples/_deprecated/vite-wagmi/package.json @@ -16,7 +16,7 @@ "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.5.4", - "vite": "^5.3.5", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" }, "private": true, diff --git a/examples/_deprecated/vite-web3-modal/package.json b/examples/_deprecated/vite-web3-modal/package.json index c57b6972ab..e6542fc8b6 100644 --- a/examples/_deprecated/vite-web3-modal/package.json +++ b/examples/_deprecated/vite-web3-modal/package.json @@ -17,7 +17,7 @@ "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.5.4", - "vite": "^5.3.5", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.22.0" }, "private": true, diff --git a/examples/checkout/sdk-connect-with-nextjs/package.json b/examples/checkout/sdk-connect-with-nextjs/package.json index eb1a8e5850..b3fd6e7f50 100644 --- a/examples/checkout/sdk-connect-with-nextjs/package.json +++ b/examples/checkout/sdk-connect-with-nextjs/package.json @@ -24,6 +24,6 @@ "@types/react-dom": "^18.3.0", "eslint": "^8", "eslint-config-next": "14.2.7", - "typescript": "^5" + "typescript": "^5.6.2" } } diff --git a/examples/checkout/sdk-connect-with-nextjs/playwright.config.ts b/examples/checkout/sdk-connect-with-nextjs/playwright.config.ts index 99e5fa222c..80dccdcfc7 100644 --- a/examples/checkout/sdk-connect-with-nextjs/playwright.config.ts +++ b/examples/checkout/sdk-connect-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/checkout/sdk-switch-network-with-nextjs/package.json b/examples/checkout/sdk-switch-network-with-nextjs/package.json index 74d467dfad..f1c7398a17 100644 --- a/examples/checkout/sdk-switch-network-with-nextjs/package.json +++ b/examples/checkout/sdk-switch-network-with-nextjs/package.json @@ -24,6 +24,6 @@ "@types/react-dom": "^18.3.0", "eslint": "^8", "eslint-config-next": "14.2.7", - "typescript": "^5" + "typescript": "^5.6.2" } } diff --git a/examples/checkout/sdk-switch-network-with-nextjs/playwright.config.ts b/examples/checkout/sdk-switch-network-with-nextjs/playwright.config.ts index 99e5fa222c..80dccdcfc7 100644 --- a/examples/checkout/sdk-switch-network-with-nextjs/playwright.config.ts +++ b/examples/checkout/sdk-switch-network-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/orderbook/create-listing-with-nextjs/package.json b/examples/orderbook/create-listing-with-nextjs/package.json index e0afa729da..3c875940b5 100644 --- a/examples/orderbook/create-listing-with-nextjs/package.json +++ b/examples/orderbook/create-listing-with-nextjs/package.json @@ -24,6 +24,6 @@ "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.7", - "typescript": "^5" + "typescript": "^5.6.2" } } diff --git a/examples/orderbook/create-listing-with-nextjs/playwright.config.ts b/examples/orderbook/create-listing-with-nextjs/playwright.config.ts index 0ded5b529b..049bdd416c 100644 --- a/examples/orderbook/create-listing-with-nextjs/playwright.config.ts +++ b/examples/orderbook/create-listing-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/orderbook/fulfill-listing-with-nextjs/package.json b/examples/orderbook/fulfill-listing-with-nextjs/package.json index bc8e83e4d4..9df2a7887e 100644 --- a/examples/orderbook/fulfill-listing-with-nextjs/package.json +++ b/examples/orderbook/fulfill-listing-with-nextjs/package.json @@ -24,6 +24,6 @@ "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.7", - "typescript": "^5" + "typescript": "^5.6.2" } } diff --git a/examples/orderbook/fulfill-listing-with-nextjs/playwright.config.ts b/examples/orderbook/fulfill-listing-with-nextjs/playwright.config.ts index 0ded5b529b..049bdd416c 100644 --- a/examples/orderbook/fulfill-listing-with-nextjs/playwright.config.ts +++ b/examples/orderbook/fulfill-listing-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/passport/identity-with-nextjs/package.json b/examples/passport/identity-with-nextjs/package.json index 3def6249e6..e72359d4c5 100644 --- a/examples/passport/identity-with-nextjs/package.json +++ b/examples/passport/identity-with-nextjs/package.json @@ -17,7 +17,7 @@ "eslint-config-next": "14.2.5", "postcss": "^8.4.39", "tailwindcss": "^3.4.6", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/examples/passport/identity-with-nextjs/playwright.config.ts b/examples/passport/identity-with-nextjs/playwright.config.ts index 99e5fa222c..80dccdcfc7 100644 --- a/examples/passport/identity-with-nextjs/playwright.config.ts +++ b/examples/passport/identity-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/passport/wallets-connect-with-nextjs/package.json b/examples/passport/wallets-connect-with-nextjs/package.json index 0ae494671b..903b946c50 100644 --- a/examples/passport/wallets-connect-with-nextjs/package.json +++ b/examples/passport/wallets-connect-with-nextjs/package.json @@ -6,7 +6,7 @@ "@imtbl/sdk": "latest", "@tanstack/react-query": "^5.51.11", "ethers": "^5.7.2", - "next": "14.2.5", + "next": "14.2.10", "react": "^18.2.0", "react-dom": "^18.2.0", "wagmi": "^2.11.3" @@ -20,7 +20,7 @@ "eslint-config-next": "14.2.5", "postcss": "^8", "tailwindcss": "^3.4.1", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/examples/passport/wallets-connect-with-nextjs/playwright.config.ts b/examples/passport/wallets-connect-with-nextjs/playwright.config.ts index 99e5fa222c..80dccdcfc7 100644 --- a/examples/passport/wallets-connect-with-nextjs/playwright.config.ts +++ b/examples/passport/wallets-connect-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/passport/wallets-signing-with-nextjs/package.json b/examples/passport/wallets-signing-with-nextjs/package.json index c6392416a3..46c38b5cab 100644 --- a/examples/passport/wallets-signing-with-nextjs/package.json +++ b/examples/passport/wallets-signing-with-nextjs/package.json @@ -20,7 +20,7 @@ "eslint-config-next": "14.2.5", "postcss": "^8", "tailwindcss": "^3.4.1", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/examples/passport/wallets-signing-with-nextjs/playwright.config.ts b/examples/passport/wallets-signing-with-nextjs/playwright.config.ts index 99e5fa222c..80dccdcfc7 100644 --- a/examples/passport/wallets-signing-with-nextjs/playwright.config.ts +++ b/examples/passport/wallets-signing-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/examples/passport/wallets-transactions-with-nextjs/package.json b/examples/passport/wallets-transactions-with-nextjs/package.json index a8e80d80d4..0b41edbe1a 100644 --- a/examples/passport/wallets-transactions-with-nextjs/package.json +++ b/examples/passport/wallets-transactions-with-nextjs/package.json @@ -2,7 +2,7 @@ "name": "@examples/wallets-transactions-with-nextjs", "version": "0.1.0", "dependencies": { - "next": "14.2.5", + "next": "14.2.10", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -17,7 +17,7 @@ "eslint-config-next": "14.2.5", "postcss": "^8.4.39", "tailwindcss": "^3.4.6", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/examples/passport/wallets-transactions-with-nextjs/playwright.config.ts b/examples/passport/wallets-transactions-with-nextjs/playwright.config.ts index 055a1bb32e..cc502d11b6 100644 --- a/examples/passport/wallets-transactions-with-nextjs/playwright.config.ts +++ b/examples/passport/wallets-transactions-with-nextjs/playwright.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, + workers: "80%", reporter: "html", use: { @@ -23,7 +23,7 @@ export default defineConfig({ ], webServer: { - command: "yarn dev", + command: "yarn start", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, diff --git a/package.json b/package.json index f00a8770eb..bd0e9550bf 100644 --- a/package.json +++ b/package.json @@ -84,10 +84,7 @@ "packages/internal/dex/sdk", "packages/internal/dex/sdk-sample-app", "packages/internal/bridge/sdk", - "packages/internal/factory/sdk", - "packages/internal/factory/factory-sample-app", "packages/internal/generated-clients", - "packages/internal/guardian", "packages/internal/bridge/bridge-sample-app", "packages/checkout/sdk", "packages/checkout/sdk-sample-app", diff --git a/packages/blockchain-data/sdk/package.json b/packages/blockchain-data/sdk/package.json index 68f36afc65..7f94aca11d 100644 --- a/packages/blockchain-data/sdk/package.json +++ b/packages/blockchain-data/sdk/package.json @@ -25,7 +25,7 @@ "rollup": "^4.19.1", "ts-mockito": "^2.6.1", "typechain": "^8.1.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "exports": { diff --git a/packages/checkout/sdk-sample-app/package.json b/packages/checkout/sdk-sample-app/package.json index 76d89989b7..a0525b6328 100644 --- a/packages/checkout/sdk-sample-app/package.json +++ b/packages/checkout/sdk-sample-app/package.json @@ -45,7 +45,7 @@ "react-app-rewired": "^2.2.1", "react-scripts": "5.0.1", "stream-browserify": "^3.0.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "web-vitals": "^2.1.4" }, "private": true, diff --git a/packages/checkout/sdk/package.json b/packages/checkout/sdk/package.json index b3d7bfe772..59b5615083 100644 --- a/packages/checkout/sdk/package.json +++ b/packages/checkout/sdk/package.json @@ -42,7 +42,7 @@ "text-encoding": "^0.7.0", "typedoc": "^0.26.5", "typedoc-plugin-markdown": "^4.2.3", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "exports": { diff --git a/packages/checkout/sdk/src/smartCheckout/routing/routingOptions.ts b/packages/checkout/sdk/src/smartCheckout/routing/routingOptions.ts index e97bdfec4d..8fa01ce6a1 100644 --- a/packages/checkout/sdk/src/smartCheckout/routing/routingOptions.ts +++ b/packages/checkout/sdk/src/smartCheckout/routing/routingOptions.ts @@ -3,7 +3,7 @@ import { CheckoutConfiguration } from '../../config'; import { isOnRampAvailable, isSwapAvailable } from './geoBlocking'; import { AvailableRoutingOptions } from '../../types'; -const isPassportProvider = (provider: Web3Provider) => (provider.provider as any)?.isPassport === true ?? false; +const isPassportProvider = (provider: Web3Provider) => (provider.provider as any)?.isPassport === true; type GeoBlockingCheck = { id: 'onRamp' | 'swap'; diff --git a/packages/checkout/sdk/src/widgets/definitions/parameters/checkout.ts b/packages/checkout/sdk/src/widgets/definitions/parameters/checkout.ts index a7bae39c0e..aada60035e 100644 --- a/packages/checkout/sdk/src/widgets/definitions/parameters/checkout.ts +++ b/packages/checkout/sdk/src/widgets/definitions/parameters/checkout.ts @@ -42,7 +42,7 @@ export type CheckouWidgetSaleFlowParams = { flow: CheckoutFlowType.SALE; } & SaleWidgetParams; -export type CheckouWidgetAddFundsFlowParams = { +export type CheckoutWidgetAddFundsFlowParams = { flow: CheckoutFlowType.ADD_FUNDS; } & AddFundsWidgetParams; @@ -53,7 +53,7 @@ export type CheckoutWidgetFlowParams = | CheckouWidgetBridgeFlowParams | CheckouWidgetOnRampFlowParams | CheckouWidgetSaleFlowParams - | CheckouWidgetAddFundsFlowParams; + | CheckoutWidgetAddFundsFlowParams; export type CheckoutWidgetParams = { /** The language to use for the checkout widget */ diff --git a/packages/checkout/widgets-lib/package.json b/packages/checkout/widgets-lib/package.json index db955e98ef..90f378a61e 100644 --- a/packages/checkout/widgets-lib/package.json +++ b/packages/checkout/widgets-lib/package.json @@ -72,7 +72,7 @@ "rollup-plugin-svg": "^2.0.0", "rollup-plugin-visualizer": "^5.12.0", "ts-jest": "^29.1.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1", "web-vitals": "^2.1.4" }, diff --git a/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidget.tsx b/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidget.tsx index 3b6ba89b1a..a020928b99 100644 --- a/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidget.tsx +++ b/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidget.tsx @@ -31,6 +31,7 @@ import AddFundsWidget from '../add-funds/AddFundsWidget'; import { getViewShouldConnect } from './functions/getViewShouldConnect'; import { useWidgetEvents } from './hooks/useWidgetEvents'; import { getConnectLoaderParams } from './functions/getConnectLoaderParams'; +import { checkoutFlows } from './functions/isValidCheckoutFlow'; export type CheckoutWidgetInputs = { checkout: Checkout; @@ -82,13 +83,39 @@ export default function CheckoutWidget(props: CheckoutWidgetInputs) { }); }, [flowParams]); - const showBackButton = !!view.data?.showBackButton; + /** + * If invalid flow set error view + */ + useEffect(() => { + if (checkoutFlows.includes(flowParams.flow)) return; + + viewDispatch({ + payload: { + type: ViewActions.UPDATE_VIEW, + view: { + type: SharedViews.ERROR_VIEW, + error: { + name: 'InvalidViewType', + message: `Invalid view type "${flowParams}"`, + }, + }, + }, + }); + }, [flowParams.flow]); + /** + * Validate if the view requires connect loader + */ const shouldConnectView = useMemo( () => getViewShouldConnect(view.type), [view.type], ); + /* + * Show back button + */ + const showBackButton = !!view.data?.showBackButton; + return ( @@ -96,7 +123,7 @@ export default function CheckoutWidget(props: CheckoutWidgetInputs) { {view.type === SharedViews.LOADING_VIEW && ( )} - {view.type === SharedViews.SERVICE_UNAVAILABLE_ERROR_VIEW && ( + {view.type === SharedViews.ERROR_VIEW && ( { sendCheckoutEvent(eventTarget, { diff --git a/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidgetRoot.tsx b/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidgetRoot.tsx index 1ba1ada713..d9f7cb34eb 100644 --- a/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidgetRoot.tsx +++ b/packages/checkout/widgets-lib/src/widgets/checkout/CheckoutWidgetRoot.tsx @@ -5,6 +5,14 @@ import { WidgetProperties, WidgetTheme, WidgetType, + CheckoutWidgetConnectFlowParams, + CheckoutWidgetWalletFlowParams, + CheckoutWidgetAddFundsFlowParams, + CheckouWidgetSwapFlowParams, + CheckouWidgetBridgeFlowParams, + CheckouWidgetOnRampFlowParams, + CheckouWidgetSaleFlowParams, + CheckoutFlowType, } from '@imtbl/checkout-sdk'; import React, { Suspense } from 'react'; import { ThemeProvider } from '../../components/ThemeProvider/ThemeProvider'; @@ -13,6 +21,13 @@ import { HandoverProvider } from '../../context/handover-context/HandoverProvide import { LoadingView } from '../../views/loading/LoadingView'; import { Base } from '../BaseWidgetRoot'; import i18n from '../../i18n'; +import { + isValidAddress, + isValidAmount, + isValidWalletProvider, +} from '../../lib/validations/widgetValidators'; +import { deduplicateSaleItemsArray } from './functions/deduplicateSaleItemsArray'; +import { checkoutFlows } from './functions/isValidCheckoutFlow'; const CheckoutWidget = React.lazy(() => import('./CheckoutWidget')); @@ -37,11 +52,193 @@ export class CheckoutWidgetRoot extends Base { }; } + protected getValidConnectFlowParams(params: CheckoutWidgetConnectFlowParams) { + const validatedParams = { ...params }; + + if (!Array.isArray(validatedParams.blocklistWalletRdns)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "blocklistWalletRdns" widget input'); + validatedParams.blocklistWalletRdns = []; + } + + return validatedParams; + } + + protected getValidWalletFlowParams(params: CheckoutWidgetWalletFlowParams) { + return params; + } + + protected getValidSaleFlowParams(params: CheckouWidgetSaleFlowParams) { + const validatedParams = { ...params }; + + if (!isValidWalletProvider(params.walletProviderName)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "walletProviderName" widget input'); + validatedParams.walletProviderName = undefined; + } + + if (!Array.isArray(validatedParams.items)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "items" widget input.'); + validatedParams.items = []; + } + + if (!params.environmentId) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "environmentId" widget input'); + validatedParams.environmentId = ''; + } + + if (!params.collectionName) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "collectionName" widget input'); + validatedParams.collectionName = ''; + } + + if ( + params.excludePaymentTypes !== undefined + && !Array.isArray(params.excludePaymentTypes) + ) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "excludePaymentTypes" widget input'); + validatedParams.excludePaymentTypes = []; + } + + return { + ...validatedParams, + items: deduplicateSaleItemsArray(params.items), + }; + } + + protected getValidAddFundsFlowParams( + params: CheckoutWidgetAddFundsFlowParams, + ) { + const validatedParams = { ...params }; + + if (validatedParams.showBridgeOption) { + validatedParams.showBridgeOption = true; + } + + if (validatedParams.showOnrampOption) { + validatedParams.showOnrampOption = true; + } + + if (validatedParams.showSwapOption) { + validatedParams.showSwapOption = true; + } + + if (!isValidAmount(validatedParams.toAmount)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "toAmount" widget input'); + validatedParams.toAmount = ''; + } + + if (!isValidAddress(params.toTokenAddress)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "toTokenAddress" widget input'); + validatedParams.toTokenAddress = ''; + } + + return validatedParams; + } + + protected getValidSwapFlowParams(params: CheckouWidgetSwapFlowParams) { + const validatedParams = { ...params }; + + if (!isValidAmount(params.amount)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "amount" widget input'); + validatedParams.amount = ''; + } + + if (!isValidAddress(params.fromTokenAddress)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "fromTokenAddress" widget input'); + validatedParams.fromTokenAddress = ''; + } + + if (!isValidAddress(params.toTokenAddress)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "toTokenAddress" widget input'); + validatedParams.toTokenAddress = ''; + } + + if (params.autoProceed) { + validatedParams.autoProceed = true; + } + + return validatedParams; + } + + protected getValidBridgeFlowParams(params: CheckouWidgetBridgeFlowParams) { + const validatedParams = { ...params }; + + if (!isValidAmount(params.amount)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "amount" widget input'); + validatedParams.amount = ''; + } + + if (!isValidAddress(params.tokenAddress)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "tokenAddress" widget input'); + validatedParams.tokenAddress = ''; + } + + return validatedParams; + } + + protected getValidOnRampFlowParams(params: CheckouWidgetOnRampFlowParams) { + const validatedParams = { ...params }; + + if (!isValidAmount(params.amount)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "amount" widget input'); + validatedParams.amount = ''; + } + + if (!isValidAddress(params.tokenAddress)) { + // eslint-disable-next-line no-console + console.warn('[IMTBL]: invalid "tokenAddress" widget input'); + validatedParams.tokenAddress = ''; + } + + return validatedParams; + } + protected getValidatedParameters( params: CheckoutWidgetParams, ): CheckoutWidgetParams { - // TODO: Validate params for each widget - return params; + // if empty do nothing + if (Object.keys(params).length === 0) { + return params; + } + + const flowType = params.flow; + const supportedFlows = checkoutFlows.join(', '); + + switch (flowType) { + case CheckoutFlowType.CONNECT: + return this.getValidConnectFlowParams(params); + case CheckoutFlowType.WALLET: + return this.getValidWalletFlowParams(params); + case CheckoutFlowType.SALE: + return this.getValidSaleFlowParams(params); + case CheckoutFlowType.SWAP: + return this.getValidSwapFlowParams(params); + case CheckoutFlowType.BRIDGE: + return this.getValidBridgeFlowParams(params); + case CheckoutFlowType.ONRAMP: + return this.getValidOnRampFlowParams(params); + case CheckoutFlowType.ADD_FUNDS: + return this.getValidAddFundsFlowParams(params); + default: + // eslint-disable-next-line no-console + console.warn( + `[IMTBL]: invalid "flow: ${flowType}" widget input, must be one of the following: ${supportedFlows}`, + ); + return params; + } } protected render() { diff --git a/packages/checkout/widgets-lib/src/widgets/checkout/functions/deduplicateSaleItemsArray.ts b/packages/checkout/widgets-lib/src/widgets/checkout/functions/deduplicateSaleItemsArray.ts new file mode 100644 index 0000000000..886e43ab48 --- /dev/null +++ b/packages/checkout/widgets-lib/src/widgets/checkout/functions/deduplicateSaleItemsArray.ts @@ -0,0 +1,20 @@ +import { SaleItem } from '@imtbl/checkout-sdk'; + +export function deduplicateSaleItemsArray(items: SaleItem[] | undefined): SaleItem[] { + if (!items || !Array.isArray(items)) return []; + + const uniqueItems = items.reduce((acc, item) => { + const itemIndex = acc.findIndex( + ({ productId }) => productId === item.productId, + ); + + if (itemIndex !== -1) { + acc[itemIndex] = { ...item, qty: acc[itemIndex].qty + item.qty }; + return acc; + } + + return [...acc, { ...item }]; + }, [] as SaleItem[]); + + return uniqueItems; +} diff --git a/packages/checkout/widgets-lib/src/widgets/checkout/functions/isValidCheckoutFlow.ts b/packages/checkout/widgets-lib/src/widgets/checkout/functions/isValidCheckoutFlow.ts new file mode 100644 index 0000000000..cf785fcd46 --- /dev/null +++ b/packages/checkout/widgets-lib/src/widgets/checkout/functions/isValidCheckoutFlow.ts @@ -0,0 +1,19 @@ +import { CheckoutFlowType } from '@imtbl/checkout-sdk'; + +/** Orchestration Events List */ +export const checkoutFlows = [ + CheckoutFlowType.CONNECT, + CheckoutFlowType.WALLET, + CheckoutFlowType.SALE, + CheckoutFlowType.SWAP, + CheckoutFlowType.BRIDGE, + CheckoutFlowType.ONRAMP, + CheckoutFlowType.ADD_FUNDS, +]; + +/** + * Check if event is orchestration event + */ +export function isValidCheckoutFlow(flow: string): boolean { + return checkoutFlows.includes(flow as CheckoutFlowType); +} diff --git a/packages/checkout/widgets-lib/src/widgets/checkout/hooks/useWidgetEvents.ts b/packages/checkout/widgets-lib/src/widgets/checkout/hooks/useWidgetEvents.ts index 7669f33475..5f66e62e1d 100644 --- a/packages/checkout/widgets-lib/src/widgets/checkout/hooks/useWidgetEvents.ts +++ b/packages/checkout/widgets-lib/src/widgets/checkout/hooks/useWidgetEvents.ts @@ -21,6 +21,7 @@ const widgetEvents = [ IMTBLWidgetEvents.IMTBL_BRIDGE_WIDGET_EVENT, IMTBLWidgetEvents.IMTBL_ONRAMP_WIDGET_EVENT, IMTBLWidgetEvents.IMTBL_SALE_WIDGET_EVENT, + IMTBLWidgetEvents.IMTBL_ADD_FUNDS_WIDGET_EVENT, ]; /** diff --git a/packages/checkout/widgets-sample-app/package.json b/packages/checkout/widgets-sample-app/package.json index 7cd2911ee3..c8db3749de 100644 --- a/packages/checkout/widgets-sample-app/package.json +++ b/packages/checkout/widgets-sample-app/package.json @@ -37,9 +37,9 @@ "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.2.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1", - "vite": "^5.0.12", + "vite": "^5.2.14", "vite-plugin-node-polyfills": "^0.16.0", "web-vitals": "^2.1.4" }, diff --git a/packages/checkout/widgets-sample-app/src/components/ui/checkout/checkout.tsx b/packages/checkout/widgets-sample-app/src/components/ui/checkout/checkout.tsx index ea5058db35..4a7df9d57a 100644 --- a/packages/checkout/widgets-sample-app/src/components/ui/checkout/checkout.tsx +++ b/packages/checkout/widgets-sample-app/src/components/ui/checkout/checkout.tsx @@ -340,7 +340,7 @@ function CheckoutUI() { // mount & re-render widget everytime params change useEffect(() => { - if (params == undefined) return; + if (params?.flow === undefined) return; if (renderAfterConnect && !web3Provider) return; mount(); @@ -659,6 +659,11 @@ function CheckoutUI() { {flow} ))} + + + {"INVALID FLOW TYPE"} + + )} diff --git a/packages/config/package.json b/packages/config/package.json index 5439016094..9a8fbbb8ed 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -21,7 +21,7 @@ "prettier": "^2.8.7", "rollup": "^4.19.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/bridge/bridge-sample-app/package.json b/packages/internal/bridge/bridge-sample-app/package.json index 506c5ffe09..8da52a811b 100644 --- a/packages/internal/bridge/bridge-sample-app/package.json +++ b/packages/internal/bridge/bridge-sample-app/package.json @@ -13,7 +13,7 @@ "eslint": "^8.40.0", "eslint-config-next": "13.3.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/packages/internal/bridge/sdk/package.json b/packages/internal/bridge/sdk/package.json index 25539d0d82..2da635ef97 100644 --- a/packages/internal/bridge/sdk/package.json +++ b/packages/internal/bridge/sdk/package.json @@ -27,7 +27,7 @@ "rollup": "^4.19.1", "ts-node": "^10.9.1", "typechain": "^8.1.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/cryptofiat/package.json b/packages/internal/cryptofiat/package.json index 0d33b03e11..7beb1d5aef 100644 --- a/packages/internal/cryptofiat/package.json +++ b/packages/internal/cryptofiat/package.json @@ -25,7 +25,7 @@ "prettier": "^2.8.7", "rollup": "^4.19.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/dex/sdk-sample-app/package.json b/packages/internal/dex/sdk-sample-app/package.json index 789d73d187..69f25d77f8 100644 --- a/packages/internal/dex/sdk-sample-app/package.json +++ b/packages/internal/dex/sdk-sample-app/package.json @@ -10,12 +10,12 @@ "concurrently": "^8.2.2", "eslint": "^8.40.0", "ethers": "^5.7.2", - "next": "13.4.11", + "next": "14.2.10", "postcss": "8.4.31", "react": "^18.2.0", "react-dom": "^18.2.0", "tailwindcss": "3.3.2", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { diff --git a/packages/internal/dex/sdk/package.json b/packages/internal/dex/sdk/package.json index dd7960c557..387e0516fb 100644 --- a/packages/internal/dex/sdk/package.json +++ b/packages/internal/dex/sdk/package.json @@ -25,7 +25,7 @@ "rollup": "^4.19.1", "ts-node": "^10.9.1", "typechain": "^8.1.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/factory/factory-sample-app/.eslintrc b/packages/internal/factory/factory-sample-app/.eslintrc deleted file mode 100644 index aec83a6893..0000000000 --- a/packages/internal/factory/factory-sample-app/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ignorePatterns": [ - "jest.config.*" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json", - "tsconfigRootDir": ".", - "sourceType": "module" - } -} \ No newline at end of file diff --git a/packages/internal/factory/factory-sample-app/.example.env b/packages/internal/factory/factory-sample-app/.example.env deleted file mode 100644 index 10e0c8f20d..0000000000 --- a/packages/internal/factory/factory-sample-app/.example.env +++ /dev/null @@ -1,2 +0,0 @@ -export PROVIDER= -export PRIVATE_KEY= \ No newline at end of file diff --git a/packages/internal/factory/factory-sample-app/package.json b/packages/internal/factory/factory-sample-app/package.json deleted file mode 100644 index dfce66023d..0000000000 --- a/packages/internal/factory/factory-sample-app/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "factory-sample-app", - "version": "0.1.0", - "dependencies": { - "@imtbl/config": "0.0.0", - "@imtbl/factory-sdk": "0.0.0", - "ethers": "^5.7.2" - }, - "devDependencies": { - "@types/node": "^18.14.2", - "autoprefixer": "10.4.14", - "eslint": "^8.40.0", - "eslint-config-next": "13.3.1", - "ts-node": "^10.9.1", - "typescript": "^5.5.4" - }, - "private": true, - "scripts": { - "build": "", - "factory": "ts-node --esm ./src/index.ts", - "lint": "eslint ./src --ext .ts --max-warnings=0" - }, - "type": "module" -} diff --git a/packages/internal/factory/factory-sample-app/rollup.config.ts b/packages/internal/factory/factory-sample-app/rollup.config.ts deleted file mode 100644 index 94ea196c93..0000000000 --- a/packages/internal/factory/factory-sample-app/rollup.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import typescript from '@rollup/plugin-typescript'; -import { nodeResolve } from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; - -export default { - input: './src/index.ts', - output: { - dir: 'dist', - }, - plugins: [ - json(), - commonjs(), - nodeResolve(), - typescript({ - exclude: [], - }), - ], -}; diff --git a/packages/internal/factory/factory-sample-app/src/index.ts b/packages/internal/factory/factory-sample-app/src/index.ts deleted file mode 100644 index 9713e12662..0000000000 --- a/packages/internal/factory/factory-sample-app/src/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable no-console */ -import { Environment, ImmutableConfiguration } from '@imtbl/config'; -import { FactoryConfiguration, Factory, GetPresetsResponse, ZKEVM_DEVNET } from '@imtbl/factory-sdk'; -import { ethers } from 'ethers'; - -async function main() { - if (!process.env.PROVIDER) { - console.log(process.env.PROVIDER); - throw new Error('PROVIDER not set'); - } - - if (!process.env.PRIVATE_KEY) { - throw new Error('PRIVATE_KEY not set'); - } - - const provider = new ethers.providers.JsonRpcProvider( - process.env.PROVIDER, - ); - - // Create a wallet instance to simulate the user's wallet. - const wallet = new ethers.Wallet( - process.env.PRIVATE_KEY, - provider, - ); - - // Create a bridge configuration instance - const factoryConfig = new FactoryConfiguration({ - baseConfig: new ImmutableConfiguration({ - environment: Environment.SANDBOX, - }), - factoryInstance: ZKEVM_DEVNET, - provider: provider, - }); - - const factory = new Factory(factoryConfig); - - const presets: GetPresetsResponse = await factory.getPresets({}); - - console.log(presets); -} - -// Run the deposit function and exit the process when completed -(async () => { - await main().then(() => {console.log(`Exiting Successfully`); process.exit(0)}).catch(e => {console.log(`Exiting with error: ${e.toString()}`); process.exit(1)}); - })(); - diff --git a/packages/internal/factory/factory-sample-app/tsconfig.json b/packages/internal/factory/factory-sample-app/tsconfig.json deleted file mode 100644 index dfe38f207c..0000000000 --- a/packages/internal/factory/factory-sample-app/tsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "paths": { - "@/*": [ - "./src/*", - ], - "@imtbl/factory-sdk/*": [ - "../sdk/dist/*" - ] - } - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/packages/internal/factory/sdk/.eslintrc b/packages/internal/factory/sdk/.eslintrc deleted file mode 100644 index e3881a722e..0000000000 --- a/packages/internal/factory/sdk/.eslintrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": [ - "../../.eslintrc" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json", - "tsconfigRootDir": "." - }, - "rules": { - "max-len": [ - "error", - { - "code": 120, - "comments": 140, - "ignoreTemplateLiterals": true - } - ] - } -} \ No newline at end of file diff --git a/packages/internal/factory/sdk/README.md b/packages/internal/factory/sdk/README.md deleted file mode 100644 index 7909aa3619..0000000000 --- a/packages/internal/factory/sdk/README.md +++ /dev/null @@ -1 +0,0 @@ -# Immutable Factory SDK diff --git a/packages/internal/factory/sdk/jest.config.ts b/packages/internal/factory/sdk/jest.config.ts deleted file mode 100644 index b28e638f08..0000000000 --- a/packages/internal/factory/sdk/jest.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - clearMocks: true, - coverageProvider: 'v8', - moduleDirectories: ['node_modules', 'src'], - moduleNameMapper: { '^@imtbl/(.*)$': '/../../../../node_modules/@imtbl/$1/src' }, - verbose: true, - testEnvironment: 'jsdom', - transform: { - '^.+\\.(t|j)sx?$': '@swc/jest', - }, - transformIgnorePatterns: [], -}; - -export default config; diff --git a/packages/internal/factory/sdk/package.json b/packages/internal/factory/sdk/package.json deleted file mode 100644 index 86a35e7c3e..0000000000 --- a/packages/internal/factory/sdk/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@imtbl/factory-sdk", - "description": "Factory package for the Immutable SDK", - "version": "0.0.0", - "author": "Immutable", - "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", - "dependencies": { - "@imtbl/config": "0.0.0", - "@jest/globals": "^29.5.0", - "ethers": "^5.7.2" - }, - "devDependencies": { - "@rollup/plugin-commonjs": "^26.0.1", - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-typescript": "^11.1.6", - "@swc/core": "^1.3.36", - "@swc/jest": "^0.2.24", - "@typechain/ethers-v5": "^10.2.0", - "@types/jest": "^29.4.3", - "@types/node": "^18.14.2", - "jest": "^29.4.3", - "jest-environment-jsdom": "^29.4.3", - "rollup": "^4.19.1", - "ts-node": "^10.9.1", - "typechain": "^8.1.1", - "typescript": "^5.5.4", - "unplugin-swc": "^1.5.1" - }, - "engines": { - "node": ">=20.11.0" - }, - "exports": { - "development": { - "types": "./src/index.ts", - "main": "./dist/index.js", - "import": "./dist/index.js" - }, - "default": { - "types": "./dist/index.d.ts", - "main": "./dist/index.js", - "import": "./dist/index.js" - } - }, - "homepage": "https://github.com/immutable/ts-immutable-sdk#readme", - "keywords": [ - "immutablex" - ], - "license": "Apache-2.0", - "main": "dist/index.js", - "private": true, - "repository": "immutable/ts-immutable-sdk.git", - "scripts": { - "build": "NODE_ENV=production rollup --config rollup.config.js", - "d": "rollup --config rollup.config.js", - "lint": "eslint ./src --ext .ts --max-warnings=0", - "lint:fix": "cd ../../../ && yarn wsrun -p @imtbl/factory-sdk -c lint --fix", - "test": "jest test", - "test:watch": "jest --watch" - }, - "source": "src/index.ts", - "type": "module" -} diff --git a/packages/internal/factory/sdk/rollup.config.js b/packages/internal/factory/sdk/rollup.config.js deleted file mode 100644 index 8b946d3e0f..0000000000 --- a/packages/internal/factory/sdk/rollup.config.js +++ /dev/null @@ -1,20 +0,0 @@ -import typescript from '@rollup/plugin-typescript'; -import { nodeResolve } from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; -import swc from 'unplugin-swc' - -const isProduction = process.env.NODE_ENV === 'production'; - -export default { - input: './src/index.ts', - output: { - dir: 'dist', - }, - plugins: [ - json(), - commonjs(), - nodeResolve({ exportConditions: ["default"] }), - isProduction ? typescript({customConditions: ["default"]}) : swc.rollup() - ], -}; diff --git a/packages/internal/factory/sdk/src/config/config.test.ts b/packages/internal/factory/sdk/src/config/config.test.ts deleted file mode 100644 index 81954ed46b..0000000000 --- a/packages/internal/factory/sdk/src/config/config.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe } from '@jest/globals'; - -describe('config', () => { - it('works', () => { - expect(true).toBe(true); - }); -}); diff --git a/packages/internal/factory/sdk/src/config/index.ts b/packages/internal/factory/sdk/src/config/index.ts deleted file mode 100644 index 992ef6cab7..0000000000 --- a/packages/internal/factory/sdk/src/config/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Environment, ImmutableConfiguration } from '@imtbl/config'; -import { ethers } from 'ethers'; -import { - ZKEVM_DEVNET, - ZKEVM_TESTNET, -} from '../constants/factory'; -import { - FactoryInstance, FactoryModuleConfiguration, -} from '../types'; - -const SUPPORTED_SANDBOX_FACTORIES: FactoryInstance[] = [ZKEVM_DEVNET, ZKEVM_TESTNET]; - -// TODO: Add when supported -const SUPPORTED_PRODUCTION_FACTORIES: FactoryInstance[] = []; - -export const SUPPORTED_FACTORIES_FOR_ENVIRONMENT: { - [key in Environment]: FactoryInstance[]; -} = { - [Environment.SANDBOX]: SUPPORTED_SANDBOX_FACTORIES, - [Environment.PRODUCTION]: SUPPORTED_PRODUCTION_FACTORIES, -}; - -export class FactoryConfiguration { - public baseConfig: ImmutableConfiguration; - - public factoryInstance: FactoryInstance; - - public provider: ethers.providers.Provider; - - constructor({ - factoryInstance, - provider, - baseConfig, - overrides, - }: FactoryModuleConfiguration) { - this.baseConfig = baseConfig; - this.factoryInstance = factoryInstance; - this.provider = provider; - - if (overrides) { - this.factoryInstance = { factory: overrides.factory, chainID: overrides.chainID }; - return; - } - - const supported = SUPPORTED_FACTORIES_FOR_ENVIRONMENT[baseConfig.environment].includes( - factoryInstance, - ); - - if (!supported) { - throw new Error( - `Factory instance with chainID ${factoryInstance.chainID} and address ${factoryInstance.factory} is not supported in environment ${baseConfig.environment}`, - ); - } - } -} diff --git a/packages/internal/factory/sdk/src/constants/factory.ts b/packages/internal/factory/sdk/src/constants/factory.ts deleted file mode 100644 index 26bb773b83..0000000000 --- a/packages/internal/factory/sdk/src/constants/factory.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { FactoryInstance } from '../types'; - -export const ZKEVM_DEVNET_CHAIN_ID = '13473'; -export const ZKEVM_DEVNET_FACTORY_ADDRESS = '0xTODO'; - -export const ZKEVM_TESTNET_CHAIN_ID = '13473'; -export const ZKEVM_TESTNET_FACTORY_ADDRESS = '0xTODO'; - -export const ZKEVM_MAINNET_CHAIN_ID = '13371'; -export const ZKEVM_MAINNET_FACTORY_ADDRESS = '0xTODO'; - -export const ZKEVM_DEVNET: FactoryInstance = { - chainID: ZKEVM_DEVNET_CHAIN_ID, - factory: ZKEVM_DEVNET_FACTORY_ADDRESS, -}; - -export const ZKEVM_TESTNET: FactoryInstance = { - chainID: ZKEVM_TESTNET_CHAIN_ID, - factory: ZKEVM_TESTNET_FACTORY_ADDRESS, -}; - -export const ZKEVM_MAINNET: FactoryInstance = { - chainID: ZKEVM_MAINNET_CHAIN_ID, - factory: ZKEVM_MAINNET_FACTORY_ADDRESS, -}; diff --git a/packages/internal/factory/sdk/src/constants/presets.ts b/packages/internal/factory/sdk/src/constants/presets.ts deleted file mode 100644 index 8c224b42d3..0000000000 --- a/packages/internal/factory/sdk/src/constants/presets.ts +++ /dev/null @@ -1,113 +0,0 @@ -export const PRESETS = [ - { - name: 'ImmutableERC721', - group: 'NFT', - description: 'A simple NFT Preset', - link: 'https://github.com/immutable/contracts/blob/main/contracts/token/erc721/preset/ImmutableERC721.sol', - creationABI: { - inputs: [ - { - name: 'owner_', - type: 'address', - }, - { - name: 'name_', - type: 'string', - }, - { - name: 'symbol_', - type: 'string', - }, - { - name: 'baseURI_', - type: 'string', - }, - { - name: 'contractURI_', - type: 'string', - }, - { - name: 'operatorAllowlist_', - type: 'address', - }, - { - name: 'royaltyReceiver_', - type: 'address', - }, - { - name: 'feeNumerator_', - type: 'uint96', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - }, - { - name: 'ImmutableERC721MintByID', - group: 'NFT', - description: 'A simple NFT Preset that lets you mint by ID', - // eslint-disable-next-line max-len - link: 'https://github.com/immutable/contracts/blob/main/contracts/token/erc721/preset/ImmutableERC721MintByID.sol', - creationABI: { - inputs: [ - { - name: 'owner', - type: 'address', - }, - { - name: 'name_', - type: 'string', - }, - { - name: 'symbol_', - type: 'string', - }, - { - name: 'baseURI_', - type: 'string', - }, - { - name: 'contractURI_', - type: 'string', - }, - { - internalType: 'address', - name: '_operatorAllowlist', - type: 'address', - }, - { - name: '_receiver', - type: 'address', - }, - { - name: '_feeNumerator', - type: 'uint96', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - }, - { - name: 'ERC721Psi', - group: 'NFT', - description: 'A simple NFT Preset called ERC721Psi', - // eslint-disable-next-line max-len - link: 'https://github.com/immutable/contracts/blob/main/contracts/token/erc721/erc721psi/ERC721Psi.sol', - creationABI: { - inputs: [ - { - name: 'name_', - type: 'string', - }, - { - name: 'symbol_', - type: 'string', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - }, -]; diff --git a/packages/internal/factory/sdk/src/contracts/ABIs/Factory.ts b/packages/internal/factory/sdk/src/contracts/ABIs/Factory.ts deleted file mode 100644 index d3cb8cafb8..0000000000 --- a/packages/internal/factory/sdk/src/contracts/ABIs/Factory.ts +++ /dev/null @@ -1,579 +0,0 @@ -export const FACTORY = [ - { - inputs: [ - { - internalType: 'address', - name: '_admin', - type: 'address', - }, - { - internalType: 'address', - name: '_presetAdder', - type: 'address', - }, - { - internalType: 'address', - name: '_presetRemover', - type: 'address', - }, - { - internalType: 'address', - name: '_pauser', - type: 'address', - }, - { - internalType: 'address', - name: '_unpauser', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'EmptyBytecode', - type: 'error', - }, - { - inputs: [ - { - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'PresetAlreadyExists', - type: 'error', - }, - { - inputs: [ - { - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'PresetDoesNotExist', - type: 'error', - }, - { - inputs: [ - { - internalType: 'string', - name: 'presetName', - type: 'string', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'PresetInitializationFailed', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'PresetAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'PresetBytecodeAppended', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'string', - name: 'presetName', - type: 'string', - }, - { - indexed: true, - internalType: 'address', - name: 'contractAddress', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'deployer', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'salt', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'bytes', - name: 'arguments', - type: 'bytes', - }, - ], - name: 'PresetDeployed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'PresetRemoved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PAUSER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PRESET_ADDER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PRESET_REMOVER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UNPAUSER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'bytes4', - name: '_initSelector', - type: 'bytes4', - }, - ], - name: 'addPreset', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'bytes32', - name: '_salt', - type: 'bytes32', - }, - { - internalType: 'bytes', - name: '_arguments', - type: 'bytes', - }, - ], - name: 'deployPreset', - outputs: [ - { - internalType: 'address', - name: 'deployedPreset', - type: 'address', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'bytes', - name: '_bytecode', - type: 'bytes', - }, - ], - name: 'preparePresetBytecode', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: 'presetName', - type: 'string', - }, - ], - name: 'presets', - outputs: [ - { - internalType: 'bytes', - name: 'initBytecode', - type: 'bytes', - }, - { - internalType: 'bytes4', - name: 'initSelector', - type: 'bytes4', - }, - { - internalType: 'bool', - name: 'deployable', - type: 'bool', - }, - { - internalType: 'bool', - name: 'used', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - ], - name: 'removePreset', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -]; diff --git a/packages/internal/factory/sdk/src/errors/index.ts b/packages/internal/factory/sdk/src/errors/index.ts deleted file mode 100644 index 34e80a22f9..0000000000 --- a/packages/internal/factory/sdk/src/errors/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @enum {string} FactoryErrorType - Enumeration of different types of factory errors. - */ -export enum FactoryErrorType { - UNSUPPORTED_ERROR = 'UNSUPPORTED_ERROR', - PROVIDER_ERROR = 'PROVIDER_ERROR', -} - -export class FactoryError extends Error { - public type: FactoryErrorType; - - constructor(message: string, type: FactoryErrorType) { - super(message); - this.type = type; - } -} - -export const withFactoryError = async ( - fn: () => Promise, - customErrorType: FactoryErrorType, - details?: string, -): Promise => { - try { - return await fn(); - } catch (error) { - let errorMessage = `${customErrorType}: ${(error as Error).message}` || 'UnknownError'; - if (details) { - errorMessage = `${details}: ${errorMessage}`; - } - throw new FactoryError(errorMessage, customErrorType); - } -}; diff --git a/packages/internal/factory/sdk/src/factory.test.ts b/packages/internal/factory/sdk/src/factory.test.ts deleted file mode 100644 index 1d9c11b157..0000000000 --- a/packages/internal/factory/sdk/src/factory.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe } from '@jest/globals'; - -describe('Token Bridge', () => { - it('works', () => { - expect(true).toBe(true); - }); -}); diff --git a/packages/internal/factory/sdk/src/factory.ts b/packages/internal/factory/sdk/src/factory.ts deleted file mode 100644 index 7641188091..0000000000 --- a/packages/internal/factory/sdk/src/factory.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ethers } from 'ethers'; -import { FactoryConfiguration } from './config'; -import { PRESETS } from './constants/presets'; -import { FactoryError, FactoryErrorType, withFactoryError } from './errors'; -import { GetPresetsRequest, GetPresetsResponse } from './types'; - -/** - * Represents a factory - */ -export class Factory { - private config: FactoryConfiguration; - - constructor(config: FactoryConfiguration) { - this.config = config; - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - public async getPresets(req: GetPresetsRequest): Promise { - await this.validateChainConfiguration(); - return { presets: PRESETS }; - } - - // Query the chain providers to ensure the chainID is as expected by the SDK. - // This is to prevent the SDK from being used on the wrong chain, especially after a chain reset. - private async validateChainConfiguration(): Promise { - const errMessage = 'Please upgrade to the latest version of the Factory SDK or provide valid configuration'; - - const network = await withFactoryError( - async () => this.config.provider.getNetwork(), - FactoryErrorType.PROVIDER_ERROR, - ); - if (network.chainId.toString() !== this.config.factoryInstance.chainID) { - throw new FactoryError( - `Provider chainID ${network.chainId} does not match expected chainID ${this.config.factoryInstance.chainID}. ${errMessage}`, - FactoryErrorType.UNSUPPORTED_ERROR, - ); - } - } -} diff --git a/packages/internal/factory/sdk/src/index.ts b/packages/internal/factory/sdk/src/index.ts deleted file mode 100644 index 7d4cdb1266..0000000000 --- a/packages/internal/factory/sdk/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './factory'; -export * from './constants/factory'; -export * from './errors/index'; -export * from './config/index'; -export * from './types/index'; diff --git a/packages/internal/factory/sdk/src/types/index.ts b/packages/internal/factory/sdk/src/types/index.ts deleted file mode 100644 index cf78081d16..0000000000 --- a/packages/internal/factory/sdk/src/types/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ModuleConfiguration } from '@imtbl/config'; -import { ethers } from 'ethers'; - -export interface FactoryInstance { - chainID: string; - factory: Address; -} - -export interface FactoryModuleConfiguration - extends ModuleConfiguration { - factoryInstance: FactoryInstance; - provider: ethers.providers.Provider; -} - -export interface ParamInput { - name: string; - type: string; -} - -export interface CreationABI { - inputs: ParamInput[]; - stateMutability: string, - type: string, -} - -export interface Preset { - name: string; - group: string; - description: string; - link: string; - creationABI: CreationABI; -} - -/** - * @typedef {string} Address - Represents an Ethereum address. - */ -export type Address = string; - -export interface GetPresetsRequest {} - -export interface GetPresetsResponse { - presets: Preset[]; -} diff --git a/packages/internal/factory/sdk/tsconfig.json b/packages/internal/factory/sdk/tsconfig.json deleted file mode 100644 index 0644addd54..0000000000 --- a/packages/internal/factory/sdk/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist", - "rootDirs": ["src"], - "customConditions": ["development"] - }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "dist" - ] -} \ No newline at end of file diff --git a/packages/internal/generated-clients/package.json b/packages/internal/generated-clients/package.json index 670648c966..2cf1884b7c 100644 --- a/packages/internal/generated-clients/package.json +++ b/packages/internal/generated-clients/package.json @@ -11,7 +11,7 @@ "jest": "^29.4.3", "rimraf": "^6.0.1", "rollup": "^4.19.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/generated-clients/src/mr-api-clients.ts b/packages/internal/generated-clients/src/mr-api-clients.ts index 68b153e808..36c8f2b181 100644 --- a/packages/internal/generated-clients/src/mr-api-clients.ts +++ b/packages/internal/generated-clients/src/mr-api-clients.ts @@ -7,6 +7,7 @@ import { OrdersApi, PassportApi, PassportProfileApi, + GuardianApi, } from './multi-rollup'; import { MultiRollupAPIConfiguration } from './config'; @@ -29,6 +30,8 @@ export class MultiRollupApiClients { public passportProfileApi: PassportProfileApi; + public guardianApi: GuardianApi; + constructor(config: MultiRollupAPIConfiguration) { this.config = config; this.activitiesApi = new ActivitiesApi(config.indexer); @@ -39,5 +42,6 @@ export class MultiRollupApiClients { this.ordersApi = new OrdersApi(config.orderBook); this.passportApi = new PassportApi(config.passport); this.passportProfileApi = new PassportProfileApi(config.passport); + this.guardianApi = new GuardianApi(config.passport); } } diff --git a/packages/internal/generated-clients/src/mr-openapi.json b/packages/internal/generated-clients/src/mr-openapi.json index f320819af8..e69f75c37f 100644 --- a/packages/internal/generated-clients/src/mr-openapi.json +++ b/packages/internal/generated-clients/src/mr-openapi.json @@ -86,6 +86,21 @@ "name": "passport profile", "description": "Passport Profile endpoints", "x-displayName": "passport profile" + }, + { + "name": "guardian", + "description": "Guardian endpoints", + "x-displayName": "guardian" + }, + { + "name": "pricing", + "description": "Pricing Endpoints", + "x-displayName": "pricing" + }, + { + "name": "stacks", + "description": "Stacks Endpoints", + "x-displayName": "stacks" } ], "paths": { @@ -2468,8 +2483,8 @@ "tags": [ "orders" ], - "summary": "List a paginated array of bids with optional filter parameters", - "description": "List a paginated array of bids with optional filter parameters", + "summary": "List all bids", + "description": "List all bids", "operationId": "ListBids", "parameters": [ { @@ -2681,6 +2696,202 @@ } } }, + "/v1/chains/{chain_name}/orders/collection-bids": { + "get": { + "tags": [ + "orders" + ], + "summary": "List all collection bids", + "description": "List all collection bids", + "operationId": "ListCollectionBids", + "parameters": [ + { + "name": "chain_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + }, + { + "name": "status", + "in": "query", + "description": "Order status to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/OrderStatusName" + } + }, + { + "name": "buy_item_contract_address", + "in": "query", + "description": "Buy item contract address to filter by", + "required": false, + "schema": { + "type": "string", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "pattern": "^0x[a-fA-F0-9]{40}$" + } + }, + { + "name": "sell_item_contract_address", + "in": "query", + "description": "Sell item contract address to filter by", + "required": false, + "schema": { + "type": "string", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "pattern": "^0x[a-fA-F0-9]{40}$" + } + }, + { + "name": "account_address", + "in": "query", + "description": "The account address of the user who created the bid", + "required": false, + "schema": { + "type": "string", + "example": "0xc49Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "pattern": "^0x[a-fA-F0-9]{40}$" + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "From updated at including given date", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2022-03-09T05:00:50.52Z" + } + }, + { + "name": "page_size", + "in": "query", + "description": "Maximum number of orders to return per page", + "schema": { + "$ref": "#/components/schemas/PageSize" + } + }, + { + "name": "sort_by", + "in": "query", + "description": "Order field to sort by. `sell_item_amount` sorts by per token price, for example if 10eth is offered for 5 ERC1155 items, it’s sorted as 2eth for `sell_item_amount`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "sell_item_amount" + ], + "description": "Order field to sort by", + "example": "created_at" + }, + "example": "created_at" + }, + { + "name": "sort_direction", + "in": "query", + "description": "Ascending or descending direction for sort", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "description": "Ascending or descending direction for sort", + "example": "asc" + }, + "example": "asc" + }, + { + "name": "page_cursor", + "in": "query", + "description": "Page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCollectionBidsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "tags": [ + "orders" + ], + "summary": "Create a collection bid", + "description": "Create a collection bid", + "operationId": "CreateCollectionBid", + "parameters": [ + { + "name": "chain_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollectionBidRequestBody" + } + } + } + }, + "responses": { + "201": { + "description": "Created response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionBidResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + }, + "501": { + "$ref": "#/components/responses/NotImplementedError" + } + } + } + }, "/v1/chains/{chain_name}/orders/listings/{listing_id}": { "get": { "tags": [ @@ -2787,6 +2998,59 @@ } } }, + "/v1/chains/{chain_name}/orders/collection-bids/{collection_bid_id}": { + "get": { + "tags": [ + "orders" + ], + "summary": "Get a single collection bid by ID", + "description": "Get a single collection bid by ID", + "operationId": "GetCollectionBid", + "parameters": [ + { + "name": "chain_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + }, + { + "name": "collection_bid_id", + "in": "path", + "description": "Global Collection Bid identifier", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "description": "Global Collection Bid identifier", + "example": "018792C9-4AD7-8EC4-4038-9E05C598534A" + } + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionBidResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, "/v1/chains/{chain_name}/orders/fulfillment-data": { "post": { "tags": [ @@ -3739,26 +4003,805 @@ } } } - } - }, - "components": { - "securitySchemes": { - "BearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - }, - "ImmutableApiKey": { - "x-go-name": "ImmutableApiKey", - "type": "apiKey", - "in": "header", - "name": "x-immutable-api-key" - } }, - "parameters": { - "ChainName": { - "name": "chain_name", - "description": "The name of chain", + "/guardian/v1/transactions/{id}/evaluate": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Evaluate a transaction", + "description": "Check if the transaction is valid by transaction ID for both StarkEx and EVM", + "operationId": "evaluateTransaction", + "parameters": [ + { + "$ref": "#/components/parameters/TransactionId" + } + ], + "requestBody": { + "required": true, + "description": "Specifies the kind of transaction", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionEvaluationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionEvaluationResponse" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "409": { + "description": "ConflictError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError409" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/messages/evaluate": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Evaluate an evm message to sign", + "description": "Check if a given message is valid for EVM", + "operationId": "evaluateMessage", + "requestBody": { + "required": true, + "description": "Specifies the kind of transaction", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEvaluationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEvaluationResponse" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/erc191-messages/evaluate": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Evaluate an erc191 message to sign", + "description": "Check if a given erc191 message is valid", + "operationId": "evaluateErc191Message", + "requestBody": { + "required": true, + "description": "Specifies the kind of transaction", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ERC191MessageEvaluationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEvaluationResponse" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/transactions/{payloadHash}/approve": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "approve:transactions", + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Approve a pending transaction given chain", + "description": "Approve a pending transaction", + "operationId": "approvePendingTransaction", + "parameters": [ + { + "name": "payloadHash", + "in": "path", + "description": "Hash for the payload", + "required": true, + "schema": { + "type": "string", + "description": "Hash for the payload" + } + } + ], + "requestBody": { + "required": true, + "description": "request body for approving a pending transaction", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionApprovalRequest" + } + } + } + }, + "responses": { + "204": { + "description": "successfully approved a pending transaction" + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/messages/{messageID}/approve": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "approve:transactions", + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Approve a pending evm message", + "description": "Approve a pending evm message", + "operationId": "approvePendingMessage", + "parameters": [ + { + "name": "messageID", + "in": "path", + "description": "id for the message", + "required": true, + "schema": { + "type": "string", + "description": "Hash for the payload" + } + } + ], + "responses": { + "204": { + "description": "successfully approved a pending evm message" + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/erc191-messages/{messageID}/approve": { + "post": { + "x-internal": true, + "security": [ + { + "BearerAuth": [ + "approve:transactions", + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "summary": "Approve a pending erc191 message", + "description": "Approve a pending erc191 message", + "operationId": "approvePendingERC191Message", + "parameters": [ + { + "name": "messageID", + "in": "path", + "description": "id for the message", + "required": true, + "schema": { + "type": "string", + "description": "Hash for the payload" + } + } + ], + "responses": { + "204": { + "description": "successfully approved a pending erc191 message" + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + } + } + }, + "/guardian/v1/transactions/{transactionID}": { + "get": { + "x-internal": true, + "summary": "Info for a specific transaction", + "description": "Get a transaction by payload hash", + "operationId": "getTransactionByID", + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "parameters": [ + { + "name": "transactionID", + "in": "path", + "required": true, + "description": "The id of the starkex transaction to retrieve", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "chainType", + "schema": { + "type": "string", + "enum": [ + "starkex", + "evm" + ] + }, + "required": true, + "description": "roll up type" + }, + { + "in": "query", + "name": "chainID", + "schema": { + "type": "string" + }, + "description": "ID of evm chain" + }, + { + "in": "query", + "name": "includeSimulation", + "schema": { + "type": "boolean" + }, + "description": "Include simulation results" + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicAPIError" + } + } + } + } + } + } + }, + "/guardian/v1/messages/{messageID}": { + "get": { + "x-internal": true, + "summary": "Info for a specific evm message", + "description": "Get an evm message by id", + "operationId": "getMessageByID", + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "parameters": [ + { + "name": "messageID", + "in": "path", + "required": true, + "description": "The id of the evm message", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EVMMessage" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicAPIError" + } + } + } + } + } + } + }, + "/guardian/v1/erc191-messages/{messageID}": { + "get": { + "x-internal": true, + "summary": "Info for a specific erc191 message", + "description": "Get an erc191 message by id", + "operationId": "getErc191MessageByID", + "security": [ + { + "BearerAuth": [ + "transact" + ] + } + ], + "tags": [ + "guardian" + ], + "parameters": [ + { + "name": "messageID", + "in": "path", + "required": true, + "description": "The id of the erc191 message", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Erc191MessageResponse" + } + } + } + }, + "400": { + "description": "BadRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "403": { + "description": "ForbiddenError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "404": { + "description": "NotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "500": { + "description": "InternalServerError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicAPIError" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + }, + "ImmutableApiKey": { + "x-go-name": "ImmutableApiKey", + "type": "apiKey", + "in": "header", + "name": "x-immutable-api-key" + } + }, + "parameters": { + "ChainName": { + "name": "chain_name", + "description": "The name of chain", "in": "path", "required": true, "schema": { @@ -3779,6 +4822,16 @@ "schema": { "$ref": "#/components/schemas/Address" } + }, + "TransactionId": { + "name": "id", + "in": "path", + "description": "Transaction identifier: payloadHash on StarkEx or EVM ID", + "required": true, + "schema": { + "type": "string", + "description": "Hash of the transaction" + } } }, "responses": { @@ -3840,6 +4893,11 @@ "$ref": "#/components/schemas/APIError429" } } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + } } }, "TooManyMetadataRefreshes": { @@ -3861,7 +4919,7 @@ "imx-remaining-refreshes": { "$ref": "#/components/headers/MetadataRefreshLimitRemaining" }, - "retry-after": { + "Retry-After": { "$ref": "#/components/headers/MetadataRefreshRetryAfter" } } @@ -3887,6 +4945,9 @@ }, "imx-mint-requests-retry-after": { "$ref": "#/components/headers/MintRequestsRetryAfter" + }, + "Retry-After": { + "$ref": "#/components/headers/MintRequestsRetryAfter" } } }, @@ -3936,6 +4997,12 @@ "type": "string" } }, + "RetryAfter": { + "description": "The number of seconds until the next request can be made.", + "schema": { + "type": "string" + } + }, "MintRequestsLimit": { "description": "The mint requests limit available to the project for each time window.", "schema": { @@ -4786,6 +5853,13 @@ "example": "https://some-url" }, "external_link": { + "deprecated": true, + "type": "string", + "nullable": true, + "description": "(deprecated - use external_url instead) The external website link of NFT", + "example": "https://some-url" + }, + "external_url": { "type": "string", "nullable": true, "description": "The external website link of NFT", @@ -4828,6 +5902,7 @@ "description", "image", "external_link", + "external_url", "animation_url", "youtube_url", "attributes", @@ -4953,8 +6028,8 @@ "properties": { "display_type": { "description": "Display type for this attribute", - "nullable": true, "type": "string", + "nullable": true, "enum": [ "number", "boost_percentage", @@ -6303,6 +7378,12 @@ }, { "$ref": "#/components/schemas/ERC1155Item" + }, + { + "$ref": "#/components/schemas/ERC721CollectionItem" + }, + { + "$ref": "#/components/schemas/ERC1155CollectionItem" } ], "discriminator": { @@ -6311,7 +7392,26 @@ "NATIVE": "#/components/schemas/NativeItem", "ERC20": "#/components/schemas/ERC20Item", "ERC721": "#/components/schemas/ERC721Item", - "ERC1155": "#/components/schemas/ERC1155Item" + "ERC1155": "#/components/schemas/ERC1155Item", + "ERC721_COLLECTION": "#/components/schemas/ERC721CollectionItem", + "ERC1155_COLLECTION": "#/components/schemas/ERC1155CollectionItem" + } + } + }, + "AssetCollectionItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/ERC721CollectionItem" + }, + { + "$ref": "#/components/schemas/ERC1155CollectionItem" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ERC721_COLLECTION": "#/components/schemas/ERC721CollectionItem", + "ERC1155_COLLECTION": "#/components/schemas/ERC1155CollectionItem" } } }, @@ -6342,6 +7442,12 @@ ], "minItems": 0, "maxItems": 2 + }, + "token_id": { + "type": "string", + "description": "Token ID for the ERC721 or ERC1155 token", + "example": "123", + "pattern": "\\d+" } }, "required": [ @@ -6500,7 +7606,67 @@ "required": [ "type", "contract_address", - "token_id", + "token_id", + "amount" + ] + }, + "ERC721CollectionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Token type user is offering, which in this case is ERC721", + "example": "ERC721_COLLECTION", + "enum": [ + "ERC721_COLLECTION" + ] + }, + "contract_address": { + "type": "string", + "description": "Address of ERC721 collection", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "amount": { + "type": "string", + "description": "A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).", + "example": "9750000000000000000", + "pattern": "\\d+" + } + }, + "required": [ + "type", + "contract_address", + "amount" + ] + }, + "ERC1155CollectionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Token type user is offering, which in this case is ERC1155", + "example": "ERC1155_COLLECTION", + "enum": [ + "ERC1155_COLLECTION" + ] + }, + "contract_address": { + "type": "string", + "description": "Address of ERC1155 collection", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "amount": { + "type": "string", + "description": "A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).", + "example": "9750000000000000000", + "pattern": "\\d+" + } + }, + "required": [ + "type", + "contract_address", "amount" ] }, @@ -6688,7 +7854,7 @@ }, "buy": { "type": "array", - "description": "Buy item for listing should either be ERC721 or ERC1155 item", + "description": "Buy item for bid should either be ERC721 or ERC1155 item", "items": { "$ref": "#/components/schemas/Item" }, @@ -6728,9 +7894,9 @@ }, "sell": { "type": "array", - "description": "Sell item for listing should be an ERC20 item", + "description": "Sell item for bid should be an ERC20 item", "items": { - "$ref": "#/components/schemas/Item" + "$ref": "#/components/schemas/ERC20Item" }, "example": [ { @@ -6803,6 +7969,135 @@ "signature" ] }, + "CreateCollectionBidRequestBody": { + "type": "object", + "properties": { + "account_address": { + "type": "string", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "order_hash": { + "type": "string", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" + }, + "buy": { + "type": "array", + "description": "Buy item for collection bid should either be ERC721 or ERC1155 collection item", + "items": { + "$ref": "#/components/schemas/AssetCollectionItem" + }, + "example": [ + { + "type": "ERC721_COLLECTION", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "amount": "1" + } + ], + "minItems": 1, + "maxItems": 1 + }, + "fees": { + "type": "array", + "description": "Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible.", + "items": { + "$ref": "#/components/schemas/Fee" + }, + "example": [], + "minItems": 0, + "maxItems": 2 + }, + "end_at": { + "type": "string", + "description": "Time after which the Order is considered expired", + "format": "date-time", + "example": "2022-03-09T05:00:50.52Z" + }, + "protocol_data": { + "$ref": "#/components/schemas/ProtocolData" + }, + "salt": { + "type": "string", + "description": "A random value added to the create Order request", + "example": "12686911856931635052326433555881236148" + }, + "sell": { + "type": "array", + "description": "Sell item for collection bid should be an ERC20 item", + "items": { + "$ref": "#/components/schemas/ERC20Item" + }, + "example": [ + { + "type": "ERC20", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "amount": "9750000000000000000" + } + ], + "minItems": 1, + "maxItems": 1 + }, + "signature": { + "type": "string", + "description": "Digital signature generated by the user for the specific Order", + "example": "0x" + }, + "start_at": { + "type": "string", + "description": "Time after which Order is considered active", + "format": "date-time", + "example": "2022-03-09T05:00:50.52Z" + } + }, + "example": { + "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "order_hash": "0x0821933d9391bc9bf11a6010fe84776c84b203abff0c1ad781fb4881409c8770", + "sell": [ + { + "type": "ERC20", + "amount": "9750000000000000000", + "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + } + ], + "fees": [ + { + "type": "MAKER_ECOSYSTEM", + "amount": "2250000000000000000", + "recipient_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233" + } + ], + "end_at": "2022-03-10T05:00:50.52Z", + "protocol_data": { + "order_type": "FULL_RESTRICTED", + "counter": "1", + "zone_address": "0x12", + "seaport_address": "0x12", + "seaport_version": "1.5" + }, + "salt": "12686911856931635052326433555881236148", + "buy": [ + { + "type": "ERC721_COLLECTION", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "amount": "1" + } + ], + "signature": "0x", + "start_at": "2022-03-09T05:00:50.52Z" + }, + "required": [ + "account_address", + "order_hash", + "buy", + "sell", + "fees", + "end_at", + "start_at", + "protocol_data", + "salt", + "signature" + ] + }, "Fee": { "type": "object", "properties": { @@ -6938,7 +8233,8 @@ "example": "LISTING", "enum": [ "LISTING", - "BID" + "BID", + "COLLECTION_BID" ] }, "updated_at": { @@ -7019,6 +8315,7 @@ "type": "object", "properties": { "buy": { + "description": "Buy items are transferred from the taker to the maker.", "type": "array", "items": { "$ref": "#/components/schemas/Item" @@ -7034,10 +8331,21 @@ "maxItems": 1 }, "buyer_address": { + "description": "Deprecated. Use maker and taker addresses instead of buyer and seller addresses.", "type": "string", "example": "0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40" }, "buyer_fees": { + "description": "Deprecated. Use fees instead. The taker always pays the fees.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" + }, + "example": [], + "minItems": 0, + "maxItems": 1 + }, + "fees": { "type": "array", "items": { "$ref": "#/components/schemas/Fee" @@ -7068,6 +8376,7 @@ "example": "018792C9-4AD7-8EC4-4038-9E05C598534A" }, "sell": { + "description": "Sell items are transferred from the maker to the taker.", "type": "array", "items": { "$ref": "#/components/schemas/Item" @@ -7083,6 +8392,7 @@ "maxItems": 1 }, "seller_address": { + "description": "Deprecated. Use maker and taker addresses instead of buyer and seller addresses.", "type": "string", "example": "0x002b9B1cbf464782Df5d48870358FA6c09f1b19D" }, @@ -7105,6 +8415,7 @@ ], "buyer_address": "0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40", "buyer_fees": [], + "fees": [], "chain": { "id": "eip155:11155111", "name": "sepolia" @@ -7130,6 +8441,7 @@ "sell", "seller_address", "buyer_fees", + "fees", "chain", "maker_address", "taker_address", @@ -7339,7 +8651,169 @@ } } }, - "ListListingsResult": { + "CollectionBidResult": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/Order" + } + }, + "required": [ + "result" + ], + "example": { + "result": { + "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "sell": [ + { + "type": "ERC20", + "amount": "9750000000000000000", + "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + } + ], + "fees": [], + "chain": { + "id": "eip155:11155111", + "name": "sepolia" + }, + "created_at": "2022-03-07T07:20:50.52Z", + "end_at": "2022-03-10T05:00:50.52Z", + "id": "018792C9-4AD7-8EC4-4038-9E05C598534A", + "order_hash": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "protocol_data": { + "order_type": "PARTIAL_RESTRICTED", + "counter": "1", + "zone_address": "0x12", + "seaport_address": "0x12", + "seaport_version": "1.5" + }, + "salt": "12686911856931635052326433555881236148", + "buy": [ + { + "type": "ERC721_COLLECTION", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "amount": "1" + } + ], + "signature": "0x", + "start_at": "2022-03-09T05:00:50.52Z", + "status": { + "name": "EXPIRED" + }, + "type": "COLLECTION_BID", + "updated_at": "2022-03-07T07:20:50.52Z" + } + } + }, + "ListListingsResult": { + "type": "object", + "properties": { + "page": { + "$ref": "#/components/schemas/Page" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Order" + }, + "minItems": 0, + "maxItems": 200 + } + }, + "required": [ + "page", + "result" + ], + "example": { + "page": { + "previous_cursor": "MjAyMy0wMS0yM1QwMTo1NToyNy4zNTM2MzA", + "next_cursor": "MjAyMy0wMS0yM1QwMTo1NToyNy4zNTM2MzA" + }, + "result": [ + { + "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "buy": [ + { + "type": "ERC20", + "amount": "9750000000000000000", + "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + } + ], + "fees": [], + "chain": { + "id": "eip155:11155111", + "name": "sepolia" + }, + "created_at": "2022-03-07T07:20:50.52Z", + "end_at": "2022-03-10T05:00:50.52Z", + "id": "018792C9-4AD7-8EC4-4038-9E05C598534A", + "order_hash": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "protocol_data": { + "order_type": "FULL_RESTRICTED", + "counter": "1", + "zone_address": "0x12", + "seaport_address": "0x12", + "seaport_version": "1.5" + }, + "salt": "12686911856931635052326433555881236148", + "sell": [ + { + "type": "ERC721", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "token_id": "1" + } + ], + "signature": "0x", + "start_at": "2022-03-09T05:00:50.52Z", + "status": { + "name": "EXPIRED" + }, + "updated_at": "2022-03-07T07:20:50.52Z" + }, + { + "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "buy": [ + { + "type": "ERC20", + "amount": "9750000000000000000", + "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + } + ], + "fees": [], + "chain": { + "id": "eip155:11155111", + "name": "sepolia" + }, + "created_at": "2022-03-07T07:20:50.52Z", + "end_at": "2022-03-10T05:00:50.52Z", + "id": "018792C9-4AD7-8EC4-4038-9E05C598534A", + "order_hash": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "protocol_data": { + "order_type": "FULL_RESTRICTED", + "counter": "1", + "zone_address": "0x12", + "seaport_address": "0x12", + "seaport_version": "1.5" + }, + "salt": "12686911856931635052326433555881236148", + "sell": [ + { + "type": "ERC721", + "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "token_id": "1" + } + ], + "signature": "0x", + "start_at": "2022-03-09T05:00:50.52Z", + "status": { + "name": "EXPIRED" + }, + "updated_at": "2022-03-07T07:20:50.52Z" + } + ] + } + }, + "ListBidsResult": { "type": "object", "properties": { "page": { @@ -7366,7 +8840,7 @@ "result": [ { "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "buy": [ + "sell": [ { "type": "ERC20", "amount": "9750000000000000000", @@ -7390,7 +8864,7 @@ "seaport_version": "1.5" }, "salt": "12686911856931635052326433555881236148", - "sell": [ + "buy": [ { "type": "ERC721", "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", @@ -7406,7 +8880,7 @@ }, { "account_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "buy": [ + "sell": [ { "type": "ERC20", "amount": "9750000000000000000", @@ -7430,7 +8904,7 @@ "seaport_version": "1.5" }, "salt": "12686911856931635052326433555881236148", - "sell": [ + "buy": [ { "type": "ERC721", "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", @@ -7447,7 +8921,7 @@ ] } }, - "ListBidsResult": { + "ListCollectionBidsResult": { "type": "object", "properties": { "page": { @@ -7491,7 +8965,7 @@ "id": "018792C9-4AD7-8EC4-4038-9E05C598534A", "order_hash": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "protocol_data": { - "order_type": "FULL_RESTRICTED", + "order_type": "PARTIAL_RESTRICTED", "counter": "1", "zone_address": "0x12", "seaport_address": "0x12", @@ -7500,9 +8974,9 @@ "salt": "12686911856931635052326433555881236148", "buy": [ { - "type": "ERC721", + "type": "ERC721_COLLECTION", "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", - "token_id": "1" + "amount": "1" } ], "signature": "0x", @@ -7531,7 +9005,7 @@ "id": "018792C9-4AD7-8EC4-4038-9E05C598534A", "order_hash": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "protocol_data": { - "order_type": "FULL_RESTRICTED", + "order_type": "PARTIAL_RESTRICTED", "counter": "1", "zone_address": "0x12", "seaport_address": "0x12", @@ -7540,9 +9014,9 @@ "salt": "12686911856931635052326433555881236148", "buy": [ { - "type": "ERC721", + "type": "ERC721_COLLECTION", "contract_address": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", - "token_id": "1" + "amount": "1" } ], "signature": "0x", @@ -8159,73 +9633,278 @@ } } }, - "ERC20TransferMetadata": { + "ERC20TransferMetadata": { + "type": "object", + "required": [ + "transaction_type", + "to_address", + "amount", + "decimals", + "symbol", + "immutable_verification_status", + "image_url" + ], + "properties": { + "transaction_type": { + "type": "string", + "description": "Transaction type", + "enum": [ + "ERC20_TRANSFER" + ] + }, + "to_address": { + "type": "string", + "description": "The address to transfer the token to", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + }, + "amount": { + "type": "string", + "description": "A string representing the amount of tokens to transfer", + "example": "10000000000000000" + }, + "immutable_verification_status": { + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + }, + "decimals": { + "type": "integer", + "description": "The token decimals", + "example": 18 + }, + "symbol": { + "type": "string", + "description": "The symbol of the token being transferred", + "example": "AAA" + }, + "image_url": { + "type": "string", + "description": "The image of the token being transferred", + "example": "https://some-url" + } + } + }, + "ERC20TransferFromMetadata": { + "type": "object", + "required": [ + "transaction_type", + "immutable_verification_status", + "from_address", + "to_address", + "amount", + "decimals", + "symbol", + "image_url" + ], + "properties": { + "transaction_type": { + "type": "string", + "description": "Transaction type", + "enum": [ + "ERC20_TRANSFER_FROM" + ] + }, + "from_address": { + "type": "string", + "description": "The address to transfer the token from", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + }, + "to_address": { + "type": "string", + "description": "The address to transfer the token to", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + }, + "amount": { + "type": "string", + "description": "A string representing the amount of tokens to transfer", + "example": "10000000000000000" + }, + "immutable_verification_status": { + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + }, + "decimals": { + "type": "integer", + "description": "The token decimals", + "example": 18 + }, + "symbol": { + "type": "string", + "description": "The symbol of the token being transferred", + "example": "AAA" + }, + "image_url": { + "type": "string", + "description": "The image of the token being transferred", + "example": "https://some-url" + } + } + }, + "ERC20ApproveMetadata": { + "type": "object", + "required": [ + "transaction_type", + "amount", + "token_symbol", + "spender", + "is_smart_contract", + "is_contract_verified", + "immutable_verification_status", + "contract_name", + "image_url" + ], + "properties": { + "transaction_type": { + "type": "string", + "description": "Transaction type", + "enum": [ + "ERC20_APPROVE" + ] + }, + "immutable_verification_status": { + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + }, + "amount": { + "type": "string", + "description": "Requested approval amount" + }, + "token_symbol": { + "type": "string", + "description": "Requested token symbol" + }, + "spender": { + "type": "string", + "description": "Spender address" + }, + "is_smart_contract": { + "type": "boolean", + "description": "Indicate if it is a Smart Contract or EOA" + }, + "is_contract_verified": { + "type": "boolean", + "description": "Is Contract Verified" + }, + "contract_name": { + "type": "string", + "description": "Smart Contract Name" + }, + "image_url": { + "type": "string", + "example": "https://example.com/erc20.jpg" + } + } + }, + "NFTSetApprovalForAllMetadata": { + "type": "object", + "required": [ + "transaction_type", + "collection_name", + "collection_image", + "is_smart_contract", + "is_contract_verified", + "contract_name", + "immutable_verification_status" + ], + "properties": { + "transaction_type": { + "type": "string", + "description": "Transaction type", + "enum": [ + "ERC721_SET_APPROVAL_FOR_ALL", + "ERC1155_SET_APPROVAL_FOR_ALL" + ] + }, + "collection_name": { + "type": "string", + "description": "NFT Collection name" + }, + "collection_image": { + "type": "string", + "description": "NFT Collection image" + }, + "is_smart_contract": { + "type": "boolean", + "description": "Indicate if it is a Smart Contract or EOA" + }, + "is_contract_verified": { + "type": "boolean", + "description": "Is Contract Verified" + }, + "contract_name": { + "type": "string", + "description": "Smart Contract Name" + }, + "immutable_verification_status": { + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + } + } + }, + "ERC721TransferFromMetadata": { "type": "object", "required": [ "transaction_type", + "from_address", "to_address", - "amount", - "decimals", - "symbol", - "immutable_verification_status", - "image_url" + "collection_name", + "token_id", + "asset_name", + "asset_image", + "immutable_verification_status" ], "properties": { "transaction_type": { "type": "string", "description": "Transaction type", "enum": [ - "ERC20_TRANSFER" + "ERC721_TRANSFER_FROM" ] }, + "from_address": { + "type": "string", + "description": "The address to transfer the token from", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + }, "to_address": { "type": "string", "description": "The address to transfer the token to", "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" }, - "amount": { + "collection_name": { "type": "string", - "description": "A string representing the amount of tokens to transfer", - "example": "10000000000000000" - }, - "immutable_verification_status": { - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + "description": "The collection name the ERC721 belongs to" }, - "decimals": { - "type": "integer", - "description": "The token decimals", - "example": 18 + "token_id": { + "type": "string", + "description": "ID of the ERC721", + "example": "1" }, - "symbol": { + "asset_name": { "type": "string", - "description": "The symbol of the token being transferred", - "example": "AAA" + "description": "The name of the ERC721", + "example": "Sword" }, - "image_url": { + "asset_image": { "type": "string", - "description": "The image of the token being transferred", + "description": "The image of the ERC721", "example": "https://some-url" + }, + "immutable_verification_status": { + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" } } }, - "ERC20TransferFromMetadata": { + "ERC721SafeTransferFromBatchMetadata": { "type": "object", "required": [ "transaction_type", - "immutable_verification_status", "from_address", - "to_address", - "amount", - "decimals", - "symbol", - "image_url" + "collection_name", + "items", + "immutable_verification_status" ], "properties": { "transaction_type": { "type": "string", "description": "Transaction type", "enum": [ - "ERC20_TRANSFER_FROM" + "ERC721_SAFE_TRANSFER_FROM_BATCH" ] }, "from_address": { @@ -8233,71 +9912,117 @@ "description": "The address to transfer the token from", "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" }, - "to_address": { + "collection_name": { "type": "string", - "description": "The address to transfer the token to", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + "description": "The collection name the ERC721 belongs to", + "example": "Guild of Guardians Heroes" }, - "amount": { - "type": "string", - "description": "A string representing the amount of tokens to transfer", - "example": "10000000000000000" + "items": { + "type": "array", + "description": "The ERC721s to transfer and where to transfer them to", + "items": { + "$ref": "#/components/schemas/ERC721SafeTransferFromBatchItem" + } }, "immutable_verification_status": { "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + } + } + }, + "ERC721SafeTransferFromBatchItem": { + "type": "object", + "required": [ + "to_address", + "token_id", + "asset_name", + "asset_image" + ], + "properties": { + "to_address": { + "type": "string", + "description": "The address to transfer the token to", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" }, - "decimals": { - "type": "integer", - "description": "The token decimals", - "example": 18 + "token_id": { + "type": "string", + "description": "ID of the ERC721", + "example": "1" }, - "symbol": { + "asset_name": { "type": "string", - "description": "The symbol of the token being transferred", - "example": "AAA" + "description": "The name of the ERC721", + "example": "Sword" }, - "image_url": { + "asset_image": { "type": "string", - "description": "The image of the token being transferred", + "description": "The image of the ERC721", "example": "https://some-url" } } }, - "ERC20ApproveMetadata": { + "UnknownMetadata": { "type": "object", "required": [ "transaction_type", - "amount", - "token_symbol", - "spender", "is_smart_contract", "is_contract_verified", - "immutable_verification_status", - "contract_name", - "image_url" + "contract_name" ], "properties": { "transaction_type": { "type": "string", "description": "Transaction type", "enum": [ - "ERC20_APPROVE" + "UNKNOWN" ] }, - "immutable_verification_status": { - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + "is_smart_contract": { + "type": "boolean", + "description": "Indicate if it is a Smart Contract or EOA" }, - "amount": { - "type": "string", - "description": "Requested approval amount" + "is_contract_verified": { + "type": "boolean", + "description": "Is Contract Verified" }, - "token_symbol": { + "contract_name": { "type": "string", - "description": "Requested token symbol" - }, - "spender": { + "description": "Smart Contract Name" + } + } + }, + "UnknownTypedDataMetadata": { + "type": "object", + "required": [ + "typed_data_type" + ], + "properties": { + "typed_data_type": { "type": "string", - "description": "Spender address" + "description": "Unknown typed data type", + "enum": [ + "UNKNOWN" + ] + } + } + }, + "SeaportFulfillAvailableAdvancedOrdersMetadata": { + "type": "object", + "required": [ + "transaction_type", + "is_smart_contract", + "is_contract_verified", + "contract_name", + "buy", + "sell", + "fees" + ], + "properties": { + "transaction_type": { + "type": "string", + "description": "Transaction type", + "enum": [ + "SEAPORT_FULFILL_AVAILABLE_ADVANCED_ORDERS" + ] }, "is_smart_contract": { "type": "boolean", @@ -8307,273 +10032,361 @@ "type": "boolean", "description": "Is Contract Verified" }, - "contract_name": { + "contract_name": { + "type": "string", + "description": "Smart Contract Name" + }, + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeaportAdvancedOrder" + } + } + } + }, + "SeaportAdvancedOrder": { + "type": "object", + "properties": { + "buy": { + "oneOf": [ + { + "$ref": "#/components/schemas/SeaportNativeItem" + }, + { + "$ref": "#/components/schemas/SeaportERC20Item" + }, + { + "$ref": "#/components/schemas/SeaportERC1155Item" + }, + { + "$ref": "#/components/schemas/SeaportERC721Item" + } + ], + "example": [ + { + "type": "NATIVE", + "amount": "10000000000000000", + "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + } + ] + }, + "sell": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/SeaportERC1155Item" + }, + { + "$ref": "#/components/schemas/SeaportERC721Item" + }, + { + "$ref": "#/components/schemas/SeaportNativeItem" + }, + { + "$ref": "#/components/schemas/SeaportERC20Item" + } + ] + }, + "fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeaportFee" + }, + "example": [], + "minItems": 0 + } + }, + "required": [ + "buy", + "sell", + "fees" + ] + }, + "SeaportNativeItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Token type user is offering, which in this case is the native IMX token", + "example": "NATIVE", + "enum": [ + "NATIVE" + ] + }, + "amount": { "type": "string", - "description": "Smart Contract Name" + "description": "A string representing the price at which the user is willing to sell the token", + "example": "10000000000000000" }, - "image_url": { - "type": "string", - "example": "https://example.com/erc20.jpg" + "decimals": { + "type": "integer", + "description": "The decimal of this item", + "example": 18 } - } + }, + "required": [ + "type", + "amount", + "decimals" + ] }, - "NFTSetApprovalForAllMetadata": { + "SeaportERC20Item": { "type": "object", - "required": [ - "transaction_type", - "collection_name", - "collection_image", - "is_smart_contract", - "is_contract_verified", - "contract_name", - "immutable_verification_status" - ], "properties": { - "transaction_type": { + "type": { "type": "string", - "description": "Transaction type", + "description": "Token type user is offering, which in this case is ERC20", + "example": "ERC20", "enum": [ - "ERC721_SET_APPROVAL_FOR_ALL", - "ERC1155_SET_APPROVAL_FOR_ALL" + "ERC20" ] }, - "collection_name": { + "contract_address": { "type": "string", - "description": "NFT Collection name" + "description": "Address of ERC20 token", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F", + "pattern": "^0x[a-fA-F0-9]{40}$" }, - "collection_image": { + "symbol": { "type": "string", - "description": "NFT Collection image" - }, - "is_smart_contract": { - "type": "boolean", - "description": "Indicate if it is a Smart Contract or EOA" + "description": "The symbol of token", + "example": "AAA", + "nullable": true }, - "is_contract_verified": { - "type": "boolean", - "description": "Is Contract Verified" + "image_url": { + "type": "string", + "description": "The image url of token", + "example": "https://some-url", + "nullable": true }, - "contract_name": { + "amount": { "type": "string", - "description": "Smart Contract Name" + "description": "A string representing the price at which the user is willing to sell the token", + "example": "10000000000000000" + }, + "decimals": { + "type": "integer", + "description": "The decimal of this erc20 item", + "example": 18 }, "immutable_verification_status": { + "type": "string", + "description": "The Immutable verification status of this collection", "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" } - } - }, - "ERC721TransferFromMetadata": { - "type": "object", + }, "required": [ - "transaction_type", - "from_address", - "to_address", - "collection_name", - "token_id", - "asset_name", - "asset_image", + "type", + "contract_address", + "amount", + "decimals", "immutable_verification_status" - ], + ] + }, + "SeaportERC721Item": { + "type": "object", "properties": { - "transaction_type": { + "type": { "type": "string", - "description": "Transaction type", + "description": "Token type user is offering, which in this case is ERC721", + "example": "ERC721", "enum": [ - "ERC721_TRANSFER_FROM" + "ERC721" ] }, - "from_address": { - "type": "string", - "description": "The address to transfer the token from", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" - }, - "to_address": { + "contract_address": { "type": "string", - "description": "The address to transfer the token to", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + "description": "Address of ERC721 token", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" }, - "collection_name": { + "contract_name": { "type": "string", - "description": "The collection name the ERC721 belongs to" + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" }, - "token_id": { + "image_url": { "type": "string", - "description": "ID of the ERC721", - "example": "1" + "description": "The URL of the NFT", + "example": "https://example.com/nft.jpeg" }, - "asset_name": { + "name": { "type": "string", - "description": "The name of the ERC721", - "example": "Sword" + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" }, - "asset_image": { + "token_id": { "type": "string", - "description": "The image of the ERC721", - "example": "https://some-url" + "description": "ID of ERC721 token", + "example": "1", + "pattern": "\\d+" }, "immutable_verification_status": { + "type": "string", + "description": "The Immutable verification status of this collection", "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" } - } - }, - "ERC721SafeTransferFromBatchMetadata": { - "type": "object", + }, + "example": [ + { + "type": "ERC721", + "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", + "contract_name": "Guild of Guardians Heroes", + "name": "Bestowing Saint", + "token_id": "1", + "immutable_verification_status": "verified" + } + ], "required": [ - "transaction_type", - "from_address", - "collection_name", - "items", + "type", + "contract_address", + "token_id", "immutable_verification_status" - ], + ] + }, + "SeaportERC1155Item": { + "type": "object", "properties": { - "transaction_type": { + "type": { "type": "string", - "description": "Transaction type", + "description": "Token type user is offering, which in this case is ERC1155", + "example": "ERC1155", "enum": [ - "ERC721_SAFE_TRANSFER_FROM_BATCH" + "ERC1155" ] }, - "from_address": { + "contract_address": { "type": "string", - "description": "The address to transfer the token from", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + "description": "Address of ERC1155 token", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" }, - "collection_name": { + "contract_name": { "type": "string", - "description": "The collection name the ERC721 belongs to", - "example": "Guild of Guardians Heroes" + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" }, - "items": { - "type": "array", - "description": "The ERC721s to transfer and where to transfer them to", - "items": { - "$ref": "#/components/schemas/ERC721SafeTransferFromBatchItem" - } + "image_url": { + "type": "string", + "description": "The URL of the asset", + "example": "https://example.com/nft.jpeg" }, - "immutable_verification_status": { - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" - } - } - }, - "ERC721SafeTransferFromBatchItem": { - "type": "object", - "required": [ - "to_address", - "token_id", - "asset_name", - "asset_image" - ], - "properties": { - "to_address": { + "name": { "type": "string", - "description": "The address to transfer the token to", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + "nullable": true, + "example": "Sword", + "description": "The name of the asset" }, "token_id": { "type": "string", - "description": "ID of the ERC721", - "example": "1" + "description": "ID of ERC1155 token", + "example": "1", + "pattern": "\\d+" }, - "asset_name": { + "amount": { "type": "string", - "description": "The name of the ERC721", - "example": "Sword" + "description": "A string representing the total units of an ERC1155 token which the user is selling", + "example": "100" }, - "asset_image": { + "immutable_verification_status": { "type": "string", - "description": "The image of the ERC721", - "example": "https://some-url" + "description": "The Immutable verification status of this collection", + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" } - } + }, + "example": [ + { + "type": "ERC1155", + "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", + "contract_name": "Guild of Guardians Heroes", + "name": "Bestowing Saint", + "token_id": "1", + "amount": "100", + "immutable_verification_status": "verified" + } + ], + "required": [ + "type", + "contract_address", + "token_id", + "amount", + "immutable_verification_status" + ] }, - "UnknownMetadata": { + "SeaportFee": { "type": "object", - "required": [ - "transaction_type", - "is_smart_contract", - "is_contract_verified", - "contract_name" - ], "properties": { - "transaction_type": { + "type": { "type": "string", - "description": "Transaction type", + "description": "Token type of the Fee", + "example": "ERC20", "enum": [ - "UNKNOWN" + "ERC20", + "NATIVE" ] }, - "is_smart_contract": { - "type": "boolean", - "description": "Indicate if it is a Smart Contract or EOA" + "amount": { + "type": "string", + "description": "Fee payable to recipient upon settlement", + "example": "10000000000000000" }, - "is_contract_verified": { - "type": "boolean", - "description": "Is Contract Verified" + "recipient_address": { + "type": "string", + "description": "Wallet address of fee recipient", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233", + "pattern": "^0x[a-fA-F0-9]{40}$" }, - "contract_name": { + "contract_address": { "type": "string", - "description": "Smart Contract Name" - } - } - }, - "UnknownTypedDataMetadata": { - "type": "object", - "required": [ - "typed_data_type" - ], - "properties": { - "typed_data_type": { + "description": "Address of the ERC20 token for the fee", + "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "symbol": { "type": "string", - "description": "Unknown typed data type", - "enum": [ - "UNKNOWN" - ] + "description": "The symbol of token for the fee", + "example": "AAA", + "nullable": true + }, + "decimals": { + "type": "integer", + "description": "The decimal of this item", + "example": 18 } - } + }, + "example": { + "amount": "10000000000000000", + "recipient_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233", + "type": "NATIVE" + }, + "required": [ + "amount", + "type", + "recipient_address", + "decimals" + ] }, - "SeaportFulfillAvailableAdvancedOrdersMetadata": { + "SeaportCreateListingMetadata": { "type": "object", "required": [ - "transaction_type", - "is_smart_contract", - "is_contract_verified", - "contract_name", + "typed_data_type", "buy", "sell", "fees" ], "properties": { - "transaction_type": { + "typed_data_type": { "type": "string", - "description": "Transaction type", + "description": "Typed data type", "enum": [ - "SEAPORT_FULFILL_AVAILABLE_ADVANCED_ORDERS" + "SEAPORT_CREATE_LISTING_METADATA" ] }, - "is_smart_contract": { - "type": "boolean", - "description": "Indicate if it is a Smart Contract or EOA" - }, - "is_contract_verified": { - "type": "boolean", - "description": "Is Contract Verified" - }, - "contract_name": { - "type": "string", - "description": "Smart Contract Name" - }, - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeaportAdvancedOrder" - } - } - } - }, - "SeaportAdvancedOrder": { - "type": "object", - "properties": { "buy": { + "type": "object", "oneOf": [ { "$ref": "#/components/schemas/SeaportNativeItem" @@ -8582,646 +10395,753 @@ "$ref": "#/components/schemas/SeaportERC20Item" }, { - "$ref": "#/components/schemas/SeaportERC1155Item" + "$ref": "#/components/schemas/SeaportERC721Item" }, { - "$ref": "#/components/schemas/SeaportERC721Item" + "$ref": "#/components/schemas/SeaportERC1155Item" } ], "example": [ { - "type": "NATIVE", - "amount": "10000000000000000", - "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" + "type": "ERC721", + "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", + "contract_name": "Guild of Guardians Heroes", + "name": "Bestowing Saint", + "token_id": 1 } ] }, "sell": { "type": "object", "oneOf": [ + { + "$ref": "#/components/schemas/SeaportNativeItem" + }, + { + "$ref": "#/components/schemas/SeaportERC20Item" + }, + { + "$ref": "#/components/schemas/SeaportERC721Item" + }, { "$ref": "#/components/schemas/SeaportERC1155Item" + } + ] + }, + "fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeaportFee" + } + } + } + }, + "GetTransactionMetadataRes": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ERC20ApproveMetadata" + }, + { + "$ref": "#/components/schemas/ERC20TransferMetadata" + }, + { + "$ref": "#/components/schemas/ERC20TransferFromMetadata" + }, + { + "$ref": "#/components/schemas/ERC721ApproveMetadata" + }, + { + "$ref": "#/components/schemas/NFTSetApprovalForAllMetadata" + }, + { + "$ref": "#/components/schemas/ERC721TransferFromMetadata" + }, + { + "$ref": "#/components/schemas/ERC721SafeTransferFromBatchMetadata" + }, + { + "$ref": "#/components/schemas/SeaportFulfillAvailableAdvancedOrdersMetadata" + }, + { + "$ref": "#/components/schemas/UnknownMetadata" + } + ] + }, + "GetTypedDataMetadataRes": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/SeaportCreateListingMetadata" + }, + { + "$ref": "#/components/schemas/UnknownTypedDataMetadata" + } + ] + }, + "GetTypedDataMetadataRequest": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/EIP712Message" + } + } + }, + "EIP712Message": { + "type": "object", + "properties": { + "types": { + "type": "object", + "properties": { + "EIP712Domain": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + } + } + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "required": [ + "EIP712Domain" + ] + }, + "primaryType": { + "type": "string" + }, + "domain": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - { - "$ref": "#/components/schemas/SeaportERC721Item" + "version": { + "type": "string" }, - { - "$ref": "#/components/schemas/SeaportNativeItem" + "chainId": { + "type": "integer" }, - { - "$ref": "#/components/schemas/SeaportERC20Item" + "verifyingContract": { + "type": "string" + }, + "salt": { + "type": "string" } - ] + } }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeaportFee" - }, - "example": [], - "minItems": 0 + "message": { + "type": "object" } }, "required": [ - "buy", - "sell", - "fees" + "types", + "primaryType", + "domain", + "message" ] }, - "SeaportNativeItem": { + "EthAddress": { + "description": "Ethereum address", + "type": "string", + "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" + }, + "CreatedAt": { + "description": "Created at", + "type": "string", + "format": "date-time", + "example": "2021-08-31T00:00:00Z" + }, + "Name": { + "description": "Name", + "type": "string", + "example": "Test" + }, + "WalletType": { + "description": "Wallet type", + "type": "string", + "example": "MetaMask" + }, + "Wallet": { + "description": "Linked wallet", "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Token type user is offering, which in this case is the native IMX token", - "example": "NATIVE", - "enum": [ - "NATIVE" - ] - }, - "amount": { - "type": "string", - "description": "A string representing the price at which the user is willing to sell the token", - "example": "10000000000000000" - }, - "decimals": { - "type": "integer", - "description": "The decimal of this item", - "example": 18 - } - }, "required": [ + "address", "type", - "amount", - "decimals" - ] - }, - "SeaportERC20Item": { - "type": "object", + "created_at", + "updated_at", + "clientName" + ], "properties": { - "type": { - "type": "string", - "description": "Token type user is offering, which in this case is ERC20", - "example": "ERC20", - "enum": [ - "ERC20" - ] - }, - "contract_address": { - "type": "string", - "description": "Address of ERC20 token", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F", - "pattern": "^0x[a-fA-F0-9]{40}$" + "address": { + "$ref": "#/components/schemas/EthAddress" }, - "symbol": { - "type": "string", - "description": "The symbol of token", - "example": "AAA", - "nullable": true + "type": { + "$ref": "#/components/schemas/WalletType" }, - "image_url": { - "type": "string", - "description": "The image url of token", - "example": "https://some-url", - "nullable": true + "created_at": { + "$ref": "#/components/schemas/CreatedAt" }, - "amount": { - "type": "string", - "description": "A string representing the price at which the user is willing to sell the token", - "example": "10000000000000000" + "updated_at": { + "$ref": "#/components/schemas/CreatedAt" }, - "decimals": { - "type": "integer", - "description": "The decimal of this erc20 item", - "example": 18 + "name": { + "$ref": "#/components/schemas/Name" }, - "immutable_verification_status": { + "clientName": { "type": "string", - "description": "The Immutable verification status of this collection", - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + "description": "Name of client that linked the wallet", + "example": "Passport Dashboard" } - }, - "required": [ - "type", - "contract_address", - "amount", - "decimals", - "immutable_verification_status" - ] + } }, - "SeaportERC721Item": { + "LinkWalletV2Request": { + "description": "Link wallet V2 request", "type": "object", + "required": [ + "type", + "wallet_address", + "signature", + "nonce" + ], "properties": { "type": { "type": "string", - "description": "Token type user is offering, which in this case is ERC721", - "example": "ERC721", - "enum": [ - "ERC721" - ] + "description": "This should be the EIP-6963 rdns value, if you're unable to get the rdns value you can provide \"External\". If using WalletConnect then provide \"WalletConnect\".", + "example": "io.metamask", + "maxLength": 32, + "not": { + "enum": [ + "Passport", + "com.immutable.passport" + ] + } }, - "contract_address": { + "wallet_address": { + "description": "The address of the external wallet being linked to Passport", "type": "string", - "description": "Address of ERC721 token", - "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "contract_name": { - "type": "string", - "nullable": true, - "description": "The name of the collection", - "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + "signature": { + "description": "The EIP-712 signature", + "type": "string" }, - "image_url": { + "nonce": { + "description": "A unique identifier for the signature", + "type": "string" + } + } + }, + "UserInfo": { + "type": "object", + "required": [ + "sub", + "linked_addresses" + ], + "properties": { + "sub": { "type": "string", - "description": "The URL of the NFT", - "example": "https://example.com/nft.jpeg" + "description": "The user's id" }, - "name": { + "email": { "type": "string", - "nullable": true, - "example": "Sword", - "description": "The name of the NFT" + "description": "The user's email address" }, - "token_id": { + "passport_address": { "type": "string", - "description": "ID of ERC721 token", - "example": "1", - "pattern": "\\d+" + "description": "The user's Passport address if it has been registered", + "pattern": "^0x[0-9a-fA-F]*$", + "maxLength": 42 }, - "immutable_verification_status": { - "type": "string", - "description": "The Immutable verification status of this collection", - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" - } - }, - "example": [ - { - "type": "ERC721", - "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", - "contract_name": "Guild of Guardians Heroes", - "name": "Bestowing Saint", - "token_id": "1", - "immutable_verification_status": "verified" + "linked_addresses": { + "type": "array", + "minItems": 0, + "description": "The user's list of linked addresses", + "items": { + "description": "The user's linked address", + "type": "string", + "pattern": "^0x[0-9a-fA-F]*$", + "maxLength": 42 + } } - ], - "required": [ - "type", - "contract_address", - "token_id", - "immutable_verification_status" - ] + } }, - "SeaportERC1155Item": { + "Transaction": { "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Token type user is offering, which in this case is ERC1155", - "example": "ERC1155", - "enum": [ - "ERC1155" - ] + "required": [ + "id", + "eth_address", + "transaction_metadata", + "version", + "transaction_type", + "status" + ], + "properties": { + "id": { + "description": "Confirmation Candidate ID", + "type": "string" }, - "contract_address": { - "type": "string", - "description": "Address of ERC1155 token", - "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", - "pattern": "^0x[a-fA-F0-9]{40}$" + "eth_address": { + "description": "candidate's ether address", + "type": "string" }, - "contract_name": { - "type": "string", - "nullable": true, - "description": "The name of the collection", - "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + "status": { + "description": "Status of the starkex transactions", + "type": "string" }, - "image_url": { - "type": "string", - "description": "The URL of the asset", - "example": "https://example.com/nft.jpeg" + "transaction_type": { + "description": "Confirmation candidate type", + "type": "string" }, - "name": { - "type": "string", - "nullable": true, - "example": "Sword", - "description": "The name of the asset" + "version": { + "description": "Which version is at", + "type": "string" }, - "token_id": { - "type": "string", - "description": "ID of ERC1155 token", - "example": "1", - "pattern": "\\d+" + "transaction_metadata": { + "description": "Transaction metadata as a string", + "type": "object", + "additionalProperties": true }, - "amount": { - "type": "string", - "description": "A string representing the total units of an ERC1155 token which the user is selling", - "example": "100" + "client_name": { + "description": "Name of request client", + "type": "string" }, - "immutable_verification_status": { - "type": "string", - "description": "The Immutable verification status of this collection", - "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" - } - }, - "example": [ - { - "type": "ERC1155", - "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", - "contract_name": "Guild of Guardians Heroes", - "name": "Bestowing Saint", - "token_id": "1", - "amount": "100", - "immutable_verification_status": "verified" + "validation": { + "description": "Validation results", + "type": "object", + "$ref": "#/components/schemas/ValidationResult", + "nullable": true } - ], - "required": [ - "type", - "contract_address", - "token_id", - "amount", - "immutable_verification_status" - ] + } }, - "SeaportFee": { + "TransactionApprovalRequest": { "type": "object", + "required": [ + "chainType" + ], "properties": { - "type": { + "chainID": { + "description": "rollup chain ID", + "type": "string" + }, + "chainType": { + "description": "chain type", "type": "string", - "description": "Token type of the Fee", - "example": "ERC20", "enum": [ - "ERC20", - "NATIVE" + "starkex", + "evm" ] }, - "amount": { - "type": "string", - "description": "Fee payable to recipient upon settlement", - "example": "10000000000000000" + "otp": { + "description": "otp string", + "type": "string" + } + } + }, + "TransactionEvaluationRequest": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/StarkExTransactionEvaluationRequest" }, - "recipient_address": { + { + "$ref": "#/components/schemas/ZkEvmTransactionEvaluationRequest" + } + ] + }, + "StarkExTransactionEvaluationRequest": { + "required": [ + "chainType" + ], + "type": "object", + "properties": { + "chainId": { "type": "string", - "description": "Wallet address of fee recipient", - "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233", - "pattern": "^0x[a-fA-F0-9]{40}$" + "description": "The ID of the chain" }, - "contract_address": { + "chainType": { "type": "string", - "description": "Address of the ERC20 token for the fee", - "example": "0x0165878A594ca255338adfa4d48449f69242Eb8F", - "pattern": "^0x[a-fA-F0-9]{40}$" + "enum": [ + "starkex" + ], + "description": "The type of the chain" + } + } + }, + "ZkEvmTransactionEvaluationRequest": { + "required": [ + "transactionData", + "chainId", + "chainType" + ], + "type": "object", + "properties": { + "chainId": { + "type": "string", + "description": "The ID of the chain" }, - "symbol": { + "chainType": { "type": "string", - "description": "The symbol of token for the fee", - "example": "AAA", - "nullable": true + "enum": [ + "evm" + ], + "description": "The type of the chain" }, - "decimals": { - "type": "integer", - "description": "The decimal of this item", - "example": 18 + "transactionData": { + "$ref": "#/components/schemas/ZkEvmTransactionData" } - }, - "example": { - "amount": "10000000000000000", - "recipient_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233", - "type": "NATIVE" - }, - "required": [ - "amount", - "type", - "recipient_address", - "decimals" - ] + } }, - "SeaportCreateListingMetadata": { + "TransactionEvaluationResponse": { "type": "object", "required": [ - "typed_data_type", - "buy", - "sell", - "fees" + "confirmationRequired" ], "properties": { - "typed_data_type": { + "confirmationRequired": { + "type": "boolean" + }, + "confirmationMethod": { "type": "string", - "description": "Typed data type", "enum": [ - "SEAPORT_CREATE_LISTING_METADATA" + "otp", + "web" ] }, - "buy": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/SeaportNativeItem" - }, - { - "$ref": "#/components/schemas/SeaportERC20Item" - }, - { - "$ref": "#/components/schemas/SeaportERC721Item" - }, - { - "$ref": "#/components/schemas/SeaportERC1155Item" - } - ], - "example": [ - { - "type": "ERC721", - "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", - "contract_name": "Guild of Guardians Heroes", - "name": "Bestowing Saint", - "token_id": 1 - } - ] + "transactionId": { + "type": "string" + } + } + }, + "MessageEvaluationResponse": { + "type": "object", + "required": [ + "confirmationRequired", + "confirmationMethod", + "messageId" + ], + "properties": { + "confirmationRequired": { + "type": "boolean" }, - "sell": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/SeaportNativeItem" - }, - { - "$ref": "#/components/schemas/SeaportERC20Item" - }, - { - "$ref": "#/components/schemas/SeaportERC721Item" - }, - { - "$ref": "#/components/schemas/SeaportERC1155Item" - } + "confirmationMethod": { + "type": "string", + "enum": [ + "otp", + "web" ] }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeaportFee" - } + "messageId": { + "type": "string" } } }, - "GetTransactionMetadataRes": { + "ZkEvmTransactionData": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ERC20ApproveMetadata" - }, - { - "$ref": "#/components/schemas/ERC20TransferMetadata" + "required": [ + "userAddress", + "metaTransactions", + "nonce" + ], + "properties": { + "userAddress": { + "type": "string", + "description": "The user address", + "pattern": "^0x[0-9a-fA-F]*$" }, - { - "$ref": "#/components/schemas/ERC20TransferFromMetadata" + "metaTransactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetaTransaction" + }, + "minItems": 1, + "maxItems": 2, + "description": "An array of exactly two meta-transactions" }, - { - "$ref": "#/components/schemas/ERC721ApproveMetadata" + "nonce": { + "type": "string", + "description": "The nonce value" + } + } + }, + "MetaTransaction": { + "type": "object", + "required": [ + "delegateCall", + "revertOnError", + "gasLimit", + "target", + "value", + "data" + ], + "properties": { + "delegateCall": { + "type": "boolean", + "description": "Whether the transaction is a delegate call" }, - { - "$ref": "#/components/schemas/NFTSetApprovalForAllMetadata" + "revertOnError": { + "type": "boolean", + "description": "Whether to revert on error" }, - { - "$ref": "#/components/schemas/ERC721TransferFromMetadata" + "gasLimit": { + "type": "string", + "description": "The gas limit for the transaction" }, - { - "$ref": "#/components/schemas/ERC721SafeTransferFromBatchMetadata" + "target": { + "type": "string", + "description": "The SM target address of the transaction", + "pattern": "^0x[0-9a-fA-F]*$" }, - { - "$ref": "#/components/schemas/SeaportFulfillAvailableAdvancedOrdersMetadata" + "value": { + "type": "string", + "description": "The value of the transaction" }, - { - "$ref": "#/components/schemas/UnknownMetadata" + "data": { + "oneOf": [ + { + "type": "string", + "description": "Encoded data for calling the `execute()` function on the SCW", + "pattern": "^0x[0-9a-fA-F]*$" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] } - ] + } }, - "GetTypedDataMetadataRes": { + "MessageEvaluationRequest": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/SeaportCreateListingMetadata" + "required": [ + "payload", + "chainID" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/EIP712Message" }, - { - "$ref": "#/components/schemas/UnknownTypedDataMetadata" + "chainID": { + "description": "rollup chain ID", + "type": "string" } - ] + } }, - "GetTypedDataMetadataRequest": { + "ERC191MessageEvaluationRequest": { "type": "object", "required": [ - "payload" + "payload", + "chainID" ], "properties": { "payload": { - "$ref": "#/components/schemas/EIP712Message" + "$ref": "#/components/schemas/ERC191Message" + }, + "chainID": { + "description": "rollup chain ID", + "type": "string" } } }, - "EIP712Message": { + "EVMMessage": { "type": "object", + "required": [ + "id", + "eth_address", + "data", + "version", + "status" + ], "properties": { - "types": { - "type": "object", - "properties": { - "EIP712Domain": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ] - } - } - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ] - } - }, - "required": [ - "EIP712Domain" - ] + "id": { + "description": "Confirmation Candidate ID", + "type": "string" }, - "primaryType": { + "eth_address": { + "description": "request user's ether address", "type": "string" }, - "domain": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "chainId": { - "type": "integer" - }, - "verifyingContract": { - "type": "string" - }, - "salt": { - "type": "string" - } - } + "status": { + "description": "Status of the evm message", + "type": "string" }, - "message": { - "type": "object" + "version": { + "description": "Which version is at", + "type": "string" + }, + "data": { + "description": "evm message data", + "$ref": "#/components/schemas/EIP712Message" } - }, - "required": [ - "types", - "primaryType", - "domain", - "message" - ] - }, - "EthAddress": { - "description": "Ethereum address", - "type": "string", - "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" - }, - "CreatedAt": { - "description": "Created at", - "type": "string", - "format": "date-time", - "example": "2021-08-31T00:00:00Z" - }, - "Name": { - "description": "Name", - "type": "string", - "example": "Test" - }, - "WalletType": { - "description": "Wallet type", - "type": "string", - "example": "MetaMask" + } }, - "Wallet": { - "description": "Linked wallet", + "Erc191MessageResponse": { "type": "object", "required": [ - "address", - "type", - "created_at", - "updated_at", - "clientName" + "id", + "eth_address", + "data", + "version", + "status" ], "properties": { - "address": { - "$ref": "#/components/schemas/EthAddress" + "id": { + "description": "Confirmation Candidate ID", + "type": "string" }, - "type": { - "$ref": "#/components/schemas/WalletType" + "eth_address": { + "description": "request user's ether address", + "type": "string" }, - "created_at": { - "$ref": "#/components/schemas/CreatedAt" + "status": { + "description": "Status of the evm message", + "type": "string" }, - "updated_at": { - "$ref": "#/components/schemas/CreatedAt" + "version": { + "description": "Which version is at", + "type": "string" }, - "name": { - "$ref": "#/components/schemas/Name" + "data": { + "description": "evm message data", + "$ref": "#/components/schemas/ERC191Message" + } + } + }, + "ValidationResult": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ValidationSuccessResults" }, - "clientName": { - "type": "string", - "description": "Name of client that linked the wallet", - "example": "Passport Dashboard" + { + "$ref": "#/components/schemas/ValidationErrorResults" + } + ], + "discriminator": { + "propertyName": "status", + "mapping": { + "error": "#/components/schemas/ValidationErrorResults", + "success": "#/components/schemas/ValidationSuccessResults" } } }, - "LinkWalletV2Request": { - "description": "Link wallet V2 request", + "ValidationSuccessResults": { "type": "object", "required": [ - "type", - "wallet_address", - "signature", - "nonce" + "status", + "analysis" ], "properties": { - "type": { - "type": "string", - "description": "This should be the EIP-6963 rdns value, if you're unable to get the rdns value you can provide \"External\". If using WalletConnect then provide \"WalletConnect\".", - "example": "io.metamask", - "maxLength": 32, - "not": { - "enum": [ - "Passport", - "com.immutable.passport" - ] - } + "status": { + "$ref": "#/components/schemas/ValidationStatus" }, - "wallet_address": { - "description": "The address of the external wallet being linked to Passport", - "type": "string", - "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "pattern": "^0x[a-fA-F0-9]{40}$" + "highestSeverity": { + "$ref": "#/components/schemas/Severity" }, - "signature": { - "description": "The EIP-712 signature", - "type": "string" + "analysis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Analysis" + }, + "minItems": 0, + "description": "Contains a recommended action and warnings pertaining to the simulated transaction, such as interactions with known malicious addresses" + } + } + }, + "ValidationErrorResults": { + "type": "object", + "required": [ + "status", + "error" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/ValidationStatus" }, - "nonce": { - "description": "A unique identifier for the signature", + "error": { + "description": "human-readable error message", "type": "string" } } }, - "UserInfo": { + "Analysis": { + "description": "Contains a recommended action and warnings pertaining to the simulated transaction, such as interactions with known malicious addresses", "type": "object", "required": [ - "sub", - "linked_addresses" + "severity", + "description" ], "properties": { - "sub": { - "type": "string", - "description": "The user's id" - }, - "email": { - "type": "string", - "description": "The user's email address" + "severity": { + "$ref": "#/components/schemas/Severity" }, - "passport_address": { - "type": "string", - "description": "The user's Passport address if it has been registered", - "pattern": "^0x[0-9a-fA-F]*$", - "maxLength": 42 + "description": { + "description": "description of the analysis", + "type": "string" }, - "linked_addresses": { - "type": "array", - "minItems": 0, - "description": "The user's list of linked addresses", - "items": { - "description": "The user's linked address", - "type": "string", - "pattern": "^0x[0-9a-fA-F]*$", - "maxLength": 42 - } + "address": { + "description": "address of related analysis", + "type": "string" } } + }, + "Severity": { + "type": "string", + "description": "Analysis severity level", + "enum": [ + "malicious", + "benign", + "warning", + "unknown", + "info" + ] + }, + "ValidationStatus": { + "type": "string", + "description": "Status of the validation", + "enum": [ + "success", + "error" + ] + }, + "ERC191Message": { + "type": "string", + "description": "the raw message data to sign", + "maxLength": 500, + "minLength": 1 } } }, @@ -9255,6 +11175,19 @@ "tags": [ "passport profile" ] + }, + { + "name": "Guardian", + "tags": [ + "guardian" + ] + }, + { + "name": "Indexer Marketplace APIs", + "tags": [ + "pricing", + "stacks" + ] } ] } diff --git a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES index 5ecc3c0213..3671f19cbf 100644 --- a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES +++ b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES @@ -8,6 +8,7 @@ configuration.ts domain/activities-api.ts domain/chains-api.ts domain/collections-api.ts +domain/guardian-api.ts domain/metadata-api.ts domain/nft-owners-api.ts domain/nfts-api.ts @@ -25,6 +26,7 @@ models/activity-nft.ts models/activity-token.ts models/activity-type.ts models/activity.ts +models/analysis.ts models/apierror400-all-of.ts models/apierror400.ts models/apierror401-all-of.ts @@ -41,6 +43,7 @@ models/apierror500-all-of.ts models/apierror500.ts models/apierror501-all-of.ts models/apierror501.ts +models/asset-collection-item.ts models/asset-verification-status.ts models/basic-apierror.ts models/bid-result.ts @@ -53,10 +56,12 @@ models/cancelled-order-status.ts models/chain-with-details-all-of.ts models/chain-with-details.ts models/chain.ts +models/collection-bid-result.ts models/collection-contract-type.ts models/collection-metadata.ts models/collection.ts models/create-bid-request-body.ts +models/create-collection-bid-request-body.ts models/create-counterfactual-address-request.ts models/create-counterfactual-address-res.ts models/create-listing-request-body.ts @@ -67,16 +72,21 @@ models/eip712-message-domain.ts models/eip712-message-types-eip712-domain-inner.ts models/eip712-message-types.ts models/eip712-message.ts +models/erc1155-collection-item.ts models/erc1155-item.ts +models/erc191-message-evaluation-request.ts +models/erc191-message-response.ts models/erc20-approve-metadata.ts models/erc20-item.ts models/erc20-transfer-from-metadata.ts models/erc20-transfer-metadata.ts models/erc721-approve-metadata.ts +models/erc721-collection-item.ts models/erc721-item.ts models/erc721-safe-transfer-from-batch-item.ts models/erc721-safe-transfer-from-batch-metadata.ts models/erc721-transfer-from-metadata.ts +models/evmmessage.ts models/expired-order-status.ts models/failed-order-cancellation.ts models/fee.ts @@ -106,6 +116,7 @@ models/link-wallet-v2-request.ts models/list-activities-result.ts models/list-bids-result.ts models/list-chains-result.ts +models/list-collection-bids-result.ts models/list-collection-owners-result.ts models/list-collections-result.ts models/list-listings-result.ts @@ -117,6 +128,10 @@ models/list-nfts-result.ts models/list-tokens-result.ts models/list-trade-result.ts models/listing-result.ts +models/message-evaluation-request.ts +models/message-evaluation-response.ts +models/meta-transaction-data.ts +models/meta-transaction.ts models/metadata-refresh-rate-limit-result.ts models/metadata.ts models/mint-asset.ts @@ -172,16 +187,26 @@ models/seaport-erc721-item.ts models/seaport-fee.ts models/seaport-fulfill-available-advanced-orders-metadata.ts models/seaport-native-item.ts +models/severity.ts +models/stark-ex-transaction-evaluation-request.ts models/token-contract-type.ts models/token.ts models/trade-blockchain-metadata.ts models/trade-result.ts models/trade.ts +models/transaction-approval-request.ts +models/transaction-evaluation-request.ts +models/transaction-evaluation-response.ts +models/transaction.ts models/transfer.ts models/unfulfillable-order.ts models/unknown-metadata.ts models/unknown-typed-data-metadata.ts models/user-info.ts +models/validation-error-results.ts +models/validation-result.ts +models/validation-status.ts +models/validation-success-results.ts models/verification-request-contract-type.ts models/verification-request-internal-all-of.ts models/verification-request-internal.ts @@ -189,3 +214,5 @@ models/verification-request-status.ts models/verification-request.ts models/wallet.ts models/withdrawal.ts +models/zk-evm-transaction-data.ts +models/zk-evm-transaction-evaluation-request.ts diff --git a/packages/internal/generated-clients/src/multi-rollup/api.ts b/packages/internal/generated-clients/src/multi-rollup/api.ts index f3b8b323f4..0000e4fd7f 100644 --- a/packages/internal/generated-clients/src/multi-rollup/api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/api.ts @@ -17,6 +17,7 @@ export * from './domain/activities-api'; export * from './domain/chains-api'; export * from './domain/collections-api'; +export * from './domain/guardian-api'; export * from './domain/metadata-api'; export * from './domain/nft-owners-api'; export * from './domain/nfts-api'; diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/guardian-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/guardian-api.ts new file mode 100644 index 0000000000..8d713fdc33 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/domain/guardian-api.ts @@ -0,0 +1,936 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +// @ts-ignore +import { APIError400 } from '../models'; +// @ts-ignore +import { APIError403 } from '../models'; +// @ts-ignore +import { APIError404 } from '../models'; +// @ts-ignore +import { APIError409 } from '../models'; +// @ts-ignore +import { APIError500 } from '../models'; +// @ts-ignore +import { BasicAPIError } from '../models'; +// @ts-ignore +import { ERC191MessageEvaluationRequest } from '../models'; +// @ts-ignore +import { EVMMessage } from '../models'; +// @ts-ignore +import { Erc191MessageResponse } from '../models'; +// @ts-ignore +import { MessageEvaluationRequest } from '../models'; +// @ts-ignore +import { MessageEvaluationResponse } from '../models'; +// @ts-ignore +import { Transaction } from '../models'; +// @ts-ignore +import { TransactionApprovalRequest } from '../models'; +// @ts-ignore +import { TransactionEvaluationRequest } from '../models'; +// @ts-ignore +import { TransactionEvaluationResponse } from '../models'; +/** + * GuardianApi - axios parameter creator + * @export + */ +export const GuardianApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Approve a pending erc191 message + * @summary Approve a pending erc191 message + * @param {string} messageID id for the message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingERC191Message: async (messageID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'messageID' is not null or undefined + assertParamExists('approvePendingERC191Message', 'messageID', messageID) + const localVarPath = `/guardian/v1/erc191-messages/{messageID}/approve` + .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Approve a pending evm message + * @summary Approve a pending evm message + * @param {string} messageID id for the message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingMessage: async (messageID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'messageID' is not null or undefined + assertParamExists('approvePendingMessage', 'messageID', messageID) + const localVarPath = `/guardian/v1/messages/{messageID}/approve` + .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Approve a pending transaction + * @summary Approve a pending transaction given chain + * @param {string} payloadHash Hash for the payload + * @param {TransactionApprovalRequest} transactionApprovalRequest request body for approving a pending transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingTransaction: async (payloadHash: string, transactionApprovalRequest: TransactionApprovalRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'payloadHash' is not null or undefined + assertParamExists('approvePendingTransaction', 'payloadHash', payloadHash) + // verify required parameter 'transactionApprovalRequest' is not null or undefined + assertParamExists('approvePendingTransaction', 'transactionApprovalRequest', transactionApprovalRequest) + const localVarPath = `/guardian/v1/transactions/{payloadHash}/approve` + .replace(`{${"payloadHash"}}`, encodeURIComponent(String(payloadHash))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionApprovalRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Check if a given erc191 message is valid + * @summary Evaluate an erc191 message to sign + * @param {ERC191MessageEvaluationRequest} eRC191MessageEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateErc191Message: async (eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'eRC191MessageEvaluationRequest' is not null or undefined + assertParamExists('evaluateErc191Message', 'eRC191MessageEvaluationRequest', eRC191MessageEvaluationRequest) + const localVarPath = `/guardian/v1/erc191-messages/evaluate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(eRC191MessageEvaluationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Check if a given message is valid for EVM + * @summary Evaluate an evm message to sign + * @param {MessageEvaluationRequest} messageEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateMessage: async (messageEvaluationRequest: MessageEvaluationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'messageEvaluationRequest' is not null or undefined + assertParamExists('evaluateMessage', 'messageEvaluationRequest', messageEvaluationRequest) + const localVarPath = `/guardian/v1/messages/evaluate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(messageEvaluationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Check if the transaction is valid by transaction ID for both StarkEx and EVM + * @summary Evaluate a transaction + * @param {string} id Transaction identifier: payloadHash on StarkEx or EVM ID + * @param {TransactionEvaluationRequest} transactionEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateTransaction: async (id: string, transactionEvaluationRequest: TransactionEvaluationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('evaluateTransaction', 'id', id) + // verify required parameter 'transactionEvaluationRequest' is not null or undefined + assertParamExists('evaluateTransaction', 'transactionEvaluationRequest', transactionEvaluationRequest) + const localVarPath = `/guardian/v1/transactions/{id}/evaluate` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionEvaluationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an erc191 message by id + * @summary Info for a specific erc191 message + * @param {string} messageID The id of the erc191 message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getErc191MessageByID: async (messageID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'messageID' is not null or undefined + assertParamExists('getErc191MessageByID', 'messageID', messageID) + const localVarPath = `/guardian/v1/erc191-messages/{messageID}` + .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an evm message by id + * @summary Info for a specific evm message + * @param {string} messageID The id of the evm message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMessageByID: async (messageID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'messageID' is not null or undefined + assertParamExists('getMessageByID', 'messageID', messageID) + const localVarPath = `/guardian/v1/messages/{messageID}` + .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a transaction by payload hash + * @summary Info for a specific transaction + * @param {string} transactionID The id of the starkex transaction to retrieve + * @param {GetTransactionByIDChainTypeEnum} chainType roll up type + * @param {string} [chainID] ID of evm chain + * @param {boolean} [includeSimulation] Include simulation results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransactionByID: async (transactionID: string, chainType: GetTransactionByIDChainTypeEnum, chainID?: string, includeSimulation?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionID' is not null or undefined + assertParamExists('getTransactionByID', 'transactionID', transactionID) + // verify required parameter 'chainType' is not null or undefined + assertParamExists('getTransactionByID', 'chainType', chainType) + const localVarPath = `/guardian/v1/transactions/{transactionID}` + .replace(`{${"transactionID"}}`, encodeURIComponent(String(transactionID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (chainType !== undefined) { + localVarQueryParameter['chainType'] = chainType; + } + + if (chainID !== undefined) { + localVarQueryParameter['chainID'] = chainID; + } + + if (includeSimulation !== undefined) { + localVarQueryParameter['includeSimulation'] = includeSimulation; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GuardianApi - functional programming interface + * @export + */ +export const GuardianApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GuardianApiAxiosParamCreator(configuration) + return { + /** + * Approve a pending erc191 message + * @summary Approve a pending erc191 message + * @param {string} messageID id for the message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async approvePendingERC191Message(messageID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingERC191Message(messageID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Approve a pending evm message + * @summary Approve a pending evm message + * @param {string} messageID id for the message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async approvePendingMessage(messageID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingMessage(messageID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Approve a pending transaction + * @summary Approve a pending transaction given chain + * @param {string} payloadHash Hash for the payload + * @param {TransactionApprovalRequest} transactionApprovalRequest request body for approving a pending transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async approvePendingTransaction(payloadHash: string, transactionApprovalRequest: TransactionApprovalRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingTransaction(payloadHash, transactionApprovalRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Check if a given erc191 message is valid + * @summary Evaluate an erc191 message to sign + * @param {ERC191MessageEvaluationRequest} eRC191MessageEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async evaluateErc191Message(eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateErc191Message(eRC191MessageEvaluationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Check if a given message is valid for EVM + * @summary Evaluate an evm message to sign + * @param {MessageEvaluationRequest} messageEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async evaluateMessage(messageEvaluationRequest: MessageEvaluationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateMessage(messageEvaluationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Check if the transaction is valid by transaction ID for both StarkEx and EVM + * @summary Evaluate a transaction + * @param {string} id Transaction identifier: payloadHash on StarkEx or EVM ID + * @param {TransactionEvaluationRequest} transactionEvaluationRequest Specifies the kind of transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async evaluateTransaction(id: string, transactionEvaluationRequest: TransactionEvaluationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateTransaction(id, transactionEvaluationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an erc191 message by id + * @summary Info for a specific erc191 message + * @param {string} messageID The id of the erc191 message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getErc191MessageByID(messageID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getErc191MessageByID(messageID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an evm message by id + * @summary Info for a specific evm message + * @param {string} messageID The id of the evm message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMessageByID(messageID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageByID(messageID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a transaction by payload hash + * @summary Info for a specific transaction + * @param {string} transactionID The id of the starkex transaction to retrieve + * @param {GetTransactionByIDChainTypeEnum} chainType roll up type + * @param {string} [chainID] ID of evm chain + * @param {boolean} [includeSimulation] Include simulation results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTransactionByID(transactionID: string, chainType: GetTransactionByIDChainTypeEnum, chainID?: string, includeSimulation?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionByID(transactionID, chainType, chainID, includeSimulation, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * GuardianApi - factory interface + * @export + */ +export const GuardianApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GuardianApiFp(configuration) + return { + /** + * Approve a pending erc191 message + * @summary Approve a pending erc191 message + * @param {GuardianApiApprovePendingERC191MessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingERC191Message(requestParameters: GuardianApiApprovePendingERC191MessageRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.approvePendingERC191Message(requestParameters.messageID, options).then((request) => request(axios, basePath)); + }, + /** + * Approve a pending evm message + * @summary Approve a pending evm message + * @param {GuardianApiApprovePendingMessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingMessage(requestParameters: GuardianApiApprovePendingMessageRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.approvePendingMessage(requestParameters.messageID, options).then((request) => request(axios, basePath)); + }, + /** + * Approve a pending transaction + * @summary Approve a pending transaction given chain + * @param {GuardianApiApprovePendingTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approvePendingTransaction(requestParameters: GuardianApiApprovePendingTransactionRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.approvePendingTransaction(requestParameters.payloadHash, requestParameters.transactionApprovalRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Check if a given erc191 message is valid + * @summary Evaluate an erc191 message to sign + * @param {GuardianApiEvaluateErc191MessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateErc191Message(requestParameters: GuardianApiEvaluateErc191MessageRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.evaluateErc191Message(requestParameters.eRC191MessageEvaluationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Check if a given message is valid for EVM + * @summary Evaluate an evm message to sign + * @param {GuardianApiEvaluateMessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateMessage(requestParameters: GuardianApiEvaluateMessageRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.evaluateMessage(requestParameters.messageEvaluationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Check if the transaction is valid by transaction ID for both StarkEx and EVM + * @summary Evaluate a transaction + * @param {GuardianApiEvaluateTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + evaluateTransaction(requestParameters: GuardianApiEvaluateTransactionRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.evaluateTransaction(requestParameters.id, requestParameters.transactionEvaluationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get an erc191 message by id + * @summary Info for a specific erc191 message + * @param {GuardianApiGetErc191MessageByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getErc191MessageByID(requestParameters: GuardianApiGetErc191MessageByIDRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getErc191MessageByID(requestParameters.messageID, options).then((request) => request(axios, basePath)); + }, + /** + * Get an evm message by id + * @summary Info for a specific evm message + * @param {GuardianApiGetMessageByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMessageByID(requestParameters: GuardianApiGetMessageByIDRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getMessageByID(requestParameters.messageID, options).then((request) => request(axios, basePath)); + }, + /** + * Get a transaction by payload hash + * @summary Info for a specific transaction + * @param {GuardianApiGetTransactionByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransactionByID(requestParameters: GuardianApiGetTransactionByIDRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getTransactionByID(requestParameters.transactionID, requestParameters.chainType, requestParameters.chainID, requestParameters.includeSimulation, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for approvePendingERC191Message operation in GuardianApi. + * @export + * @interface GuardianApiApprovePendingERC191MessageRequest + */ +export interface GuardianApiApprovePendingERC191MessageRequest { + /** + * id for the message + * @type {string} + * @memberof GuardianApiApprovePendingERC191Message + */ + readonly messageID: string +} + +/** + * Request parameters for approvePendingMessage operation in GuardianApi. + * @export + * @interface GuardianApiApprovePendingMessageRequest + */ +export interface GuardianApiApprovePendingMessageRequest { + /** + * id for the message + * @type {string} + * @memberof GuardianApiApprovePendingMessage + */ + readonly messageID: string +} + +/** + * Request parameters for approvePendingTransaction operation in GuardianApi. + * @export + * @interface GuardianApiApprovePendingTransactionRequest + */ +export interface GuardianApiApprovePendingTransactionRequest { + /** + * Hash for the payload + * @type {string} + * @memberof GuardianApiApprovePendingTransaction + */ + readonly payloadHash: string + + /** + * request body for approving a pending transaction + * @type {TransactionApprovalRequest} + * @memberof GuardianApiApprovePendingTransaction + */ + readonly transactionApprovalRequest: TransactionApprovalRequest +} + +/** + * Request parameters for evaluateErc191Message operation in GuardianApi. + * @export + * @interface GuardianApiEvaluateErc191MessageRequest + */ +export interface GuardianApiEvaluateErc191MessageRequest { + /** + * Specifies the kind of transaction + * @type {ERC191MessageEvaluationRequest} + * @memberof GuardianApiEvaluateErc191Message + */ + readonly eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest +} + +/** + * Request parameters for evaluateMessage operation in GuardianApi. + * @export + * @interface GuardianApiEvaluateMessageRequest + */ +export interface GuardianApiEvaluateMessageRequest { + /** + * Specifies the kind of transaction + * @type {MessageEvaluationRequest} + * @memberof GuardianApiEvaluateMessage + */ + readonly messageEvaluationRequest: MessageEvaluationRequest +} + +/** + * Request parameters for evaluateTransaction operation in GuardianApi. + * @export + * @interface GuardianApiEvaluateTransactionRequest + */ +export interface GuardianApiEvaluateTransactionRequest { + /** + * Transaction identifier: payloadHash on StarkEx or EVM ID + * @type {string} + * @memberof GuardianApiEvaluateTransaction + */ + readonly id: string + + /** + * Specifies the kind of transaction + * @type {TransactionEvaluationRequest} + * @memberof GuardianApiEvaluateTransaction + */ + readonly transactionEvaluationRequest: TransactionEvaluationRequest +} + +/** + * Request parameters for getErc191MessageByID operation in GuardianApi. + * @export + * @interface GuardianApiGetErc191MessageByIDRequest + */ +export interface GuardianApiGetErc191MessageByIDRequest { + /** + * The id of the erc191 message + * @type {string} + * @memberof GuardianApiGetErc191MessageByID + */ + readonly messageID: string +} + +/** + * Request parameters for getMessageByID operation in GuardianApi. + * @export + * @interface GuardianApiGetMessageByIDRequest + */ +export interface GuardianApiGetMessageByIDRequest { + /** + * The id of the evm message + * @type {string} + * @memberof GuardianApiGetMessageByID + */ + readonly messageID: string +} + +/** + * Request parameters for getTransactionByID operation in GuardianApi. + * @export + * @interface GuardianApiGetTransactionByIDRequest + */ +export interface GuardianApiGetTransactionByIDRequest { + /** + * The id of the starkex transaction to retrieve + * @type {string} + * @memberof GuardianApiGetTransactionByID + */ + readonly transactionID: string + + /** + * roll up type + * @type {'starkex' | 'evm'} + * @memberof GuardianApiGetTransactionByID + */ + readonly chainType: GetTransactionByIDChainTypeEnum + + /** + * ID of evm chain + * @type {string} + * @memberof GuardianApiGetTransactionByID + */ + readonly chainID?: string + + /** + * Include simulation results + * @type {boolean} + * @memberof GuardianApiGetTransactionByID + */ + readonly includeSimulation?: boolean +} + +/** + * GuardianApi - object-oriented interface + * @export + * @class GuardianApi + * @extends {BaseAPI} + */ +export class GuardianApi extends BaseAPI { + /** + * Approve a pending erc191 message + * @summary Approve a pending erc191 message + * @param {GuardianApiApprovePendingERC191MessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public approvePendingERC191Message(requestParameters: GuardianApiApprovePendingERC191MessageRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).approvePendingERC191Message(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Approve a pending evm message + * @summary Approve a pending evm message + * @param {GuardianApiApprovePendingMessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public approvePendingMessage(requestParameters: GuardianApiApprovePendingMessageRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).approvePendingMessage(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Approve a pending transaction + * @summary Approve a pending transaction given chain + * @param {GuardianApiApprovePendingTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public approvePendingTransaction(requestParameters: GuardianApiApprovePendingTransactionRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).approvePendingTransaction(requestParameters.payloadHash, requestParameters.transactionApprovalRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Check if a given erc191 message is valid + * @summary Evaluate an erc191 message to sign + * @param {GuardianApiEvaluateErc191MessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public evaluateErc191Message(requestParameters: GuardianApiEvaluateErc191MessageRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).evaluateErc191Message(requestParameters.eRC191MessageEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Check if a given message is valid for EVM + * @summary Evaluate an evm message to sign + * @param {GuardianApiEvaluateMessageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public evaluateMessage(requestParameters: GuardianApiEvaluateMessageRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).evaluateMessage(requestParameters.messageEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Check if the transaction is valid by transaction ID for both StarkEx and EVM + * @summary Evaluate a transaction + * @param {GuardianApiEvaluateTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public evaluateTransaction(requestParameters: GuardianApiEvaluateTransactionRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).evaluateTransaction(requestParameters.id, requestParameters.transactionEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an erc191 message by id + * @summary Info for a specific erc191 message + * @param {GuardianApiGetErc191MessageByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public getErc191MessageByID(requestParameters: GuardianApiGetErc191MessageByIDRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).getErc191MessageByID(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an evm message by id + * @summary Info for a specific evm message + * @param {GuardianApiGetMessageByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public getMessageByID(requestParameters: GuardianApiGetMessageByIDRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).getMessageByID(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a transaction by payload hash + * @summary Info for a specific transaction + * @param {GuardianApiGetTransactionByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GuardianApi + */ + public getTransactionByID(requestParameters: GuardianApiGetTransactionByIDRequest, options?: AxiosRequestConfig) { + return GuardianApiFp(this.configuration).getTransactionByID(requestParameters.transactionID, requestParameters.chainType, requestParameters.chainID, requestParameters.includeSimulation, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const GetTransactionByIDChainTypeEnum = { + Starkex: 'starkex', + Evm: 'evm' +} as const; +export type GetTransactionByIDChainTypeEnum = typeof GetTransactionByIDChainTypeEnum[keyof typeof GetTransactionByIDChainTypeEnum]; diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts index 93b96f77fc..9d89007b3d 100644 --- a/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts @@ -40,8 +40,12 @@ import { CancelOrdersRequestBody } from '../models'; // @ts-ignore import { CancelOrdersResult } from '../models'; // @ts-ignore +import { CollectionBidResult } from '../models'; +// @ts-ignore import { CreateBidRequestBody } from '../models'; // @ts-ignore +import { CreateCollectionBidRequestBody } from '../models'; +// @ts-ignore import { CreateListingRequestBody } from '../models'; // @ts-ignore import { FulfillmentData200Response } from '../models'; @@ -50,6 +54,8 @@ import { FulfillmentDataRequest } from '../models'; // @ts-ignore import { ListBidsResult } from '../models'; // @ts-ignore +import { ListCollectionBidsResult } from '../models'; +// @ts-ignore import { ListListingsResult } from '../models'; // @ts-ignore import { ListTradeResult } from '../models'; @@ -145,6 +151,46 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, + /** + * Create a collection bid + * @summary Create a collection bid + * @param {string} chainName + * @param {CreateCollectionBidRequestBody} createCollectionBidRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCollectionBid: async (chainName: string, createCollectionBidRequestBody: CreateCollectionBidRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('createCollectionBid', 'chainName', chainName) + // verify required parameter 'createCollectionBidRequestBody' is not null or undefined + assertParamExists('createCollectionBid', 'createCollectionBidRequestBody', createCollectionBidRequestBody) + const localVarPath = `/v1/chains/{chain_name}/orders/collection-bids` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createCollectionBidRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Create a listing * @summary Create a listing @@ -254,6 +300,44 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a single collection bid by ID + * @summary Get a single collection bid by ID + * @param {string} chainName + * @param {string} collectionBidId Global Collection Bid identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCollectionBid: async (chainName: string, collectionBidId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('getCollectionBid', 'chainName', chainName) + // verify required parameter 'collectionBidId' is not null or undefined + assertParamExists('getCollectionBid', 'collectionBidId', collectionBidId) + const localVarPath = `/v1/chains/{chain_name}/orders/collection-bids/{collection_bid_id}` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))) + .replace(`{${"collection_bid_id"}}`, encodeURIComponent(String(collectionBidId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -340,8 +424,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * List a paginated array of bids with optional filter parameters - * @summary List a paginated array of bids with optional filter parameters + * List all bids + * @summary List all bids * @param {string} chainName * @param {OrderStatusName} [status] Order status to filter by * @param {string} [buyItemContractAddress] Buy item contract address to filter by @@ -421,6 +505,87 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all collection bids + * @summary List all collection bids + * @param {string} chainName + * @param {OrderStatusName} [status] Order status to filter by + * @param {string} [buyItemContractAddress] Buy item contract address to filter by + * @param {string} [sellItemContractAddress] Sell item contract address to filter by + * @param {string} [accountAddress] The account address of the user who created the bid + * @param {string} [fromUpdatedAt] From updated at including given date + * @param {number} [pageSize] Maximum number of orders to return per page + * @param {ListCollectionBidsSortByEnum} [sortBy] Order field to sort by. `sell_item_amount` sorts by per token price, for example if 10eth is offered for 5 ERC1155 items, it’s sorted as 2eth for `sell_item_amount`. + * @param {ListCollectionBidsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort + * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCollectionBids: async (chainName: string, status?: OrderStatusName, buyItemContractAddress?: string, sellItemContractAddress?: string, accountAddress?: string, fromUpdatedAt?: string, pageSize?: number, sortBy?: ListCollectionBidsSortByEnum, sortDirection?: ListCollectionBidsSortDirectionEnum, pageCursor?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('listCollectionBids', 'chainName', chainName) + const localVarPath = `/v1/chains/{chain_name}/orders/collection-bids` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (buyItemContractAddress !== undefined) { + localVarQueryParameter['buy_item_contract_address'] = buyItemContractAddress; + } + + if (sellItemContractAddress !== undefined) { + localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress; + } + + if (accountAddress !== undefined) { + localVarQueryParameter['account_address'] = accountAddress; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = (fromUpdatedAt as any instanceof Date) ? + (fromUpdatedAt as any).toISOString() : + fromUpdatedAt; + } + + if (pageSize !== undefined) { + localVarQueryParameter['page_size'] = pageSize; + } + + if (sortBy !== undefined) { + localVarQueryParameter['sort_by'] = sortBy; + } + + if (sortDirection !== undefined) { + localVarQueryParameter['sort_direction'] = sortDirection; + } + + if (pageCursor !== undefined) { + localVarQueryParameter['page_cursor'] = pageCursor; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -631,6 +796,18 @@ export const OrdersApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.createBid(chainName, createBidRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Create a collection bid + * @summary Create a collection bid + * @param {string} chainName + * @param {CreateCollectionBidRequestBody} createCollectionBidRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCollectionBid(chainName: string, createCollectionBidRequestBody: CreateCollectionBidRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCollectionBid(chainName, createCollectionBidRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Create a listing * @summary Create a listing @@ -667,6 +844,18 @@ export const OrdersApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getBid(chainName, bidId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Get a single collection bid by ID + * @summary Get a single collection bid by ID + * @param {string} chainName + * @param {string} collectionBidId Global Collection Bid identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCollectionBid(chainName: string, collectionBidId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCollectionBid(chainName, collectionBidId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Get a single listing by ID * @summary Get a single listing by ID @@ -692,8 +881,8 @@ export const OrdersApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * List a paginated array of bids with optional filter parameters - * @summary List a paginated array of bids with optional filter parameters + * List all bids + * @summary List all bids * @param {string} chainName * @param {OrderStatusName} [status] Order status to filter by * @param {string} [buyItemContractAddress] Buy item contract address to filter by @@ -713,6 +902,26 @@ export const OrdersApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.listBids(chainName, status, buyItemContractAddress, sellItemContractAddress, accountAddress, buyItemMetadataId, buyItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * List all collection bids + * @summary List all collection bids + * @param {string} chainName + * @param {OrderStatusName} [status] Order status to filter by + * @param {string} [buyItemContractAddress] Buy item contract address to filter by + * @param {string} [sellItemContractAddress] Sell item contract address to filter by + * @param {string} [accountAddress] The account address of the user who created the bid + * @param {string} [fromUpdatedAt] From updated at including given date + * @param {number} [pageSize] Maximum number of orders to return per page + * @param {ListCollectionBidsSortByEnum} [sortBy] Order field to sort by. `sell_item_amount` sorts by per token price, for example if 10eth is offered for 5 ERC1155 items, it’s sorted as 2eth for `sell_item_amount`. + * @param {ListCollectionBidsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort + * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCollectionBids(chainName: string, status?: OrderStatusName, buyItemContractAddress?: string, sellItemContractAddress?: string, accountAddress?: string, fromUpdatedAt?: string, pageSize?: number, sortBy?: ListCollectionBidsSortByEnum, sortDirection?: ListCollectionBidsSortDirectionEnum, pageCursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionBids(chainName, status, buyItemContractAddress, sellItemContractAddress, accountAddress, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * List all listings * @summary List all listings @@ -784,6 +993,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat createBid(requestParameters: OrdersApiCreateBidRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createBid(requestParameters.chainName, requestParameters.createBidRequestBody, options).then((request) => request(axios, basePath)); }, + /** + * Create a collection bid + * @summary Create a collection bid + * @param {OrdersApiCreateCollectionBidRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCollectionBid(requestParameters: OrdersApiCreateCollectionBidRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.createCollectionBid(requestParameters.chainName, requestParameters.createCollectionBidRequestBody, options).then((request) => request(axios, basePath)); + }, /** * Create a listing * @summary Create a listing @@ -814,6 +1033,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat getBid(requestParameters: OrdersApiGetBidRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getBid(requestParameters.chainName, requestParameters.bidId, options).then((request) => request(axios, basePath)); }, + /** + * Get a single collection bid by ID + * @summary Get a single collection bid by ID + * @param {OrdersApiGetCollectionBidRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCollectionBid(requestParameters: OrdersApiGetCollectionBidRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getCollectionBid(requestParameters.chainName, requestParameters.collectionBidId, options).then((request) => request(axios, basePath)); + }, /** * Get a single listing by ID * @summary Get a single listing by ID @@ -835,8 +1064,8 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat return localVarFp.getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(axios, basePath)); }, /** - * List a paginated array of bids with optional filter parameters - * @summary List a paginated array of bids with optional filter parameters + * List all bids + * @summary List all bids * @param {OrdersApiListBidsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -844,6 +1073,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat listBids(requestParameters: OrdersApiListBidsRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.listBids(requestParameters.chainName, requestParameters.status, requestParameters.buyItemContractAddress, requestParameters.sellItemContractAddress, requestParameters.accountAddress, requestParameters.buyItemMetadataId, requestParameters.buyItemTokenId, requestParameters.fromUpdatedAt, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath)); }, + /** + * List all collection bids + * @summary List all collection bids + * @param {OrdersApiListCollectionBidsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCollectionBids(requestParameters: OrdersApiListCollectionBidsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.listCollectionBids(requestParameters.chainName, requestParameters.status, requestParameters.buyItemContractAddress, requestParameters.sellItemContractAddress, requestParameters.accountAddress, requestParameters.fromUpdatedAt, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath)); + }, /** * List all listings * @summary List all listings @@ -909,6 +1148,27 @@ export interface OrdersApiCreateBidRequest { readonly createBidRequestBody: CreateBidRequestBody } +/** + * Request parameters for createCollectionBid operation in OrdersApi. + * @export + * @interface OrdersApiCreateCollectionBidRequest + */ +export interface OrdersApiCreateCollectionBidRequest { + /** + * + * @type {string} + * @memberof OrdersApiCreateCollectionBid + */ + readonly chainName: string + + /** + * + * @type {CreateCollectionBidRequestBody} + * @memberof OrdersApiCreateCollectionBid + */ + readonly createCollectionBidRequestBody: CreateCollectionBidRequestBody +} + /** * Request parameters for createListing operation in OrdersApi. * @export @@ -972,6 +1232,27 @@ export interface OrdersApiGetBidRequest { readonly bidId: string } +/** + * Request parameters for getCollectionBid operation in OrdersApi. + * @export + * @interface OrdersApiGetCollectionBidRequest + */ +export interface OrdersApiGetCollectionBidRequest { + /** + * + * @type {string} + * @memberof OrdersApiGetCollectionBid + */ + readonly chainName: string + + /** + * Global Collection Bid identifier + * @type {string} + * @memberof OrdersApiGetCollectionBid + */ + readonly collectionBidId: string +} + /** * Request parameters for getListing operation in OrdersApi. * @export @@ -1105,6 +1386,83 @@ export interface OrdersApiListBidsRequest { readonly pageCursor?: string } +/** + * Request parameters for listCollectionBids operation in OrdersApi. + * @export + * @interface OrdersApiListCollectionBidsRequest + */ +export interface OrdersApiListCollectionBidsRequest { + /** + * + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly chainName: string + + /** + * Order status to filter by + * @type {OrderStatusName} + * @memberof OrdersApiListCollectionBids + */ + readonly status?: OrderStatusName + + /** + * Buy item contract address to filter by + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly buyItemContractAddress?: string + + /** + * Sell item contract address to filter by + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly sellItemContractAddress?: string + + /** + * The account address of the user who created the bid + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly accountAddress?: string + + /** + * From updated at including given date + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly fromUpdatedAt?: string + + /** + * Maximum number of orders to return per page + * @type {number} + * @memberof OrdersApiListCollectionBids + */ + readonly pageSize?: number + + /** + * Order field to sort by. `sell_item_amount` sorts by per token price, for example if 10eth is offered for 5 ERC1155 items, it’s sorted as 2eth for `sell_item_amount`. + * @type {'created_at' | 'updated_at' | 'sell_item_amount'} + * @memberof OrdersApiListCollectionBids + */ + readonly sortBy?: ListCollectionBidsSortByEnum + + /** + * Ascending or descending direction for sort + * @type {'asc' | 'desc'} + * @memberof OrdersApiListCollectionBids + */ + readonly sortDirection?: ListCollectionBidsSortDirectionEnum + + /** + * Page cursor to retrieve previous or next page. Use the value returned in the response. + * @type {string} + * @memberof OrdersApiListCollectionBids + */ + readonly pageCursor?: string +} + /** * Request parameters for listListings operation in OrdersApi. * @export @@ -1297,6 +1655,18 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).createBid(requestParameters.chainName, requestParameters.createBidRequestBody, options).then((request) => request(this.axios, this.basePath)); } + /** + * Create a collection bid + * @summary Create a collection bid + * @param {OrdersApiCreateCollectionBidRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public createCollectionBid(requestParameters: OrdersApiCreateCollectionBidRequest, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).createCollectionBid(requestParameters.chainName, requestParameters.createCollectionBidRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + /** * Create a listing * @summary Create a listing @@ -1333,6 +1703,18 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).getBid(requestParameters.chainName, requestParameters.bidId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get a single collection bid by ID + * @summary Get a single collection bid by ID + * @param {OrdersApiGetCollectionBidRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public getCollectionBid(requestParameters: OrdersApiGetCollectionBidRequest, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).getCollectionBid(requestParameters.chainName, requestParameters.collectionBidId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Get a single listing by ID * @summary Get a single listing by ID @@ -1358,8 +1740,8 @@ export class OrdersApi extends BaseAPI { } /** - * List a paginated array of bids with optional filter parameters - * @summary List a paginated array of bids with optional filter parameters + * List all bids + * @summary List all bids * @param {OrdersApiListBidsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1369,6 +1751,18 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).listBids(requestParameters.chainName, requestParameters.status, requestParameters.buyItemContractAddress, requestParameters.sellItemContractAddress, requestParameters.accountAddress, requestParameters.buyItemMetadataId, requestParameters.buyItemTokenId, requestParameters.fromUpdatedAt, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath)); } + /** + * List all collection bids + * @summary List all collection bids + * @param {OrdersApiListCollectionBidsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public listCollectionBids(requestParameters: OrdersApiListCollectionBidsRequest, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).listCollectionBids(requestParameters.chainName, requestParameters.status, requestParameters.buyItemContractAddress, requestParameters.sellItemContractAddress, requestParameters.accountAddress, requestParameters.fromUpdatedAt, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath)); + } + /** * List all listings * @summary List all listings @@ -1411,6 +1805,23 @@ export const ListBidsSortDirectionEnum = { Desc: 'desc' } as const; export type ListBidsSortDirectionEnum = typeof ListBidsSortDirectionEnum[keyof typeof ListBidsSortDirectionEnum]; +/** + * @export + */ +export const ListCollectionBidsSortByEnum = { + CreatedAt: 'created_at', + UpdatedAt: 'updated_at', + SellItemAmount: 'sell_item_amount' +} as const; +export type ListCollectionBidsSortByEnum = typeof ListCollectionBidsSortByEnum[keyof typeof ListCollectionBidsSortByEnum]; +/** + * @export + */ +export const ListCollectionBidsSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type ListCollectionBidsSortDirectionEnum = typeof ListCollectionBidsSortDirectionEnum[keyof typeof ListCollectionBidsSortDirectionEnum]; /** * @export */ diff --git a/packages/internal/generated-clients/src/multi-rollup/models/analysis.ts b/packages/internal/generated-clients/src/multi-rollup/models/analysis.ts new file mode 100644 index 0000000000..db1b74d058 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/analysis.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Severity } from './severity'; + +/** + * Contains a recommended action and warnings pertaining to the simulated transaction, such as interactions with known malicious addresses + * @export + * @interface Analysis + */ +export interface Analysis { + /** + * + * @type {Severity} + * @memberof Analysis + */ + 'severity': Severity; + /** + * description of the analysis + * @type {string} + * @memberof Analysis + */ + 'description': string; + /** + * address of related analysis + * @type {string} + * @memberof Analysis + */ + 'address'?: string; +} + + + diff --git a/packages/internal/guardian/src/client/models/transaction-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/asset-collection-item.ts similarity index 54% rename from packages/internal/guardian/src/client/models/transaction-evaluation-request.ts rename to packages/internal/generated-clients/src/multi-rollup/models/asset-collection-item.ts index e6bc105568..2c92d60218 100644 --- a/packages/internal/guardian/src/client/models/transaction-evaluation-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/asset-collection-item.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,15 +15,15 @@ // May contain unused imports in some cases // @ts-ignore -import type { ZkEvmTransactionData } from './zk-evm-transaction-data'; +import { ERC1155CollectionItem } from './erc1155-collection-item'; // May contain unused imports in some cases // @ts-ignore -import type { ZkEvmTransactionEvaluationRequest } from './zk-evm-transaction-evaluation-request'; +import { ERC721CollectionItem } from './erc721-collection-item'; /** - * @type TransactionEvaluationRequest + * @type AssetCollectionItem * @export */ -export type TransactionEvaluationRequest = { chainType: 'evm' } & ZkEvmTransactionEvaluationRequest | { chainType: 'starkex' }; +export type AssetCollectionItem = { type: 'ERC1155_COLLECTION' } & ERC1155CollectionItem | { type: 'ERC721_COLLECTION' } & ERC721CollectionItem; diff --git a/packages/internal/guardian/src/client/models/apierror404.ts b/packages/internal/generated-clients/src/multi-rollup/models/collection-bid-result.ts similarity index 58% rename from packages/internal/guardian/src/client/models/apierror404.ts rename to packages/internal/generated-clients/src/multi-rollup/models/collection-bid-result.ts index 8905671ecd..bc19a61f49 100644 --- a/packages/internal/guardian/src/client/models/apierror404.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/collection-bid-result.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,12 +15,19 @@ // May contain unused imports in some cases // @ts-ignore -import type { BasicAPIError } from './basic-apierror'; +import { Order } from './order'; /** - * @type APIError404 + * * @export + * @interface CollectionBidResult */ -export type APIError404 = BasicAPIError; - +export interface CollectionBidResult { + /** + * + * @type {Order} + * @memberof CollectionBidResult + */ + 'result': Order; +} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/create-bid-request-body.ts b/packages/internal/generated-clients/src/multi-rollup/models/create-bid-request-body.ts index b3b84b7702..866bbed947 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/create-bid-request-body.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/create-bid-request-body.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ERC20Item } from './erc20-item'; // May contain unused imports in some cases // @ts-ignore import { Fee } from './fee'; @@ -42,7 +45,7 @@ export interface CreateBidRequestBody { */ 'order_hash': string; /** - * Buy item for listing should either be ERC721 or ERC1155 item + * Buy item for bid should either be ERC721 or ERC1155 item * @type {Array} * @memberof CreateBidRequestBody */ @@ -72,11 +75,11 @@ export interface CreateBidRequestBody { */ 'salt': string; /** - * Sell item for listing should be an ERC20 item - * @type {Array} + * Sell item for bid should be an ERC20 item + * @type {Array} * @memberof CreateBidRequestBody */ - 'sell': Array; + 'sell': Array; /** * Digital signature generated by the user for the specific Order * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/create-collection-bid-request-body.ts b/packages/internal/generated-clients/src/multi-rollup/models/create-collection-bid-request-body.ts new file mode 100644 index 0000000000..a6ea47a782 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/create-collection-bid-request-body.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AssetCollectionItem } from './asset-collection-item'; +// May contain unused imports in some cases +// @ts-ignore +import { ERC20Item } from './erc20-item'; +// May contain unused imports in some cases +// @ts-ignore +import { Fee } from './fee'; +// May contain unused imports in some cases +// @ts-ignore +import { ProtocolData } from './protocol-data'; + +/** + * + * @export + * @interface CreateCollectionBidRequestBody + */ +export interface CreateCollectionBidRequestBody { + /** + * + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'account_address': string; + /** + * + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'order_hash': string; + /** + * Buy item for collection bid should either be ERC721 or ERC1155 collection item + * @type {Array} + * @memberof CreateCollectionBidRequestBody + */ + 'buy': Array; + /** + * Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible. + * @type {Array} + * @memberof CreateCollectionBidRequestBody + */ + 'fees': Array; + /** + * Time after which the Order is considered expired + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'end_at': string; + /** + * + * @type {ProtocolData} + * @memberof CreateCollectionBidRequestBody + */ + 'protocol_data': ProtocolData; + /** + * A random value added to the create Order request + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'salt': string; + /** + * Sell item for collection bid should be an ERC20 item + * @type {Array} + * @memberof CreateCollectionBidRequestBody + */ + 'sell': Array; + /** + * Digital signature generated by the user for the specific Order + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'signature': string; + /** + * Time after which Order is considered active + * @type {string} + * @memberof CreateCollectionBidRequestBody + */ + 'start_at': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/erc1155-collection-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/erc1155-collection-item.ts new file mode 100644 index 0000000000..97c1c8d821 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/erc1155-collection-item.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ERC1155CollectionItem + */ +export interface ERC1155CollectionItem { + /** + * Token type user is offering, which in this case is ERC1155 + * @type {string} + * @memberof ERC1155CollectionItem + */ + 'type': ERC1155CollectionItemTypeEnum; + /** + * Address of ERC1155 collection + * @type {string} + * @memberof ERC1155CollectionItem + */ + 'contract_address': string; + /** + * A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum). + * @type {string} + * @memberof ERC1155CollectionItem + */ + 'amount': string; +} + +export const ERC1155CollectionItemTypeEnum = { + Erc1155Collection: 'ERC1155_COLLECTION' +} as const; + +export type ERC1155CollectionItemTypeEnum = typeof ERC1155CollectionItemTypeEnum[keyof typeof ERC1155CollectionItemTypeEnum]; + + diff --git a/packages/internal/guardian/src/client/models/erc191-message-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/erc191-message-evaluation-request.ts similarity index 92% rename from packages/internal/guardian/src/client/models/erc191-message-evaluation-request.ts rename to packages/internal/generated-clients/src/multi-rollup/models/erc191-message-evaluation-request.ts index 603708d3d9..29ffc01872 100644 --- a/packages/internal/guardian/src/client/models/erc191-message-evaluation-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/erc191-message-evaluation-request.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/guardian/src/client/models/erc191-message-response.ts b/packages/internal/generated-clients/src/multi-rollup/models/erc191-message-response.ts similarity index 95% rename from packages/internal/guardian/src/client/models/erc191-message-response.ts rename to packages/internal/generated-clients/src/multi-rollup/models/erc191-message-response.ts index f7d37d34b2..8cd70aff96 100644 --- a/packages/internal/guardian/src/client/models/erc191-message-response.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/erc191-message-response.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/generated-clients/src/multi-rollup/models/erc721-collection-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/erc721-collection-item.ts new file mode 100644 index 0000000000..b3e21c4fca --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/erc721-collection-item.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ERC721CollectionItem + */ +export interface ERC721CollectionItem { + /** + * Token type user is offering, which in this case is ERC721 + * @type {string} + * @memberof ERC721CollectionItem + */ + 'type': ERC721CollectionItemTypeEnum; + /** + * Address of ERC721 collection + * @type {string} + * @memberof ERC721CollectionItem + */ + 'contract_address': string; + /** + * A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum). + * @type {string} + * @memberof ERC721CollectionItem + */ + 'amount': string; +} + +export const ERC721CollectionItemTypeEnum = { + Erc721Collection: 'ERC721_COLLECTION', + Erc1155Collection: 'ERC1155_COLLECTION' +} as const; + +export type ERC721CollectionItemTypeEnum = typeof ERC721CollectionItemTypeEnum[keyof typeof ERC721CollectionItemTypeEnum]; + + diff --git a/packages/internal/guardian/src/client/models/evmmessage.ts b/packages/internal/generated-clients/src/multi-rollup/models/evmmessage.ts similarity index 90% rename from packages/internal/guardian/src/client/models/evmmessage.ts rename to packages/internal/generated-clients/src/multi-rollup/models/evmmessage.ts index 4635010216..f2dc110515 100644 --- a/packages/internal/guardian/src/client/models/evmmessage.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/evmmessage.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import type { EIP712Message } from './eip712-message'; +import { EIP712Message } from './eip712-message'; /** * diff --git a/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts index d10266c8f1..a57dd7b08d 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts @@ -41,5 +41,11 @@ export interface FulfillmentDataRequest { * @memberof FulfillmentDataRequest */ 'fees': Array; + /** + * Token ID for the ERC721 or ERC1155 token + * @type {string} + * @memberof FulfillmentDataRequest + */ + 'token_id'?: string; } diff --git a/packages/internal/generated-clients/src/multi-rollup/models/index.ts b/packages/internal/generated-clients/src/multi-rollup/models/index.ts index 0ddb48a524..4d4ec4a7fc 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/index.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/index.ts @@ -22,6 +22,8 @@ export * from './activity-nft'; export * from './activity-native-token'; export * from './activity-token'; export * from './activity-type'; +export * from './analysis'; +export * from './asset-collection-item'; export * from './asset-verification-status'; export * from './basic-apierror'; export * from './bid-result'; @@ -35,9 +37,11 @@ export * from './chain'; export * from './chain-with-details'; export * from './chain-with-details-all-of'; export * from './collection'; +export * from './collection-bid-result'; export * from './collection-contract-type'; export * from './collection-metadata'; export * from './create-bid-request-body'; +export * from './create-collection-bid-request-body'; export * from './create-counterfactual-address-request'; export * from './create-counterfactual-address-res'; export * from './create-listing-request-body'; @@ -48,16 +52,21 @@ export * from './eip712-message'; export * from './eip712-message-domain'; export * from './eip712-message-types'; export * from './eip712-message-types-eip712-domain-inner'; +export * from './erc1155-collection-item'; export * from './erc1155-item'; +export * from './erc191-message-evaluation-request'; export * from './erc20-approve-metadata'; export * from './erc20-item'; export * from './erc20-transfer-from-metadata'; export * from './erc20-transfer-metadata'; export * from './erc721-approve-metadata'; +export * from './erc721-collection-item'; export * from './erc721-item'; export * from './erc721-safe-transfer-from-batch-item'; export * from './erc721-safe-transfer-from-batch-metadata'; export * from './erc721-transfer-from-metadata'; +export * from './evmmessage'; +export * from './erc191-message-response'; export * from './expired-order-status'; export * from './failed-order-cancellation'; export * from './fee'; @@ -86,6 +95,7 @@ export * from './link-wallet-v2-request'; export * from './list-activities-result'; export * from './list-bids-result'; export * from './list-chains-result'; +export * from './list-collection-bids-result'; export * from './list-collection-owners-result'; export * from './list-collections-result'; export * from './list-listings-result'; @@ -97,6 +107,10 @@ export * from './list-nfts-result'; export * from './list-tokens-result'; export * from './list-trade-result'; export * from './listing-result'; +export * from './message-evaluation-request'; +export * from './message-evaluation-response'; +export * from './meta-transaction'; +export * from './meta-transaction-data'; export * from './metadata'; export * from './metadata-refresh-rate-limit-result'; export * from './mint'; @@ -152,16 +166,26 @@ export * from './seaport-erc721-item'; export * from './seaport-fee'; export * from './seaport-fulfill-available-advanced-orders-metadata'; export * from './seaport-native-item'; +export * from './severity'; +export * from './stark-ex-transaction-evaluation-request'; export * from './token'; export * from './token-contract-type'; export * from './trade'; export * from './trade-blockchain-metadata'; export * from './trade-result'; +export * from './transaction'; +export * from './transaction-approval-request'; +export * from './transaction-evaluation-request'; +export * from './transaction-evaluation-response'; export * from './transfer'; export * from './unfulfillable-order'; export * from './unknown-metadata'; export * from './unknown-typed-data-metadata'; export * from './user-info'; +export * from './validation-error-results'; +export * from './validation-result'; +export * from './validation-status'; +export * from './validation-success-results'; export * from './verification-request'; export * from './verification-request-contract-type'; export * from './verification-request-internal'; @@ -169,3 +193,5 @@ export * from './verification-request-internal-all-of'; export * from './verification-request-status'; export * from './wallet'; export * from './withdrawal'; +export * from './zk-evm-transaction-data'; +export * from './zk-evm-transaction-evaluation-request'; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/item.ts b/packages/internal/generated-clients/src/multi-rollup/models/item.ts index 3bb5c2a1ea..e3aff81aef 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/item.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/item.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ERC1155CollectionItem } from './erc1155-collection-item'; // May contain unused imports in some cases // @ts-ignore import { ERC1155Item } from './erc1155-item'; @@ -21,6 +24,9 @@ import { ERC1155Item } from './erc1155-item'; import { ERC20Item } from './erc20-item'; // May contain unused imports in some cases // @ts-ignore +import { ERC721CollectionItem } from './erc721-collection-item'; +// May contain unused imports in some cases +// @ts-ignore import { ERC721Item } from './erc721-item'; // May contain unused imports in some cases // @ts-ignore @@ -30,6 +36,6 @@ import { NativeItem } from './native-item'; * @type Item * @export */ -export type Item = { type: 'ERC1155' } & ERC1155Item | { type: 'ERC20' } & ERC20Item | { type: 'ERC721' } & ERC721Item | { type: 'NATIVE' } & NativeItem; +export type Item = { type: 'ERC1155' } & ERC1155Item | { type: 'ERC1155_COLLECTION' } & ERC1155CollectionItem | { type: 'ERC20' } & ERC20Item | { type: 'ERC721' } & ERC721Item | { type: 'ERC721_COLLECTION' } & ERC721CollectionItem | { type: 'NATIVE' } & NativeItem; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/list-collection-bids-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/list-collection-bids-result.ts new file mode 100644 index 0000000000..026b7ebdc6 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/list-collection-bids-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Order } from './order'; +// May contain unused imports in some cases +// @ts-ignore +import { Page } from './page'; + +/** + * + * @export + * @interface ListCollectionBidsResult + */ +export interface ListCollectionBidsResult { + /** + * + * @type {Page} + * @memberof ListCollectionBidsResult + */ + 'page': Page; + /** + * + * @type {Array} + * @memberof ListCollectionBidsResult + */ + 'result': Array; +} + diff --git a/packages/internal/guardian/src/client/models/message-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-request.ts similarity index 87% rename from packages/internal/guardian/src/client/models/message-evaluation-request.ts rename to packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-request.ts index 21d5a58745..a15825efe7 100644 --- a/packages/internal/guardian/src/client/models/message-evaluation-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-request.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import type { EIP712Message } from './eip712-message'; +import { EIP712Message } from './eip712-message'; /** * diff --git a/packages/internal/guardian/src/client/models/message-evaluation-response.ts b/packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-response.ts similarity index 95% rename from packages/internal/guardian/src/client/models/message-evaluation-response.ts rename to packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-response.ts index ec45ccc8ff..a596e16242 100644 --- a/packages/internal/guardian/src/client/models/message-evaluation-response.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/message-evaluation-response.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/guardian/src/client/models/meta-transaction-data.ts b/packages/internal/generated-clients/src/multi-rollup/models/meta-transaction-data.ts similarity index 88% rename from packages/internal/guardian/src/client/models/meta-transaction-data.ts rename to packages/internal/generated-clients/src/multi-rollup/models/meta-transaction-data.ts index 082980b526..a6292def15 100644 --- a/packages/internal/guardian/src/client/models/meta-transaction-data.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/meta-transaction-data.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/guardian/src/client/models/meta-transaction.ts b/packages/internal/generated-clients/src/multi-rollup/models/meta-transaction.ts similarity index 91% rename from packages/internal/guardian/src/client/models/meta-transaction.ts rename to packages/internal/generated-clients/src/multi-rollup/models/meta-transaction.ts index 1d1b8d909f..eb411227fb 100644 --- a/packages/internal/guardian/src/client/models/meta-transaction.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/meta-transaction.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import type { MetaTransactionData } from './meta-transaction-data'; +import { MetaTransactionData } from './meta-transaction-data'; /** * diff --git a/packages/internal/generated-clients/src/multi-rollup/models/native-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/native-item.ts index 294ee0ba02..f217f084ff 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/native-item.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/native-item.ts @@ -38,7 +38,9 @@ export const NativeItemTypeEnum = { Native: 'NATIVE', Erc20: 'ERC20', Erc721: 'ERC721', - Erc1155: 'ERC1155' + Erc1155: 'ERC1155', + Erc721Collection: 'ERC721_COLLECTION', + Erc1155Collection: 'ERC1155_COLLECTION' } as const; export type NativeItemTypeEnum = typeof NativeItemTypeEnum[keyof typeof NativeItemTypeEnum]; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/nft.ts b/packages/internal/generated-clients/src/multi-rollup/models/nft.ts index 25f86e8091..7deed291c2 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/nft.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/nft.ts @@ -96,11 +96,18 @@ export interface NFT { */ 'image': string | null; /** - * The external website link of NFT + * (deprecated - use external_url instead) The external website link of NFT * @type {string} * @memberof NFT + * @deprecated */ 'external_link': string | null; + /** + * The external website link of NFT + * @type {string} + * @memberof NFT + */ + 'external_url': string | null; /** * The animation url of the NFT * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/order.ts b/packages/internal/generated-clients/src/multi-rollup/models/order.ts index c22b9428b4..5b4dab1388 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/order.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/order.ts @@ -144,7 +144,8 @@ export interface Order { export const OrderTypeEnum = { Listing: 'LISTING', - Bid: 'BID' + Bid: 'BID', + CollectionBid: 'COLLECTION_BID' } as const; export type OrderTypeEnum = typeof OrderTypeEnum[keyof typeof OrderTypeEnum]; diff --git a/packages/internal/guardian/src/client/models/apierror403.ts b/packages/internal/generated-clients/src/multi-rollup/models/severity.ts similarity index 50% rename from packages/internal/guardian/src/client/models/apierror403.ts rename to packages/internal/generated-clients/src/multi-rollup/models/severity.ts index b48a3e343e..cacc8bf065 100644 --- a/packages/internal/guardian/src/client/models/apierror403.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/severity.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -13,14 +13,22 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import type { BasicAPIError } from './basic-apierror'; /** - * @type APIError403 + * Analysis severity level * @export + * @enum {string} */ -export type APIError403 = BasicAPIError; + +export const Severity = { + Malicious: 'malicious', + Benign: 'benign', + Warning: 'warning', + Unknown: 'unknown', + Info: 'info' +} as const; + +export type Severity = typeof Severity[keyof typeof Severity]; + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/stark-ex-transaction-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/stark-ex-transaction-evaluation-request.ts new file mode 100644 index 0000000000..3447694f2e --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/stark-ex-transaction-evaluation-request.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface StarkExTransactionEvaluationRequest + */ +export interface StarkExTransactionEvaluationRequest { + /** + * The ID of the chain + * @type {string} + * @memberof StarkExTransactionEvaluationRequest + */ + 'chainId'?: string; + /** + * The type of the chain + * @type {string} + * @memberof StarkExTransactionEvaluationRequest + */ + 'chainType': StarkExTransactionEvaluationRequestChainTypeEnum; +} + +export const StarkExTransactionEvaluationRequestChainTypeEnum = { + Starkex: 'starkex' +} as const; + +export type StarkExTransactionEvaluationRequestChainTypeEnum = typeof StarkExTransactionEvaluationRequestChainTypeEnum[keyof typeof StarkExTransactionEvaluationRequestChainTypeEnum]; + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/trade.ts b/packages/internal/generated-clients/src/multi-rollup/models/trade.ts index 28c7fd177d..b1400cda6f 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/trade.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/trade.ts @@ -33,23 +33,29 @@ import { TradeBlockchainMetadata } from './trade-blockchain-metadata'; */ export interface Trade { /** - * + * Buy items are transferred from the taker to the maker. * @type {Array} * @memberof Trade */ 'buy': Array; /** - * + * Deprecated. Use maker and taker addresses instead of buyer and seller addresses. * @type {string} * @memberof Trade */ 'buyer_address': string; /** - * + * Deprecated. Use fees instead. The taker always pays the fees. * @type {Array} * @memberof Trade */ 'buyer_fees': Array; + /** + * + * @type {Array} + * @memberof Trade + */ + 'fees': Array; /** * * @type {Chain} @@ -81,13 +87,13 @@ export interface Trade { */ 'id': string; /** - * + * Sell items are transferred from the maker to the taker. * @type {Array} * @memberof Trade */ 'sell': Array; /** - * + * Deprecated. Use maker and taker addresses instead of buyer and seller addresses. * @type {string} * @memberof Trade */ diff --git a/packages/internal/guardian/src/client/models/transaction-approval-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/transaction-approval-request.ts similarity index 95% rename from packages/internal/guardian/src/client/models/transaction-approval-request.ts rename to packages/internal/generated-clients/src/multi-rollup/models/transaction-approval-request.ts index 2f988aa5c9..2effa8ccb3 100644 --- a/packages/internal/guardian/src/client/models/transaction-approval-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/transaction-approval-request.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-request.ts new file mode 100644 index 0000000000..ed129482f2 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-request.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { StarkExTransactionEvaluationRequest } from './stark-ex-transaction-evaluation-request'; +// May contain unused imports in some cases +// @ts-ignore +import { ZkEvmTransactionData } from './zk-evm-transaction-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ZkEvmTransactionEvaluationRequest } from './zk-evm-transaction-evaluation-request'; + +/** + * @type TransactionEvaluationRequest + * @export + */ +export type TransactionEvaluationRequest = StarkExTransactionEvaluationRequest | ZkEvmTransactionEvaluationRequest; + + diff --git a/packages/internal/guardian/src/client/models/transaction-evaluation-response.ts b/packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-response.ts similarity index 95% rename from packages/internal/guardian/src/client/models/transaction-evaluation-response.ts rename to packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-response.ts index 553437f7fd..da34409fe7 100644 --- a/packages/internal/guardian/src/client/models/transaction-evaluation-response.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/transaction-evaluation-response.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com diff --git a/packages/internal/guardian/src/client/models/transaction.ts b/packages/internal/generated-clients/src/multi-rollup/models/transaction.ts similarity index 79% rename from packages/internal/guardian/src/client/models/transaction.ts rename to packages/internal/generated-clients/src/multi-rollup/models/transaction.ts index a2f7e99c98..3f5fd89301 100644 --- a/packages/internal/guardian/src/client/models/transaction.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/transaction.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ValidationResult } from './validation-result'; /** * @@ -27,7 +30,7 @@ export interface Transaction { */ 'id': string; /** - * canidates\'s ether address + * candidate\'s ether address * @type {string} * @memberof Transaction */ @@ -62,5 +65,11 @@ export interface Transaction { * @memberof Transaction */ 'client_name'?: string; + /** + * + * @type {ValidationResult} + * @memberof Transaction + */ + 'validation'?: ValidationResult; } diff --git a/packages/internal/generated-clients/src/multi-rollup/models/validation-error-results.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-error-results.ts new file mode 100644 index 0000000000..ed36381b6f --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-error-results.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ValidationStatus } from './validation-status'; + +/** + * + * @export + * @interface ValidationErrorResults + */ +export interface ValidationErrorResults { + /** + * + * @type {ValidationStatus} + * @memberof ValidationErrorResults + */ + 'status': ValidationStatus; + /** + * human-readable error message + * @type {string} + * @memberof ValidationErrorResults + */ + 'error': string; +} + + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts new file mode 100644 index 0000000000..a93d1dd3dc --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Analysis } from './analysis'; +// May contain unused imports in some cases +// @ts-ignore +import { Severity } from './severity'; +// May contain unused imports in some cases +// @ts-ignore +import { ValidationErrorResults } from './validation-error-results'; +// May contain unused imports in some cases +// @ts-ignore +import { ValidationStatus } from './validation-status'; +// May contain unused imports in some cases +// @ts-ignore +import { ValidationSuccessResults } from './validation-success-results'; + +/** + * @type ValidationResult + * @export + */ +export type ValidationResult = { status: 'error' } & ValidationErrorResults | { status: 'success' } & ValidationSuccessResults; + + diff --git a/packages/internal/guardian/src/client/models/apierror400.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-status.ts similarity index 53% rename from packages/internal/guardian/src/client/models/apierror400.ts rename to packages/internal/generated-clients/src/multi-rollup/models/validation-status.ts index b7bc2dd15b..6e0b2ad20f 100644 --- a/packages/internal/guardian/src/client/models/apierror400.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-status.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -13,14 +13,19 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import type { BasicAPIError } from './basic-apierror'; /** - * @type APIError400 + * Status of the validation * @export + * @enum {string} */ -export type APIError400 = BasicAPIError; + +export const ValidationStatus = { + Success: 'success', + Error: 'error' +} as const; + +export type ValidationStatus = typeof ValidationStatus[keyof typeof ValidationStatus]; + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts new file mode 100644 index 0000000000..1529ca9d21 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Analysis } from './analysis'; +// May contain unused imports in some cases +// @ts-ignore +import { Severity } from './severity'; +// May contain unused imports in some cases +// @ts-ignore +import { ValidationStatus } from './validation-status'; + +/** + * + * @export + * @interface ValidationSuccessResults + */ +export interface ValidationSuccessResults { + /** + * + * @type {ValidationStatus} + * @memberof ValidationSuccessResults + */ + 'status': ValidationStatus; + /** + * + * @type {Severity} + * @memberof ValidationSuccessResults + */ + 'highestSeverity'?: Severity; + /** + * Contains a recommended action and warnings pertaining to the simulated transaction, such as interactions with known malicious addresses + * @type {Array} + * @memberof ValidationSuccessResults + */ + 'analysis': Array; +} + + + diff --git a/packages/internal/guardian/src/client/models/zk-evm-transaction-data.ts b/packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-data.ts similarity index 89% rename from packages/internal/guardian/src/client/models/zk-evm-transaction-data.ts rename to packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-data.ts index 79d5263a85..fce54c2d99 100644 --- a/packages/internal/guardian/src/client/models/zk-evm-transaction-data.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-data.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import type { MetaTransaction } from './meta-transaction'; +import { MetaTransaction } from './meta-transaction'; /** * diff --git a/packages/internal/guardian/src/client/models/zk-evm-transaction-evaluation-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-evaluation-request.ts similarity index 91% rename from packages/internal/guardian/src/client/models/zk-evm-transaction-evaluation-request.ts rename to packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-evaluation-request.ts index 6ec96cfb8a..973cd8d738 100644 --- a/packages/internal/guardian/src/client/models/zk-evm-transaction-evaluation-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/zk-evm-transaction-evaluation-request.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Guardian - * Guardian API + * Immutable zkEVM API + * Immutable Multi Rollup API * * The version of the OpenAPI document: 1.0.0 * Contact: support@immutable.com @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import type { ZkEvmTransactionData } from './zk-evm-transaction-data'; +import { ZkEvmTransactionData } from './zk-evm-transaction-data'; /** * diff --git a/packages/internal/guardian/.eslintrc.cjs b/packages/internal/guardian/.eslintrc.cjs deleted file mode 100644 index cc10d70796..0000000000 --- a/packages/internal/guardian/.eslintrc.cjs +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - "extends": ["../.eslintrc"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json", - "tsconfigRootDir": __dirname - } -} diff --git a/packages/internal/guardian/package.json b/packages/internal/guardian/package.json deleted file mode 100644 index 93a6433b17..0000000000 --- a/packages/internal/guardian/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@imtbl/guardian", - "description": "Guardian client", - "version": "0.0.0", - "author": "Immutable", - "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", - "dependencies": { - "axios": "^1.6.5" - }, - "devDependencies": { - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-typescript": "^11.1.6", - "@swc/core": "^1.3.36", - "@swc/jest": "^0.2.24", - "@typechain/ethers-v5": "^10.2.0", - "@types/jest": "^29.4.3", - "@types/node": "^18.14.2", - "eslint": "^8.40.0", - "jest": "^29.4.3", - "jest-environment-jsdom": "^29.4.3", - "rollup": "^4.19.1", - "ts-node": "^10.9.1", - "typechain": "^8.1.1", - "typescript": "^5.5.4", - "unplugin-swc": "^1.5.1" - }, - "engines": { - "node": ">=20.11.0" - }, - "exports": { - "development": { - "types": "./src/index.ts", - "main": "./dist/index.js", - "import": "./dist/index.js" - }, - "default": { - "types": "./dist/index.d.ts", - "main": "./dist/index.js", - "import": "./dist/index.js" - } - }, - "files": [ - "dist" - ], - "homepage": "https://github.com/immutable/ts-immutable-sdk#readme", - "keywords": [ - "immutablex" - ], - "license": "Apache-2.0", - "main": "dist/index.js", - "private": true, - "repository": "immutable/ts-immutable-sdk.git", - "scripts": { - "build": "NODE_ENV=production rollup --config rollup.config.js", - "d": "rollup --config rollup.config.js" - }, - "type": "module" -} diff --git a/packages/internal/guardian/rollup.config.js b/packages/internal/guardian/rollup.config.js deleted file mode 100644 index 83edafd0f8..0000000000 --- a/packages/internal/guardian/rollup.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import typescript from '@rollup/plugin-typescript'; -import resolve from '@rollup/plugin-node-resolve'; -import json from '@rollup/plugin-json'; -import swc from 'unplugin-swc' - -const isProduction = process.env.NODE_ENV === 'production'; - -export default { - input: './src/index.ts', - output: { - dir: 'dist', - }, - plugins: [ - json(), - resolve({ browser: true, exportConditions: ["default"] }), - isProduction ? - typescript({ - customConditions: ["default"], - exclude: ['**/ABIs/*', '**/*.test.*', '**/utils/testUtils.ts'], - }) : - swc.rollup({exclude: ['**/ABIs/*', '**/*.test.*', '**/utils/testUtils.ts']}), - ], -}; diff --git a/packages/internal/guardian/src/client/api.ts b/packages/internal/guardian/src/client/api.ts deleted file mode 100644 index 09de3aa670..0000000000 --- a/packages/internal/guardian/src/client/api.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -export * from './domain/messages-api'; -export * from './domain/transactions-api'; - diff --git a/packages/internal/guardian/src/client/base.ts b/packages/internal/guardian/src/client/base.ts deleted file mode 100644 index a2f77953d5..0000000000 --- a/packages/internal/guardian/src/client/base.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "https://api.immutable.com".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} - -interface ServerMap { - [key: string]: { - url: string, - description: string, - }[]; -} - -/** - * - * @export - */ -export const operationServerMap: ServerMap = { -} diff --git a/packages/internal/guardian/src/client/common.ts b/packages/internal/guardian/src/client/common.ts deleted file mode 100644 index 867497672d..0000000000 --- a/packages/internal/guardian/src/client/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/internal/guardian/src/client/configuration.ts b/packages/internal/guardian/src/client/configuration.ts deleted file mode 100644 index 671eafbab7..0000000000 --- a/packages/internal/guardian/src/client/configuration.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/internal/guardian/src/client/domain/messages-api.ts b/packages/internal/guardian/src/client/domain/messages-api.ts deleted file mode 100644 index 67eb4f9347..0000000000 --- a/packages/internal/guardian/src/client/domain/messages-api.ts +++ /dev/null @@ -1,606 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from '../configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; -// @ts-ignore -import type { APIError400 } from '../models'; -// @ts-ignore -import type { APIError403 } from '../models'; -// @ts-ignore -import type { APIError404 } from '../models'; -// @ts-ignore -import type { APIError500 } from '../models'; -// @ts-ignore -import type { BasicAPIError } from '../models'; -// @ts-ignore -import type { ERC191MessageEvaluationRequest } from '../models'; -// @ts-ignore -import type { EVMMessage } from '../models'; -// @ts-ignore -import type { Erc191MessageResponse } from '../models'; -// @ts-ignore -import type { MessageEvaluationRequest } from '../models'; -// @ts-ignore -import type { MessageEvaluationResponse } from '../models'; -/** - * MessagesApi - axios parameter creator - * @export - */ -export const MessagesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Approve a pending erc191 message - * @summary Approve a pending erc191 message - * @param {string} messageID id for the message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingERC191Message: async (messageID: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'messageID' is not null or undefined - assertParamExists('approvePendingERC191Message', 'messageID', messageID) - const localVarPath = `/guardian/v1/erc191-messages/{messageID}/approve` - .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Approve a pending evm message - * @summary Approve a pending evm message - * @param {string} messageID id for the message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingMessage: async (messageID: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'messageID' is not null or undefined - assertParamExists('approvePendingMessage', 'messageID', messageID) - const localVarPath = `/guardian/v1/messages/{messageID}/approve` - .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Check if a given erc191 message is valid - * @summary Evaluate an erc191 message to sign - * @param {ERC191MessageEvaluationRequest} eRC191MessageEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateErc191Message: async (eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'eRC191MessageEvaluationRequest' is not null or undefined - assertParamExists('evaluateErc191Message', 'eRC191MessageEvaluationRequest', eRC191MessageEvaluationRequest) - const localVarPath = `/guardian/v1/erc191-messages/evaluate`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(eRC191MessageEvaluationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Check if a given message is valid for EVM - * @summary Evaluate an evm message to sign - * @param {MessageEvaluationRequest} messageEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateMessage: async (messageEvaluationRequest: MessageEvaluationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'messageEvaluationRequest' is not null or undefined - assertParamExists('evaluateMessage', 'messageEvaluationRequest', messageEvaluationRequest) - const localVarPath = `/guardian/v1/messages/evaluate`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(messageEvaluationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get an erc191 message by id - * @summary Info for a specific erc191 message - * @param {string} messageID The id of the erc191 message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getErc191MessageByID: async (messageID: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'messageID' is not null or undefined - assertParamExists('getErc191MessageByID', 'messageID', messageID) - const localVarPath = `/guardian/v1/erc191-messages/{messageID}` - .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get an evm message by id - * @summary Info for a specific evm message - * @param {string} messageID The id of the evm message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMessageByID: async (messageID: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'messageID' is not null or undefined - assertParamExists('getMessageByID', 'messageID', messageID) - const localVarPath = `/guardian/v1/messages/{messageID}` - .replace(`{${"messageID"}}`, encodeURIComponent(String(messageID))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * MessagesApi - functional programming interface - * @export - */ -export const MessagesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MessagesApiAxiosParamCreator(configuration) - return { - /** - * Approve a pending erc191 message - * @summary Approve a pending erc191 message - * @param {string} messageID id for the message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async approvePendingERC191Message(messageID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingERC191Message(messageID, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.approvePendingERC191Message']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Approve a pending evm message - * @summary Approve a pending evm message - * @param {string} messageID id for the message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async approvePendingMessage(messageID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingMessage(messageID, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.approvePendingMessage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Check if a given erc191 message is valid - * @summary Evaluate an erc191 message to sign - * @param {ERC191MessageEvaluationRequest} eRC191MessageEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async evaluateErc191Message(eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateErc191Message(eRC191MessageEvaluationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.evaluateErc191Message']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Check if a given message is valid for EVM - * @summary Evaluate an evm message to sign - * @param {MessageEvaluationRequest} messageEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async evaluateMessage(messageEvaluationRequest: MessageEvaluationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateMessage(messageEvaluationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.evaluateMessage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get an erc191 message by id - * @summary Info for a specific erc191 message - * @param {string} messageID The id of the erc191 message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getErc191MessageByID(messageID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getErc191MessageByID(messageID, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.getErc191MessageByID']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get an evm message by id - * @summary Info for a specific evm message - * @param {string} messageID The id of the evm message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMessageByID(messageID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageByID(messageID, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MessagesApi.getMessageByID']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * MessagesApi - factory interface - * @export - */ -export const MessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MessagesApiFp(configuration) - return { - /** - * Approve a pending erc191 message - * @summary Approve a pending erc191 message - * @param {MessagesApiApprovePendingERC191MessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingERC191Message(requestParameters: MessagesApiApprovePendingERC191MessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.approvePendingERC191Message(requestParameters.messageID, options).then((request) => request(axios, basePath)); - }, - /** - * Approve a pending evm message - * @summary Approve a pending evm message - * @param {MessagesApiApprovePendingMessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingMessage(requestParameters: MessagesApiApprovePendingMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.approvePendingMessage(requestParameters.messageID, options).then((request) => request(axios, basePath)); - }, - /** - * Check if a given erc191 message is valid - * @summary Evaluate an erc191 message to sign - * @param {MessagesApiEvaluateErc191MessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateErc191Message(requestParameters: MessagesApiEvaluateErc191MessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.evaluateErc191Message(requestParameters.eRC191MessageEvaluationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Check if a given message is valid for EVM - * @summary Evaluate an evm message to sign - * @param {MessagesApiEvaluateMessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateMessage(requestParameters: MessagesApiEvaluateMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.evaluateMessage(requestParameters.messageEvaluationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Get an erc191 message by id - * @summary Info for a specific erc191 message - * @param {MessagesApiGetErc191MessageByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getErc191MessageByID(requestParameters: MessagesApiGetErc191MessageByIDRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getErc191MessageByID(requestParameters.messageID, options).then((request) => request(axios, basePath)); - }, - /** - * Get an evm message by id - * @summary Info for a specific evm message - * @param {MessagesApiGetMessageByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMessageByID(requestParameters: MessagesApiGetMessageByIDRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMessageByID(requestParameters.messageID, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for approvePendingERC191Message operation in MessagesApi. - * @export - * @interface MessagesApiApprovePendingERC191MessageRequest - */ -export interface MessagesApiApprovePendingERC191MessageRequest { - /** - * id for the message - * @type {string} - * @memberof MessagesApiApprovePendingERC191Message - */ - readonly messageID: string -} - -/** - * Request parameters for approvePendingMessage operation in MessagesApi. - * @export - * @interface MessagesApiApprovePendingMessageRequest - */ -export interface MessagesApiApprovePendingMessageRequest { - /** - * id for the message - * @type {string} - * @memberof MessagesApiApprovePendingMessage - */ - readonly messageID: string -} - -/** - * Request parameters for evaluateErc191Message operation in MessagesApi. - * @export - * @interface MessagesApiEvaluateErc191MessageRequest - */ -export interface MessagesApiEvaluateErc191MessageRequest { - /** - * Specifies the kind of transaction - * @type {ERC191MessageEvaluationRequest} - * @memberof MessagesApiEvaluateErc191Message - */ - readonly eRC191MessageEvaluationRequest: ERC191MessageEvaluationRequest -} - -/** - * Request parameters for evaluateMessage operation in MessagesApi. - * @export - * @interface MessagesApiEvaluateMessageRequest - */ -export interface MessagesApiEvaluateMessageRequest { - /** - * Specifies the kind of transaction - * @type {MessageEvaluationRequest} - * @memberof MessagesApiEvaluateMessage - */ - readonly messageEvaluationRequest: MessageEvaluationRequest -} - -/** - * Request parameters for getErc191MessageByID operation in MessagesApi. - * @export - * @interface MessagesApiGetErc191MessageByIDRequest - */ -export interface MessagesApiGetErc191MessageByIDRequest { - /** - * The id of the erc191 message - * @type {string} - * @memberof MessagesApiGetErc191MessageByID - */ - readonly messageID: string -} - -/** - * Request parameters for getMessageByID operation in MessagesApi. - * @export - * @interface MessagesApiGetMessageByIDRequest - */ -export interface MessagesApiGetMessageByIDRequest { - /** - * The id of the evm message - * @type {string} - * @memberof MessagesApiGetMessageByID - */ - readonly messageID: string -} - -/** - * MessagesApi - object-oriented interface - * @export - * @class MessagesApi - * @extends {BaseAPI} - */ -export class MessagesApi extends BaseAPI { - /** - * Approve a pending erc191 message - * @summary Approve a pending erc191 message - * @param {MessagesApiApprovePendingERC191MessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public approvePendingERC191Message(requestParameters: MessagesApiApprovePendingERC191MessageRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).approvePendingERC191Message(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Approve a pending evm message - * @summary Approve a pending evm message - * @param {MessagesApiApprovePendingMessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public approvePendingMessage(requestParameters: MessagesApiApprovePendingMessageRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).approvePendingMessage(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Check if a given erc191 message is valid - * @summary Evaluate an erc191 message to sign - * @param {MessagesApiEvaluateErc191MessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public evaluateErc191Message(requestParameters: MessagesApiEvaluateErc191MessageRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).evaluateErc191Message(requestParameters.eRC191MessageEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Check if a given message is valid for EVM - * @summary Evaluate an evm message to sign - * @param {MessagesApiEvaluateMessageRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public evaluateMessage(requestParameters: MessagesApiEvaluateMessageRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).evaluateMessage(requestParameters.messageEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get an erc191 message by id - * @summary Info for a specific erc191 message - * @param {MessagesApiGetErc191MessageByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public getErc191MessageByID(requestParameters: MessagesApiGetErc191MessageByIDRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).getErc191MessageByID(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get an evm message by id - * @summary Info for a specific evm message - * @param {MessagesApiGetMessageByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MessagesApi - */ - public getMessageByID(requestParameters: MessagesApiGetMessageByIDRequest, options?: RawAxiosRequestConfig) { - return MessagesApiFp(this.configuration).getMessageByID(requestParameters.messageID, options).then((request) => request(this.axios, this.basePath)); - } -} - diff --git a/packages/internal/guardian/src/client/domain/transactions-api.ts b/packages/internal/guardian/src/client/domain/transactions-api.ts deleted file mode 100644 index f0c48e28d5..0000000000 --- a/packages/internal/guardian/src/client/domain/transactions-api.ts +++ /dev/null @@ -1,403 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from '../configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; -// @ts-ignore -import type { APIError400 } from '../models'; -// @ts-ignore -import type { APIError403 } from '../models'; -// @ts-ignore -import type { APIError404 } from '../models'; -// @ts-ignore -import type { APIError500 } from '../models'; -// @ts-ignore -import type { BasicAPIError } from '../models'; -// @ts-ignore -import type { Transaction } from '../models'; -// @ts-ignore -import type { TransactionApprovalRequest } from '../models'; -// @ts-ignore -import type { TransactionEvaluationRequest } from '../models'; -// @ts-ignore -import type { TransactionEvaluationResponse } from '../models'; -/** - * TransactionsApi - axios parameter creator - * @export - */ -export const TransactionsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Approve a pending transaction - * @summary Approve a pending transaction given chain - * @param {string} payloadHash Hash for the payload - * @param {TransactionApprovalRequest} transactionApprovalRequest request body for approving a pending transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingTransaction: async (payloadHash: string, transactionApprovalRequest: TransactionApprovalRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'payloadHash' is not null or undefined - assertParamExists('approvePendingTransaction', 'payloadHash', payloadHash) - // verify required parameter 'transactionApprovalRequest' is not null or undefined - assertParamExists('approvePendingTransaction', 'transactionApprovalRequest', transactionApprovalRequest) - const localVarPath = `/guardian/v1/transactions/{payloadHash}/approve` - .replace(`{${"payloadHash"}}`, encodeURIComponent(String(payloadHash))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionApprovalRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Check if the transaction is valid by transaction ID for both StarkEx and EVM - * @summary Evaluate a transaction - * @param {string} id Transaction identifier: payloadHash on StarkEx or EVM ID - * @param {TransactionEvaluationRequest} transactionEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateTransaction: async (id: string, transactionEvaluationRequest: TransactionEvaluationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('evaluateTransaction', 'id', id) - // verify required parameter 'transactionEvaluationRequest' is not null or undefined - assertParamExists('evaluateTransaction', 'transactionEvaluationRequest', transactionEvaluationRequest) - const localVarPath = `/guardian/v1/transactions/{id}/evaluate` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionEvaluationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a transaction by payload hash - * @summary Info for a specific transaction - * @param {string} transactionID The id of the starkex transaction to retrieve - * @param {GetTransactionByIDChainTypeEnum} chainType roll up type - * @param {string} [chainID] ID of evm chain - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionByID: async (transactionID: string, chainType: GetTransactionByIDChainTypeEnum, chainID?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionID' is not null or undefined - assertParamExists('getTransactionByID', 'transactionID', transactionID) - // verify required parameter 'chainType' is not null or undefined - assertParamExists('getTransactionByID', 'chainType', chainType) - const localVarPath = `/guardian/v1/transactions/{transactionID}` - .replace(`{${"transactionID"}}`, encodeURIComponent(String(transactionID))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (chainType !== undefined) { - localVarQueryParameter['chainType'] = chainType; - } - - if (chainID !== undefined) { - localVarQueryParameter['chainID'] = chainID; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * TransactionsApi - functional programming interface - * @export - */ -export const TransactionsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration) - return { - /** - * Approve a pending transaction - * @summary Approve a pending transaction given chain - * @param {string} payloadHash Hash for the payload - * @param {TransactionApprovalRequest} transactionApprovalRequest request body for approving a pending transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async approvePendingTransaction(payloadHash: string, transactionApprovalRequest: TransactionApprovalRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.approvePendingTransaction(payloadHash, transactionApprovalRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransactionsApi.approvePendingTransaction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Check if the transaction is valid by transaction ID for both StarkEx and EVM - * @summary Evaluate a transaction - * @param {string} id Transaction identifier: payloadHash on StarkEx or EVM ID - * @param {TransactionEvaluationRequest} transactionEvaluationRequest Specifies the kind of transaction - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async evaluateTransaction(id: string, transactionEvaluationRequest: TransactionEvaluationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateTransaction(id, transactionEvaluationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransactionsApi.evaluateTransaction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get a transaction by payload hash - * @summary Info for a specific transaction - * @param {string} transactionID The id of the starkex transaction to retrieve - * @param {GetTransactionByIDChainTypeEnum} chainType roll up type - * @param {string} [chainID] ID of evm chain - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTransactionByID(transactionID: string, chainType: GetTransactionByIDChainTypeEnum, chainID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionByID(transactionID, chainType, chainID, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransactionsApi.getTransactionByID']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * TransactionsApi - factory interface - * @export - */ -export const TransactionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TransactionsApiFp(configuration) - return { - /** - * Approve a pending transaction - * @summary Approve a pending transaction given chain - * @param {TransactionsApiApprovePendingTransactionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approvePendingTransaction(requestParameters: TransactionsApiApprovePendingTransactionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.approvePendingTransaction(requestParameters.payloadHash, requestParameters.transactionApprovalRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Check if the transaction is valid by transaction ID for both StarkEx and EVM - * @summary Evaluate a transaction - * @param {TransactionsApiEvaluateTransactionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - evaluateTransaction(requestParameters: TransactionsApiEvaluateTransactionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.evaluateTransaction(requestParameters.id, requestParameters.transactionEvaluationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Get a transaction by payload hash - * @summary Info for a specific transaction - * @param {TransactionsApiGetTransactionByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionByID(requestParameters: TransactionsApiGetTransactionByIDRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTransactionByID(requestParameters.transactionID, requestParameters.chainType, requestParameters.chainID, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for approvePendingTransaction operation in TransactionsApi. - * @export - * @interface TransactionsApiApprovePendingTransactionRequest - */ -export interface TransactionsApiApprovePendingTransactionRequest { - /** - * Hash for the payload - * @type {string} - * @memberof TransactionsApiApprovePendingTransaction - */ - readonly payloadHash: string - - /** - * request body for approving a pending transaction - * @type {TransactionApprovalRequest} - * @memberof TransactionsApiApprovePendingTransaction - */ - readonly transactionApprovalRequest: TransactionApprovalRequest -} - -/** - * Request parameters for evaluateTransaction operation in TransactionsApi. - * @export - * @interface TransactionsApiEvaluateTransactionRequest - */ -export interface TransactionsApiEvaluateTransactionRequest { - /** - * Transaction identifier: payloadHash on StarkEx or EVM ID - * @type {string} - * @memberof TransactionsApiEvaluateTransaction - */ - readonly id: string - - /** - * Specifies the kind of transaction - * @type {TransactionEvaluationRequest} - * @memberof TransactionsApiEvaluateTransaction - */ - readonly transactionEvaluationRequest: TransactionEvaluationRequest -} - -/** - * Request parameters for getTransactionByID operation in TransactionsApi. - * @export - * @interface TransactionsApiGetTransactionByIDRequest - */ -export interface TransactionsApiGetTransactionByIDRequest { - /** - * The id of the starkex transaction to retrieve - * @type {string} - * @memberof TransactionsApiGetTransactionByID - */ - readonly transactionID: string - - /** - * roll up type - * @type {'starkex' | 'evm'} - * @memberof TransactionsApiGetTransactionByID - */ - readonly chainType: GetTransactionByIDChainTypeEnum - - /** - * ID of evm chain - * @type {string} - * @memberof TransactionsApiGetTransactionByID - */ - readonly chainID?: string -} - -/** - * TransactionsApi - object-oriented interface - * @export - * @class TransactionsApi - * @extends {BaseAPI} - */ -export class TransactionsApi extends BaseAPI { - /** - * Approve a pending transaction - * @summary Approve a pending transaction given chain - * @param {TransactionsApiApprovePendingTransactionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionsApi - */ - public approvePendingTransaction(requestParameters: TransactionsApiApprovePendingTransactionRequest, options?: RawAxiosRequestConfig) { - return TransactionsApiFp(this.configuration).approvePendingTransaction(requestParameters.payloadHash, requestParameters.transactionApprovalRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Check if the transaction is valid by transaction ID for both StarkEx and EVM - * @summary Evaluate a transaction - * @param {TransactionsApiEvaluateTransactionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionsApi - */ - public evaluateTransaction(requestParameters: TransactionsApiEvaluateTransactionRequest, options?: RawAxiosRequestConfig) { - return TransactionsApiFp(this.configuration).evaluateTransaction(requestParameters.id, requestParameters.transactionEvaluationRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a transaction by payload hash - * @summary Info for a specific transaction - * @param {TransactionsApiGetTransactionByIDRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionsApi - */ - public getTransactionByID(requestParameters: TransactionsApiGetTransactionByIDRequest, options?: RawAxiosRequestConfig) { - return TransactionsApiFp(this.configuration).getTransactionByID(requestParameters.transactionID, requestParameters.chainType, requestParameters.chainID, options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const GetTransactionByIDChainTypeEnum = { - Starkex: 'starkex', - Evm: 'evm' -} as const; -export type GetTransactionByIDChainTypeEnum = typeof GetTransactionByIDChainTypeEnum[keyof typeof GetTransactionByIDChainTypeEnum]; diff --git a/packages/internal/guardian/src/client/git_push.sh b/packages/internal/guardian/src/client/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/packages/internal/guardian/src/client/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/internal/guardian/src/client/index.ts b/packages/internal/guardian/src/client/index.ts deleted file mode 100644 index 6b1eb2b01a..0000000000 --- a/packages/internal/guardian/src/client/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; -export * from "./models"; diff --git a/packages/internal/guardian/src/client/models/apierror500.ts b/packages/internal/guardian/src/client/models/apierror500.ts deleted file mode 100644 index b0bd770405..0000000000 --- a/packages/internal/guardian/src/client/models/apierror500.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import type { BasicAPIError } from './basic-apierror'; - -/** - * @type APIError500 - * @export - */ -export type APIError500 = BasicAPIError; - - diff --git a/packages/internal/guardian/src/client/models/basic-apierror.ts b/packages/internal/guardian/src/client/models/basic-apierror.ts deleted file mode 100644 index f599b4de6b..0000000000 --- a/packages/internal/guardian/src/client/models/basic-apierror.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface BasicAPIError - */ -export interface BasicAPIError { - /** - * Error Message - * @type {string} - * @memberof BasicAPIError - */ - 'message': string; - /** - * Link to IMX documentation that can help resolve this error - * @type {string} - * @memberof BasicAPIError - */ - 'link': string; - /** - * Trace ID of the initial request - * @type {string} - * @memberof BasicAPIError - */ - 'trace_id': string; -} - diff --git a/packages/internal/guardian/src/client/models/eip712-message-domain.ts b/packages/internal/guardian/src/client/models/eip712-message-domain.ts deleted file mode 100644 index f2ecb13d11..0000000000 --- a/packages/internal/guardian/src/client/models/eip712-message-domain.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface EIP712MessageDomain - */ -export interface EIP712MessageDomain { - /** - * - * @type {string} - * @memberof EIP712MessageDomain - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof EIP712MessageDomain - */ - 'version'?: string; - /** - * - * @type {number} - * @memberof EIP712MessageDomain - */ - 'chainId'?: number; - /** - * - * @type {string} - * @memberof EIP712MessageDomain - */ - 'verifyingContract'?: string; - /** - * - * @type {string} - * @memberof EIP712MessageDomain - */ - 'salt'?: string; -} - diff --git a/packages/internal/guardian/src/client/models/eip712-message-types-eip712-domain-inner.ts b/packages/internal/guardian/src/client/models/eip712-message-types-eip712-domain-inner.ts deleted file mode 100644 index c774bee81b..0000000000 --- a/packages/internal/guardian/src/client/models/eip712-message-types-eip712-domain-inner.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface EIP712MessageTypesEIP712DomainInner - */ -export interface EIP712MessageTypesEIP712DomainInner { - /** - * - * @type {string} - * @memberof EIP712MessageTypesEIP712DomainInner - */ - 'name': string; - /** - * - * @type {string} - * @memberof EIP712MessageTypesEIP712DomainInner - */ - 'type': string; -} - diff --git a/packages/internal/guardian/src/client/models/eip712-message-types.ts b/packages/internal/guardian/src/client/models/eip712-message-types.ts deleted file mode 100644 index 9b4554f386..0000000000 --- a/packages/internal/guardian/src/client/models/eip712-message-types.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import type { EIP712MessageTypesEIP712DomainInner } from './eip712-message-types-eip712-domain-inner'; - -/** - * - * @export - * @interface EIP712MessageTypes - */ -export interface EIP712MessageTypes { - [key: string]: Array | any; - - /** - * - * @type {Array} - * @memberof EIP712MessageTypes - */ - 'EIP712Domain': Array; -} - diff --git a/packages/internal/guardian/src/client/models/eip712-message.ts b/packages/internal/guardian/src/client/models/eip712-message.ts deleted file mode 100644 index 35b3937a8d..0000000000 --- a/packages/internal/guardian/src/client/models/eip712-message.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import type { EIP712MessageDomain } from './eip712-message-domain'; -// May contain unused imports in some cases -// @ts-ignore -import type { EIP712MessageTypes } from './eip712-message-types'; - -/** - * - * @export - * @interface EIP712Message - */ -export interface EIP712Message { - /** - * - * @type {EIP712MessageTypes} - * @memberof EIP712Message - */ - 'types': EIP712MessageTypes; - /** - * - * @type {string} - * @memberof EIP712Message - */ - 'primaryType': string; - /** - * - * @type {EIP712MessageDomain} - * @memberof EIP712Message - */ - 'domain': EIP712MessageDomain; - /** - * - * @type {object} - * @memberof EIP712Message - */ - 'message': object; -} - diff --git a/packages/internal/guardian/src/client/models/index.ts b/packages/internal/guardian/src/client/models/index.ts deleted file mode 100644 index f478801b35..0000000000 --- a/packages/internal/guardian/src/client/models/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -export * from './apierror400'; -export * from './apierror403'; -export * from './apierror404'; -export * from './apierror500'; -export * from './basic-apierror'; -export * from './eip712-message'; -export * from './eip712-message-domain'; -export * from './eip712-message-types'; -export * from './eip712-message-types-eip712-domain-inner'; -export * from './erc191-message-evaluation-request'; -export * from './evmmessage'; -export * from './erc191-message-response'; -export * from './message-evaluation-request'; -export * from './message-evaluation-response'; -export * from './meta-transaction'; -export * from './meta-transaction-data'; -export * from './transaction'; -export * from './transaction-approval-request'; -export * from './transaction-evaluation-request'; -export * from './transaction-evaluation-response'; -export * from './zk-evm-transaction-data'; -export * from './zk-evm-transaction-evaluation-request'; diff --git a/packages/internal/guardian/src/index.ts b/packages/internal/guardian/src/index.ts deleted file mode 100644 index 79282a0901..0000000000 --- a/packages/internal/guardian/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Swagger Guardian - * Guardian API - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./client/api"; -export * from "./client/configuration"; -export * from "./client/models"; diff --git a/packages/internal/guardian/tsconfig.json b/packages/internal/guardian/tsconfig.json deleted file mode 100644 index b609792807..0000000000 --- a/packages/internal/guardian/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist", - "rootDirs": ["src"], - "customConditions": ["development"] - }, - "include": [ - "src" - ], - "exclude": ["node_modules", - "dist" - ] -} diff --git a/packages/internal/metrics/package.json b/packages/internal/metrics/package.json index 9d9ffd4666..d420e5855c 100644 --- a/packages/internal/metrics/package.json +++ b/packages/internal/metrics/package.json @@ -19,7 +19,7 @@ "jest-environment-jsdom": "^29.4.3", "rollup": "^4.19.1", "ts-jest": "^29.1.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/internal/toolkit/package.json b/packages/internal/toolkit/package.json index 11bd2fb9eb..4d7bc46a4b 100644 --- a/packages/internal/toolkit/package.json +++ b/packages/internal/toolkit/package.json @@ -35,7 +35,7 @@ "prettier": "^2.8.7", "rollup": "^4.19.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/minting-backend/sdk/package.json b/packages/minting-backend/sdk/package.json index 624feccf5b..622f7e5688 100644 --- a/packages/minting-backend/sdk/package.json +++ b/packages/minting-backend/sdk/package.json @@ -25,7 +25,7 @@ "rollup": "^4.19.1", "testcontainers": "^10.9.0", "ts-mockito": "^2.6.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "exports": { diff --git a/packages/orderbook/package.json b/packages/orderbook/package.json index 8aa287a583..f09f622f5e 100644 --- a/packages/orderbook/package.json +++ b/packages/orderbook/package.json @@ -26,7 +26,7 @@ "rollup": "^4.19.1", "ts-mockito": "^2.6.1", "typechain": "^8.1.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "exports": { diff --git a/packages/passport/sdk-sample-app/next.config.js b/packages/passport/sdk-sample-app/next.config.js index df318b8450..6f4b2c2c11 100644 --- a/packages/passport/sdk-sample-app/next.config.js +++ b/packages/passport/sdk-sample-app/next.config.js @@ -15,6 +15,7 @@ const nextConfig = { typescript: { tsconfigPath: './tsconfig.build.json', }, + output: 'export', reactStrictMode: true, }; diff --git a/packages/passport/sdk-sample-app/package.json b/packages/passport/sdk-sample-app/package.json index 42b57164fb..e5acdca042 100644 --- a/packages/passport/sdk-sample-app/package.json +++ b/packages/passport/sdk-sample-app/package.json @@ -17,7 +17,7 @@ "embla-carousel-react": "^8.1.5", "ethers": "^5.7.2", "framer-motion": "^11.0.6", - "next": "13.4.11", + "next": "14.2.10", "react": "^18.2.0", "react-bootstrap": "^2.7.2", "react-dom": "^18.2.0" @@ -33,14 +33,13 @@ "concurrently": "^8.2.2", "eslint": "^8.40.0", "eslint-config-next": "13.3.1", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "private": true, "scripts": { "build": "next build", "dev": "next dev", "dev-with-sdk": "concurrently 'yarn dev' 'yarn run --top-level dev @imtbl/passport'", - "export": "next export", "lint": "eslint ./src --ext .ts --max-warnings=0", "start": "next start", "update-sdk-version": "scripts/updateSdkVersion.sh ./out" diff --git a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/DefaultTransaction.tsx b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/DefaultTransaction.tsx index d2f0323371..1d43cc11b0 100644 --- a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/DefaultTransaction.tsx +++ b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/DefaultTransaction.tsx @@ -34,7 +34,7 @@ function ShowGenericConfirmationScreen({ disabled, handleExampleSubmitted }: Req setParams([{ from: fromAddress, to: toAddress, - data: encUtils.utf8ToHex(data, true), + data: data.startsWith('0x') ? data : encUtils.utf8ToHex(data, true), }]); } catch (err) { setDataError(emptyDataError); diff --git a/packages/passport/sdk/package.json b/packages/passport/sdk/package.json index 18fa3e0ef3..0da4ff5e84 100644 --- a/packages/passport/sdk/package.json +++ b/packages/passport/sdk/package.json @@ -10,7 +10,6 @@ "@ethersproject/providers": "^5.7.2", "@imtbl/config": "0.0.0", "@imtbl/generated-clients": "0.0.0", - "@imtbl/guardian": "0.0.0", "@imtbl/metrics": "0.0.0", "@imtbl/toolkit": "0.0.0", "@imtbl/x-client": "0.0.0", @@ -47,7 +46,7 @@ "prettier": "^2.8.7", "rollup": "^4.19.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/passport/sdk/src/Passport.ts b/packages/passport/sdk/src/Passport.ts index 1c4c10a969..3c389dc7df 100644 --- a/packages/passport/sdk/src/Passport.ts +++ b/packages/passport/sdk/src/Passport.ts @@ -69,6 +69,7 @@ export const buildPrivateVars = (passportModuleConfiguration: PassportModuleConf confirmationScreen, config, authManager, + guardianApi: multiRollupApiClients.guardianApi, }); const imxApiClients = buildImxApiClients(passportModuleConfiguration); diff --git a/packages/passport/sdk/src/confirmation/confirmation.test.ts b/packages/passport/sdk/src/confirmation/confirmation.test.ts index e6d1b4f78a..8d9a9badf2 100644 --- a/packages/passport/sdk/src/confirmation/confirmation.test.ts +++ b/packages/passport/sdk/src/confirmation/confirmation.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { TransactionApprovalRequestChainTypeEnum } from '@imtbl/guardian'; +import * as GeneratedClients from '@imtbl/generated-clients'; import { Environment, ImmutableConfiguration } from '@imtbl/config'; import ConfirmationScreen from './confirmation'; import SpyInstance = jest.SpyInstance; @@ -79,7 +79,7 @@ describe('confirmation', () => { const res = await confirmationScreen.requestConfirmation( transactionId, mockEtherAddress, - TransactionApprovalRequestChainTypeEnum.Starkex, + GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Starkex, ); expect(res.confirmed).toEqual(false); @@ -104,7 +104,7 @@ describe('confirmation', () => { await confirmationScreen.requestConfirmation( transactionId, mockEtherAddress, - TransactionApprovalRequestChainTypeEnum.Starkex, + GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Starkex, ); expect(postMessageMock).toHaveBeenCalledTimes(1); @@ -134,7 +134,7 @@ describe('confirmation', () => { const res = await confirmationScreen.requestConfirmation( transactionId, mockEtherAddress, - TransactionApprovalRequestChainTypeEnum.Starkex, + GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Starkex, ); expect(res.confirmed).toEqual(false); diff --git a/packages/passport/sdk/src/confirmation/confirmation.ts b/packages/passport/sdk/src/confirmation/confirmation.ts index 1023d16d3b..2680c3a00b 100644 --- a/packages/passport/sdk/src/confirmation/confirmation.ts +++ b/packages/passport/sdk/src/confirmation/confirmation.ts @@ -1,4 +1,4 @@ -import { TransactionApprovalRequestChainTypeEnum } from '@imtbl/guardian'; +import * as GeneratedClients from '@imtbl/generated-clients'; import { trackError } from '@imtbl/metrics'; import { @@ -60,7 +60,7 @@ export default class ConfirmationScreen { requestConfirmation( transactionId: string, etherAddress: string, - chainType: TransactionApprovalRequestChainTypeEnum, + chainType: GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum, chainId?: string, ): Promise { return new Promise((resolve, reject) => { @@ -102,7 +102,7 @@ export default class ConfirmationScreen { }; let href = ''; - if (chainType === TransactionApprovalRequestChainTypeEnum.Starkex) { + if (chainType === GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Starkex) { href = this.getHref('transaction', { transactionId, etherAddress, chainType }); } else { href = this.getHref('zkevm/transaction', { diff --git a/packages/passport/sdk/src/guardian/index.test.ts b/packages/passport/sdk/src/guardian/index.test.ts index f8c332680b..ffed074b3e 100644 --- a/packages/passport/sdk/src/guardian/index.test.ts +++ b/packages/passport/sdk/src/guardian/index.test.ts @@ -1,4 +1,4 @@ -import * as guardian from '@imtbl/guardian'; +import * as GeneratedClients from '@imtbl/generated-clients'; import { TransactionRequest } from '@ethersproject/providers'; import { ImmutableConfiguration } from '@imtbl/config'; import { ConfirmationScreen } from '../confirmation'; @@ -9,7 +9,6 @@ import { JsonRpcError, RpcErrorCode } from '../zkEvm/JsonRpcError'; import { PassportConfiguration } from '../config'; import { ChainId } from '../network/chains'; -jest.mock('@imtbl/guardian'); jest.mock('../confirmation/confirmation'); describe('Guardian', () => { @@ -24,8 +23,14 @@ describe('Guardian', () => { const mockConfirmationScreen = new ConfirmationScreen({} as any); - const getGuardianClient = (crossSdkBridgeEnabled: boolean = false) => ( - new GuardianClient({ + const getGuardianClient = (crossSdkBridgeEnabled: boolean = false) => { + const guardianApi = { + getTransactionByID: mockGetTransactionByID, + evaluateTransaction: mockEvaluateTransaction, + evaluateMessage: mockEvaluateMessage, + evaluateErc191Message: mockEvaluateErc191Message, + } as Partial; + return new GuardianClient({ confirmationScreen: mockConfirmationScreen, config: new PassportConfiguration({ baseConfig: {} as ImmutableConfiguration, @@ -38,8 +43,9 @@ describe('Guardian', () => { getUserImx: getUserImxMock, getUserZkEvm: getUserZkEvmMock, } as unknown as AuthManager, - }) - ); + guardianApi: guardianApi as GeneratedClients.mr.GuardianApi, + }); + }; beforeEach(() => { mockGetTransactionByID = jest.fn(); @@ -49,14 +55,6 @@ describe('Guardian', () => { getUserImxMock = jest.fn().mockReturnValue(mockUserImx); getUserZkEvmMock = jest.fn().mockReturnValue(mockUserZkEvm); - (guardian.TransactionsApi as jest.Mock).mockImplementation(() => ({ - getTransactionByID: mockGetTransactionByID, - evaluateTransaction: mockEvaluateTransaction, - })); - (guardian.MessagesApi as jest.Mock).mockImplementation(() => ({ - evaluateMessage: mockEvaluateMessage, - evaluateErc191Message: mockEvaluateErc191Message, - })); }); describe('evaluateImxTransaction', () => { @@ -299,7 +297,7 @@ describe('Guardian', () => { }); describe('evaluateEIP712Message', () => { - const mockPayload = { chainID: '0x1234', payload: {} as guardian.EIP712Message, user: mockUserZkEvm }; + const mockPayload = { chainID: '0x1234', payload: {} as GeneratedClients.mr.EIP712Message, user: mockUserZkEvm }; it('surfaces error message if message evaluation fails', async () => { mockEvaluateMessage.mockRejectedValueOnce(new Error('401: Unauthorized')); diff --git a/packages/passport/sdk/src/guardian/index.ts b/packages/passport/sdk/src/guardian/index.ts index 41d6f8b9e2..ac27dfe078 100644 --- a/packages/passport/sdk/src/guardian/index.ts +++ b/packages/passport/sdk/src/guardian/index.ts @@ -1,5 +1,4 @@ -import * as guardian from '@imtbl/guardian'; -import { TransactionApprovalRequestChainTypeEnum, TransactionEvaluationResponse } from '@imtbl/guardian'; +import * as GeneratedClients from '@imtbl/generated-clients'; import { BigNumber, ethers } from 'ethers'; import AuthManager from '../authManager'; import { ConfirmationScreen } from '../confirmation'; @@ -13,6 +12,7 @@ export type GuardianClientParams = { confirmationScreen: ConfirmationScreen; config: PassportConfiguration; authManager: AuthManager; + guardianApi: GeneratedClients.mr.GuardianApi; }; export type GuardianEvaluateImxTransactionParams = { @@ -44,7 +44,7 @@ export const convertBigNumberishToString = ( const transformGuardianTransactions = ( txs: MetaTransaction[], -): guardian.MetaTransaction[] => { +): GeneratedClients.mr.MetaTransaction[] => { try { return txs.map((t) => ({ delegateCall: t.delegateCall === true, @@ -64,9 +64,7 @@ const transformGuardianTransactions = ( }; export default class GuardianClient { - private readonly transactionAPI: guardian.TransactionsApi; - - private readonly messageAPI: guardian.MessagesApi; + private readonly guardianApi: GeneratedClients.mr.GuardianApi; private readonly confirmationScreen: ConfirmationScreen; @@ -74,12 +72,12 @@ export default class GuardianClient { private readonly authManager: AuthManager; - constructor({ confirmationScreen, config, authManager }: GuardianClientParams) { - const guardianConfiguration = new guardian.Configuration({ basePath: config.imxPublicApiDomain }); + constructor({ + confirmationScreen, config, authManager, guardianApi, + }: GuardianClientParams) { this.confirmationScreen = confirmationScreen; this.crossSdkBridgeEnabled = config.crossSdkBridgeEnabled; - this.messageAPI = new guardian.MessagesApi(guardianConfiguration); - this.transactionAPI = new guardian.TransactionsApi(guardianConfiguration); + this.guardianApi = guardianApi; this.authManager = authManager; } @@ -122,7 +120,7 @@ export default class GuardianClient { const headers = { Authorization: `Bearer ${user.accessToken}` }; const transactionRes = await retryWithDelay( - async () => this.transactionAPI.getTransactionByID({ + async () => this.guardianApi.getTransactionByID({ transactionID: payloadHash, chainType: 'starkex', }, { headers }), @@ -133,7 +131,7 @@ export default class GuardianClient { throw new Error("Transaction doesn't exists"); } - const evaluateImxRes = await this.transactionAPI.evaluateTransaction({ + const evaluateImxRes = await this.guardianApi.evaluateTransaction({ id: payloadHash, transactionEvaluationRequest: { chainType: 'starkex', @@ -149,7 +147,7 @@ export default class GuardianClient { const confirmationResult = await this.confirmationScreen.requestConfirmation( payloadHash, user.imx.ethAddress, - TransactionApprovalRequestChainTypeEnum.Starkex, + GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Starkex, ); if (!confirmationResult.confirmed) { @@ -164,12 +162,12 @@ export default class GuardianClient { chainId, nonce, metaTransactions, - }: GuardianEVMTxnEvaluationParams): Promise { + }: GuardianEVMTxnEvaluationParams): Promise { const user = await this.authManager.getUserZkEvm(); const headers = { Authorization: `Bearer ${user.accessToken}` }; const guardianTransactions = transformGuardianTransactions(metaTransactions); try { - const response = await this.transactionAPI.evaluateTransaction( + const response = await this.guardianApi.evaluateTransaction( { id: 'evm', transactionEvaluationRequest: { @@ -219,7 +217,7 @@ export default class GuardianClient { const confirmationResult = await this.confirmationScreen.requestConfirmation( transactionId, user.zkEvm.ethAddress, - TransactionApprovalRequestChainTypeEnum.Evm, + GeneratedClients.mr.TransactionApprovalRequestChainTypeEnum.Evm, chainId, ); @@ -236,7 +234,7 @@ export default class GuardianClient { private async handleEIP712MessageEvaluation( { chainID, payload }: GuardianEIP712MessageEvaluationParams, - ): Promise { + ): Promise { try { const user = await this.authManager.getUserZkEvm(); if (user === null) { @@ -245,7 +243,7 @@ export default class GuardianClient { 'User not logged in. Please log in first.', ); } - const messageEvalResponse = await this.messageAPI.evaluateMessage( + const messageEvalResponse = await this.guardianApi.evaluateMessage( { messageEvaluationRequest: { chainID, payload } }, { headers: { Authorization: `Bearer ${user.accessToken}` } }, ); @@ -285,7 +283,7 @@ export default class GuardianClient { private async handleERC191MessageEvaluation( { chainID, payload }: GuardianERC191MessageEvaluationParams, - ): Promise { + ): Promise { try { const user = await this.authManager.getUserZkEvm(); if (user === null) { @@ -294,7 +292,7 @@ export default class GuardianClient { 'User not logged in. Please log in first.', ); } - const messageEvalResponse = await this.messageAPI.evaluateErc191Message( + const messageEvalResponse = await this.guardianApi.evaluateErc191Message( { eRC191MessageEvaluationRequest: { chainID: getEip155ChainId(chainID), diff --git a/packages/webhook/sdk/package.json b/packages/webhook/sdk/package.json index 63fd7fda9e..95b92a1999 100644 --- a/packages/webhook/sdk/package.json +++ b/packages/webhook/sdk/package.json @@ -23,7 +23,7 @@ "rollup": "^4.19.1", "ts-mockito": "^2.6.1", "typechain": "^8.1.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "exports": { diff --git a/packages/x-client/package.json b/packages/x-client/package.json index b300e2efdd..7d2480f19a 100644 --- a/packages/x-client/package.json +++ b/packages/x-client/package.json @@ -29,7 +29,7 @@ "jest": "^29.4.3", "jest-environment-jsdom": "^29.4.3", "rollup": "^4.19.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/x-provider/package.json b/packages/x-provider/package.json index fb5bff6e3a..b16ece6753 100644 --- a/packages/x-provider/package.json +++ b/packages/x-provider/package.json @@ -33,7 +33,7 @@ "prettier": "^2.8.7", "rollup": "^4.19.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "unplugin-swc": "^1.5.1" }, "engines": { diff --git a/packages/x-provider/src/sample-app/package.json b/packages/x-provider/src/sample-app/package.json index 4537d0c132..4f691bd329 100644 --- a/packages/x-provider/src/sample-app/package.json +++ b/packages/x-provider/src/sample-app/package.json @@ -26,7 +26,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "web-vitals": "^2.1.4" }, "devDependencies": { diff --git a/sdk/package.json b/sdk/package.json index 4b6e233cb2..c8c7228bf9 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -70,7 +70,6 @@ "@imtbl/config": "0.0.0", "@imtbl/cryptofiat": "0.0.0", "@imtbl/generated-clients": "0.0.0", - "@imtbl/guardian": "0.0.0", "@imtbl/minting-backend": "0.0.0", "@imtbl/orderbook": "0.0.0", "@imtbl/passport": "0.0.0", @@ -91,7 +90,7 @@ "rollup-plugin-dts": "^6.1.1", "rollup-plugin-polyfill-node": "^0.13.0", "semver": "^7.4.0", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "engines": { "node": ">=20.0.0" diff --git a/tests/func-tests/imx/package.json b/tests/func-tests/imx/package.json index c7f68c0687..892dd7d33d 100644 --- a/tests/func-tests/imx/package.json +++ b/tests/func-tests/imx/package.json @@ -15,7 +15,7 @@ "pinst": "^3.0.0", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "resolutions": { "@openzeppelin/contracts": "3.4.2-solc-0.7" diff --git a/tests/func-tests/zkevm/package.json b/tests/func-tests/zkevm/package.json index 3b2f35f130..35ee3464a8 100644 --- a/tests/func-tests/zkevm/package.json +++ b/tests/func-tests/zkevm/package.json @@ -27,7 +27,7 @@ "pinst": "^3.0.0", "ts-jest": "^29.1.1", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "scripts": { "compile": "npx hardhat compile", diff --git a/yarn.lock b/yarn.lock index 106f2a44fe..fdd31dfcf1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3252,163 +3252,163 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/aix-ppc64@npm:0.20.2" +"@esbuild/aix-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/aix-ppc64@npm:0.21.5" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-arm64@npm:0.20.2" +"@esbuild/android-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm64@npm:0.21.5" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-arm@npm:0.20.2" +"@esbuild/android-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm@npm:0.21.5" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-x64@npm:0.20.2" +"@esbuild/android-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-x64@npm:0.21.5" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/darwin-arm64@npm:0.20.2" +"@esbuild/darwin-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-arm64@npm:0.21.5" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/darwin-x64@npm:0.20.2" +"@esbuild/darwin-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-x64@npm:0.21.5" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/freebsd-arm64@npm:0.20.2" +"@esbuild/freebsd-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-arm64@npm:0.21.5" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/freebsd-x64@npm:0.20.2" +"@esbuild/freebsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-x64@npm:0.21.5" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-arm64@npm:0.20.2" +"@esbuild/linux-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm64@npm:0.21.5" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-arm@npm:0.20.2" +"@esbuild/linux-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm@npm:0.21.5" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-ia32@npm:0.20.2" +"@esbuild/linux-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ia32@npm:0.21.5" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-loong64@npm:0.20.2" +"@esbuild/linux-loong64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-loong64@npm:0.21.5" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-mips64el@npm:0.20.2" +"@esbuild/linux-mips64el@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-mips64el@npm:0.21.5" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-ppc64@npm:0.20.2" +"@esbuild/linux-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ppc64@npm:0.21.5" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-riscv64@npm:0.20.2" +"@esbuild/linux-riscv64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-riscv64@npm:0.21.5" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-s390x@npm:0.20.2" +"@esbuild/linux-s390x@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-s390x@npm:0.21.5" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-x64@npm:0.20.2" +"@esbuild/linux-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-x64@npm:0.21.5" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/netbsd-x64@npm:0.20.2" +"@esbuild/netbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/netbsd-x64@npm:0.21.5" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/openbsd-x64@npm:0.20.2" +"@esbuild/openbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/openbsd-x64@npm:0.21.5" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/sunos-x64@npm:0.20.2" +"@esbuild/sunos-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/sunos-x64@npm:0.21.5" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-arm64@npm:0.20.2" +"@esbuild/win32-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-arm64@npm:0.21.5" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-ia32@npm:0.20.2" +"@esbuild/win32-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-ia32@npm:0.21.5" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-x64@npm:0.20.2" +"@esbuild/win32-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-x64@npm:0.21.5" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3956,7 +3956,7 @@ __metadata: next: 14.2.7 react: ^18 react-dom: ^18 - typescript: ^5 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -3976,7 +3976,7 @@ __metadata: next: 14.2.7 react: ^18 react-dom: ^18 - typescript: ^5 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -3997,7 +3997,7 @@ __metadata: react: ^18.2.0 react-dom: ^18.2.0 tailwindcss: ^3.4.6 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -4017,7 +4017,7 @@ __metadata: next: 14.2.7 react: ^18 react-dom: ^18 - typescript: ^5 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -4037,7 +4037,7 @@ __metadata: next: 14.2.7 react: ^18 react-dom: ^18 - typescript: ^5 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -4055,12 +4055,12 @@ __metadata: eslint: ^8 eslint-config-next: 14.2.5 ethers: ^5.7.2 - next: 14.2.5 + next: 14.2.10 postcss: ^8 react: ^18.2.0 react-dom: ^18.2.0 tailwindcss: ^3.4.1 - typescript: ^5.5.4 + typescript: ^5.6.2 wagmi: ^2.11.3 languageName: unknown linkType: soft @@ -4084,7 +4084,7 @@ __metadata: react: ^18.2.0 react-dom: ^18.2.0 tailwindcss: ^3.4.1 - typescript: ^5.5.4 + typescript: ^5.6.2 wagmi: ^2.11.3 languageName: unknown linkType: soft @@ -4101,12 +4101,12 @@ __metadata: autoprefixer: ^10.4.19 eslint: ^8 eslint-config-next: 14.2.5 - next: 14.2.5 + next: 14.2.10 postcss: ^8.4.39 react: ^18.2.0 react-dom: ^18.2.0 tailwindcss: ^3.4.6 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -4189,7 +4189,7 @@ __metadata: rollup: ^4.19.1 ts-mockito: ^2.6.1 typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4218,7 +4218,7 @@ __metadata: rollup: ^4.19.1 ts-node: ^10.9.1 typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4256,7 +4256,7 @@ __metadata: react-router-dom: ^6.11.0 react-scripts: 5.0.1 stream-browserify: ^3.0.0 - typescript: ^5.5.4 + typescript: ^5.6.2 web-vitals: ^2.1.4 languageName: unknown linkType: soft @@ -4299,7 +4299,7 @@ __metadata: text-encoding: ^0.7.0 typedoc: ^0.26.5 typedoc-plugin-markdown: ^4.2.3 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 uuid: ^8.3.2 languageName: unknown @@ -4330,9 +4330,9 @@ __metadata: react: ^18.2.0 react-dom: ^18.2.0 react-router-dom: ^6.11.0 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 - vite: ^5.0.12 + vite: ^5.2.14 vite-plugin-node-polyfills: ^0.16.0 web-vitals: ^2.1.4 languageName: unknown @@ -4397,7 +4397,7 @@ __metadata: stream-browserify: ^3.0.0 stream-http: ^3.2.0 ts-jest: ^29.1.0 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 url: ^0.11.0 web-vitals: ^2.1.4 @@ -4422,7 +4422,7 @@ __metadata: prettier: ^2.8.7 rollup: ^4.19.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4467,7 +4467,7 @@ __metadata: prettier: ^2.8.7 rollup: ^4.19.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4494,33 +4494,7 @@ __metadata: rollup: ^4.19.1 ts-node: ^10.9.1 typechain: ^8.1.1 - typescript: ^5.5.4 - unplugin-swc: ^1.5.1 - languageName: unknown - linkType: soft - -"@imtbl/factory-sdk@0.0.0, @imtbl/factory-sdk@workspace:packages/internal/factory/sdk": - version: 0.0.0-use.local - resolution: "@imtbl/factory-sdk@workspace:packages/internal/factory/sdk" - dependencies: - "@imtbl/config": 0.0.0 - "@jest/globals": ^29.5.0 - "@rollup/plugin-commonjs": ^26.0.1 - "@rollup/plugin-json": ^6.1.0 - "@rollup/plugin-node-resolve": ^15.2.3 - "@rollup/plugin-typescript": ^11.1.6 - "@swc/core": ^1.3.36 - "@swc/jest": ^0.2.24 - "@typechain/ethers-v5": ^10.2.0 - "@types/jest": ^29.4.3 - "@types/node": ^18.14.2 - ethers: ^5.7.2 - jest: ^29.4.3 - jest-environment-jsdom: ^29.4.3 - rollup: ^4.19.1 - ts-node: ^10.9.1 - typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4550,31 +4524,7 @@ __metadata: jest: ^29.4.3 rimraf: ^6.0.1 rollup: ^4.19.1 - typescript: ^5.5.4 - unplugin-swc: ^1.5.1 - languageName: unknown - linkType: soft - -"@imtbl/guardian@0.0.0, @imtbl/guardian@workspace:packages/internal/guardian": - version: 0.0.0-use.local - resolution: "@imtbl/guardian@workspace:packages/internal/guardian" - dependencies: - "@rollup/plugin-json": ^6.1.0 - "@rollup/plugin-node-resolve": ^15.2.3 - "@rollup/plugin-typescript": ^11.1.6 - "@swc/core": ^1.3.36 - "@swc/jest": ^0.2.24 - "@typechain/ethers-v5": ^10.2.0 - "@types/jest": ^29.4.3 - "@types/node": ^18.14.2 - axios: ^1.6.5 - eslint: ^8.40.0 - jest: ^29.4.3 - jest-environment-jsdom: ^29.4.3 - rollup: ^4.19.1 - ts-node: ^10.9.1 - typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4604,7 +4554,7 @@ __metadata: lru-memorise: 0.3.0 rollup: ^4.19.1 ts-jest: ^29.1.0 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4633,7 +4583,7 @@ __metadata: rollup: ^4.19.1 testcontainers: ^10.9.0 ts-mockito: ^2.6.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 dependenciesMeta: pg: @@ -4667,7 +4617,7 @@ __metadata: rollup: ^4.19.1 ts-mockito: ^2.6.1 typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4701,11 +4651,11 @@ __metadata: eslint-config-next: 13.3.1 ethers: ^5.7.2 framer-motion: ^11.0.6 - next: 13.4.11 + next: 14.2.10 react: ^18.2.0 react-bootstrap: ^2.7.2 react-dom: ^18.2.0 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -4718,7 +4668,6 @@ __metadata: "@ethersproject/providers": ^5.7.2 "@imtbl/config": 0.0.0 "@imtbl/generated-clients": 0.0.0 - "@imtbl/guardian": 0.0.0 "@imtbl/metrics": 0.0.0 "@imtbl/toolkit": 0.0.0 "@imtbl/x-client": 0.0.0 @@ -4752,7 +4701,7 @@ __metadata: prettier: ^2.8.7 rollup: ^4.19.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 uuid: ^8.3.2 languageName: unknown @@ -4792,7 +4741,6 @@ __metadata: "@imtbl/config": 0.0.0 "@imtbl/cryptofiat": 0.0.0 "@imtbl/generated-clients": 0.0.0 - "@imtbl/guardian": 0.0.0 "@imtbl/minting-backend": 0.0.0 "@imtbl/orderbook": 0.0.0 "@imtbl/passport": 0.0.0 @@ -4855,7 +4803,7 @@ __metadata: sns-validator: ^0.3.5 stream-browserify: ^3.0.0 stream-http: ^3.2.0 - typescript: ^5.5.4 + typescript: ^5.6.2 url: ^0.11.0 uuid: ^8.3.2 dependenciesMeta: @@ -4964,7 +4912,7 @@ __metadata: prettier: ^2.8.7 rollup: ^4.19.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -4989,7 +4937,7 @@ __metadata: sns-validator: ^0.3.5 ts-mockito: ^2.6.1 typechain: ^8.1.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -5020,7 +4968,7 @@ __metadata: jest: ^29.4.3 jest-environment-jsdom: ^29.4.3 rollup: ^4.19.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -5055,7 +5003,7 @@ __metadata: prettier: ^2.8.7 rollup: ^4.19.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 unplugin-swc: ^1.5.1 languageName: unknown linkType: soft @@ -6803,10 +6751,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.4.11": - version: 13.4.11 - resolution: "@next/env@npm:13.4.11" - checksum: f0181ae16ba3f7bbf6e7ce9b431218740b800ab3c2a61a50a75828794eecb7e6fe324f0547bfc6d80221ab3f4b812184a040c7c72b0f37c2f0c3742047f352c6 +"@next/env@npm:14.2.10": + version: 14.2.10 + resolution: "@next/env@npm:14.2.10" + checksum: edff4b124b11f9fcea4df239b6feb11c16ef49c97d018e098a2fcfc16f4aba27092569fb7bdec148d8b1113ac9b2d2a6b460940287ef5636ad801ac779ffc08c languageName: node linkType: hard @@ -6860,9 +6808,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-darwin-arm64@npm:13.4.11" +"@next/swc-darwin-arm64@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-darwin-arm64@npm:14.2.10" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -6881,9 +6829,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-darwin-x64@npm:13.4.11" +"@next/swc-darwin-x64@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-darwin-x64@npm:14.2.10" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -6902,9 +6850,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-linux-arm64-gnu@npm:13.4.11" +"@next/swc-linux-arm64-gnu@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-linux-arm64-gnu@npm:14.2.10" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -6923,9 +6871,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-linux-arm64-musl@npm:13.4.11" +"@next/swc-linux-arm64-musl@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-linux-arm64-musl@npm:14.2.10" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -6944,9 +6892,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-linux-x64-gnu@npm:13.4.11" +"@next/swc-linux-x64-gnu@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-linux-x64-gnu@npm:14.2.10" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -6965,9 +6913,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-linux-x64-musl@npm:13.4.11" +"@next/swc-linux-x64-musl@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-linux-x64-musl@npm:14.2.10" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -6986,9 +6934,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-win32-arm64-msvc@npm:13.4.11" +"@next/swc-win32-arm64-msvc@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-win32-arm64-msvc@npm:14.2.10" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -7007,9 +6955,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-win32-ia32-msvc@npm:13.4.11" +"@next/swc-win32-ia32-msvc@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-win32-ia32-msvc@npm:14.2.10" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -7028,9 +6976,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.4.11": - version: 13.4.11 - resolution: "@next/swc-win32-x64-msvc@npm:13.4.11" +"@next/swc-win32-x64-msvc@npm:14.2.10": + version: 14.2.10 + resolution: "@next/swc-win32-x64-msvc@npm:14.2.10" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -9322,13 +9270,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.13.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - "@rollup/rollup-android-arm-eabi@npm:4.19.1": version: 4.19.1 resolution: "@rollup/rollup-android-arm-eabi@npm:4.19.1" @@ -9336,10 +9277,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-android-arm64@npm:4.13.0" - conditions: os=android & cpu=arm64 +"@rollup/rollup-android-arm-eabi@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.3" + conditions: os=android & cpu=arm languageName: node linkType: hard @@ -9350,10 +9291,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.13.0" - conditions: os=darwin & cpu=arm64 +"@rollup/rollup-android-arm64@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-android-arm64@npm:4.21.3" + conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -9364,10 +9305,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.13.0" - conditions: os=darwin & cpu=x64 +"@rollup/rollup-darwin-arm64@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-darwin-arm64@npm:4.21.3" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -9378,10 +9319,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0" - conditions: os=linux & cpu=arm +"@rollup/rollup-darwin-x64@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-darwin-x64@npm:4.21.3" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -9392,6 +9333,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-gnueabihf@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.3" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-musleabihf@npm:4.19.1": version: 4.19.1 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.19.1" @@ -9399,10 +9347,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.13.0" - conditions: os=linux & cpu=arm64 & libc=glibc +"@rollup/rollup-linux-arm-musleabihf@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.3" + conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard @@ -9413,10 +9361,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.13.0" - conditions: os=linux & cpu=arm64 & libc=musl +"@rollup/rollup-linux-arm64-gnu@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.3" + conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -9427,6 +9375,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-musl@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-powerpc64le-gnu@npm:4.19.1": version: 4.19.1 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.19.1" @@ -9434,10 +9389,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.13.0" - conditions: os=linux & cpu=riscv64 & libc=glibc +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.3" + conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard @@ -9448,6 +9403,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-riscv64-gnu@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.3" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-s390x-gnu@npm:4.19.1": version: 4.19.1 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.19.1" @@ -9455,10 +9417,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.13.0" - conditions: os=linux & cpu=x64 & libc=glibc +"@rollup/rollup-linux-s390x-gnu@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.3" + conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -9469,10 +9431,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.13.0" - conditions: os=linux & cpu=x64 & libc=musl +"@rollup/rollup-linux-x64-gnu@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.3" + conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -9483,10 +9445,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.13.0" - conditions: os=win32 & cpu=arm64 +"@rollup/rollup-linux-x64-musl@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.3" + conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -9497,10 +9459,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.13.0" - conditions: os=win32 & cpu=ia32 +"@rollup/rollup-win32-arm64-msvc@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.3" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -9511,10 +9473,10 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.13.0": - version: 4.13.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.13.0" - conditions: os=win32 & cpu=x64 +"@rollup/rollup-win32-ia32-msvc@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.3" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -9525,6 +9487,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-x64-msvc@npm:4.21.3": + version: 4.21.3 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@rushstack/eslint-patch@npm:^1.1.0, @rushstack/eslint-patch@npm:^1.1.3": version: 1.3.2 resolution: "@rushstack/eslint-patch@npm:1.3.2" @@ -11728,15 +11697,6 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.5.1, @swc/helpers@npm:^0.5.0": - version: 0.5.1 - resolution: "@swc/helpers@npm:0.5.1" - dependencies: - tslib: ^2.4.0 - checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a - languageName: node - linkType: hard - "@swc/helpers@npm:0.5.5": version: 0.5.5 resolution: "@swc/helpers@npm:0.5.5" @@ -11747,6 +11707,15 @@ __metadata: languageName: node linkType: hard +"@swc/helpers@npm:^0.5.0": + version: 0.5.1 + resolution: "@swc/helpers@npm:0.5.1" + dependencies: + tslib: ^2.4.0 + checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a + languageName: node + linkType: hard + "@swc/jest@npm:^0.2.24": version: 0.2.27 resolution: "@swc/jest@npm:0.2.27" @@ -11891,7 +11860,7 @@ __metadata: pinst: ^3.0.0 ts-jest: ^29.1.1 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -11923,7 +11892,7 @@ __metadata: solidity-coverage: ^0.8.1 ts-jest: ^29.1.1 ts-node: ^10.9.2 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -16108,7 +16077,7 @@ __metadata: eslint-config-next: 13.3.1 ethers: ^5.7.2 ts-node: ^10.9.1 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -16609,7 +16578,7 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001503": +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001503": version: 1.0.30001517 resolution: "caniuse-lite@npm:1.0.30001517" checksum: e4e87436ae1c4408cf4438aac22902b31eb03f3f5bad7f33bc518d12ffb35f3fd9395ccf7efc608ee046f90ce324ec6f7f26f8a8172b8c43c26a06ecee612a29 @@ -18943,12 +18912,12 @@ __metadata: concurrently: ^8.2.2 eslint: ^8.40.0 ethers: ^5.7.2 - next: 13.4.11 + next: 14.2.10 postcss: 8.4.31 react: ^18.2.0 react-dom: ^18.2.0 tailwindcss: 3.3.2 - typescript: ^5.5.4 + typescript: ^5.6.2 languageName: unknown linkType: soft @@ -20060,33 +20029,33 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.20.1": - version: 0.20.2 - resolution: "esbuild@npm:0.20.2" - dependencies: - "@esbuild/aix-ppc64": 0.20.2 - "@esbuild/android-arm": 0.20.2 - "@esbuild/android-arm64": 0.20.2 - "@esbuild/android-x64": 0.20.2 - "@esbuild/darwin-arm64": 0.20.2 - "@esbuild/darwin-x64": 0.20.2 - "@esbuild/freebsd-arm64": 0.20.2 - "@esbuild/freebsd-x64": 0.20.2 - "@esbuild/linux-arm": 0.20.2 - "@esbuild/linux-arm64": 0.20.2 - "@esbuild/linux-ia32": 0.20.2 - "@esbuild/linux-loong64": 0.20.2 - "@esbuild/linux-mips64el": 0.20.2 - "@esbuild/linux-ppc64": 0.20.2 - "@esbuild/linux-riscv64": 0.20.2 - "@esbuild/linux-s390x": 0.20.2 - "@esbuild/linux-x64": 0.20.2 - "@esbuild/netbsd-x64": 0.20.2 - "@esbuild/openbsd-x64": 0.20.2 - "@esbuild/sunos-x64": 0.20.2 - "@esbuild/win32-arm64": 0.20.2 - "@esbuild/win32-ia32": 0.20.2 - "@esbuild/win32-x64": 0.20.2 +"esbuild@npm:^0.21.3": + version: 0.21.5 + resolution: "esbuild@npm:0.21.5" + dependencies: + "@esbuild/aix-ppc64": 0.21.5 + "@esbuild/android-arm": 0.21.5 + "@esbuild/android-arm64": 0.21.5 + "@esbuild/android-x64": 0.21.5 + "@esbuild/darwin-arm64": 0.21.5 + "@esbuild/darwin-x64": 0.21.5 + "@esbuild/freebsd-arm64": 0.21.5 + "@esbuild/freebsd-x64": 0.21.5 + "@esbuild/linux-arm": 0.21.5 + "@esbuild/linux-arm64": 0.21.5 + "@esbuild/linux-ia32": 0.21.5 + "@esbuild/linux-loong64": 0.21.5 + "@esbuild/linux-mips64el": 0.21.5 + "@esbuild/linux-ppc64": 0.21.5 + "@esbuild/linux-riscv64": 0.21.5 + "@esbuild/linux-s390x": 0.21.5 + "@esbuild/linux-x64": 0.21.5 + "@esbuild/netbsd-x64": 0.21.5 + "@esbuild/openbsd-x64": 0.21.5 + "@esbuild/sunos-x64": 0.21.5 + "@esbuild/win32-arm64": 0.21.5 + "@esbuild/win32-ia32": 0.21.5 + "@esbuild/win32-x64": 0.21.5 dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -20136,7 +20105,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: bc88050fc1ca5c1bd03648f9979e514bdefb956a63aa3974373bb7b9cbac0b3aac9b9da1b5bdca0b3490e39d6b451c72815dbd6b7d7f978c91fbe9c9e9aa4e4c + checksum: 2911c7b50b23a9df59a7d6d4cdd3a4f85855787f374dce751148dbb13305e0ce7e880dde1608c2ab7a927fc6cec3587b80995f7fc87a64b455f8b70b55fd8ec1 languageName: node linkType: hard @@ -21704,22 +21673,6 @@ __metadata: languageName: node linkType: hard -"factory-sample-app@workspace:packages/internal/factory/factory-sample-app": - version: 0.0.0-use.local - resolution: "factory-sample-app@workspace:packages/internal/factory/factory-sample-app" - dependencies: - "@imtbl/config": 0.0.0 - "@imtbl/factory-sdk": 0.0.0 - "@types/node": ^18.14.2 - autoprefixer: 10.4.14 - eslint: ^8.40.0 - eslint-config-next: 13.3.1 - ethers: ^5.7.2 - ts-node: ^10.9.1 - typescript: ^5.5.4 - languageName: unknown - linkType: soft - "fast-copy@npm:^3.0.2": version: 3.0.2 resolution: "fast-copy@npm:3.0.2" @@ -29444,7 +29397,7 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.4, nanoid@npm:^3.3.6": +"nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" bin: @@ -29548,30 +29501,29 @@ __metadata: languageName: node linkType: hard -"next@npm:13.4.11": - version: 13.4.11 - resolution: "next@npm:13.4.11" +"next@npm:14.2.10": + version: 14.2.10 + resolution: "next@npm:14.2.10" dependencies: - "@next/env": 13.4.11 - "@next/swc-darwin-arm64": 13.4.11 - "@next/swc-darwin-x64": 13.4.11 - "@next/swc-linux-arm64-gnu": 13.4.11 - "@next/swc-linux-arm64-musl": 13.4.11 - "@next/swc-linux-x64-gnu": 13.4.11 - "@next/swc-linux-x64-musl": 13.4.11 - "@next/swc-win32-arm64-msvc": 13.4.11 - "@next/swc-win32-ia32-msvc": 13.4.11 - "@next/swc-win32-x64-msvc": 13.4.11 - "@swc/helpers": 0.5.1 + "@next/env": 14.2.10 + "@next/swc-darwin-arm64": 14.2.10 + "@next/swc-darwin-x64": 14.2.10 + "@next/swc-linux-arm64-gnu": 14.2.10 + "@next/swc-linux-arm64-musl": 14.2.10 + "@next/swc-linux-x64-gnu": 14.2.10 + "@next/swc-linux-x64-musl": 14.2.10 + "@next/swc-win32-arm64-msvc": 14.2.10 + "@next/swc-win32-ia32-msvc": 14.2.10 + "@next/swc-win32-x64-msvc": 14.2.10 + "@swc/helpers": 0.5.5 busboy: 1.6.0 - caniuse-lite: ^1.0.30001406 - postcss: 8.4.14 + caniuse-lite: ^1.0.30001579 + graceful-fs: ^4.2.11 + postcss: 8.4.31 styled-jsx: 5.1.1 - watchpack: 2.4.0 - zod: 3.21.4 peerDependencies: "@opentelemetry/api": ^1.1.0 - fibers: ">= 3.1.0" + "@playwright/test": ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 @@ -29597,13 +29549,13 @@ __metadata: peerDependenciesMeta: "@opentelemetry/api": optional: true - fibers: + "@playwright/test": optional: true sass: optional: true bin: next: dist/bin/next - checksum: 3d6a7443bc1f22bc98db1cb87096df1e97c511a7cb8b0ee24469ea20bcfe50ba0b2baeb7e7ad9dba4c92cc126fc6809ba7f1690510ee2f54226bfd3173b921bd + checksum: 2d69507cccddc0297ff2e6727d7c0e96653a049c4a0236f6c0cae3e1eb622dabcb576b4f3976046526f31b8252f665f5b98cbb0f66d6e756f4d22b0ccfbd290d languageName: node linkType: hard @@ -31386,6 +31338,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.1.0": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: a64d653d3a188119ff45781dfcdaeedd7625583f45280aea33fcb032c7a0d3959f2368f9b192ad5e8aade75b74dbd954ffe3106c158509a45e4c18ab379a2acd + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -32451,17 +32410,6 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.14": - version: 8.4.14 - resolution: "postcss@npm:8.4.14" - dependencies: - nanoid: ^3.3.4 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: fe58766ff32e4becf65a7d57678995cfd239df6deed2fe0557f038b47c94e4132e7e5f68b5aa820c13adfec32e523b693efaeb65798efb995ce49ccd83953816 - languageName: node - linkType: hard - "postcss@npm:8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" @@ -32505,14 +32453,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.36": - version: 8.4.38 - resolution: "postcss@npm:8.4.38" +"postcss@npm:^8.4.43": + version: 8.4.47 + resolution: "postcss@npm:8.4.47" dependencies: nanoid: ^3.3.7 - picocolors: ^1.0.0 - source-map-js: ^1.2.0 - checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 + picocolors: ^1.1.0 + source-map-js: ^1.2.1 + checksum: f78440a9d8f97431dd2ab1ab8e1de64f12f3eff38a3d8d4a33919b96c381046a314658d2de213a5fa5eb296b656de76a3ec269fdea27f16d5ab465b916a0f52c languageName: node linkType: hard @@ -34480,23 +34428,26 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.13.0": - version: 4.13.0 - resolution: "rollup@npm:4.13.0" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.13.0 - "@rollup/rollup-android-arm64": 4.13.0 - "@rollup/rollup-darwin-arm64": 4.13.0 - "@rollup/rollup-darwin-x64": 4.13.0 - "@rollup/rollup-linux-arm-gnueabihf": 4.13.0 - "@rollup/rollup-linux-arm64-gnu": 4.13.0 - "@rollup/rollup-linux-arm64-musl": 4.13.0 - "@rollup/rollup-linux-riscv64-gnu": 4.13.0 - "@rollup/rollup-linux-x64-gnu": 4.13.0 - "@rollup/rollup-linux-x64-musl": 4.13.0 - "@rollup/rollup-win32-arm64-msvc": 4.13.0 - "@rollup/rollup-win32-ia32-msvc": 4.13.0 - "@rollup/rollup-win32-x64-msvc": 4.13.0 +"rollup@npm:^4.19.1": + version: 4.19.1 + resolution: "rollup@npm:4.19.1" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.19.1 + "@rollup/rollup-android-arm64": 4.19.1 + "@rollup/rollup-darwin-arm64": 4.19.1 + "@rollup/rollup-darwin-x64": 4.19.1 + "@rollup/rollup-linux-arm-gnueabihf": 4.19.1 + "@rollup/rollup-linux-arm-musleabihf": 4.19.1 + "@rollup/rollup-linux-arm64-gnu": 4.19.1 + "@rollup/rollup-linux-arm64-musl": 4.19.1 + "@rollup/rollup-linux-powerpc64le-gnu": 4.19.1 + "@rollup/rollup-linux-riscv64-gnu": 4.19.1 + "@rollup/rollup-linux-s390x-gnu": 4.19.1 + "@rollup/rollup-linux-x64-gnu": 4.19.1 + "@rollup/rollup-linux-x64-musl": 4.19.1 + "@rollup/rollup-win32-arm64-msvc": 4.19.1 + "@rollup/rollup-win32-ia32-msvc": 4.19.1 + "@rollup/rollup-win32-x64-msvc": 4.19.1 "@types/estree": 1.0.5 fsevents: ~2.3.2 dependenciesMeta: @@ -34510,12 +34461,18 @@ __metadata: optional: true "@rollup/rollup-linux-arm-gnueabihf": optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true "@rollup/rollup-linux-arm64-gnu": optional: true "@rollup/rollup-linux-arm64-musl": optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true "@rollup/rollup-linux-riscv64-gnu": optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true "@rollup/rollup-linux-x64-gnu": optional: true "@rollup/rollup-linux-x64-musl": @@ -34530,30 +34487,30 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: c2c35bee0a71ceb0df37c170c2b73a500bf9ebdffb747487d77831348603d50dcfcdd9d0a937362d3a87edda559c9d1e017fba2d75f05f0c594634d9b8dde9a4 + checksum: b431700a5248563c0e1d03521b8262aad9adc46007159b2792569ff56e5b11cbaa555809b90765f291484dad726f2250270112943bcbd8a067608804d96fa3d5 languageName: node linkType: hard -"rollup@npm:^4.19.1": - version: 4.19.1 - resolution: "rollup@npm:4.19.1" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.19.1 - "@rollup/rollup-android-arm64": 4.19.1 - "@rollup/rollup-darwin-arm64": 4.19.1 - "@rollup/rollup-darwin-x64": 4.19.1 - "@rollup/rollup-linux-arm-gnueabihf": 4.19.1 - "@rollup/rollup-linux-arm-musleabihf": 4.19.1 - "@rollup/rollup-linux-arm64-gnu": 4.19.1 - "@rollup/rollup-linux-arm64-musl": 4.19.1 - "@rollup/rollup-linux-powerpc64le-gnu": 4.19.1 - "@rollup/rollup-linux-riscv64-gnu": 4.19.1 - "@rollup/rollup-linux-s390x-gnu": 4.19.1 - "@rollup/rollup-linux-x64-gnu": 4.19.1 - "@rollup/rollup-linux-x64-musl": 4.19.1 - "@rollup/rollup-win32-arm64-msvc": 4.19.1 - "@rollup/rollup-win32-ia32-msvc": 4.19.1 - "@rollup/rollup-win32-x64-msvc": 4.19.1 +"rollup@npm:^4.20.0": + version: 4.21.3 + resolution: "rollup@npm:4.21.3" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.21.3 + "@rollup/rollup-android-arm64": 4.21.3 + "@rollup/rollup-darwin-arm64": 4.21.3 + "@rollup/rollup-darwin-x64": 4.21.3 + "@rollup/rollup-linux-arm-gnueabihf": 4.21.3 + "@rollup/rollup-linux-arm-musleabihf": 4.21.3 + "@rollup/rollup-linux-arm64-gnu": 4.21.3 + "@rollup/rollup-linux-arm64-musl": 4.21.3 + "@rollup/rollup-linux-powerpc64le-gnu": 4.21.3 + "@rollup/rollup-linux-riscv64-gnu": 4.21.3 + "@rollup/rollup-linux-s390x-gnu": 4.21.3 + "@rollup/rollup-linux-x64-gnu": 4.21.3 + "@rollup/rollup-linux-x64-musl": 4.21.3 + "@rollup/rollup-win32-arm64-msvc": 4.21.3 + "@rollup/rollup-win32-ia32-msvc": 4.21.3 + "@rollup/rollup-win32-x64-msvc": 4.21.3 "@types/estree": 1.0.5 fsevents: ~2.3.2 dependenciesMeta: @@ -34593,7 +34550,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: b431700a5248563c0e1d03521b8262aad9adc46007159b2792569ff56e5b11cbaa555809b90765f291484dad726f2250270112943bcbd8a067608804d96fa3d5 + checksum: 19689840d25ced3924124b012d7e0048f2b0844a0765a5dde0804ae9961af1103657c2ec3e90f7a19876ebe40b3fa2c33f53fca071d46639c57bd327b82aba22 languageName: node linkType: hard @@ -35747,6 +35704,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 4eb0cd997cdf228bc253bcaff9340afeb706176e64868ecd20efbe6efea931465f43955612346d6b7318789e5265bdc419bc7669c1cebe3db0eb255f57efa76b + languageName: node + linkType: hard + "source-map-loader@npm:^3.0.0": version: 3.0.2 resolution: "source-map-loader@npm:3.0.2" @@ -38219,7 +38183,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:*, typescript@npm:^5": +"typescript@npm:*, typescript@npm:^5.6.2": version: 5.6.2 resolution: "typescript@npm:5.6.2" bin: @@ -38229,17 +38193,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.5.4": - version: 5.5.4 - resolution: "typescript@npm:5.5.4" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: b309040f3a1cd91c68a5a58af6b9fdd4e849b8c42d837b2c2e73f9a4f96a98c4f1ed398a9aab576ee0a4748f5690cf594e6b99dbe61de7839da748c41e6d6ca8 - languageName: node - linkType: hard - -"typescript@patch:typescript@*#~builtin, typescript@patch:typescript@^5#~builtin": +"typescript@patch:typescript@*#~builtin, typescript@patch:typescript@^5.6.2#~builtin": version: 5.6.2 resolution: "typescript@patch:typescript@npm%3A5.6.2#~builtin::version=5.6.2&hash=14eedb" bin: @@ -38249,16 +38203,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^5.5.4#~builtin": - version: 5.5.4 - resolution: "typescript@patch:typescript@npm%3A5.5.4#~builtin::version=5.5.4&hash=14eedb" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: fc52962f31a5bcb716d4213bef516885e4f01f30cea797a831205fc9ef12b405a40561c40eae3127ab85ba1548e7df49df2bcdee6b84a94bfbe3a0d7eff16b14 - languageName: node - linkType: hard - "typical@npm:^4.0.0": version: 4.0.0 resolution: "typical@npm:4.0.0" @@ -39028,19 +38972,20 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.12": - version: 5.2.2 - resolution: "vite@npm:5.2.2" +"vite@npm:^5.2.14": + version: 5.4.6 + resolution: "vite@npm:5.4.6" dependencies: - esbuild: ^0.20.1 + esbuild: ^0.21.3 fsevents: ~2.3.3 - postcss: ^8.4.36 - rollup: ^4.13.0 + postcss: ^8.4.43 + rollup: ^4.20.0 peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 less: "*" lightningcss: ^1.21.0 sass: "*" + sass-embedded: "*" stylus: "*" sugarss: "*" terser: ^5.4.0 @@ -39056,6 +39001,8 @@ __metadata: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -39064,7 +39011,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: ef20480a0d4145f05378d33d295917995679c75205c19872346f18ad847cca8ac90794b7cfb280f787c0db60a90afcc1ae2c2e5ccedfe4751fb4a3c0ff07be69 + checksum: ea293748f624b3bb53e68d30ddc55e7addeaa38bbcde06d900e6d476bef3d0550de2a67f5316680dbeae483afedd3e735fb91b65004659f62bece537ed038a59 languageName: node linkType: hard @@ -39158,7 +39105,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:2.4.0, watchpack@npm:^2.4.0": +"watchpack@npm:^2.4.0": version: 2.4.0 resolution: "watchpack@npm:2.4.0" dependencies: @@ -40292,7 +40239,7 @@ __metadata: react-dom: ^18.2.0 react-scripts: 5.0.1 stream-browserify: ^3.0.0 - typescript: ^5.5.4 + typescript: ^5.6.2 web-vitals: ^2.1.4 languageName: unknown linkType: soft