diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..6229805e4 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# API keys for running unit test cases +BLOCKFROST_API_KEY_PREPROD=preprodxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +MAESTRO_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..202af851e --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,10 @@ +// This configuration only applies to the package manager root. +/** @type {import("eslint").Linter.Config} */ +module.exports = { + ignorePatterns: ["apps/**", "packages/**"], + extends: ["@meshsdk/eslint-config/library.js"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: true, + }, +}; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2c6af36b..de19e399b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,18 +18,11 @@ jobs: node-version: [20] steps: - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9.2.0 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - name: Install dependencies - run: pnpm install + run: npm install - name: Lint - run: pnpm lint + run: npm run lint - name: Build - run: pnpm build --filter="./packages/*" + run: npm run build:mesh && npm run build:docs && npm run build:apps diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e13cb5d7..3ecd372be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,29 +18,28 @@ jobs: node-version: [20] steps: - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9.2.0 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - name: Install dependencies - run: pnpm install + run: npm install - name: Lint - run: pnpm lint + run: npm run lint - name: Build - run: pnpm build + run: npm run build:mesh && npm run build:docs && npm run build:apps check-version: runs-on: ubuntu-latest if: github.event.pull_request.merged == true outputs: + common-version-updated: ${{ steps.compare-versions.outputs.common-version-updated }} + contract-version-updated: ${{ steps.compare-versions.outputs.contract-version-updated }} core-version-updated: ${{ steps.compare-versions.outputs.core-version-updated }} + core-csl-version-updated: ${{ steps.compare-versions.outputs.core-csl-version-updated }} + core-cst-version-updated: ${{ steps.compare-versions.outputs.core-cst-version-updated }} + provider-version-updated: ${{ steps.compare-versions.outputs.provider-version-updated }} react-version-updated: ${{ steps.compare-versions.outputs.react-version-updated }} - contracts-version-updated: ${{ steps.compare-versions.outputs.react-version-updated }} + transaction-version-updated: ${{ steps.compare-versions.outputs.transaction-version-updated }} + wallet-version-updated: ${{ steps.compare-versions.outputs.wallet-version-updated }} steps: - name: Checkout main branch at commit before merge uses: actions/checkout@v4 @@ -50,46 +49,130 @@ jobs: - name: Get package version from main branch before merge id: pre-merge-version run: | - CORE_PRE_MERGE_VERSION=$(node -p "require('./packages/core/package.json').version") - REACT_PRE_MERGE_VERSION=$(node -p "require('./packages/react/package.json').version") - CONTRACTS_PRE_MERGE_VERSION=$(node -p "require('./packages/contracts/package.json').version") + COMMON_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-common/package.json').version") + CONTRACT_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-contract/package.json').version") + CORE_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core/package.json').version") + CORE_CSL_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core-csl/package.json').version") + CORE_CST_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version") + PROVIDER_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version") + REACT_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-react/package.json').version") + TRANSACTION_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-transaction/package.json').version") + WALLET_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-wallet/package.json').version") + echo "common_pre_merge_version=$COMMON_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "contract_pre_merge_version=$CONTRACT_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" echo "core_pre_merge_version=$CORE_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "core_csl_pre_merge_version=$CORE_CSL_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "core_cst_pre_merge_version=$CORE_CST_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "provider_pre_merge_version=$PROVIDER_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" echo "react_pre_merge_version=$REACT_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" - echo "react_pre_merge_version=$CONTRACTS_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "transaction_pre_merge_version=$TRANSACTION_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "wallet_pre_merge_version=$WALLET_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT" - name: Checkout main branch at commit after merge uses: actions/checkout@v4 with: - ref: 'main' + ref: "main" - name: Get package version from main branch after merge id: post-merge-version run: | - CORE_POST_MERGE_VERSION=$(node -p "require('./packages/core/package.json').version") - REACT_POST_MERGE_VERSION=$(node -p "require('./packages/react/package.json').version") - CONTRACTS_POST_MERGE_VERSION=$(node -p "require('./packages/contracts/package.json').version") + COMMON_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-common/package.json').version") + CONTRACT_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-contract/package.json').version") + CORE_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core/package.json').version") + CORE_CSL_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core-csl/package.json').version") + CORE_CST_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version") + PROVIDER_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version") + REACT_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-react/package.json').version") + TRANSACTION_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-transaction/package.json').version") + WALLET_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-wallet/package.json').version") + echo "common_post_merge_version=$COMMON_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "contract_post_merge_version=$CONTRACT_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" echo "core_post_merge_version=$CORE_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "core_csl_post_merge_version=$CORE_CSL_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "core_cst_post_merge_version=$CORE_CST_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "provider_post_merge_version=$PROVIDER_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" echo "react_post_merge_version=$REACT_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" - echo "react_post_merge_version=$CONTRACTS_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "transaction_post_merge_version=$TRANSACTION_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" + echo "wallet_post_merge_version=$WALLET_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT" - name: Compare versions id: compare-versions run: | + if [[ "${{ steps.pre-merge-version.outputs.common_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.common_post_merge_version }}" ]]; then + echo "common-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "common-version-updated=false" >> "$GITHUB_OUTPUT" + fi + if [[ "${{ steps.pre-merge-version.outputs.contract_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.contract_post_merge_version }}" ]]; then + echo "contract-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "contract-version-updated=false" >> "$GITHUB_OUTPUT" + fi if [[ "${{ steps.pre-merge-version.outputs.core_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.core_post_merge_version }}" ]]; then echo "core-version-updated=true" >> "$GITHUB_OUTPUT" else echo "core-version-updated=false" >> "$GITHUB_OUTPUT" fi + if [[ "${{ steps.pre-merge-version.outputs.core_csl_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.core_csl_post_merge_version }}" ]]; then + echo "core-csl-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "core-csl-version-updated=false" >> "$GITHUB_OUTPUT" + fi + if [[ "${{ steps.pre-merge-version.outputs.core_cst_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.core_cst_post_merge_version }}" ]]; then + echo "core-cst-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "core-cst-version-updated=false" >> "$GITHUB_OUTPUT" + fi + if [[ "${{ steps.pre-merge-version.outputs.provider_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.provider_post_merge_version }}" ]]; then + echo "provider-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "provider-version-updated=false" >> "$GITHUB_OUTPUT" + fi if [[ "${{ steps.pre-merge-version.outputs.react_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.react_post_merge_version }}" ]]; then echo "react-version-updated=true" >> "$GITHUB_OUTPUT" else echo "react-version-updated=false" >> "$GITHUB_OUTPUT" fi - if [[ "${{ steps.pre-merge-version.outputs.contracts_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.contracts_post_merge_version }}" ]]; then - echo "contracts-version-updated=true" >> "$GITHUB_OUTPUT" + if [[ "${{ steps.pre-merge-version.outputs.transaction_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.transaction_post_merge_version }}" ]]; then + echo "transaction-version-updated=true" >> "$GITHUB_OUTPUT" else - echo "contracts-version-updated=false" >> "$GITHUB_OUTPUT" + echo "transaction-version-updated=false" >> "$GITHUB_OUTPUT" fi + if [[ "${{ steps.pre-merge-version.outputs.wallet_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.wallet_post_merge_version }}" ]]; then + echo "wallet-version-updated=true" >> "$GITHUB_OUTPUT" + else + echo "wallet-version-updated=false" >> "$GITHUB_OUTPUT" + fi + + publish-meshsdk-common: + needs: [build, check-version] + if: needs.check-version.outputs.common-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-common && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-meshsdk-contract: + needs: [build, check-version] + if: needs.check-version.outputs.contract-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-contract && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-meshsdk-core: needs: [build, check-version] @@ -101,8 +184,53 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ - - run: pnpm build --filter="./packages/*" - - run: cd packages/core && npm publish --access public + - run: npm install && npm run build + - run: cd packages/mesh-core && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-meshsdk-core-csl: + needs: [build, check-version] + if: needs.check-version.outputs.core-csl-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-core-csl && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-meshsdk-core-cst: + needs: [build, check-version] + if: needs.check-version.outputs.core-cst-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-core-cst && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-meshsdk-provider: + needs: [build, check-version] + if: needs.check-version.outputs.provider-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-provider && npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} @@ -116,14 +244,29 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ - - run: pnpm build --filter="./packages/*" - - run: cd packages/react && npm publish --access public + - run: npm install && npm run build + - run: cd packages/mesh-react && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-meshsdk-transaction: + needs: [build, check-version] + if: needs.check-version.outputs.transaction-version-updated == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm install && npm run build + - run: cd packages/mesh-transaction && npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - publish-meshsdk-contracts: + publish-meshsdk-wallet: needs: [build, check-version] - if: needs.check-version.outputs.contracts-version-updated == 'true' + if: needs.check-version.outputs.wallet-version-updated == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -131,7 +274,7 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ - - run: pnpm build --filter="./packages/*" - - run: cd packages/contracts && npm publish --access public + - run: npm install && npm run build + - run: cd packages/mesh-wallet && npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.gitignore b/.gitignore index caacbb8bc..0acc30ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,115 +1,45 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ +# Dependencies +node_modules +.pnp +.pnp.js -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file +# Local env files .env -.env.* - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ +.env.local +.env.development.local +.env.test.local +.env.production.local -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port +# Testing +coverage -# Turborepo cache files +# Turbo .turbo -# Rollup cache files -.rollup.cache +# Vercel +.vercel -# production +# Build Outputs +.next/ +out/ +build dist -# misc + +# Debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Misc .DS_Store +*.pem + +apps/docs/src/data/mesh-common.json +apps/docs/src/data/mesh-contracts.json +apps/docs/src/data/mesh-core-csl.json +apps/docs/src/data/mesh-providers.json +apps/docs/src/data/mesh-transactions.json +apps/docs/src/data/mesh-wallets.json diff --git a/packages/contracts/src/coupon-bond-guaranteed/aiken-workspace/readme.md b/.npmrc similarity index 100% rename from packages/contracts/src/coupon-bond-guaranteed/aiken-workspace/readme.md rename to .npmrc diff --git a/README.md b/README.md index 72593ef1b..d24dd1b40 100644 --- a/README.md +++ b/README.md @@ -4,30 +4,57 @@ Mesh is an open-source library designed to make building dApps accessible. Wheth Explore the features on [Mesh Playground](https://meshjs.dev/). -## Guides and documentations - -- [Starter Templates](https://meshjs.dev/starter-templates) -- [Guides](https://meshjs.dev/guides) -- [Install Mesh into existing project](https://meshjs.dev/migration-manual-installation) -- [App Wallet (Building transactions on applications)](https://meshjs.dev/apis/appwallet) -- [Browser Wallet (CIP30 wallets intergration)](https://meshjs.dev/apis/browserwallet) -- [Transaction - Building, minting, burning, smart contracts, stake pool and more](https://meshjs.dev/apis/transaction) -- [React Components](https://meshjs.dev/react) -- [Service Providers](https://meshjs.dev/providers) -- [Resolvers](https://meshjs.dev/apis/resolvers) - -## Why use Mesh - -- Start a new project with one of out [Starter Templates](https://meshjs.dev/starter-templates) with CLI command -- Always up to date - Vasil-ready, developed promptly as the network updates so your app always works -- Simple to use - Check out our [guides](https://meshjs.dev/guides) - you'll get started in less than 10 mins! -- Adopts best practices - implements various CIPs and package is well build (no hacking and tweaking needed to get it to work) -- Thoroughly tested - Mesh is used by both developers and learners, and is being built by developers with solid software engineering backgrounds -- Integrates with Cardano projects - Koios, Blockfrost, ADA Handle (and more), you can pick and choose freely what you want to use for your app -- Well documented - we focus on documentation so you can use it with ease, and our [Playground](https://meshjs.dev/) is built so you can see how it works - -## How can you contribute? - -- [Support us](https://meshjs.dev/about/support-us) -- Build something - try Mesh by implementing your Web 3.0 project (recommended [starter guide](https://meshjs.dev/guides/nextjs)) -- Inform others - Tell others about Mesh, and star the [Github repo](https://github.com/MeshJS/mesh) :star: +## What's inside? + +This Turborepo includes the following packages/apps: + +### Packages + +- `@meshsdk/common`: Contains constants, types and interfaces used across the SDK and different serialization libraries +- `@meshsdk/contracts`: A collection of smart contracts and its transactions - [meshjs.dev/smart-contracts](https://meshjs.dev/smart-contracts) +- `@meshsdk/core`: Exports all the functionalities including wallets, transactions, and providers +- `@meshsdk/core-csl`: Types and utilities functions between Mesh and [cardano-serialization-lib](https://github.com/Emurgo/cardano-serialization-lib) +- `@meshsdk/core-cst`: Types and utilities functions between Mesh and [cardano-js-sdk](https://github.com/input-output-hk/cardano-js-sdk) +- `@meshsdk/provider`: Blockchain data providers - [meshjs.dev/providers](https://meshjs.dev/providers) +- `@meshsdk/react`: React component library - [meshjs.dev/react](https://meshjs.dev/react) +- `@meshsdk/transaction`: Transactions - [meshjs.dev/apis/transaction](https://meshjs.dev/apis/transaction) +- `@meshsdk/wallet`: Wallets - [meshjs.dev/apis/wallets](https://meshjs.dev/apis/wallets) + +### Apps + +- `apps/docs`: Mesh technical docs - [docs.meshjs.dev](https://docs.meshjs.dev/) +- `apps/playground`: Mesh homepage - [meshjs.dev](https://meshjs.dev/) + +## Getting Started + +### Usage + +To use Mesh in your project, run the following command to install the core package: + +``` +npm install @meshsdk/core +``` + +### Install + +To install all dependencies, run the following command: + +``` +npm install +``` + +### Build + +To build all apps and packages, run the following command: + +``` +npm run build +``` + +### Develop + +To develop all apps and packages, run the following command: + +``` +npm run dev +``` diff --git a/apps/mesh-docs/.eslintrc.json b/apps/docs/.eslintrc.json similarity index 100% rename from apps/mesh-docs/.eslintrc.json rename to apps/docs/.eslintrc.json diff --git a/apps/mesh-docs/.gitignore b/apps/docs/.gitignore similarity index 100% rename from apps/mesh-docs/.gitignore rename to apps/docs/.gitignore diff --git a/apps/mesh-docs/next.config.mjs b/apps/docs/next.config.mjs similarity index 95% rename from apps/mesh-docs/next.config.mjs rename to apps/docs/next.config.mjs index 7bf28779f..8a4630cb7 100644 --- a/apps/mesh-docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -10,7 +10,6 @@ const nextConfig = { }, ], }, - webpack5: true, webpack: (config) => { config.resolve.fallback = { fs: false }; return config; diff --git a/apps/docs/package.json b/apps/docs/package.json new file mode 100644 index 000000000..c0a400dc7 --- /dev/null +++ b/apps/docs/package.json @@ -0,0 +1,42 @@ +{ + "name": "@meshsdk/docs", + "version": "0.1.0", + "private": true, + "scripts": { + "dev:docs": "next dev", + "build:apps": "next build", + "start": "next start" + }, + "dependencies": { + "@algolia/autocomplete-core": "1.17.2", + "@headlessui/react": "2.0.4", + "@headlessui/tailwindcss": "0.2.1", + "@sindresorhus/slugify": "2.2.1", + "@tailwindcss/typography": "0.5.13", + "clsx": "^2.1.1", + "eslint-config-next": "^14.2.5", + "flexsearch": "0.7.43", + "framer-motion": "11.2.10", + "next": "^14.2.5", + "next-themes": "0.3.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-highlight-words": "0.20.0", + "react-markdown": "9.0.1", + "remark": "15.0.1", + "simple-functional-loader": "1.2.1", + "unist-util-filter": "5.0.1", + "unist-util-visit": "5.0.0", + "uuid": "10.0.0", + "zustand": "4.5.2" + }, + "devDependencies": { + "@types/node": "20.14.2", + "@types/react": "18.3.3", + "@types/react-dom": "18.3.0", + "autoprefixer": "10.4.19", + "postcss": "8.4.38", + "tailwindcss": "3.4.4", + "typescript": "5.4.5" + } +} diff --git a/apps/mesh-docs/postcss.config.js b/apps/docs/postcss.config.js similarity index 100% rename from apps/mesh-docs/postcss.config.js rename to apps/docs/postcss.config.js diff --git a/apps/docs/src/app/[package]/classes/[name]/page.tsx b/apps/docs/src/app/[package]/classes/[name]/page.tsx new file mode 100644 index 000000000..bf723f92b --- /dev/null +++ b/apps/docs/src/app/[package]/classes/[name]/page.tsx @@ -0,0 +1,35 @@ +"use client"; + +import getClass from "@/data/get-class"; +import { Prose } from "@/components/Prose"; +import getClassGroups from "@/data/get-class-groups"; +import { v4 as uuidv4 } from "uuid"; +import { Content, DefinedIn, Group, Header } from "@/components/docs"; +import { useRouteContext } from "@/contexts/route-context"; + +export default function Page({ params }: { params: { name: string } }) { + const { currentRoute } = useRouteContext(); + const meshClass = getClass(params.name, currentRoute); + const meshGroup = getClassGroups(meshClass?.name, currentRoute); + + if (meshClass === undefined) { + return <>; + } + + return ( +
+ +
+ + + + {meshGroup.map((group, i) => { + return ; + })} + + {/* */} +
+ ); +} diff --git a/apps/docs/src/app/[package]/common.tsx b/apps/docs/src/app/[package]/common.tsx new file mode 100644 index 000000000..6c5868af4 --- /dev/null +++ b/apps/docs/src/app/[package]/common.tsx @@ -0,0 +1,31 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroCommon() { + return ( +
+ +

Common

+

+ The common package is a collection of utilities and components that + are used across the Mesh SDK. +

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/docs/src/app/[package]/contracts.tsx b/apps/docs/src/app/[package]/contracts.tsx new file mode 100644 index 000000000..91960d6ae --- /dev/null +++ b/apps/docs/src/app/[package]/contracts.tsx @@ -0,0 +1,31 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroContracts() { + return ( +
+ +

Smart Contracts

+

+ Want to get started with smart contracts? Here are some contracts for + the most common use-cases. +

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/docs/src/app/[package]/core-csl.tsx b/apps/docs/src/app/[package]/core-csl.tsx new file mode 100644 index 000000000..13bb4b237 --- /dev/null +++ b/apps/docs/src/app/[package]/core-csl.tsx @@ -0,0 +1,31 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroCoreCsl() { + return ( +
+ +

Core CSL

+

+ Cardano Serialization Lib is a library for serialization & + deserialization of data structures used in Rust. +

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/docs/src/app/[package]/functions/[name]/page.tsx b/apps/docs/src/app/[package]/functions/[name]/page.tsx new file mode 100644 index 000000000..b4d1f85fc --- /dev/null +++ b/apps/docs/src/app/[package]/functions/[name]/page.tsx @@ -0,0 +1,28 @@ +"use client"; +import { Prose } from "@/components/Prose"; +import { Content, DefinedIn, Header, ItemSignatures } from "@/components/docs"; +import { useRouteContext } from "@/contexts/route-context"; +import getFunction from "@/data/get-function"; + +export default function Page({ params }: { params: { name: string } }) { + const { currentRoute } = useRouteContext(); + + const meshFunction = getFunction(params.name, currentRoute); + + if (meshFunction === undefined) { + return <>; + } + + return ( +
+ +
+ + + + + + +
+ ); +} diff --git a/apps/docs/src/app/[package]/interfaces/[name]/page.tsx b/apps/docs/src/app/[package]/interfaces/[name]/page.tsx new file mode 100644 index 000000000..664a3d8a5 --- /dev/null +++ b/apps/docs/src/app/[package]/interfaces/[name]/page.tsx @@ -0,0 +1,40 @@ +"use client"; +import { Prose } from "@/components/Prose"; +import { + Content, + DefinedIn, + Group, + Header, + ImplementedBy, +} from "@/components/docs"; +import { useRouteContext } from "@/contexts/route-context"; +import getInterface from "@/data/get-interface"; +import getInterfaceGroups from "@/data/get-interface-groups"; +import { v4 as uuidv4 } from "uuid"; + +export default function Page({ params }: { params: { name: string } }) { + const { currentRoute } = useRouteContext(); + + const meshInterface = getInterface(params.name, currentRoute); + const group = getInterfaceGroups(meshInterface?.name, currentRoute); + + if (meshInterface === undefined) { + return <>; + } + + return ( +
+ +
+ + + + + + {group.map((group, i) => { + return ; + })} + +
+ ); +} diff --git a/apps/docs/src/app/[package]/page.tsx b/apps/docs/src/app/[package]/page.tsx new file mode 100644 index 000000000..a3aca964a --- /dev/null +++ b/apps/docs/src/app/[package]/page.tsx @@ -0,0 +1,42 @@ +"use client"; +import { useRouteContext } from "@/contexts/route-context"; +import IntroTransaction from "./transactions"; +import { useEffect } from "react"; +import IntroWallets from "./wallets"; +import IntroContracts from "./contracts"; +import IntroProviders from "./providers"; +import IntroCommon from "./common"; +import IntroCoreCsl from "./core-csl"; + +export default function PackagePage({ + params, +}: { + params: { package: string }; +}) { + const { setCurrentRoute } = useRouteContext(); + + useEffect(() => { + setCurrentRoute(params.package); + }, [params]); + + if (params.package === "transactions") { + return ; + } + if (params.package === "wallets") { + return ; + } + if (params.package === "contracts") { + return ; + } + if (params.package === "providers") { + return ; + } + if (params.package === "common") { + return ; + } + if (params.package === "core-csl") { + return ; + } + + return <>package; +} diff --git a/apps/docs/src/app/[package]/providers.tsx b/apps/docs/src/app/[package]/providers.tsx new file mode 100644 index 000000000..55db5c366 --- /dev/null +++ b/apps/docs/src/app/[package]/providers.tsx @@ -0,0 +1,28 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroProviders() { + return ( +
+ +

Providers

+

Data providers for connecting to the blockchain

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/docs/src/app/[package]/transactions.tsx b/apps/docs/src/app/[package]/transactions.tsx new file mode 100644 index 000000000..cd4f04712 --- /dev/null +++ b/apps/docs/src/app/[package]/transactions.tsx @@ -0,0 +1,30 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroTransaction() { + return ( +
+ +

Transactions

+

+ For sending and minting assets and working with smart contracts +

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/docs/src/app/[package]/types/[name]/page.tsx b/apps/docs/src/app/[package]/types/[name]/page.tsx new file mode 100644 index 000000000..96f78c1a2 --- /dev/null +++ b/apps/docs/src/app/[package]/types/[name]/page.tsx @@ -0,0 +1,28 @@ +"use client"; +import { Prose } from "@/components/Prose"; +import { Content, DefinedIn, Header, TypeDeclaration } from "@/components/docs"; +import { useRouteContext } from "@/contexts/route-context"; +import getType from "@/data/get-type"; + +export default function Page({ params }: { params: { name: string } }) { + const { currentRoute } = useRouteContext(); + + const meshType = getType(params.name, currentRoute); + + if (meshType === undefined) { + return <>; + } + + return ( +
+ +
+ + + + + + +
+ ); +} diff --git a/apps/docs/src/app/[package]/wallets.tsx b/apps/docs/src/app/[package]/wallets.tsx new file mode 100644 index 000000000..84996519c --- /dev/null +++ b/apps/docs/src/app/[package]/wallets.tsx @@ -0,0 +1,31 @@ +import { CodeGroup } from "@/components/Code"; +import { Prose } from "@/components/Prose"; +import Markdown from "react-markdown"; + +export default function IntroWallets() { + return ( +
+ +

Wallets

+

+ Wallet for users to interact with the blockchain and for building + amazing applications +

+ {/*

+ Something +

*/} + {/*

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + */} +
+
+ ); +} diff --git a/apps/mesh-docs/src/app/globals.css b/apps/docs/src/app/globals.css similarity index 100% rename from apps/mesh-docs/src/app/globals.css rename to apps/docs/src/app/globals.css diff --git a/apps/docs/src/app/layout.tsx b/apps/docs/src/app/layout.tsx new file mode 100644 index 000000000..d49b2c700 --- /dev/null +++ b/apps/docs/src/app/layout.tsx @@ -0,0 +1,87 @@ +import "@/styles/tailwind.css"; + +import { Providers } from "@/app/providers"; +import { Layout } from "@/components/Layout"; + +import { type Metadata } from "next"; +import { RouteChangeListener } from "@/components/route-change-listener"; +// import { type Section } from "@/components/SectionProvider"; +// import getClasses from "@/data/get-classes"; +// import getClassGroups from "@/data/get-class-groups"; +// import getInterfaces from "@/data/get-interfaces"; +// import getInterfaceGroups from "@/data/get-interface-groups"; +// import { useRouteContext } from "@/contexts/route-context"; + +export const metadata: Metadata = { + title: { + template: "%s - Mesh SDK API Reference", + default: "Mesh SDK API Reference", + }, +}; + +export default async function RootLayout({ + children, + params, +}: { + children: React.ReactNode; + params: { package: string }; +}) { + // const {currentRoute} = useRouteContext(); + // console.log(2, currentRoute) + // let pages = await glob('**/*.mdx', { cwd: 'src/app' }) + // let allSectionsEntries = (await Promise.all( + // pages.map(async (filename) => [ + // '/' + filename.replace(/(^|\/)page\.mdx$/, ''), + // (await import(`./${filename}`)).sections, + // ]), + // )) as Array<[string, Array
]> + // let allSections = Object.fromEntries(allSectionsEntries) + + ////// + + // // get all classes + // const allSectionsEntries = getClasses().map((meshClass: any) => { + // const _items: { id: string; title: string }[] = []; + + // getClassGroups(meshClass.name).map((group: any) => { + // group.children.map((item: any) => { + // _items.push({ id: item.name, title: item.name }); + // }); + // }); + + // return [`/classes/${meshClass.name}`, _items]; + // }) as Array<[string, Array
]>; + + // // get all interfaces + // const allInterfaces = getInterfaces().map((meshInterfaces: any) => { + // const _items: { id: string; title: string }[] = []; + + // getInterfaceGroups(meshInterfaces.name).map((group: any) => { + // group.children.map((item: any) => { + // _items.push({ id: item.name, title: item.name }); + // }); + // }); + + // return [`/interfaces/${meshInterfaces.name}`, _items]; + // }) as Array<[string, Array
]>; + + // if (allInterfaces) allSectionsEntries.push(...allInterfaces); + + // let allSections = Object.fromEntries(allSectionsEntries); + + return ( + + + + + + +
+ {children} +
+ +
+ + + ); +} diff --git a/apps/docs/src/app/page.tsx b/apps/docs/src/app/page.tsx new file mode 100644 index 000000000..877c57828 --- /dev/null +++ b/apps/docs/src/app/page.tsx @@ -0,0 +1,99 @@ +import { CodeGroup } from '@/components/Code'; +import { Prose } from '@/components/Prose'; +import Markdown from 'react-markdown'; + +export default function Home() { + return ( +
+ +

Mesh Documentation

+

This is the official documentation for Mesh.

+

+ Mesh goes above and beyond to enhance the accessibility and + user-friendliness of Web3 development for developers, startups, and + enterprises. One key aspect is the provision of well-organized APIs, + spanning from wallet integrations to transaction building and smart + contract interactions. To further facilitate a smooth onboarding + process, Mesh offers comprehensive documentation complete with live + demos, enabling developers to test functionalities before diving into + coding. +

+

+ Additionally, Mesh enhances accessibility through the provision of + starter kits, allowing users to set up a functional workspace in less + than a minute and subsequently concentrate on refining the business + logic of their applications. Collaborating closely with the community, + Mesh takes an inclusive approach by running workshops and creating + guides, fostering a supportive environment that helps developers + seamlessly integrate into the Cardano ecosystem. +

+

+ Getting started +

+

+ To get started with Mesh, you need to install the latest version of + Mesh with npm: +

+ + + npm install @meshsdk/core @meshsdk/react + + + {/* */} +
+
+ ); +} + +/** + * these commment codes are wip for the search + */ + +// import getClassGroups from '@/data/get-class-groups'; +// import getClasses from '@/data/get-classes'; +// import { useEffect } from 'react'; + +// function getSectionComments(item: any) { +// return item.comment +// ? item.comment.summary.map((item) => { +// return item.text; +// }) +// : []; +// } + +// useEffect(() => { +// const searchClasses = getClasses().map((meshClass: any) => { +// console.log(11, meshClass); + +// const _object: any = { url: `/classes/${meshClass.name}`, sections: [] }; + +// const _sections: any = []; + +// const _sectionComments = getSectionComments(meshClass); + +// const _section = [meshClass.name, null, _sectionComments]; + +// _sections.push(_section); + +// console.log(11, _section); + +// getClassGroups(meshClass.name).map((group: any) => { +// group.children.map((item: any) => { +// console.log(22, item); + +// item.signatures?.map((signature: any) => { +// const _sectionComments = getSectionComments(signature); +// const _section = [item.name, item.name, _sectionComments]; +// _sections.push(_section); +// console.log(33, _section); +// }); +// }); +// }); + +// _object.sections = _sections; + +// return _object; +// }); + +// console.log(99, JSON.stringify(searchClasses)) +// }, []); diff --git a/apps/docs/src/app/providers.tsx b/apps/docs/src/app/providers.tsx new file mode 100644 index 000000000..62bd4b5ac --- /dev/null +++ b/apps/docs/src/app/providers.tsx @@ -0,0 +1,38 @@ +"use client"; + +import { useEffect } from "react"; +import { ThemeProvider, useTheme } from "next-themes"; +import { RouteProvider } from "@/contexts/route-context"; + +function ThemeWatcher() { + let { resolvedTheme, setTheme } = useTheme(); + + useEffect(() => { + let media = window.matchMedia("(prefers-color-scheme: dark)"); + + function onMediaChange() { + let systemTheme = media.matches ? "dark" : "light"; + if (resolvedTheme === systemTheme) { + setTheme("system"); + } + } + + onMediaChange(); + media.addEventListener("change", onMediaChange); + + return () => { + media.removeEventListener("change", onMediaChange); + }; + }, [resolvedTheme, setTheme]); + + return null; +} + +export function Providers({ children }: { children: React.ReactNode }) { + return ( + + + {children} + + ); +} diff --git a/apps/docs/src/components/Button.tsx b/apps/docs/src/components/Button.tsx new file mode 100644 index 000000000..8e501251e --- /dev/null +++ b/apps/docs/src/components/Button.tsx @@ -0,0 +1,84 @@ +import Link from "next/link"; +import clsx from "clsx"; + +function ArrowIcon(props: React.ComponentPropsWithoutRef<"svg">) { + return ( + + ); +} + +const variantStyles = { + primary: + "rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-1 dark:ring-inset dark:ring-emerald-400/20 dark:hover:bg-emerald-400/10 dark:hover:text-emerald-300 dark:hover:ring-emerald-300", + secondary: + "rounded-full bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400 dark:ring-1 dark:ring-inset dark:ring-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300", + filled: + "rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-emerald-500 dark:text-white dark:hover:bg-emerald-400", + outline: + "rounded-full py-1 px-3 text-zinc-700 ring-1 ring-inset ring-zinc-900/10 hover:bg-zinc-900/2.5 hover:text-zinc-900 dark:text-zinc-400 dark:ring-white/10 dark:hover:bg-white/5 dark:hover:text-white", + text: "text-emerald-500 hover:text-emerald-600 dark:text-emerald-400 dark:hover:text-emerald-500", +}; + +type ButtonProps = { + variant?: keyof typeof variantStyles; + arrow?: "left" | "right"; +} & ( + | React.ComponentPropsWithoutRef + | (React.ComponentPropsWithoutRef<"button"> & { href?: undefined }) +); + +export function Button({ + variant = "primary", + className, + children, + arrow, + ...props +}: ButtonProps) { + className = clsx( + "inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition", + variantStyles[variant], + className + ); + + let arrowIcon = ( + + ); + + let inner = ( + <> + {arrow === "left" && arrowIcon} + {children} + {arrow === "right" && arrowIcon} + + ); + + if (typeof props.href === "undefined") { + return ( + // @ts-ignore + + ); + } + + return ( + // @ts-ignore + + {inner} + + ); +} diff --git a/apps/mesh-docs/src/components/Code.tsx b/apps/docs/src/components/Code.tsx similarity index 100% rename from apps/mesh-docs/src/components/Code.tsx rename to apps/docs/src/components/Code.tsx diff --git a/apps/mesh-docs/src/components/Feedback.tsx b/apps/docs/src/components/Feedback.tsx similarity index 100% rename from apps/mesh-docs/src/components/Feedback.tsx rename to apps/docs/src/components/Feedback.tsx diff --git a/apps/docs/src/components/Footer.tsx b/apps/docs/src/components/Footer.tsx new file mode 100644 index 000000000..358ff735e --- /dev/null +++ b/apps/docs/src/components/Footer.tsx @@ -0,0 +1,147 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; + +import { Button } from "@/components/Button"; +import { discordUrl, githubUrl, twitterhUrl } from "@/config"; +// import { navigation } from '@/components/Navigation' + +function PageLink({ + label, + page, + previous = false, +}: { + label: string; + page: { href: string; title: string }; + previous?: boolean; +}) { + return ( + <> + + + {page.title} + + + ); +} + +function PageNavigation() { + // let pathname = usePathname() + // let allPages = navigation.flatMap((group) => group.links) + // let currentPageIndex = allPages.findIndex((page) => page.href === pathname) + + // if (currentPageIndex === -1) { + // return null + // } + + // let previousPage = allPages[currentPageIndex - 1] + // let nextPage = allPages[currentPageIndex + 1] + + // if (!previousPage && !nextPage) { + // return null + // } + + return ( + //
+ // {previousPage && ( + //
+ // + //
+ // )} + // {nextPage && ( + //
+ // + //
+ // )} + //
+ <> + ); +} + +function XIcon(props: React.ComponentPropsWithoutRef<"svg">) { + return ( + + ); +} + +function GitHubIcon(props: React.ComponentPropsWithoutRef<"svg">) { + return ( + + ); +} + +function DiscordIcon(props: React.ComponentPropsWithoutRef<"svg">) { + return ( + + ); +} + +function SocialLink({ + href, + icon: Icon, + children, +}: { + href: string; + icon: React.ComponentType<{ className?: string }>; + children: React.ReactNode; +}) { + return ( + + {children} + + + ); +} + +function SmallPrint() { + return ( +
+

+ © Copyright {new Date().getFullYear()}. All rights reserved. +

+
+ + Follow us on X + + + Follow us on GitHub + + + Join our Discord server + +
+
+ ); +} + +export function Footer() { + return ( +
+ + +
+ ); +} diff --git a/apps/mesh-docs/src/components/GridPattern.tsx b/apps/docs/src/components/GridPattern.tsx similarity index 100% rename from apps/mesh-docs/src/components/GridPattern.tsx rename to apps/docs/src/components/GridPattern.tsx diff --git a/apps/mesh-docs/src/components/Guides.tsx b/apps/docs/src/components/Guides.tsx similarity index 100% rename from apps/mesh-docs/src/components/Guides.tsx rename to apps/docs/src/components/Guides.tsx diff --git a/apps/docs/src/components/Header.tsx b/apps/docs/src/components/Header.tsx new file mode 100644 index 000000000..cc2637e60 --- /dev/null +++ b/apps/docs/src/components/Header.tsx @@ -0,0 +1,97 @@ +import { forwardRef } from "react"; +import Link from "next/link"; +import clsx from "clsx"; +import { motion, useScroll, useTransform } from "framer-motion"; + +import { Button } from "@/components/Button"; +import { Logo } from "@/components/Logo"; +import { + MobileNavigation, + useIsInsideMobileNavigation, +} from "@/components/MobileNavigation"; +import { useMobileNavigationStore } from "@/components/MobileNavigation"; +// import { MobileSearch, Search } from '@/components/Search' +import { ThemeToggle } from "@/components/ThemeToggle"; + +function TopLevelNavItem({ + href, + children, +}: { + href: string; + children: React.ReactNode; +}) { + return ( +
  • + + {children} + +
  • + ); +} + +export const Header = forwardRef< + React.ElementRef<"div">, + { className?: string } +>(function Header({ className }, ref) { + let { isOpen: mobileNavIsOpen } = useMobileNavigationStore(); + let isInsideMobileNavigation = useIsInsideMobileNavigation(); + + let { scrollY } = useScroll(); + let bgOpacityLight = useTransform(scrollY, [0, 72], [0.5, 0.9]); + let bgOpacityDark = useTransform(scrollY, [0, 72], [0.2, 0.8]); + + return ( + +
    + +
    + + + + +
    + +
    + +
    + +
    +
    + +
    +
    + + ); +}); diff --git a/apps/mesh-docs/src/components/Heading.tsx b/apps/docs/src/components/Heading.tsx similarity index 100% rename from apps/mesh-docs/src/components/Heading.tsx rename to apps/docs/src/components/Heading.tsx diff --git a/apps/mesh-docs/src/components/HeroPattern.tsx b/apps/docs/src/components/HeroPattern.tsx similarity index 100% rename from apps/mesh-docs/src/components/HeroPattern.tsx rename to apps/docs/src/components/HeroPattern.tsx diff --git a/apps/docs/src/components/Layout.tsx b/apps/docs/src/components/Layout.tsx new file mode 100644 index 000000000..12cac47aa --- /dev/null +++ b/apps/docs/src/components/Layout.tsx @@ -0,0 +1,89 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { motion } from "framer-motion"; + +import { Footer } from "@/components/Footer"; +import { Header } from "@/components/Header"; +import { Logo } from "@/components/Logo"; +import { Navigation } from "@/components/Navigation"; +import { type Section, SectionProvider } from "@/components/SectionProvider"; + +import getClasses from "@/data/get-classes"; +import getClassGroups from "@/data/get-class-groups"; +import getInterfaces from "@/data/get-interfaces"; +import getInterfaceGroups from "@/data/get-interface-groups"; +import { useRouteContext } from "@/contexts/route-context"; +import { useEffect, useState } from "react"; + +export function Layout({ children }: { children: React.ReactNode }) { + const [allSections, setAllSections] = useState<{}>({}); + const { currentRoute } = useRouteContext(); + + let pathname = usePathname(); + + useEffect(() => { + // get all classes + const allSectionsEntries = getClasses(currentRoute).map( + (meshClass: any) => { + const _items: { id: string; title: string }[] = []; + + getClassGroups(meshClass.name, currentRoute).map((group: any) => { + group.children.map((item: any) => { + _items.push({ id: item.name, title: item.name }); + }); + }); + + return [`/${currentRoute}/classes/${meshClass.name}`, _items]; + } + ) as Array<[string, Array
    ]>; + + // get all interfaces + const allInterfaces = getInterfaces(currentRoute).map( + (meshInterfaces: any) => { + const _items: { id: string; title: string }[] = []; + + getInterfaceGroups(meshInterfaces.name, currentRoute).map( + (group: any) => { + group.children.map((item: any) => { + _items.push({ id: item.name, title: item.name }); + }); + } + ); + + return [`/${currentRoute}/interfaces/${meshInterfaces.name}`, _items]; + } + ) as Array<[string, Array
    ]>; + + if (allInterfaces) allSectionsEntries.push(...allInterfaces); + + let _allSections = Object.fromEntries(allSectionsEntries); + setAllSections(_allSections); + }, [currentRoute]); + + return ( + +
    + +
    +
    + + + +
    +
    + +
    +
    +
    +
    {children}
    +
    +
    +
    +
    + ); +} diff --git a/apps/mesh-docs/src/components/Libraries.tsx b/apps/docs/src/components/Libraries.tsx similarity index 100% rename from apps/mesh-docs/src/components/Libraries.tsx rename to apps/docs/src/components/Libraries.tsx diff --git a/apps/mesh-docs/src/components/Logo.tsx b/apps/docs/src/components/Logo.tsx similarity index 100% rename from apps/mesh-docs/src/components/Logo.tsx rename to apps/docs/src/components/Logo.tsx diff --git a/apps/mesh-docs/src/components/MobileNavigation.tsx b/apps/docs/src/components/MobileNavigation.tsx similarity index 100% rename from apps/mesh-docs/src/components/MobileNavigation.tsx rename to apps/docs/src/components/MobileNavigation.tsx diff --git a/apps/docs/src/components/Navigation.tsx b/apps/docs/src/components/Navigation.tsx new file mode 100644 index 000000000..8fec7274c --- /dev/null +++ b/apps/docs/src/components/Navigation.tsx @@ -0,0 +1,400 @@ +"use client"; + +import { useRef } from "react"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import clsx from "clsx"; +import { AnimatePresence, motion, useIsPresent } from "framer-motion"; + +import { useIsInsideMobileNavigation } from "@/components/MobileNavigation"; +import { useSectionStore } from "@/components/SectionProvider"; +import { Tag } from "@/components/Tag"; +import { remToPx } from "@/lib/remToPx"; +import getClasses from "@/data/get-classes"; +import getTypes from "@/data/get-types"; +import getInterfaces from "@/data/get-interfaces"; +import getFunctions from "@/data/get-functions"; +import { pageRoutes } from "@/data/page-routes"; +import { useRouteContext } from "@/contexts/route-context"; +import { log } from "console"; + +interface NavGroup { + title: string; + links: Array<{ + title: string; + href: string; + }>; +} + +function useInitialValue(value: T, condition = true) { + let initialValue = useRef(value).current; + return condition ? initialValue : value; +} + +function TopLevelNavItem({ + href, + id, + children, +}: { + href: string; + id: string; + children: React.ReactNode; +}) { + const { currentRoute, setCurrentRoute } = useRouteContext(); + + return ( +
  • + { + setTimeout(() => { + setCurrentRoute(id); + }, 500); + }} + > + {children} + +
  • + ); +} + +function NavLink({ + href, + children, + tag, + active = false, + isAnchorLink = false, +}: { + href: string; + children: React.ReactNode; + tag?: string; + active?: boolean; + isAnchorLink?: boolean; +}) { + return ( + + {children} + {tag && ( + + {tag} + + )} + + ); +} + +function VisibleSectionHighlight({ + group, + pathname, +}: { + group: NavGroup; + pathname: string; +}) { + let [sections, visibleSections] = useInitialValue( + [ + useSectionStore((s) => s.sections), + useSectionStore((s) => s.visibleSections), + ], + useIsInsideMobileNavigation() + ); + + let isPresent = useIsPresent(); + let firstVisibleSectionIndex = Math.max( + 0, + [{ id: "_top" }, ...sections].findIndex( + (section) => section.id === visibleSections[0] + ) + ); + let itemHeight = remToPx(2); + let height = isPresent + ? Math.max(1, visibleSections.length) * itemHeight + : itemHeight; + let top = + group.links.findIndex((link) => link.href === pathname) * itemHeight + + firstVisibleSectionIndex * itemHeight; + + return ( + + ); +} + +function ActivePageMarker({ + group, + pathname, +}: { + group: NavGroup; + pathname: string; +}) { + let itemHeight = remToPx(2); + let offset = remToPx(0.25); + let activePageIndex = group.links.findIndex((link) => link.href === pathname); + let top = offset + activePageIndex * itemHeight; + + return ( + + ); +} + +function NavigationGroup({ + group, + className, +}: { + group: NavGroup; + className?: string; +}) { + // If this is the mobile navigation then we always render the initial + // state, so that the state does not change during the close animation. + // The state will still update when we re-open (re-render) the navigation. + let isInsideMobileNavigation = useIsInsideMobileNavigation(); + let [pathname, sections] = useInitialValue( + [usePathname(), useSectionStore((s) => s.sections)], + isInsideMobileNavigation + ); + + let isActiveGroup = + group.links.findIndex((link) => link.href === pathname) !== -1; + + return ( +
  • + + {group.title} + +
    + + {isActiveGroup && ( + + )} + + + + {isActiveGroup && ( + + )} + +
      + {group.links.map((link) => ( + + + {link.title} + + + + {link.href === pathname && sections.length > 0 && ( + + {sections.map((section) => ( +
    • + + {section.title} + +
    • + ))} +
      + )} +
      +
      + ))} +
    +
    +
  • + ); +} + +// export const navigation: Array = [ +// // { +// // title: 'Guides', +// // links: [ +// // { title: 'Introduction', href: '/' }, +// // { title: 'Quickstart', href: '/quickstart' }, +// // { title: 'SDKs', href: '/sdks' }, +// // { title: 'Authentication', href: '/authentication' }, +// // { title: 'Pagination', href: '/pagination' }, +// // { title: 'Errors', href: '/errors' }, +// // { title: 'Webhooks', href: '/webhooks' }, +// // ], +// // }, +// // { +// // title: 'Resources', +// // links: [ +// // { title: 'Contacts', href: '/contacts' }, +// // { title: 'Conversations', href: '/conversations' }, +// // { title: 'Messages', href: '/messages' }, +// // { title: 'Groups', href: '/groups' }, +// // { title: 'Attachments', href: '/attachments' }, +// // ], +// // }, +// { +// title: "Classes", +// links: getClasses('transaction').map((item: any) => { +// return { title: item.name, href: `/classes/${item.name}` }; +// }), +// }, +// { +// title: "Interfaces", +// links: getInterfaces('transaction').map((item: any) => { +// return { title: item.name, href: `/interfaces/${item.name}` }; +// }), +// }, +// { +// title: "Types", +// links: getTypes('transaction').map((item: any) => { +// return { title: item.name, href: `/types/${item.name}` }; +// }), +// }, +// { +// title: "Functions", +// links: getFunctions('transaction').map((item: any) => { +// return { title: item.name, href: `/functions/${item.name}` }; +// }), +// }, +// ]; + +export function Navigation(props: React.ComponentPropsWithoutRef<"nav">) { + const { currentRoute } = useRouteContext(); + + const navigation: Array = [ + // { + // title: 'Guides', + // links: [ + // { title: 'Introduction', href: '/' }, + // { title: 'Quickstart', href: '/quickstart' }, + // { title: 'SDKs', href: '/sdks' }, + // { title: 'Authentication', href: '/authentication' }, + // { title: 'Pagination', href: '/pagination' }, + // { title: 'Errors', href: '/errors' }, + // { title: 'Webhooks', href: '/webhooks' }, + // ], + // }, + // { + // title: 'Resources', + // links: [ + // { title: 'Contacts', href: '/contacts' }, + // { title: 'Conversations', href: '/conversations' }, + // { title: 'Messages', href: '/messages' }, + // { title: 'Groups', href: '/groups' }, + // { title: 'Attachments', href: '/attachments' }, + // ], + // }, + { + title: "Classes", + links: getClasses(currentRoute).map((item: any) => { + return { + title: item.name, + href: `/${currentRoute}/classes/${item.name}`, + }; + }), + }, + { + title: "Interfaces", + links: getInterfaces(currentRoute).map((item: any) => { + return { + title: item.name, + href: `/${currentRoute}/interfaces/${item.name}`, + }; + }), + }, + { + title: "Types", + links: getTypes(currentRoute).map((item: any) => { + return { + title: item.name, + href: `/${currentRoute}/types/${item.name}`, + }; + }), + }, + { + title: "Functions", + links: getFunctions(currentRoute).map((item: any) => { + return { + title: item.name, + href: `/${currentRoute}/functions/${item.name}`, + }; + }), + }, + ]; + + return ( + + ); +} diff --git a/apps/mesh-docs/src/components/Prose.tsx b/apps/docs/src/components/Prose.tsx similarity index 100% rename from apps/mesh-docs/src/components/Prose.tsx rename to apps/docs/src/components/Prose.tsx diff --git a/apps/mesh-docs/src/components/Resources.tsx b/apps/docs/src/components/Resources.tsx similarity index 100% rename from apps/mesh-docs/src/components/Resources.tsx rename to apps/docs/src/components/Resources.tsx diff --git a/apps/mesh-docs/src/components/Search.tsx b/apps/docs/src/components/Search.tsx similarity index 100% rename from apps/mesh-docs/src/components/Search.tsx rename to apps/docs/src/components/Search.tsx diff --git a/apps/mesh-docs/src/components/SectionProvider.tsx b/apps/docs/src/components/SectionProvider.tsx similarity index 100% rename from apps/mesh-docs/src/components/SectionProvider.tsx rename to apps/docs/src/components/SectionProvider.tsx diff --git a/apps/mesh-docs/src/components/Tag.tsx b/apps/docs/src/components/Tag.tsx similarity index 100% rename from apps/mesh-docs/src/components/Tag.tsx rename to apps/docs/src/components/Tag.tsx diff --git a/apps/mesh-docs/src/components/ThemeToggle.tsx b/apps/docs/src/components/ThemeToggle.tsx similarity index 100% rename from apps/mesh-docs/src/components/ThemeToggle.tsx rename to apps/docs/src/components/ThemeToggle.tsx diff --git a/apps/mesh-docs/src/components/docs/index.tsx b/apps/docs/src/components/docs/index.tsx similarity index 100% rename from apps/mesh-docs/src/components/docs/index.tsx rename to apps/docs/src/components/docs/index.tsx diff --git a/apps/mesh-docs/src/components/icons/BellIcon.tsx b/apps/docs/src/components/icons/BellIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/BellIcon.tsx rename to apps/docs/src/components/icons/BellIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/BoltIcon.tsx b/apps/docs/src/components/icons/BoltIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/BoltIcon.tsx rename to apps/docs/src/components/icons/BoltIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/BookIcon.tsx b/apps/docs/src/components/icons/BookIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/BookIcon.tsx rename to apps/docs/src/components/icons/BookIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/CalendarIcon.tsx b/apps/docs/src/components/icons/CalendarIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/CalendarIcon.tsx rename to apps/docs/src/components/icons/CalendarIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/CartIcon.tsx b/apps/docs/src/components/icons/CartIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/CartIcon.tsx rename to apps/docs/src/components/icons/CartIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ChatBubbleIcon.tsx b/apps/docs/src/components/icons/ChatBubbleIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ChatBubbleIcon.tsx rename to apps/docs/src/components/icons/ChatBubbleIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/CheckIcon.tsx b/apps/docs/src/components/icons/CheckIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/CheckIcon.tsx rename to apps/docs/src/components/icons/CheckIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ChevronRightLeftIcon.tsx b/apps/docs/src/components/icons/ChevronRightLeftIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ChevronRightLeftIcon.tsx rename to apps/docs/src/components/icons/ChevronRightLeftIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ClipboardIcon.tsx b/apps/docs/src/components/icons/ClipboardIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ClipboardIcon.tsx rename to apps/docs/src/components/icons/ClipboardIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/CogIcon.tsx b/apps/docs/src/components/icons/CogIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/CogIcon.tsx rename to apps/docs/src/components/icons/CogIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/CopyIcon.tsx b/apps/docs/src/components/icons/CopyIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/CopyIcon.tsx rename to apps/docs/src/components/icons/CopyIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/DocumentIcon.tsx b/apps/docs/src/components/icons/DocumentIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/DocumentIcon.tsx rename to apps/docs/src/components/icons/DocumentIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/EnvelopeIcon.tsx b/apps/docs/src/components/icons/EnvelopeIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/EnvelopeIcon.tsx rename to apps/docs/src/components/icons/EnvelopeIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/FaceSmileIcon.tsx b/apps/docs/src/components/icons/FaceSmileIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/FaceSmileIcon.tsx rename to apps/docs/src/components/icons/FaceSmileIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/FolderIcon.tsx b/apps/docs/src/components/icons/FolderIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/FolderIcon.tsx rename to apps/docs/src/components/icons/FolderIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/LinkIcon.tsx b/apps/docs/src/components/icons/LinkIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/LinkIcon.tsx rename to apps/docs/src/components/icons/LinkIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ListIcon.tsx b/apps/docs/src/components/icons/ListIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ListIcon.tsx rename to apps/docs/src/components/icons/ListIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/MagnifyingGlassIcon.tsx b/apps/docs/src/components/icons/MagnifyingGlassIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/MagnifyingGlassIcon.tsx rename to apps/docs/src/components/icons/MagnifyingGlassIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/MapPinIcon.tsx b/apps/docs/src/components/icons/MapPinIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/MapPinIcon.tsx rename to apps/docs/src/components/icons/MapPinIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/PackageIcon.tsx b/apps/docs/src/components/icons/PackageIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/PackageIcon.tsx rename to apps/docs/src/components/icons/PackageIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/PaperAirplaneIcon.tsx b/apps/docs/src/components/icons/PaperAirplaneIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/PaperAirplaneIcon.tsx rename to apps/docs/src/components/icons/PaperAirplaneIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/PaperClipIcon.tsx b/apps/docs/src/components/icons/PaperClipIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/PaperClipIcon.tsx rename to apps/docs/src/components/icons/PaperClipIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ShapesIcon.tsx b/apps/docs/src/components/icons/ShapesIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ShapesIcon.tsx rename to apps/docs/src/components/icons/ShapesIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/ShirtIcon.tsx b/apps/docs/src/components/icons/ShirtIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/ShirtIcon.tsx rename to apps/docs/src/components/icons/ShirtIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/SquaresPlusIcon.tsx b/apps/docs/src/components/icons/SquaresPlusIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/SquaresPlusIcon.tsx rename to apps/docs/src/components/icons/SquaresPlusIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/TagIcon.tsx b/apps/docs/src/components/icons/TagIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/TagIcon.tsx rename to apps/docs/src/components/icons/TagIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/UserIcon.tsx b/apps/docs/src/components/icons/UserIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/UserIcon.tsx rename to apps/docs/src/components/icons/UserIcon.tsx diff --git a/apps/mesh-docs/src/components/icons/UsersIcon.tsx b/apps/docs/src/components/icons/UsersIcon.tsx similarity index 100% rename from apps/mesh-docs/src/components/icons/UsersIcon.tsx rename to apps/docs/src/components/icons/UsersIcon.tsx diff --git a/apps/mesh-docs/src/components/mdx.tsx b/apps/docs/src/components/mdx.tsx similarity index 81% rename from apps/mesh-docs/src/components/mdx.tsx rename to apps/docs/src/components/mdx.tsx index b9a1a1911..163b5ddef 100644 --- a/apps/mesh-docs/src/components/mdx.tsx +++ b/apps/docs/src/components/mdx.tsx @@ -1,15 +1,18 @@ -import Link from 'next/link'; -import clsx from 'clsx'; +"use client"; -import { Feedback } from '@/components/Feedback'; -import { Heading } from '@/components/Heading'; -import { Prose } from '@/components/Prose'; -import getChildrenById from '@/data/get-children-by-id'; -import { githubFileUrl } from '@/config'; +import Link from "next/link"; +import clsx from "clsx"; + +import { Feedback } from "@/components/Feedback"; +import { Heading } from "@/components/Heading"; +import { Prose } from "@/components/Prose"; +import getChildrenById from "@/data/get-children-by-id"; +import { githubFileUrl } from "@/config"; +import { useRouteContext } from "@/contexts/route-context"; export const a = Link; -export { Button } from '@/components/Button'; -export { CodeGroup, Code as code, Pre as pre } from '@/components/Code'; +export { Button } from "@/components/Button"; +export { CodeGroup, Code as code, Pre as pre } from "@/components/Code"; export function wrapper({ children }: { children: React.ReactNode }) { return ( @@ -23,12 +26,12 @@ export function wrapper({ children }: { children: React.ReactNode }) { } export const h2 = function H2( - props: Omit, 'level'> + props: Omit, "level"> ) { return ; }; -function InfoIcon(props: React.ComponentPropsWithoutRef<'svg'>) { +function InfoIcon(props: React.ComponentPropsWithoutRef<"svg">) { return (
    :first-child]:mt-0 [&>:last-child]:mb-0', - sticky && 'xl:sticky xl:top-24' + "[&>:first-child]:mt-0 [&>:last-child]:mb-0", + sticky && "xl:sticky xl:top-24" )} > {children} @@ -110,15 +113,18 @@ export function Property({ isPromise?: boolean; isArray?: boolean; }) { + const { currentRoute } = useRouteContext(); + let item: undefined | { kind: string | number } = undefined; + if (data && data.target) { - item = getChildrenById(data.target); + item = getChildrenById(data.target, currentRoute); } let link = ``; if (item) { - if (item.kind == 'Class') link = `/classes/${type}`; - if (item.kind == 'Type') link = `/types/${type}`; + if (item.kind == "Class") link = `/classes/${type}`; + if (item.kind == "Type") link = `/types/${type}`; } else if (data?.target?.sourceFileName) { link = `${githubFileUrl}${data.target.sourceFileName}`; } @@ -137,7 +143,7 @@ export function Property({ {type && ( <>
    Type
    - {data && data.type == 'reference' ? ( + {data && data.type == "reference" ? ( <> {} diff --git a/apps/docs/src/components/route-change-listener.tsx b/apps/docs/src/components/route-change-listener.tsx new file mode 100644 index 000000000..2fa5e523f --- /dev/null +++ b/apps/docs/src/components/route-change-listener.tsx @@ -0,0 +1,22 @@ +"use client"; + +import { useRouteContext } from "@/contexts/route-context"; +import { usePathname } from "next/navigation"; +import { useEffect } from "react"; + +export function RouteChangeListener() { + const pathname = usePathname(); + const { setCurrentRoute } = useRouteContext(); + + useEffect(() => { + const currentPackage = pathname.split("/")[1]; + + if (currentPackage) { + setCurrentRoute(currentPackage); + } else { + setCurrentRoute(""); + } + }, [pathname]); + + return <>; +} diff --git a/apps/docs/src/config/index.ts b/apps/docs/src/config/index.ts new file mode 100644 index 000000000..17985b37e --- /dev/null +++ b/apps/docs/src/config/index.ts @@ -0,0 +1,4 @@ +export const githubFileUrl = `https://github.com/MeshJS/mesh/blob/main/packages/module/`; +export const githubUrl = `https://github.com/MeshJS`; +export const twitterhUrl = `https://twitter.com/meshsdk`; +export const discordUrl = `https://discord.gg/WvnCNqmAxy`; diff --git a/apps/docs/src/contexts/route-context.tsx b/apps/docs/src/contexts/route-context.tsx new file mode 100644 index 000000000..d5c46c2bd --- /dev/null +++ b/apps/docs/src/contexts/route-context.tsx @@ -0,0 +1,30 @@ +"use client"; + +import React, { createContext, useContext, useMemo, useState } from "react"; + +const RouteContext = createContext({ + currentRoute: "", + setCurrentRoute: (route: string) => {}, +}); + +export const RouteProvider = ({ children }: { children: React.ReactNode }) => { + const [currentRoute, setCurrentRoute] = useState(""); + + const memoedValue = useMemo( + () => ({ + currentRoute, + setCurrentRoute, + }), + [currentRoute, setCurrentRoute] + ); + + return ( + + {children} + + ); +}; + +export function useRouteContext() { + return useContext(RouteContext); +} diff --git a/apps/docs/src/data/get-children-by-id.ts b/apps/docs/src/data/get-children-by-id.ts new file mode 100644 index 000000000..0b24c3dd9 --- /dev/null +++ b/apps/docs/src/data/get-children-by-id.ts @@ -0,0 +1,24 @@ +import getData from "./get-data"; +import { findObjectInArray } from "./utils"; + +export default function getChildrenById(id: number, dataSource: string) { + let data: any = getData(dataSource); + if (data === undefined) return []; + + const child = findObjectInArray({ + array: data.children, + key: "id", + value: id, + }); + if (child) { + if (child.kind) { + if (child.kind == 128) child.kind = "Class"; + // if(child.kind == 256) child.kind = 'Interface'; + // if(child.kind == 512) child.kind = 'Constructor'; + // if(child.kind == 1024) child.kind = ''; + // if(child.kind == 2048) child.kind = 'Function'; + if (child.kind == 2097152) child.kind = "Type"; + } + } + return child; +} diff --git a/apps/docs/src/data/get-class-children.ts b/apps/docs/src/data/get-class-children.ts new file mode 100644 index 000000000..797066bbe --- /dev/null +++ b/apps/docs/src/data/get-class-children.ts @@ -0,0 +1,18 @@ +import getClass from "./get-class"; +import { findObjectInArray } from "./utils"; + +export default function getClassChildren( + name: string, + id: number, + dataSource: string +) { + const thisClass = getClass(name, dataSource); + + const children = findObjectInArray({ + array: thisClass.children, + key: "id", + value: id, + }); + + return children; +} diff --git a/apps/docs/src/data/get-class-groups.ts b/apps/docs/src/data/get-class-groups.ts new file mode 100644 index 000000000..b8513c646 --- /dev/null +++ b/apps/docs/src/data/get-class-groups.ts @@ -0,0 +1,31 @@ +import getClass from "./get-class"; +import { findObjectInArray } from "./utils"; + +export default function getClassGroups(name, dataSource: string) { + if (!name) return []; + + const thisClass = getClass(name, dataSource); + + const groups = thisClass.groups.map((group) => { + return { + title: group.title, + children: group.children + .map((id) => { + return findObjectInArray({ + array: thisClass.children, + key: "id", + value: id, + }); + }) + .filter((child) => { + if (child.flags.isPrivate == true || child.flags.isProtected == true) + return false; + return true; + }), + }; + }); + + if (!groups) return []; + + return groups; +} diff --git a/apps/docs/src/data/get-class.ts b/apps/docs/src/data/get-class.ts new file mode 100644 index 000000000..687585b7d --- /dev/null +++ b/apps/docs/src/data/get-class.ts @@ -0,0 +1,14 @@ +import getClasses from "./get-classes"; +import { findObjectInArray } from "./utils"; + +export default function getClass(name, dataSource: string) { + const classes = getClasses(dataSource); + + const meshClass = findObjectInArray({ + array: classes, + key: "name", + value: name, + }); + + return meshClass; +} diff --git a/apps/docs/src/data/get-classes.ts b/apps/docs/src/data/get-classes.ts new file mode 100644 index 000000000..c7a846a2b --- /dev/null +++ b/apps/docs/src/data/get-classes.ts @@ -0,0 +1,26 @@ +import getData from "./get-data"; +import { findObjectInArray } from "./utils"; + +export default function getClasses(dataSource: string) { + let data: any = getData(dataSource); + if (data === undefined) return []; + + const groupClasses = findObjectInArray({ + array: data.groups, + key: "title", + value: "Classes", + }); + + const classes = groupClasses.children.map((child: any) => { + const classData = findObjectInArray({ + array: data.children, + key: "id", + value: child, + }); + return classData; + }); + + if (!classes) return []; + + return classes; +} diff --git a/apps/docs/src/data/get-data.ts b/apps/docs/src/data/get-data.ts new file mode 100644 index 000000000..10a381f99 --- /dev/null +++ b/apps/docs/src/data/get-data.ts @@ -0,0 +1,30 @@ +import data_transactions from "./mesh-transactions.json"; +import data_wallets from "./mesh-wallets.json"; +import data_contracts from "./mesh-contracts.json"; +import data_providers from "./mesh-providers.json"; +import data_common from "./mesh-common.json"; +import data_core_csl from "./mesh-core-csl.json"; + +export default function getData(dataSource: string) { + let data: any = undefined; + if (dataSource == "common") { + data = data_common; + } + if (dataSource == "contracts") { + data = data_contracts; + } + if (dataSource == "core-csl") { + data = data_core_csl; + } + if (dataSource == "providers") { + data = data_providers; + } + if (dataSource == "transactions") { + data = data_transactions; + } + if (dataSource == "wallets") { + data = data_wallets; + } + + return data; +} diff --git a/apps/docs/src/data/get-function.ts b/apps/docs/src/data/get-function.ts new file mode 100644 index 000000000..f33a0b720 --- /dev/null +++ b/apps/docs/src/data/get-function.ts @@ -0,0 +1,12 @@ +import getFunctions from './get-functions'; +import { findObjectInArray } from './utils'; + +export default function getFunction(name: string, dataSource: string) { + const functions = getFunctions(dataSource); + + return findObjectInArray({ + array: functions, + key: 'name', + value: name, + }); +} diff --git a/apps/docs/src/data/get-functions.ts b/apps/docs/src/data/get-functions.ts new file mode 100644 index 000000000..82c2e4b9a --- /dev/null +++ b/apps/docs/src/data/get-functions.ts @@ -0,0 +1,26 @@ +import getData from "./get-data"; +import { findObjectInArray } from "./utils"; + +export default function getFunctions(dataSource: string) { + let data: any = getData(dataSource); + if (data === undefined) return []; + + const group = findObjectInArray({ + array: data.groups, + key: "title", + value: "Functions", + }); + + const classes = group?.children.map((child: any) => { + const classData = findObjectInArray({ + array: data.children, + key: "id", + value: child, + }); + return classData; + }); + + if (!classes) return []; + + return classes; +} diff --git a/apps/docs/src/data/get-interface-groups.ts b/apps/docs/src/data/get-interface-groups.ts new file mode 100644 index 000000000..1f2c7c4ad --- /dev/null +++ b/apps/docs/src/data/get-interface-groups.ts @@ -0,0 +1,31 @@ +import getInterface from "./get-interface"; +import { findObjectInArray } from "./utils"; + +export default function getInterfaceGroups(name: string, dataSource: string) { + const thisInterface = getInterface(name, dataSource); + + if(thisInterface === undefined) return []; + + const groups = thisInterface.groups.map((group: any) => { + return { + title: group.title, + children: group.children + .map((id: number) => { + return findObjectInArray({ + array: thisInterface.children, + key: "id", + value: id, + }); + }) + .filter((child: any) => { + if (child.flags.isPrivate == true || child.flags.isProtected == true) + return false; + return true; + }), + }; + }); + + if (!groups) return []; + + return groups; +} diff --git a/apps/docs/src/data/get-interface.ts b/apps/docs/src/data/get-interface.ts new file mode 100644 index 000000000..ed20e13bf --- /dev/null +++ b/apps/docs/src/data/get-interface.ts @@ -0,0 +1,12 @@ +import getInterfaces from './get-interfaces'; +import { findObjectInArray } from './utils'; + +export default function getInterface(name: string, dataSource: string) { + const interfaces = getInterfaces(dataSource); + + return findObjectInArray({ + array: interfaces, + key: 'name', + value: name, + }); +} diff --git a/apps/docs/src/data/get-interfaces.ts b/apps/docs/src/data/get-interfaces.ts new file mode 100644 index 000000000..e3f0b9e52 --- /dev/null +++ b/apps/docs/src/data/get-interfaces.ts @@ -0,0 +1,26 @@ +import getData from "./get-data"; +import { findObjectInArray } from "./utils"; + +export default function getInterfaces(dataSource: string) { + let data: any = getData(dataSource); + if (data === undefined) return []; + + const group = findObjectInArray({ + array: data.groups, + key: "title", + value: "Interfaces", + }); + + const classes = group?.children.map((child: any) => { + const classData = findObjectInArray({ + array: data.children, + key: "id", + value: child, + }); + return classData; + }); + + if (!classes) return []; + + return classes; +} diff --git a/apps/docs/src/data/get-type.ts b/apps/docs/src/data/get-type.ts new file mode 100644 index 000000000..6df868ec4 --- /dev/null +++ b/apps/docs/src/data/get-type.ts @@ -0,0 +1,12 @@ +import getTypes from "./get-types"; +import { findObjectInArray } from "./utils"; + +export default function getType(name: string, dataSource: string) { + const types = getTypes(dataSource); + + return findObjectInArray({ + array: types, + key: "name", + value: name, + }); +} diff --git a/apps/docs/src/data/get-types.ts b/apps/docs/src/data/get-types.ts new file mode 100644 index 000000000..645b48001 --- /dev/null +++ b/apps/docs/src/data/get-types.ts @@ -0,0 +1,28 @@ +import getData from "./get-data"; +import { findObjectInArray } from "./utils"; + +export default function getTypes(dataSource: string) { + let data: any = getData(dataSource); + if (data === undefined) return []; + + const group = findObjectInArray({ + array: data.groups, + key: "title", + value: "Type Aliases", + }); + + if (group === undefined) return []; + + const classes = group.children.map((child: any) => { + const classData = findObjectInArray({ + array: data.children, + key: "id", + value: child, + }); + return classData; + }); + + if (!classes) return []; + + return classes; +} diff --git a/apps/docs/src/data/page-routes.ts b/apps/docs/src/data/page-routes.ts new file mode 100644 index 000000000..b193c51f1 --- /dev/null +++ b/apps/docs/src/data/page-routes.ts @@ -0,0 +1,32 @@ +export const pageRoutes = [ + { + id: "common", + url: "/common", + title: "Common", + }, + { + id: "contracts", + url: "/contracts", + title: "Contracts", + }, + { + id: "core-csl", + url: "/core-csl", + title: "Core CSL", + }, + { + id: "providers", + url: "/providers", + title: "Providers", + }, + { + id: "transactions", + url: "/transactions", + title: "Transactions", + }, + { + id: "wallets", + url: "/wallets", + title: "Wallets", + }, +]; diff --git a/apps/mesh-docs/src/data/utils.ts b/apps/docs/src/data/utils.ts similarity index 100% rename from apps/mesh-docs/src/data/utils.ts rename to apps/docs/src/data/utils.ts diff --git a/apps/mesh-web/public/favicon/favicon.ico b/apps/docs/src/favicon.ico similarity index 100% rename from apps/mesh-web/public/favicon/favicon.ico rename to apps/docs/src/favicon.ico diff --git a/apps/mesh-docs/src/lib/remToPx.ts b/apps/docs/src/lib/remToPx.ts similarity index 100% rename from apps/mesh-docs/src/lib/remToPx.ts rename to apps/docs/src/lib/remToPx.ts diff --git a/apps/mesh-docs/src/mdx/recma.mjs b/apps/docs/src/mdx/recma.mjs similarity index 100% rename from apps/mesh-docs/src/mdx/recma.mjs rename to apps/docs/src/mdx/recma.mjs diff --git a/apps/mesh-docs/src/mdx/rehype.mjs b/apps/docs/src/mdx/rehype.mjs similarity index 100% rename from apps/mesh-docs/src/mdx/rehype.mjs rename to apps/docs/src/mdx/rehype.mjs diff --git a/apps/mesh-docs/src/mdx/remark.mjs b/apps/docs/src/mdx/remark.mjs similarity index 100% rename from apps/mesh-docs/src/mdx/remark.mjs rename to apps/docs/src/mdx/remark.mjs diff --git a/apps/mesh-docs/src/mdx/search.mjs b/apps/docs/src/mdx/search.mjs similarity index 100% rename from apps/mesh-docs/src/mdx/search.mjs rename to apps/docs/src/mdx/search.mjs diff --git a/apps/mesh-docs/src/styles/tailwind.css b/apps/docs/src/styles/tailwind.css similarity index 100% rename from apps/mesh-docs/src/styles/tailwind.css rename to apps/docs/src/styles/tailwind.css diff --git a/apps/mesh-docs/tailwind.config.ts b/apps/docs/tailwind.config.ts similarity index 100% rename from apps/mesh-docs/tailwind.config.ts rename to apps/docs/tailwind.config.ts diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json new file mode 100644 index 000000000..d92effdde --- /dev/null +++ b/apps/docs/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + }, + "noImplicitAny": false, + "strictNullChecks": false, + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/apps/mesh-docs/typography.ts b/apps/docs/typography.ts similarity index 100% rename from apps/mesh-docs/typography.ts rename to apps/docs/typography.ts diff --git a/apps/mesh-cli/README.md b/apps/mesh-cli/README.md deleted file mode 100644 index ca38d9a46..000000000 --- a/apps/mesh-cli/README.md +++ /dev/null @@ -1,21 +0,0 @@ -![Mesh Logo](https://meshjs.dev/logo-mesh/mesh.png) - -Mesh is an open-source library to make building dApps accessible. Whether you're a beginner developer, startup, web3 market leader, or a large enterprise, Mesh makes web3 development easy with reliable, scalable, and well-engineered APIs & developer tools. - -```sh -Usage: create-mesh-app [options] - -A quick and easy way to bootstrap your dApps on Cardano using Mesh. - -Arguments: - name Set a name for your dApp. - -Options: - -V, --version output the version number - -t, --template The template to start your project from. (choices: "starter", "minting", "marketplace") - -s, --stack The tech stack you want to build on. (choices: "next", "remix") - -l, --language The language you want to use. (choices: "js", "ts") - -h, --help display help for command -``` - -Explore the features on [Mesh Playground](https://meshjs.dev/). diff --git a/apps/mesh-cli/bin/create-mesh-app b/apps/mesh-cli/bin/create-mesh-app deleted file mode 100755 index c6cf500c1..000000000 --- a/apps/mesh-cli/bin/create-mesh-app +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env node -require('../dist/create-mesh-app.cjs.js'); diff --git a/apps/mesh-cli/package.json b/apps/mesh-cli/package.json deleted file mode 100644 index f322f2707..000000000 --- a/apps/mesh-cli/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "create-mesh-app", - "description": "A quick and easy way to bootstrap your dApps on Cardano using Mesh.", - "homepage": "https://meshjs.dev", - "author": "MeshJS", - "version": "1.0.7", - "license": "Apache-2.0", - "main": "dist/create-mesh-app.cjs.js", - "bin": { - "create-mesh-app": "./bin/create-mesh-app" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/MeshJS/mesh.git" - }, - "bugs": { - "url": "https://github.com/MeshJS/mesh/issues" - }, - "keywords": [ - "blockchain", - "cardano", - "dapp", - "npx" - ], - "scripts": { - "build": "preconstruct build", - "dev": "preconstruct watch" - }, - "dependencies": { - "chalk": "5.3.0", - "commander": "12.1.0", - "figlet": "1.7.0", - "got": "14.4.1", - "prompts": "2.4.2", - "tar": "7.2.0" - }, - "devDependencies": { - "@preconstruct/cli": "2.8.4", - "@types/figlet": "1.5.8", - "@types/prompts": "2.4.9", - "@types/tar": "6.1.13" - } -} diff --git a/apps/mesh-cli/src/actions/create.ts b/apps/mesh-cli/src/actions/create.ts deleted file mode 100644 index 28acc90db..000000000 --- a/apps/mesh-cli/src/actions/create.ts +++ /dev/null @@ -1,113 +0,0 @@ -import got from 'got'; -import prompts from 'prompts'; -import { extract } from 'tar'; -import { promisify } from 'util'; -import { pipeline } from 'stream'; -import { existsSync, mkdirSync } from 'fs'; -import { execSync } from 'child_process'; -import { resolvePkgManager, setProjectName, tryGitInit } from '../helpers'; -import { logError, logInfo } from '../utils'; - -export const create = async (name, options) => { - const template = - options.template ?? - (await askUser('What template do you want to use?', [ - { title: 'Starter Project', value: 'starter' }, - { title: 'Multi-Sig Minting', value: 'minting' }, - { title: 'Stake-Pool Website', value: 'staking' }, - { title: 'Cardano Sign-In', value: 'signin' }, - { title: 'E-Commerce Store', value: 'ecommerce' }, - { title: 'Marketplace', value: 'marketplace' }, - { title: 'Aiken', value: 'aiken' }, - ])); - - const stack = - options.stack ?? - (await askUser('What Stack do you want to use?', [ - { title: 'Next.js', value: 'next' }, - ])); - - const language = - options.language ?? - (await askUser('What language do you want to use?', [ - { title: 'TypeScript', value: 'ts' }, - ])); - - console.log('\n'); - - try { - createDirectory(name); - - logInfo('📡 - Downloading files..., This might take a moment.'); - await fetchRepository(template, stack, language); - - logInfo('🏠 - Starting a new git repository...'); - setNameAndCommitChanges(name); - - logInfo('🧶 - Installing project dependencies...'); - installDependencies(); - } catch (error) { - logError(error); - process.exit(1); - } -}; - -const askUser = async (question, choices) => { - const response = await prompts( - { - type: 'select', - message: question, - name: 'selection', - choices, - }, - { - onCancel: () => process.exit(0), - } - ); - - return response.selection; -}; - -const createDirectory = (name) => { - const path = `${process.cwd()}/${name}`; - - if (existsSync(path)) { - logError(`❗ A directory with name: "${name}" already exists.`); - process.exit(1); - } - - if (mkdirSync(path, { recursive: true }) === undefined) { - logError('❌ Unable to create a project in current directory.'); - process.exit(1); - } - - logInfo('🏗️ - Creating a new mesh dApp in current directory...'); - process.chdir(path); -}; - -const fetchRepository = async (template, stack, language) => { - const pipe = promisify(pipeline); - const name = `${template}-${stack}-${language}-template`; - const link = `https://codeload.github.com/MeshJS/${name}/tar.gz/main`; - - await pipe(got.stream(link), extract({ strip: 1 }, [`${name}-main`])); -}; - -const setNameAndCommitChanges = (name) => { - try { - setProjectName(process.cwd(), name); - } catch (_) { - logError('🚫 Failed to re-name package.json, continuing...'); - } - - tryGitInit(); -}; - -const installDependencies = () => { - try { - const pkgManager = resolvePkgManager(); - execSync(`${pkgManager} install`, { stdio: [0, 1, 2] }); - } catch (_) { - logError('🚫 Failed to install project dependencies, continuing...'); - } -}; diff --git a/apps/mesh-cli/src/actions/index.ts b/apps/mesh-cli/src/actions/index.ts deleted file mode 100644 index 1e03cceb8..000000000 --- a/apps/mesh-cli/src/actions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './create'; diff --git a/apps/mesh-cli/src/helpers/index.ts b/apps/mesh-cli/src/helpers/index.ts deleted file mode 100644 index 785b3c460..000000000 --- a/apps/mesh-cli/src/helpers/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './resolvePkgManager'; -export * from './setProjectName'; -export * from './tryGitInit'; diff --git a/apps/mesh-cli/src/helpers/resolvePkgManager.ts b/apps/mesh-cli/src/helpers/resolvePkgManager.ts deleted file mode 100644 index cd5f293f7..000000000 --- a/apps/mesh-cli/src/helpers/resolvePkgManager.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { execSync } from 'child_process'; - -export const resolvePkgManager = () => { - try { - const userAgent = process.env.npm_config_user_agent; - if (userAgent?.startsWith('yarn')) { - return 'yarn'; - } - - if (userAgent?.startsWith('pnpm')) { - return 'pnpm'; - } - - try { - execSync('yarn --version', { stdio: 'ignore' }); - return 'yarn'; - } catch (_) { - execSync('pnpm --version', { stdio: 'ignore' }); - return 'pnpm'; - } - } catch (_) { - return 'npm'; - } -}; diff --git a/apps/mesh-cli/src/helpers/setProjectName.ts b/apps/mesh-cli/src/helpers/setProjectName.ts deleted file mode 100644 index 21bf6cbda..000000000 --- a/apps/mesh-cli/src/helpers/setProjectName.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { EOL } from 'os'; -import { join } from 'path'; -import { readFileSync, writeFileSync } from 'fs'; - -export const setProjectName = (path, name) => { - const packagePath = join(path, 'package.json'); - const packageContent = readFileSync(packagePath); - const packageJson = JSON.parse(packageContent.toString()); - - if (packageJson) { - packageJson.name = name; - } - - writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + EOL); -}; diff --git a/apps/mesh-cli/src/helpers/tryGitInit.ts b/apps/mesh-cli/src/helpers/tryGitInit.ts deleted file mode 100644 index cd6d23e1e..000000000 --- a/apps/mesh-cli/src/helpers/tryGitInit.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { execSync } from 'child_process'; - -export const tryGitInit = () => { - try { - execSync('git --version', { stdio: 'ignore' }); - - if (isInGitRepository() || isInMercurialRepository()) { - return false; - } - - execSync('git init', { stdio: 'ignore' }); - execSync('git checkout -b main', { stdio: 'ignore' }); - execSync('git add -A', { stdio: 'ignore' }); - execSync('git commit -m "Initial commit from npx mesh-create-dapp"', { - stdio: 'ignore', - }); - return true; - } catch (_) { - return false; - } -}; - -const isInGitRepository = () => { - try { - execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' }); - return true; - } catch (_) {} - return false; -}; - -const isInMercurialRepository = () => { - try { - execSync('hg --cwd . root', { stdio: 'ignore' }); - return true; - } catch (_) {} - return false; -}; diff --git a/apps/mesh-cli/src/index.ts b/apps/mesh-cli/src/index.ts deleted file mode 100644 index 3127c3660..000000000 --- a/apps/mesh-cli/src/index.ts +++ /dev/null @@ -1,77 +0,0 @@ -import chalk from 'chalk'; -import figlet from 'figlet'; -import { - createArgument, createCommand, - createOption, InvalidArgumentError, -} from 'commander'; -import { create } from './actions'; -import { logError, logSuccess } from './utils'; - -const main = async () => { - console.clear(); - - console.info( - chalk.blue( - figlet.textSync('Create Mesh dApp', { - font: 'Speed', horizontalLayout: 'full', - }) - ) - ); - - console.log('\n'); - - const program = createCommand(); - - program - .name('create-mesh-app') - .description( - 'A quick and easy way to bootstrap your dApps on Cardano using Mesh.' - ) - .version('1.0.0'); - - program - .addArgument( - createArgument('name', 'Set a name for your dApp.') - .argParser((name) => { - if (/^([A-Za-z\-\\_\d])+$/.test(name)) return name; - - throw new InvalidArgumentError( - chalk.redBright( - '❗ Only letters, numbers, underscores and, hashes are allowed.', - ), - ); - }) - .argRequired() - ) - .addOption( - createOption( - '-t, --template ', - `The template to start your project from.` - ).choices(['starter', 'minting', 'staking', 'ecommerce', 'signin', 'marketplace']) - ) - .addOption( - createOption( - '-s, --stack ', - `The tech stack you want to build on.` - ).choices(['next']) - ) - .addOption( - createOption( - '-l, --language ', - `The language you want to use.` - ).choices(['ts']) - ) - .action(create); - - await program.parseAsync(process.argv); -}; - -main() - .then(() => { - logSuccess('✨✨ Welcome to Web 3.0! ✨✨'); - process.exit(0); - }) - .catch((error) => { - logError(error); - process.exit(1); - }); diff --git a/apps/mesh-cli/src/utils/index.ts b/apps/mesh-cli/src/utils/index.ts deleted file mode 100644 index 1ff09efd4..000000000 --- a/apps/mesh-cli/src/utils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './logger'; diff --git a/apps/mesh-cli/src/utils/logger.ts b/apps/mesh-cli/src/utils/logger.ts deleted file mode 100644 index 9dde8c698..000000000 --- a/apps/mesh-cli/src/utils/logger.ts +++ /dev/null @@ -1,13 +0,0 @@ -import chalk from 'chalk'; - -export const logError = (message) => { - console.log(chalk.redBright(message + '\n')); -}; - -export const logSuccess = (message) => { - console.log(chalk.greenBright(message + '\n')); -}; - -export const logInfo = (message) => { - console.log(chalk.blueBright(message + '\n')); -}; diff --git a/apps/mesh-cli/tsconfig.json b/apps/mesh-cli/tsconfig.json deleted file mode 100644 index 79c4976a8..000000000 --- a/apps/mesh-cli/tsconfig.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "lib": ["DOM", "ESNext"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "ESNext", /* Specify what module code is generated. */ - "rootDir": "src", /* Specify the root folder within your source files. */ - "moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */ - "baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */ - "paths": { - "@mesh/*": ["src/*"], - }, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true, /* Disable emitting files from a compilation. */ - "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - "declarationDir": "dist", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "include": [ - "src", - "types" - ] -} diff --git a/apps/mesh-docs/README.md b/apps/mesh-docs/README.md deleted file mode 100644 index c4033664f..000000000 --- a/apps/mesh-docs/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/apps/mesh-docs/package.json b/apps/mesh-docs/package.json deleted file mode 100644 index c040b96f8..000000000 --- a/apps/mesh-docs/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@meshsdk/docs", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@algolia/autocomplete-core": "1.17.2", - "@headlessui/react": "2.0.4", - "@headlessui/tailwindcss": "0.2.1", - "@sindresorhus/slugify": "2.2.1", - "@tailwindcss/typography": "0.5.13", - "clsx": "^2.1.1", - "flexsearch": "0.7.43", - "framer-motion": "11.2.10", - "next": "14.2.3", - "next-themes": "0.3.0", - "react": "18.3.1", - "react-dom": "18.3.1", - "react-highlight-words": "0.20.0", - "react-markdown": "9.0.1", - "remark": "15.0.1", - "simple-functional-loader": "1.2.1", - "unist-util-filter": "5.0.1", - "unist-util-visit": "5.0.0", - "uuid": "10.0.0", - "zustand": "4.5.2" - }, - "devDependencies": { - "@types/node": "20.14.2", - "@types/react": "18.3.3", - "@types/react-dom": "18.3.0", - "autoprefixer": "10.4.19", - "postcss": "8.4.38", - "tailwindcss": "3.4.4", - "typescript": "5.4.5" - } -} \ No newline at end of file diff --git a/apps/mesh-docs/public/next.svg b/apps/mesh-docs/public/next.svg deleted file mode 100644 index 5174b28c5..000000000 --- a/apps/mesh-docs/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/mesh-docs/public/vercel.svg b/apps/mesh-docs/public/vercel.svg deleted file mode 100644 index d2f842227..000000000 --- a/apps/mesh-docs/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/mesh-docs/src/app/classes/[name]/page.tsx b/apps/mesh-docs/src/app/classes/[name]/page.tsx deleted file mode 100644 index dc7eb8d1f..000000000 --- a/apps/mesh-docs/src/app/classes/[name]/page.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import getClass from '@/data/get-class'; -import { Prose } from '@/components/Prose'; -import getClassGroups from '@/data/get-class-groups'; -import { v4 as uuidv4 } from 'uuid'; -import { Content, DefinedIn, Group, Header } from '@/components/docs'; - -export default function Page({ params }: { params: { name: string } }) { - const meshClass = getClass(params.name); - const meshGroup = getClassGroups(meshClass.name); - - return ( -
    - -
    - - - - {meshGroup.map((group, i) => { - return ; - })} - - {/*
    - -
    */} -
    - ); -} diff --git a/apps/mesh-docs/src/app/favicon.ico b/apps/mesh-docs/src/app/favicon.ico deleted file mode 100644 index 718d6fea4..000000000 Binary files a/apps/mesh-docs/src/app/favicon.ico and /dev/null differ diff --git a/apps/mesh-docs/src/app/functions/[name]/page.tsx b/apps/mesh-docs/src/app/functions/[name]/page.tsx deleted file mode 100644 index a3780b1e3..000000000 --- a/apps/mesh-docs/src/app/functions/[name]/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -'use client'; -import { Prose } from '@/components/Prose'; -import { Content, DefinedIn, Header, ItemSignatures } from '@/components/docs'; -import getFunction from '@/data/get-function'; - -export default function Page({ params }: { params: { name: string } }) { - const meshFunction = getFunction(params.name); - - return ( -
    - -
    - - - - - - -
    - ); -} diff --git a/apps/mesh-docs/src/app/interfaces/[name]/page.tsx b/apps/mesh-docs/src/app/interfaces/[name]/page.tsx deleted file mode 100644 index 7b0248754..000000000 --- a/apps/mesh-docs/src/app/interfaces/[name]/page.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Prose } from '@/components/Prose'; -import { - Content, - DefinedIn, - Group, - Header, - ImplementedBy, -} from '@/components/docs'; -import getInterface from '@/data/get-interface'; -import getInterfaceGroups from '@/data/get-interface-groups'; -import { v4 as uuidv4 } from 'uuid'; - -export default function Page({ params }: { params: { name: string } }) { - const meshInterface = getInterface(params.name); - const group = getInterfaceGroups(meshInterface.name); - - return ( -
    - -
    - - - - - - {group.map((group, i) => { - return ; - })} - -
    - ); -} diff --git a/apps/mesh-docs/src/app/layout.tsx b/apps/mesh-docs/src/app/layout.tsx deleted file mode 100644 index 33e745349..000000000 --- a/apps/mesh-docs/src/app/layout.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import '@/styles/tailwind.css' - -import { Providers } from '@/app/providers' -import { Layout } from '@/components/Layout' - -import { type Metadata } from 'next' -import { type Section } from '@/components/SectionProvider' -import getClasses from '@/data/get-classes' -import getClassGroups from '@/data/get-class-groups' -import getInterfaces from '@/data/get-interfaces' -import getInterfaceGroups from '@/data/get-interface-groups' - -export const metadata: Metadata = { - title: { - template: '%s - Mesh SDK API Reference', - default: 'Mesh SDK API Reference', - }, -} - -export default async function RootLayout({ - children, -}: { - children: React.ReactNode -}) { - // let pages = await glob('**/*.mdx', { cwd: 'src/app' }) - // let allSectionsEntries = (await Promise.all( - // pages.map(async (filename) => [ - // '/' + filename.replace(/(^|\/)page\.mdx$/, ''), - // (await import(`./${filename}`)).sections, - // ]), - // )) as Array<[string, Array
    ]> - // let allSections = Object.fromEntries(allSectionsEntries) - - // get all classes - const allSectionsEntries = getClasses().map((meshClass: any) => { - - const _items:{id:string; title:string}[] = []; - - getClassGroups(meshClass.name).map((group: any) => { - group.children.map((item: any) => { - _items.push( {id: item.name, title: item.name}) - }) - }) - - return [`/classes/${meshClass.name}`, _items] - })as Array<[string, Array
    ]> - - // get all interfaces - const allInterfaces = getInterfaces().map((meshInterfaces: any) => { - const _items: { id: string; title: string }[] = []; - - getInterfaceGroups(meshInterfaces.name).map((group: any) => { - group.children.map((item: any) => { - _items.push({ id: item.name, title: item.name }); - }); - }); - - return [`/interfaces/${meshInterfaces.name}`, _items]; - }) as Array<[string, Array
    ]>; - allSectionsEntries.push(...allInterfaces); - - let allSections = Object.fromEntries(allSectionsEntries) - - return ( - - - -
    - {children} -
    -
    - - - ) -} diff --git a/apps/mesh-docs/src/app/page.tsx b/apps/mesh-docs/src/app/page.tsx deleted file mode 100644 index 3e9e0ca66..000000000 --- a/apps/mesh-docs/src/app/page.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import { CodeGroup } from '@/components/Code'; -import { Prose } from '@/components/Prose'; -import { Resources } from '@/components/Resources'; -import Markdown from 'react-markdown'; - -export default function Home() { - return ( -
    - -

    Mesh Documentation

    -

    This is the official documentation for Mesh.

    -

    - Mesh goes above and beyond to enhance the accessibility and - user-friendliness of Web3 development for developers, startups, and - enterprises. One key aspect is the provision of well-organized APIs, - spanning from wallet integrations to transaction building and smart - contract interactions. To further facilitate a smooth onboarding - process, Mesh offers comprehensive documentation complete with live - demos, enabling developers to test functionalities before diving into - coding. -

    -

    - Additionally, Mesh enhances accessibility through the provision of - starter kits, allowing users to set up a functional workspace in less - than a minute and subsequently concentrate on refining the business - logic of their applications. Collaborating closely with the community, - Mesh takes an inclusive approach by running workshops and creating - guides, fostering a supportive environment that helps developers - seamlessly integrate into the Cardano ecosystem. -

    -

    - Getting started -

    -

    - To get started with Mesh, you need to install the latest version of - Mesh with npm: -

    - - - npm install @meshsdk/core @meshsdk/react - - - {/* */} -
    -
    - ); -} - -/** - * these commment codes are wip for the search - */ - -// import getClassGroups from '@/data/get-class-groups'; -// import getClasses from '@/data/get-classes'; -// import { useEffect } from 'react'; - -// function getSectionComments(item: any) { -// return item.comment -// ? item.comment.summary.map((item) => { -// return item.text; -// }) -// : []; -// } - -// useEffect(() => { -// const searchClasses = getClasses().map((meshClass: any) => { -// console.log(11, meshClass); - -// const _object: any = { url: `/classes/${meshClass.name}`, sections: [] }; - -// const _sections: any = []; - -// const _sectionComments = getSectionComments(meshClass); - -// const _section = [meshClass.name, null, _sectionComments]; - -// _sections.push(_section); - -// console.log(11, _section); - -// getClassGroups(meshClass.name).map((group: any) => { -// group.children.map((item: any) => { -// console.log(22, item); - -// item.signatures?.map((signature: any) => { -// const _sectionComments = getSectionComments(signature); -// const _section = [item.name, item.name, _sectionComments]; -// _sections.push(_section); -// console.log(33, _section); -// }); -// }); -// }); - -// _object.sections = _sections; - -// return _object; -// }); - -// console.log(99, JSON.stringify(searchClasses)) -// }, []); diff --git a/apps/mesh-docs/src/app/providers.tsx b/apps/mesh-docs/src/app/providers.tsx deleted file mode 100644 index 016cd4850..000000000 --- a/apps/mesh-docs/src/app/providers.tsx +++ /dev/null @@ -1,37 +0,0 @@ -'use client' - -import { useEffect } from 'react' -import { ThemeProvider, useTheme } from 'next-themes' - -function ThemeWatcher() { - let { resolvedTheme, setTheme } = useTheme() - - useEffect(() => { - let media = window.matchMedia('(prefers-color-scheme: dark)') - - function onMediaChange() { - let systemTheme = media.matches ? 'dark' : 'light' - if (resolvedTheme === systemTheme) { - setTheme('system') - } - } - - onMediaChange() - media.addEventListener('change', onMediaChange) - - return () => { - media.removeEventListener('change', onMediaChange) - } - }, [resolvedTheme, setTheme]) - - return null -} - -export function Providers({ children }: { children: React.ReactNode }) { - return ( - - - {children} - - ) -} diff --git a/apps/mesh-docs/src/app/types/[name]/page.tsx b/apps/mesh-docs/src/app/types/[name]/page.tsx deleted file mode 100644 index c710d501f..000000000 --- a/apps/mesh-docs/src/app/types/[name]/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Prose } from '@/components/Prose'; -import { Content, DefinedIn, Header, TypeDeclaration } from '@/components/docs'; -import getType from '@/data/get-type'; - -export default function Page({ params }: { params: { name: string } }) { - const meshType = getType(params.name); - - return ( -
    - -
    - - - - - - -
    - ); -} diff --git a/apps/mesh-docs/src/components/Button.tsx b/apps/mesh-docs/src/components/Button.tsx deleted file mode 100644 index 556e2f423..000000000 --- a/apps/mesh-docs/src/components/Button.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import Link from 'next/link' -import clsx from 'clsx' - -function ArrowIcon(props: React.ComponentPropsWithoutRef<'svg'>) { - return ( - - ) -} - -const variantStyles = { - primary: - 'rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-1 dark:ring-inset dark:ring-emerald-400/20 dark:hover:bg-emerald-400/10 dark:hover:text-emerald-300 dark:hover:ring-emerald-300', - secondary: - 'rounded-full bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400 dark:ring-1 dark:ring-inset dark:ring-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300', - filled: - 'rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-emerald-500 dark:text-white dark:hover:bg-emerald-400', - outline: - 'rounded-full py-1 px-3 text-zinc-700 ring-1 ring-inset ring-zinc-900/10 hover:bg-zinc-900/2.5 hover:text-zinc-900 dark:text-zinc-400 dark:ring-white/10 dark:hover:bg-white/5 dark:hover:text-white', - text: 'text-emerald-500 hover:text-emerald-600 dark:text-emerald-400 dark:hover:text-emerald-500', -} - -type ButtonProps = { - variant?: keyof typeof variantStyles - arrow?: 'left' | 'right' -} & ( - | React.ComponentPropsWithoutRef - | (React.ComponentPropsWithoutRef<'button'> & { href?: undefined }) -) - -export function Button({ - variant = 'primary', - className, - children, - arrow, - ...props -}: ButtonProps) { - className = clsx( - 'inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition', - variantStyles[variant], - className, - ) - - let arrowIcon = ( - - ) - - let inner = ( - <> - {arrow === 'left' && arrowIcon} - {children} - {arrow === 'right' && arrowIcon} - - ) - - if (typeof props.href === 'undefined') { - return ( - - ) - } - - return ( - - {inner} - - ) -} diff --git a/apps/mesh-docs/src/components/Footer.tsx b/apps/mesh-docs/src/components/Footer.tsx deleted file mode 100644 index 3dc9a9b24..000000000 --- a/apps/mesh-docs/src/components/Footer.tsx +++ /dev/null @@ -1,145 +0,0 @@ -'use client' - -import Link from 'next/link' -import { usePathname } from 'next/navigation' - -import { Button } from '@/components/Button' -import { navigation } from '@/components/Navigation' - -function PageLink({ - label, - page, - previous = false, -}: { - label: string - page: { href: string; title: string } - previous?: boolean -}) { - return ( - <> - - - {page.title} - - - ) -} - -function PageNavigation() { - let pathname = usePathname() - let allPages = navigation.flatMap((group) => group.links) - let currentPageIndex = allPages.findIndex((page) => page.href === pathname) - - if (currentPageIndex === -1) { - return null - } - - let previousPage = allPages[currentPageIndex - 1] - let nextPage = allPages[currentPageIndex + 1] - - if (!previousPage && !nextPage) { - return null - } - - return ( -
    - {previousPage && ( -
    - -
    - )} - {nextPage && ( -
    - -
    - )} -
    - ) -} - -function XIcon(props: React.ComponentPropsWithoutRef<'svg'>) { - return ( - - ) -} - -function GitHubIcon(props: React.ComponentPropsWithoutRef<'svg'>) { - return ( - - ) -} - -function DiscordIcon(props: React.ComponentPropsWithoutRef<'svg'>) { - return ( - - ) -} - -function SocialLink({ - href, - icon: Icon, - children, -}: { - href: string - icon: React.ComponentType<{ className?: string }> - children: React.ReactNode -}) { - return ( - - {children} - - - ) -} - -function SmallPrint() { - return ( -
    -

    - © Copyright {new Date().getFullYear()}. All rights reserved. -

    -
    - - Follow us on X - - - Follow us on GitHub - - - Join our Discord server - -
    -
    - ) -} - -export function Footer() { - return ( -
    - - -
    - ) -} diff --git a/apps/mesh-docs/src/components/Header.tsx b/apps/mesh-docs/src/components/Header.tsx deleted file mode 100644 index 12cec7fa8..000000000 --- a/apps/mesh-docs/src/components/Header.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { forwardRef } from 'react' -import Link from 'next/link' -import clsx from 'clsx' -import { motion, useScroll, useTransform } from 'framer-motion' - -import { Button } from '@/components/Button' -import { Logo } from '@/components/Logo' -import { - MobileNavigation, - useIsInsideMobileNavigation, -} from '@/components/MobileNavigation' -import { useMobileNavigationStore } from '@/components/MobileNavigation' -// import { MobileSearch, Search } from '@/components/Search' -import { ThemeToggle } from '@/components/ThemeToggle' - -function TopLevelNavItem({ - href, - children, -}: { - href: string - children: React.ReactNode -}) { - return ( -
  • - - {children} - -
  • - ) -} - -export const Header = forwardRef< - React.ElementRef<'div'>, - { className?: string } ->(function Header({ className }, ref) { - let { isOpen: mobileNavIsOpen } = useMobileNavigationStore() - let isInsideMobileNavigation = useIsInsideMobileNavigation() - - let { scrollY } = useScroll() - let bgOpacityLight = useTransform(scrollY, [0, 72], [0.5, 0.9]) - let bgOpacityDark = useTransform(scrollY, [0, 72], [0.2, 0.8]) - - return ( - -
    - - {/* */} -
    - -
    - - - - -
    -
    - -
    -
    - {/* */} - -
    - {/*
    - -
    */} -
    - - ) -}) diff --git a/apps/mesh-docs/src/components/Layout.tsx b/apps/mesh-docs/src/components/Layout.tsx deleted file mode 100644 index 7fa29758f..000000000 --- a/apps/mesh-docs/src/components/Layout.tsx +++ /dev/null @@ -1,46 +0,0 @@ -'use client' - -import Link from 'next/link' -import { usePathname } from 'next/navigation' -import { motion } from 'framer-motion' - -import { Footer } from '@/components/Footer' -import { Header } from '@/components/Header' -import { Logo } from '@/components/Logo' -import { Navigation } from '@/components/Navigation' -import { type Section, SectionProvider } from '@/components/SectionProvider' - -export function Layout({ - children, - allSections, -}: { - children: React.ReactNode - allSections: Record> -}) { - let pathname = usePathname() - - return ( - -
    - -
    -
    - - - -
    -
    - -
    -
    -
    -
    {children}
    -
    -
    -
    -
    - ) -} diff --git a/apps/mesh-docs/src/components/Navigation.tsx b/apps/mesh-docs/src/components/Navigation.tsx deleted file mode 100644 index afcfeb41e..000000000 --- a/apps/mesh-docs/src/components/Navigation.tsx +++ /dev/null @@ -1,306 +0,0 @@ -'use client'; - -import { useRef } from 'react'; -import Link from 'next/link'; -import { usePathname } from 'next/navigation'; -import clsx from 'clsx'; -import { AnimatePresence, motion, useIsPresent } from 'framer-motion'; - -import { useIsInsideMobileNavigation } from '@/components/MobileNavigation'; -import { useSectionStore } from '@/components/SectionProvider'; -import { Tag } from '@/components/Tag'; -import { remToPx } from '@/lib/remToPx'; -import getClasses from '@/data/get-classes'; -import getTypes from '@/data/get-types'; -import getInterfaces from '@/data/get-interfaces'; -import getFunctions from '@/data/get-functions'; - -interface NavGroup { - title: string; - links: Array<{ - title: string; - href: string; - }>; -} - -function useInitialValue(value: T, condition = true) { - let initialValue = useRef(value).current; - return condition ? initialValue : value; -} - -function TopLevelNavItem({ - href, - children, -}: { - href: string; - children: React.ReactNode; -}) { - return ( -
  • - - {children} - -
  • - ); -} - -function NavLink({ - href, - children, - tag, - active = false, - isAnchorLink = false, -}: { - href: string; - children: React.ReactNode; - tag?: string; - active?: boolean; - isAnchorLink?: boolean; -}) { - return ( - - {children} - {tag && ( - - {tag} - - )} - - ); -} - -function VisibleSectionHighlight({ - group, - pathname, -}: { - group: NavGroup; - pathname: string; -}) { - let [sections, visibleSections] = useInitialValue( - [ - useSectionStore((s) => s.sections), - useSectionStore((s) => s.visibleSections), - ], - useIsInsideMobileNavigation() - ); - - let isPresent = useIsPresent(); - let firstVisibleSectionIndex = Math.max( - 0, - [{ id: '_top' }, ...sections].findIndex( - (section) => section.id === visibleSections[0] - ) - ); - let itemHeight = remToPx(2); - let height = isPresent - ? Math.max(1, visibleSections.length) * itemHeight - : itemHeight; - let top = - group.links.findIndex((link) => link.href === pathname) * itemHeight + - firstVisibleSectionIndex * itemHeight; - - return ( - - ); -} - -function ActivePageMarker({ - group, - pathname, -}: { - group: NavGroup; - pathname: string; -}) { - let itemHeight = remToPx(2); - let offset = remToPx(0.25); - let activePageIndex = group.links.findIndex((link) => link.href === pathname); - let top = offset + activePageIndex * itemHeight; - - return ( - - ); -} - -function NavigationGroup({ - group, - className, -}: { - group: NavGroup; - className?: string; -}) { - // If this is the mobile navigation then we always render the initial - // state, so that the state does not change during the close animation. - // The state will still update when we re-open (re-render) the navigation. - let isInsideMobileNavigation = useIsInsideMobileNavigation(); - let [pathname, sections] = useInitialValue( - [usePathname(), useSectionStore((s) => s.sections)], - isInsideMobileNavigation - ); - - let isActiveGroup = - group.links.findIndex((link) => link.href === pathname) !== -1; - - return ( -
  • - - {group.title} - -
    - - {isActiveGroup && ( - - )} - - - - {isActiveGroup && ( - - )} - -
      - {group.links.map((link) => ( - - - {link.title} - - - {link.href === pathname && sections.length > 0 && ( - - {sections.map((section) => ( -
    • - - {section.title} - -
    • - ))} -
      - )} -
      -
      - ))} -
    -
    -
  • - ); -} - -export const navigation: Array = [ - // { - // title: 'Guides', - // links: [ - // { title: 'Introduction', href: '/' }, - // { title: 'Quickstart', href: '/quickstart' }, - // { title: 'SDKs', href: '/sdks' }, - // { title: 'Authentication', href: '/authentication' }, - // { title: 'Pagination', href: '/pagination' }, - // { title: 'Errors', href: '/errors' }, - // { title: 'Webhooks', href: '/webhooks' }, - // ], - // }, - // { - // title: 'Resources', - // links: [ - // { title: 'Contacts', href: '/contacts' }, - // { title: 'Conversations', href: '/conversations' }, - // { title: 'Messages', href: '/messages' }, - // { title: 'Groups', href: '/groups' }, - // { title: 'Attachments', href: '/attachments' }, - // ], - // }, - { - title: 'Classes', - links: getClasses().map((item: any) => { - return { title: item.name, href: `/classes/${item.name}` }; - }), - }, - { - title: 'Interfaces', - links: getInterfaces().map((item: any) => { - return { title: item.name, href: `/interfaces/${item.name}` }; - }), - }, - { - title: 'Types', - links: getTypes().map((item: any) => { - return { title: item.name, href: `/types/${item.name}` }; - }), - }, - { - title: 'Functions', - links: getFunctions().map((item: any) => { - return { title: item.name, href: `/functions/${item.name}` }; - }), - }, -]; - -export function Navigation(props: React.ComponentPropsWithoutRef<'nav'>) { - return ( - - ); -} diff --git a/apps/mesh-docs/src/config/index.ts b/apps/mesh-docs/src/config/index.ts deleted file mode 100644 index acc7a6d4b..000000000 --- a/apps/mesh-docs/src/config/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const githubFileUrl = `https://github.com/MeshJS/mesh/blob/main/packages/module/`; diff --git a/apps/mesh-docs/src/data/api.json b/apps/mesh-docs/src/data/api.json deleted file mode 100644 index 990c07e4e..000000000 --- a/apps/mesh-docs/src/data/api.json +++ /dev/null @@ -1,40932 +0,0 @@ -{ - "id": 0, - "name": "@meshsdk/core", - "variant": "project", - "kind": 1, - "flags": {}, - "children": [ - { - "id": 1247, - "name": "AppWallet", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 1251, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 48, - "character": 2 - } - ], - "signatures": [ - { - "id": 1252, - "name": "new AppWallet", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 48, - "character": 2 - } - ], - "parameters": [ - { - "id": 1253, - "name": "options", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1241, - "name": "CreateAppWalletOptions", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 1247, - "name": "AppWallet", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1254, - "name": "_fetcher", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 44, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - } - }, - { - "id": 1255, - "name": "_submitter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 45, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - }, - { - "id": 1256, - "name": "_wallet", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 46, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 1376, - "name": "EmbeddedWallet", - "package": "@meshsdk/core" - } - }, - { - "id": 1257, - "name": "getBaseAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 77, - "character": 2 - } - ], - "signatures": [ - { - "id": 1258, - "name": "getBaseAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 77, - "character": 2 - } - ], - "parameters": [ - { - "id": 1259, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1260, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1306, - "name": "getCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 274, - "character": 8 - } - ], - "signatures": [ - { - "id": 1307, - "name": "getCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 274, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1261, - "name": "getPaymentAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 86, - "character": 2 - } - ], - "signatures": [ - { - "id": 1262, - "name": "getPaymentAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 86, - "character": 2 - } - ], - "parameters": [ - { - "id": 1263, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1264, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1265, - "name": "getRewardAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 95, - "character": 2 - } - ], - "signatures": [ - { - "id": 1266, - "name": "getRewardAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 95, - "character": 2 - } - ], - "parameters": [ - { - "id": 1267, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1268, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1269, - "name": "getUsedAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 104, - "character": 2 - } - ], - "signatures": [ - { - "id": 1270, - "name": "getUsedAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 104, - "character": 2 - } - ], - "parameters": [ - { - "id": 1271, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1272, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - }, - "implementationOf": { - "type": "reference", - "target": 61, - "name": "IInitiator.getUsedAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 60, - "name": "IInitiator.getUsedAddress" - } - }, - { - "id": 1308, - "name": "getUsedAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 278, - "character": 8 - } - ], - "signatures": [ - { - "id": 1309, - "name": "getUsedAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 278, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1273, - "name": "getUsedCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 113, - "character": 2 - } - ], - "signatures": [ - { - "id": 1274, - "name": "getUsedCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 113, - "character": 2 - } - ], - "parameters": [ - { - "id": 1275, - "name": "_limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS.maxCollateralInputs" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 63, - "name": "IInitiator.getUsedCollateral" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 62, - "name": "IInitiator.getUsedCollateral" - } - }, - { - "id": 1276, - "name": "getUsedUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 119, - "character": 8 - } - ], - "signatures": [ - { - "id": 1277, - "name": "getUsedUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 119, - "character": 8 - } - ], - "parameters": [ - { - "id": 1278, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 66, - "name": "IInitiator.getUsedUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 65, - "name": "IInitiator.getUsedUTxOs" - } - }, - { - "id": 1304, - "name": "getUtxos", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 270, - "character": 8 - } - ], - "signatures": [ - { - "id": 1305, - "name": "getUtxos", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "development: browser wallets apis" - } - ] - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 270, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1279, - "name": "signData", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 133, - "character": 2 - } - ], - "signatures": [ - { - "id": 1280, - "name": "signData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 133, - "character": 2 - } - ], - "parameters": [ - { - "id": 1281, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1282, - "name": "payload", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1283, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1284, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - }, - "implementationOf": { - "type": "reference", - "target": 77, - "name": "ISigner.signData" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 76, - "name": "ISigner.signData" - } - }, - { - "id": 1285, - "name": "signTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 154, - "character": 8 - } - ], - "signatures": [ - { - "id": 1286, - "name": "signTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 154, - "character": 8 - } - ], - "parameters": [ - { - "id": 1287, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1288, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 1289, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1290, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 81, - "name": "ISigner.signTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 80, - "name": "ISigner.signTx" - } - }, - { - "id": 1291, - "name": "signTxSync", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 200, - "character": 2 - } - ], - "signatures": [ - { - "id": 1292, - "name": "signTxSync", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 200, - "character": 2 - } - ], - "parameters": [ - { - "id": 1293, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1294, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 1295, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - }, - { - "id": 1296, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1297, - "name": "signTxs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 245, - "character": 8 - } - ], - "signatures": [ - { - "id": 1298, - "name": "signTxs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 245, - "character": 8 - } - ], - "parameters": [ - { - "id": 1299, - "name": "unsignedTxs", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1300, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 85, - "name": "ISigner.signTxs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 84, - "name": "ISigner.signTxs" - } - }, - { - "id": 1301, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 253, - "character": 2 - } - ], - "signatures": [ - { - "id": 1302, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 253, - "character": 2 - } - ], - "parameters": [ - { - "id": 1303, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 1248, - "name": "brew", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 262, - "character": 9 - } - ], - "signatures": [ - { - "id": 1249, - "name": "brew", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 262, - "character": 9 - } - ], - "parameters": [ - { - "id": 1250, - "name": "strength", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "256" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 1251 - ] - }, - { - "title": "Properties", - "children": [ - 1254, - 1255, - 1256 - ] - }, - { - "title": "Methods", - "children": [ - 1257, - 1306, - 1261, - 1265, - 1269, - 1308, - 1273, - 1276, - 1304, - 1279, - 1285, - 1291, - 1297, - 1301, - 1248 - ] - } - ], - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 43, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 59, - "name": "IInitiator", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 75, - "name": "ISigner", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 386, - "name": "BlockfrostProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "[Blockfrost](https://blockfrost.io/) provides restful APIs which allows your app to access information stored on the blockchain.\n\nGet started:\n" - }, - { - "kind": "code", - "text": "```ts\nconst blockfrostProvider = new BlockfrostProvider('');\n```" - } - ] - }, - "children": [ - { - "id": 387, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 39, - "character": 2 - }, - { - "fileName": "providers/blockfrost.provider.ts", - "line": 46, - "character": 2 - }, - { - "fileName": "providers/blockfrost.provider.ts", - "line": 48, - "character": 2 - } - ], - "signatures": [ - { - "id": 388, - "name": "new BlockfrostProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "If you are using a privately hosted Blockfrost instance, you can set the URL in the parameter." - } - ] - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 39, - "character": 2 - } - ], - "parameters": [ - { - "id": 389, - "name": "baseUrl", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The base URL of the instance." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 386, - "name": "BlockfrostProvider", - "package": "@meshsdk/core" - } - }, - { - "id": 390, - "name": "new BlockfrostProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "If you are using [Blockfrost](https://blockfrost.io/) hosted instance, you can set the project ID in the parameter." - } - ] - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 46, - "character": 2 - } - ], - "parameters": [ - { - "id": 391, - "name": "projectId", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The project ID of the instance." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 392, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The version of the API. Default is 0." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 386, - "name": "BlockfrostProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 393, - "name": "_axiosInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 33, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/axios@1.6.3/node_modules/axios/index.d.ts", - "qualifiedName": "AxiosInstance" - }, - "name": "AxiosInstance", - "package": "axios" - } - }, - { - "id": 394, - "name": "fetchAccountInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 63, - "character": 8 - } - ], - "signatures": [ - { - "id": 395, - "name": "fetchAccountInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 63, - "character": 8 - } - ], - "parameters": [ - { - "id": 396, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 102, - "name": "AccountInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 22, - "name": "IFetcher.fetchAccountInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 21, - "name": "IFetcher.fetchAccountInfo" - } - }, - { - "id": 404, - "name": "fetchAddressUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 131, - "character": 8 - } - ], - "signatures": [ - { - "id": 405, - "name": "fetchAddressUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 131, - "character": 8 - } - ], - "parameters": [ - { - "id": 406, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 407, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 25, - "name": "IFetcher.fetchAddressUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 24, - "name": "IFetcher.fetchAddressUTxOs" - } - }, - { - "id": 408, - "name": "fetchAssetAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 163, - "character": 8 - } - ], - "signatures": [ - { - "id": 409, - "name": "fetchAssetAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 163, - "character": 8 - } - ], - "parameters": [ - { - "id": 410, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 411, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 412, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 165, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 413, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 165, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 412, - 413 - ] - } - ], - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 165, - "character": 13 - } - ] - } - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 29, - "name": "IFetcher.fetchAssetAddresses" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 28, - "name": "IFetcher.fetchAssetAddresses" - } - }, - { - "id": 414, - "name": "fetchAssetMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 190, - "character": 8 - } - ], - "signatures": [ - { - "id": 415, - "name": "fetchAssetMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 190, - "character": 8 - } - ], - "parameters": [ - { - "id": 416, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 35, - "name": "IFetcher.fetchAssetMetadata" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 34, - "name": "IFetcher.fetchAssetMetadata" - } - }, - { - "id": 417, - "name": "fetchBlockInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 208, - "character": 8 - } - ], - "signatures": [ - { - "id": 418, - "name": "fetchBlockInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 208, - "character": 8 - } - ], - "parameters": [ - { - "id": 419, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 153, - "name": "BlockInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 38, - "name": "IFetcher.fetchBlockInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 37, - "name": "IFetcher.fetchBlockInfo" - } - }, - { - "id": 420, - "name": "fetchCollectionAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 237, - "character": 8 - } - ], - "signatures": [ - { - "id": 421, - "name": "fetchCollectionAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 237, - "character": 8 - } - ], - "parameters": [ - { - "id": 422, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 423, - "name": "cursor", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "1" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 424, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 425, - "name": "assets", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 240, - "character": 15 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 426, - "name": "next", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 240, - "character": 32 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 425, - 426 - ] - } - ], - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 240, - "character": 13 - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 41, - "name": "IFetcher.fetchCollectionAssets" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 40, - "name": "IFetcher.fetchCollectionAssets" - } - }, - { - "id": 427, - "name": "fetchHandleAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 261, - "character": 8 - } - ], - "signatures": [ - { - "id": 428, - "name": "fetchHandleAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 261, - "character": 8 - } - ], - "parameters": [ - { - "id": 429, - "name": "handle", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 48, - "name": "IFetcher.fetchHandleAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 47, - "name": "IFetcher.fetchHandleAddress" - } - }, - { - "id": 452, - "name": "fetchNativeScriptJSON", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 407, - "character": 16 - } - ], - "signatures": [ - { - "id": 453, - "name": "fetchNativeScriptJSON", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 407, - "character": 16 - } - ], - "parameters": [ - { - "id": 454, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 449, - "name": "fetchPlutusScriptCBOR", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 397, - "character": 16 - } - ], - "signatures": [ - { - "id": 450, - "name": "fetchPlutusScriptCBOR", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 397, - "character": 16 - } - ], - "parameters": [ - { - "id": 451, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 430, - "name": "fetchProtocolParameters", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 276, - "character": 8 - } - ], - "signatures": [ - { - "id": 431, - "name": "fetchProtocolParameters", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 276, - "character": 8 - } - ], - "parameters": [ - { - "id": 432, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "Number.NaN" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 51, - "name": "IFetcher.fetchProtocolParameters" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 50, - "name": "IFetcher.fetchProtocolParameters" - } - }, - { - "id": 433, - "name": "fetchTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 312, - "character": 8 - } - ], - "signatures": [ - { - "id": 434, - "name": "fetchTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 312, - "character": 8 - } - ], - "parameters": [ - { - "id": 435, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 268, - "name": "TransactionInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 54, - "name": "IFetcher.fetchTxInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 53, - "name": "IFetcher.fetchTxInfo" - } - }, - { - "id": 436, - "name": "fetchUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 335, - "character": 8 - } - ], - "signatures": [ - { - "id": 437, - "name": "fetchUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 335, - "character": 8 - } - ], - "parameters": [ - { - "id": 438, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 57, - "name": "IFetcher.fetchUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 56, - "name": "IFetcher.fetchUTxOs" - } - }, - { - "id": 439, - "name": "onTxConfirmed", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 355, - "character": 2 - } - ], - "signatures": [ - { - "id": 440, - "name": "onTxConfirmed", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 355, - "character": 2 - } - ], - "parameters": [ - { - "id": 441, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 442, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 443, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 355, - "character": 42 - } - ], - "signatures": [ - { - "id": 444, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 355, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - }, - { - "id": 445, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "100" - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "implementationOf": { - "type": "reference", - "target": 69, - "name": "IListener.onTxConfirmed" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 68, - "name": "IListener.onTxConfirmed" - } - }, - { - "id": 397, - "name": "resolveScriptRef", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 88, - "character": 10 - } - ], - "signatures": [ - { - "id": 398, - "name": "resolveScriptRef", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 88, - "character": 29 - } - ], - "parameters": [ - { - "id": 399, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 446, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 380, - "character": 8 - } - ], - "signatures": [ - { - "id": 447, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 380, - "character": 8 - } - ], - "parameters": [ - { - "id": 448, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 400, - "name": "toUTxO", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 113, - "character": 10 - } - ], - "signatures": [ - { - "id": 401, - "name": "toUTxO", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 113, - "character": 19 - } - ], - "parameters": [ - { - "id": 402, - "name": "bfUTxO", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostUTxO" - }, - "name": "BlockfrostUTxO", - "package": "@meshsdk/core" - } - }, - { - "id": 403, - "name": "tx_hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 387 - ] - }, - { - "title": "Properties", - "children": [ - 393 - ] - }, - { - "title": "Methods", - "children": [ - 394, - 404, - 408, - 414, - 417, - 420, - 427, - 452, - 449, - 430, - 433, - 436, - 439, - 397, - 446, - 400 - ] - } - ], - "sources": [ - { - "fileName": "providers/blockfrost.provider.ts", - "line": 32, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 67, - "name": "IListener", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 1310, - "name": "BrowserWallet", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "These wallets APIs are in accordance to CIP-30, which defines the API for dApps to communicate with the user's wallet. Additional utility functions provided for developers that are useful for building dApps.\n\n" - }, - { - "kind": "code", - "text": "```javascript\n// import BrowserWallet\nimport { BrowserWallet } from '@meshsdk/core';\n\n// connect to a wallet\nconst wallet = await BrowserWallet.enable('eternl');\n\n// get assets in wallet\nconst assets = await wallet.getAssets();\n```" - } - ] - }, - "children": [ - { - "id": 1319, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 50, - "character": 2 - } - ], - "signatures": [ - { - "id": 1320, - "name": "new BrowserWallet", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 50, - "character": 2 - } - ], - "parameters": [ - { - "id": 1321, - "name": "_walletInstance", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "WalletInstance" - }, - "name": "WalletInstance", - "package": "@meshsdk/core" - } - }, - { - "id": 1322, - "name": "_walletName", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 1310, - "name": "BrowserWallet", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1324, - "name": "_walletInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 51, - "character": 13 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "WalletInstance" - }, - "name": "WalletInstance", - "package": "@meshsdk/core" - } - }, - { - "id": 1325, - "name": "_walletName", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 52, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1323, - "name": "walletInstance", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 48, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "WalletInstance" - }, - "name": "WalletInstance", - "package": "@meshsdk/core" - } - }, - { - "id": 1367, - "name": "getAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 375, - "character": 8 - } - ], - "signatures": [ - { - "id": 1368, - "name": "getAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the assets in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 375, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 128, - "name": "AssetExtended", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1326, - "name": "getBalance", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 109, - "character": 8 - } - ], - "signatures": [ - { - "id": 1327, - "name": "getBalance", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of assets in the wallet. This API will return every assets in the wallet. Each asset is an object with the following properties:\n- A unit is provided to display asset's name on the user interface.\n- A quantity is provided to display asset's quantity on the user interface." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets and their quantities" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 109, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1328, - "name": "getChangeAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 119, - "character": 8 - } - ], - "signatures": [ - { - "id": 1329, - "name": "getChangeAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns an address owned by the wallet that should be used as a change address to return leftover assets during transaction creation back to the connected wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "an address" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 119, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1330, - "name": "getCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 132, - "character": 8 - } - ], - "signatures": [ - { - "id": 1331, - "name": "getCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).\n\nIf this cannot be attained, an error message with an explanation of the blocking problem shall be returned. NOTE: wallets are free to return UTXOs that add up to a greater total ADA value than requested in the amount parameter, but wallets must never return any result where UTXOs would sum up to a smaller total ADA value, instead in a case like that an error message must be returned." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 132, - "character": 8 - } - ], - "parameters": [ - { - "id": 1332, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS.maxCollateralInputs" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1369, - "name": "getLovelace", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 399, - "character": 8 - } - ], - "signatures": [ - { - "id": 1370, - "name": "getLovelace", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the lovelace balance in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "lovelace balance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 399, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1333, - "name": "getNetworkId", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 144, - "character": 2 - } - ], - "signatures": [ - { - "id": 1334, - "name": "getNetworkId", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "network ID" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 144, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1371, - "name": "getPolicyIdAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 412, - "character": 8 - } - ], - "signatures": [ - { - "id": 1372, - "name": "getPolicyIdAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the assets of a specific policy ID in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 412, - "character": 8 - } - ], - "parameters": [ - { - "id": 1373, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 128, - "name": "AssetExtended", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1374, - "name": "getPolicyIds", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 422, - "character": 8 - } - ], - "signatures": [ - { - "id": 1375, - "name": "getPolicyIds", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the policy IDs of all the assets in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of policy IDs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 422, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1335, - "name": "getRewardAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 153, - "character": 8 - } - ], - "signatures": [ - { - "id": 1336, - "name": "getRewardAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of reward addresses owned by the wallet. A reward address is a stake address that is used to receive rewards from staking, generally starts from " - }, - { - "kind": "code", - "text": "`stake`" - }, - { - "kind": "text", - "text": " prefix." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of reward addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 153, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1337, - "name": "getUnusedAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 163, - "character": 8 - } - ], - "signatures": [ - { - "id": 1338, - "name": "getUnusedAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of unused addresses controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of unused addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 163, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1359, - "name": "getUsedAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 335, - "character": 8 - } - ], - "signatures": [ - { - "id": 1360, - "name": "getUsedAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a used address of type Address from the wallet.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "an Address object" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 335, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 61, - "name": "IInitiator.getUsedAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 60, - "name": "IInitiator.getUsedAddress" - } - }, - { - "id": 1339, - "name": "getUsedAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 173, - "character": 8 - } - ], - "signatures": [ - { - "id": 1340, - "name": "getUsedAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of used addresses controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of used addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 173, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1361, - "name": "getUsedCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 347, - "character": 8 - } - ], - "signatures": [ - { - "id": 1362, - "name": "getUsedCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 347, - "character": 8 - } - ], - "parameters": [ - { - "id": 1363, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS.maxCollateralInputs" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 63, - "name": "IInitiator.getUsedCollateral" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 62, - "name": "IInitiator.getUsedCollateral" - } - }, - { - "id": 1364, - "name": "getUsedUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 362, - "character": 8 - } - ], - "signatures": [ - { - "id": 1365, - "name": "getUsedUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a list of UTXOs to be used for transaction building.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 362, - "character": 8 - } - ], - "parameters": [ - { - "id": 1366, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ] - }, - "defaultValue": "undefined" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 66, - "name": "IInitiator.getUsedUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 65, - "name": "IInitiator.getUsedUTxOs" - } - }, - { - "id": 1341, - "name": "getUtxos", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 184, - "character": 8 - } - ], - "signatures": [ - { - "id": 1342, - "name": "getUtxos", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Return a list of all UTXOs (unspent transaction outputs) controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 184, - "character": 8 - } - ], - "parameters": [ - { - "id": 1343, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ] - }, - "defaultValue": "undefined" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1344, - "name": "signData", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 198, - "character": 2 - } - ], - "signatures": [ - { - "id": 1345, - "name": "signData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This endpoint utilizes the [CIP-8 - Message Signing](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030) to sign arbitrary data, to verify the data was signed by the owner of the private key.\n\nHere, we get the first wallet's address with wallet.getUsedAddresses(), alternativelly you can use reward addresses (getRewardAddresses()) too. It's really up to you as the developer which address you want to use in your application." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a signature" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 198, - "character": 2 - } - ], - "parameters": [ - { - "id": 1346, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1347, - "name": "payload", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 77, - "name": "ISigner.signData" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 76, - "name": "ISigner.signData" - } - }, - { - "id": 1348, - "name": "signTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 210, - "character": 8 - } - ], - "signatures": [ - { - "id": 1349, - "name": "signTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Requests user to sign the provided transaction (tx). The wallet should ask the user for permission, and if given, try to sign the supplied body and return a signed transaction. partialSign should be true if the transaction provided requires multiple signatures." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a signed transaction in CBOR" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 210, - "character": 8 - } - ], - "parameters": [ - { - "id": 1350, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1351, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 81, - "name": "ISigner.signTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 80, - "name": "ISigner.signTx" - } - }, - { - "id": 1352, - "name": "signTxs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 253, - "character": 8 - } - ], - "signatures": [ - { - "id": 1353, - "name": "signTxs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Experimental feature - sign multiple transactions at once (Supported wallet(s): Typhon)" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "array of signed transactions CborHex string" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 253, - "character": 8 - } - ], - "parameters": [ - { - "id": 1354, - "name": "unsignedTxs", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "array of unsigned transactions in CborHex string" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1355, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "if the transactions are signed partially" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 85, - "name": "ISigner.signTxs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 84, - "name": "ISigner.signTxs" - } - }, - { - "id": 1356, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 324, - "character": 2 - } - ], - "signatures": [ - { - "id": 1357, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Submits the signed transaction to the blockchain network.\n\nAs wallets should already have this ability to submit transaction, we allow dApps to request that a transaction be sent through it. If the wallet accepts the transaction and tries to send it, it shall return the transaction ID for the dApp to track. The wallet can return error messages or failure if there was an error in sending it." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a transaction hash" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 324, - "character": 2 - } - ], - "parameters": [ - { - "id": 1358, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 1313, - "name": "enable", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 85, - "character": 15 - } - ], - "signatures": [ - { - "id": 1314, - "name": "enable", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This is the entrypoint to start communication with the user's wallet. The wallet should request the user's permission to connect the web page to the user's wallet, and if permission has been granted, the wallet will be returned and exposing the full API for the dApp to use.\n\nQuery BrowserWallet.getInstalledWallets() to get a list of available wallets, then provide the wallet name for which wallet the user would like to connect with." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "WalletInstance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 85, - "character": 15 - } - ], - "parameters": [ - { - "id": 1315, - "name": "walletName", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 1310, - "name": "BrowserWallet", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1311, - "name": "getInstalledWallets", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 65, - "character": 9 - } - ], - "signatures": [ - { - "id": 1312, - "name": "getInstalledWallets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of wallets installed on user's device. Each wallet is an object with the following properties:\n- A name is provided to display wallet's name on the user interface.\n- A version is provided to display wallet's version on the user interface.\n- An icon is provided to display wallet's icon on the user interface." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of wallet names" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 65, - "character": 9 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 293, - "name": "Wallet", - "package": "@meshsdk/core" - } - } - } - ] - }, - { - "id": 1316, - "name": "resolveInstance", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 429, - "character": 17 - } - ], - "signatures": [ - { - "id": 1317, - "name": "resolveInstance", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 429, - "character": 17 - } - ], - "parameters": [ - { - "id": 1318, - "name": "walletName", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "WalletInstance" - }, - "name": "WalletInstance", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - ] - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 1319 - ] - }, - { - "title": "Properties", - "children": [ - 1324, - 1325, - 1323 - ] - }, - { - "title": "Methods", - "children": [ - 1367, - 1326, - 1328, - 1330, - 1369, - 1333, - 1371, - 1374, - 1335, - 1337, - 1359, - 1339, - 1361, - 1364, - 1341, - 1344, - 1348, - 1352, - 1356, - 1313, - 1311, - 1316 - ] - } - ], - "sources": [ - { - "fileName": "wallet/browser.service.ts", - "line": 47, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 59, - "name": "IInitiator", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 75, - "name": "ISigner", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 1376, - "name": "EmbeddedWallet", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 1421, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 32, - "character": 2 - } - ], - "signatures": [ - { - "id": 1422, - "name": "new EmbeddedWallet", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 32, - "character": 2 - } - ], - "parameters": [ - { - "id": 1423, - "name": "_networkId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1424, - "name": "_encryptedSecret", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ] - } - } - ], - "type": { - "type": "reference", - "target": 1376, - "name": "EmbeddedWallet", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1426, - "name": "_encryptedSecret", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 34, - "character": 21 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ] - } - }, - { - "id": 1425, - "name": "_networkId", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 33, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1454, - "name": "accountContext", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 209, - "character": 10 - } - ], - "signatures": [ - { - "id": 1455, - "name": "accountContext", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 209, - "character": 10 - } - ], - "typeParameter": [ - { - "id": 1456, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {} - } - ], - "parameters": [ - { - "id": 1457, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1458, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1459, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1460, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 1461, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 213, - "character": 14 - } - ], - "signatures": [ - { - "id": 1462, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 213, - "character": 14 - } - ], - "parameters": [ - { - "id": 1463, - "name": "paymentKey", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 1464, - "name": "stakeKey", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "type": { - "type": "reference", - "target": 1456, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - } - ] - } - } - } - ], - "type": { - "type": "reference", - "target": 1456, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - } - ] - }, - { - "id": 1447, - "name": "addPaymentKey", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 153, - "character": 2 - } - ], - "signatures": [ - { - "id": 1448, - "name": "addPaymentKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 153, - "character": 2 - } - ], - "parameters": [ - { - "id": 1449, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1450, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1451, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1452, - "name": "signatures", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Vkeywitnesses" - }, - "name": "Vkeywitnesses", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 1453, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Vkeywitnesses" - }, - "name": "Vkeywitnesses", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ] - }, - { - "id": 1427, - "name": "getAccount", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 37, - "character": 2 - } - ], - "signatures": [ - { - "id": 1428, - "name": "getAccount", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 37, - "character": 2 - } - ], - "parameters": [ - { - "id": 1429, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1430, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1431, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": 97, - "name": "Account", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1432, - "name": "signData", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 74, - "character": 2 - } - ], - "signatures": [ - { - "id": 1433, - "name": "signData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 74, - "character": 2 - } - ], - "parameters": [ - { - "id": 1434, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1435, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1436, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1437, - "name": "payload", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1438, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1439, - "name": "signTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 112, - "character": 2 - } - ], - "signatures": [ - { - "id": 1440, - "name": "signTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 112, - "character": 2 - } - ], - "parameters": [ - { - "id": 1441, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1442, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1443, - "name": "utxos", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1444, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1445, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - } - }, - { - "id": 1446, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Vkeywitnesses" - }, - "name": "Vkeywitnesses", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ] - }, - { - "id": 1393, - "name": "decrypt", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 230, - "character": 17 - } - ], - "signatures": [ - { - "id": 1394, - "name": "decrypt", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 230, - "character": 17 - } - ], - "parameters": [ - { - "id": 1395, - "name": "data", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1396, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1397, - "name": "encrypt", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 238, - "character": 17 - } - ], - "signatures": [ - { - "id": 1398, - "name": "encrypt", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 238, - "character": 17 - } - ], - "parameters": [ - { - "id": 1399, - "name": "data", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1400, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1377, - "name": "encryptMnemonic", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 167, - "character": 9 - } - ], - "signatures": [ - { - "id": 1378, - "name": "encryptMnemonic", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 167, - "character": 9 - } - ], - "parameters": [ - { - "id": 1379, - "name": "words", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1380, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1381, - "name": "encryptPrivateKey", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 177, - "character": 9 - } - ], - "signatures": [ - { - "id": 1382, - "name": "encryptPrivateKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 177, - "character": 9 - } - ], - "parameters": [ - { - "id": 1383, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1384, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1385, - "name": "encryptSigningKeys", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 186, - "character": 9 - } - ], - "signatures": [ - { - "id": 1386, - "name": "encryptSigningKeys", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 186, - "character": 9 - } - ], - "parameters": [ - { - "id": 1387, - "name": "cborPaymentKey", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1388, - "name": "cborStakeKey", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1389, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ] - }, - { - "id": 1390, - "name": "generateMnemonic", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 204, - "character": 9 - } - ], - "signatures": [ - { - "id": 1391, - "name": "generateMnemonic", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 204, - "character": 9 - } - ], - "parameters": [ - { - "id": 1392, - "name": "strength", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "256" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ] - }, - { - "id": 1401, - "name": "resolveAddress", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 245, - "character": 17 - } - ], - "signatures": [ - { - "id": 1402, - "name": "resolveAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 245, - "character": 17 - } - ], - "parameters": [ - { - "id": 1403, - "name": "networkId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1404, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1405, - "name": "payment", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 1406, - "name": "stake", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ] - }, - { - "id": 1407, - "name": "resolveKeys", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 266, - "character": 17 - } - ], - "signatures": [ - { - "id": 1408, - "name": "resolveKeys", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 266, - "character": 17 - } - ], - "parameters": [ - { - "id": 1409, - "name": "accountIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1410, - "name": "keyIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1411, - "name": "password", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1412, - "name": "encryptedSecret", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ] - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1413, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1414, - "name": "paymentKey", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 271, - "character": 7 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 1415, - "name": "stakeKey", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 271, - "character": 31 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PrivateKey" - }, - "name": "PrivateKey", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1414, - 1415 - ] - } - ], - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 271, - "character": 5 - } - ] - } - } - } - ] - }, - { - "id": 1416, - "name": "resolveSigners", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true, - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 288, - "character": 17 - } - ], - "signatures": [ - { - "id": 1417, - "name": "resolveSigners", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 288, - "character": 17 - } - ], - "parameters": [ - { - "id": 1418, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1419, - "name": "utxos", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1420, - "name": "paymentKeyHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Set" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Set", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 1421 - ] - }, - { - "title": "Properties", - "children": [ - 1426, - 1425 - ] - }, - { - "title": "Methods", - "children": [ - 1454, - 1447, - 1427, - 1432, - 1439, - 1393, - 1397, - 1377, - 1381, - 1385, - 1390, - 1401, - 1407, - 1416 - ] - } - ], - "sources": [ - { - "fileName": "wallet/embedded.service.ts", - "line": 31, - "character": 13 - } - ] - }, - { - "id": 697, - "name": "ForgeScript", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 714, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "signatures": [ - { - "id": 715, - "name": "new ForgeScript", - "variant": "signature", - "kind": 16384, - "flags": {}, - "type": { - "type": "reference", - "target": 697, - "name": "ForgeScript", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 711, - "name": "fromNativeScript", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 60, - "character": 9 - } - ], - "signatures": [ - { - "id": 712, - "name": "fromNativeScript", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 60, - "character": 9 - } - ], - "parameters": [ - { - "id": 713, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 708, - "name": "withAllSignatures", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 46, - "character": 9 - } - ], - "signatures": [ - { - "id": 709, - "name": "withAllSignatures", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 46, - "character": 9 - } - ], - "parameters": [ - { - "id": 710, - "name": "addresses", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 705, - "name": "withAnySignature", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 32, - "character": 9 - } - ], - "signatures": [ - { - "id": 706, - "name": "withAnySignature", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 32, - "character": 9 - } - ], - "parameters": [ - { - "id": 707, - "name": "addresses", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 701, - "name": "withAtLeastNSignatures", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 16, - "character": 9 - } - ], - "signatures": [ - { - "id": 702, - "name": "withAtLeastNSignatures", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 16, - "character": 9 - } - ], - "parameters": [ - { - "id": 703, - "name": "addresses", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 704, - "name": "minimumRequired", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 698, - "name": "withOneSignature", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 9, - "character": 9 - } - ], - "signatures": [ - { - "id": 699, - "name": "withOneSignature", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 9, - "character": 9 - } - ], - "parameters": [ - { - "id": 700, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 714 - ] - }, - { - "title": "Methods", - "children": [ - 711, - 708, - 705, - 701, - 698 - ] - } - ], - "sources": [ - { - "fileName": "scripts/forge.script.ts", - "line": 8, - "character": 13 - } - ] - }, - { - "id": 455, - "name": "InfuraProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 456, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 8, - "character": 2 - } - ], - "signatures": [ - { - "id": 457, - "name": "new InfuraProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 8, - "character": 2 - } - ], - "parameters": [ - { - "id": 458, - "name": "projectId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 459, - "name": "projectSecret", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 460, - "name": "options", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Partial" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "CreateInfuraProviderOptions" - }, - "name": "CreateInfuraProviderOptions", - "package": "@meshsdk/core" - } - ], - "name": "Partial", - "package": "typescript" - } - } - ], - "type": { - "type": "reference", - "target": 455, - "name": "InfuraProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 461, - "name": "_axiosInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 6, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/axios@1.6.3/node_modules/axios/index.d.ts", - "qualifiedName": "AxiosInstance" - }, - "name": "AxiosInstance", - "package": "axios" - } - }, - { - "id": 462, - "name": "uploadContent", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 23, - "character": 8 - } - ], - "signatures": [ - { - "id": 463, - "name": "uploadContent", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 23, - "character": 8 - } - ], - "parameters": [ - { - "id": 464, - "name": "content", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.d.ts", - "qualifiedName": "FormData" - }, - "name": "FormData", - "package": "typescript" - } - }, - { - "id": 465, - "name": "recursive", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 94, - "name": "IUploader.uploadContent" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 93, - "name": "IUploader.uploadContent" - } - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 456 - ] - }, - { - "title": "Properties", - "children": [ - 461 - ] - }, - { - "title": "Methods", - "children": [ - 462 - ] - } - ], - "sources": [ - { - "fileName": "providers/infura.provider.ts", - "line": 5, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 92, - "name": "IUploader", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 466, - "name": "KoiosProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Fetcher interface defines end points to query blockchain data." - } - ] - }, - "children": [ - { - "id": 467, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 29, - "character": 2 - }, - { - "fileName": "providers/koios.provider.ts", - "line": 30, - "character": 2 - }, - { - "fileName": "providers/koios.provider.ts", - "line": 36, - "character": 2 - } - ], - "signatures": [ - { - "id": 468, - "name": "new KoiosProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 29, - "character": 2 - } - ], - "parameters": [ - { - "id": 469, - "name": "baseUrl", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 466, - "name": "KoiosProvider", - "package": "@meshsdk/core" - } - }, - { - "id": 470, - "name": "new KoiosProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 30, - "character": 2 - } - ], - "parameters": [ - { - "id": 471, - "name": "network", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "preview" - }, - { - "type": "literal", - "value": "preprod" - }, - { - "type": "literal", - "value": "api" - }, - { - "type": "literal", - "value": "guild" - } - ] - } - }, - { - "id": 472, - "name": "token", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 473, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 466, - "name": "KoiosProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 474, - "name": "_axiosInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 27, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/axios@1.6.3/node_modules/axios/index.d.ts", - "qualifiedName": "AxiosInstance" - }, - "name": "AxiosInstance", - "package": "axios" - } - }, - { - "id": 475, - "name": "fetchAccountInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 64, - "character": 8 - } - ], - "signatures": [ - { - "id": 476, - "name": "fetchAccountInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 64, - "character": 8 - } - ], - "parameters": [ - { - "id": 477, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 102, - "name": "AccountInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 22, - "name": "IFetcher.fetchAccountInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 21, - "name": "IFetcher.fetchAccountInfo" - } - }, - { - "id": 478, - "name": "fetchAddressUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 89, - "character": 8 - } - ], - "signatures": [ - { - "id": 479, - "name": "fetchAddressUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 89, - "character": 8 - } - ], - "parameters": [ - { - "id": 480, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 481, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 25, - "name": "IFetcher.fetchAddressUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 24, - "name": "IFetcher.fetchAddressUTxOs" - } - }, - { - "id": 482, - "name": "fetchAssetAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 116, - "character": 8 - } - ], - "signatures": [ - { - "id": 483, - "name": "fetchAssetAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 116, - "character": 8 - } - ], - "parameters": [ - { - "id": 484, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 485, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 486, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 118, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 487, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 118, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 486, - 487 - ] - } - ], - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 118, - "character": 13 - } - ] - } - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 29, - "name": "IFetcher.fetchAssetAddresses" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 28, - "name": "IFetcher.fetchAssetAddresses" - } - }, - { - "id": 488, - "name": "fetchAssetMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 137, - "character": 8 - } - ], - "signatures": [ - { - "id": 489, - "name": "fetchAssetMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 137, - "character": 8 - } - ], - "parameters": [ - { - "id": 490, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 35, - "name": "IFetcher.fetchAssetMetadata" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 34, - "name": "IFetcher.fetchAssetMetadata" - } - }, - { - "id": 491, - "name": "fetchBlockInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 155, - "character": 8 - } - ], - "signatures": [ - { - "id": 492, - "name": "fetchBlockInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 155, - "character": 8 - } - ], - "parameters": [ - { - "id": 493, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 153, - "name": "BlockInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 38, - "name": "IFetcher.fetchBlockInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 37, - "name": "IFetcher.fetchBlockInfo" - } - }, - { - "id": 494, - "name": "fetchCollectionAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 186, - "character": 8 - } - ], - "signatures": [ - { - "id": 495, - "name": "fetchCollectionAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 186, - "character": 8 - } - ], - "parameters": [ - { - "id": 496, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 497, - "name": "cursor", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 498, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 499, - "name": "assets", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 189, - "character": 15 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 500, - "name": "next", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 189, - "character": 32 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 499, - 500 - ] - } - ], - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 189, - "character": 13 - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 41, - "name": "IFetcher.fetchCollectionAssets" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 40, - "name": "IFetcher.fetchCollectionAssets" - } - }, - { - "id": 501, - "name": "fetchHandleAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 210, - "character": 8 - } - ], - "signatures": [ - { - "id": 502, - "name": "fetchHandleAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 210, - "character": 8 - } - ], - "parameters": [ - { - "id": 503, - "name": "handle", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 48, - "name": "IFetcher.fetchHandleAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 47, - "name": "IFetcher.fetchHandleAddress" - } - }, - { - "id": 504, - "name": "fetchProtocolParameters", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 225, - "character": 8 - } - ], - "signatures": [ - { - "id": 505, - "name": "fetchProtocolParameters", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 225, - "character": 8 - } - ], - "parameters": [ - { - "id": 506, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 51, - "name": "IFetcher.fetchProtocolParameters" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 50, - "name": "IFetcher.fetchProtocolParameters" - } - }, - { - "id": 507, - "name": "fetchTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 261, - "character": 8 - } - ], - "signatures": [ - { - "id": 508, - "name": "fetchTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 261, - "character": 8 - } - ], - "parameters": [ - { - "id": 509, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 268, - "name": "TransactionInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 54, - "name": "IFetcher.fetchTxInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 53, - "name": "IFetcher.fetchTxInfo" - } - }, - { - "id": 510, - "name": "fetchUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 286, - "character": 8 - } - ], - "signatures": [ - { - "id": 511, - "name": "fetchUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 286, - "character": 8 - } - ], - "parameters": [ - { - "id": 512, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 57, - "name": "IFetcher.fetchUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 56, - "name": "IFetcher.fetchUTxOs" - } - }, - { - "id": 513, - "name": "onTxConfirmed", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 304, - "character": 2 - } - ], - "signatures": [ - { - "id": 514, - "name": "onTxConfirmed", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 304, - "character": 2 - } - ], - "parameters": [ - { - "id": 515, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 516, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 517, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 304, - "character": 42 - } - ], - "signatures": [ - { - "id": 518, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 304, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - }, - { - "id": 519, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "100" - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "implementationOf": { - "type": "reference", - "target": 69, - "name": "IListener.onTxConfirmed" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 68, - "name": "IListener.onTxConfirmed" - } - }, - { - "id": 527, - "name": "resolveScriptRef", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 373, - "character": 10 - } - ], - "signatures": [ - { - "id": 528, - "name": "resolveScriptRef", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 373, - "character": 29 - } - ], - "parameters": [ - { - "id": 529, - "name": "kScriptRef", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ] - }, - { - "id": 520, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 329, - "character": 8 - } - ], - "signatures": [ - { - "id": 521, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 329, - "character": 8 - } - ], - "parameters": [ - { - "id": 522, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 523, - "name": "toUTxO", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 347, - "character": 10 - } - ], - "signatures": [ - { - "id": 524, - "name": "toUTxO", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 347, - "character": 10 - } - ], - "parameters": [ - { - "id": 525, - "name": "utxo", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 526, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 467 - ] - }, - { - "title": "Properties", - "children": [ - 474 - ] - }, - { - "title": "Methods", - "children": [ - 475, - 478, - 482, - 488, - 491, - 494, - 501, - 504, - 507, - 510, - 513, - 527, - 520, - 523 - ] - } - ], - "sources": [ - { - "fileName": "providers/koios.provider.ts", - "line": 26, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 67, - "name": "IListener", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 563, - "name": "MaestroProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Fetcher interface defines end points to query blockchain data." - } - ] - }, - "children": [ - { - "id": 564, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 43, - "character": 2 - } - ], - "signatures": [ - { - "id": 565, - "name": "new MaestroProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 43, - "character": 2 - } - ], - "parameters": [ - { - "id": 566, - "name": "__namedParameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 559, - "name": "MaestroConfig", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 563, - "name": "MaestroProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 568, - "name": "_amountsAsStrings", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 34, - "character": 19 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 569, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 570, - "name": "headers", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 36, - "character": 6 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 571, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 572, - "name": "amounts-as-strings", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 37, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"true\"" - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 572 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 36, - "character": 15 - } - ] - } - }, - "defaultValue": "..." - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 570 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 35, - "character": 4 - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 567, - "name": "_axiosInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 33, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/axios@1.6.3/node_modules/axios/index.d.ts", - "qualifiedName": "AxiosInstance" - }, - "name": "AxiosInstance", - "package": "axios" - } - }, - { - "id": 573, - "name": "submitUrl", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 41, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 574, - "name": "evaluateTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 51, - "character": 8 - } - ], - "signatures": [ - { - "id": 575, - "name": "evaluateTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 51, - "character": 8 - } - ], - "parameters": [ - { - "id": 576, - "name": "cbor", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Omit" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - }, - { - "type": "literal", - "value": "data" - } - ], - "name": "Omit", - "package": "typescript" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 18, - "name": "IEvaluator.evaluateTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 17, - "name": "IEvaluator.evaluateTx" - } - }, - { - "id": 577, - "name": "fetchAccountInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 79, - "character": 8 - } - ], - "signatures": [ - { - "id": 578, - "name": "fetchAccountInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 79, - "character": 8 - } - ], - "parameters": [ - { - "id": 579, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 102, - "name": "AccountInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 22, - "name": "IFetcher.fetchAccountInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 21, - "name": "IFetcher.fetchAccountInfo" - } - }, - { - "id": 580, - "name": "fetchAddressUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 106, - "character": 8 - } - ], - "signatures": [ - { - "id": 581, - "name": "fetchAddressUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 106, - "character": 8 - } - ], - "parameters": [ - { - "id": 582, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 583, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 25, - "name": "IFetcher.fetchAddressUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 24, - "name": "IFetcher.fetchAddressUTxOs" - } - }, - { - "id": 584, - "name": "fetchAssetAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 144, - "character": 8 - } - ], - "signatures": [ - { - "id": 585, - "name": "fetchAssetAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 144, - "character": 8 - } - ], - "parameters": [ - { - "id": 586, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 587, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 588, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 146, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 589, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 146, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 588, - 589 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 146, - "character": 13 - } - ] - } - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 29, - "name": "IFetcher.fetchAssetAddresses" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 28, - "name": "IFetcher.fetchAssetAddresses" - } - }, - { - "id": 590, - "name": "fetchAssetMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 184, - "character": 8 - } - ], - "signatures": [ - { - "id": 591, - "name": "fetchAssetMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 184, - "character": 8 - } - ], - "parameters": [ - { - "id": 592, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 35, - "name": "IFetcher.fetchAssetMetadata" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 34, - "name": "IFetcher.fetchAssetMetadata" - } - }, - { - "id": 593, - "name": "fetchBlockInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 205, - "character": 8 - } - ], - "signatures": [ - { - "id": 594, - "name": "fetchBlockInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 205, - "character": 8 - } - ], - "parameters": [ - { - "id": 595, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 153, - "name": "BlockInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 38, - "name": "IFetcher.fetchBlockInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 37, - "name": "IFetcher.fetchBlockInfo" - } - }, - { - "id": 596, - "name": "fetchCollectionAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 238, - "character": 8 - } - ], - "signatures": [ - { - "id": 597, - "name": "fetchCollectionAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 238, - "character": 8 - } - ], - "parameters": [ - { - "id": 598, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 599, - "name": "cursor", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 600, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 601, - "name": "assets", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 241, - "character": 15 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 602, - "name": "next", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 241, - "character": 32 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 601, - 602 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 241, - "character": 13 - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 41, - "name": "IFetcher.fetchCollectionAssets" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 40, - "name": "IFetcher.fetchCollectionAssets" - } - }, - { - "id": 603, - "name": "fetchHandleAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 265, - "character": 8 - } - ], - "signatures": [ - { - "id": 604, - "name": "fetchHandleAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 265, - "character": 8 - } - ], - "parameters": [ - { - "id": 605, - "name": "handle", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 48, - "name": "IFetcher.fetchHandleAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 47, - "name": "IFetcher.fetchHandleAddress" - } - }, - { - "id": 606, - "name": "fetchProtocolParameters", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 281, - "character": 8 - } - ], - "signatures": [ - { - "id": 607, - "name": "fetchProtocolParameters", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 281, - "character": 8 - } - ], - "parameters": [ - { - "id": 608, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "Number.NaN" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 51, - "name": "IFetcher.fetchProtocolParameters" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 50, - "name": "IFetcher.fetchProtocolParameters" - } - }, - { - "id": 609, - "name": "fetchTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 344, - "character": 8 - } - ], - "signatures": [ - { - "id": 610, - "name": "fetchTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 344, - "character": 8 - } - ], - "parameters": [ - { - "id": 611, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 268, - "name": "TransactionInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 54, - "name": "IFetcher.fetchTxInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 53, - "name": "IFetcher.fetchTxInfo" - } - }, - { - "id": 612, - "name": "fetchUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 370, - "character": 8 - } - ], - "signatures": [ - { - "id": 613, - "name": "fetchUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 370, - "character": 8 - } - ], - "parameters": [ - { - "id": 614, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 57, - "name": "IFetcher.fetchUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 56, - "name": "IFetcher.fetchUTxOs" - } - }, - { - "id": 615, - "name": "onTxConfirmed", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 386, - "character": 2 - } - ], - "signatures": [ - { - "id": 616, - "name": "onTxConfirmed", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 386, - "character": 2 - } - ], - "parameters": [ - { - "id": 617, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 618, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 619, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 386, - "character": 42 - } - ], - "signatures": [ - { - "id": 620, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 386, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - }, - { - "id": 621, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "100" - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 628, - "name": "resolveScript", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 446, - "character": 10 - } - ], - "signatures": [ - { - "id": 629, - "name": "resolveScript", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 446, - "character": 26 - } - ], - "parameters": [ - { - "id": 630, - "name": "utxo", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroUTxO" - }, - "name": "MaestroUTxO", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ] - }, - { - "id": 622, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 411, - "character": 8 - } - ], - "signatures": [ - { - "id": 623, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 411, - "character": 8 - } - ], - "parameters": [ - { - "id": 624, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 625, - "name": "toUTxO", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 428, - "character": 10 - } - ], - "signatures": [ - { - "id": 626, - "name": "toUTxO", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 428, - "character": 19 - } - ], - "parameters": [ - { - "id": 627, - "name": "utxo", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroUTxO" - }, - "name": "MaestroUTxO", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 564 - ] - }, - { - "title": "Properties", - "children": [ - 568, - 567, - 573 - ] - }, - { - "title": "Methods", - "children": [ - 574, - 577, - 580, - 584, - 590, - 593, - 596, - 603, - 606, - 609, - 612, - 615, - 628, - 622, - 625 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 32, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 16, - "name": "IEvaluator", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 865, - "name": "MeshTxBuilder", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "MeshTxBuilder is a lower level api for building transaction" - } - ], - "blockTags": [ - { - "tag": "@param", - "name": "fetcher", - "content": [ - { - "kind": "text", - "text": "an optional parameter for fetching utxo" - } - ] - }, - { - "tag": "@param", - "name": "submitter", - "content": [ - { - "kind": "text", - "text": "an optional parameter for submitting transaction" - } - ] - }, - { - "tag": "@param", - "name": "evaluator", - "content": [ - { - "kind": "text", - "text": "an optional parameter for evaluating transaction" - } - ] - }, - { - "tag": "@param", - "name": "isHydra", - "content": [ - { - "kind": "text", - "text": "an optional parameter for using hydra transaction building for configuring 0 fee in protocol parameters" - } - ] - } - ] - }, - "children": [ - { - "id": 866, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 31, - "character": 2 - } - ], - "signatures": [ - { - "id": 867, - "name": "new MeshTxBuilder", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 31, - "character": 2 - } - ], - "parameters": [ - { - "id": 868, - "name": "__namedParameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilderOptions" - }, - "name": "MeshTxBuilderOptions", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "overwrites": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.constructor" - } - } - ], - "overwrites": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.constructor" - } - }, - { - "id": 871, - "name": "_evaluator", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 27, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": 16, - "name": "IEvaluator", - "package": "@meshsdk/core" - } - }, - { - "id": 869, - "name": "_fetcher", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 25, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - } - }, - { - "id": 870, - "name": "_submitter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 26, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - }, - { - "id": 908, - "name": "collateralQueueItem", - "variant": "declaration", - "kind": 1024, - "flags": { - "isProtected": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 62, - "character": 12 - } - ], - "type": { - "type": "reference", - "target": 1101, - "name": "PubKeyTxIn", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.collateralQueueItem" - } - }, - { - "id": 904, - "name": "isHydra", - "variant": "declaration", - "kind": 1024, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 54, - "character": 12 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false", - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.isHydra" - } - }, - { - "id": 905, - "name": "meshTxBuilderBody", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 56, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1085, - "name": "MeshTxBuilderBody", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.meshTxBuilderBody" - } - }, - { - "id": 906, - "name": "mintItem", - "variant": "declaration", - "kind": 1024, - "flags": { - "isProtected": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 58, - "character": 12 - } - ], - "type": { - "type": "reference", - "target": 1171, - "name": "MintItem", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintItem" - } - }, - { - "id": 872, - "name": "queriedTxHashes", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 28, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Set" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Set", - "package": "typescript" - }, - "defaultValue": "..." - }, - { - "id": 873, - "name": "queriedUTxOs", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 29, - "character": 10 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 874, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 29, - "character": 24 - } - ], - "indexSignature": { - "id": 875, - "name": "__index", - "variant": "signature", - "kind": 8192, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 29, - "character": 26 - } - ], - "parameters": [ - { - "id": 876, - "name": "x", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - } - }, - "defaultValue": "{}" - }, - { - "id": 909, - "name": "refScriptTxInQueueItem", - "variant": "declaration", - "kind": 1024, - "flags": { - "isProtected": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 64, - "character": 12 - } - ], - "type": { - "type": "reference", - "target": 1158, - "name": "RefTxIn", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.refScriptTxInQueueItem" - } - }, - { - "id": 902, - "name": "txBuilder", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 48, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionBuilder" - }, - "name": "TransactionBuilder", - "package": "@emurgo/cardano-serialization-lib-nodejs" - }, - "defaultValue": "...", - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txBuilder" - } - }, - { - "id": 903, - "name": "txEvaluationMultiplier", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 49, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "1.1", - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txEvaluationMultiplier" - } - }, - { - "id": 901, - "name": "txHex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 47, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "''", - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txHex" - } - }, - { - "id": 907, - "name": "txInQueueItem", - "variant": "declaration", - "kind": 1024, - "flags": { - "isProtected": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 60, - "character": 12 - } - ], - "type": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInQueueItem" - } - }, - { - "id": 1070, - "name": "addAllCertificates", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1536, - "character": 12 - } - ], - "signatures": [ - { - "id": 1071, - "name": "addAllCertificates", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1536, - "character": 33 - } - ], - "parameters": [ - { - "id": 1072, - "name": "allCertificates", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1209, - "name": "Certificate", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addAllCertificates" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addAllCertificates" - } - }, - { - "id": 1065, - "name": "addAllMints", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1341, - "character": 12 - } - ], - "signatures": [ - { - "id": 1066, - "name": "addAllMints", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1341, - "character": 26 - } - ], - "parameters": [ - { - "id": 1067, - "name": "mints", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1171, - "name": "MintItem", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addAllMints" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addAllMints" - } - }, - { - "id": 1073, - "name": "addCostModels", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1544, - "character": 12 - } - ], - "signatures": [ - { - "id": 1074, - "name": "addCostModels", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1544, - "character": 28 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addCostModels" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.addCostModels" - } - }, - { - "id": 1082, - "name": "castDataToPlutusData", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1635, - "character": 12 - } - ], - "signatures": [ - { - "id": 1083, - "name": "castDataToPlutusData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1635, - "character": 35 - } - ], - "parameters": [ - { - "id": 1084, - "name": "__namedParameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1191, - "name": "BuilderData", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "PlutusData" - }, - "name": "PlutusData", - "package": "@emurgo/cardano-serialization-lib-nodejs" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.castDataToPlutusData" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.castDataToPlutusData" - } - }, - { - "id": 1079, - "name": "castRawDataToJsonString", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1627, - "character": 12 - } - ], - "signatures": [ - { - "id": 1080, - "name": "castRawDataToJsonString", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1627, - "character": 38 - } - ], - "parameters": [ - { - "id": 1081, - "name": "rawData", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "object" - } - ] - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.castRawDataToJsonString" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.castRawDataToJsonString" - } - }, - { - "id": 1039, - "name": "changeAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 918, - "character": 2 - } - ], - "signatures": [ - { - "id": 1040, - "name": "changeAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Configure the address to accept change UTxO" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 918, - "character": 18 - } - ], - "parameters": [ - { - "id": 1041, - "name": "addr", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The address to accept change UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.changeAddress" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.changeAddress" - } - }, - { - "id": 877, - "name": "complete", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 49, - "character": 2 - } - ], - "signatures": [ - { - "id": 878, - "name": "complete", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "It builds the transaction and query the blockchain for missing information" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The signed transaction in hex ready to submit / signed by client" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 49, - "character": 13 - } - ], - "parameters": [ - { - "id": 879, - "name": "customizedTx", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The optional customized transaction body" - } - ] - }, - "type": { - "type": "reference", - "target": 1085, - "name": "MeshTxBuilderBody", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 917, - "name": "completeSigning", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 132, - "character": 2 - } - ], - "signatures": [ - { - "id": 918, - "name": "completeSigning", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Complete the signing process" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The signed transaction in hex" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 132, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.completeSigning" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.completeSigning" - } - }, - { - "id": 914, - "name": "completeSync", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 119, - "character": 2 - } - ], - "signatures": [ - { - "id": 915, - "name": "completeSync", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "It builds the transaction without dependencies" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The signed transaction in hex ready to submit / signed by client" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 119, - "character": 17 - } - ], - "parameters": [ - { - "id": 916, - "name": "customizedTx", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The optional customized transaction body" - } - ] - }, - "type": { - "type": "reference", - "target": 1085, - "name": "MeshTxBuilderBody", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.completeSync" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.completeSync" - } - }, - { - "id": 889, - "name": "completeTxInformation", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 129, - "character": 10 - } - ], - "signatures": [ - { - "id": 890, - "name": "completeTxInformation", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 129, - "character": 34 - } - ], - "parameters": [ - { - "id": 891, - "name": "input", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 1028, - "name": "delegateStakeCertificate", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 876, - "character": 2 - } - ], - "signatures": [ - { - "id": 1029, - "name": "delegateStakeCertificate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a stake delegation certificate, and adds it to the transaction\nThis will delegate stake from the corresponding stake address to the pool" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 876, - "character": 29 - } - ], - "parameters": [ - { - "id": 1030, - "name": "stakeKeyHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The keyHash of the stake key" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1031, - "name": "poolId", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "poolId can be in either bech32 or hex form" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.delegateStakeCertificate" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.delegateStakeCertificate" - } - }, - { - "id": 1032, - "name": "deregisterStakeCertificate", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 890, - "character": 2 - } - ], - "signatures": [ - { - "id": 1033, - "name": "deregisterStakeCertificate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a stake deregister certificate, and adds it to the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 890, - "character": 31 - } - ], - "parameters": [ - { - "id": 1034, - "name": "stakeKeyHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The keyHash of the stake key" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.deregisterStakeCertificate" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.deregisterStakeCertificate" - } - }, - { - "id": 912, - "name": "emptyTxBuilderBody", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 90, - "character": 2 - } - ], - "signatures": [ - { - "id": 913, - "name": "emptyTxBuilderBody", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Make an empty transaction body for building transaction in object" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "An empty transaction body" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 90, - "character": 23 - } - ], - "type": { - "type": "reference", - "target": 1085, - "name": "MeshTxBuilderBody", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.emptyTxBuilderBody" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.emptyTxBuilderBody" - } - }, - { - "id": 883, - "name": "getUTxOInfo", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 96, - "character": 10 - } - ], - "signatures": [ - { - "id": 884, - "name": "getUTxOInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get the UTxO information from the blockchain" - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 96, - "character": 24 - } - ], - "parameters": [ - { - "id": 885, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1042, - "name": "invalidBefore", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 928, - "character": 2 - } - ], - "signatures": [ - { - "id": 1043, - "name": "invalidBefore", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the transaction valid interval to be valid only after the slot" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 928, - "character": 18 - } - ], - "parameters": [ - { - "id": 1044, - "name": "slot", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction is valid only after this slot" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.invalidBefore" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.invalidBefore" - } - }, - { - "id": 1045, - "name": "invalidHereafter", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 938, - "character": 2 - } - ], - "signatures": [ - { - "id": 1046, - "name": "invalidHereafter", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the transaction valid interval to be valid only before the slot" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 938, - "character": 21 - } - ], - "parameters": [ - { - "id": 1047, - "name": "slot", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction is valid only before this slot" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.invalidHereafter" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.invalidHereafter" - } - }, - { - "id": 892, - "name": "isInputComplete", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 171, - "character": 10 - } - ], - "signatures": [ - { - "id": 893, - "name": "isInputComplete", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 171, - "character": 28 - } - ], - "parameters": [ - { - "id": 894, - "name": "txIn", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 895, - "name": "isInputInfoComplete", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 181, - "character": 10 - } - ], - "signatures": [ - { - "id": 896, - "name": "isInputInfoComplete", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 181, - "character": 32 - } - ], - "parameters": [ - { - "id": 897, - "name": "txIn", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 898, - "name": "isRefScriptInfoComplete", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 190, - "character": 10 - } - ], - "signatures": [ - { - "id": 899, - "name": "isRefScriptInfoComplete", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 190, - "character": 36 - } - ], - "parameters": [ - { - "id": 900, - "name": "scriptTxIn", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1129, - "name": "ScriptTxIn", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 1048, - "name": "metadataValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 949, - "character": 2 - } - ], - "signatures": [ - { - "id": 1049, - "name": "metadataValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Add metadata to the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 949, - "character": 18 - } - ], - "typeParameter": [ - { - "id": 1050, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "object" - } - } - ], - "parameters": [ - { - "id": 1051, - "name": "tag", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The tag of the metadata" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1052, - "name": "metadata", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The metadata in object format" - } - ] - }, - "type": { - "type": "reference", - "target": 1050, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.metadataValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.metadataValue" - } - }, - { - "id": 983, - "name": "mint", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 684, - "character": 2 - } - ], - "signatures": [ - { - "id": 984, - "name": "mint", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the minting value of transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 684, - "character": 9 - } - ], - "parameters": [ - { - "id": 985, - "name": "quantity", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The quantity of asset to be minted" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 986, - "name": "policy", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The policy id of the asset to be minted" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 987, - "name": "name", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The hex of token name of the asset to be minted" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mint" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mint" - } - }, - { - "id": 981, - "name": "mintPlutusScriptV2", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 672, - "character": 2 - } - ], - "signatures": [ - { - "id": 982, - "name": "mintPlutusScriptV2", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the instruction that it is currently using V2 Plutus minting scripts" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 672, - "character": 23 - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintPlutusScriptV2" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintPlutusScriptV2" - } - }, - { - "id": 1005, - "name": "mintRedeemerValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 795, - "character": 2 - } - ], - "signatures": [ - { - "id": 1006, - "name": "mintRedeemerValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the redeemer for the reference input to be spent in same transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 795, - "character": 22 - } - ], - "parameters": [ - { - "id": 1007, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 1008, - "name": "exUnits", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The execution units budget for the redeemer" - } - ] - }, - "type": { - "type": "reflection", - "declaration": { - "id": 1009, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1010, - "name": "mem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1011, - "name": "steps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1010, - 1011 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 797, - "character": 14 - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 1012, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintRedeemerValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintRedeemerValue" - } - }, - { - "id": 997, - "name": "mintReferenceTxInRedeemerValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 750, - "character": 2 - } - ], - "signatures": [ - { - "id": 998, - "name": "mintReferenceTxInRedeemerValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the redeemer for minting" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 750, - "character": 35 - } - ], - "parameters": [ - { - "id": 999, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 1000, - "name": "exUnits", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The execution units budget for the redeemer" - } - ] - }, - "type": { - "type": "reflection", - "declaration": { - "id": 1001, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1002, - "name": "mem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1003, - "name": "steps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1002, - 1003 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 752, - "character": 14 - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 1004, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintReferenceTxInRedeemerValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintReferenceTxInRedeemerValue" - } - }, - { - "id": 992, - "name": "mintTxInReference", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 720, - "character": 2 - } - ], - "signatures": [ - { - "id": 993, - "name": "mintTxInReference", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Use reference script for minting" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 720, - "character": 22 - } - ], - "parameters": [ - { - "id": 994, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction hash of the UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 995, - "name": "txIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction index of the UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 996, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - }, - "defaultValue": "'V2'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintTxInReference" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintTxInReference" - } - }, - { - "id": 988, - "name": "mintingScript", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 704, - "character": 2 - } - ], - "signatures": [ - { - "id": 989, - "name": "mintingScript", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the minting script of current mint" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 704, - "character": 18 - } - ], - "parameters": [ - { - "id": 990, - "name": "scriptCBOR", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The CBOR hex of the minting policy script" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 991, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional - The Plutus script version" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - }, - "defaultValue": "'V2'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintingScript" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.mintingScript" - } - }, - { - "id": 1053, - "name": "protocolParams", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 959, - "character": 2 - } - ], - "signatures": [ - { - "id": 1054, - "name": "protocolParams", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the protocol parameters to be used for the transaction other than the default one" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 959, - "character": 19 - } - ], - "parameters": [ - { - "id": 1055, - "name": "params", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "(Part of) the protocol parameters to be used for the transaction" - } - ] - }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Partial" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Partial", - "package": "typescript" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.protocolParams" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.protocolParams" - } - }, - { - "id": 886, - "name": "queryAllTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 105, - "character": 10 - } - ], - "signatures": [ - { - "id": 887, - "name": "queryAllTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 105, - "character": 27 - } - ], - "parameters": [ - { - "id": 888, - "name": "incompleteTxIns", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "void" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1068, - "name": "queueAllLastItem", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1519, - "character": 12 - } - ], - "signatures": [ - { - "id": 1069, - "name": "queueAllLastItem", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1519, - "character": 31 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.queueAllLastItem" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.queueAllLastItem" - } - }, - { - "id": 977, - "name": "readOnlyTxInReference", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 663, - "character": 2 - } - ], - "signatures": [ - { - "id": 978, - "name": "readOnlyTxInReference", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Specify a read only reference input. This reference input is not witnessing anything it is simply provided in the plutus script context." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 663, - "character": 26 - } - ], - "parameters": [ - { - "id": 979, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction hash of the reference UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 980, - "name": "txIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction index of the reference UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.readOnlyTxInReference" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.readOnlyTxInReference" - } - }, - { - "id": 1022, - "name": "registerPoolCertificate", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 848, - "character": 2 - } - ], - "signatures": [ - { - "id": 1023, - "name": "registerPoolCertificate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a pool registration certificate, and adds it to the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 848, - "character": 28 - } - ], - "parameters": [ - { - "id": 1024, - "name": "poolParams", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Parameters for pool registration" - } - ] - }, - "type": { - "type": "reference", - "target": 209, - "name": "PoolParams", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.registerPoolCertificate" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.registerPoolCertificate" - } - }, - { - "id": 1025, - "name": "registerStakeCertificate", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 861, - "character": 2 - } - ], - "signatures": [ - { - "id": 1026, - "name": "registerStakeCertificate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a stake registration certificate, and adds it to the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 861, - "character": 29 - } - ], - "parameters": [ - { - "id": 1027, - "name": "stakeKeyHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The keyHash of the stake key" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.registerStakeCertificate" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.registerStakeCertificate" - } - }, - { - "id": 1063, - "name": "removeDuplicateInputs", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1117, - "character": 12 - } - ], - "signatures": [ - { - "id": 1064, - "name": "removeDuplicateInputs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1117, - "character": 36 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.removeDuplicateInputs" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.removeDuplicateInputs" - } - }, - { - "id": 1013, - "name": "requiredSignerHash", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 809, - "character": 2 - } - ], - "signatures": [ - { - "id": 1014, - "name": "requiredSignerHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the required signer of the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 809, - "character": 23 - } - ], - "parameters": [ - { - "id": 1015, - "name": "pubKeyHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The PubKeyHash of the required signer" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.requiredSignerHash" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.requiredSignerHash" - } - }, - { - "id": 910, - "name": "reset", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 70, - "character": 2 - } - ], - "signatures": [ - { - "id": 911, - "name": "reset", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Reset everything in the MeshTxBuilder instance" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 70, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.reset" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.reset" - } - }, - { - "id": 1035, - "name": "retirePoolCertificate", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 904, - "character": 2 - } - ], - "signatures": [ - { - "id": 1036, - "name": "retirePoolCertificate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a pool retire certificate, and adds it to the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 904, - "character": 26 - } - ], - "parameters": [ - { - "id": 1037, - "name": "poolId", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "poolId can be in either bech32 or hex form" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1038, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The intended epoch to retire the pool" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.retirePoolCertificate" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.retirePoolCertificate" - } - }, - { - "id": 1059, - "name": "selectUtxosFrom", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 981, - "character": 2 - } - ], - "signatures": [ - { - "id": 1060, - "name": "selectUtxosFrom", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "EXPERIMENTAL - Selects utxos to fill output value and puts them into inputs" - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 981, - "character": 20 - } - ], - "parameters": [ - { - "id": 1061, - "name": "extraInputs", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The inputs already placed into the object will remain, these extra inputs will be used to fill the remaining value needed" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1062, - "name": "threshold", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Extra value needed to be selected for, usually for paying fees and min UTxO value of change output" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "5000000" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.selectUtxosFrom" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.selectUtxosFrom" - } - }, - { - "id": 1056, - "name": "signingKey", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 971, - "character": 2 - } - ], - "signatures": [ - { - "id": 1057, - "name": "signingKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sign the transaction with the private key" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 971, - "character": 15 - } - ], - "parameters": [ - { - "id": 1058, - "name": "skeyHex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The private key in cborHex (with or without 5820 prefix, i.e. the format when generated from cardano-cli)" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.signingKey" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.signingKey" - } - }, - { - "id": 959, - "name": "spendingPlutusScriptV2", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 587, - "character": 2 - } - ], - "signatures": [ - { - "id": 960, - "name": "spendingPlutusScriptV2", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the instruction that it is currently using V2 Plutus spending scripts" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 587, - "character": 27 - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingPlutusScriptV2" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingPlutusScriptV2" - } - }, - { - "id": 967, - "name": "spendingReferenceTxInInlineDatumPresent", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 636, - "character": 2 - } - ], - "signatures": [ - { - "id": 968, - "name": "spendingReferenceTxInInlineDatumPresent", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "[Alias of txInInlineDatumPresent] Set the instruction that the reference input has inline datum" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 636, - "character": 44 - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingReferenceTxInInlineDatumPresent" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingReferenceTxInInlineDatumPresent" - } - }, - { - "id": 969, - "name": "spendingReferenceTxInRedeemerValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 648, - "character": 2 - } - ], - "signatures": [ - { - "id": 970, - "name": "spendingReferenceTxInRedeemerValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "[Alias of txInRedeemerValue] Set the redeemer for the reference input to be spent in same transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 648, - "character": 39 - } - ], - "parameters": [ - { - "id": 971, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 972, - "name": "exUnits", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The execution units budget for the redeemer" - } - ] - }, - "type": { - "type": "reflection", - "declaration": { - "id": 973, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 974, - "name": "mem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 975, - "name": "steps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 974, - 975 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 650, - "character": 14 - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 976, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingReferenceTxInRedeemerValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingReferenceTxInRedeemerValue" - } - }, - { - "id": 961, - "name": "spendingTxInReference", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 603, - "character": 2 - } - ], - "signatures": [ - { - "id": 962, - "name": "spendingTxInReference", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the reference input where it would also be spent in the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 603, - "character": 26 - } - ], - "parameters": [ - { - "id": 963, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction hash of the reference UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 964, - "name": "txIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction index of the reference UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 965, - "name": "spendingScriptHash", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The script hash of the spending script" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 966, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - }, - "defaultValue": "'V2'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingTxInReference" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.spendingTxInReference" - } - }, - { - "id": 880, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 87, - "character": 2 - } - ], - "signatures": [ - { - "id": 881, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Submit transactions to the blockchain using the fetcher instance" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 87, - "character": 13 - } - ], - "parameters": [ - { - "id": 882, - "name": "txHex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The signed transaction in hex" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 919, - "name": "txIn", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 269, - "character": 2 - } - ], - "signatures": [ - { - "id": 920, - "name": "txIn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the input for transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 269, - "character": 9 - } - ], - "parameters": [ - { - "id": 921, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction hash of the input UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 922, - "name": "txIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction index of the input UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 923, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The asset amount of index of the input UTxO" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 924, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The address of the input UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txIn" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txIn" - } - }, - { - "id": 1016, - "name": "txInCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 822, - "character": 2 - } - ], - "signatures": [ - { - "id": 1017, - "name": "txInCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the collateral UTxO for the transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 822, - "character": 19 - } - ], - "parameters": [ - { - "id": 1018, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction hash of the collateral UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1019, - "name": "txIndex", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The transaction index of the collateral UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1020, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The asset amount of index of the collateral UTxO" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1021, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The address of the collateral UTxO" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInCollateral" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInCollateral" - } - }, - { - "id": 929, - "name": "txInDatumValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 343, - "character": 2 - } - ], - "signatures": [ - { - "id": 930, - "name": "txInDatumValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the input datum for transaction input" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 343, - "character": 19 - } - ], - "parameters": [ - { - "id": 931, - "name": "datum", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 932, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInDatumValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInDatumValue" - } - }, - { - "id": 933, - "name": "txInInlineDatumPresent", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 383, - "character": 2 - } - ], - "signatures": [ - { - "id": 934, - "name": "txInInlineDatumPresent", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Tell the transaction builder that the input UTxO has inlined datum" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 383, - "character": 27 - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInInlineDatumPresent" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInInlineDatumPresent" - } - }, - { - "id": 935, - "name": "txInRedeemerValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 439, - "character": 2 - } - ], - "signatures": [ - { - "id": 936, - "name": "txInRedeemerValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the redeemer for the reference input to be spent in same transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 439, - "character": 22 - } - ], - "parameters": [ - { - "id": 937, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 938, - "name": "exUnits", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The execution units budget for the redeemer" - } - ] - }, - "type": { - "type": "reflection", - "declaration": { - "id": 939, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 940, - "name": "mem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 941, - "name": "steps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 940, - 941 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 441, - "character": 14 - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 942, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInRedeemerValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInRedeemerValue" - } - }, - { - "id": 925, - "name": "txInScript", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 310, - "character": 2 - } - ], - "signatures": [ - { - "id": 926, - "name": "txInScript", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the script for transaction input" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 310, - "character": 15 - } - ], - "parameters": [ - { - "id": 927, - "name": "scriptCbor", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The CborHex of the script" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 928, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional - The Plutus script version" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInScript" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txInScript" - } - }, - { - "id": 943, - "name": "txOut", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 483, - "character": 2 - } - ], - "signatures": [ - { - "id": 944, - "name": "txOut", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the output for transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 483, - "character": 10 - } - ], - "parameters": [ - { - "id": 945, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The recipient of the output" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 946, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The amount of other native assets attached with UTxO" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOut" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOut" - } - }, - { - "id": 947, - "name": "txOutDatumHashValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 501, - "character": 2 - } - ], - "signatures": [ - { - "id": 948, - "name": "txOutDatumHashValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the output datum hash for transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 501, - "character": 24 - } - ], - "parameters": [ - { - "id": 949, - "name": "datum", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 950, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutDatumHashValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutDatumHashValue" - } - }, - { - "id": 951, - "name": "txOutInlineDatumValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 537, - "character": 2 - } - ], - "signatures": [ - { - "id": 952, - "name": "txOutInlineDatumValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the output inline datum for transaction" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 537, - "character": 26 - } - ], - "parameters": [ - { - "id": 953, - "name": "datum", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 954, - "name": "type", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mesh" - }, - { - "type": "literal", - "value": "JSON" - }, - { - "type": "literal", - "value": "CBOR" - } - ] - }, - "defaultValue": "'Mesh'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutInlineDatumValue" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutInlineDatumValue" - } - }, - { - "id": 955, - "name": "txOutReferenceScript", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 573, - "character": 2 - } - ], - "signatures": [ - { - "id": 956, - "name": "txOutReferenceScript", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the reference script to be attached with the output" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The MeshTxBuilder instance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 573, - "character": 25 - } - ], - "parameters": [ - { - "id": 957, - "name": "scriptCbor", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The CBOR hex of the script to be attached to UTxO as reference script" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 958, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional - The Plutus script version" - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - }, - "defaultValue": "'V2'" - } - ], - "type": { - "type": "reference", - "target": 865, - "name": "MeshTxBuilder", - "package": "@meshsdk/core" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutReferenceScript" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.txOutReferenceScript" - } - }, - { - "id": 1075, - "name": "updateRedeemer", - "variant": "declaration", - "kind": 2048, - "flags": { - "isProtected": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1587, - "character": 12 - } - ], - "signatures": [ - { - "id": 1076, - "name": "updateRedeemer", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilderCore.ts", - "line": 1587, - "character": 29 - } - ], - "parameters": [ - { - "id": 1077, - "name": "meshTxBuilderBody", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1085, - "name": "MeshTxBuilderBody", - "package": "@meshsdk/core" - } - }, - { - "id": 1078, - "name": "txEvaluation", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Omit" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - }, - { - "type": "literal", - "value": "data" - } - ], - "name": "Omit", - "package": "typescript" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.updateRedeemer" - } - } - ], - "inheritedFrom": { - "type": "reference", - "target": -1, - "name": "MeshTxBuilderCore.updateRedeemer" - } - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 866 - ] - }, - { - "title": "Properties", - "children": [ - 871, - 869, - 870, - 908, - 904, - 905, - 906, - 872, - 873, - 909, - 902, - 903, - 901, - 907 - ] - }, - { - "title": "Methods", - "children": [ - 1070, - 1065, - 1073, - 1082, - 1079, - 1039, - 877, - 917, - 914, - 889, - 1028, - 1032, - 912, - 883, - 1042, - 1045, - 892, - 895, - 898, - 1048, - 983, - 981, - 1005, - 997, - 992, - 988, - 1053, - 886, - 1068, - 977, - 1022, - 1025, - 1063, - 1013, - 910, - 1035, - 1059, - 1056, - 959, - 967, - 969, - 961, - 880, - 919, - 1016, - 929, - 933, - 935, - 925, - 943, - 947, - 951, - 955, - 1075 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/meshTxBuilder.service.ts", - "line": 24, - "character": 13 - } - ], - "extendedTypes": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore" - }, - "name": "MeshTxBuilderCore", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 1481, - "name": "MeshWallet", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Mesh Wallet provides a set of APIs to interact with the blockchain. This wallet is compatible with Mesh transaction builders.\n\nIt is a single address wallet, a wrapper around the AppWallet class.\n\n" - }, - { - "kind": "code", - "text": "```javascript\nimport { MeshWallet, BlockfrostProvider } from '@meshsdk/core';\n\nconst blockchainProvider = new BlockfrostProvider('');\n\nconst wallet = new MeshWallet({\n networkId: 0,\n fetcher: blockchainProvider,\n submitter: blockchainProvider,\n key: {\n type: 'mnemonic',\n words: [\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\",\"solution\"],\n },\n});\n```" - } - ] - }, - "children": [ - { - "id": 1486, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 70, - "character": 2 - } - ], - "signatures": [ - { - "id": 1487, - "name": "new MeshWallet", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 70, - "character": 2 - } - ], - "parameters": [ - { - "id": 1488, - "name": "options", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 1465, - "name": "CreateMeshWalletOptions", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 1481, - "name": "MeshWallet", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 1490, - "name": "_network", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 68, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1489, - "name": "_wallet", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 67, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 1247, - "name": "AppWallet", - "package": "@meshsdk/core" - } - }, - { - "id": 1536, - "name": "createCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 393, - "character": 8 - } - ], - "signatures": [ - { - "id": 1537, - "name": "createCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to create a collateral input for a transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a transaction hash" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 393, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1527, - "name": "getAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 334, - "character": 8 - } - ], - "signatures": [ - { - "id": 1528, - "name": "getAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the assets in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 334, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 128, - "name": "AssetExtended", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1491, - "name": "getBalance", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 117, - "character": 8 - } - ], - "signatures": [ - { - "id": 1492, - "name": "getBalance", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of assets in the wallet. This API will return every assets in the wallet. Each asset is an object with the following properties:\n- A unit is provided to display asset's name on the user interface.\n- A quantity is provided to display asset's quantity on the user interface." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets and their quantities" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 117, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1493, - "name": "getChangeAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 147, - "character": 2 - } - ], - "signatures": [ - { - "id": 1494, - "name": "getChangeAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns an address owned by the wallet that should be used as a change address to return leftover assets during transaction creation back to the connected wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "an address" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 147, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1495, - "name": "getCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 159, - "character": 8 - } - ], - "signatures": [ - { - "id": 1496, - "name": "getCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).\n\nIf this cannot be attained, an error message with an explanation of the blocking problem shall be returned. NOTE: wallets are free to return UTXOs that add up to a greater total ADA value than requested in the amount parameter, but wallets must never return any result where UTXOs would sum up to a smaller total ADA value, instead in a case like that an error message must be returned." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 159, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1529, - "name": "getLovelace", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 358, - "character": 8 - } - ], - "signatures": [ - { - "id": 1530, - "name": "getLovelace", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the lovelace balance in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "lovelace balance" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 358, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1497, - "name": "getNetworkId", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 193, - "character": 2 - } - ], - "signatures": [ - { - "id": 1498, - "name": "getNetworkId", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "network ID" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 193, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ] - }, - { - "id": 1531, - "name": "getPolicyIdAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 371, - "character": 8 - } - ], - "signatures": [ - { - "id": 1532, - "name": "getPolicyIdAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the assets of a specific policy ID in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of assets" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 371, - "character": 8 - } - ], - "parameters": [ - { - "id": 1533, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 128, - "name": "AssetExtended", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1534, - "name": "getPolicyIds", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 381, - "character": 8 - } - ], - "signatures": [ - { - "id": 1535, - "name": "getPolicyIds", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A helper function to get the policy IDs of all the assets in the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of policy IDs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 381, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1499, - "name": "getRewardAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 202, - "character": 8 - } - ], - "signatures": [ - { - "id": 1500, - "name": "getRewardAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of reward addresses owned by the wallet. A reward address is a stake address that is used to receive rewards from staking, generally starts from " - }, - { - "kind": "code", - "text": "`stake`" - }, - { - "kind": "text", - "text": " prefix." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of reward addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 202, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1501, - "name": "getUnusedAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 211, - "character": 2 - } - ], - "signatures": [ - { - "id": 1502, - "name": "getUnusedAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of unused addresses controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of unused addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 211, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ] - }, - { - "id": 1521, - "name": "getUsedAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 297, - "character": 2 - } - ], - "signatures": [ - { - "id": 1522, - "name": "getUsedAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a used address of type Address from the wallet.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "an Address object" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 297, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - }, - "implementationOf": { - "type": "reference", - "target": 61, - "name": "IInitiator.getUsedAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 60, - "name": "IInitiator.getUsedAddress" - } - }, - { - "id": 1503, - "name": "getUsedAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 221, - "character": 8 - } - ], - "signatures": [ - { - "id": 1504, - "name": "getUsedAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a list of used addresses controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of used addresses" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 221, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1523, - "name": "getUsedCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 308, - "character": 8 - } - ], - "signatures": [ - { - "id": 1524, - "name": "getUsedCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 308, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 63, - "name": "IInitiator.getUsedCollateral" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 62, - "name": "IInitiator.getUsedCollateral" - } - }, - { - "id": 1525, - "name": "getUsedUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 325, - "character": 8 - } - ], - "signatures": [ - { - "id": 1526, - "name": "getUsedUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Get a list of UTXOs to be used for transaction building.\n\nThis is used in transaction building." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 325, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 66, - "name": "IInitiator.getUsedUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 65, - "name": "IInitiator.getUsedUTxOs" - } - }, - { - "id": 1505, - "name": "getUtxos", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 231, - "character": 8 - } - ], - "signatures": [ - { - "id": 1506, - "name": "getUtxos", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Return a list of all UTXOs (unspent transaction outputs) controlled by the wallet." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a list of UTXOs" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 231, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 1507, - "name": "signData", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 245, - "character": 2 - } - ], - "signatures": [ - { - "id": 1508, - "name": "signData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This endpoint utilizes the [CIP-8 - Message Signing](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030) to sign arbitrary data, to verify the data was signed by the owner of the private key.\n\nHere, we get the first wallet's address with wallet.getUsedAddresses(), alternativelly you can use reward addresses (getRewardAddresses()) too. It's really up to you as the developer which address you want to use in your application." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a signature" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 245, - "character": 2 - } - ], - "parameters": [ - { - "id": 1509, - "name": "payload", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - }, - "implementationOf": { - "type": "reference", - "target": 77, - "name": "ISigner.signData" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 76, - "name": "ISigner.signData" - } - }, - { - "id": 1510, - "name": "signTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 256, - "character": 8 - } - ], - "signatures": [ - { - "id": 1511, - "name": "signTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Requests user to sign the provided transaction (tx). The wallet should ask the user for permission, and if given, try to sign the supplied body and return a signed transaction. partialSign should be true if the transaction provided requires multiple signatures." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a signed transaction in CBOR" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 256, - "character": 8 - } - ], - "parameters": [ - { - "id": 1512, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1513, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 81, - "name": "ISigner.signTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 80, - "name": "ISigner.signTx" - } - }, - { - "id": 1514, - "name": "signTxs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 267, - "character": 8 - } - ], - "signatures": [ - { - "id": 1515, - "name": "signTxs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Experimental feature - sign multiple transactions at once." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "array of signed transactions CborHex string" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 267, - "character": 8 - } - ], - "parameters": [ - { - "id": 1516, - "name": "unsignedTxs", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "array of unsigned transactions in CborHex string" - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1517, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "if the transactions are signed partially" - } - ] - }, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 85, - "name": "ISigner.signTxs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 84, - "name": "ISigner.signTxs" - } - }, - { - "id": 1518, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 286, - "character": 8 - } - ], - "signatures": [ - { - "id": 1519, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Submits the signed transaction to the blockchain network.\n\nAs wallets should already have this ability to submit transaction, we allow dApps to request that a transaction be sent through it. If the wallet accepts the transaction and tries to send it, it shall return the transaction ID for the dApp to track. The wallet can return error messages or failure if there was an error in sending it." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a transaction hash" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 286, - "character": 8 - } - ], - "parameters": [ - { - "id": 1520, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 1482, - "name": "brew", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 404, - "character": 9 - } - ], - "signatures": [ - { - "id": 1483, - "name": "brew", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 404, - "character": 9 - } - ], - "parameters": [ - { - "id": 1484, - "name": "privateKey", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 1485, - "name": "strength", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "256" - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 1486 - ] - }, - { - "title": "Properties", - "children": [ - 1490, - 1489 - ] - }, - { - "title": "Methods", - "children": [ - 1536, - 1527, - 1491, - 1493, - 1495, - 1529, - 1497, - 1531, - 1534, - 1499, - 1501, - 1521, - 1503, - 1523, - 1525, - 1505, - 1507, - 1510, - 1514, - 1518, - 1482 - ] - } - ], - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 66, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 59, - "name": "IInitiator", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 75, - "name": "ISigner", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 530, - "name": "OgmiosProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 531, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 8, - "character": 2 - }, - { - "fileName": "providers/ogmios.provider.ts", - "line": 9, - "character": 2 - }, - { - "fileName": "providers/ogmios.provider.ts", - "line": 11, - "character": 2 - } - ], - "signatures": [ - { - "id": 532, - "name": "new OgmiosProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 8, - "character": 2 - } - ], - "parameters": [ - { - "id": 533, - "name": "baseUrl", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 530, - "name": "OgmiosProvider", - "package": "@meshsdk/core" - } - }, - { - "id": 534, - "name": "new OgmiosProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 9, - "character": 2 - } - ], - "parameters": [ - { - "id": 535, - "name": "network", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "testnet" - }, - { - "type": "literal", - "value": "preview" - }, - { - "type": "literal", - "value": "preprod" - }, - { - "type": "literal", - "value": "mainnet" - } - ] - } - } - ], - "type": { - "type": "reference", - "target": 530, - "name": "OgmiosProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 536, - "name": "_baseUrl", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 6, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 537, - "name": "evaluateTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 17, - "character": 8 - } - ], - "signatures": [ - { - "id": 538, - "name": "evaluateTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 17, - "character": 8 - } - ], - "parameters": [ - { - "id": 539, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Omit" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - }, - { - "type": "literal", - "value": "data" - } - ], - "name": "Omit", - "package": "typescript" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 18, - "name": "IEvaluator.evaluateTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 17, - "name": "IEvaluator.evaluateTx" - } - }, - { - "id": 540, - "name": "onNextTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 8 - } - ], - "signatures": [ - { - "id": 541, - "name": "onNextTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 8 - } - ], - "parameters": [ - { - "id": 542, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 543, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 27 - } - ], - "signatures": [ - { - "id": 544, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 27 - } - ], - "parameters": [ - { - "id": 545, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 546, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 59 - } - ], - "signatures": [ - { - "id": 547, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 54, - "character": 59 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 551, - "name": "open", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 102, - "character": 16 - } - ], - "signatures": [ - { - "id": 552, - "name": "open", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 102, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.d.ts", - "qualifiedName": "WebSocket" - }, - "name": "WebSocket", - "package": "typescript" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 553, - "name": "send", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 112, - "character": 10 - } - ], - "signatures": [ - { - "id": 554, - "name": "send", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 112, - "character": 10 - } - ], - "parameters": [ - { - "id": 555, - "name": "client", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.d.ts", - "qualifiedName": "WebSocket" - }, - "name": "WebSocket", - "package": "typescript" - } - }, - { - "id": 556, - "name": "methodname", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 557, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 548, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 76, - "character": 8 - } - ], - "signatures": [ - { - "id": 549, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 76, - "character": 8 - } - ], - "parameters": [ - { - "id": 550, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 531 - ] - }, - { - "title": "Properties", - "children": [ - 536 - ] - }, - { - "title": "Methods", - "children": [ - 537, - 540, - 551, - 553, - 548 - ] - } - ], - "sources": [ - { - "fileName": "providers/ogmios.provider.ts", - "line": 5, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 16, - "name": "IEvaluator", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 716, - "name": "Transaction", - "variant": "declaration", - "kind": 128, - "flags": {}, - "children": [ - { - "id": 737, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 84, - "character": 2 - } - ], - "signatures": [ - { - "id": 738, - "name": "new Transaction", - "variant": "signature", - "kind": 16384, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 84, - "character": 2 - } - ], - "parameters": [ - { - "id": 739, - "name": "options", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Partial" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "CreateTxOptions" - }, - "name": "CreateTxOptions", - "package": "@meshsdk/core" - } - ], - "name": "Partial", - "package": "typescript" - }, - "defaultValue": "..." - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 740, - "name": "_changeAddress", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 69, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 745, - "name": "_era", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 75, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 178, - "name": "Era", - "package": "@meshsdk/core" - } - }, - { - "id": 746, - "name": "_initiator", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isOptional": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 76, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 59, - "name": "IInitiator", - "package": "@meshsdk/core" - } - }, - { - "id": 747, - "name": "_mintBuilder", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 77, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "MintBuilder" - }, - "name": "MintBuilder", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 748, - "name": "_protocolParameters", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 78, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - }, - { - "id": 742, - "name": "_recipients", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 71, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - }, - { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ], - "name": "Map", - "package": "typescript" - }, - "defaultValue": "..." - }, - { - "id": 743, - "name": "_totalBurns", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 72, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Map", - "package": "typescript" - }, - "defaultValue": "..." - }, - { - "id": 744, - "name": "_totalMints", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 73, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "target": 179, - "name": "Mint", - "package": "@meshsdk/core" - } - ], - "name": "Map", - "package": "typescript" - }, - "defaultValue": "..." - }, - { - "id": 749, - "name": "_txBuilder", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 79, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionBuilder" - }, - "name": "TransactionBuilder", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 750, - "name": "_txCertificates", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 80, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Certificates" - }, - "name": "Certificates", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 751, - "name": "_txInputsBuilder", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 81, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TxInputsBuilder" - }, - "name": "TxInputsBuilder", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 741, - "name": "_txOutputs", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 70, - "character": 10 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Map", - "package": "typescript" - }, - "defaultValue": "..." - }, - { - "id": 752, - "name": "_txWithdrawals", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 82, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Withdrawals" - }, - "name": "Withdrawals", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - }, - { - "id": 753, - "name": "size", - "variant": "declaration", - "kind": 262144, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 185, - "character": 6 - } - ], - "getSignature": { - "id": 754, - "name": "size", - "variant": "signature", - "kind": 524288, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 185, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - }, - { - "id": 842, - "name": "addBurnInputsIfNeeded", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 682, - "character": 16 - } - ], - "signatures": [ - { - "id": 843, - "name": "addBurnInputsIfNeeded", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 682, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 844, - "name": "addChangeAddress", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 704, - "character": 16 - } - ], - "signatures": [ - { - "id": 845, - "name": "addChangeAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 704, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 846, - "name": "addCollateralIfNeeded", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 713, - "character": 16 - } - ], - "signatures": [ - { - "id": 847, - "name": "addCollateralIfNeeded", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 713, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 857, - "name": "addMintOutputs", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 861, - "character": 10 - } - ], - "signatures": [ - { - "id": 858, - "name": "addMintOutputs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 861, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 848, - "name": "addRequiredSignersIfNeeded", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 720, - "character": 16 - } - ], - "signatures": [ - { - "id": 849, - "name": "addRequiredSignersIfNeeded", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 720, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 850, - "name": "addTxInputsAsNeeded", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 728, - "character": 16 - } - ], - "signatures": [ - { - "id": 851, - "name": "addTxInputsAsNeeded", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 728, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 755, - "name": "build", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 189, - "character": 8 - } - ], - "signatures": [ - { - "id": 756, - "name": "build", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 189, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 757, - "name": "burnAsset", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 211, - "character": 2 - } - ], - "signatures": [ - { - "id": 758, - "name": "burnAsset", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 211, - "character": 2 - } - ], - "parameters": [ - { - "id": 759, - "name": "forgeScript", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 760, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - }, - { - "id": 761, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Partial" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - } - ], - "name": "Partial", - "package": "typescript" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 762, - "name": "delegateStake", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 233, - "character": 2 - } - ], - "signatures": [ - { - "id": 763, - "name": "delegateStake", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 233, - "character": 2 - } - ], - "parameters": [ - { - "id": 764, - "name": "rewardAddress", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 765, - "name": "poolId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 766, - "name": "deregisterStake", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 248, - "character": 2 - } - ], - "signatures": [ - { - "id": 767, - "name": "deregisterStake", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 248, - "character": 2 - } - ], - "parameters": [ - { - "id": 768, - "name": "rewardAddress", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 854, - "name": "filterAvailableUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 847, - "character": 16 - } - ], - "signatures": [ - { - "id": 855, - "name": "filterAvailableUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 847, - "character": 16 - } - ], - "parameters": [ - { - "id": 856, - "name": "selectedUTxOs", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - }, - "defaultValue": "[]" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 852, - "name": "forgeAssetsIfNeeded", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 778, - "character": 16 - } - ], - "signatures": [ - { - "id": 853, - "name": "forgeAssetsIfNeeded", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 778, - "character": 16 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 769, - "name": "mintAsset", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 263, - "character": 2 - } - ], - "signatures": [ - { - "id": 770, - "name": "mintAsset", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 263, - "character": 2 - } - ], - "parameters": [ - { - "id": 771, - "name": "forgeScript", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 772, - "name": "mint", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 179, - "name": "Mint", - "package": "@meshsdk/core" - } - }, - { - "id": 773, - "name": "redeemer", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Partial" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - } - ], - "name": "Partial", - "package": "typescript" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 859, - "name": "notVisited", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 882, - "character": 10 - } - ], - "signatures": [ - { - "id": 860, - "name": "notVisited", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 882, - "character": 10 - } - ], - "parameters": [ - { - "id": 861, - "name": "checkpoint", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 774, - "name": "redeemValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 339, - "character": 2 - } - ], - "signatures": [ - { - "id": 775, - "name": "redeemValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 339, - "character": 2 - } - ], - "parameters": [ - { - "id": 776, - "name": "options", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 777, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 780, - "name": "datum", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 342, - "character": 4 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 781, - "name": "redeemer", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 343, - "character": 4 - } - ], - "type": { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - } - }, - { - "id": 779, - "name": "script", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 341, - "character": 4 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 778, - "name": "value", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 340, - "character": 4 - } - ], - "type": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 780, - 781, - 779, - 778 - ] - } - ], - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 339, - "character": 23 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 785, - "name": "registerPool", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 392, - "character": 2 - } - ], - "signatures": [ - { - "id": 786, - "name": "registerPool", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 392, - "character": 2 - } - ], - "parameters": [ - { - "id": 787, - "name": "params", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 209, - "name": "PoolParams", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 782, - "name": "registerStake", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 378, - "character": 2 - } - ], - "signatures": [ - { - "id": 783, - "name": "registerStake", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 378, - "character": 2 - } - ], - "parameters": [ - { - "id": 784, - "name": "rewardAddress", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 788, - "name": "retirePool", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 402, - "character": 2 - } - ], - "signatures": [ - { - "id": 789, - "name": "retirePool", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 402, - "character": 2 - } - ], - "parameters": [ - { - "id": 790, - "name": "poolId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 791, - "name": "epochNo", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 792, - "name": "sendAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 421, - "character": 2 - } - ], - "signatures": [ - { - "id": 793, - "name": "sendAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Adds an output to the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The transaction builder." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#sendAssets", - "target": "https://meshjs.dev/apis/transaction#sendAssets" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 421, - "character": 2 - } - ], - "parameters": [ - { - "id": 794, - "name": "recipient", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The recipient of the output." - } - ] - }, - "type": { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - } - }, - { - "id": 795, - "name": "assets", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The assets to send." - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 796, - "name": "sendLovelace", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 457, - "character": 2 - } - ], - "signatures": [ - { - "id": 797, - "name": "sendLovelace", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Adds a transaction output to the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#sendAda", - "target": "https://meshjs.dev/apis/transaction#sendAda" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 457, - "character": 2 - } - ], - "parameters": [ - { - "id": 798, - "name": "recipient", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The recipient of the transaction." - } - ] - }, - "type": { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - } - }, - { - "id": 799, - "name": "lovelace", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The amount of lovelace to send." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 800, - "name": "sendToken", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 483, - "character": 2 - } - ], - "signatures": [ - { - "id": 801, - "name": "sendToken", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Adds stable coins transaction output to the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#sendToken", - "target": "https://meshjs.dev/apis/transaction#sendToken" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 483, - "character": 2 - } - ], - "parameters": [ - { - "id": 802, - "name": "recipient", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The recipient of the transaction." - } - ] - }, - "type": { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - } - }, - { - "id": 803, - "name": "ticker", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The ticker of the token to send." - } - ] - }, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "LQ" - }, - { - "type": "literal", - "value": "MIN" - }, - { - "type": "literal", - "value": "NTX" - }, - { - "type": "literal", - "value": "iBTC" - }, - { - "type": "literal", - "value": "iETH" - }, - { - "type": "literal", - "value": "iUSD" - }, - { - "type": "literal", - "value": "MILK" - }, - { - "type": "literal", - "value": "AGIX" - }, - { - "type": "literal", - "value": "MELD" - }, - { - "type": "literal", - "value": "INDY" - }, - { - "type": "literal", - "value": "CLAY" - }, - { - "type": "literal", - "value": "MCOS" - }, - { - "type": "literal", - "value": "DING" - }, - { - "type": "literal", - "value": "GERO" - }, - { - "type": "literal", - "value": "NMKR" - }, - { - "type": "literal", - "value": "PAVIA" - }, - { - "type": "literal", - "value": "HOSKY" - }, - { - "type": "literal", - "value": "YUMMI" - }, - { - "type": "literal", - "value": "C3" - }, - { - "type": "literal", - "value": "GIMBAL" - }, - { - "type": "literal", - "value": "SUNDAE" - }, - { - "type": "literal", - "value": "GREENS" - }, - { - "type": "literal", - "value": "GENS" - }, - { - "type": "literal", - "value": "SOCIETY" - }, - { - "type": "literal", - "value": "DJED" - }, - { - "type": "literal", - "value": "SHEN" - }, - { - "type": "literal", - "value": "WMT" - }, - { - "type": "literal", - "value": "COPI" - } - ] - } - }, - { - "id": 804, - "name": "amount", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The amount of the token to send." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 805, - "name": "sendValue", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 502, - "character": 2 - } - ], - "signatures": [ - { - "id": 806, - "name": "sendValue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Adds an output to the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 502, - "character": 2 - } - ], - "parameters": [ - { - "id": 807, - "name": "recipient", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The recipient of the output." - } - ] - }, - "type": { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - } - }, - { - "id": 808, - "name": "value", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The UTxO value of the output." - } - ] - }, - "type": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 809, - "name": "setChangeAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 523, - "character": 2 - } - ], - "signatures": [ - { - "id": 810, - "name": "setChangeAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the change address for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 523, - "character": 2 - } - ], - "parameters": [ - { - "id": 811, - "name": "changeAddress", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The change address." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 812, - "name": "setCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 536, - "character": 2 - } - ], - "signatures": [ - { - "id": 813, - "name": "setCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the collateral for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 536, - "character": 2 - } - ], - "parameters": [ - { - "id": 814, - "name": "collateral", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the UTxO for collateral." - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 815, - "name": "setMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 552, - "character": 2 - } - ], - "signatures": [ - { - "id": 816, - "name": "setMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Add a JSON metadata entry to the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#setMetadata", - "target": "https://meshjs.dev/apis/transaction#setMetadata" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 552, - "character": 2 - } - ], - "parameters": [ - { - "id": 817, - "name": "key", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The key to use for the metadata entry." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 818, - "name": "value", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to use for the metadata entry." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 822, - "name": "setNativeScriptInput", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 595, - "character": 2 - } - ], - "signatures": [ - { - "id": 823, - "name": "setNativeScriptInput", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the native script for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 595, - "character": 2 - } - ], - "parameters": [ - { - "id": 824, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The native script to spend from." - } - ] - }, - "type": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - }, - { - "id": 825, - "name": "utxo", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The UTxO attached to the script." - } - ] - }, - "type": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 819, - "name": "setRequiredSigners", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 569, - "character": 2 - } - ], - "signatures": [ - { - "id": 820, - "name": "setRequiredSigners", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the required signers for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 569, - "character": 2 - } - ], - "parameters": [ - { - "id": 821, - "name": "addresses", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The addresses of the required signers." - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 829, - "name": "setTimeToExpire", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 629, - "character": 2 - } - ], - "signatures": [ - { - "id": 830, - "name": "setTimeToExpire", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the time to live for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#setTimeLimit", - "target": "https://meshjs.dev/apis/transaction#setTimeLimit" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 629, - "character": 2 - } - ], - "parameters": [ - { - "id": 831, - "name": "slot", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The slot number to expire the transaction at." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 826, - "name": "setTimeToStart", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 614, - "character": 2 - } - ], - "signatures": [ - { - "id": 827, - "name": "setTimeToStart", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the start slot for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The Transaction object." - } - ] - }, - { - "tag": "@see", - "content": [ - { - "kind": "inline-tag", - "tag": "@link", - "text": "https://meshjs.dev/apis/transaction#setTimeLimit", - "target": "https://meshjs.dev/apis/transaction#setTimeLimit" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 614, - "character": 2 - } - ], - "parameters": [ - { - "id": 828, - "name": "slot", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The start slot for the transaction." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 832, - "name": "setTxInputs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 642, - "character": 2 - } - ], - "signatures": [ - { - "id": 833, - "name": "setTxInputs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the inputs for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The transaction." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 642, - "character": 2 - } - ], - "parameters": [ - { - "id": 834, - "name": "inputs", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The inputs to set." - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 862, - "name": "setTxOutput", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 889, - "character": 10 - } - ], - "signatures": [ - { - "id": 863, - "name": "setTxOutput", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 889, - "character": 10 - } - ], - "parameters": [ - { - "id": 864, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 835, - "name": "setTxRefInputs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 662, - "character": 2 - } - ], - "signatures": [ - { - "id": 836, - "name": "setTxRefInputs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Sets the reference inputs for the transaction." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The transaction." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 662, - "character": 2 - } - ], - "parameters": [ - { - "id": 837, - "name": "inputs", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The reference inputs to set." - } - ] - }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 838, - "name": "withdrawRewards", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 672, - "character": 2 - } - ], - "signatures": [ - { - "id": 839, - "name": "withdrawRewards", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 672, - "character": 2 - } - ], - "parameters": [ - { - "id": 840, - "name": "rewardAddress", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 841, - "name": "lovelace", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 716, - "name": "Transaction", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 717, - "name": "attachMetadata", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 96, - "character": 9 - } - ], - "signatures": [ - { - "id": 718, - "name": "attachMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 96, - "character": 9 - } - ], - "parameters": [ - { - "id": 719, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 720, - "name": "cborTxMetadata", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 721, - "name": "era", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 178, - "name": "Era", - "package": "@meshsdk/core" - }, - "defaultValue": "'BABBAGE'" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 722, - "name": "deattachMetadata", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 122, - "character": 9 - } - ], - "signatures": [ - { - "id": 723, - "name": "deattachMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 122, - "character": 9 - } - ], - "parameters": [ - { - "id": 724, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 725, - "name": "maskMetadata", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 128, - "character": 9 - } - ], - "signatures": [ - { - "id": 726, - "name": "maskMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 128, - "character": 9 - } - ], - "parameters": [ - { - "id": 727, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 728, - "name": "era", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 178, - "name": "Era", - "package": "@meshsdk/core" - }, - "defaultValue": "'BABBAGE'" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 729, - "name": "readMetadata", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 163, - "character": 9 - } - ], - "signatures": [ - { - "id": 730, - "name": "readMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 163, - "character": 9 - } - ], - "parameters": [ - { - "id": 731, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 732, - "name": "writeMetadata", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 168, - "character": 9 - } - ], - "signatures": [ - { - "id": 733, - "name": "writeMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 168, - "character": 9 - } - ], - "parameters": [ - { - "id": 734, - "name": "cborTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 735, - "name": "cborTxMetadata", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 736, - "name": "era", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 178, - "name": "Era", - "package": "@meshsdk/core" - }, - "defaultValue": "'BABBAGE'" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 737 - ] - }, - { - "title": "Properties", - "children": [ - 740, - 745, - 746, - 747, - 748, - 742, - 743, - 744, - 749, - 750, - 751, - 741, - 752 - ] - }, - { - "title": "Accessors", - "children": [ - 753 - ] - }, - { - "title": "Methods", - "children": [ - 842, - 844, - 846, - 857, - 848, - 850, - 755, - 757, - 762, - 766, - 854, - 852, - 769, - 859, - 774, - 785, - 782, - 788, - 792, - 796, - 800, - 805, - 809, - 812, - 815, - 822, - 819, - 829, - 826, - 832, - 862, - 835, - 838, - 717, - 722, - 725, - 729, - 732 - ] - } - ], - "sources": [ - { - "fileName": "transaction/transaction.service.ts", - "line": 68, - "character": 13 - } - ] - }, - { - "id": 631, - "name": "YaciProvider", - "variant": "declaration", - "kind": 128, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Fetcher interface defines end points to query blockchain data." - } - ] - }, - "children": [ - { - "id": 632, - "name": "constructor", - "variant": "declaration", - "kind": 512, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 31, - "character": 2 - } - ], - "signatures": [ - { - "id": 633, - "name": "new YaciProvider", - "variant": "signature", - "kind": 16384, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Set the URL of the instance." - } - ] - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 31, - "character": 2 - } - ], - "parameters": [ - { - "id": 634, - "name": "baseUrl", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The base URL of the instance." - } - ] - }, - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "'http://localhost:8080/api/v1'" - } - ], - "type": { - "type": "reference", - "target": 631, - "name": "YaciProvider", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 635, - "name": "_axiosInstance", - "variant": "declaration", - "kind": 1024, - "flags": { - "isPrivate": true, - "isReadonly": true - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 25, - "character": 19 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/axios@1.6.3/node_modules/axios/index.d.ts", - "qualifiedName": "AxiosInstance" - }, - "name": "AxiosInstance", - "package": "axios" - } - }, - { - "id": 636, - "name": "fetchAccountInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 37, - "character": 8 - } - ], - "signatures": [ - { - "id": 637, - "name": "fetchAccountInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 37, - "character": 8 - } - ], - "parameters": [ - { - "id": 638, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 102, - "name": "AccountInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 22, - "name": "IFetcher.fetchAccountInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 21, - "name": "IFetcher.fetchAccountInfo" - } - }, - { - "id": 646, - "name": "fetchAddressUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 108, - "character": 8 - } - ], - "signatures": [ - { - "id": 647, - "name": "fetchAddressUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 108, - "character": 8 - } - ], - "parameters": [ - { - "id": 648, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 649, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 25, - "name": "IFetcher.fetchAddressUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 24, - "name": "IFetcher.fetchAddressUTxOs" - } - }, - { - "id": 650, - "name": "fetchAssetAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 140, - "character": 8 - } - ], - "signatures": [ - { - "id": 651, - "name": "fetchAssetAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 140, - "character": 8 - } - ], - "parameters": [ - { - "id": 652, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 653, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 654, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 142, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 655, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 142, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 654, - 655 - ] - } - ], - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 142, - "character": 13 - } - ] - } - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 29, - "name": "IFetcher.fetchAssetAddresses" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 28, - "name": "IFetcher.fetchAssetAddresses" - } - }, - { - "id": 656, - "name": "fetchAssetMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 167, - "character": 8 - } - ], - "signatures": [ - { - "id": 657, - "name": "fetchAssetMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 167, - "character": 8 - } - ], - "parameters": [ - { - "id": 658, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 35, - "name": "IFetcher.fetchAssetMetadata" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 34, - "name": "IFetcher.fetchAssetMetadata" - } - }, - { - "id": 659, - "name": "fetchBlockInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 185, - "character": 8 - } - ], - "signatures": [ - { - "id": 660, - "name": "fetchBlockInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 185, - "character": 8 - } - ], - "parameters": [ - { - "id": 661, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 153, - "name": "BlockInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 38, - "name": "IFetcher.fetchBlockInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 37, - "name": "IFetcher.fetchBlockInfo" - } - }, - { - "id": 662, - "name": "fetchCollectionAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 214, - "character": 8 - } - ], - "signatures": [ - { - "id": 663, - "name": "fetchCollectionAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 214, - "character": 8 - } - ], - "parameters": [ - { - "id": 664, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 665, - "name": "cursor", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "1" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 666, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 667, - "name": "assets", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 217, - "character": 15 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 668, - "name": "next", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 217, - "character": 32 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 667, - 668 - ] - } - ], - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 217, - "character": 13 - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 41, - "name": "IFetcher.fetchCollectionAssets" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 40, - "name": "IFetcher.fetchCollectionAssets" - } - }, - { - "id": 669, - "name": "fetchHandleAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 238, - "character": 8 - } - ], - "signatures": [ - { - "id": 670, - "name": "fetchHandleAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 238, - "character": 8 - } - ], - "parameters": [ - { - "id": 671, - "name": "handle", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 48, - "name": "IFetcher.fetchHandleAddress" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 47, - "name": "IFetcher.fetchHandleAddress" - } - }, - { - "id": 694, - "name": "fetchNativeScriptJSON", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 390, - "character": 16 - } - ], - "signatures": [ - { - "id": 695, - "name": "fetchNativeScriptJSON", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 390, - "character": 16 - } - ], - "parameters": [ - { - "id": 696, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 691, - "name": "fetchPlutusScriptCBOR", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 380, - "character": 16 - } - ], - "signatures": [ - { - "id": 692, - "name": "fetchPlutusScriptCBOR", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 380, - "character": 16 - } - ], - "parameters": [ - { - "id": 693, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 672, - "name": "fetchProtocolParameters", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 253, - "character": 8 - } - ], - "signatures": [ - { - "id": 673, - "name": "fetchProtocolParameters", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 253, - "character": 8 - } - ], - "parameters": [ - { - "id": 674, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "Number.NaN" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 51, - "name": "IFetcher.fetchProtocolParameters" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 50, - "name": "IFetcher.fetchProtocolParameters" - } - }, - { - "id": 675, - "name": "fetchTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 289, - "character": 8 - } - ], - "signatures": [ - { - "id": 676, - "name": "fetchTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 289, - "character": 8 - } - ], - "parameters": [ - { - "id": 677, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 268, - "name": "TransactionInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 54, - "name": "IFetcher.fetchTxInfo" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 53, - "name": "IFetcher.fetchTxInfo" - } - }, - { - "id": 678, - "name": "fetchUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 312, - "character": 8 - } - ], - "signatures": [ - { - "id": 679, - "name": "fetchUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 312, - "character": 8 - } - ], - "parameters": [ - { - "id": 680, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 57, - "name": "IFetcher.fetchUTxOs" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 56, - "name": "IFetcher.fetchUTxOs" - } - }, - { - "id": 681, - "name": "onTxConfirmed", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 332, - "character": 2 - } - ], - "signatures": [ - { - "id": 682, - "name": "onTxConfirmed", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 332, - "character": 2 - } - ], - "parameters": [ - { - "id": 683, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 684, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 685, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 332, - "character": 42 - } - ], - "signatures": [ - { - "id": 686, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 332, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - }, - { - "id": 687, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "100" - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "implementationOf": { - "type": "reference", - "target": 69, - "name": "IListener.onTxConfirmed" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 68, - "name": "IListener.onTxConfirmed" - } - }, - { - "id": 639, - "name": "resolveScriptRef", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 62, - "character": 10 - } - ], - "signatures": [ - { - "id": 640, - "name": "resolveScriptRef", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 62, - "character": 29 - } - ], - "parameters": [ - { - "id": 641, - "name": "scriptHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 688, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 358, - "character": 8 - } - ], - "signatures": [ - { - "id": 689, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 358, - "character": 8 - } - ], - "parameters": [ - { - "id": 690, - "name": "txHex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - }, - "implementationOf": { - "type": "reference", - "target": 90, - "name": "ISubmitter.submitTx" - } - } - ], - "implementationOf": { - "type": "reference", - "target": 89, - "name": "ISubmitter.submitTx" - } - }, - { - "id": 642, - "name": "toUTxO", - "variant": "declaration", - "kind": 2048, - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 87, - "character": 10 - } - ], - "signatures": [ - { - "id": 643, - "name": "toUTxO", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 87, - "character": 19 - } - ], - "parameters": [ - { - "id": 644, - "name": "bfUTxO", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "BlockfrostUTxO" - }, - "name": "BlockfrostUTxO", - "package": "@meshsdk/core" - } - }, - { - "id": 645, - "name": "tx_hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 632 - ] - }, - { - "title": "Properties", - "children": [ - 635 - ] - }, - { - "title": "Methods", - "children": [ - 636, - 646, - 650, - 656, - 659, - 662, - 669, - 694, - 691, - 672, - 675, - 678, - 681, - 639, - 688, - 642 - ] - } - ], - "sources": [ - { - "fileName": "providers/yaci.provider.ts", - "line": 24, - "character": 13 - } - ], - "implementedTypes": [ - { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 67, - "name": "IListener", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - ] - }, - { - "id": 16, - "name": "IEvaluator", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 17, - "name": "evaluateTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/evaluator.ts", - "line": 4, - "character": 2 - } - ], - "signatures": [ - { - "id": 18, - "name": "evaluateTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/evaluator.ts", - "line": 4, - "character": 2 - } - ], - "parameters": [ - { - "id": 19, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Omit" - }, - "typeArguments": [ - { - "type": "reference", - "target": 109, - "name": "Action", - "package": "@meshsdk/core" - }, - { - "type": "literal", - "value": "data" - } - ], - "name": "Omit", - "package": "typescript" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 17 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/evaluator.ts", - "line": 3, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 563, - "name": "MaestroProvider" - }, - { - "type": "reference", - "target": 530, - "name": "OgmiosProvider" - } - ] - }, - { - "id": 20, - "name": "IFetcher", - "variant": "declaration", - "kind": 256, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Fetcher interface defines end points to query blockchain data." - } - ] - }, - "children": [ - { - "id": 21, - "name": "fetchAccountInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 15, - "character": 2 - } - ], - "signatures": [ - { - "id": 22, - "name": "fetchAccountInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 15, - "character": 2 - } - ], - "parameters": [ - { - "id": 23, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 102, - "name": "AccountInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 24, - "name": "fetchAddressUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 16, - "character": 2 - } - ], - "signatures": [ - { - "id": 25, - "name": "fetchAddressUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 16, - "character": 2 - } - ], - "parameters": [ - { - "id": 26, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 27, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 28, - "name": "fetchAssetAddresses", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 17, - "character": 2 - } - ], - "signatures": [ - { - "id": 29, - "name": "fetchAssetAddresses", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 17, - "character": 2 - } - ], - "parameters": [ - { - "id": 30, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 31, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 32, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 19, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 33, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 19, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 32, - 33 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 19, - "character": 13 - } - ] - } - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 34, - "name": "fetchAssetMetadata", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 20, - "character": 2 - } - ], - "signatures": [ - { - "id": 35, - "name": "fetchAssetMetadata", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 20, - "character": 2 - } - ], - "parameters": [ - { - "id": 36, - "name": "asset", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 37, - "name": "fetchBlockInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 21, - "character": 2 - } - ], - "signatures": [ - { - "id": 38, - "name": "fetchBlockInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 21, - "character": 2 - } - ], - "parameters": [ - { - "id": 39, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 153, - "name": "BlockInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 40, - "name": "fetchCollectionAssets", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 22, - "character": 2 - } - ], - "signatures": [ - { - "id": 41, - "name": "fetchCollectionAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 22, - "character": 2 - } - ], - "parameters": [ - { - "id": 42, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 43, - "name": "cursor", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reflection", - "declaration": { - "id": 44, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 45, - "name": "assets", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 25, - "character": 15 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 46, - "name": "next", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 25, - "character": 32 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 45, - 46 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 25, - "character": 13 - } - ] - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 47, - "name": "fetchHandleAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 26, - "character": 2 - } - ], - "signatures": [ - { - "id": 48, - "name": "fetchHandleAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 26, - "character": 2 - } - ], - "parameters": [ - { - "id": 49, - "name": "handle", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 50, - "name": "fetchProtocolParameters", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 27, - "character": 2 - } - ], - "signatures": [ - { - "id": 51, - "name": "fetchProtocolParameters", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 27, - "character": 2 - } - ], - "parameters": [ - { - "id": 52, - "name": "epoch", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 53, - "name": "fetchTxInfo", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 28, - "character": 2 - } - ], - "signatures": [ - { - "id": 54, - "name": "fetchTxInfo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 28, - "character": 2 - } - ], - "parameters": [ - { - "id": 55, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 268, - "name": "TransactionInfo", - "package": "@meshsdk/core" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 56, - "name": "fetchUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 29, - "character": 2 - } - ], - "signatures": [ - { - "id": 57, - "name": "fetchUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 29, - "character": 2 - } - ], - "parameters": [ - { - "id": 58, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 21, - 24, - 28, - 34, - 37, - 40, - 47, - 50, - 53, - 56 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/fetcher.ts", - "line": 14, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 386, - "name": "BlockfrostProvider" - }, - { - "type": "reference", - "target": 466, - "name": "KoiosProvider" - }, - { - "type": "reference", - "target": 563, - "name": "MaestroProvider" - }, - { - "type": "reference", - "target": 631, - "name": "YaciProvider" - } - ] - }, - { - "id": 59, - "name": "IInitiator", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 60, - "name": "getUsedAddress", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 4, - "character": 2 - } - ], - "signatures": [ - { - "id": 61, - "name": "getUsedAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "Address" - }, - "name": "Address", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 62, - "name": "getUsedCollateral", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 5, - "character": 2 - } - ], - "signatures": [ - { - "id": 63, - "name": "getUsedCollateral", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 5, - "character": 2 - } - ], - "parameters": [ - { - "id": 64, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 65, - "name": "getUsedUTxOs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 8, - "character": 2 - } - ], - "signatures": [ - { - "id": 66, - "name": "getUsedUTxOs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionUnspentOutput" - }, - "name": "TransactionUnspentOutput", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 60, - 62, - 65 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/initiator.ts", - "line": 3, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 1247, - "name": "AppWallet" - }, - { - "type": "reference", - "target": 1310, - "name": "BrowserWallet" - }, - { - "type": "reference", - "target": 1481, - "name": "MeshWallet" - } - ] - }, - { - "id": 67, - "name": "IListener", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 68, - "name": "onTxConfirmed", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/listener.ts", - "line": 2, - "character": 2 - } - ], - "signatures": [ - { - "id": 69, - "name": "onTxConfirmed", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/listener.ts", - "line": 2, - "character": 2 - } - ], - "parameters": [ - { - "id": 70, - "name": "txHash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 71, - "name": "callback", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 72, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/listener.ts", - "line": 2, - "character": 42 - } - ], - "signatures": [ - { - "id": 73, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/listener.ts", - "line": 2, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - } - }, - { - "id": 74, - "name": "limit", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 68 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/listener.ts", - "line": 1, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 386, - "name": "BlockfrostProvider" - }, - { - "type": "reference", - "target": 466, - "name": "KoiosProvider" - }, - { - "type": "reference", - "target": 631, - "name": "YaciProvider" - } - ] - }, - { - "id": 75, - "name": "ISigner", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 76, - "name": "signData", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 4, - "character": 2 - } - ], - "signatures": [ - { - "id": 77, - "name": "signData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 4, - "character": 2 - } - ], - "parameters": [ - { - "id": 78, - "name": "address", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 79, - "name": "payload", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 80, - "name": "signTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 5, - "character": 2 - } - ], - "signatures": [ - { - "id": 81, - "name": "signTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 5, - "character": 2 - } - ], - "parameters": [ - { - "id": 82, - "name": "unsignedTx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 83, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 84, - "name": "signTxs", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 6, - "character": 2 - } - ], - "signatures": [ - { - "id": 85, - "name": "signTxs", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 6, - "character": 2 - } - ], - "parameters": [ - { - "id": 86, - "name": "unsignedTxs", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 87, - "name": "partialSign", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "SometimesPromise" - }, - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ], - "name": "SometimesPromise", - "package": "@meshsdk/core" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 76, - 80, - 84 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/signer.ts", - "line": 3, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 1247, - "name": "AppWallet" - }, - { - "type": "reference", - "target": 1310, - "name": "BrowserWallet" - }, - { - "type": "reference", - "target": 1481, - "name": "MeshWallet" - } - ] - }, - { - "id": 88, - "name": "ISubmitter", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 89, - "name": "submitTx", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/submitter.ts", - "line": 2, - "character": 2 - } - ], - "signatures": [ - { - "id": 90, - "name": "submitTx", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/submitter.ts", - "line": 2, - "character": 2 - } - ], - "parameters": [ - { - "id": 91, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 89 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/submitter.ts", - "line": 1, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 1247, - "name": "AppWallet" - }, - { - "type": "reference", - "target": 386, - "name": "BlockfrostProvider" - }, - { - "type": "reference", - "target": 1310, - "name": "BrowserWallet" - }, - { - "type": "reference", - "target": 466, - "name": "KoiosProvider" - }, - { - "type": "reference", - "target": 563, - "name": "MaestroProvider" - }, - { - "type": "reference", - "target": 1481, - "name": "MeshWallet" - }, - { - "type": "reference", - "target": 530, - "name": "OgmiosProvider" - }, - { - "type": "reference", - "target": 631, - "name": "YaciProvider" - } - ] - }, - { - "id": 92, - "name": "IUploader", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 93, - "name": "uploadContent", - "variant": "declaration", - "kind": 2048, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/uploader.ts", - "line": 2, - "character": 2 - } - ], - "signatures": [ - { - "id": 94, - "name": "uploadContent", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/contracts/uploader.ts", - "line": 2, - "character": 2 - } - ], - "parameters": [ - { - "id": 95, - "name": "content", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.d.ts", - "qualifiedName": "FormData" - }, - "name": "FormData", - "package": "typescript" - } - }, - { - "id": 96, - "name": "recursive", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "children": [ - 93 - ] - } - ], - "sources": [ - { - "fileName": "common/contracts/uploader.ts", - "line": 1, - "character": 17 - } - ], - "implementedBy": [ - { - "type": "reference", - "target": 455, - "name": "InfuraProvider" - } - ] - }, - { - "id": 559, - "name": "MaestroConfig", - "variant": "declaration", - "kind": 256, - "flags": {}, - "children": [ - { - "id": 561, - "name": "apiKey", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 28, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 560, - "name": "network", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 27, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 558, - "name": "MaestroSupportedNetworks", - "package": "@meshsdk/core" - } - }, - { - "id": 562, - "name": "turboSubmit", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 29, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 561, - 560, - 562 - ] - } - ], - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 26, - "character": 17 - } - ] - }, - { - "id": 97, - "name": "Account", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Account.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 98, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 99, - "name": "baseAddress", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Account.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 100, - "name": "enterpriseAddress", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Account.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 101, - "name": "rewardAddress", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Account.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 99, - 100, - 101 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Account.ts", - "line": 1, - "character": 22 - } - ] - } - } - }, - { - "id": 102, - "name": "AccountInfo", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 103, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 104, - "name": "active", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - }, - { - "id": 106, - "name": "balance", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 105, - "name": "poolId", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 107, - "name": "rewards", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 108, - "name": "withdrawals", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 104, - 106, - 105, - 107, - 108 - ] - } - ], - "sources": [ - { - "fileName": "common/types/AccountInfo.ts", - "line": 1, - "character": 26 - } - ] - } - } - }, - { - "id": 109, - "name": "Action", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 4, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 110, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 113, - "name": "budget", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 115, - "name": "Budget", - "package": "@meshsdk/core" - } - }, - { - "id": 111, - "name": "data", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 112, - "name": "index", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 114, - "name": "tag", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "query", - "queryType": { - "type": "reference", - "target": { - "sourceFileName": "src/common/constants.ts", - "qualifiedName": "REDEEMER_TAGS" - }, - "name": "REDEEMER_TAGS", - "package": "@meshsdk/core", - "preferValues": true - } - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 113, - 111, - 112, - 114 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 4, - "character": 21 - } - ] - } - } - }, - { - "id": 1230, - "name": "AppWalletKeyType", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 21, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1231, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1233, - "name": "bech32", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 24, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1232, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 23, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "root" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1233, - 1232 - ] - } - ], - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 22, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1234, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1236, - "name": "payment", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 28, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1237, - "name": "stake", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 29, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1235, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 27, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "cli" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1236, - 1237, - 1235 - ] - } - ], - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 26, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1238, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1239, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 32, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "mnemonic" - } - }, - { - "id": 1240, - "name": "words", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 33, - "character": 6 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1239, - 1240 - ] - } - ], - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 31, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 119, - "name": "Asset", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 120, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 122, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 124, - "name": "Quantity", - "package": "@meshsdk/core" - } - }, - { - "id": 121, - "name": "unit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 123, - "name": "Unit", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 122, - 121 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 1, - "character": 20 - } - ] - } - } - }, - { - "id": 128, - "name": "AssetExtended", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 129, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 132, - "name": "assetName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 133, - "name": "fingerprint", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 131, - "name": "policyId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 134, - "name": "quantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 124, - "name": "Quantity", - "package": "@meshsdk/core" - } - }, - { - "id": 130, - "name": "unit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 123, - "name": "Unit", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 132, - 133, - 131, - 134, - 130 - ] - } - ], - "sources": [ - { - "fileName": "common/types/AssetExtended.ts", - "line": 3, - "character": 28 - } - ] - } - } - }, - { - "id": 135, - "name": "AssetMetadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 136, - "name": "FungibleAssetMetadata", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 141, - "name": "NonFungibleAssetMetadata", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": { - "sourceFileName": "src/core/CIP27.ts", - "qualifiedName": "RoyaltiesStandard" - }, - "name": "RoyaltiesStandard", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 153, - "name": "BlockInfo", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 154, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 169, - "name": "VRFKey", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 16, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 167, - "name": "confirmations", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 14, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 158, - "name": "epoch", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 159, - "name": "epochSlot", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 164, - "name": "fees", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 11, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 156, - "name": "hash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 166, - "name": "nextBlock", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 168, - "name": "operationalCertificate", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 15, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 163, - "name": "output", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 165, - "name": "previousBlock", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 161, - "name": "size", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 157, - "name": "slot", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 160, - "name": "slotLeader", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 155, - "name": "time", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 162, - "name": "txCount", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 169, - 167, - 158, - 159, - 164, - 156, - 166, - 168, - 163, - 165, - 161, - 157, - 160, - 155, - 162 - ] - } - ], - "sources": [ - { - "fileName": "common/types/BlockInfo.ts", - "line": 1, - "character": 24 - } - ] - } - } - }, - { - "id": 115, - "name": "Budget", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 11, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 116, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 117, - "name": "mem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 118, - "name": "steps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 117, - 118 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Action.ts", - "line": 11, - "character": 21 - } - ] - } - } - }, - { - "id": 1191, - "name": "BuilderData", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 136, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1192, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1194, - "name": "content", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 139, - "character": 6 - } - ], - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "id": 1193, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 138, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "Mesh" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1194, - 1193 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 137, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1195, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1197, - "name": "content", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 143, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1196, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 142, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "JSON" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1197, - 1196 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 141, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1198, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1200, - "name": "content", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 147, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1199, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 146, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "CBOR" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1200, - 1199 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 145, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 1209, - "name": "Certificate", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 162, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1210, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1212, - "name": "poolParams", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 163, - "character": 28 - } - ], - "type": { - "type": "reference", - "target": 209, - "name": "PoolParams", - "package": "@meshsdk/core" - } - }, - { - "id": 1211, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 163, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "RegisterPool" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1212, - 1211 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 163, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1213, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1215, - "name": "stakeKeyHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 164, - "character": 29 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1214, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 164, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "RegisterStake" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1215, - 1214 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 164, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1216, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1219, - "name": "poolId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 165, - "character": 51 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1218, - "name": "stakeKeyHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 165, - "character": 29 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1217, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 165, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "DelegateStake" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1219, - 1218, - 1217 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 165, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1220, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1222, - "name": "stakeKeyHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 166, - "character": 31 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1221, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 166, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "DeregisterStake" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1222, - 1221 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 166, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1223, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1226, - "name": "epoch", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 167, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1225, - "name": "poolId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 167, - "character": 26 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1224, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 167, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "RetirePool" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1226, - 1225, - 1224 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 167, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 1241, - "name": "CreateAppWalletOptions", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 36, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1242, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1244, - "name": "fetcher", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 38, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - } - }, - { - "id": 1246, - "name": "key", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 40, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1230, - "name": "AppWalletKeyType", - "package": "@meshsdk/core" - } - }, - { - "id": 1243, - "name": "networkId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 37, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1245, - "name": "submitter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 39, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1244, - 1246, - 1243, - 1245 - ] - } - ], - "sources": [ - { - "fileName": "wallet/app.service.ts", - "line": 36, - "character": 37 - } - ] - } - } - }, - { - "id": 1465, - "name": "CreateMeshWalletOptions", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 25, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1466, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1468, - "name": "fetcher", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 27, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 20, - "name": "IFetcher", - "package": "@meshsdk/core" - } - }, - { - "id": 1470, - "name": "key", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 29, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1471, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1473, - "name": "bech32", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 32, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1472, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 31, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "root" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1473, - 1472 - ] - } - ], - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 30, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1474, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1476, - "name": "payment", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 36, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1477, - "name": "stake", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 37, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1475, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 35, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "cli" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1476, - 1477, - 1475 - ] - } - ], - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 34, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1478, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1479, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 40, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "mnemonic" - } - }, - { - "id": 1480, - "name": "words", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 41, - "character": 8 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1479, - 1480 - ] - } - ], - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 39, - "character": 6 - } - ] - } - } - ] - } - }, - { - "id": 1467, - "name": "networkId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 26, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1469, - "name": "submitter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 28, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 88, - "name": "ISubmitter", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1468, - 1470, - 1467, - 1469 - ] - } - ], - "sources": [ - { - "fileName": "wallet/mesh.service.ts", - "line": 25, - "character": 38 - } - ] - } - } - }, - { - "id": 170, - "name": "Data", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Data.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "bigint" - }, - { - "type": "array", - "elementType": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - }, - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - ], - "name": "Map", - "package": "typescript" - }, - { - "type": "reflection", - "declaration": { - "id": 171, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 172, - "name": "alternative", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Data.ts", - "line": 8, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 173, - "name": "fields", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Data.ts", - "line": 9, - "character": 6 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 172, - 173 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Data.ts", - "line": 7, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 174, - "name": "DataSignature", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/DataSignature.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 175, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 177, - "name": "key", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/DataSignature.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 176, - "name": "signature", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/DataSignature.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 177, - 176 - ] - } - ], - "sources": [ - { - "fileName": "common/types/DataSignature.ts", - "line": 1, - "character": 28 - } - ] - } - } - }, - { - "id": 178, - "name": "Era", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Era.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "ALONZO" - }, - { - "type": "literal", - "value": "BABBAGE" - } - ] - } - }, - { - "id": 136, - "name": "FungibleAssetMetadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 8, - "character": 12 - } - ], - "type": { - "type": "intersection", - "types": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/core/CIP25.ts", - "qualifiedName": "MetadataStandard" - }, - "name": "MetadataStandard", - "package": "@meshsdk/core" - }, - { - "type": "reflection", - "declaration": { - "id": 137, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 139, - "name": "decimals", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 138, - "name": "ticker", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 140, - "name": "version", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 11, - "character": 2 - } - ], - "type": { - "type": "templateLiteral", - "head": "", - "tail": [ - [ - { - "type": "intrinsic", - "name": "number" - }, - "." - ], - [ - { - "type": "intrinsic", - "name": "number" - }, - "" - ] - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 139, - 138, - 140 - ] - } - ], - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 8, - "character": 55 - } - ] - } - } - ] - } - }, - { - "id": 142, - "name": "ImageAssetMetadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 22, - "character": 12 - } - ], - "type": { - "type": "intersection", - "types": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/core/CIP25.ts", - "qualifiedName": "MetadataStandard" - }, - "name": "MetadataStandard", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": { - "sourceFileName": "src/core/CIP25.ts", - "qualifiedName": "Files" - }, - "name": "Files", - "package": "@meshsdk/core" - }, - { - "type": "reflection", - "declaration": { - "id": 143, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 144, - "name": "artists", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 23, - "character": 2 - } - ], - "type": { - "type": "tuple", - "elements": [ - { - "type": "reflection", - "declaration": { - "id": 145, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 146, - "name": "name", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 24, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 147, - "name": "twitter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 25, - "character": 4 - } - ], - "type": { - "type": "templateLiteral", - "head": "https://twitter.com/", - "tail": [ - [ - { - "type": "intrinsic", - "name": "string" - }, - "" - ] - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 146, - 147 - ] - } - ], - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 23, - "character": 13 - } - ] - } - } - ] - } - }, - { - "id": 148, - "name": "attributes", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 27, - "character": 2 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 149, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 27, - "character": 15 - } - ], - "indexSignature": { - "id": 150, - "name": "__index", - "variant": "signature", - "kind": 8192, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 28, - "character": 4 - } - ], - "parameters": [ - { - "id": 151, - "name": "key", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - } - } - }, - { - "id": 152, - "name": "traits", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 30, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 144, - 148, - 152 - ] - } - ], - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 22, - "character": 60 - } - ] - } - } - ] - } - }, - { - "id": 208, - "name": "LanguageVersion", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PlutusScript.ts", - "line": 8, - "character": 12 - } - ], - "type": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "query", - "queryType": { - "type": "reference", - "target": { - "sourceFileName": "src/common/constants.ts", - "qualifiedName": "LANGUAGE_VERSIONS" - }, - "name": "LANGUAGE_VERSIONS", - "package": "@meshsdk/core", - "preferValues": true - } - } - } - }, - { - "id": 558, - "name": "MaestroSupportedNetworks", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "providers/maestro.provider.ts", - "line": 24, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Mainnet" - }, - { - "type": "literal", - "value": "Preprod" - }, - { - "type": "literal", - "value": "Preview" - } - ] - } - }, - { - "id": 1085, - "name": "MeshTxBuilderBody", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 11, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1086, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1098, - "name": "certificates", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 23, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1209, - "name": "Certificate", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1095, - "name": "changeAddress", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 20, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1091, - "name": "collaterals", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 16, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1101, - "name": "PubKeyTxIn", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1089, - "name": "extraInputs", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 14, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1087, - "name": "inputs", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1100, - "name": "TxIn", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1096, - "name": "metadata", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 21, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1205, - "name": "Metadata", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1094, - "name": "mints", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 19, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1171, - "name": "MintItem", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1088, - "name": "outputs", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1162, - "name": "Output", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1093, - "name": "referenceInputs", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 18, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 1158, - "name": "RefTxIn", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1092, - "name": "requiredSignatures", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 17, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1090, - "name": "selectionThreshold", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 15, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1099, - "name": "signingKey", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 25, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 1097, - "name": "validityRange", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 22, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1187, - "name": "ValidityRange", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1098, - 1095, - 1091, - 1089, - 1087, - 1096, - 1094, - 1088, - 1093, - 1092, - 1090, - 1099, - 1097 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 11, - "character": 32 - } - ] - } - } - }, - { - "id": 1205, - "name": "Metadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 157, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1206, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1208, - "name": "metadata", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 159, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "object" - } - }, - { - "id": 1207, - "name": "tag", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 158, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1208, - 1207 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 157, - "character": 23 - } - ] - } - } - }, - { - "id": 179, - "name": "Mint", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 5, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 180, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 181, - "name": "assetName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 182, - "name": "assetQuantity", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 124, - "name": "Quantity", - "package": "@meshsdk/core" - } - }, - { - "id": 185, - "name": "label", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "20" - }, - { - "type": "literal", - "value": "721" - }, - { - "type": "literal", - "value": "777" - }, - { - "type": "templateLiteral", - "head": "", - "tail": [ - [ - { - "type": "intrinsic", - "name": "number" - }, - "" - ] - ] - } - ] - } - }, - { - "id": 183, - "name": "metadata", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 135, - "name": "AssetMetadata", - "package": "@meshsdk/core" - } - }, - { - "id": 184, - "name": "recipient", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 246, - "name": "Recipient", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 181, - 182, - 185, - 183, - 184 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Mint.ts", - "line": 5, - "character": 19 - } - ] - } - } - }, - { - "id": 1171, - "name": "MintItem", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 110, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1172, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1176, - "name": "amount", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 114, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1175, - "name": "assetName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 113, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1174, - "name": "policyId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 112, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1177, - "name": "redeemer", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 115, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1201, - "name": "Redeemer", - "package": "@meshsdk/core" - } - }, - { - "id": 1178, - "name": "scriptSource", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 116, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1179, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1181, - "name": "script", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 119, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - } - }, - { - "id": 1180, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 118, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Provided" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1181, - 1180 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 117, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1182, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1184, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 123, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1185, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 124, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1183, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 122, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Reference Script" - } - }, - { - "id": 1186, - "name": "version", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 125, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 208, - "name": "LanguageVersion", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1184, - 1185, - 1183, - 1186 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 121, - "character": 6 - } - ] - } - } - ] - } - }, - { - "id": 1173, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 111, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Plutus" - }, - { - "type": "literal", - "value": "Native" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1176, - 1175, - 1174, - 1177, - 1178, - 1173 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 110, - "character": 23 - } - ] - } - } - }, - { - "id": 186, - "name": "NativeScript", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 187, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 189, - "name": "slot", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 4, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 188, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 3, - "character": 6 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "after" - }, - { - "type": "literal", - "value": "before" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 189, - 188 - ] - } - ], - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 2, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 190, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 192, - "name": "scripts", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 8, - "character": 6 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - } - }, - { - "id": 191, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 7, - "character": 6 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "all" - }, - { - "type": "literal", - "value": "any" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 192, - 191 - ] - } - ], - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 6, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 193, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 195, - "name": "required", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 12, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 196, - "name": "scripts", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 13, - "character": 6 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - } - }, - { - "id": 194, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 11, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "atLeast" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 195, - 196, - 194 - ] - } - ], - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 10, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 197, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 199, - "name": "keyHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 17, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 198, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 16, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "sig" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 199, - 198 - ] - } - ], - "sources": [ - { - "fileName": "common/types/NativeScript.ts", - "line": 15, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 200, - "name": "Network", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Network.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "indexedAccess", - "indexType": { - "type": "intrinsic", - "name": "number" - }, - "objectType": { - "type": "query", - "queryType": { - "type": "reference", - "target": { - "sourceFileName": "src/common/types/Network.ts", - "qualifiedName": "ALL_NETWORKS" - }, - "name": "ALL_NETWORKS", - "package": "@meshsdk/core", - "preferValues": true - } - } - } - }, - { - "id": 141, - "name": "NonFungibleAssetMetadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/AssetMetadata.ts", - "line": 14, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "AudioAssetMetadata" - }, - "name": "AudioAssetMetadata", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 142, - "name": "ImageAssetMetadata", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "SmartAssetMetadata" - }, - "name": "SmartAssetMetadata", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "VideoAssetMetadata" - }, - "name": "VideoAssetMetadata", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 1162, - "name": "Output", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 100, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1163, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1164, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 101, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1165, - "name": "amount", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 102, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1166, - "name": "datum", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 103, - "character": 2 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1167, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1169, - "name": "data", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 105, - "character": 4 - } - ], - "type": { - "type": "reference", - "target": 1191, - "name": "BuilderData", - "package": "@meshsdk/core" - } - }, - { - "id": 1168, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 104, - "character": 4 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "Hash" - }, - { - "type": "literal", - "value": "Inline" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1169, - 1168 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 103, - "character": 10 - } - ] - } - } - }, - { - "id": 1170, - "name": "referenceScript", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 107, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1164, - 1165, - 1166, - 1170 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 100, - "character": 21 - } - ] - } - } - }, - { - "id": 204, - "name": "PlutusScript", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PlutusScript.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 205, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 207, - "name": "code", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PlutusScript.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 206, - "name": "version", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PlutusScript.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 208, - "name": "LanguageVersion", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 207, - 206 - ] - } - ], - "sources": [ - { - "fileName": "common/types/PlutusScript.ts", - "line": 3, - "character": 27 - } - ] - } - } - }, - { - "id": 220, - "name": "PoolMetadata", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 15, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 221, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 222, - "name": "URL", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 16, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 223, - "name": "hash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 17, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 222, - 223 - ] - } - ], - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 15, - "character": 27 - } - ] - } - } - }, - { - "id": 209, - "name": "PoolParams", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 210, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 211, - "name": "VRFKeyHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 214, - "name": "cost", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 215, - "name": "margin", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 219, - "name": "metadata", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 220, - "name": "PoolMetadata", - "package": "@meshsdk/core" - } - }, - { - "id": 212, - "name": "operator", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 217, - "name": "owners", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 213, - "name": "pledge", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 216, - "name": "relays", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 254, - "name": "Relay", - "package": "@meshsdk/core" - } - } - }, - { - "id": 218, - "name": "rewardAddress", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 11, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 211, - 214, - 215, - 219, - 212, - 217, - 213, - 216, - 218 - ] - } - ], - "sources": [ - { - "fileName": "common/types/PoolParams.ts", - "line": 3, - "character": 25 - } - ] - } - } - }, - { - "id": 224, - "name": "Protocol", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 225, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 245, - "name": "coinsPerUTxOSize", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 21, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 243, - "name": "collateralPercent", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 19, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 234, - "name": "decentralisation", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 226, - "name": "epoch", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 232, - "name": "keyDeposit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 240, - "name": "maxBlockExMem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 16, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 241, - "name": "maxBlockExSteps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 17, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 231, - "name": "maxBlockHeaderSize", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 229, - "name": "maxBlockSize", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 244, - "name": "maxCollateralInputs", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 20, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 238, - "name": "maxTxExMem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 14, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 239, - "name": "maxTxExSteps", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 15, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 230, - "name": "maxTxSize", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 242, - "name": "maxValSize", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 18, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 227, - "name": "minFeeA", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 228, - "name": "minFeeB", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 235, - "name": "minPoolCost", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 11, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 233, - "name": "poolDeposit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 236, - "name": "priceMem", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 12, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 237, - "name": "priceStep", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 13, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 245, - 243, - 234, - 226, - 232, - 240, - 241, - 231, - 229, - 244, - 238, - 239, - 230, - 242, - 227, - 228, - 235, - 233, - 236, - 237 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Protocol.ts", - "line": 1, - "character": 23 - } - ] - } - } - }, - { - "id": 1101, - "name": "PubKeyTxIn", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 30, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1102, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1104, - "name": "txIn", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 30, - "character": 43 - } - ], - "type": { - "type": "reference", - "target": 1105, - "name": "TxInParameter", - "package": "@meshsdk/core" - } - }, - { - "id": 1103, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 30, - "character": 27 - } - ], - "type": { - "type": "literal", - "value": "PubKey" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1104, - 1103 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 30, - "character": 25 - } - ] - } - } - }, - { - "id": 124, - "name": "Quantity", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 8, - "character": 12 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 246, - "name": "Recipient", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 5, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reflection", - "declaration": { - "id": 247, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 248, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 249, - "name": "datum", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 250, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 252, - "name": "inline", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 9, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - }, - { - "id": 251, - "name": "value", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 8, - "character": 4 - } - ], - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 252, - 251 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 7, - "character": 10 - } - ] - } - } - }, - { - "id": 253, - "name": "script", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 11, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 248, - 249, - 253 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Recipient.ts", - "line": 5, - "character": 33 - } - ] - } - } - ] - } - }, - { - "id": 1201, - "name": "Redeemer", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 152, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1202, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1203, - "name": "data", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 153, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1191, - "name": "BuilderData", - "package": "@meshsdk/core" - } - }, - { - "id": 1204, - "name": "exUnits", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 154, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 115, - "name": "Budget", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1203, - 1204 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 152, - "character": 23 - } - ] - } - } - }, - { - "id": 1158, - "name": "RefTxIn", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 98, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1159, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1160, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 98, - "character": 24 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1161, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 98, - "character": 40 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1160, - 1161 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 98, - "character": 22 - } - ] - } - } - }, - { - "id": 254, - "name": "Relay", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 255, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 257, - "name": "IPV4", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 4, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 258, - "name": "IPV6", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 5, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 259, - "name": "port", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 6, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 256, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 3, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "SingleHostAddr" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 257, - 258, - 259, - 256 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 2, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 260, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 262, - "name": "domainName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 10, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 263, - "name": "port", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 11, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 261, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 9, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "SingleHostName" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 262, - 263, - 261 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 8, - "character": 4 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 264, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 266, - "name": "domainName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 15, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 265, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 14, - "character": 6 - } - ], - "type": { - "type": "literal", - "value": "MultiHostName" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 266, - 265 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Relay.ts", - "line": 13, - "character": 4 - } - ] - } - } - ] - } - }, - { - "id": 1227, - "name": "RequiredWith", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 171, - "character": 12 - } - ], - "typeParameters": [ - { - "id": 1228, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {} - }, - { - "id": 1229, - "name": "K", - "variant": "typeParam", - "kind": 131072, - "flags": {}, - "type": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "reference", - "target": 1228, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - } - } - ], - "type": { - "type": "intersection", - "types": [ - { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Required" - }, - "typeArguments": [ - { - "type": "reference", - "target": 1228, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - ], - "name": "Required", - "package": "typescript" - }, - { - "type": "mapped", - "parameter": "P", - "parameterType": { - "type": "reference", - "target": 1229, - "name": "K", - "package": "@meshsdk/core", - "refersToTypeParameter": true - }, - "templateType": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Required" - }, - "typeArguments": [ - { - "type": "indexedAccess", - "indexType": { - "type": "reference", - "target": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "P" - }, - "name": "P", - "package": "@meshsdk/core", - "refersToTypeParameter": true - }, - "objectType": { - "type": "reference", - "target": 1228, - "name": "T", - "package": "@meshsdk/core", - "refersToTypeParameter": true - } - } - ], - "name": "Required", - "package": "typescript" - } - } - ] - } - }, - { - "id": 1152, - "name": "ScriptSourceInfo", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 91, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1153, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1156, - "name": "spendingScriptHash", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 94, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1154, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 92, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1155, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 93, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1157, - "name": "version", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 95, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 208, - "name": "LanguageVersion", - "package": "@meshsdk/core" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1156, - 1154, - 1155, - 1157 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 91, - "character": 31 - } - ] - } - } - }, - { - "id": 1129, - "name": "ScriptTxIn", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 62, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1130, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1133, - "name": "scriptTxIn", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 65, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1134, - "name": "ScriptTxInParameter", - "package": "@meshsdk/core" - } - }, - { - "id": 1132, - "name": "txIn", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 64, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1105, - "name": "TxInParameter", - "package": "@meshsdk/core" - } - }, - { - "id": 1131, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 63, - "character": 2 - } - ], - "type": { - "type": "literal", - "value": "Script" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1133, - 1132, - 1131 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 62, - "character": 25 - } - ] - } - } - }, - { - "id": 1134, - "name": "ScriptTxInParameter", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 68, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1135, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1143, - "name": "datumSource", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 78, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1144, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1146, - "name": "data", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 81, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 1191, - "name": "BuilderData", - "package": "@meshsdk/core" - } - }, - { - "id": 1145, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 80, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Provided" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1146, - 1145 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 79, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1147, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1149, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 85, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1150, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 86, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1148, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 84, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Inline" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1149, - 1150, - 1148 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 83, - "character": 6 - } - ] - } - } - ] - } - }, - { - "id": 1151, - "name": "redeemer", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 88, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1201, - "name": "Redeemer", - "package": "@meshsdk/core" - } - }, - { - "id": 1136, - "name": "scriptSource", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 69, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1137, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1139, - "name": "script", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 72, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - } - }, - { - "id": 1138, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 71, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Provided" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1139, - 1138 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 70, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1140, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1142, - "name": "txInInfo", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 76, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 1152, - "name": "ScriptSourceInfo", - "package": "@meshsdk/core" - } - }, - { - "id": 1141, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 75, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Inline" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1142, - 1141 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 74, - "character": 6 - } - ] - } - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1143, - 1151, - 1136 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 68, - "character": 34 - } - ] - } - } - }, - { - "id": 1125, - "name": "SimpleScriptSourceInfo", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 57, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1126, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1127, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 58, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1128, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 59, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1127, - 1128 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 57, - "character": 37 - } - ] - } - } - }, - { - "id": 1111, - "name": "SimpleScriptTxIn", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 39, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1112, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1115, - "name": "simpleScriptTxIn", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 42, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1116, - "name": "SimpleScriptTxInParameter", - "package": "@meshsdk/core" - } - }, - { - "id": 1114, - "name": "txIn", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 41, - "character": 2 - } - ], - "type": { - "type": "reference", - "target": 1105, - "name": "TxInParameter", - "package": "@meshsdk/core" - } - }, - { - "id": 1113, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 40, - "character": 2 - } - ], - "type": { - "type": "literal", - "value": "SimpleScript" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1115, - 1114, - 1113 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 39, - "character": 31 - } - ] - } - } - }, - { - "id": 1116, - "name": "SimpleScriptTxInParameter", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 45, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1117, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1118, - "name": "scriptSource", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 46, - "character": 2 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reflection", - "declaration": { - "id": 1119, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1121, - "name": "script", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 49, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1120, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 48, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Provided" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1121, - 1120 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 47, - "character": 6 - } - ] - } - }, - { - "type": "reflection", - "declaration": { - "id": 1122, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1124, - "name": "txInInfo", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 53, - "character": 8 - } - ], - "type": { - "type": "reference", - "target": 1125, - "name": "SimpleScriptSourceInfo", - "package": "@meshsdk/core" - } - }, - { - "id": 1123, - "name": "type", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 52, - "character": 8 - } - ], - "type": { - "type": "literal", - "value": "Inline" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1124, - 1123 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 51, - "character": 6 - } - ] - } - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1118 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 45, - "character": 40 - } - ] - } - } - }, - { - "id": 267, - "name": "Token", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Token.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "query", - "queryType": { - "type": "reference", - "target": { - "sourceFileName": "src/common/constants.ts", - "qualifiedName": "SUPPORTED_TOKENS" - }, - "name": "SUPPORTED_TOKENS", - "package": "@meshsdk/core", - "preferValues": true - } - } - } - }, - { - "id": 268, - "name": "TransactionInfo", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 269, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 271, - "name": "block", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 276, - "name": "deposit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 274, - "name": "fees", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 6, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 272, - "name": "hash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 270, - "name": "index", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 278, - "name": "invalidAfter", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 10, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 277, - "name": "invalidBefore", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 9, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 275, - "name": "size", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 7, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 273, - "name": "slot", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 5, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 271, - 276, - 274, - 272, - 270, - 278, - 277, - 275, - 273 - ] - } - ], - "sources": [ - { - "fileName": "common/types/TransactionInfo.ts", - "line": 1, - "character": 30 - } - ] - } - } - }, - { - "id": 1100, - "name": "TxIn", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 28, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 1101, - "name": "PubKeyTxIn", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 1111, - "name": "SimpleScriptTxIn", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 1129, - "name": "ScriptTxIn", - "package": "@meshsdk/core" - } - ] - } - }, - { - "id": 1105, - "name": "TxInParameter", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 32, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1106, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1110, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 36, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1109, - "name": "amount", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 35, - "character": 2 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 1107, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 33, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1108, - "name": "txIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 34, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1110, - 1109, - 1107, - 1108 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 32, - "character": 28 - } - ] - } - } - }, - { - "id": 279, - "name": "UTxO", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 3, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 280, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 281, - "name": "input", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 282, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 283, - "name": "outputIndex", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 5, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 284, - "name": "txHash", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 6, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 283, - 284 - ] - } - ], - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 4, - "character": 9 - } - ] - } - } - }, - { - "id": 285, - "name": "output", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 8, - "character": 2 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 286, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 287, - "name": "address", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 9, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 288, - "name": "amount", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 10, - "character": 4 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - }, - { - "id": 289, - "name": "dataHash", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 11, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 290, - "name": "plutusData", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 12, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 292, - "name": "scriptHash", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 14, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 291, - "name": "scriptRef", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 13, - "character": 4 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 287, - 288, - 289, - 290, - 292, - 291 - ] - } - ], - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 8, - "character": 10 - } - ] - } - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 281, - 285 - ] - } - ], - "sources": [ - { - "fileName": "common/types/UTxO.ts", - "line": 3, - "character": 19 - } - ] - } - } - }, - { - "id": 123, - "name": "Unit", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 6, - "character": 12 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 1187, - "name": "ValidityRange", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 131, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 1188, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 1189, - "name": "invalidBefore", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 132, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 1190, - "name": "invalidHereafter", - "variant": "declaration", - "kind": 1024, - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 133, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 1189, - 1190 - ] - } - ], - "sources": [ - { - "fileName": "transaction/meshTxBuilder/type.ts", - "line": 131, - "character": 28 - } - ] - } - } - }, - { - "id": 293, - "name": "Wallet", - "variant": "declaration", - "kind": 2097152, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Wallet.ts", - "line": 1, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 294, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 296, - "name": "icon", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Wallet.ts", - "line": 3, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 295, - "name": "name", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Wallet.ts", - "line": 2, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 297, - "name": "version", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Wallet.ts", - "line": 4, - "character": 2 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 296, - 295, - 297 - ] - } - ], - "sources": [ - { - "fileName": "common/types/Wallet.ts", - "line": 1, - "character": 21 - } - ] - } - } - }, - { - "id": 11, - "name": "checkSignature", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP8.ts", - "line": 26, - "character": 13 - } - ], - "signatures": [ - { - "id": 12, - "name": "checkSignature", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP8.ts", - "line": 26, - "character": 30 - } - ], - "parameters": [ - { - "id": 13, - "name": "message", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 14, - "name": "signer", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 15, - "name": "__namedParameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 174, - "name": "DataSignature", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 1, - "name": "generateNonce", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/generateNonce.ts", - "line": 4, - "character": 13 - } - ], - "signatures": [ - { - "id": 2, - "name": "generateNonce", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/generateNonce.ts", - "line": 4, - "character": 29 - } - ], - "parameters": [ - { - "id": 3, - "name": "label", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "''" - }, - { - "id": 4, - "name": "length", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "32" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 201, - "name": "isNetwork", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Network.ts", - "line": 5, - "character": 13 - } - ], - "signatures": [ - { - "id": 202, - "name": "isNetwork", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Network.ts", - "line": 5, - "character": 25 - } - ], - "parameters": [ - { - "id": 203, - "name": "value", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "value", - "asserts": false, - "targetType": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "testnet" - }, - { - "type": "literal", - "value": "preview" - }, - { - "type": "literal", - "value": "preprod" - }, - { - "type": "literal", - "value": "mainnet" - } - ] - } - } - } - ] - }, - { - "id": 369, - "name": "keepRelevant", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 8, - "character": 13 - } - ], - "signatures": [ - { - "id": 370, - "name": "keepRelevant", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 8, - "character": 28 - } - ], - "parameters": [ - { - "id": 371, - "name": "requestedOutputSet", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Map", - "package": "typescript" - } - }, - { - "id": 372, - "name": "initialUTxOSet", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 373, - "name": "minimumLovelaceRequired", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "'5000000'" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ] - }, - { - "id": 374, - "name": "largestFirst", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 42, - "character": 13 - } - ], - "signatures": [ - { - "id": 375, - "name": "largestFirst", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 42, - "character": 28 - } - ], - "parameters": [ - { - "id": 376, - "name": "lovelace", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 377, - "name": "initialUTxOSet", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 378, - "name": "includeTxFees", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 379, - "name": "__namedParameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ] - }, - { - "id": 380, - "name": "largestFirstMultiAsset", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 69, - "character": 13 - } - ], - "signatures": [ - { - "id": 381, - "name": "largestFirstMultiAsset", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "core/CIP2.ts", - "line": 69, - "character": 38 - } - ], - "parameters": [ - { - "id": 382, - "name": "requestedOutputSet", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts", - "qualifiedName": "Map" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "string" - } - ], - "name": "Map", - "package": "typescript" - } - }, - { - "id": 383, - "name": "initialUTxOSet", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - }, - { - "id": 384, - "name": "includeTxFees", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 385, - "name": "parameters", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 224, - "name": "Protocol", - "package": "@meshsdk/core" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 279, - "name": "UTxO", - "package": "@meshsdk/core" - } - } - } - ] - }, - { - "id": 125, - "name": "mergeAssets", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 10, - "character": 13 - } - ], - "signatures": [ - { - "id": 126, - "name": "mergeAssets", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/types/Asset.ts", - "line": 10, - "character": 27 - } - ], - "parameters": [ - { - "id": 127, - "name": "assets", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": 119, - "name": "Asset", - "package": "@meshsdk/core" - } - } - } - ] - }, - { - "id": 360, - "name": "parseAssetUnit", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 5, - "character": 13 - } - ], - "signatures": [ - { - "id": 361, - "name": "parseAssetUnit", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 5, - "character": 30 - } - ], - "parameters": [ - { - "id": 362, - "name": "unit", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 363, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 365, - "name": "assetName", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 11, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 364, - "name": "policyId", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 11, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 365, - 364 - ] - } - ], - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 11, - "character": 9 - } - ] - } - } - } - ] - }, - { - "id": 366, - "name": "parseHttpError", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 14, - "character": 13 - } - ], - "signatures": [ - { - "id": 367, - "name": "parseHttpError", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/parser.ts", - "line": 14, - "character": 30 - } - ], - "parameters": [ - { - "id": 368, - "name": "error", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 5, - "name": "readPlutusData", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/readPlutusData.ts", - "line": 6, - "character": 13 - } - ], - "signatures": [ - { - "id": 6, - "name": "readPlutusData", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/readPlutusData.ts", - "line": 6, - "character": 30 - } - ], - "parameters": [ - { - "id": 7, - "name": "plutusData", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - } - ] - }, - { - "id": 8, - "name": "readTransaction", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/readTransaction.ts", - "line": 4, - "character": 13 - } - ], - "signatures": [ - { - "id": 9, - "name": "readTransaction", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/helpers/readTransaction.ts", - "line": 4, - "character": 31 - } - ], - "parameters": [ - { - "id": 10, - "name": "tx", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "../../node_modules/.pnpm/@emurgo+cardano-serialization-lib-nodejs@11.5.0/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.d.ts", - "qualifiedName": "TransactionJSON" - }, - "name": "TransactionJSON", - "package": "@emurgo/cardano-serialization-lib-nodejs" - } - } - ] - }, - { - "id": 298, - "name": "resolveDataHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 29, - "character": 13 - } - ], - "signatures": [ - { - "id": 299, - "name": "resolveDataHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 29, - "character": 31 - } - ], - "parameters": [ - { - "id": 300, - "name": "data", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 170, - "name": "Data", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 301, - "name": "resolveEpochNo", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 35, - "character": 13 - } - ], - "signatures": [ - { - "id": 302, - "name": "resolveEpochNo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 35, - "character": 30 - } - ], - "parameters": [ - { - "id": 303, - "name": "network", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "testnet" - }, - { - "type": "literal", - "value": "preview" - }, - { - "type": "literal", - "value": "preprod" - }, - { - "type": "literal", - "value": "mainnet" - } - ] - } - }, - { - "id": 304, - "name": "milliseconds", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "..." - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ] - }, - { - "id": 305, - "name": "resolveFingerprint", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 53, - "character": 13 - } - ], - "signatures": [ - { - "id": 306, - "name": "resolveFingerprint", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 53, - "character": 34 - } - ], - "parameters": [ - { - "id": 307, - "name": "policyId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 308, - "name": "assetName", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 309, - "name": "resolveLanguageView", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 60, - "character": 13 - } - ], - "signatures": [ - { - "id": 310, - "name": "resolveLanguageView", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 60, - "character": 35 - } - ], - "parameters": [ - { - "id": 311, - "name": "era", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 178, - "name": "Era", - "package": "@meshsdk/core" - } - }, - { - "id": 312, - "name": "version", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "V1" - }, - { - "type": "literal", - "value": "V2" - } - ] - } - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ] - }, - { - "id": 313, - "name": "resolveNativeScriptAddress", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 64, - "character": 13 - } - ], - "signatures": [ - { - "id": 314, - "name": "resolveNativeScriptAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 64, - "character": 42 - } - ], - "parameters": [ - { - "id": 315, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - }, - { - "id": 316, - "name": "networkId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 317, - "name": "resolveNativeScriptHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 78, - "character": 13 - } - ], - "signatures": [ - { - "id": 318, - "name": "resolveNativeScriptHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 78, - "character": 39 - } - ], - "parameters": [ - { - "id": 319, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 320, - "name": "resolveNativeScriptHex", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 82, - "character": 13 - } - ], - "signatures": [ - { - "id": 321, - "name": "resolveNativeScriptHex", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 82, - "character": 38 - } - ], - "parameters": [ - { - "id": 322, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 323, - "name": "resolvePaymentKeyHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 86, - "character": 13 - } - ], - "signatures": [ - { - "id": 324, - "name": "resolvePaymentKeyHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 86, - "character": 37 - } - ], - "parameters": [ - { - "id": 325, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 326, - "name": "resolvePlutusScriptAddress", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 105, - "character": 13 - } - ], - "signatures": [ - { - "id": 327, - "name": "resolvePlutusScriptAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 105, - "character": 42 - } - ], - "parameters": [ - { - "id": 328, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - } - }, - { - "id": 329, - "name": "networkId", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "0" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 330, - "name": "resolvePlutusScriptHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 119, - "character": 13 - } - ], - "signatures": [ - { - "id": 331, - "name": "resolvePlutusScriptHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 119, - "character": 39 - } - ], - "parameters": [ - { - "id": 332, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 333, - "name": "resolvePoolId", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 132, - "character": 13 - } - ], - "signatures": [ - { - "id": 334, - "name": "resolvePoolId", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 132, - "character": 29 - } - ], - "parameters": [ - { - "id": 335, - "name": "hash", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 336, - "name": "resolvePrivateKey", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 136, - "character": 13 - } - ], - "signatures": [ - { - "id": 337, - "name": "resolvePrivateKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 136, - "character": 33 - } - ], - "parameters": [ - { - "id": 338, - "name": "words", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 346, - "name": "resolveRewardAddress", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 164, - "character": 13 - } - ], - "signatures": [ - { - "id": 347, - "name": "resolveRewardAddress", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 164, - "character": 36 - } - ], - "parameters": [ - { - "id": 348, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 339, - "name": "resolveScriptRef", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 146, - "character": 13 - } - ], - "signatures": [ - { - "id": 340, - "name": "resolveScriptRef", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 146, - "character": 32 - } - ], - "parameters": [ - { - "id": 341, - "name": "script", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "target": 186, - "name": "NativeScript", - "package": "@meshsdk/core" - }, - { - "type": "reference", - "target": 204, - "name": "PlutusScript", - "package": "@meshsdk/core" - } - ] - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 342, - "name": "resolveSlotNo", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 150, - "character": 13 - } - ], - "signatures": [ - { - "id": 343, - "name": "resolveSlotNo", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 150, - "character": 29 - } - ], - "parameters": [ - { - "id": 344, - "name": "network", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "literal", - "value": "testnet" - }, - { - "type": "literal", - "value": "preview" - }, - { - "type": "literal", - "value": "preprod" - }, - { - "type": "literal", - "value": "mainnet" - } - ] - } - }, - { - "id": 345, - "name": "milliseconds", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "..." - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 349, - "name": "resolveStakeKeyHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 181, - "character": 13 - } - ], - "signatures": [ - { - "id": 350, - "name": "resolveStakeKeyHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 181, - "character": 35 - } - ], - "parameters": [ - { - "id": 351, - "name": "bech32", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 352, - "name": "resolveTxFees", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 196, - "character": 13 - } - ], - "signatures": [ - { - "id": 353, - "name": "resolveTxFees", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 196, - "character": 29 - } - ], - "parameters": [ - { - "id": 354, - "name": "txSize", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 355, - "name": "minFeeA", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS.minFeeA" - }, - { - "id": 356, - "name": "minFeeB", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "DEFAULT_PROTOCOL_PARAMETERS.minFeeB" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 357, - "name": "resolveTxHash", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 206, - "character": 13 - } - ], - "signatures": [ - { - "id": 358, - "name": "resolveTxHash", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "common/utils/resolver.ts", - "line": 206, - "character": 29 - } - ], - "parameters": [ - { - "id": 359, - "name": "txHex", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "children": [ - 1247, - 386, - 1310, - 1376, - 697, - 455, - 466, - 563, - 865, - 1481, - 530, - 716, - 631 - ] - }, - { - "title": "Interfaces", - "children": [ - 16, - 20, - 59, - 67, - 75, - 88, - 92, - 559 - ] - }, - { - "title": "Type Aliases", - "children": [ - 97, - 102, - 109, - 1230, - 119, - 128, - 135, - 153, - 115, - 1191, - 1209, - 1241, - 1465, - 170, - 174, - 178, - 136, - 142, - 208, - 558, - 1085, - 1205, - 179, - 1171, - 186, - 200, - 141, - 1162, - 204, - 220, - 209, - 224, - 1101, - 124, - 246, - 1201, - 1158, - 254, - 1227, - 1152, - 1129, - 1134, - 1125, - 1111, - 1116, - 267, - 268, - 1100, - 1105, - 279, - 123, - 1187, - 293 - ] - }, - { - "title": "Functions", - "children": [ - 11, - 1, - 201, - 369, - 374, - 380, - 125, - 360, - 366, - 5, - 8, - 298, - 301, - 305, - 309, - 313, - 317, - 320, - 323, - 326, - 330, - 333, - 336, - 346, - 339, - 342, - 349, - 352, - 357 - ] - } - ], - "packageName": "@meshsdk/core", - "readme": [ - { - "kind": "text", - "text": "![Mesh Logo](https://meshjs.dev/logo-mesh/mesh.png)\n\nMesh is an open-source library designed to make building dApps accessible. Whether you're a beginner developer, startup, web3 market leader, or a large enterprise, Mesh makes web3 development easy with reliable, scalable, and well-engineered APIs & developer tools.\n\nExplore the features on [Mesh Playground](https://meshjs.dev/).\n\n## Guides and documentations\n\n- [Starter Templates](https://meshjs.dev/starter-templates)\n- [Guides](https://meshjs.dev/guides)\n- [Install Mesh into existing project](https://meshjs.dev/migration-manual-installation)\n- [App Wallet (Building transactions on applications)](https://meshjs.dev/apis/appwallet)\n- [Browser Wallet (CIP30 wallets intergration)](https://meshjs.dev/apis/browserwallet)\n- [Transaction - Building, minting, burning, smart contracts, stake pool and more](https://meshjs.dev/apis/transaction)\n- [React Components](https://meshjs.dev/react)\n- [Service Providers](https://meshjs.dev/providers)\n- [Resolvers](https://meshjs.dev/apis/resolvers)\n\n## Why use Mesh\n- Start a new project with one of out [Starter Templates](https://meshjs.dev/starter-templates) with CLI command\n- Always up to date - Vasil-ready, developed promptly as the network updates so your app always works\n- Simple to use - Check out our [guides](https://meshjs.dev/guides) - you'll get started in less than 10 mins!\n- Adopts best practices - implements various CIPs and package is well build (no hacking and tweaking needed to get it to work)\n- Thoroughly tested - Mesh is used by both developers and learners, and is being built by developers with solid software engineering backgrounds\n- Integrates with Cardano projects - Koios, Blockfrost, ADA Handle (and more), you can pick and choose freely what you want to use for your app\n- Well documented - we focus on documentation so you can use it with ease, and our [Playground](https://meshjs.dev/) is built so you can see how it works\n\n## How can you contribute?\n\n- [Support us](https://meshjs.dev/about/support-us)\n- Build something - try Mesh by implementing your Web 3.0 project (recommended [starter guide](https://meshjs.dev/guides/nextjs))\n- Inform others - Tell others about Mesh, and star the [Github repo](https://github.com/MeshJS/mesh) :star:" - } - ], - "symbolIdMap": { - "0": { - "sourceFileName": "src/index.ts", - "qualifiedName": "" - }, - "1": { - "sourceFileName": "src/common/helpers/generateNonce.ts", - "qualifiedName": "generateNonce" - }, - "2": { - "sourceFileName": "src/common/helpers/generateNonce.ts", - "qualifiedName": "generateNonce" - }, - "3": { - "sourceFileName": "src/common/helpers/generateNonce.ts", - "qualifiedName": "label" - }, - "4": { - "sourceFileName": "src/common/helpers/generateNonce.ts", - "qualifiedName": "length" - }, - "5": { - "sourceFileName": "src/common/helpers/readPlutusData.ts", - "qualifiedName": "readPlutusData" - }, - "6": { - "sourceFileName": "src/common/helpers/readPlutusData.ts", - "qualifiedName": "readPlutusData" - }, - "7": { - "sourceFileName": "src/common/helpers/readPlutusData.ts", - "qualifiedName": "plutusData" - }, - "8": { - "sourceFileName": "src/common/helpers/readTransaction.ts", - "qualifiedName": "readTransaction" - }, - "9": { - "sourceFileName": "src/common/helpers/readTransaction.ts", - "qualifiedName": "readTransaction" - }, - "10": { - "sourceFileName": "src/common/helpers/readTransaction.ts", - "qualifiedName": "tx" - }, - "11": { - "sourceFileName": "src/core/CIP8.ts", - "qualifiedName": "checkSignature" - }, - "12": { - "sourceFileName": "src/core/CIP8.ts", - "qualifiedName": "checkSignature" - }, - "13": { - "sourceFileName": "src/core/CIP8.ts", - "qualifiedName": "message" - }, - "14": { - "sourceFileName": "src/core/CIP8.ts", - "qualifiedName": "signer" - }, - "15": { - "sourceFileName": "src/core/CIP8.ts", - "qualifiedName": "__2" - }, - "16": { - "sourceFileName": "src/common/contracts/evaluator.ts", - "qualifiedName": "IEvaluator" - }, - "17": { - "sourceFileName": "src/common/contracts/evaluator.ts", - "qualifiedName": "IEvaluator.evaluateTx" - }, - "18": { - "sourceFileName": "src/common/contracts/evaluator.ts", - "qualifiedName": "IEvaluator.evaluateTx" - }, - "19": { - "sourceFileName": "src/common/contracts/evaluator.ts", - "qualifiedName": "tx" - }, - "20": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher" - }, - "21": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAccountInfo" - }, - "22": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAccountInfo" - }, - "23": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "address" - }, - "24": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAddressUTxOs" - }, - "25": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAddressUTxOs" - }, - "26": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "address" - }, - "27": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "asset" - }, - "28": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAssetAddresses" - }, - "29": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAssetAddresses" - }, - "30": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "asset" - }, - "31": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type" - }, - "32": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type.address" - }, - "33": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type.quantity" - }, - "34": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAssetMetadata" - }, - "35": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchAssetMetadata" - }, - "36": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "asset" - }, - "37": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchBlockInfo" - }, - "38": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchBlockInfo" - }, - "39": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "hash" - }, - "40": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchCollectionAssets" - }, - "41": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchCollectionAssets" - }, - "42": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "policyId" - }, - "43": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "cursor" - }, - "44": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type" - }, - "45": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type.assets" - }, - "46": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "__type.next" - }, - "47": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchHandleAddress" - }, - "48": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchHandleAddress" - }, - "49": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "handle" - }, - "50": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchProtocolParameters" - }, - "51": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchProtocolParameters" - }, - "52": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "epoch" - }, - "53": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchTxInfo" - }, - "54": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchTxInfo" - }, - "55": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "hash" - }, - "56": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchUTxOs" - }, - "57": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "IFetcher.fetchUTxOs" - }, - "58": { - "sourceFileName": "src/common/contracts/fetcher.ts", - "qualifiedName": "hash" - }, - "59": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator" - }, - "60": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedAddress" - }, - "61": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedAddress" - }, - "62": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedCollateral" - }, - "63": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedCollateral" - }, - "64": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "limit" - }, - "65": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedUTxOs" - }, - "66": { - "sourceFileName": "src/common/contracts/initiator.ts", - "qualifiedName": "IInitiator.getUsedUTxOs" - }, - "67": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "IListener" - }, - "68": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "IListener.onTxConfirmed" - }, - "69": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "IListener.onTxConfirmed" - }, - "70": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "txHash" - }, - "71": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "callback" - }, - "72": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "__type" - }, - "73": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "__type" - }, - "74": { - "sourceFileName": "src/common/contracts/listener.ts", - "qualifiedName": "limit" - }, - "75": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner" - }, - "76": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signData" - }, - "77": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signData" - }, - "78": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "address" - }, - "79": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "payload" - }, - "80": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signTx" - }, - "81": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signTx" - }, - "82": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "unsignedTx" - }, - "83": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "partialSign" - }, - "84": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signTxs" - }, - "85": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "ISigner.signTxs" - }, - "86": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "unsignedTxs" - }, - "87": { - "sourceFileName": "src/common/contracts/signer.ts", - "qualifiedName": "partialSign" - }, - "88": { - "sourceFileName": "src/common/contracts/submitter.ts", - "qualifiedName": "ISubmitter" - }, - "89": { - "sourceFileName": "src/common/contracts/submitter.ts", - "qualifiedName": "ISubmitter.submitTx" - }, - "90": { - "sourceFileName": "src/common/contracts/submitter.ts", - "qualifiedName": "ISubmitter.submitTx" - }, - "91": { - "sourceFileName": "src/common/contracts/submitter.ts", - "qualifiedName": "tx" - }, - "92": { - "sourceFileName": "src/common/contracts/uploader.ts", - "qualifiedName": "IUploader" - }, - "93": { - "sourceFileName": "src/common/contracts/uploader.ts", - "qualifiedName": "IUploader.uploadContent" - }, - "94": { - "sourceFileName": "src/common/contracts/uploader.ts", - "qualifiedName": "IUploader.uploadContent" - }, - "95": { - "sourceFileName": "src/common/contracts/uploader.ts", - "qualifiedName": "content" - }, - "96": { - "sourceFileName": "src/common/contracts/uploader.ts", - "qualifiedName": "recursive" - }, - "97": { - "sourceFileName": "src/common/types/Account.ts", - "qualifiedName": "Account" - }, - "98": { - "sourceFileName": "src/common/types/Account.ts", - "qualifiedName": "__type" - }, - "99": { - "sourceFileName": "src/common/types/Account.ts", - "qualifiedName": "__type.baseAddress" - }, - "100": { - "sourceFileName": "src/common/types/Account.ts", - "qualifiedName": "__type.enterpriseAddress" - }, - "101": { - "sourceFileName": "src/common/types/Account.ts", - "qualifiedName": "__type.rewardAddress" - }, - "102": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "AccountInfo" - }, - "103": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type" - }, - "104": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type.active" - }, - "105": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type.poolId" - }, - "106": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type.balance" - }, - "107": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type.rewards" - }, - "108": { - "sourceFileName": "src/common/types/AccountInfo.ts", - "qualifiedName": "__type.withdrawals" - }, - "109": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "Action" - }, - "110": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type" - }, - "111": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.data" - }, - "112": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.index" - }, - "113": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.budget" - }, - "114": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.tag" - }, - "115": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "Budget" - }, - "116": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type" - }, - "117": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.mem" - }, - "118": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.steps" - }, - "119": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "Asset" - }, - "120": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "__type" - }, - "121": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "__type.unit" - }, - "122": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "__type.quantity" - }, - "123": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "Unit" - }, - "124": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "Quantity" - }, - "125": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "mergeAssets" - }, - "126": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "mergeAssets" - }, - "127": { - "sourceFileName": "src/common/types/Asset.ts", - "qualifiedName": "assets" - }, - "128": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "AssetExtended" - }, - "129": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type" - }, - "130": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type.unit" - }, - "131": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type.policyId" - }, - "132": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type.assetName" - }, - "133": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type.fingerprint" - }, - "134": { - "sourceFileName": "src/common/types/AssetExtended.ts", - "qualifiedName": "__type.quantity" - }, - "135": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "AssetMetadata" - }, - "136": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "FungibleAssetMetadata" - }, - "137": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type" - }, - "138": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.ticker" - }, - "139": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.decimals" - }, - "140": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.version" - }, - "141": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "NonFungibleAssetMetadata" - }, - "142": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "ImageAssetMetadata" - }, - "143": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type" - }, - "144": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.artists" - }, - "145": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type" - }, - "146": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.name" - }, - "147": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.twitter" - }, - "148": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.attributes" - }, - "149": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type" - }, - "150": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.__index" - }, - "152": { - "sourceFileName": "src/common/types/AssetMetadata.ts", - "qualifiedName": "__type.traits" - }, - "153": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "BlockInfo" - }, - "154": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type" - }, - "155": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.time" - }, - "156": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.hash" - }, - "157": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.slot" - }, - "158": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.epoch" - }, - "159": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.epochSlot" - }, - "160": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.slotLeader" - }, - "161": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.size" - }, - "162": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.txCount" - }, - "163": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.output" - }, - "164": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.fees" - }, - "165": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.previousBlock" - }, - "166": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.nextBlock" - }, - "167": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.confirmations" - }, - "168": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.operationalCertificate" - }, - "169": { - "sourceFileName": "src/common/types/BlockInfo.ts", - "qualifiedName": "__type.VRFKey" - }, - "170": { - "sourceFileName": "src/common/types/Data.ts", - "qualifiedName": "Data" - }, - "171": { - "sourceFileName": "src/common/types/Data.ts", - "qualifiedName": "__type" - }, - "172": { - "sourceFileName": "src/common/types/Data.ts", - "qualifiedName": "__type.alternative" - }, - "173": { - "sourceFileName": "src/common/types/Data.ts", - "qualifiedName": "__type.fields" - }, - "174": { - "sourceFileName": "src/common/types/DataSignature.ts", - "qualifiedName": "DataSignature" - }, - "175": { - "sourceFileName": "src/common/types/DataSignature.ts", - "qualifiedName": "__type" - }, - "176": { - "sourceFileName": "src/common/types/DataSignature.ts", - "qualifiedName": "__type.signature" - }, - "177": { - "sourceFileName": "src/common/types/DataSignature.ts", - "qualifiedName": "__type.key" - }, - "178": { - "sourceFileName": "src/common/types/Era.ts", - "qualifiedName": "Era" - }, - "179": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "Mint" - }, - "180": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type" - }, - "181": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type.assetName" - }, - "182": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type.assetQuantity" - }, - "183": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type.metadata" - }, - "184": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type.recipient" - }, - "185": { - "sourceFileName": "src/common/types/Mint.ts", - "qualifiedName": "__type.label" - }, - "186": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "NativeScript" - }, - "187": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type" - }, - "188": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.type" - }, - "189": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.slot" - }, - "190": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type" - }, - "191": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.type" - }, - "192": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.scripts" - }, - "193": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type" - }, - "194": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.type" - }, - "195": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.required" - }, - "196": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.scripts" - }, - "197": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type" - }, - "198": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.type" - }, - "199": { - "sourceFileName": "src/common/types/NativeScript.ts", - "qualifiedName": "__type.keyHash" - }, - "200": { - "sourceFileName": "src/common/types/Network.ts", - "qualifiedName": "Network" - }, - "201": { - "sourceFileName": "src/common/types/Network.ts", - "qualifiedName": "isNetwork" - }, - "202": { - "sourceFileName": "src/common/types/Network.ts", - "qualifiedName": "isNetwork" - }, - "203": { - "sourceFileName": "src/common/types/Network.ts", - "qualifiedName": "value" - }, - "204": { - "sourceFileName": "src/common/types/PlutusScript.ts", - "qualifiedName": "PlutusScript" - }, - "205": { - "sourceFileName": "src/common/types/PlutusScript.ts", - "qualifiedName": "__type" - }, - "206": { - "sourceFileName": "src/common/types/PlutusScript.ts", - "qualifiedName": "__type.version" - }, - "207": { - "sourceFileName": "src/common/types/PlutusScript.ts", - "qualifiedName": "__type.code" - }, - "208": { - "sourceFileName": "src/common/types/PlutusScript.ts", - "qualifiedName": "LanguageVersion" - }, - "209": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "PoolParams" - }, - "210": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type" - }, - "211": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.VRFKeyHash" - }, - "212": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.operator" - }, - "213": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.pledge" - }, - "214": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.cost" - }, - "215": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.margin" - }, - "216": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.relays" - }, - "217": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.owners" - }, - "218": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.rewardAddress" - }, - "219": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.metadata" - }, - "220": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "PoolMetadata" - }, - "221": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type" - }, - "222": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.URL" - }, - "223": { - "sourceFileName": "src/common/types/PoolParams.ts", - "qualifiedName": "__type.hash" - }, - "224": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "Protocol" - }, - "225": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type" - }, - "226": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.epoch" - }, - "227": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.minFeeA" - }, - "228": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.minFeeB" - }, - "229": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxBlockSize" - }, - "230": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxTxSize" - }, - "231": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxBlockHeaderSize" - }, - "232": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.keyDeposit" - }, - "233": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.poolDeposit" - }, - "234": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.decentralisation" - }, - "235": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.minPoolCost" - }, - "236": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.priceMem" - }, - "237": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.priceStep" - }, - "238": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxTxExMem" - }, - "239": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxTxExSteps" - }, - "240": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxBlockExMem" - }, - "241": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxBlockExSteps" - }, - "242": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxValSize" - }, - "243": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.collateralPercent" - }, - "244": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.maxCollateralInputs" - }, - "245": { - "sourceFileName": "src/common/types/Protocol.ts", - "qualifiedName": "__type.coinsPerUTxOSize" - }, - "246": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "Recipient" - }, - "247": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type" - }, - "248": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type.address" - }, - "249": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type.datum" - }, - "250": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type" - }, - "251": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type.value" - }, - "252": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type.inline" - }, - "253": { - "sourceFileName": "src/common/types/Recipient.ts", - "qualifiedName": "__type.script" - }, - "254": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "Relay" - }, - "255": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type" - }, - "256": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.type" - }, - "257": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.IPV4" - }, - "258": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.IPV6" - }, - "259": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.port" - }, - "260": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type" - }, - "261": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.type" - }, - "262": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.domainName" - }, - "263": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.port" - }, - "264": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type" - }, - "265": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.type" - }, - "266": { - "sourceFileName": "src/common/types/Relay.ts", - "qualifiedName": "__type.domainName" - }, - "267": { - "sourceFileName": "src/common/types/Token.ts", - "qualifiedName": "Token" - }, - "268": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "TransactionInfo" - }, - "269": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type" - }, - "270": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.index" - }, - "271": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.block" - }, - "272": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.hash" - }, - "273": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.slot" - }, - "274": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.fees" - }, - "275": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.size" - }, - "276": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.deposit" - }, - "277": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.invalidBefore" - }, - "278": { - "sourceFileName": "src/common/types/TransactionInfo.ts", - "qualifiedName": "__type.invalidAfter" - }, - "279": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "UTxO" - }, - "280": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type" - }, - "281": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.input" - }, - "282": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type" - }, - "283": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.outputIndex" - }, - "284": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.txHash" - }, - "285": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.output" - }, - "286": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type" - }, - "287": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.address" - }, - "288": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.amount" - }, - "289": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.dataHash" - }, - "290": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.plutusData" - }, - "291": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.scriptRef" - }, - "292": { - "sourceFileName": "src/common/types/UTxO.ts", - "qualifiedName": "__type.scriptHash" - }, - "293": { - "sourceFileName": "src/common/types/Wallet.ts", - "qualifiedName": "Wallet" - }, - "294": { - "sourceFileName": "src/common/types/Wallet.ts", - "qualifiedName": "__type" - }, - "295": { - "sourceFileName": "src/common/types/Wallet.ts", - "qualifiedName": "__type.name" - }, - "296": { - "sourceFileName": "src/common/types/Wallet.ts", - "qualifiedName": "__type.icon" - }, - "297": { - "sourceFileName": "src/common/types/Wallet.ts", - "qualifiedName": "__type.version" - }, - "298": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveDataHash" - }, - "299": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveDataHash" - }, - "300": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "data" - }, - "301": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveEpochNo" - }, - "302": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveEpochNo" - }, - "303": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "network" - }, - "304": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "milliseconds" - }, - "305": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveFingerprint" - }, - "306": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveFingerprint" - }, - "307": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "policyId" - }, - "308": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "assetName" - }, - "309": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveLanguageView" - }, - "310": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveLanguageView" - }, - "311": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "era" - }, - "312": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "version" - }, - "313": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptAddress" - }, - "314": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptAddress" - }, - "315": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "script" - }, - "316": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "networkId" - }, - "317": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptHash" - }, - "318": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptHash" - }, - "319": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "script" - }, - "320": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptHex" - }, - "321": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveNativeScriptHex" - }, - "322": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "script" - }, - "323": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePaymentKeyHash" - }, - "324": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePaymentKeyHash" - }, - "325": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "bech32" - }, - "326": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePlutusScriptAddress" - }, - "327": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePlutusScriptAddress" - }, - "328": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "script" - }, - "329": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "networkId" - }, - "330": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePlutusScriptHash" - }, - "331": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePlutusScriptHash" - }, - "332": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "bech32" - }, - "333": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePoolId" - }, - "334": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePoolId" - }, - "335": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "hash" - }, - "336": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePrivateKey" - }, - "337": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolvePrivateKey" - }, - "338": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "words" - }, - "339": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveScriptRef" - }, - "340": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveScriptRef" - }, - "341": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "script" - }, - "342": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveSlotNo" - }, - "343": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveSlotNo" - }, - "344": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "network" - }, - "345": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "milliseconds" - }, - "346": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveRewardAddress" - }, - "347": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveRewardAddress" - }, - "348": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "bech32" - }, - "349": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveStakeKeyHash" - }, - "350": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveStakeKeyHash" - }, - "351": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "bech32" - }, - "352": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveTxFees" - }, - "353": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveTxFees" - }, - "354": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "txSize" - }, - "355": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "minFeeA" - }, - "356": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "minFeeB" - }, - "357": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveTxHash" - }, - "358": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "resolveTxHash" - }, - "359": { - "sourceFileName": "src/common/utils/resolver.ts", - "qualifiedName": "txHex" - }, - "360": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "parseAssetUnit" - }, - "361": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "parseAssetUnit" - }, - "362": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "unit" - }, - "363": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "__object" - }, - "364": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "__object.policyId" - }, - "365": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "__object.assetName" - }, - "366": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "parseHttpError" - }, - "367": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "parseHttpError" - }, - "368": { - "sourceFileName": "src/common/utils/parser.ts", - "qualifiedName": "error" - }, - "369": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "keepRelevant" - }, - "370": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "keepRelevant" - }, - "371": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "requestedOutputSet" - }, - "372": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "initialUTxOSet" - }, - "373": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "minimumLovelaceRequired" - }, - "374": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "largestFirst" - }, - "375": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "largestFirst" - }, - "376": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "lovelace" - }, - "377": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "initialUTxOSet" - }, - "378": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "includeTxFees" - }, - "379": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "__3" - }, - "380": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "largestFirstMultiAsset" - }, - "381": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "largestFirstMultiAsset" - }, - "382": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "requestedOutputSet" - }, - "383": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "initialUTxOSet" - }, - "384": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "includeTxFees" - }, - "385": { - "sourceFileName": "src/core/CIP2.ts", - "qualifiedName": "parameters" - }, - "386": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider" - }, - "387": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.__constructor" - }, - "388": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider" - }, - "389": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "baseUrl" - }, - "390": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider" - }, - "391": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "projectId" - }, - "392": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "version" - }, - "393": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider._axiosInstance" - }, - "394": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAccountInfo" - }, - "395": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAccountInfo" - }, - "396": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "address" - }, - "397": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.resolveScriptRef" - }, - "398": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.resolveScriptRef" - }, - "399": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "scriptHash" - }, - "400": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.toUTxO" - }, - "401": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.toUTxO" - }, - "402": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "bfUTxO" - }, - "403": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "tx_hash" - }, - "404": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAddressUTxOs" - }, - "405": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAddressUTxOs" - }, - "406": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "address" - }, - "407": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "asset" - }, - "408": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAssetAddresses" - }, - "409": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAssetAddresses" - }, - "410": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "asset" - }, - "411": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type" - }, - "412": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type.address" - }, - "413": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type.quantity" - }, - "414": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAssetMetadata" - }, - "415": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchAssetMetadata" - }, - "416": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "asset" - }, - "417": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchBlockInfo" - }, - "418": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchBlockInfo" - }, - "419": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "hash" - }, - "420": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchCollectionAssets" - }, - "421": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchCollectionAssets" - }, - "422": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "policyId" - }, - "423": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "cursor" - }, - "424": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type" - }, - "425": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type.assets" - }, - "426": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type.next" - }, - "427": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchHandleAddress" - }, - "428": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchHandleAddress" - }, - "429": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "handle" - }, - "430": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchProtocolParameters" - }, - "431": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchProtocolParameters" - }, - "432": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "epoch" - }, - "433": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchTxInfo" - }, - "434": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchTxInfo" - }, - "435": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "hash" - }, - "436": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchUTxOs" - }, - "437": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchUTxOs" - }, - "438": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "hash" - }, - "439": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.onTxConfirmed" - }, - "440": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.onTxConfirmed" - }, - "441": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "txHash" - }, - "442": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "callback" - }, - "443": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type" - }, - "444": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "__type" - }, - "445": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "limit" - }, - "446": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.submitTx" - }, - "447": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.submitTx" - }, - "448": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "tx" - }, - "449": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchPlutusScriptCBOR" - }, - "450": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchPlutusScriptCBOR" - }, - "451": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "scriptHash" - }, - "452": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchNativeScriptJSON" - }, - "453": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "BlockfrostProvider.fetchNativeScriptJSON" - }, - "454": { - "sourceFileName": "src/providers/blockfrost.provider.ts", - "qualifiedName": "scriptHash" - }, - "455": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider" - }, - "456": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider.__constructor" - }, - "457": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider" - }, - "458": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "projectId" - }, - "459": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "projectSecret" - }, - "460": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "options" - }, - "461": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider._axiosInstance" - }, - "462": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider.uploadContent" - }, - "463": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "InfuraProvider.uploadContent" - }, - "464": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "content" - }, - "465": { - "sourceFileName": "src/providers/infura.provider.ts", - "qualifiedName": "recursive" - }, - "466": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider" - }, - "467": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.__constructor" - }, - "468": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider" - }, - "469": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "baseUrl" - }, - "470": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider" - }, - "471": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "network" - }, - "472": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "token" - }, - "473": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "version" - }, - "474": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider._axiosInstance" - }, - "475": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAccountInfo" - }, - "476": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAccountInfo" - }, - "477": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "address" - }, - "478": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAddressUTxOs" - }, - "479": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAddressUTxOs" - }, - "480": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "address" - }, - "481": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "asset" - }, - "482": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAssetAddresses" - }, - "483": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAssetAddresses" - }, - "484": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "asset" - }, - "485": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type" - }, - "486": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type.address" - }, - "487": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type.quantity" - }, - "488": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAssetMetadata" - }, - "489": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchAssetMetadata" - }, - "490": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "asset" - }, - "491": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchBlockInfo" - }, - "492": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchBlockInfo" - }, - "493": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "hash" - }, - "494": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchCollectionAssets" - }, - "495": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchCollectionAssets" - }, - "496": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "policyId" - }, - "497": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "cursor" - }, - "498": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type" - }, - "499": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type.assets" - }, - "500": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type.next" - }, - "501": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchHandleAddress" - }, - "502": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchHandleAddress" - }, - "503": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "handle" - }, - "504": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchProtocolParameters" - }, - "505": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchProtocolParameters" - }, - "506": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "epoch" - }, - "507": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchTxInfo" - }, - "508": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchTxInfo" - }, - "509": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "hash" - }, - "510": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchUTxOs" - }, - "511": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.fetchUTxOs" - }, - "512": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "hash" - }, - "513": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.onTxConfirmed" - }, - "514": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.onTxConfirmed" - }, - "515": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "txHash" - }, - "516": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "callback" - }, - "517": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type" - }, - "518": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "__type" - }, - "519": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "limit" - }, - "520": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.submitTx" - }, - "521": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.submitTx" - }, - "522": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "tx" - }, - "523": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.toUTxO" - }, - "524": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.toUTxO" - }, - "525": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "utxo" - }, - "526": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "address" - }, - "527": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.resolveScriptRef" - }, - "528": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "KoiosProvider.resolveScriptRef" - }, - "529": { - "sourceFileName": "src/providers/koios.provider.ts", - "qualifiedName": "kScriptRef" - }, - "530": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider" - }, - "531": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.__constructor" - }, - "532": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider" - }, - "533": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "baseUrl" - }, - "534": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider" - }, - "535": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "network" - }, - "536": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider._baseUrl" - }, - "537": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.evaluateTx" - }, - "538": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.evaluateTx" - }, - "539": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "tx" - }, - "540": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.onNextTx" - }, - "541": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.onNextTx" - }, - "542": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "callback" - }, - "543": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "__type" - }, - "544": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "__type" - }, - "545": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "tx" - }, - "546": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "__type" - }, - "547": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "__type" - }, - "548": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.submitTx" - }, - "549": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.submitTx" - }, - "550": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "tx" - }, - "551": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.open" - }, - "552": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.open" - }, - "553": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.send" - }, - "554": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "OgmiosProvider.send" - }, - "555": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "client" - }, - "556": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "methodname" - }, - "557": { - "sourceFileName": "src/providers/ogmios.provider.ts", - "qualifiedName": "args" - }, - "558": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroSupportedNetworks" - }, - "559": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroConfig" - }, - "560": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroConfig.network" - }, - "561": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroConfig.apiKey" - }, - "562": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroConfig.turboSubmit" - }, - "563": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider" - }, - "564": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.__constructor" - }, - "565": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider" - }, - "566": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__0" - }, - "567": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider._axiosInstance" - }, - "568": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider._amountsAsStrings" - }, - "569": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__object" - }, - "570": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__object.headers" - }, - "571": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__object" - }, - "572": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__object.amounts-as-strings" - }, - "573": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.submitUrl" - }, - "574": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.evaluateTx" - }, - "575": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.evaluateTx" - }, - "576": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "cbor" - }, - "577": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAccountInfo" - }, - "578": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAccountInfo" - }, - "579": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "address" - }, - "580": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAddressUTxOs" - }, - "581": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAddressUTxOs" - }, - "582": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "address" - }, - "583": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "asset" - }, - "584": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAssetAddresses" - }, - "585": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAssetAddresses" - }, - "586": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "asset" - }, - "587": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type" - }, - "588": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type.address" - }, - "589": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type.quantity" - }, - "590": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAssetMetadata" - }, - "591": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchAssetMetadata" - }, - "592": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "asset" - }, - "593": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchBlockInfo" - }, - "594": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchBlockInfo" - }, - "595": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "hash" - }, - "596": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchCollectionAssets" - }, - "597": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchCollectionAssets" - }, - "598": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "policyId" - }, - "599": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "cursor" - }, - "600": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type" - }, - "601": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type.assets" - }, - "602": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type.next" - }, - "603": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchHandleAddress" - }, - "604": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchHandleAddress" - }, - "605": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "handle" - }, - "606": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchProtocolParameters" - }, - "607": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchProtocolParameters" - }, - "608": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "epoch" - }, - "609": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchTxInfo" - }, - "610": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchTxInfo" - }, - "611": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "hash" - }, - "612": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchUTxOs" - }, - "613": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.fetchUTxOs" - }, - "614": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "hash" - }, - "615": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.onTxConfirmed" - }, - "616": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.onTxConfirmed" - }, - "617": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "txHash" - }, - "618": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "callback" - }, - "619": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type" - }, - "620": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "__type" - }, - "621": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "limit" - }, - "622": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.submitTx" - }, - "623": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.submitTx" - }, - "624": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "tx" - }, - "625": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.toUTxO" - }, - "626": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.toUTxO" - }, - "627": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "utxo" - }, - "628": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.resolveScript" - }, - "629": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "MaestroProvider.resolveScript" - }, - "630": { - "sourceFileName": "src/providers/maestro.provider.ts", - "qualifiedName": "utxo" - }, - "631": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider" - }, - "632": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.__constructor" - }, - "633": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider" - }, - "634": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "baseUrl" - }, - "635": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider._axiosInstance" - }, - "636": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAccountInfo" - }, - "637": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAccountInfo" - }, - "638": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "address" - }, - "639": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.resolveScriptRef" - }, - "640": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.resolveScriptRef" - }, - "641": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "scriptHash" - }, - "642": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.toUTxO" - }, - "643": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.toUTxO" - }, - "644": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "bfUTxO" - }, - "645": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "tx_hash" - }, - "646": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAddressUTxOs" - }, - "647": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAddressUTxOs" - }, - "648": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "address" - }, - "649": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "asset" - }, - "650": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAssetAddresses" - }, - "651": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAssetAddresses" - }, - "652": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "asset" - }, - "653": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type" - }, - "654": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type.address" - }, - "655": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type.quantity" - }, - "656": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAssetMetadata" - }, - "657": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchAssetMetadata" - }, - "658": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "asset" - }, - "659": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchBlockInfo" - }, - "660": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchBlockInfo" - }, - "661": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "hash" - }, - "662": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchCollectionAssets" - }, - "663": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchCollectionAssets" - }, - "664": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "policyId" - }, - "665": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "cursor" - }, - "666": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type" - }, - "667": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type.assets" - }, - "668": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type.next" - }, - "669": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchHandleAddress" - }, - "670": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchHandleAddress" - }, - "671": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "handle" - }, - "672": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchProtocolParameters" - }, - "673": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchProtocolParameters" - }, - "674": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "epoch" - }, - "675": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchTxInfo" - }, - "676": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchTxInfo" - }, - "677": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "hash" - }, - "678": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchUTxOs" - }, - "679": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchUTxOs" - }, - "680": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "hash" - }, - "681": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.onTxConfirmed" - }, - "682": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.onTxConfirmed" - }, - "683": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "txHash" - }, - "684": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "callback" - }, - "685": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type" - }, - "686": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "__type" - }, - "687": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "limit" - }, - "688": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.submitTx" - }, - "689": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.submitTx" - }, - "690": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "txHex" - }, - "691": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchPlutusScriptCBOR" - }, - "692": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchPlutusScriptCBOR" - }, - "693": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "scriptHash" - }, - "694": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchNativeScriptJSON" - }, - "695": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "YaciProvider.fetchNativeScriptJSON" - }, - "696": { - "sourceFileName": "src/providers/yaci.provider.ts", - "qualifiedName": "scriptHash" - }, - "697": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript" - }, - "698": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withOneSignature" - }, - "699": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withOneSignature" - }, - "700": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "address" - }, - "701": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAtLeastNSignatures" - }, - "702": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAtLeastNSignatures" - }, - "703": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "addresses" - }, - "704": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "minimumRequired" - }, - "705": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAnySignature" - }, - "706": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAnySignature" - }, - "707": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "addresses" - }, - "708": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAllSignatures" - }, - "709": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.withAllSignatures" - }, - "710": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "addresses" - }, - "711": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.fromNativeScript" - }, - "712": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "ForgeScript.fromNativeScript" - }, - "713": { - "sourceFileName": "src/scripts/forge.script.ts", - "qualifiedName": "script" - }, - "716": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction" - }, - "717": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.attachMetadata" - }, - "718": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.attachMetadata" - }, - "719": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTx" - }, - "720": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTxMetadata" - }, - "721": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "era" - }, - "722": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.deattachMetadata" - }, - "723": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.deattachMetadata" - }, - "724": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTx" - }, - "725": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.maskMetadata" - }, - "726": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.maskMetadata" - }, - "727": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTx" - }, - "728": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "era" - }, - "729": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.readMetadata" - }, - "730": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.readMetadata" - }, - "731": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTx" - }, - "732": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.writeMetadata" - }, - "733": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.writeMetadata" - }, - "734": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTx" - }, - "735": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "cborTxMetadata" - }, - "736": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "era" - }, - "737": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.__constructor" - }, - "738": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction" - }, - "739": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "options" - }, - "740": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._changeAddress" - }, - "741": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._txOutputs" - }, - "742": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._recipients" - }, - "743": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._totalBurns" - }, - "744": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._totalMints" - }, - "745": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._era" - }, - "746": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._initiator" - }, - "747": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._mintBuilder" - }, - "748": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._protocolParameters" - }, - "749": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._txBuilder" - }, - "750": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._txCertificates" - }, - "751": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._txInputsBuilder" - }, - "752": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction._txWithdrawals" - }, - "753": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.size" - }, - "754": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.size" - }, - "755": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.build" - }, - "756": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.build" - }, - "757": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.burnAsset" - }, - "758": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.burnAsset" - }, - "759": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "forgeScript" - }, - "760": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "asset" - }, - "761": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "redeemer" - }, - "762": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.delegateStake" - }, - "763": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.delegateStake" - }, - "764": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "rewardAddress" - }, - "765": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "poolId" - }, - "766": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.deregisterStake" - }, - "767": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.deregisterStake" - }, - "768": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "rewardAddress" - }, - "769": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.mintAsset" - }, - "770": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.mintAsset" - }, - "771": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "forgeScript" - }, - "772": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "mint" - }, - "773": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "redeemer" - }, - "774": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.redeemValue" - }, - "775": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.redeemValue" - }, - "776": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "options" - }, - "777": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "__type" - }, - "778": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "__type.value" - }, - "779": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "__type.script" - }, - "780": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "__type.datum" - }, - "781": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "__type.redeemer" - }, - "782": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.registerStake" - }, - "783": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.registerStake" - }, - "784": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "rewardAddress" - }, - "785": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.registerPool" - }, - "786": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.registerPool" - }, - "787": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "params" - }, - "788": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.retirePool" - }, - "789": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.retirePool" - }, - "790": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "poolId" - }, - "791": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "epochNo" - }, - "792": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendAssets" - }, - "793": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendAssets" - }, - "794": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "recipient" - }, - "795": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "assets" - }, - "796": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendLovelace" - }, - "797": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendLovelace" - }, - "798": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "recipient" - }, - "799": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "lovelace" - }, - "800": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendToken" - }, - "801": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendToken" - }, - "802": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "recipient" - }, - "803": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "ticker" - }, - "804": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "amount" - }, - "805": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendValue" - }, - "806": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.sendValue" - }, - "807": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "recipient" - }, - "808": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "value" - }, - "809": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setChangeAddress" - }, - "810": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setChangeAddress" - }, - "811": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "changeAddress" - }, - "812": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setCollateral" - }, - "813": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setCollateral" - }, - "814": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "collateral" - }, - "815": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setMetadata" - }, - "816": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setMetadata" - }, - "817": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "key" - }, - "818": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "value" - }, - "819": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setRequiredSigners" - }, - "820": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setRequiredSigners" - }, - "821": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "addresses" - }, - "822": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setNativeScriptInput" - }, - "823": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setNativeScriptInput" - }, - "824": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "script" - }, - "825": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "utxo" - }, - "826": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTimeToStart" - }, - "827": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTimeToStart" - }, - "828": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "slot" - }, - "829": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTimeToExpire" - }, - "830": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTimeToExpire" - }, - "831": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "slot" - }, - "832": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxInputs" - }, - "833": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxInputs" - }, - "834": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "inputs" - }, - "835": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxRefInputs" - }, - "836": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxRefInputs" - }, - "837": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "inputs" - }, - "838": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.withdrawRewards" - }, - "839": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.withdrawRewards" - }, - "840": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "rewardAddress" - }, - "841": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "lovelace" - }, - "842": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addBurnInputsIfNeeded" - }, - "843": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addBurnInputsIfNeeded" - }, - "844": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addChangeAddress" - }, - "845": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addChangeAddress" - }, - "846": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addCollateralIfNeeded" - }, - "847": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addCollateralIfNeeded" - }, - "848": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addRequiredSignersIfNeeded" - }, - "849": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addRequiredSignersIfNeeded" - }, - "850": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addTxInputsAsNeeded" - }, - "851": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addTxInputsAsNeeded" - }, - "852": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.forgeAssetsIfNeeded" - }, - "853": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.forgeAssetsIfNeeded" - }, - "854": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.filterAvailableUTxOs" - }, - "855": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.filterAvailableUTxOs" - }, - "856": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "selectedUTxOs" - }, - "857": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addMintOutputs" - }, - "858": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.addMintOutputs" - }, - "859": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.notVisited" - }, - "860": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.notVisited" - }, - "861": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "checkpoint" - }, - "862": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxOutput" - }, - "863": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "Transaction.setTxOutput" - }, - "864": { - "sourceFileName": "src/transaction/transaction.service.ts", - "qualifiedName": "asset" - }, - "865": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder" - }, - "866": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.__constructor" - }, - "867": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder" - }, - "868": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "__0" - }, - "869": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder._fetcher" - }, - "870": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder._submitter" - }, - "871": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder._evaluator" - }, - "872": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.queriedTxHashes" - }, - "873": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.queriedUTxOs" - }, - "874": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "__type" - }, - "875": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "__type.__index" - }, - "877": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.complete" - }, - "878": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.complete" - }, - "879": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "customizedTx" - }, - "880": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.submitTx" - }, - "881": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.submitTx" - }, - "882": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "txHex" - }, - "883": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.getUTxOInfo" - }, - "884": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.getUTxOInfo" - }, - "885": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "txHash" - }, - "886": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.queryAllTxInfo" - }, - "887": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.queryAllTxInfo" - }, - "888": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "incompleteTxIns" - }, - "889": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.completeTxInformation" - }, - "890": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.completeTxInformation" - }, - "891": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "input" - }, - "892": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isInputComplete" - }, - "893": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isInputComplete" - }, - "894": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "txIn" - }, - "895": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isInputInfoComplete" - }, - "896": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isInputInfoComplete" - }, - "897": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "txIn" - }, - "898": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isRefScriptInfoComplete" - }, - "899": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "MeshTxBuilder.isRefScriptInfoComplete" - }, - "900": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilder.service.ts", - "qualifiedName": "scriptTxIn" - }, - "901": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txHex" - }, - "902": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txBuilder" - }, - "903": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txEvaluationMultiplier" - }, - "904": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.isHydra" - }, - "905": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.meshTxBuilderBody" - }, - "906": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintItem" - }, - "907": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInQueueItem" - }, - "908": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.collateralQueueItem" - }, - "909": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.refScriptTxInQueueItem" - }, - "910": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.reset" - }, - "911": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.reset" - }, - "912": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.emptyTxBuilderBody" - }, - "913": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.emptyTxBuilderBody" - }, - "914": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.completeSync" - }, - "915": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.completeSync" - }, - "916": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "customizedTx" - }, - "917": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.completeSigning" - }, - "918": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.completeSigning" - }, - "919": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txIn" - }, - "920": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txIn" - }, - "921": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txHash" - }, - "922": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txIndex" - }, - "923": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "amount" - }, - "924": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "address" - }, - "925": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInScript" - }, - "926": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInScript" - }, - "927": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "scriptCbor" - }, - "928": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "version" - }, - "929": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInDatumValue" - }, - "930": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInDatumValue" - }, - "931": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "datum" - }, - "932": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "933": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInInlineDatumPresent" - }, - "934": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInInlineDatumPresent" - }, - "935": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInRedeemerValue" - }, - "936": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInRedeemerValue" - }, - "937": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "redeemer" - }, - "938": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "exUnits" - }, - "939": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "__object" - }, - "940": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.mem" - }, - "941": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.steps" - }, - "942": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "943": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOut" - }, - "944": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOut" - }, - "945": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "address" - }, - "946": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "amount" - }, - "947": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutDatumHashValue" - }, - "948": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutDatumHashValue" - }, - "949": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "datum" - }, - "950": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "951": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutInlineDatumValue" - }, - "952": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutInlineDatumValue" - }, - "953": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "datum" - }, - "954": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "955": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutReferenceScript" - }, - "956": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txOutReferenceScript" - }, - "957": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "scriptCbor" - }, - "958": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "version" - }, - "959": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingPlutusScriptV2" - }, - "960": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingPlutusScriptV2" - }, - "961": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingTxInReference" - }, - "962": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingTxInReference" - }, - "963": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txHash" - }, - "964": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txIndex" - }, - "965": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "spendingScriptHash" - }, - "966": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "version" - }, - "967": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingReferenceTxInInlineDatumPresent" - }, - "968": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingReferenceTxInInlineDatumPresent" - }, - "969": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingReferenceTxInRedeemerValue" - }, - "970": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.spendingReferenceTxInRedeemerValue" - }, - "971": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "redeemer" - }, - "972": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "exUnits" - }, - "973": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "__object" - }, - "974": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.mem" - }, - "975": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.steps" - }, - "976": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "977": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.readOnlyTxInReference" - }, - "978": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.readOnlyTxInReference" - }, - "979": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txHash" - }, - "980": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txIndex" - }, - "981": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintPlutusScriptV2" - }, - "982": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintPlutusScriptV2" - }, - "983": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mint" - }, - "984": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mint" - }, - "985": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "quantity" - }, - "986": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "policy" - }, - "987": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "name" - }, - "988": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintingScript" - }, - "989": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintingScript" - }, - "990": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "scriptCBOR" - }, - "991": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "version" - }, - "992": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintTxInReference" - }, - "993": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintTxInReference" - }, - "994": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txHash" - }, - "995": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txIndex" - }, - "996": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "version" - }, - "997": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintReferenceTxInRedeemerValue" - }, - "998": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintReferenceTxInRedeemerValue" - }, - "999": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "redeemer" - }, - "1000": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "exUnits" - }, - "1001": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "__object" - }, - "1002": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.mem" - }, - "1003": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.steps" - }, - "1004": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "1005": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintRedeemerValue" - }, - "1006": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.mintRedeemerValue" - }, - "1007": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "redeemer" - }, - "1008": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "exUnits" - }, - "1009": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "__object" - }, - "1010": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.mem" - }, - "1011": { - "sourceFileName": "src/common/types/Action.ts", - "qualifiedName": "__type.steps" - }, - "1012": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "type" - }, - "1013": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.requiredSignerHash" - }, - "1014": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.requiredSignerHash" - }, - "1015": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "pubKeyHash" - }, - "1016": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInCollateral" - }, - "1017": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.txInCollateral" - }, - "1018": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txHash" - }, - "1019": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txIndex" - }, - "1020": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "amount" - }, - "1021": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "address" - }, - "1022": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.registerPoolCertificate" - }, - "1023": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.registerPoolCertificate" - }, - "1024": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "poolParams" - }, - "1025": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.registerStakeCertificate" - }, - "1026": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.registerStakeCertificate" - }, - "1027": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "stakeKeyHash" - }, - "1028": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.delegateStakeCertificate" - }, - "1029": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.delegateStakeCertificate" - }, - "1030": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "stakeKeyHash" - }, - "1031": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "poolId" - }, - "1032": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.deregisterStakeCertificate" - }, - "1033": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.deregisterStakeCertificate" - }, - "1034": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "stakeKeyHash" - }, - "1035": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.retirePoolCertificate" - }, - "1036": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.retirePoolCertificate" - }, - "1037": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "poolId" - }, - "1038": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "epoch" - }, - "1039": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.changeAddress" - }, - "1040": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.changeAddress" - }, - "1041": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "addr" - }, - "1042": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.invalidBefore" - }, - "1043": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.invalidBefore" - }, - "1044": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "slot" - }, - "1045": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.invalidHereafter" - }, - "1046": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.invalidHereafter" - }, - "1047": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "slot" - }, - "1048": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.metadataValue" - }, - "1049": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.metadataValue" - }, - "1050": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "T" - }, - "1051": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "tag" - }, - "1052": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "metadata" - }, - "1053": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.protocolParams" - }, - "1054": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.protocolParams" - }, - "1055": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "params" - }, - "1056": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.signingKey" - }, - "1057": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.signingKey" - }, - "1058": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "skeyHex" - }, - "1059": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.selectUtxosFrom" - }, - "1060": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.selectUtxosFrom" - }, - "1061": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "extraInputs" - }, - "1062": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "threshold" - }, - "1063": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.removeDuplicateInputs" - }, - "1064": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.removeDuplicateInputs" - }, - "1065": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addAllMints" - }, - "1066": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addAllMints" - }, - "1067": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "mints" - }, - "1068": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.queueAllLastItem" - }, - "1069": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.queueAllLastItem" - }, - "1070": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addAllCertificates" - }, - "1071": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addAllCertificates" - }, - "1072": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "allCertificates" - }, - "1073": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addCostModels" - }, - "1074": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.addCostModels" - }, - "1075": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.updateRedeemer" - }, - "1076": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.updateRedeemer" - }, - "1077": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "meshTxBuilderBody" - }, - "1078": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "txEvaluation" - }, - "1079": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.castRawDataToJsonString" - }, - "1080": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.castRawDataToJsonString" - }, - "1081": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "rawData" - }, - "1082": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.castDataToPlutusData" - }, - "1083": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "MeshTxBuilderCore.castDataToPlutusData" - }, - "1084": { - "sourceFileName": "src/transaction/meshTxBuilder/meshTxBuilderCore.ts", - "qualifiedName": "__0" - }, - "1085": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "MeshTxBuilderBody" - }, - "1086": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1087": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.inputs" - }, - "1088": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.outputs" - }, - "1089": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.extraInputs" - }, - "1090": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.selectionThreshold" - }, - "1091": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.collaterals" - }, - "1092": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.requiredSignatures" - }, - "1093": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.referenceInputs" - }, - "1094": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.mints" - }, - "1095": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.changeAddress" - }, - "1096": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.metadata" - }, - "1097": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.validityRange" - }, - "1098": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.certificates" - }, - "1099": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.signingKey" - }, - "1100": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "TxIn" - }, - "1101": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "PubKeyTxIn" - }, - "1102": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1103": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1104": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIn" - }, - "1105": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "TxInParameter" - }, - "1106": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1107": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1108": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1109": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.amount" - }, - "1110": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.address" - }, - "1111": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "SimpleScriptTxIn" - }, - "1112": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1113": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1114": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIn" - }, - "1115": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.simpleScriptTxIn" - }, - "1116": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "SimpleScriptTxInParameter" - }, - "1117": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1118": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.scriptSource" - }, - "1119": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1120": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1121": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.script" - }, - "1122": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1123": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1124": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txInInfo" - }, - "1125": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "SimpleScriptSourceInfo" - }, - "1126": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1127": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1128": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1129": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "ScriptTxIn" - }, - "1130": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1131": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1132": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIn" - }, - "1133": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.scriptTxIn" - }, - "1134": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "ScriptTxInParameter" - }, - "1135": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1136": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.scriptSource" - }, - "1137": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1138": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1139": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.script" - }, - "1140": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1141": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1142": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txInInfo" - }, - "1143": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.datumSource" - }, - "1144": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1145": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1146": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.data" - }, - "1147": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1148": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1149": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1150": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1151": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.redeemer" - }, - "1152": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "ScriptSourceInfo" - }, - "1153": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1154": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1155": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1156": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.spendingScriptHash" - }, - "1157": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.version" - }, - "1158": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "RefTxIn" - }, - "1159": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1160": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1161": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1162": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "Output" - }, - "1163": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1164": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.address" - }, - "1165": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.amount" - }, - "1166": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.datum" - }, - "1167": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1168": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1169": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.data" - }, - "1170": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.referenceScript" - }, - "1171": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "MintItem" - }, - "1172": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1173": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1174": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.policyId" - }, - "1175": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.assetName" - }, - "1176": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.amount" - }, - "1177": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.redeemer" - }, - "1178": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.scriptSource" - }, - "1179": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1180": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1181": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.script" - }, - "1182": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1183": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1184": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txHash" - }, - "1185": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.txIndex" - }, - "1186": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.version" - }, - "1187": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "ValidityRange" - }, - "1188": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1189": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.invalidBefore" - }, - "1190": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.invalidHereafter" - }, - "1191": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "BuilderData" - }, - "1192": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1193": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1194": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.content" - }, - "1195": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1196": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1197": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.content" - }, - "1198": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1199": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1200": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.content" - }, - "1201": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "Redeemer" - }, - "1202": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1203": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.data" - }, - "1204": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.exUnits" - }, - "1205": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "Metadata" - }, - "1206": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1207": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.tag" - }, - "1208": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.metadata" - }, - "1209": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "Certificate" - }, - "1210": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1211": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1212": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.poolParams" - }, - "1213": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1214": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1215": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.stakeKeyHash" - }, - "1216": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1217": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1218": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.stakeKeyHash" - }, - "1219": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.poolId" - }, - "1220": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1221": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1222": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.stakeKeyHash" - }, - "1223": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type" - }, - "1224": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.type" - }, - "1225": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.poolId" - }, - "1226": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "__type.epoch" - }, - "1227": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "RequiredWith" - }, - "1228": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "T" - }, - "1229": { - "sourceFileName": "src/transaction/meshTxBuilder/type.ts", - "qualifiedName": "K" - }, - "1230": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWalletKeyType" - }, - "1231": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type" - }, - "1232": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.type" - }, - "1233": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.bech32" - }, - "1234": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type" - }, - "1235": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.type" - }, - "1236": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.payment" - }, - "1237": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.stake" - }, - "1238": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type" - }, - "1239": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.type" - }, - "1240": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.words" - }, - "1241": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "CreateAppWalletOptions" - }, - "1242": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type" - }, - "1243": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.networkId" - }, - "1244": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.fetcher" - }, - "1245": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.submitter" - }, - "1246": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "__type.key" - }, - "1247": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet" - }, - "1248": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.brew" - }, - "1249": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.brew" - }, - "1250": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "strength" - }, - "1251": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.__constructor" - }, - "1252": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet" - }, - "1253": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "options" - }, - "1254": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet._fetcher" - }, - "1255": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet._submitter" - }, - "1256": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet._wallet" - }, - "1257": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getBaseAddress" - }, - "1258": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getBaseAddress" - }, - "1259": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1260": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1261": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getPaymentAddress" - }, - "1262": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getPaymentAddress" - }, - "1263": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1264": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1265": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getRewardAddress" - }, - "1266": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getRewardAddress" - }, - "1267": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1268": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1269": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedAddress" - }, - "1270": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedAddress" - }, - "1271": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1272": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1273": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedCollateral" - }, - "1274": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedCollateral" - }, - "1275": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "_limit" - }, - "1276": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedUTxOs" - }, - "1277": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedUTxOs" - }, - "1278": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1279": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signData" - }, - "1280": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signData" - }, - "1281": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "address" - }, - "1282": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "payload" - }, - "1283": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1284": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1285": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTx" - }, - "1286": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTx" - }, - "1287": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "unsignedTx" - }, - "1288": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "partialSign" - }, - "1289": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1290": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1291": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTxSync" - }, - "1292": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTxSync" - }, - "1293": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "unsignedTx" - }, - "1294": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "partialSign" - }, - "1295": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "accountIndex" - }, - "1296": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "keyIndex" - }, - "1297": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTxs" - }, - "1298": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.signTxs" - }, - "1299": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "unsignedTxs" - }, - "1300": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "partialSign" - }, - "1301": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.submitTx" - }, - "1302": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.submitTx" - }, - "1303": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "tx" - }, - "1304": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUtxos" - }, - "1305": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUtxos" - }, - "1306": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getCollateral" - }, - "1307": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getCollateral" - }, - "1308": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedAddresses" - }, - "1309": { - "sourceFileName": "src/wallet/app.service.ts", - "qualifiedName": "AppWallet.getUsedAddresses" - }, - "1310": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet" - }, - "1311": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getInstalledWallets" - }, - "1312": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getInstalledWallets" - }, - "1313": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.enable" - }, - "1314": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.enable" - }, - "1315": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "walletName" - }, - "1316": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.resolveInstance" - }, - "1317": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.resolveInstance" - }, - "1318": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "walletName" - }, - "1319": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.__constructor" - }, - "1320": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet" - }, - "1321": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "_walletInstance" - }, - "1322": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "_walletName" - }, - "1323": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.walletInstance" - }, - "1324": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet._walletInstance" - }, - "1325": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet._walletName" - }, - "1326": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getBalance" - }, - "1327": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getBalance" - }, - "1328": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getChangeAddress" - }, - "1329": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getChangeAddress" - }, - "1330": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getCollateral" - }, - "1331": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getCollateral" - }, - "1332": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "limit" - }, - "1333": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getNetworkId" - }, - "1334": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getNetworkId" - }, - "1335": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getRewardAddresses" - }, - "1336": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getRewardAddresses" - }, - "1337": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUnusedAddresses" - }, - "1338": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUnusedAddresses" - }, - "1339": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedAddresses" - }, - "1340": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedAddresses" - }, - "1341": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUtxos" - }, - "1342": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUtxos" - }, - "1343": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "amount" - }, - "1344": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signData" - }, - "1345": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signData" - }, - "1346": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "address" - }, - "1347": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "payload" - }, - "1348": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signTx" - }, - "1349": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signTx" - }, - "1350": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "unsignedTx" - }, - "1351": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "partialSign" - }, - "1352": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signTxs" - }, - "1353": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.signTxs" - }, - "1354": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "unsignedTxs" - }, - "1355": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "partialSign" - }, - "1356": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.submitTx" - }, - "1357": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.submitTx" - }, - "1358": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "tx" - }, - "1359": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedAddress" - }, - "1360": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedAddress" - }, - "1361": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedCollateral" - }, - "1362": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedCollateral" - }, - "1363": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "limit" - }, - "1364": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedUTxOs" - }, - "1365": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getUsedUTxOs" - }, - "1366": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "amount" - }, - "1367": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getAssets" - }, - "1368": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getAssets" - }, - "1369": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getLovelace" - }, - "1370": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getLovelace" - }, - "1371": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getPolicyIdAssets" - }, - "1372": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getPolicyIdAssets" - }, - "1373": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "policyId" - }, - "1374": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getPolicyIds" - }, - "1375": { - "sourceFileName": "src/wallet/browser.service.ts", - "qualifiedName": "BrowserWallet.getPolicyIds" - }, - "1376": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet" - }, - "1377": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptMnemonic" - }, - "1378": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptMnemonic" - }, - "1379": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "words" - }, - "1380": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1381": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptPrivateKey" - }, - "1382": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptPrivateKey" - }, - "1383": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "bech32" - }, - "1384": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1385": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptSigningKeys" - }, - "1386": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encryptSigningKeys" - }, - "1387": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "cborPaymentKey" - }, - "1388": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "cborStakeKey" - }, - "1389": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1390": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.generateMnemonic" - }, - "1391": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.generateMnemonic" - }, - "1392": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "strength" - }, - "1393": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.decrypt" - }, - "1394": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.decrypt" - }, - "1395": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "data" - }, - "1396": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1397": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encrypt" - }, - "1398": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.encrypt" - }, - "1399": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "data" - }, - "1400": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1401": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveAddress" - }, - "1402": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveAddress" - }, - "1403": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "networkId" - }, - "1404": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "bech32" - }, - "1405": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "payment" - }, - "1406": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "stake" - }, - "1407": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveKeys" - }, - "1408": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveKeys" - }, - "1409": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1410": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1411": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1412": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "encryptedSecret" - }, - "1413": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "__type" - }, - "1414": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "__type.paymentKey" - }, - "1415": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "__type.stakeKey" - }, - "1416": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveSigners" - }, - "1417": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.resolveSigners" - }, - "1418": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "cborTx" - }, - "1419": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "utxos" - }, - "1420": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "paymentKeyHash" - }, - "1421": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.__constructor" - }, - "1422": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet" - }, - "1423": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "_networkId" - }, - "1424": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "_encryptedSecret" - }, - "1425": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet._networkId" - }, - "1426": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet._encryptedSecret" - }, - "1427": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.getAccount" - }, - "1428": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.getAccount" - }, - "1429": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1430": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1431": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1432": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.signData" - }, - "1433": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.signData" - }, - "1434": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1435": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1436": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "address" - }, - "1437": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "payload" - }, - "1438": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1439": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.signTx" - }, - "1440": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.signTx" - }, - "1441": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1442": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1443": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "utxos" - }, - "1444": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "unsignedTx" - }, - "1445": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "partialSign" - }, - "1446": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1447": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.addPaymentKey" - }, - "1448": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.addPaymentKey" - }, - "1449": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1450": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1451": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "unsignedTx" - }, - "1452": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "signatures" - }, - "1453": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1454": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.accountContext" - }, - "1455": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "EmbeddedWallet.accountContext" - }, - "1456": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "T" - }, - "1457": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "accountIndex" - }, - "1458": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "keyIndex" - }, - "1459": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "password" - }, - "1460": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "callback" - }, - "1461": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "__type" - }, - "1462": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "__type" - }, - "1463": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "paymentKey" - }, - "1464": { - "sourceFileName": "src/wallet/embedded.service.ts", - "qualifiedName": "stakeKey" - }, - "1465": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "CreateMeshWalletOptions" - }, - "1466": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type" - }, - "1467": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.networkId" - }, - "1468": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.fetcher" - }, - "1469": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.submitter" - }, - "1470": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.key" - }, - "1471": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type" - }, - "1472": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.type" - }, - "1473": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.bech32" - }, - "1474": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type" - }, - "1475": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.type" - }, - "1476": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.payment" - }, - "1477": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.stake" - }, - "1478": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type" - }, - "1479": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.type" - }, - "1480": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "__type.words" - }, - "1481": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet" - }, - "1482": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.brew" - }, - "1483": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.brew" - }, - "1484": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "privateKey" - }, - "1485": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "strength" - }, - "1486": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.__constructor" - }, - "1487": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet" - }, - "1488": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "options" - }, - "1489": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet._wallet" - }, - "1490": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet._network" - }, - "1491": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getBalance" - }, - "1492": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getBalance" - }, - "1493": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getChangeAddress" - }, - "1494": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getChangeAddress" - }, - "1495": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getCollateral" - }, - "1496": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getCollateral" - }, - "1497": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getNetworkId" - }, - "1498": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getNetworkId" - }, - "1499": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getRewardAddresses" - }, - "1500": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getRewardAddresses" - }, - "1501": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUnusedAddresses" - }, - "1502": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUnusedAddresses" - }, - "1503": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedAddresses" - }, - "1504": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedAddresses" - }, - "1505": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUtxos" - }, - "1506": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUtxos" - }, - "1507": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signData" - }, - "1508": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signData" - }, - "1509": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "payload" - }, - "1510": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signTx" - }, - "1511": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signTx" - }, - "1512": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "unsignedTx" - }, - "1513": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "partialSign" - }, - "1514": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signTxs" - }, - "1515": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.signTxs" - }, - "1516": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "unsignedTxs" - }, - "1517": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "partialSign" - }, - "1518": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.submitTx" - }, - "1519": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.submitTx" - }, - "1520": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "tx" - }, - "1521": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedAddress" - }, - "1522": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedAddress" - }, - "1523": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedCollateral" - }, - "1524": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedCollateral" - }, - "1525": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedUTxOs" - }, - "1526": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getUsedUTxOs" - }, - "1527": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getAssets" - }, - "1528": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getAssets" - }, - "1529": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getLovelace" - }, - "1530": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getLovelace" - }, - "1531": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getPolicyIdAssets" - }, - "1532": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getPolicyIdAssets" - }, - "1533": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "policyId" - }, - "1534": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getPolicyIds" - }, - "1535": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.getPolicyIds" - }, - "1536": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.createCollateral" - }, - "1537": { - "sourceFileName": "src/wallet/mesh.service.ts", - "qualifiedName": "MeshWallet.createCollateral" - } - } -} \ No newline at end of file diff --git a/apps/mesh-docs/src/data/get-children-by-id.ts b/apps/mesh-docs/src/data/get-children-by-id.ts deleted file mode 100644 index 289aefd57..000000000 --- a/apps/mesh-docs/src/data/get-children-by-id.ts +++ /dev/null @@ -1,21 +0,0 @@ -import data from './api.json'; -import { findObjectInArray } from './utils'; - -export default function getChildrenById(id: number) { - const child = findObjectInArray({ - array: data.children, - key: 'id', - value: id, - }); - if (child) { - if (child.kind) { - if (child.kind == 128) child.kind = 'Class'; - // if(child.kind == 256) child.kind = 'Interface'; - // if(child.kind == 512) child.kind = 'Constructor'; - // if(child.kind == 1024) child.kind = ''; - // if(child.kind == 2048) child.kind = 'Function'; - if (child.kind == 2097152) child.kind = 'Type'; - } - } - return child; -} diff --git a/apps/mesh-docs/src/data/get-class-children.ts b/apps/mesh-docs/src/data/get-class-children.ts deleted file mode 100644 index d46821e50..000000000 --- a/apps/mesh-docs/src/data/get-class-children.ts +++ /dev/null @@ -1,14 +0,0 @@ -import getClass from './get-class'; -import { findObjectInArray } from './utils'; - -export default function getClassChildren(name: string, id: number) { - const thisClass = getClass(name); - - const children = findObjectInArray({ - array: thisClass.children, - key: 'id', - value: id, - }); - - return children; -} diff --git a/apps/mesh-docs/src/data/get-class-groups.ts b/apps/mesh-docs/src/data/get-class-groups.ts deleted file mode 100644 index 03ee9965a..000000000 --- a/apps/mesh-docs/src/data/get-class-groups.ts +++ /dev/null @@ -1,27 +0,0 @@ -import getClass from './get-class'; -import { findObjectInArray } from './utils'; - -export default function getClassGroups(name) { - const thisClass = getClass(name); - - const groups = thisClass.groups.map((group) => { - return { - title: group.title, - children: group.children - .map((id) => { - return findObjectInArray({ - array: thisClass.children, - key: 'id', - value: id, - }); - }) - .filter((child) => { - if (child.flags.isPrivate == true || child.flags.isProtected == true) - return false; - return true; - }), - }; - }); - - return groups; -} diff --git a/apps/mesh-docs/src/data/get-class.ts b/apps/mesh-docs/src/data/get-class.ts deleted file mode 100644 index 324e1ec65..000000000 --- a/apps/mesh-docs/src/data/get-class.ts +++ /dev/null @@ -1,14 +0,0 @@ -import getClasses from './get-classes'; -import { findObjectInArray } from './utils'; - -export default function getClass(name) { - const classes = getClasses(); - - const meshClass = findObjectInArray({ - array: classes, - key: 'name', - value: name, - }); - - return meshClass; -} diff --git a/apps/mesh-docs/src/data/get-classes.ts b/apps/mesh-docs/src/data/get-classes.ts deleted file mode 100644 index fc1729da1..000000000 --- a/apps/mesh-docs/src/data/get-classes.ts +++ /dev/null @@ -1,21 +0,0 @@ -import data from './api.json'; -import { findObjectInArray } from './utils'; - -export default function getClasses() { - const groupClasses = findObjectInArray({ - array: data.groups, - key: 'title', - value: 'Classes', - }); - - const classes = groupClasses.children.map((child: any) => { - const classData = findObjectInArray({ - array: data.children, - key: 'id', - value: child, - }); - return classData; - }); - - return classes; -} diff --git a/apps/mesh-docs/src/data/get-function.ts b/apps/mesh-docs/src/data/get-function.ts deleted file mode 100644 index 8b4c5191f..000000000 --- a/apps/mesh-docs/src/data/get-function.ts +++ /dev/null @@ -1,12 +0,0 @@ -import getFunctions from './get-functions'; -import { findObjectInArray } from './utils'; - -export default function getFunction(name: string) { - const functions = getFunctions(); - - return findObjectInArray({ - array: functions, - key: 'name', - value: name, - }); -} diff --git a/apps/mesh-docs/src/data/get-functions.ts b/apps/mesh-docs/src/data/get-functions.ts deleted file mode 100644 index 261adf55b..000000000 --- a/apps/mesh-docs/src/data/get-functions.ts +++ /dev/null @@ -1,21 +0,0 @@ -import data from './api.json'; -import { findObjectInArray } from './utils'; - -export default function getFunctions() { - const group = findObjectInArray({ - array: data.groups, - key: 'title', - value: 'Functions', - }); - - const classes = group.children.map((child: any) => { - const classData = findObjectInArray({ - array: data.children, - key: 'id', - value: child, - }); - return classData; - }); - - return classes; -} diff --git a/apps/mesh-docs/src/data/get-interface-groups.ts b/apps/mesh-docs/src/data/get-interface-groups.ts deleted file mode 100644 index 54bcac2aa..000000000 --- a/apps/mesh-docs/src/data/get-interface-groups.ts +++ /dev/null @@ -1,27 +0,0 @@ -import getInterface from './get-interface'; -import { findObjectInArray } from './utils'; - -export default function getInterfaceGroups(name: string) { - const thisInterface = getInterface(name); - - const groups = thisInterface.groups.map((group: any) => { - return { - title: group.title, - children: group.children - .map((id: number) => { - return findObjectInArray({ - array: thisInterface.children, - key: 'id', - value: id, - }); - }) - .filter((child: any) => { - if (child.flags.isPrivate == true || child.flags.isProtected == true) - return false; - return true; - }), - }; - }); - - return groups; -} diff --git a/apps/mesh-docs/src/data/get-interface.ts b/apps/mesh-docs/src/data/get-interface.ts deleted file mode 100644 index 27e0e0920..000000000 --- a/apps/mesh-docs/src/data/get-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -import getInterfaces from './get-interfaces'; -import { findObjectInArray } from './utils'; - -export default function getInterface(name: string) { - const interfaces = getInterfaces(); - - return findObjectInArray({ - array: interfaces, - key: 'name', - value: name, - }); -} diff --git a/apps/mesh-docs/src/data/get-interfaces.ts b/apps/mesh-docs/src/data/get-interfaces.ts deleted file mode 100644 index 612ac7ad8..000000000 --- a/apps/mesh-docs/src/data/get-interfaces.ts +++ /dev/null @@ -1,21 +0,0 @@ -import data from './api.json'; -import { findObjectInArray } from './utils'; - -export default function getInterfaces() { - const group = findObjectInArray({ - array: data.groups, - key: 'title', - value: 'Interfaces', - }); - - const classes = group.children.map((child: any) => { - const classData = findObjectInArray({ - array: data.children, - key: 'id', - value: child, - }); - return classData; - }); - - return classes; -} diff --git a/apps/mesh-docs/src/data/get-type.ts b/apps/mesh-docs/src/data/get-type.ts deleted file mode 100644 index bb13c97bc..000000000 --- a/apps/mesh-docs/src/data/get-type.ts +++ /dev/null @@ -1,12 +0,0 @@ -import getTypes from './get-types'; -import { findObjectInArray } from './utils'; - -export default function getType(name: string) { - const types = getTypes(); - - return findObjectInArray({ - array: types, - key: 'name', - value: name, - }); -} diff --git a/apps/mesh-docs/src/data/get-types.ts b/apps/mesh-docs/src/data/get-types.ts deleted file mode 100644 index 29b404cab..000000000 --- a/apps/mesh-docs/src/data/get-types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import data from './api.json'; -import { findObjectInArray } from './utils'; - -export default function getTypes() { - const group = findObjectInArray({ - array: data.groups, - key: 'title', - value: 'Type Aliases', - }); - - const classes = group.children.map((child: any) => { - const classData = findObjectInArray({ - array: data.children, - key: 'id', - value: child, - }); - return classData; - }); - - return classes; -} diff --git a/apps/mesh-docs/tsconfig.json b/apps/mesh-docs/tsconfig.json deleted file mode 100644 index e5d5036f9..000000000 --- a/apps/mesh-docs/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - }, - "noImplicitAny": false - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/apps/mesh-web/.eslintrc.json b/apps/mesh-web/.eslintrc.json deleted file mode 100644 index 82bf0654a..000000000 --- a/apps/mesh-web/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "next/core-web-vitals", - "react/no-unescaped-entities": 0 -} diff --git a/apps/mesh-web/README.md b/apps/mesh-web/README.md deleted file mode 100644 index 19060d1ad..000000000 --- a/apps/mesh-web/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Mesh Playground - -## How to start the Mesh Playground on localhost - -From the root folder... - -#### 1. Setup -Run: -```sh -npm install -``` - -#### 2. Start module building -Run: -```sh -npm run start:module -``` - -#### 3. Start Playground -Open a new Terminal and: -```sh -npm run start:demo -``` -and visit [http://localhost:3000/](http://localhost:3000/) diff --git a/apps/mesh-web/components/common/blockchainProvider.tsx b/apps/mesh-web/components/common/blockchainProvider.tsx deleted file mode 100644 index a4465408d..000000000 --- a/apps/mesh-web/components/common/blockchainProvider.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import ButtonGroup from '../ui/buttongroup'; -import Codeblock from '../ui/codeblock'; -import { useState } from 'react'; - -export default function BlockchainProviderCodeSnippet() { - const [blockchainProvider, setBlockchainProvider] = useState('blockfrost'); - - let codeBF = `import { BlockfrostProvider } from '@meshsdk/core';\n\n`; - codeBF += `const blockchainProvider = new BlockfrostProvider('');`; - - let codeKoios = `import { KoiosProvider } from '@meshsdk/core';\n\n`; - codeKoios += `const blockchainProvider = new KoiosProvider('', '');`; - - let codeTango = `import { TangoProvider } from '@meshsdk/core';\n\n`; - codeTango += `const blockchainProvider = new TangoProvider(\n`; - codeTango += ` '',\n`; - codeTango += ` ''\n`; - codeTango += ` ''\n`; - codeTango += `);`; - - let codeMaestro = `import { MaestroProvider } from '@meshsdk/core';\n\n`; - codeMaestro += `const MaestroProvider = new MaestroProvider({\n`; - codeMaestro += ` network: 'Preprod',\n`; - codeMaestro += ` apiKey: '', // Get yours by visiting https://docs.gomaestro.org/docs/Getting-started/Sign-up-login.\n`; - codeMaestro += ` turboSubmit: false // Read about paid turbo transaction submission feature at https://docs.gomaestro.org/docs/Dapp%20Platform/Turbo%20Transaction.\n`; - codeMaestro += `});\n`; - - let code = codeBF; - if (blockchainProvider == 'koios') { - code = codeKoios; - } - if (blockchainProvider == 'tango') { - code = codeTango; - } - if (blockchainProvider == 'maestro') { - code = codeMaestro; - } - - return ( - <> - setBlockchainProvider('maestro'), - }, - { - key: 'blockfrost', - label: 'Blockfrost', - onClick: () => setBlockchainProvider('blockfrost'), - }, - { - key: 'koios', - label: 'Koios', - onClick: () => setBlockchainProvider('koios'), - }, - ]} - currentSelected={blockchainProvider} - /> - - - ); -} diff --git a/apps/mesh-web/components/common/connectCipWallet.tsx b/apps/mesh-web/components/common/connectCipWallet.tsx deleted file mode 100644 index 4ed04507a..000000000 --- a/apps/mesh-web/components/common/connectCipWallet.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { CardanoWallet, useWalletList } from '@meshsdk/react'; - -export default function ConnectCipWallet() { - const wallets = useWalletList(); - const hasAvailableWallets = wallets.length > 0; - return ( - <>{hasAvailableWallets ? : <>No wallets installed} - ); -} diff --git a/apps/mesh-web/components/common/fetchSelectAssets.tsx b/apps/mesh-web/components/common/fetchSelectAssets.tsx deleted file mode 100644 index e5f523c55..000000000 --- a/apps/mesh-web/components/common/fetchSelectAssets.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import type { AssetExtended } from '@meshsdk/core'; -import { useEffect, useState } from 'react'; -import { useWallet } from '@meshsdk/react'; -import Button from '../ui/button'; -import { assetAsset, assetPolicyId } from '../../configs/demo'; - -export default function FetchSelectAssets({ - index, - selectedAssets, - selectAssetFn, -}) { - const { wallet, connected, connecting } = useWallet(); - const [loadingAssets, setLoadingAssets] = useState(false); - const [walletAssets, setWalletAssets] = useState([ - { - unit: assetAsset, - policyId: assetPolicyId, - assetName: 'MeshToken', - fingerprint: 'asset1vy4dlqfc42r49jtvz5v4ek3s7wz96s0azur5xx', - quantity: '10', - }, - { - unit: '8f78a4388b1a3e1a1435257e9356fa0c2cc0d3a5999d63b5886c964354657374746f6b656e', - policyId: '8f78a4388b1a3e1a1435257e9356fa0c2cc0d3a5999d63b5886c9643', - assetName: 'CardanoToken', - fingerprint: 'asset1mdkjgeufm9lk4yzszckq6r7t5p4vzhwz2dz90k', - quantity: '5', - }, - ]); - - useEffect(() => { - async function init() { - setLoadingAssets(true); - const assets = await wallet.getAssets(); - setWalletAssets(assets); - setLoadingAssets(false); - } - if (connected) { - init(); - } - }, [connected]); - - useEffect(() => { - if (connecting && !connected) { - setWalletAssets([]); - } - }, [connecting]); - - return ( - <> - - {loadingAssets &&
    Fetching assets...
    } -
    -
    - {walletAssets.map((asset, i) => { - return ( - - ); - })} -
    -
    - - ); -} diff --git a/apps/mesh-web/components/common/layout.tsx b/apps/mesh-web/components/common/layout.tsx deleted file mode 100644 index 0d4c28feb..000000000 --- a/apps/mesh-web/components/common/layout.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import CommonSidebar from './sidebar'; - -export default function CommonLayout({ children, sidebarItems }) { - return ( - <> -
    - -
    - {children} -
    -
    - - ); -} diff --git a/apps/mesh-web/components/common/mintMeshToken.tsx b/apps/mesh-web/components/common/mintMeshToken.tsx deleted file mode 100644 index 388d36c37..000000000 --- a/apps/mesh-web/components/common/mintMeshToken.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import Button from '../ui/button'; -import { CardanoWallet, useWallet } from '@meshsdk/react'; -import { useState } from 'react'; -import { - ForgeScript, - Transaction, - AppWallet, - BlockfrostProvider, -} from '@meshsdk/core'; -import type { AssetMetadata, Mint } from '@meshsdk/core'; -import { demoMnemonic } from '../../configs/demo'; -import RunDemoResult from './runDemoResult'; - -export default function MintMeshToken() { - const { connected, wallet } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - const [responseError, setResponseError] = useState(null); - - async function runMint() { - setLoading(true); - try { - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const mintingWallet = new AppWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'mnemonic', - words: demoMnemonic, - }, - }); - - const usedAddress = await wallet.getUsedAddresses(); - const address = usedAddress[0]; - const forgingScript = ForgeScript.withOneSignature( - mintingWallet.getPaymentAddress() - ); - - const tx = new Transaction({ initiator: wallet }); - - const assetMetadata: AssetMetadata = { - name: 'Mesh Token', - image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua', - mediaType: 'image/jpg', - description: 'This NFT was minted by Mesh (https://meshjs.dev/).', - }; - const asset: Mint = { - assetName: 'MeshToken', - assetQuantity: '1', - metadata: assetMetadata, - label: '721', - recipient: address, - }; - tx.mintAsset(forgingScript, asset); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx, true); - const signedTx2 = await mintingWallet.signTx(signedTx, true); - const txHash = await wallet.submitTx(signedTx2); - setResponse(txHash); - } catch (error) { - setResponseError(`${error}`); - } - setLoading(false); - } - - return ( - <> - {connected ? ( - <> - - {response !== null && ( - <> -

    Mesh token minted successful.

    - - - )} - - - ) : ( - - )} - - ); -} diff --git a/apps/mesh-web/components/common/runDemoButton.tsx b/apps/mesh-web/components/common/runDemoButton.tsx deleted file mode 100644 index dad2964ae..000000000 --- a/apps/mesh-web/components/common/runDemoButton.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { PlayIcon } from '@heroicons/react/24/solid'; -import Button from '../ui/button'; - -export default function RunDemoButton({ - runDemoFn, - loading, - response, - label = 'Run code snippet', - disabled = false, -}) { - return ( - - ); -} diff --git a/apps/mesh-web/components/common/runDemoResult.tsx b/apps/mesh-web/components/common/runDemoResult.tsx deleted file mode 100644 index d5d3871e2..000000000 --- a/apps/mesh-web/components/common/runDemoResult.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import Codeblock from '../ui/codeblock'; - -export default function RunDemoResult({ response, label = 'Result' }) { - return ( - <> - {response !== null && response !== undefined && ( - <> -

    - {label}: -

    - - - )} - - ); -} diff --git a/apps/mesh-web/components/common/section.tsx b/apps/mesh-web/components/common/section.tsx deleted file mode 100644 index 1b77f81ca..000000000 --- a/apps/mesh-web/components/common/section.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { LinkIcon } from '@heroicons/react/24/solid'; -import { Element } from 'react-scroll'; -import { useClipboard } from '../../hooks/useCopyClipboard'; -import { useRouter } from 'next/router'; -import { rootUrl } from '../../configs/site'; - -export default function Section({ - sidebarTo, - header, - contentFn, - isH3 = false, - badge = <>, -}) { - const { pathname } = useRouter(); - const { value, onCopy, hasCopied } = useClipboard( - `${rootUrl}${pathname}#${sidebarTo}` - ); - - return ( - - {isH3 ? ( -
    -

    - {header} - {badge && {badge}} -

    - -
    - ) : ( -
    -

    {header}

    - -
    - )} -
    -
    {contentFn}
    -
    -
    - ); -} diff --git a/apps/mesh-web/components/common/sectionTwoCol.tsx b/apps/mesh-web/components/common/sectionTwoCol.tsx deleted file mode 100644 index 8819b1f0e..000000000 --- a/apps/mesh-web/components/common/sectionTwoCol.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { LinkIcon } from '@heroicons/react/24/solid'; -import { Element } from 'react-scroll'; -import { useClipboard } from '../../hooks/useCopyClipboard'; -import { useRouter } from 'next/router'; -import { rootUrl } from '../../configs/site'; - -export default function SectionTwoCol({ - sidebarTo, - header, - leftFn, - rightFn, - isH3 = false, - badge = <>, -}) { - const { pathname } = useRouter(); - const { value, onCopy, hasCopied } = useClipboard( - `${rootUrl}${pathname}#${sidebarTo}` - ); - - return ( - - {isH3 ? ( -
    -

    - {header} - {badge && {badge}} -

    - -
    - ) : ( -
    -

    {header}

    - -
    - )} -
    -
    {leftFn}
    -
    {rightFn}
    -
    -
    - ); -} diff --git a/apps/mesh-web/components/common/showMoreDetails.tsx b/apps/mesh-web/components/common/showMoreDetails.tsx deleted file mode 100644 index 1f9775d80..000000000 --- a/apps/mesh-web/components/common/showMoreDetails.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { ChevronUpIcon, ChevronDownIcon } from '@heroicons/react/24/solid'; -import { useState } from 'react'; - -export default function ShowMoreDetails({ children, label = 'Show details' }) { - const [show, setShow] = useState(false); - return ( - <> -
    - -
    -
    -
    - {children} -
    -
    - - ); -} diff --git a/apps/mesh-web/components/common/sidebar.tsx b/apps/mesh-web/components/common/sidebar.tsx deleted file mode 100644 index 5a3452a82..000000000 --- a/apps/mesh-web/components/common/sidebar.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Link } from 'react-scroll'; - -export default function CommonSidebar({ sidebarItems }) { - return ( -
    -
    - -
    -
    - ); -} diff --git a/apps/mesh-web/components/courses/courseSidebar.tsx b/apps/mesh-web/components/courses/courseSidebar.tsx deleted file mode 100644 index b513b02ee..000000000 --- a/apps/mesh-web/components/courses/courseSidebar.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { ChevronDownIcon } from '@heroicons/react/24/solid'; -import Link from 'next/link'; -import { useEffect, useState } from 'react'; -import { useRouter } from 'next/router'; - -export default function CoursesSidebar({ root, menu }) { - return ( - - ); -} - -function MenuLink({ menuItem, root, key = 0, itemParent = undefined }) { - let style = - 'flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100 group dark:text-gray-200 dark:hover:bg-gray-700'; - if (itemParent) { - style = - 'flex items-center p-2 pl-11 text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700'; - } - style += ` cursor-pointer`; - - const router = useRouter(); - if (router.pathname.includes(menuItem.url)) { - style += ' bg-gray-100 dark:bg-gray-700'; - } - - let url = root; - if (itemParent !== undefined) { - // @ts-ignore - url += `/${itemParent.url}`; - } - url += `/${menuItem.url}`; - - return ( -
  • - -
    - {menuItem.label} -
    - -
  • - ); -} - -function MenuSubmenu({ menuItem, root }) { - const [showSubmenu, setShowSubmenu] = useState(false); - const router = useRouter(); - - useEffect(() => { - if (router.pathname.includes(menuItem.url)) { - setShowSubmenu(true); - } - }, []); - - return ( -
  • - -
      - {menuItem.children.map((item, i) => { - return MenuLink({ - menuItem: item, - root: root, - key: i, - itemParent: menuItem, - }); - })} -
    -
  • - ); -} diff --git a/apps/mesh-web/components/courses/layout.tsx b/apps/mesh-web/components/courses/layout.tsx deleted file mode 100644 index c737c499d..000000000 --- a/apps/mesh-web/components/courses/layout.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import Metatags from '../site/metatags'; - -export default function CourseLayout({ - children, - coursesSidebar, - title, - desc, - youtubeId, -}: { - children; - coursesSidebar; - title; - desc; - youtubeId?; -}) { - return ( - <> - -
    -
    {coursesSidebar}
    -
    -
    - {youtubeId && ( -
    -
    - -
    -
    - )} -
    -
    -
    -

    - {title} -

    -
    -

    {desc}

    - {children} -
    -
    -
    -
    -
    - - ); -} diff --git a/apps/mesh-web/components/pages/about/catalyst.tsx b/apps/mesh-web/components/pages/about/catalyst.tsx deleted file mode 100644 index 416ea6a87..000000000 --- a/apps/mesh-web/components/pages/about/catalyst.tsx +++ /dev/null @@ -1,224 +0,0 @@ -import Link from 'next/link'; - -export default function Catalyst() { - return ( - <> -
    -
    -
    -

    - Catalyst -

    -

    - Here are proposals that we have submitted to Project Catalyst and - its progress. -

    -
    - -
    -
    -
    -
    - - ); -} - -function ListOfProposals() { - return ( - <> - - - - - - - - - - - - ); -} - -function CardLink({ - title, - desc, - url, - completed, - tobecompleted, - fund, - status, -}) { - return ( -
    -
    - {title} -
    -
    - - {status} - - - {fund} - -
    -

    {desc}

    -
      - {completed.map((item, index) => ( -
    • -
      - - - -
      - {item} -
    • - ))} -
    -
      - {tobecompleted.map((item, index) => ( -
    • -
      - - - -
      - {item} -
    • - ))} -
    - {url && ( -
    - - - projectcatalyst.io - - -
    - )} -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/cips/index.tsx b/apps/mesh-web/components/pages/about/cips/index.tsx deleted file mode 100644 index cfccd3ea5..000000000 --- a/apps/mesh-web/components/pages/about/cips/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import List from './list'; - -export default function Cips() { - return ( - <> - - - ); -} diff --git a/apps/mesh-web/components/pages/about/cips/list.tsx b/apps/mesh-web/components/pages/about/cips/list.tsx deleted file mode 100644 index daab69076..000000000 --- a/apps/mesh-web/components/pages/about/cips/list.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import Link from 'next/link'; -import Codeblock from '../../../ui/codeblock'; - -export default function List() { - return ( -
    -
    -
    -

    - Cardano Improvement Proposals{' '} - {/* */} - Implemented - {/* */} -

    -

    - Mesh ensures your dApp adheres to the standards provided by the - Cardano Community. -

    -
    -
    - -

    - Adopted Coin Selection Strategies from Cardano - Serialization Lib into{' '} - Transaction. -

    - - } - /> - -

    - Use your wallet to sign message with{' '} - wallet.signData, see{' '} - App Wallet and{' '} - Browser Wallet. -

    - - } - /> - -

    - Get asset fingerprint with resolveFingerprint, - see Resolvers. -

    - - } - /> - -

    - Import AssetMetadata to adhere to the NFT - metadata standards, see{' '} - Transaction. -

    - - } - /> - -

    - Learn how to{' '} - - mint royalty token - - . -

    - - } - /> - -

    - Browser Wallet is - compatible with CIP-30 wallets. -

    - - } - /> - -

    - Transaction allow users - to reference datums when redeem from a V2 plutus script. -

    - - } - /> - -

    - Transaction allow users - to attach inline datums to transaction output. -

    - - } - /> - -

    - Transaction allow users - to reference a plutus script instead of suppling the whole - script as part of the transaction.. -

    - - } - /> - -

    - App Wallet follows{' '} - CIP-1852 for deriving Stake and Payment Keys. -

    - - } - /> -
    -
    -
    - ); -} - -function Card({ title, content }) { - return ( -
    -

    {title}

    -
    - {content} -
    -
    - ); -} - -{ - /* */ -} diff --git a/apps/mesh-web/components/pages/about/faq.tsx b/apps/mesh-web/components/pages/about/faq.tsx deleted file mode 100644 index 78d9d977f..000000000 --- a/apps/mesh-web/components/pages/about/faq.tsx +++ /dev/null @@ -1,287 +0,0 @@ -import Link from 'next/link'; - -export default function AboutFaq() { - return ( -
    -
    -
    -

    - Information and Common Questions -

    -

    - Ask us anything on our{' '} - - Discord server - -

    -
    - -
    -
    - -

    - The word " - - Mesh - - " is defined as:{' '} -

    -
      -
    • - - when different things or people mesh, they suit each - other or work well together - -
    • -
    • - - (of two or more things) to fit together or be suitable - for each other - -
    • -
    -

    - Like a well-woven fabric, Mesh connects business goals with - technology stacks. It enables developers to build - applications according to project requirements on the - blockchain. Mesh is filling the gap by making product - development accessible on Cardano. -

    -

    - Whether you're a new developer, startup, Web3 market leader, - or a large enterprise, Mesh makes Web3 development easy with - reliable, scalable, and well-engineered APIs & developer - tools. -

    - - } - /> - -

    - Building on Cardano is like the early days of the Internet, - where people are discussing the different protocols, like - and how to handle HTTPS and IP addresses. -

    -

    - During the early days of the World Wide Web, CERN{' '} - - put the web technology in the public domain - - , available with an open licence. Through these actions, - making the software required to run a web server freely - available, and open-source code library, the web was allowed - to flourish. -

    -

    - In the same way, providing Mesh and its technology, allowing - anyone to build, is key to widespread Cardano adoption. -

    - - } - /> -
    -
    - -

    - Yes, Mesh is open source, and we welcome all contributions. - Developers, businesses, and writers can contribute in - various ways. You can write, test, or review the codes; you - can create your project and design your product to use Mesh; - you can improve or write new documentation and guides to - help other builders; you can also provide feedback, ideas, - improvements, and feature requests. -

    -

    - Connect and chat with us at our{' '} - - Discord server - - . -

    - - } - /> - - -

    - If you get stuck, you can ask questions at{' '} - - cardano.stackexchange.com - {' '} - and tagged it with mesh. -

    -

    - You can also ask questions on{' '} - - Mesh's - - ,{' '} - - Gimbalabs' - {' '} - or{' '} - - IOG Technical Community's - {' '} - Discord servers. -

    - - } - /> -
    -
    - -

    - As Mesh is an open-source library, this SDK belongs to the - Cardano development community. We look forward to more - developers and writers joining us to develop this fantastic - tool further. The users of Cardano applications are also a - part of Mesh, as they make it possible for developers to - build, adapt and improve current and future applications. - Mesh SDK is started by{' '} - - Jingles - {' '} - and{' '} - - Abdelkrim - - . -

    - - } - /> - -

    - Mesh playground is an interactive tool which allows you to - explore Mesh's features. Most APIs are interactive, where - you can modify the inputs and see how to use the code in - your project. -

    -

    - This website is build with{' '} - - Next.js - {' '} - , powered by{' '} - - Vercel - {' '} - , and designed with{' '} - - Flowbite - - . If you wish to build a site like this, we have a{' '} - - guide - {' '} - for you to get started. -

    - - } - /> -
    -
    -
    -
    - ); -} - -function Item({ header, body }) { - return ( -
    -

    - {header} -

    -
    {body}
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/hero.tsx b/apps/mesh-web/components/pages/about/hero.tsx deleted file mode 100644 index 888e3f7ae..000000000 --- a/apps/mesh-web/components/pages/about/hero.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { ArrowRightIcon } from '@heroicons/react/24/solid'; -import Link from 'next/link'; - -export default function AboutHero() { - return ( -
    -
    -
    -

    - We advance Cardano's tech stack -

    -

    - Get started building blockchain applications with our - enterprise-ready, well engineered, and professionally designed SDK, - Mesh. With over 20+ components crafted ready for Vasil and many more - in the pipeline, building a Web 3.0 application has never been this - easy. -

    - {/* - Learn more about the plan - - */} -
    - {/*
    -
    -

    Version 1.3

    -

    We are now MeshJS

    - - NPM page - - -
    -
    -

    Starter templates

    -

    - Start your project by installing with CLI -

    - - - Learn more - - - -
    -
    -

    - React components and hooks -

    -

    - Everything you need to build web3 apps -

    - - - Learn more - - - -
    -
    -

    Version 1.0

    -

    - We released Mesh 1.0 on Sept 22, 2022 -

    - - NPM page - - -
    -
    */} -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/index.tsx b/apps/mesh-web/components/pages/about/index.tsx deleted file mode 100644 index 9c4e2746c..000000000 --- a/apps/mesh-web/components/pages/about/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import AboutFaq from './faq'; -import AboutHero from './hero'; - -export default function About() { - return ( - <> - - - - ); -} diff --git a/apps/mesh-web/components/pages/about/media.tsx b/apps/mesh-web/components/pages/about/media.tsx deleted file mode 100644 index e54438c18..000000000 --- a/apps/mesh-web/components/pages/about/media.tsx +++ /dev/null @@ -1,48 +0,0 @@ - -export default function Media() { - return ( - <> -
    -
    -
    -

    - Media Kit -

    -

    - Choose from these logo files. These resources exist to - help you use Mesh's assets. -

    -
    - - - - - - - - - - - - - -
    -
    -
    - -
    - - ); -} - -function Image({ img }) { - return ( - <> -
    - - {img} - -
    - - ); -} diff --git a/apps/mesh-web/components/pages/about/support/addBadge.tsx b/apps/mesh-web/components/pages/about/support/addBadge.tsx deleted file mode 100644 index a55aeddb8..000000000 --- a/apps/mesh-web/components/pages/about/support/addBadge.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import Codeblock from '../../../ui/codeblock'; - -export default function AddBadge() { - let code2 = `import { MeshBadge } from '@meshsdk/react';\n\n`; - code2 += `export default function Page() {\n`; - code2 += ` return (\n`; - code2 += ` <>\n`; - code2 += ` \n`; - code2 += ` \n`; - code2 += ` );\n`; - code2 += `}\n`; - - return ( -
    -
    - support -
    -

    - Add Mesh Badge in your Application -

    -

    - Add our beautiful Mesh Badge to give your users confidence knowing - that your application is running on top of a solid SDK. -

    - -
    -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/support/followTwitter.tsx b/apps/mesh-web/components/pages/about/support/followTwitter.tsx deleted file mode 100644 index 4368f68b6..000000000 --- a/apps/mesh-web/components/pages/about/support/followTwitter.tsx +++ /dev/null @@ -1,30 +0,0 @@ -export default function FollowTwitter() { - return ( -
    -
    -
    -

    - Follow us on Twitter -

    -

    - Follow us on Twitter so you get get updated with the latest - development! -

    - - Follow us on Twitter - -
    - support -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/support/index.tsx b/apps/mesh-web/components/pages/about/support/index.tsx deleted file mode 100644 index a2af12c43..000000000 --- a/apps/mesh-web/components/pages/about/support/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import AddBadge from './addBadge'; -import FollowTwitter from './followTwitter'; -import JoinDiscord from './joinDiscord'; -import SendAdaToSupport from './sendAdaToSupport'; -import StarRepo from './starRepo'; - -export default function SupportUs() { - return ( - <> -
    -
    -
    -

    - You can support Mesh! -

    -

    - Thank you for your interest in Mesh, we appreciate any kind of support! -
    - Here are some ways you can support us. -

    -
    -
    -
    - - - - - - - - ); -} diff --git a/apps/mesh-web/components/pages/about/support/joinDiscord.tsx b/apps/mesh-web/components/pages/about/support/joinDiscord.tsx deleted file mode 100644 index 4e5423b51..000000000 --- a/apps/mesh-web/components/pages/about/support/joinDiscord.tsx +++ /dev/null @@ -1,29 +0,0 @@ -export default function JoinDiscord() { - return ( -
    -
    -
    -

    - Join our Discord Server -

    -

    - Come and talk to us in our Discord server. -

    - - Join Mesh's Discord server - -
    - support -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/support/sendAdaToSupport.tsx b/apps/mesh-web/components/pages/about/support/sendAdaToSupport.tsx deleted file mode 100644 index e376e88f4..000000000 --- a/apps/mesh-web/components/pages/about/support/sendAdaToSupport.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { CardanoWallet, useWallet } from '@meshsdk/react'; -import { useState } from 'react'; -import Input from '../../../ui/input'; -import { Transaction } from '@meshsdk/core'; -import { createTransactionDonate } from '../../../../backend/support'; -import SvgSurprise from '../../../svgs/surpriseSvg'; - -export default function SendAdaToSupport() { - return ( -
    -
    - {/* support */} - -
    -

    - Support Financially -

    -

    - Your support for this open-source SDK will go a long way. So thank - you! -

    - -
    -
    -
    - ); -} - -function SendPayment() { - const [amount, setAmount] = useState(25); - const [done, setDone] = useState(false); - const { connected, wallet } = useWallet(); - const [loading, setLoading] = useState(false); - - async function makeTx() { - setLoading(true); - - // const tx = new Transaction({ initiator: wallet }).sendLovelace( - // process.env.NEXT_PUBLIC_DONATE_ADA_ADDRESS!, - // (amount * 1000000).toString() - // ); - // const unsignedTx = await tx.build(); - // const signedTx = await wallet.signTx(unsignedTx); - // const txHash = await wallet.submitTx(signedTx); - - const network = await wallet.getNetworkId(); - - if (network != 1) { - setLoading(false); - setDone(false); - return; - } - - const recipientAddress = await wallet.getChangeAddress(); - const utxos = await wallet.getUtxos(); - const { unsignedTx } = await createTransactionDonate( - recipientAddress, - amount, - utxos - ); - const signedTx = await wallet.signTx(unsignedTx, true); - const txHash = await wallet.submitTx(signedTx); - - setLoading(false); - setDone(true); - } - - return ( -
    -
    - {!done && connected ? ( -
    -
    - setAmount(e.target.value)} - placeholder="Amount in ADA" - label="Amount in ADA" - type="number" - /> -
    - -
    - ) : ( - !connected && ( - <> - - - ) - )} - {done && ( - <> - support - - )} -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/about/support/starRepo.tsx b/apps/mesh-web/components/pages/about/support/starRepo.tsx deleted file mode 100644 index 33ce30100..000000000 --- a/apps/mesh-web/components/pages/about/support/starRepo.tsx +++ /dev/null @@ -1,34 +0,0 @@ -export default function StarRepo() { - return ( -
    -
    -
    -

    - Star Mesh GitHub Repo -

    -

    - Visit our GitHub and star it! -

    - - Star GitHub repo - -
    - support - support -
    -
    - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/generateWallet.tsx b/apps/mesh-web/components/pages/apis/appwallet/generateWallet.tsx deleted file mode 100644 index 7c985e2d4..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/generateWallet.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { useState } from 'react'; -import Codeblock from '../../../ui/codeblock'; -import Card from '../../../ui/card'; -import SectionTwoCol from '../../../common/sectionTwoCol'; -import RunDemoButton from '../../../common/runDemoButton'; -import RunDemoResult from '../../../common/runDemoResult'; -import { AppWallet } from '@meshsdk/core'; - -export default function GenerateWallet() { - return ( - - ); -} - -function Left() { - return ( - <> -

    - You can generate deterministic keys based on the{' '} - - Bitcoin BIP39 - - . These mnemonic phrases allow you to recover your wallet. -

    -

    - Once you have your mnemonic phrase, you can use it to generate your - deterministic keys. See Load AppWallet in the following - section on loading a mnemonic phrase. It will typically generate a - series of private keys and corresponding public keys, which you can use - to manage your cryptocurrencies. -

    - - - ); -} - -function Right() { - const [loading, setLoading] = useState(false); - const [responseMnemonic, setResponseMnemonic] = useState(null); - - async function runDemoGetMnemonic() { - setLoading(true); - const mnemonic = AppWallet.brew(); - setResponseMnemonic(mnemonic); - setLoading(false); - } - - return ( - <> - -
    - Generate Wallet -

    - Generate new mnemonic phrases for your wallet -

    -
    - - -
    - - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/getPaymentAddress.tsx b/apps/mesh-web/components/pages/apis/appwallet/getPaymentAddress.tsx deleted file mode 100644 index 314f65f10..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/getPaymentAddress.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { useState } from 'react'; -import Codeblock from '../../../ui/codeblock'; -import Card from '../../../ui/card'; -import SectionTwoCol from '../../../common/sectionTwoCol'; -import RunDemoButton from '../../../common/runDemoButton'; -import RunDemoResult from '../../../common/runDemoResult'; -import useAppWallet from '../../../../contexts/appWallet'; - -export default function GetPaymentAddress() { - return ( - - ); -} - -function Left() { - let code = `const address = wallet.getPaymentAddress();\n`; - - return ( - <> -

    - Get wallet's address. For multi-addresses wallet, it will return the - first address. To choose other address, `accountIndex` can be specified. -

    - - - ); -} - -function Right() { - const { wallet, walletConnected } = useAppWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - - async function runDemo() { - setLoading(true); - const address = wallet.getPaymentAddress(); - setResponse(address); - setLoading(false); - } - - return ( - <> - -
    - Get Payment Address -
    - {!walletConnected &&

    Load a wallet to try this endpoint.

    } - - -
    - - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/getRewardAddress.tsx b/apps/mesh-web/components/pages/apis/appwallet/getRewardAddress.tsx deleted file mode 100644 index 66ab00c25..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/getRewardAddress.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { useState } from 'react'; -import Codeblock from '../../../ui/codeblock'; -import Card from '../../../ui/card'; -import SectionTwoCol from '../../../common/sectionTwoCol'; -import RunDemoButton from '../../../common/runDemoButton'; -import RunDemoResult from '../../../common/runDemoResult'; -import useAppWallet from '../../../../contexts/appWallet'; - -export default function GetRewardAddress() { - return ( - - ); -} - -function Left() { - let code = `const address = wallet.getRewardAddress();\n`; - - return ( - <> -

    - Get wallet's reward address. For multi-addresses wallet, it will return - the first address. To choose other address, `accountIndex` can be - specified. -

    - - - ); -} - -function Right() { - const { wallet, walletConnected } = useAppWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - - async function runDemo() { - setLoading(true); - const address = wallet.getPaymentAddress(); - setResponse(address); - setLoading(false); - } - - return ( - <> - -
    - Get Reward Address -
    - {!walletConnected &&

    Load a wallet to try this endpoint.

    } - - -
    - - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/hero.tsx b/apps/mesh-web/components/pages/apis/appwallet/hero.tsx deleted file mode 100644 index bc4dcf66e..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/hero.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { CodeBracketSquareIcon } from '@heroicons/react/24/solid'; - -export default function Hero() { - return ( - <> -
    -

    -
    -
    - -
    - App Wallet -
    -

    -

    - Wallet for building transactions in your applications. -

    -
    -
    -
    -

    - AppWallet is useful for building other user wallets and - fully customed applications's backend. -

    -

    -
    -
    - - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/index.tsx b/apps/mesh-web/components/pages/apis/appwallet/index.tsx deleted file mode 100644 index 4efaa5aa5..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import CommonLayout from '../../../common/layout'; -import GenerateWallet from './generateWallet'; -import GetPaymentAddress from './getPaymentAddress'; -import GetRewardAddress from './getRewardAddress'; -import Hero from './hero'; -import LoadWallet from './loadWallet'; -import SignData from './signData'; -import SignTx from './signTx'; - -export default function AppWallet() { - const sidebarItems = [ - { label: 'Generate wallet', to: 'generateWallet' }, - { label: 'Load wallet', to: 'loadWallet' }, - { label: 'Get payment address', to: 'getPaymentAddress' }, - { label: 'Get reward address', to: 'getRewardAddress' }, - { label: 'Sign transactions', to: 'signTx' }, - { label: 'Sign data', to: 'signData' }, - ]; - - return ( - - -
    - - ); -} - -function Main() { - return ( - <> - - - - - - - - ); -} diff --git a/apps/mesh-web/components/pages/apis/appwallet/loadWallet.tsx b/apps/mesh-web/components/pages/apis/appwallet/loadWallet.tsx deleted file mode 100644 index 374b39f36..000000000 --- a/apps/mesh-web/components/pages/apis/appwallet/loadWallet.tsx +++ /dev/null @@ -1,382 +0,0 @@ -import { useState } from 'react'; -import Codeblock from '../../../ui/codeblock'; -import Card from '../../../ui/card'; -import SectionTwoCol from '../../../common/sectionTwoCol'; -import RunDemoButton from '../../../common/runDemoButton'; -import RunDemoResult from '../../../common/runDemoResult'; -import { AppWallet, BlockfrostProvider } from '@meshsdk/core'; -import { - demoMnemonic, - demoPrivateKey, - demoCLIKey, -} from '../../../../configs/demo'; -import useAppWallet from '../../../../contexts/appWallet'; -import Input from '../../../ui/input'; -import Textarea from '../../../ui/textarea'; -import ButtonGroup from '../../../ui/buttongroup'; -import BlockchainProviderCodeSnippet from '../../../common/blockchainProvider'; - -export default function LoadWallet() { - const [demoMethod, setDemoMethod] = useState(0); - const [mnemonic, setMnemonic] = useState( - JSON.stringify(demoMnemonic, null, 2) - ); - const [network, setNetwork] = useState(0); - const [privatekey, setPrivatekey] = useState(demoPrivateKey); - const [paymentSkey, setPaymentSkey] = useState( - demoCLIKey.paymentSkey - ); - const [stakeSkey, setStakeSkey] = useState(demoCLIKey.stakeSkey); - - return ( - - ); -} - -function Left(mnemonic, network, privatekey, paymentSkey, stakeSkey) { - let _mnemonic = JSON.stringify(demoMnemonic); - try { - _mnemonic = JSON.stringify(JSON.parse(mnemonic)); - } catch (e) {} - - let codeCommon = `import { AppWallet } from '@meshsdk/core';\n\n`; - - let code1 = codeCommon; - code1 += `const wallet = new AppWallet({\n`; - code1 += ` networkId: ${network},\n`; - code1 += ` fetcher: blockchainProvider,\n`; - code1 += ` submitter: blockchainProvider,\n`; - code1 += ` key: {\n`; - code1 += ` type: 'mnemonic',\n`; - code1 += ` words: ${_mnemonic},\n`; - code1 += ` },\n`; - code1 += `});\n`; - - let code2 = `const address = wallet.getPaymentAddress();`; - - let code3 = codeCommon; - code3 += `const wallet = new AppWallet({\n`; - code3 += ` networkId: ${network},\n`; - code3 += ` fetcher: blockchainProvider,\n`; - code3 += ` submitter: blockchainProvider,\n`; - code3 += ` key: {\n`; - code3 += ` type: 'root',\n`; - code3 += ` bech32: '${privatekey}',\n`; - code3 += ` },\n`; - code3 += `});\n`; - - let code4 = codeCommon; - code4 += `const wallet = new AppWallet({\n`; - code4 += ` networkId: ${network},\n`; - code4 += ` fetcher: blockchainProvider,\n`; - code4 += ` submitter: blockchainProvider,\n`; - code4 += ` key: {\n`; - code4 += ` type: 'cli',\n`; - code4 += ` payment: '${paymentSkey}',\n`; - if (stakeSkey && stakeSkey.length) { - code4 += ` stake: '${stakeSkey}',\n`; - } - code4 += ` },\n`; - code4 += `});\n`; - - return ( - <> -

    With Mesh, you can initialize a wallet with:

    -
      -
    • mnemonic phrases
    • -
    • Cardano CLI generated keys
    • -
    • private keys
    • -
    -

    Lets import a blockchain provider:

    - -

    Mnemonic phrases

    -

    We can load wallet with mnemonic phrases:

    - -

    - With the wallet loaded, you can sign transactions, we will - see how to do this in the next section, for now lets get the wallet's - address: -

    - - -

    Cardano CLI generated skeys

    -

    - We can load wallet with CLI generated keys by providing the{' '} - skey generated by Cardano CLI. There are two files - generated by Cardano CLI, by default it is named{' '} - signing.skey and stake.skey. Opening the{' '} - signing.skey file it should contains: -

    - -

    - We can get the cborHex from the signing.skey{' '} - file, and load wallet with Cardano CLI generated skeys. Stake key is - optional, but without it, you cannot sign staking transactions. -

    - - -

    Private keys

    -

    We can load wallet with private keys:

    - - - ); -} - -function Right( - demoMethod, - setDemoMethod, - network, - setNetwork, - mnemonic, - setMnemonic, - privatekey, - setPrivatekey, - paymentSkey, - setPaymentSkey, - stakeSkey, - setStakeSkey -) { - const [loading, setLoading] = useState(false); - const { setWallet, setWalletNetwork } = useAppWallet(); - const [responseAddress, setResponseAddress] = useState(null); - const [responseError, setResponseError] = useState(null); - - async function runDemoLoadWallet() { - setLoading(true); - setResponseError(null); - setResponseAddress(null); - setWallet({} as AppWallet); - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - if (demoMethod == 0) { - let _mnemonic = []; - try { - _mnemonic = JSON.parse(mnemonic); - } catch (e) { - setResponseError('Mnemonic input is not a valid array.'); - } - - try { - if (_mnemonic.length) { - const _wallet = new AppWallet({ - networkId: network, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'mnemonic', - words: _mnemonic, - }, - }); - setWallet(_wallet); - setWalletNetwork(network); - const address = _wallet.getPaymentAddress(); - setResponseAddress(address); - } - } catch (error) { - setResponseError(`${error}`); - } - } - if (demoMethod == 1) { - try { - const _wallet = new AppWallet({ - networkId: network, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'root', - bech32: privatekey, - }, - }); - setWallet(_wallet); - setWalletNetwork(network); - const address = _wallet.getPaymentAddress(); - setResponseAddress(address); - } catch (error) { - setResponseError(`${error}`); - } - } - if (demoMethod == 2) { - try { - const stake = stakeSkey?.length > 0 ? stakeSkey : undefined; - const _wallet = new AppWallet({ - networkId: network, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'cli', - payment: paymentSkey, - stake, - }, - }); - setWallet(_wallet); - setWalletNetwork(network); - const address = _wallet.getPaymentAddress(); - setResponseAddress(address); - } catch (error) { - setResponseError(`${error}`); - } - } - - setLoading(false); - } - - return ( - <> - - setDemoMethod(0), - }, - { - key: 1, - label: 'Private key', - onClick: () => setDemoMethod(1), - }, - { - key: 2, - label: 'CLI keys', - onClick: () => setDemoMethod(2), - }, - ]} - currentSelected={demoMethod} - /> - - - - - - - - ); -} - -function InputTable({ - demoMethod, - network, - setNetwork, - mnemonic, - setMnemonic, - privatekey, - setPrivatekey, - paymentSkey, - setPaymentSkey, - stakeSkey, - setStakeSkey, -}) { - return ( -
    - - - - -
    - Load wallet with {demoMethod == 0 && 'mnemonic phrases'} - {demoMethod == 1 && 'private keys'} - {demoMethod == 2 && 'CLI generated keys'} -

    - Provide the {demoMethod == 0 && 'mnemonic phrases'} - {demoMethod == 1 && 'private keys'} - {demoMethod == 2 && 'CLI generated keys'} to recover your wallet. - After initializing the AppWallet, we will get the - wallet's payment address. -

    -

    - Note: Mesh Playground is safe if you really have to recover your - Mainnet wallet, but recovering your testing wallet on Mesh - Playground is recommended. -

    -
    - {demoMethod == 0 && ( - <> - - - ); -}; - -export default Textarea; diff --git a/apps/mesh-web/configs/demo.ts b/apps/mesh-web/configs/demo.ts deleted file mode 100644 index 59d679f9b..000000000 --- a/apps/mesh-web/configs/demo.ts +++ /dev/null @@ -1,49 +0,0 @@ -export const demoAddresses = { - mainnet: 'addr1v9vx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c93pyfx', - testnet: 'addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr', -}; - -export const demoMnemonic = [ - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', -]; - -export const demoPrivateKey = - 'xprv1cqa46gk29plgkg98upclnjv5t425fcpl4rgf9mq2txdxuga7jfq5shk7np6l55nj00sl3m4syzna3uwgrwppdm0azgy9d8zahyf32s62klfyhe0ayyxkc7x92nv4s77fa0v25tufk9tnv7x6dgexe9kdz5gpeqgu'; - -export const demoCLIKey = { - paymentSkey: - '5820aaca553a7b95b38b5d9b82a5daa7a27ac8e34f3cf27152a978f4576520dd6503', - stakeSkey: - '582097c458f19a3111c3b965220b1bef7d548fd75bc140a7f0a4f080e03cce604f0e', -}; - -export const demoPlutusMintingScript = - '5907655907620100003232323232323232323232323232332232323232322232325335320193333573466e1cd55cea80124000466442466002006004646464646464646464646464646666ae68cdc39aab9d500c480008cccccccccccc88888888888848cccccccccccc00403403002c02802402001c01801401000c008cd4050054d5d0a80619a80a00a9aba1500b33501401635742a014666aa030eb9405cd5d0a804999aa80c3ae501735742a01066a02803e6ae85401cccd54060081d69aba150063232323333573466e1cd55cea801240004664424660020060046464646666ae68cdc39aab9d5002480008cc8848cc00400c008cd40a9d69aba15002302b357426ae8940088c98c80b4cd5ce01701681589aab9e5001137540026ae854008c8c8c8cccd5cd19b8735573aa004900011991091980080180119a8153ad35742a00460566ae84d5d1280111931901699ab9c02e02d02b135573ca00226ea8004d5d09aba2500223263202933573805405204e26aae7940044dd50009aba1500533501475c6ae854010ccd540600708004d5d0a801999aa80c3ae200135742a004603c6ae84d5d1280111931901299ab9c026025023135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d55cf280089baa00135742a004601c6ae84d5d1280111931900b99ab9c018017015101613263201633573892010350543500016135573ca00226ea800448c88c008dd6000990009aa80a911999aab9f0012500a233500930043574200460066ae880080508c8c8cccd5cd19b8735573aa004900011991091980080180118061aba150023005357426ae8940088c98c8050cd5ce00a80a00909aab9e5001137540024646464646666ae68cdc39aab9d5004480008cccc888848cccc00401401000c008c8c8c8cccd5cd19b8735573aa0049000119910919800801801180a9aba1500233500f014357426ae8940088c98c8064cd5ce00d00c80b89aab9e5001137540026ae854010ccd54021d728039aba150033232323333573466e1d4005200423212223002004357426aae79400c8cccd5cd19b875002480088c84888c004010dd71aba135573ca00846666ae68cdc3a801a400042444006464c6403666ae7007006c06406005c4d55cea80089baa00135742a00466a016eb8d5d09aba2500223263201533573802c02a02626ae8940044d5d1280089aab9e500113754002266aa002eb9d6889119118011bab00132001355012223233335573e0044a010466a00e66442466002006004600c6aae754008c014d55cf280118021aba200301213574200222440042442446600200800624464646666ae68cdc3a800a40004642446004006600a6ae84d55cf280191999ab9a3370ea0049001109100091931900819ab9c01101000e00d135573aa00226ea80048c8c8cccd5cd19b875001480188c848888c010014c01cd5d09aab9e500323333573466e1d400920042321222230020053009357426aae7940108cccd5cd19b875003480088c848888c004014c01cd5d09aab9e500523333573466e1d40112000232122223003005375c6ae84d55cf280311931900819ab9c01101000e00d00c00b135573aa00226ea80048c8c8cccd5cd19b8735573aa004900011991091980080180118029aba15002375a6ae84d5d1280111931900619ab9c00d00c00a135573ca00226ea80048c8cccd5cd19b8735573aa002900011bae357426aae7940088c98c8028cd5ce00580500409baa001232323232323333573466e1d4005200c21222222200323333573466e1d4009200a21222222200423333573466e1d400d2008233221222222233001009008375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c4664424444444660040120106eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc8848888888cc018024020c030d5d0a8049bae357426ae8940248cccd5cd19b875006480088c848888888c01c020c034d5d09aab9e500b23333573466e1d401d2000232122222223005008300e357426aae7940308c98c804ccd5ce00a00980880800780700680600589aab9d5004135573ca00626aae7940084d55cf280089baa0012323232323333573466e1d400520022333222122333001005004003375a6ae854010dd69aba15003375a6ae84d5d1280191999ab9a3370ea0049000119091180100198041aba135573ca00c464c6401866ae700340300280244d55cea80189aba25001135573ca00226ea80048c8c8cccd5cd19b875001480088c8488c00400cdd71aba135573ca00646666ae68cdc3a8012400046424460040066eb8d5d09aab9e500423263200933573801401200e00c26aae7540044dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6401466ae7002c02802001c0184d55cea80089baa0012323333573466e1d40052002200723333573466e1d40092000212200123263200633573800e00c00800626aae74dd5000a4c2400292010350543100122002112323001001223300330020020011'; - -export const assetPolicyId = - 'd9312da562da182b02322fd8acb536f37eb9d29fba7c49dc17255527'; -export const assetAssetId = '4d657368546f6b656e'; -export const assetAsset = assetPolicyId + assetAssetId; diff --git a/apps/mesh-web/configs/site.ts b/apps/mesh-web/configs/site.ts deleted file mode 100644 index 2fa26bf6a..000000000 --- a/apps/mesh-web/configs/site.ts +++ /dev/null @@ -1 +0,0 @@ -export const rootUrl = 'https://meshjs.dev'; diff --git a/apps/mesh-web/contexts/appWallet.tsx b/apps/mesh-web/contexts/appWallet.tsx deleted file mode 100644 index c6d949042..000000000 --- a/apps/mesh-web/contexts/appWallet.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React, { createContext, useState, useContext, useMemo } from 'react'; -import { AppWallet } from '@meshsdk/core'; - -const WalletContext = createContext({ - wallet: {} as AppWallet, - setWallet: (wallet: AppWallet) => {}, - walletNetwork: 0, - setWalletNetwork: (network: number) => {}, - walletConnected: false, -}); - -export const AppWalletProvider = ({ children }) => { - const [wallet, setWallet] = useState({} as AppWallet); - const [walletNetwork, setWalletNetwork] = useState(0); - - const walletConnected = useMemo(() => { - return Object.keys(wallet).length == 0 ? false : true; - }, [wallet]); - - const memoedValue = useMemo( - () => ({ - wallet, - setWallet, - walletNetwork, - setWalletNetwork, - walletConnected, - }), - [wallet, walletNetwork, walletConnected] - ); - - return ( - - {children} - - ); -}; - -export default function useAppWallet() { - return useContext(WalletContext); -} diff --git a/apps/mesh-web/contexts/demo.tsx b/apps/mesh-web/contexts/demo.tsx deleted file mode 100644 index a3a313991..000000000 --- a/apps/mesh-web/contexts/demo.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React, { - createContext, - useState, - useContext, - useMemo, - useEffect, -} from 'react'; -import useLocalStorage from '../hooks/useLocalStorage'; - -const DemoContext = createContext({ - userStorage: { lockedAssetUnit: '' }, - updateUserStorage: (key, value) => {}, -}); - -export const DemoProvider = ({ children }) => { - const [userLocalStorage, setUserlocalStorage] = useLocalStorage( - 'meshUserStorage', - {} - ); - const [userStorage, setUserStorage] = - useState<{ lockedAssetUnit: '' }>(userLocalStorage); - - function updateUserStorage(key, value) { - let updateUserStorage = { ...userStorage }; - if (value) { - updateUserStorage[key] = value; - } else { - delete updateUserStorage[key]; - } - setUserStorage(updateUserStorage); - setUserlocalStorage(updateUserStorage); - } - - const memoedValue = useMemo( - () => ({ - userStorage, - updateUserStorage, - }), - [userStorage, updateUserStorage] - ); - - return ( - {children} - ); -}; - -export default function useDemo() { - return useContext(DemoContext); -} diff --git a/apps/mesh-web/contexts/wallet.tsx b/apps/mesh-web/contexts/wallet.tsx deleted file mode 100644 index 33b2a3af0..000000000 --- a/apps/mesh-web/contexts/wallet.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import React, { - createContext, - useState, - useContext, - useMemo, - useEffect, -} from 'react'; -import { BrowserWallet } from '@meshsdk/core'; -import type { Wallet } from '@meshsdk/core'; -import useLocalStorage from '../hooks/useLocalStorage'; - -const WalletContext = createContext({ - wallet: {} as BrowserWallet, - connecting: false, - walletNameConnected: '', - walletConnected: false, - connectWallet: async (walletName: string) => {}, - availableWallets: [] as Wallet[], - hasAvailableWallets: false, - userStorage: { lockedAssetUnit: '' }, - updateUserStorage: (key, value) => {}, -}); - -export const WalletProvider = ({ children }) => { - const [wallet, setWallet] = useState({} as BrowserWallet); - const [walletConnected, setWalletConnected] = useState(false); - const [connecting, setConnecting] = useState(false); - const [walletNameConnected, setWalletNameConnected] = useState(''); - const [availableWallets, setAvailableWallets] = useState([]); - const [userLocalStorage, setUserlocalStorage] = useLocalStorage( - 'meshUserStorage', - {} - ); - const [userStorage, setUserStorage] = useState<{ lockedAssetUnit: '' }>( - userLocalStorage - ); - - useEffect(() => { - async function init() { - setAvailableWallets(BrowserWallet.getInstalledWallets()); - } - init(); - }, []); - const hasAvailableWallets = availableWallets.length > 0; - - const connectWallet = async (walletName: string) => { - setConnecting(true); - try { - const _wallet = await BrowserWallet.enable(walletName); - if (_wallet) { - setWallet(_wallet); - setWalletNameConnected(walletName); - setWalletConnected(true); - } - } catch (error) { - console.error('connectWallet', error); - } - setConnecting(false); - }; - - function updateUserStorage(key, value) { - let updateUserStorage = { ...userStorage }; - if (value) { - updateUserStorage[key] = value; - } else { - delete updateUserStorage[key]; - } - setUserStorage(updateUserStorage); - setUserlocalStorage(updateUserStorage); - } - - const memoedValue = useMemo( - () => ({ - wallet, - connecting, - walletNameConnected, - walletConnected, - connectWallet, - availableWallets, - hasAvailableWallets, - userStorage, - updateUserStorage, - }), - [ - wallet, - walletConnected, - connecting, - walletNameConnected, - availableWallets, - hasAvailableWallets, - userStorage, - updateUserStorage, - ] - ); - - return ( - - {children} - - ); -}; - -export default function useWallet() { - return useContext(WalletContext); -} diff --git a/apps/mesh-web/hooks/useLocalStorage.ts b/apps/mesh-web/hooks/useLocalStorage.ts deleted file mode 100644 index 67fd301c0..000000000 --- a/apps/mesh-web/hooks/useLocalStorage.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { useState } from 'react'; - -export default function useLocalStorage(key, initialValue) { - // State to store our value - // Pass initial state function to useState so logic is only executed once - const [storedValue, setStoredValue] = useState(() => { - if (typeof window === 'undefined') { - return initialValue; - } - try { - if (typeof window === 'undefined') { - return initialValue; - } else { - // Get from local storage by key - const item = window.localStorage.getItem(key); - // Parse stored json or if none return initialValue - return item ? JSON.parse(item) : initialValue; - } - } catch (error) { - // If error also return initialValue - console.error(error); - return initialValue; - } - }); - // Return a wrapped version of useState's setter function that ... - // ... persists the new value to localStorage. - const setValue = (value) => { - try { - // Allow value to be a function so we have same API as useState - const valueToStore = - value instanceof Function ? value(storedValue) : value; - // Save state - setStoredValue(valueToStore); - // Save to local storage - if (typeof window !== 'undefined') { - window.localStorage.setItem(key, JSON.stringify(valueToStore)); - } - } catch (error) { - // A more advanced implementation would handle the error case - console.error(error); - } - }; - - return [storedValue, setValue]; -} diff --git a/apps/mesh-web/lib/ga/index.ts b/apps/mesh-web/lib/ga/index.ts deleted file mode 100644 index b8055c105..000000000 --- a/apps/mesh-web/lib/ga/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const pageview = (url) => { - // @ts-ignore - window.gtag('config', process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS, { - page_path: url, - }); -}; -export const event = ({ action, params }) => { - // @ts-ignore - window.gtag('event', action, params); -}; diff --git a/apps/mesh-web/next.config.js b/apps/mesh-web/next.config.js deleted file mode 100644 index d03407b16..000000000 --- a/apps/mesh-web/next.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - webpack: function (config, options) { - config.experiments = { - asyncWebAssembly: true, - layers: true, - }; - return config; - }, -}; -module.exports = nextConfig; diff --git a/apps/mesh-web/package.json b/apps/mesh-web/package.json deleted file mode 100644 index f2acefab2..000000000 --- a/apps/mesh-web/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@meshsdk/playground", - "homepage": "https://meshjs.dev", - "author": "MeshJS", - "license": "Apache-2.0", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@headlessui/react": "2.0.4", - "@heroicons/react": "2.1.3", - "@meshsdk/contracts": "1.0.1", - "@meshsdk/core": "1.5.24", - "@meshsdk/react": "1.1.12", - "axios": "1.7.2", - "copy-to-clipboard": "3.3.3", - "flowbite": "2.3.0", - "flowbite-react": "0.9.0", - "i": "0.3.7", - "next": "14.2.3", - "react": "18.3.1", - "react-dom": "18.3.1", - "react-highlight": "0.15.0", - "react-scroll": "1.9.0", - "react-tweet-embed": "2.0.0" - }, - "devDependencies": { - "@babel/core": "7.24.7", - "autoprefixer": "10.4.19", - "flowbite-typography": "1.0.3", - "postcss": "8.4.38", - "tailwindcss": "3.4.4" - } -} \ No newline at end of file diff --git a/apps/mesh-web/pages/404.tsx b/apps/mesh-web/pages/404.tsx deleted file mode 100644 index 06f4c7919..000000000 --- a/apps/mesh-web/pages/404.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Link from 'next/link'; - -export default function Custom404() { - return ( -
    -
    -
    -
    - -
    -
    -

    - Whoops! This page doesn't exist. -

    -
    -
    -
    -
    - ); -} diff --git a/apps/mesh-web/pages/_app.tsx b/apps/mesh-web/pages/_app.tsx deleted file mode 100644 index 853ab27d1..000000000 --- a/apps/mesh-web/pages/_app.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import '../styles/globals.css'; -import '../styles/highlight/stackoverflow-dark.css'; -import '../styles/custom.css'; -import type { AppProps } from 'next/app'; -import { DemoProvider } from '../contexts/demo'; -import Navbar from '../components/site/navbar'; -import Footer from '../components/site/footer'; -import { AppWalletProvider } from '../contexts/appWallet'; -import { MeshProvider } from '@meshsdk/react'; -import { useEffect } from 'react'; -import { useRouter } from 'next/router'; -import * as ga from '../lib/ga'; -import Scroller from '../components/site/scroller'; - -function MyApp({ Component, pageProps }: AppProps) { - /** - * Google Analytics - */ - const router = useRouter(); - useEffect(() => { - const handleRouteChange = (url) => { - ga.pageview(url); - }; - router.events.on('routeChangeComplete', handleRouteChange); - return () => { - router.events.off('routeChangeComplete', handleRouteChange); - }; - }, [router.events]); - - return ( - - - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - ); -} - -export default MyApp; diff --git a/apps/mesh-web/pages/_document.tsx b/apps/mesh-web/pages/_document.tsx deleted file mode 100644 index 041cc6b33..000000000 --- a/apps/mesh-web/pages/_document.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { Html, Head, Main, NextScript } from 'next/document'; - -export default function Document() { - return ( - - - {/* Google Analytics */} - - - -
    - - - - ); -} diff --git a/apps/mesh-web/pages/about/catalyst.tsx b/apps/mesh-web/pages/about/catalyst.tsx deleted file mode 100644 index 0c625b876..000000000 --- a/apps/mesh-web/pages/about/catalyst.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import Catalyst from '../../components/pages/about/catalyst'; - -const MediaPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default MediaPage; diff --git a/apps/mesh-web/pages/about/cips.tsx b/apps/mesh-web/pages/about/cips.tsx deleted file mode 100644 index 23e240211..000000000 --- a/apps/mesh-web/pages/about/cips.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import Cips from '../../components/pages/about/cips'; -import Metatags from '../../components/site/metatags'; - -const AboutCipsPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default AboutCipsPage; diff --git a/apps/mesh-web/pages/about/index.tsx b/apps/mesh-web/pages/about/index.tsx deleted file mode 100644 index f6076646d..000000000 --- a/apps/mesh-web/pages/about/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import About from '../../components/pages/about'; -import Metatags from '../../components/site/metatags'; - -const AboutPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default AboutPage; diff --git a/apps/mesh-web/pages/about/media-kit.tsx b/apps/mesh-web/pages/about/media-kit.tsx deleted file mode 100644 index a8a001fed..000000000 --- a/apps/mesh-web/pages/about/media-kit.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import Media from '../../components/pages/about/media'; -import Metatags from '../../components/site/metatags'; - -const MediaPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default MediaPage; diff --git a/apps/mesh-web/pages/about/references.tsx b/apps/mesh-web/pages/about/references.tsx deleted file mode 100644 index 7c5c5d775..000000000 --- a/apps/mesh-web/pages/about/references.tsx +++ /dev/null @@ -1,419 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; - -const ReferencesPage: NextPage = () => { - return ( - <> - -
    -
    -
    -

    - Interviews -

    -

    -
    - -
    -
    -
    -

    - Tweets -

    -

    -
    - -
    -
    -
    -
    - - ); -}; - -export default ReferencesPage; - -function ListofReferences() { - return ( - <> - - - - - - - - - - ); -} - -function CardLink({ title, desc, url }) { - return ( - -
    - {title} -
    -

    {desc}

    -
    - ); -} - -function ListofTestimonials() { - return ( - <> -
    -

    - It's incredible that you can start building on{' '} - - #Cardano - {' '} - so easily with{' '} - - @meshsdk - - . Same old React stuff with NextJS. Host on{' '} - - @vercel - {' '} - in 5 mins. Download{' '} - - @FlintWallet - {' '} - and access through dApp browser. Boom, you're live. And - multi-platform. And iterating. 100x speed.{' '} - - @MochaApp - {' '} - WIP.{' '} - - pic.twitter.com/k7NKUWf2ts - -

    - — Jeremy Soo (@Jeremysoojk){' '} - - February 18, 2023 - -
    -
    -

    - Want to dip your toes in Cardano Development? -
    -
    - Building a site and sending transactions is made easy with{' '} - - @meshsdk - {' '} - check out my idiot-proof guide - - https://t.co/TWnHldEhDn - -

    - — BlockSplained (@blocksplained){' '} - - February 15, 2023 - -
    -
    -

    - A LOT is coming from{' '} - - @meshsdk - {' '} - and{' '} - - @jinglescode - {' '} - - they keep adding new functionality every day. Today's function - eliminates irrelevant UTxOs and it makes devs jobs to write off-chain - code much easier 💪 - - https://t.co/qZiRqepAjw - -

    - — Mladen Lm | Cardano Rumors Guy (@MladenLm){' '} - - February 15, 2023 - -
    -
    -

    - Building your first site that connects a wallet and sends a - transaction using Mesh SDK | Developer Diary #4 -
    -
    - Article by{' '} - - @blocksplained - {' '} - - #Cardano - {' '} - - $ADA - - - https://t.co/7WErQ046Rd - -

    - — Ada Pulse (@Adapulse_io){' '} - - February 14, 2023 - -
    -
    -

    - thanks for all your hard work and documentation which got me started - and going within 2 hours :) -

    - — jack friks (@jackfriks){' '} - - February 8, 2023 - -
    -
    -

    - it’s actually so simple with{' '} - - @meshsdk - {' '} - too it’s wild. -
    -
    - on top of that would you want to learn how to do things like buy a - domain and host your site or should i leave that out? and keep it just - based on the cardano functionality after initial setup of a local - server? -

    - — jack friks (@jackfriks){' '} - - February 8, 2023 - -
    -
    -

    - 3.{' '} - - @meshsdk - - , the EASIEST way to start building on{' '} - - #Cardano - - , released its latest update. -
    -
    I first met Mesh Co-founder{' '} - - @jinglescode - {' '} - at{' '} - - #CardanoSummit2022 - {' '} - SG event and was blown away. You've got to check out{' '} - - https://t.co/Tj7bnVSUyg - - .
    -
    - 🚨 Builders take note!{' '} - - https://t.co/FOu7vDDnnu - -

    - — Jeremy Soo (@Jeremysoojk){' '} - - January 30, 2023 - -
    -
    -

    - Congrats on the milestone! It's has been an absolute joy to use - over the last few weeks, very excited about rolling out our new - Mesh-based multisig minting system for{' '} - - @ChainChillaz - {' '} - next month. -

    - — haz (@HazRyder){' '} - - January 22, 2023 - -
    -
    -

    - 20/ - - @meshsdk - {' '} - is a one stop shop for building web3 apps on Cardano and can be found - at{' '} - - https://t.co/8IGL8h9U6J - -
    -
    - They released v1.3.0. This week{' '} - - @jinglescode - {' '} - also showed us “Mesh AI”: leverage ChatGPT to help you build Cardano - apps{' '} - - https://t.co/AADMZULPpR - -

    - — ADA whale (@cardano_whale){' '} - - January 7, 2023 - -
    - - ); -} diff --git a/apps/mesh-web/pages/about/support-us.tsx b/apps/mesh-web/pages/about/support-us.tsx deleted file mode 100644 index 9a9a12cc5..000000000 --- a/apps/mesh-web/pages/about/support-us.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import SupportUs from '../../components/pages/about/support'; -import Metatags from '../../components/site/metatags'; - -const AboutSupportPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default AboutSupportPage; diff --git a/apps/mesh-web/pages/api/donate-mint-mesh.ts b/apps/mesh-web/pages/api/donate-mint-mesh.ts deleted file mode 100644 index c70ef4310..000000000 --- a/apps/mesh-web/pages/api/donate-mint-mesh.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { NextApiRequest, NextApiResponse } from 'next'; -import { - AppWallet, - ForgeScript, - Transaction, - BlockfrostProvider, - largestFirst, -} from '@meshsdk/core'; -import type { Mint } from '@meshsdk/core'; - -const words = [ - 'gratitude', - 'recognition', - 'thanks', - 'gratefulness', - 'indebtedness', - 'tribute', - 'admiration', - 'affection', - 'awareness', - 'commendation', - 'knowledge', - 'respect', - 'acknowledgment', - 'appreciativeness', - 'thankfulness', - 'thanksgiving', - 'respect', - 'salute', - 'honor', - 'trust', - 'tribute', - 'admire', - 'commemorate', - 'commend', -]; -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - const recipientAddress = req.body.recipientAddress; - const utxos = req.body.utxos; - const amount = req.body.amount; - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const appWallet = new AppWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'root', - bech32: process.env.NEXT_PUBLIC_DONATE_MESHTOKEN_WALLET!, - }, - }); - - const appWalletAddress = appWallet.getPaymentAddress(); - const forgingScript = ForgeScript.withOneSignature(appWalletAddress); - - const costLovelace = amount * 1000000; - - const assetMetadata = { - name: 'Mesh Token of Appreciation', - image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua', - mediaType: 'image/jpg', - description: `Thank you for supporting the development of Mesh SDK.`, - '₳': `${amount.toString()}`, - }; - - var dt = new Date(); - var secs = dt.getSeconds() + 60 * dt.getMinutes() + 60 * 60 * dt.getHours(); - let word = words[Math.floor(Math.random() * words.length)]; - word = word.charAt(0).toUpperCase() + word.slice(1); - - const assetName = `Mesh${word}Token-${secs}`; - const asset: Mint = { - assetName: assetName, - assetQuantity: '1', - metadata: assetMetadata, - label: '721', - recipient: { - address: recipientAddress, - }, - }; - const selectedUtxos = largestFirst(costLovelace.toString(), utxos, true); - - const tx = new Transaction({ initiator: appWallet }); - tx.setTxInputs(selectedUtxos); - tx.mintAsset(forgingScript, asset); - tx.sendLovelace( - process.env.NEXT_PUBLIC_DONATE_ADA_ADDRESS!, - costLovelace.toString() - ); - tx.setChangeAddress(recipientAddress); - - const txBuilt = await tx.build(); - const unsignedTx = await appWallet.signTx(txBuilt, true); - - res.status(200).json({ unsignedTx }); -} diff --git a/apps/mesh-web/pages/apis/appwallet.tsx b/apps/mesh-web/pages/apis/appwallet.tsx deleted file mode 100644 index cf7e8f441..000000000 --- a/apps/mesh-web/pages/apis/appwallet.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import AppWallet from '../../components/pages/apis/appwallet'; -import Metatags from '../../components/site/metatags'; - -const AppWalletPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default AppWalletPage; diff --git a/apps/mesh-web/pages/apis/browserwallet.tsx b/apps/mesh-web/pages/apis/browserwallet.tsx deleted file mode 100644 index ff8e6cd43..000000000 --- a/apps/mesh-web/pages/apis/browserwallet.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import BrowserWallet from '../../components/pages/apis/browserwallet'; -import Metatags from '../../components/site/metatags'; - -const BrowserWalletPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default BrowserWalletPage; diff --git a/apps/mesh-web/pages/apis/index.tsx b/apps/mesh-web/pages/apis/index.tsx deleted file mode 100644 index ac9ab6a16..000000000 --- a/apps/mesh-web/pages/apis/index.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { - BanknotesIcon, - NewspaperIcon, - PaperAirplaneIcon, - WalletIcon, - WrenchScrewdriverIcon, - FireIcon, - ArrowsPointingInIcon, -} from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const ReactPage: NextPage = () => { - const items = [ - { - title: 'App Wallet', - desc: 'Wallet for building amazing applications', - link: '/apis/appwallet', - thumbnailHeroicon: , - }, - { - title: 'Browser Wallet', - desc: 'Connect and perform wallet functions on Web3 dApps', - link: '/apis/browserwallet', - thumbnailHeroicon: , - }, - { - title: 'Basic Transaction', - desc: 'Transactions for sending assets', - link: '/apis/transaction', - thumbnailHeroicon: , - }, - { - title: 'Interact with smart contracts', - desc: 'Transactions to work with smart contracts', - link: '/apis/transaction/smart-contract', - thumbnailHeroicon: , - }, - { - title: 'Minting and burning assets', - desc: 'Using ForgeScript for minting and burning native assets', - link: '/apis/transaction/minting', - thumbnailHeroicon: , - }, - { - title: 'Staking and stake pool', - desc: 'Transactions for delegating ADA and managing stakepools', - link: '/apis/transaction/staking', - thumbnailHeroicon: , - }, - { - title: 'Resolvers', - desc: 'Functions that you need while building dApps', - link: '/apis/resolvers', - thumbnailHeroicon: , - }, - ]; - - return ( - <> - -
    -
    -

    - Mesh API -

    -

    - From wallet integrations to transaction builders, Mesh makes Web3 - development easy with reliable, scalable, and well-engineered APIs & - developer tools. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default ReactPage; diff --git a/apps/mesh-web/pages/apis/meshwallet.tsx b/apps/mesh-web/pages/apis/meshwallet.tsx deleted file mode 100644 index 0ce92f3da..000000000 --- a/apps/mesh-web/pages/apis/meshwallet.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import MeshWallet from '../../components/pages/apis/meshwallet'; - -const MeshWalletPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default MeshWalletPage; diff --git a/apps/mesh-web/pages/apis/resolvers.tsx b/apps/mesh-web/pages/apis/resolvers.tsx deleted file mode 100644 index b871ab327..000000000 --- a/apps/mesh-web/pages/apis/resolvers.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Resolvers from '../../components/pages/apis/resolvers'; -import Metatags from '../../components/site/metatags'; - -const ResolversPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default ResolversPage; diff --git a/apps/mesh-web/pages/apis/transaction/builder.tsx b/apps/mesh-web/pages/apis/transaction/builder.tsx deleted file mode 100644 index 0ed81d281..000000000 --- a/apps/mesh-web/pages/apis/transaction/builder.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import { ListBulletIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CommonLayout from '../../../components/common/layout'; -import InvalidInterval from '../../../components/pages/apis/transaction/builder/InvalidInterval'; -import ChangeAddress from '../../../components/pages/apis/transaction/builder/changeAddress'; -import Complete from '../../../components/pages/apis/transaction/builder/complete'; -import MetadataValue from '../../../components/pages/apis/transaction/builder/metadataValue'; -import MintPlutus from '../../../components/pages/apis/transaction/builder/mintPlutus'; -import MintNative from '../../../components/pages/apis/transaction/builder/mintNative'; -import ReadOnlyTxInReference from '../../../components/pages/apis/transaction/builder/readOnlyTxInReference'; -import RequiredSignerHash from '../../../components/pages/apis/transaction/builder/requiredSignerHash'; -import SigningKey from '../../../components/pages/apis/transaction/builder/signingKey'; -import TxIn from '../../../components/pages/apis/transaction/builder/txIn'; -import ScriptTxIn from '../../../components/pages/apis/transaction/builder/scriptTxIn'; -import TxInCollateral from '../../../components/pages/apis/transaction/builder/txInCollateral'; -import TxOut from '../../../components/pages/apis/transaction/builder/txOut'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import Metatags from '../../../components/site/metatags'; -import RegisterCertificate from '../../../components/pages/apis/transaction/builder/registerCertificate'; -import DeregisterCertificate from '../../../components/pages/apis/transaction/builder/deregisterCertificate'; -import DelegateStakeCertificate from '../../../components/pages/apis/transaction/builder/delegateStakeCertificate'; -import RegisterPoolCertificate from '../../../components/pages/apis/transaction/builder/registerPoolCertificate'; -import RetirePoolCertificate from '../../../components/pages/apis/transaction/builder/retirePoolCertificate'; - -const TransactionBuilderPage: NextPage = () => { - const sidebarItems = [ - { label: 'Set pubkey input', to: 'txIn' }, - { label: 'Set script input', to: 'scriptTxIn' }, - { label: 'Set output', to: 'txOut' }, - { - label: 'Set reference input', - to: 'readOnlyTxInReference', - }, - { - label: 'Mint native token', - to: 'mintNative', - }, - { - label: 'Mint Plutus token', - to: 'mintPlutus', - }, - { - label: 'Set required signer', - to: 'requiredSignerHash', - }, - { - label: 'Set collateral UTxO', - to: 'txInCollateral', - }, - { - label: 'Set change address', - to: 'changeAddress', - }, - { - label: 'Set validity interval', - to: 'invalidInterval', - }, - { - label: 'Add metadata', - to: 'metadataValue', - }, - { - label: 'Register Stake Certificate', - to: 'registerCertificate', - }, - { - label: 'Deregister Stake Certificate', - to: 'deregisterCertificate', - }, - { - label: 'Delegate Stake', - to: 'delegateStakeCertificate', - }, - { - label: 'Register Pool Certificate', - to: 'registerPoolCertificate', - }, - { - label: 'Retire Pool Certificate', - to: 'retirePoolCertificate', - }, - { - label: 'Sign with signing key', - to: 'signingKey', - }, - { - label: 'Complete transaction building', - to: 'complete', - }, - ]; - - return ( - <> - - - } - /> -

    - For examples on how to build all possible transactions with - MeshTxBuilder, please refer to the{' '} - - Craft Customized Transactions - {' '} - page. -

    - - - - - - - - - - - - - - - - - - -
    - - ); -}; - -export default TransactionBuilderPage; diff --git a/apps/mesh-web/pages/apis/transaction/builderExample.tsx b/apps/mesh-web/pages/apis/transaction/builderExample.tsx deleted file mode 100644 index 6207615f9..000000000 --- a/apps/mesh-web/pages/apis/transaction/builderExample.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { CubeIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CommonLayout from '../../../components/common/layout'; -import ComplexTransaction from '../../../components/pages/apis/transaction/builderExample/complexTransaction'; -import GettingStarted from '../../../components/pages/apis/transaction/builderExample/gettingStarted'; -import SendValues from '../../../components/pages/apis/transaction/builderExample/sendValues'; -import TransactionWithObject from '../../../components/pages/apis/transaction/builderExample/withObject'; -import TransactionWithoutDependency from '../../../components/pages/apis/transaction/builderExample/withoutDependency'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import Metatags from '../../../components/site/metatags'; -import LockFund from '../../../components/pages/apis/transaction/builderExample/lockFund'; -import UnlockFund from '../../../components/pages/apis/transaction/builderExample/unlockFund'; -import MintToken from '../../../components/pages/apis/transaction/builderExample/mintToken'; -import Staking from '../../../components/pages/apis/transaction/builderExample/staking'; - -const TransactionBuilderExamplePage: NextPage = () => { - const sidebarItems = [ - { label: 'Getting Started', to: 'gettingStarted' }, - { label: 'Send Values', to: 'sendValues' }, - { label: 'Lock Fund', to: 'lockFund' }, - { label: 'Unlock Fund', to: 'unlockFund' }, - { label: 'Mint Tokens', to: 'mintToken' }, - { label: 'Delegate Stake', to: 'staking' }, - { label: 'Complex Transaction', to: 'complexTransaction' }, - { label: 'Build without dependency', to: 'withoutDependency' }, - { label: 'Build with object', to: 'withObject' }, - ]; - - return ( - <> - - - } - /> -

    - For a complete walkthrough of all available cardano-cli like APIs, - please refer to the{' '} - - MeshTxBuilder - All API Endpoints - {' '} - page. -

    - - - - - - - - - -
    - - ); -}; - -export default TransactionBuilderExamplePage; diff --git a/apps/mesh-web/pages/apis/transaction/index.tsx b/apps/mesh-web/pages/apis/transaction/index.tsx deleted file mode 100644 index 4bc06e31b..000000000 --- a/apps/mesh-web/pages/apis/transaction/index.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { PaperAirplaneIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import CommonLayout from '../../../components/common/layout'; -import SendAdaHandler from '../../../components/pages/apis/transaction/basic/sendAdaHandler'; -import SendToken from '../../../components/pages/apis/transaction/basic/sendToken'; -import TxSetMetadata from '../../../components/pages/apis/transaction/basic/setMetadata'; -import CoinSelection from '../../../components/pages/apis/transaction/basic/coinSelection'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import SendAda from '../../../components/pages/apis/transaction/basic/sendAda'; -import SendAssets from '../../../components/pages/apis/transaction/basic/sendAssets'; -import SetTimeLimit from '../../../components/pages/apis/transaction/basic/setTimeLimit'; -import Metatags from '../../../components/site/metatags'; -import SetCollateral from '../../../components/pages/apis/transaction/basic/setCollateral'; -import SetRequiredSigners from '../../../components/pages/apis/transaction/basic/setRequiredSigners'; -import SendValue from '../../../components/pages/apis/transaction/basic/sendValue'; -import SetNativeScriptInput from '../../../components/pages/apis/transaction/basic/setNativeScriptInput'; - -const TransactionPage: NextPage = () => { - const sidebarItems = [ - { label: 'Send ADA to addresses', to: 'sendAda' }, - { label: 'Send multi-assets', to: 'sendAssets' }, - { label: 'Send tokens', to: 'sendToken' }, - { label: 'Send assets to Handle', to: 'sendAdaHandler' }, - { label: 'Send value', to: 'sendValue' }, - { label: 'Coin selection', to: 'coinSelection' }, - { label: 'Set collateral', to: 'setCollateral' }, - { label: 'Set required signers', to: 'setRequiredSigners' }, - { label: 'Set time limit', to: 'setTimeLimit' }, - { label: 'Set metadata', to: 'setMetadata' }, - { label: 'Set Native Script', to: 'setNativeScriptInput' }, - ]; - - let codeRecipient = ``; - codeRecipient += `type Recipient =\n`; - codeRecipient += ` | string\n`; - codeRecipient += ` | {\n`; - codeRecipient += ` address: string;\n`; - codeRecipient += ` datum?: {\n`; - codeRecipient += ` value: Data;\n`; - codeRecipient += ` inline?: boolean;\n`; - codeRecipient += ` };\n`; - codeRecipient += ` script?: PlutusScript | NativeScript;\n`; - codeRecipient += ` };\n`; - - return ( - <> - - - } - > - - - - - - - - - - - - - - ); -}; - -export default TransactionPage; diff --git a/apps/mesh-web/pages/apis/transaction/minting.tsx b/apps/mesh-web/pages/apis/transaction/minting.tsx deleted file mode 100644 index e3b066671..000000000 --- a/apps/mesh-web/pages/apis/transaction/minting.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { FireIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import CommonLayout from '../../../components/common/layout'; -import Burning from '../../../components/pages/apis/transaction/minting/burning'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import Minting from '../../../components/pages/apis/transaction/minting/minting'; -import Metatags from '../../../components/site/metatags'; -import MintingNativeScript from '../../../components/pages/apis/transaction/minting/mintingNativeScript'; -import MintingRoyaltyToken from '../../../components/pages/apis/transaction/minting/mintingRoyaltyToken'; -import MintinPlutusScript from '../../../components/pages/apis/transaction/minting/mintingPlutusScript'; - -const TransactionMintingPage: NextPage = () => { - const sidebarItems = [ - { label: 'Minting assets', to: 'minting' }, - { label: 'Burning assets', to: 'burning' }, - { label: 'Minting with Native Script', to: 'mintingNativeScript' }, - { label: 'Minting with Plutus Script', to: 'mintingPlutusScript' }, - { label: 'Minting Royalty Token', to: 'mintingRoyaltyToken' }, - ]; - - return ( - <> - - - } - /> - - - - - - - - ); -}; - -export default TransactionMintingPage; diff --git a/apps/mesh-web/pages/apis/transaction/smart-contract.tsx b/apps/mesh-web/pages/apis/transaction/smart-contract.tsx deleted file mode 100644 index a611d95b6..000000000 --- a/apps/mesh-web/pages/apis/transaction/smart-contract.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { NewspaperIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import CommonLayout from '../../../components/common/layout'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import DesignDatum from '../../../components/pages/apis/transaction/smart-contract/datum'; -import LockAssets from '../../../components/pages/apis/transaction/smart-contract/lockAssets'; -import UsingRedeemer from '../../../components/pages/apis/transaction/smart-contract/redeemer'; -import PlutusMinting from '../../../components/pages/apis/transaction/smart-contract/plutus-minting'; -import UnlockAssets from '../../../components/pages/apis/transaction/smart-contract/unlockAssets'; -import Metatags from '../../../components/site/metatags'; -import InlineDatum from '../../../components/pages/apis/transaction/smart-contract/inlineDatum'; -import ReferenceScript from '../../../components/pages/apis/transaction/smart-contract/referenceScript'; - -const TransactionMintingPage: NextPage = () => { - const sidebarItems = [ - { label: 'Lock assets in smart contract', to: 'lockAssets' }, - { label: 'Unlock assets from smart contract', to: 'unlockAssets' }, - { label: 'Minting assets with smart contract', to: 'plutusminting' }, - { label: 'Inline datum', to: 'inlineDatum' }, - { label: 'Reference script', to: 'referenceScript' }, - { label: 'Designing datum', to: 'datum' }, - { label: 'Using redeemer', to: 'redeemer' }, - ]; - - return ( - <> - - - } - /> - - - - - - - - - - ); -}; - -export default TransactionMintingPage; diff --git a/apps/mesh-web/pages/apis/transaction/staking.tsx b/apps/mesh-web/pages/apis/transaction/staking.tsx deleted file mode 100644 index 1b979dba1..000000000 --- a/apps/mesh-web/pages/apis/transaction/staking.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { ArrowsPointingInIcon } from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import CommonLayout from '../../../components/common/layout'; -import DelegateStake from '../../../components/pages/apis/transaction/staking/delegateStake'; -import CommonHero from '../../../components/pages/apis/transaction/commonHero'; -import Metatags from '../../../components/site/metatags'; -import RegisterStake from '../../../components/pages/apis/transaction/staking/registerStake'; -// import DeregisterStake from '../../../components/pages/apis/transaction/staking/deregisterStake'; -// import WithdrawRewards from '../../../components/pages/apis/transaction/staking/withdrawRewards'; - -const TransactionStakingPage: NextPage = () => { - const sidebarItems = [ - { label: 'Delegate Stake', to: 'delegateStake' }, - { label: 'Register Stake', to: 'registerStake' }, - - // { label: 'Withdraw Rewards', to: 'withdrawRewards' }, - // { label: 'Deregister Stake', to: 'deregisterStake' }, - - // { label: 'Register Pool', to: 'registerPool' }, - // { label: 'Retire Pool', to: 'retirePool' }, - ]; - - return ( - <> - - - } - /> - - - {/* - */} - - - ); -}; - -export default TransactionStakingPage; diff --git a/apps/mesh-web/pages/courses/index.tsx b/apps/mesh-web/pages/courses/index.tsx deleted file mode 100644 index c00772292..000000000 --- a/apps/mesh-web/pages/courses/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; - -const CoursesPage: NextPage = () => { - return ( - <> - - List of courses - - ); -}; - -export default CoursesPage; diff --git a/apps/mesh-web/pages/courses/intro-to-web3/basic-transactions/send-lovelace.tsx b/apps/mesh-web/pages/courses/intro-to-web3/basic-transactions/send-lovelace.tsx deleted file mode 100644 index 88fa184aa..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/basic-transactions/send-lovelace.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CourseLayout from '../../../../components/courses/layout'; -import Codeblock from '../../../../components/ui/codeblock'; -import Sidebar from './../common/sidebar'; - -const CoursesSendLovelacePage: NextPage = () => { - return ( - } - title={`Send Lovelace`} - desc={`A nice description here`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesSendLovelacePage; - -function Content() { - return ( - <> -

    some intro

    -

    what is lovelace

    -

    - what is transaction, since this is first time transaction is mentioned - in the course -

    -

    If need image, put image into public/courses/intro-to-web3/:

    -
    - -
    Visual Studio Code workspace setup
    -
    -

    Concise heading

    -

    some more words.

    -

    if need inline code to say BrowserWallet.

    -

    If need code

    - -

    - If need link to internal page:{' '} - starter templates -

    -

    - if need external page{' '} - - http://localhost:3000 - - . -

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/browser-wallet/connect-wallet.tsx b/apps/mesh-web/pages/courses/intro-to-web3/browser-wallet/connect-wallet.tsx deleted file mode 100644 index a4b8de842..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/browser-wallet/connect-wallet.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import type { NextPage } from 'next'; -import CourseLayout from '../../../../components/courses/layout'; -import Sidebar from './../common/sidebar'; -import { CardanoWallet } from '@meshsdk/react'; -import Codeblock from '../../../../components/ui/codeblock'; - -const CoursesConnectWalletPage: NextPage = () => { - return ( - } - title={`Connect Wallet Component`} - desc={`Connect Wallet user interface component allows users to connect to your application with their Cardano wallets.`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesConnectWalletPage; - -function Content() { - return ( - <> -

    - Suppose you're looking to bring people to your website, where they can - mint an NFT or interact with a smart contract; they won't get very far - unless they can connect their wallet easily. This is where Mesh connect - wallet component comes in, to make it easier for you as a developer to - add these buttons on your website. From the end users' perspective, it - allows them to connect to your websites with just a few clicks. This - section will show how to add a connect wallet button to your website. -

    - -

    This is the connect wallet button component:

    - - - -

    - When you click on this button, you will notice that you can choose to - connect to any wallets you have installed on your device. If it is the - first time connecting to a site, your wallet will prompt and ask you for - permission to allow the website to connect. -

    - -

    - Let's look at the code to see how we can use CardanoWallet. - Open the pages/index.tsx file. You will notice the import - statement at the top of the file: -

    - - - -

    - This allows you to import the CardanoWallet component and - use it your application. -

    - -

    - If you scroll down the pages/index.tsx file, you will - notice: -

    - - '} isJson={false} /> - -

    - This is the connect wallet component that is showing in your starter - kit. -

    - -

    - It is important to note that, we need to set up the{' '} - MeshProvider that provides all the context to be consumed - by your application. -

    - -

    - Open the pages/_app.tsx file, you will see: -

    - - \n \n'} - isJson={false} - /> - -

    - MeshProvider provides the current state of the connected - wallet. This "state" is call "context", and setting it up is as easy as - wrapping your application with MeshProvider. With this - context, you can use the connected wallet throughout your application. - This allows you to use any React hooks provided by Mesh. We will use - them later. -

    -

    - With the connected wallet, you can start developing all the fun - interactions that you want to provide on your website. For example, you - can show your visitors your project's NFTs that they are holding in - their wallets, or even just convert them into potential buyers for your - product and services.. -

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/common/sidebar.tsx b/apps/mesh-web/pages/courses/intro-to-web3/common/sidebar.tsx deleted file mode 100644 index 41642c960..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/common/sidebar.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import CoursesSidebar from '../../../../components/courses/courseSidebar'; - -export default function Sidebar({}) { - const menu = [ - { - type: 'submenu', - label: 'Welcome', - url: 'welcome', - children: [ - { - label: 'About this course', - url: 'about-course', - }, - { - label: 'Motivation', - url: 'motivation', - }, - ], - }, - { - type: 'submenu', - label: 'System setup', - url: 'system-setup', - children: [ - { - label: 'Install Node.js', - url: 'install-nodejs', - }, - { - label: 'Install VS code', - url: 'install-vscode', - }, - { - label: 'Install wallet', - url: 'install-wallet', - }, - { - label: 'Install GitHub', - url: 'install-github', - }, - { - label: 'Create project', - url: 'create-project', - }, - ], - }, - { - type: 'submenu', - label: 'Browser wallet', - url: 'browser-wallet', - children: [ - { - label: 'React connect wallet', - url: 'connect-wallet', - }, - { - label: 'Get wallet info', - url: 'get-wallet-info', - }, - ], - }, - { - type: 'submenu', - label: 'Basic transactions', - url: 'basic-transactions', - children: [ - // { - // label: 'Lovelace from faucet', - // url: 'get-lovelace', - // }, - { - label: 'Send lovelace', - url: 'send-lovelace', - }, - { - label: 'Send assets', - url: 'send-assets', - }, - ], - }, - { - type: 'submenu', - label: 'App Wallet', - url: 'app-wallet', - children: [ - { - label: 'Intro App Wallet', - url: 'app-wallet', - }, - { - label: 'Generate wallet', - url: 'generate-wallet', - }, - { - label: 'Load wallet', - url: 'load-wallet', - }, - ], - }, - { - type: 'submenu', - label: 'Minting', - url: 'app-wallet', - children: [ - { - label: 'Policy script', - url: 'policy-script', - }, - { - label: 'Asset metadata', - url: 'asset-metadata', - }, - { - label: 'Minting NFT', - url: 'minting-nft', - }, - { - label: 'Multi-signature Minting', - url: 'multisig-minting', - }, - ], - }, - { - type: 'submenu', - label: 'Smart contract', - url: 'smart-contracts', - children: [ - { - label: 'Script', - url: 'script', - }, - { - label: 'Redeemer', - url: 'redeemer', - }, - { - label: 'Designing datum', - url: 'designing-datum', - }, - { - label: 'Lock assets', - url: 'lock-assets', - }, - { - label: 'Unlock assets', - url: 'unlock-assets', - }, - ], - }, - ]; - - return ; -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/index.tsx b/apps/mesh-web/pages/courses/intro-to-web3/index.tsx deleted file mode 100644 index 5cc21aedd..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../../components/site/metatags'; - -const CoursesPage: NextPage = () => { - return ( - <> - - List of courses - - ); -}; - -export default CoursesPage; diff --git a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/create-project.tsx b/apps/mesh-web/pages/courses/intro-to-web3/system-setup/create-project.tsx deleted file mode 100644 index c0b5bdb3b..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/create-project.tsx +++ /dev/null @@ -1,122 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CourseLayout from '../../../../components/courses/layout'; -import Codeblock from '../../../../components/ui/codeblock'; -import Sidebar from './../common/sidebar'; - -const CoursesCreateProjectPage: NextPage = () => { - return ( - } - title={`Create a new project`} - desc={`Use starter templates to kick start your project.`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesCreateProjectPage; - -function Content() { - return ( - <> -

    - The front-end of your application is the user interface that users will - interact with. This can be built using any web development framework. In - this course, we will be building it on Next.js. -

    - -

    Prepare Workspace

    -

    Let's get started!

    -
      -
    1. - Create a folder, give it a project name, it should not have any space - (e.g. my-first-app) -
    2. -
    3. Open Visual Studio Code (VS Code)
    4. -
    5. - From the menu, select File >{' '} - Add Folder to Workspace -
    6. -
    7. - Browse to the folder you have created and Add folder into - your VS Code workspace -
    8. -
    9. - From the menu, select Terminal >{' '} - New Terminal -
    10. -
    -

    - Your VS Code is ready. You have your VS Code opened, where the working - directory is the folder that you have just created, and the Terminal is - opened as well. -

    -
    - -
    Visual Studio Code workspace setup
    -
    -

    Install starter template

    -

    Next, we will install a starter template.

    -

    - In Mesh SDK, we have a number of{' '} - starter templates to choose from, - you can browse, filter them, choose a project and install it. Installing - one of templates is the quickest way to get started. -

    -

    - In this course, we will kick start with the most basic template,{' '} - Starter Next.js TypeScript. From the Terminal, run: -

    - -

    - This command is initialize a new project on Next.js. This starter - template consists of a connect wallet button and wallet integration. -

    -

    - Installation should take between 20 seconds to 1 minute. When it is - done, you should see: -

    -

    - ✨✨ Welcome to Web 3.0! ✨✨ -

    -

    To start the local web server, from the Terminal, run:

    - -

    Reading the Terminal it should show

    -

    - - ready - started server on 0.0.0.0:3000, url: http://localhost:3000 - -

    -

    - Go to your browser, and open{' '} - - http://localhost:3000 - - . You should see the starter template, with a connect wallet component - in the middle. -

    - -
    - -
    Next.js starter template on web browser
    -
    - -

    - Click on the Connect Wallet button, you should be able to - see a list of wallets you have installed on your device. Choose a wallet - to connect. If you have any trouble getting your wallet to connect, you - may need to enable dApp access from your wallet interface. -

    -

    - If you have successfully connected your wallet, the wallet component - should show the connected wallet's logo. -

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-github.tsx b/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-github.tsx deleted file mode 100644 index 03306583f..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-github.tsx +++ /dev/null @@ -1,174 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CourseLayout from '../../../../components/courses/layout'; -import Sidebar from './../common/sidebar'; - -const CoursesInstallGithubPage: NextPage = () => { - return ( - } - title={`Get GitHub Account & Application`} - desc={`Get a GitHub account and download GitHub application`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesInstallGithubPage; - -function Content() { - return ( - <> -

    - - GitHub - {' '} - is a cloud-based service that helps developers store source code, and - collaborate with others on a project. GitHub also track and manage - changes to the code with version control. -

    -
    - -
    github.com
    -
    - -

    Sign Up a GitHub Account

    -

    To sign up for a GitHub account, follow these steps:

    -
      -
    1. - Go to{' '} - - github.com - {' '} - in your web browser. -
    2. -
    3. - Click on the "Sign up" button in the top-right corner of the page. -
    4. -
    5. - Fill out the form that appears with your personal information, - including your username, email address, and password. -
    6. -
    7. - Click on the "Sign up for GitHub" button at the bottom of the form to - create your account. -
    8. -
    -

    - After you sign up for a GitHub account, you can start using the service - to host and manage your code repositories, collaborate with others on - projects, and more. -

    - -

    Create a new repository

    -

    - You can store your projects' codes in GitHub repositories. You can use - repositories to collaborate with others and track your work. To create a - new repository on GitHub, follow these steps: -

    -
      -
    1. Log in to your GitHub account.
    2. -
    3. - In the top-right corner of the page, click on the plus sign (+) and - select "New repository" from the drop-down menu. -
    4. -
    5. - Enter a name for your repository, for example, - "mesh-intro-web3-course" -
    6. -
    7. you may add a brief description (optional).
    8. -
    9. - Select whether you want the repository to be public or private. Public - repositories are visible to everyone, while private repositories are - only visible to you and the people you invite to access them. -
    10. -
    11. - Click on the "Create repository" button to create your new repository. -
    12. -
    -

    - After your repository is created, you can start adding files to it, - creating branches, and collaborating with others on your project. You - can also customize the settings and options for your repository to suit - your specific needs. -

    -

    GitHub Desktop

    -

    - GitHub Desktop is a free and open-source Git client, a useful tool for - developers who want to use Git and GitHub to manage their code - repositories. It is available for Windows and MacOS, and it provides a - user-friendly graphical interface for common Git operations such as - cloning, committing, and pushing changes to a repository. To install - GitHub Desktop, follow these steps: Download the . -

    -
      -
    1. - Go to the{' '} - - GitHub Desktop - {' '} - . -
    2. -
    3. - Click on the "Download for Mac" or "Download for Windows" button, - depending on your operating system. -
    4. -
    5. - Save the installation file to your computer and run it to begin the - installation process. -
    6. -
    7. Follow the on-screen instructions to complete the installation.
    8. -
    -

    - After you have installed GitHub Desktop, to log in to GitHub Desktop, - follow these steps: -

    -
      -
    1. Launch GitHub Desktop on your computer.
    2. -
    3. In the application window, click on the "Sign in" button.
    4. -
    5. - Enter your GitHub username and password, and then click on the "Sign - in" button. -
    6. -
    7. - Click on the "Authorize" button to allow GitHub Desktop to access your - account. -
    8. -
    -

    - After you log in to GitHub Desktop, you can start using the application - to manage your Git repositories, collaborate with others on projects, - and more. You can also use GitHub Desktop to access the GitHub website, - view your profile and repositories, and more. -

    -

    To clone a repository on GitHub Desktop, follow these steps:

    -
      -
    1. - Click on the "File" menu and select "Clone Repository" from the - drop-down menu. -
    2. -
    3. - In the "Clone a Repository" window, select the repository you have - just created. -
    4. -
    5. - Click on the "Choose..." button to select a local destination for the - cloned repository. -
    6. -
    7. Click on the "Clone" button to clone the repository.
    8. -
    -

    - After the repository is cloned, you can access it from the local - destination you specified, and you can use GitHub Desktop to manage and - work with the repository. You can also push changes you make to the - local repository back to the remote repository on GitHub. -

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-nodejs.tsx b/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-nodejs.tsx deleted file mode 100644 index d565fc91b..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-nodejs.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import type { NextPage } from 'next'; -import CourseLayout from '../../../../components/courses/layout'; -import Codeblock from '../../../../components/ui/codeblock'; -import Sidebar from './../common/sidebar'; - -const CoursesInstallNodejsPage: NextPage = () => { - return ( - } - title={`Install Node.js`} - desc={`Before we build our first app, let's get Node.js, a JavaScript - runtime environment, and Node Package Module (NPM).`} - // youtubeId="EhOVLH3r2Go" - > - - - ); -}; - -export default CoursesInstallNodejsPage; - -function Content() { - return ( - <> -

    - - Node.js - {' '} - is an open-source, cross-platform{' '} - - runtime environment - {' '} - , It allows developers to run JavaScript on the server side, creating - web applications that can generate dynamic content. Node.js runs on the{' '} - - V8 JavaScript Engine - {' '} - and executes JavaScript code outside a web browser. Node.js uses an - event-driven, non-blocking I/O model that makes it lightweight and - efficient, perfect for data-intensive real-time applications that run - across distributed devices. -

    -

    - - NPM - {' '} - is the package module which helps javascript developers install - dependencies effectively. It stands for Node Package Manager and it's a - command-line tool that comes with Node.js that allows developers to - install and manage a wide variety of third-party JavaScript libraries - and packages for use in their own projects. It also makes it easy for - developers to share and reuse code by publishing their own packages to - the NPM registry, which is a public repository of packages of - open-source code. NPM is an essential part of the Node.js ecosystem and - is widely used by developers to streamline their workflow and build - powerful applications. NPM is the default package manager for Node.js. -

    -

    Installation of Node.js and NPM

    -

    - Installation of Node.js and NPM is straightforward using the installer - package available at Node.js official web site. -

    -

    - To install Node.js, you will need to download the appropriate installer - for your operating system from the official Node.js website. Once the - download is complete, you can run the installer and follow the on-screen - instructions to complete the installation. -

    -

    Here is a brief overview of the steps you will need to follow:

    -
      -
    1. - Go to the official{' '} - - Node.js - {' '} - website -
    2. -
    3. - Click on the "Download" button to download the LTS version of Node.js. -
    4. -
    5. - Once the download is complete, run the installer and follow the - on-screen instructions to complete the installation. -
    6. -
    -

    - Keep in mind that the exact steps may vary depending on your operating - system, so you may need to consult the official Node.js documentation - for more detailed instructions. -

    -

    - Once the installation is complete, you can verify that Node.js has been - successfully installed by opening a command prompt or terminal window - and typing: -

    - -

    and test npm by printing its version using command:

    - -

    You should see the Node and NPM version you have installed.

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-vscode.tsx b/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-vscode.tsx deleted file mode 100644 index 1a5e98ef2..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-vscode.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import type { NextPage } from 'next'; -import CourseLayout from '../../../../components/courses/layout'; -import Codeblock from '../../../../components/ui/codeblock'; -import Sidebar from './../common/sidebar'; - -const CoursesInstallVScodePage: NextPage = () => { - return ( - } - title={`Install Visual Studio Code`} - desc={`Download Visual Studio Code, one of the most popular developer source-code editor.`} - youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesInstallVScodePage; - -function Content() { - return ( - <> -

    - Visual Studio Code (VS Code) is a lightweight but powerful source code - editor. Getting up and running with Visual Studio Code is quick and - easy. It is available for Windows, macOS, and Linux operating systems. -

    -

    - To install Visual Studio Code, you will need to download the appropriate - installer for your operating system from the official Visual Studio Code - website. Once the download is complete, you can run the installer and - follow the on-screen instructions to complete the installation. -

    - -

    Here is a brief overview of the steps you will need to follow:

    -
      -
    1. - Go to the official{' '} - - Visual Studio Code website - - . -
    2. -
    3. Click on the "Download" button to download the latest version.
    4. -
    5. - Once the download is complete, run the installer and follow the - on-screen instructions to complete the installation. -
    6. -
    -

    - Keep in mind that the exact steps may vary depending on your operating - system, so you may need to consult the official Visual Studio Code - documentation for more detailed instructions. -

    - - -

    - Check out the following docs by Visual Studio Code to learn more about: -

    - -

    Install Useful Extensions

    -

    - Visual Studio Code{' '} - - extensions - {' '} - can add more features to the overall development experience. Here are - some extensions that I'm using: -

    - - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-wallet.tsx b/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-wallet.tsx deleted file mode 100644 index 25dcdbf04..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/system-setup/install-wallet.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CourseLayout from '../../../../components/courses/layout'; -import Sidebar from './../common/sidebar'; - -const CoursesInstallWalletPage: NextPage = () => { - return ( - } - title={`Install Cardano Wallet`} - desc={`Download Cardano wallet to interact with the Cardano blockchain ecosystem`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesInstallWalletPage; - -function Content() { - return ( - <> -

    - Cardano wallets allow users to store ADA and tokens, interact with the - Cardano blockchain ecosystem and decentralized applications (dApps). - Users can use the wallet to directly access a wide range of - Cardano-based dApps to purchase NFTs, access to decentralized finance - (DeFi) apps, and more. -

    -

    - Many Cardano wallets are extensions compatible with popular browsers - like Chrome. Here are a{' '} - - list of Cardano wallets - - . But note that, not all wallets are accordance to{' '} - - CIP-30 - - , a standard for dApps to communicate with the user's wallet. -

    -

    - So, go ahead and pick one wallet, and install its browser extensions. In - the spirit of decentralization, I would not suggest any wallet in this - course. -

    -

    - On Mesh, all wallet APIs are accessible through{' '} - Browser Wallet, and developers - can add{' '} - Connect Wallet React component{' '} - on their dApp. We will deep dive into these later. -

    -

    Set Up Your Wallet

    -

    - After installation, under your browser extension's submenu, you should - see your newly-installed wallet. Clicking on it should open up the - wallet interface, welcoming you with a few options such as create wallet - and restore wallet. -

    -

    - If you do not have an existing wallet, you can create a new wallet, by - following the instructions. Generally, it should present your wallet's - recovery phrase, a combination of 12 to 24 words that you can use to - restore your wallet other devices. Ensure that you are not in a public - place, and no one is watching your screen, you write and keep your - wallet recovery phrase securely. The wallet interface will prompt you to - enter your recovery phrase. Next, it will prompt for a password, which - is require whenever you need to sign a transaction. -

    -

    - If you have a wallet, select restore wallet and enter your recovery - phrase. Ensure that no one is watching while you are doing it. After - entering your recovery phrase, it will prompt for a password, which is - require whenever you need to sign a transaction. -

    -

    - Change Network to preprod -

    -

    On Cardano, there are a few networks:

    -
      -
    • - Production network (mainnet) - Production is the live network, - also referred to as mainnet. It features official functionality - releases. -
    • -
    • - Pre-production (preprod) - Pre-production is the most mature - network for testing purposes, which resembles a production (mainnet) - environment. It is meant for testing release functionality before - deploying on mainnet. -
    • -
    • - Preview (preview) - Preview is the longer-term network - environment for testing release candidates and expanded test - scenarios. Preview is meant for testing mature release candidates. -
    • -
    -

    - Before you launch your app on Cardano, it is recommended to test your - applications on testnet. This is to test the functionality of the smart - contracts, and ensure all transactions are working as intented. These - tokens have no monetary value on testnet, so if there are any bugs, no - funds are lost. -

    -

    - Different wallets have different approach to change the network. Explore - around the wallet's interface and change your network to{' '} - pre-production (preprod). -

    -

    Deposit Some ADA

    -

    - Since the Cardano testnet is an independent network, separate from the - Cardano mainnet, it requires its own tokens. To fund your testnet - address, go to the{' '} - - testnet faucet - {' '} - and request some test ADA to your wallet on preprod. -

    -

    - The faucet is a web-based service that provides test ADA (tADA) to users - of the Cardano testnets. While these tokens have no 'real world' value, - they enable users to experiment with Cardano testnet features, without - having to spend ADA on the mainnet. -

    - - ); -} diff --git a/apps/mesh-web/pages/courses/intro-to-web3/welcome/template.tsx b/apps/mesh-web/pages/courses/intro-to-web3/welcome/template.tsx deleted file mode 100644 index 765abedf8..000000000 --- a/apps/mesh-web/pages/courses/intro-to-web3/welcome/template.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import CourseLayout from '../../../../components/courses/layout'; -import Codeblock from '../../../../components/ui/codeblock'; -import Sidebar from './../common/sidebar'; - -const CoursesSendLovelacePage: NextPage = () => { - return ( - } - title={`Send Lovelace`} - desc={`A nice description here`} - // youtubeId="ITxcbrfEcIY" - > - - - ); -}; - -export default CoursesSendLovelacePage; - -function Content() { - return ( - <> -

    say some intro

    -

    If need image:

    -
    - -
    Visual Studio Code workspace setup
    -
    -

    If need heading

    -

    some more words.

    -

    - If need link to internal page:{' '} - starter templates -

    -

    If need code

    - -

    - if need external page{' '} - - http://localhost:3000 - - . -

    - - ); -} diff --git a/apps/mesh-web/pages/debug/mesh/index.tsx b/apps/mesh-web/pages/debug/mesh/index.tsx deleted file mode 100644 index e990efc9d..000000000 --- a/apps/mesh-web/pages/debug/mesh/index.tsx +++ /dev/null @@ -1,252 +0,0 @@ -import { - MeshWallet, - BlockfrostProvider, - YaciProvider, - Transaction, -} from '@meshsdk/core'; -import { ForgeScript } from '@meshsdk/core'; -import type { Mint, AssetMetadata } from '@meshsdk/core'; -import { MeshTxBuilder } from '@meshsdk/core'; -import { MeshEscrowContract } from '@meshsdk/contracts'; - -export default function Mesh() { - function getBlockchainProvider() { - // const blockchainProvider = new BlockfrostProvider( - // process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - // ); - const blockchainProvider = new YaciProvider('http://localhost:8080/api/v1'); - return blockchainProvider; - } - - async function getMeshWallet() { - const blockchainProvider = getBlockchainProvider(); - const wallet = new MeshWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'mnemonic', - words: [ - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - ], - }, - }); - return wallet; - } - - async function getBalance() { - const wallet = await getMeshWallet(); - const getBalance = await wallet.getBalance(); - console.log('getBalance', getBalance); - } - - async function getChangeAddress() { - const wallet = await getMeshWallet(); - const getChangeAddress = await wallet.getChangeAddress(); - console.log('getChangeAddress', getChangeAddress); - } - - async function getNetworkId() { - const wallet = await getMeshWallet(); - const getNetworkId = await wallet.getNetworkId(); - console.log('getNetworkId', getNetworkId); - } - - async function getRewardAddresses() { - const wallet = await getMeshWallet(); - const getRewardAddresses = await wallet.getRewardAddresses(); - console.log('getRewardAddresses', getRewardAddresses); - } - - async function getUnusedAddresses() { - const wallet = await getMeshWallet(); - const getUnusedAddresses = await wallet.getUnusedAddresses(); - console.log('getUnusedAddresses', getUnusedAddresses); - } - - async function getUsedAddresses() { - const wallet = await getMeshWallet(); - const getUsedAddresses = await wallet.getUsedAddresses(); - console.log('getUsedAddresses', getUsedAddresses); - } - - async function getUtxos() { - const wallet = await getMeshWallet(); - const getUtxos = await wallet.getUtxos(); - console.log('getUtxos', getUtxos); - } - - async function signData() { - const wallet = await getMeshWallet(); - const signature = await wallet.signData('mesh'); - console.log('signData', signature); - } - - async function signTx() { - const wallet = await getMeshWallet(); - - // simple tx - - // const tx = new Transaction({ initiator: wallet }).sendLovelace( - // 'addr_test1qp2k7wnshzngpqw0xmy33hvexw4aeg60yr79x3yeeqt3s2uvldqg2n2p8y4kyjm8sqfyg0tpq9042atz0fr8c3grjmysdp6yv3', - // '5000000' - // ); - // const unsignedTx = await tx.build(); - // const signedTx = await wallet.signTx(unsignedTx); - // const txHash = await wallet.submitTx(signedTx); - // console.log('signTx', txHash); - - // minting - - // prepare forgingScript - const usedAddress = await wallet.getUsedAddresses(); - const address = usedAddress[0]; - const forgingScript = ForgeScript.withOneSignature(address); - - const tx = new Transaction({ initiator: wallet }); - - // define asset#1 metadata - const assetMetadata1: AssetMetadata = { - name: 'Mesh Token', - image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua', - mediaType: 'image/jpg', - description: 'This NFT was minted by Mesh (https://meshjs.dev/).', - }; - const asset1: Mint = { - assetName: 'MeshToken', - assetQuantity: '1', - metadata: assetMetadata1, - label: '721', - recipient: - 'addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr', - }; - tx.mintAsset(forgingScript, asset1); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx); - const txHash = await wallet.submitTx(signedTx); - console.log(1, txHash); - } - - async function getAssets() { - const wallet = await getMeshWallet(); - const getAssets = await wallet.getAssets(); - console.log('getAssets', getAssets); - } - - async function getLovelace() { - const wallet = await getMeshWallet(); - const getLovelace = await wallet.getLovelace(); - console.log('getLovelace', getLovelace); - } - - async function getPolicyIds() { - const wallet = await getMeshWallet(); - const getPolicyIds = await wallet.getPolicyIds(); - console.log('getPolicyIds', getPolicyIds); - } - - async function getPolicyIdAssets() { - const wallet = await getMeshWallet(); - const getPolicyIdAssets = await wallet.getPolicyIdAssets( - 'bc63b6d09c843439c476e5f50303e5898568e90398be1d30d67b3aa8' - ); - console.log('getPolicyIdAssets', getPolicyIdAssets); - } - - async function createCollateral() { - const wallet = await getMeshWallet(); - const createCollateral = await wallet.createCollateral(); - console.log('createCollateral', createCollateral); - } - - async function testSmartContract() { - const wallet = await getMeshWallet(); - - const blockchainProvider = getBlockchainProvider(); - - const meshTxBuilder = new MeshTxBuilder({ - fetcher: blockchainProvider, - submitter: blockchainProvider, - }); - - const contract = new MeshEscrowContract({ - mesh: meshTxBuilder, - fetcher: blockchainProvider, - wallet: wallet, - networkId: 0, - }); - - // initiateEscrow - - // const escrowAmount = [ - // { - // unit: 'lovelace', - // quantity: '10000000', - // }, - // ]; - - // const tx = await contract.initiateEscrow(escrowAmount); - // const signedTx = await wallet.signTx(tx); - // const txHash = await wallet.submitTx(signedTx); - // console.log(1, txHash); - - // cancelEscrow - const utxo = await contract.getUtxoByTxHash( - // note, must change this to the txhash of the previous tx - 'f40f880e1571b332c426ba2769e98a62aa13446e66fe876eaf94724a0b53643a' - ); - - if (utxo) { - const tx = await contract.cancelEscrow(utxo); - const signedTx = await wallet.signTx(tx, true); - const txHash = await wallet.submitTx(signedTx); - console.log(1, txHash); - } - } - - return ( - <> -
    - - - - - - - - - - - - - - - -
    - - ); -} diff --git a/apps/mesh-web/pages/debug/mesh/minting.tsx b/apps/mesh-web/pages/debug/mesh/minting.tsx deleted file mode 100644 index fa08dbb4a..000000000 --- a/apps/mesh-web/pages/debug/mesh/minting.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { - MeshWallet, - BlockfrostProvider, - Transaction, - ForgeScript, -} from '@meshsdk/core'; -import type { Mint, AssetMetadata } from '@meshsdk/core'; -import { CardanoWallet, useWallet } from '@meshsdk/react'; - -export default function MeshWalletMinting() { - const { wallet: clientWallet, connected } = useWallet(); - - function getMeshWallet() { - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - return new MeshWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'mnemonic', - words: [ - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - 'solution', - ], - }, - }); - } - - async function meshWalletCreateTx(recipient) { - const meshWallet = getMeshWallet(); - - const usedAddress = await meshWallet.getUsedAddresses(); - const address = usedAddress[0]; - const forgingScript = ForgeScript.withOneSignature(address); - - const assetMetadata1: AssetMetadata = { - name: 'Mesh Token', - image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua', - mediaType: 'image/jpg', - description: 'This NFT was minted by Mesh (https://meshjs.dev/).', - }; - const asset1: Mint = { - assetName: 'MeshToken', - assetQuantity: '1', - metadata: assetMetadata1, - label: '721', - recipient: recipient, - }; - - const tx = new Transaction({ initiator: meshWallet }); - tx.mintAsset(forgingScript, asset1); - tx.sendLovelace(address, '15000000'); - - const unsignedTx = await tx.build(); - return unsignedTx; - } - - async function meshWalletSignTx(tx) { - const meshWallet = getMeshWallet(); - const signedTx = await meshWallet.signTx(tx, true); - const txHash = await meshWallet.submitTx(signedTx); - return txHash; - } - - async function mintMeshToken() { - const changeAddress = await clientWallet.getChangeAddress(); - const unsignedTx = await meshWalletCreateTx(changeAddress); - const signedTx = await clientWallet.signTx(unsignedTx, true); - const txhash = await meshWalletSignTx(signedTx); - } - - return ( - <> - {connected ? ( - - ) : ( - - )} - - ); -} diff --git a/apps/mesh-web/pages/debug/yaci/index.tsx b/apps/mesh-web/pages/debug/yaci/index.tsx deleted file mode 100644 index 43e5a8a60..000000000 --- a/apps/mesh-web/pages/debug/yaci/index.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import { MeshVestingContract } from '@meshsdk/contracts'; -import { YaciProvider } from '@meshsdk/core'; -import { Transaction } from '@meshsdk/core'; -import { AppWallet } from '@meshsdk/core'; -import { Asset, MeshTxBuilder } from '@meshsdk/core'; -import { useState } from 'react'; - -/** - * https://github.com/bloxbean/yaci-devkit - * - * run docker - * - * sh start.sh - * sh yaci-cli.sh - * - * create-node -o --start - * - * topup addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr 20 - * topup addr_test1vzzqs77gk87vjuvtqvh0ndfj7jhyn5etpwh6neuqjjp6gvccsv2cg 20 - * - * http://localhost:8080/swagger-ui/index.html - * http://localhost:5173 - */ - -const wallet_1_addr = - 'addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr'; -const wallet_2_addr = - 'addr_test1vzzqs77gk87vjuvtqvh0ndfj7jhyn5etpwh6neuqjjp6gvccsv2cg'; -const wallet_1_key = - 'xprv1cqa46gk29plgkg98upclnjv5t425fcpl4rgf9mq2txdxuga7jfq5shk7np6l55nj00sl3m4syzna3uwgrwppdm0azgy9d8zahyf32s62klfyhe0ayyxkc7x92nv4s77fa0v25tufk9tnv7x6dgexe9kdz5gpeqgu'; -const wallet_2_key = - 'xprv1hrx48cklpwdzjz529zg85zjguw4qywp78687mxxpnt9xuxgx5pfupgccv808pn2rp7l6fhujt8tjvuu6tfjxlgqswyrf89f3ehczj5390vfsruelhjgr6h5puyg4n0sh957tu7t4wxah23s3szw6rc34rua5r46x'; - -export default function Yaci() { - const [savedTxHash, setSavedTxHash] = useState(''); - - function getWallet(id = 1) { - const blockchainProvider = new YaciProvider('http://localhost:8080/api/v1'); - - const wallet = new AppWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'root', - bech32: id == 2 ? wallet_2_key : wallet_1_key, - }, - }); - - return wallet; - } - - async function checkUtxo() { - const blockchainProvider = new YaciProvider('http://localhost:8080/api/v1'); - const utxos = await blockchainProvider.fetchAddressUTxOs(wallet_1_addr); - console.log(1, utxos); - // const pp = await blockchainProvider.fetchProtocolParameters(); - // console.log(2, pp); - } - - async function buildTxSendAda() { - const address = wallet_1_addr; - - const blockchainProvider = new YaciProvider('http://localhost:8080/api/v1'); - - const wallet = getWallet(); - - const utxos = await blockchainProvider.fetchAddressUTxOs(address); - console.log('utxos', utxos); - - const tx = new Transaction({ initiator: wallet }); - tx.setTxInputs(utxos); - tx.sendLovelace(address, '10000000'); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx); - const txHash = await wallet.submitTx(signedTx); - console.log('txHash', txHash); - } - - function vestingContract(wallet) { - const blockchainProvider = new YaciProvider('http://localhost:8080/api/v1'); - - const meshTxBuilder = new MeshTxBuilder({ - fetcher: blockchainProvider, - submitter: blockchainProvider, - }); - - const contract = new MeshVestingContract({ - mesh: meshTxBuilder, - fetcher: blockchainProvider, - wallet: wallet, - networkId: 0, - }); - - return contract; - } - - async function vestingLock() { - const wallet = getWallet(); - - const contract = vestingContract(wallet); - - const assets: Asset[] = [ - { - unit: 'lovelace', - quantity: '8000000', - }, - ]; - - const lockUntilTimeStamp = new Date(); - lockUntilTimeStamp.setMinutes(lockUntilTimeStamp.getMinutes() + 1); - - const beneficiary = wallet_2_addr; - - // todo hinson - const tx = await contract.depositFund( - assets, - lockUntilTimeStamp.getTime(), - beneficiary - ); - - // const signedTx = await wallet.signTx(tx); - // const txHash = await wallet.submitTx(signedTx); - // console.log('txHash', txHash); - // setSavedTxHash(txHash); - } - - async function vestingUnlock() { - const wallet = getWallet(2); - - const contract = vestingContract(wallet); - - const utxo = await contract.getUtxoByTxHash(savedTxHash); - console.log('utxo', utxo); - - if (utxo) { - const tx = await contract.withdrawFund(utxo); - const signedTx = await wallet.signTx(tx, true); - const txHash = await wallet.submitTx(signedTx); - console.log('txHash', txHash); - } - } - - return ( - <> -
    - - - - -
    - - ); -} diff --git a/apps/mesh-web/pages/getting-started/index.tsx b/apps/mesh-web/pages/getting-started/index.tsx deleted file mode 100644 index 9ea7e82be..000000000 --- a/apps/mesh-web/pages/getting-started/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { - CubeTransparentIcon, - DocumentTextIcon, - WrenchScrewdriverIcon, -} from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const GettingStartedPage: NextPage = () => { - const items = [ - { - title: 'Guides', - desc: 'Step-by-step guides to start your projects and build on Cardano', - link: '/guides', - thumbnailHeroicon: , - }, - { - title: 'Starter Templates', - desc: 'Kick start your projects with our templates using CLI', - link: '/starter-templates', - thumbnailHeroicon: , - }, - { - title: 'Migration / Manual Installation', - desc: 'Use Mesh into your existing project, you can choose the stack and configure them.', - link: '/migration-manual-installation', - thumbnailHeroicon: , - }, - ]; - - return ( - <> - -
    -
    -

    - Getting Started -

    -

    - Mesh has been designed from the start for gradual adoption, and you - can use as little or as much as you need. Whether you want to build - an application to connect wallet and display what's in your wallet - or start a complex dApp to create transactions and interact with - Cardano blockchain and smart contracts - this section will help you - get started. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default GettingStartedPage; diff --git a/apps/mesh-web/pages/guides/aiken.tsx b/apps/mesh-web/pages/guides/aiken.tsx deleted file mode 100644 index 15c2d1cae..000000000 --- a/apps/mesh-web/pages/guides/aiken.tsx +++ /dev/null @@ -1,462 +0,0 @@ -import type { NextPage } from 'next'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -let validatorCode = ``; -validatorCode += `use aiken/hash.{Blake2b_224, Hash}\n`; -validatorCode += `use aiken/list\n`; -validatorCode += `use aiken/transaction.{ScriptContext}\n`; -validatorCode += `use aiken/transaction/credential.{VerificationKey}\n`; -validatorCode += ` \n`; -validatorCode += `type Datum {\n`; -validatorCode += ` owner: Hash,\n`; -validatorCode += `}\n`; -validatorCode += ` \n`; -validatorCode += `type Redeemer {\n`; -validatorCode += ` msg: ByteArray,\n`; -validatorCode += `}\n`; -validatorCode += ` \n`; -validatorCode += `validator {\n`; -validatorCode += ` fn hello_world(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {\n`; -validatorCode += ` let must_say_hello =\n`; -validatorCode += ` redeemer.msg == "Hello, World!"\n`; -validatorCode += ` \n`; -validatorCode += ` let must_be_signed =\n`; -validatorCode += ` list.has(context.transaction.extra_signatories, datum.owner)\n`; -validatorCode += ` \n`; -validatorCode += ` must_say_hello && must_be_signed\n`; -validatorCode += ` }\n`; -validatorCode += `}\n`; - -let importCode = ``; -importCode += `import {\n`; -importCode += ` resolvePlutusScriptAddress,\n`; -importCode += ` Transaction,\n`; -importCode += ` KoiosProvider,\n`; -importCode += ` resolveDataHash,\n`; -importCode += ` resolvePaymentKeyHash,\n`; -importCode += `} from "@meshsdk/core";\n`; -importCode += `import type { PlutusScript, Data } from "@meshsdk/core";\n`; -importCode += `import { CardanoWallet, useWallet } from "@meshsdk/react";\n`; -importCode += `\n`; -importCode += `import plutusScript from "../data/plutus.json";\n`; -importCode += `import cbor from "cbor";\n`; - -let lockingCode = ``; -lockingCode += `const hash = resolvePaymentKeyHash((await wallet.getUsedAddresses())[0]);\n`; -lockingCode += `const datum: Data = {\n`; -lockingCode += ` alternative: 0,\n`; -lockingCode += ` fields: [hash],\n`; -lockingCode += `};\n`; -lockingCode += `\n`; -lockingCode += `const tx = new Transaction({ initiator: wallet }).sendLovelace(\n`; -lockingCode += ` {\n`; -lockingCode += ` address: scriptAddress,\n`; -lockingCode += ` datum: { value: datum },\n`; -lockingCode += ` },\n`; -lockingCode += ` "5000000"\n`; -lockingCode += `);\n`; -lockingCode += `\n`; -lockingCode += `const unsignedTx = await tx.build();\n`; -lockingCode += `const signedTx = await wallet.signTx(unsignedTx);\n`; -lockingCode += `const txHash = await wallet.submitTx(signedTx);\n`; - -let utxoCode = ``; -utxoCode += `async function _getAssetUtxo({ scriptAddress, asset, datum }) {\n`; -utxoCode += ` const utxos = await koios.fetchAddressUTxOs(scriptAddress, asset);\n`; -utxoCode += `\n`; -utxoCode += ` const dataHash = resolveDataHash(datum);\n`; -utxoCode += `\n`; -utxoCode += ` let utxo = utxos.find((utxo: any) => {\n`; -utxoCode += ` return utxo.output.dataHash == dataHash;\n`; -utxoCode += ` });\n`; -utxoCode += `\n`; -utxoCode += ` return utxo;\n`; -utxoCode += `}\n`; - -let unlockCode = ''; -unlockCode += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; -unlockCode += `\n`; -unlockCode += `const address = (await wallet.getUsedAddresses())[0];\n`; -unlockCode += `const hash = resolvePaymentKeyHash(address);\n`; -unlockCode += `const datum: Data = {\n`; -unlockCode += ` alternative: 0,\n`; -unlockCode += ` fields: [hash],\n`; -unlockCode += `};\n`; -unlockCode += `\n`; -unlockCode += `const assetUtxo = await _getAssetUtxo({\n`; -unlockCode += ` scriptAddress: scriptAddress,\n`; -unlockCode += ` asset: "lovelace",\n`; -unlockCode += ` datum: datum,\n`; -unlockCode += `});\n`; -unlockCode += `\n`; -unlockCode += `const redeemer = { data: { alternative: 0, fields: ['Hello, World!'] } };\n`; -unlockCode += `\n`; -unlockCode += `// create the unlock asset transaction\n`; -unlockCode += `const tx = new Transaction({ initiator: wallet })\n`; -unlockCode += ` .redeemValue({\n`; -unlockCode += ` value: assetUtxo,\n`; -unlockCode += ` script: script,\n`; -unlockCode += ` datum: datum,\n`; -unlockCode += ` redeemer: redeemer,\n`; -unlockCode += ` })\n`; -unlockCode += ` .sendValue(address, assetUtxo)\n`; -unlockCode += ` .setRequiredSigners([address]);\n`; -unlockCode += `\n`; -unlockCode += `const unsignedTx = await tx.build();\n`; -unlockCode += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; -unlockCode += `const txHash = await wallet.submitTx(signedTx);\n`; - -const GuideAikenPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Aiken contract', to: 'writing' }, - { label: 'Lock transaction', to: 'lock' }, - { label: 'Unlock transaction', to: 'unlock' }, - ]; - - return ( - <> - - -

    - Aiken is a functional programming language created for Cardano smart - contract development. It prioritizes on-chain execution and offers a - user-friendly approach for building secure and efficient smart - contracts, making it a valuable choice for developers aiming to create - robust on-chain applications. -

    -

    - In this tutorial, we will walk you through the process of writing a - simple smart contract in Aiken, and create 2 transactions to lock and - unlock assets on the Cardano blockchain. -

    -

    - You can also try the{' '} - - live demo - {' '} - and here are the codes on the GitHub{' '} - - repository - -

    - - -

    System setup

    -

    - This section will guide you through the process of setting up your - system compile Aiken smart contracts. You can skip this section if - you have already set up your system or do not wish to compile the - contract. -

    -

    - You can also check the installation instructions on the{' '} - - Aiken website - {' '} - for more information. -

    -

    Using aikup (on Linux & MacOS only)

    -

    - If you are using Linux or MacOS, you can use the utility tool to - download and manage Aiken's pre-compiled executables. -

    -

    - You can install the Aiken CLI by running the following command in - your terminal: -

    - - -

    From sources (all platforms)

    - -

    - Aiken is written in Rust, so you will need to install Rust and Cargo - to compile the smart contract. You can install Rust by following the - instructions on the{' '} - - Rust website - - . -

    -

    - Next, you will need Cargo, the Rust package manager. You can install - Cargo by following the instructions on the{' '} - - Cargo website - - . -

    -

    - You will know you have successfully installed Rust and Cargo when - you can run the following commands in your terminal: -

    - - -

    - Next, you will need to install the Aiken CLI. You can install the - Aiken CLI by running the following command in your terminal: -

    - - - -

    Check your installation

    - -

    - You will know you have successfully installed the Aiken CLI when you - can run the following command in your terminal: -

    - - -

    - If you face any issues, please check the installation instructions - on the{' '} - - Aiken website - {' '} - for more information. -

    -
    - - -

    Writing a smart contract with Aiken

    -

    - In this section, we will walk you through the process of writing a - simple smart contract in Aiken. We will also create 2 transactions - to lock and unlock assets on the Cardano blockchain. -

    -

    - You can read more about this example on the{' '} - - Aiken website - - . -

    -

    Create a new project

    -

    - First, we will create a new project. Please refer to{' '} - - this guide - {' '} - for more information on creating a new Next.js project. -

    - -

    Next, we create a new Aiken project within this project folder:

    - - -

    - Remember to check your Aiken project by running `aiken check` after - creating a new project and as you develop the contract. -

    - -

    Write the smart contract

    - -

    - Let's create file for our validator, `validators/hello_world.ak`: -

    - - - -

    - This validator checks that the redeemer message is "Hello, World!" - and that the transaction is signed by the owner of the datum. If - both conditions are met, the validator returns `true`. Otherwise, it - returns `false`. -

    - -

    Let's compile the smart contract with the Aiken CLI:

    - - - -

    - This command will compile the smart contract and generate the - `plutus.json` file in the root folder. This file is a{' '} - - CIP-0057 Plutus blueprint - - , blueprint describes your on-chain contract and its binary - interface. -

    -
    - - -

    Creating locking transaction

    -

    Preparing the frontend

    -

    - In this section, we will prepare the frontend for our smart - contract. We will create a simple UI that allows users to lock and - unlock assets on the Cardano blockchain. -

    -

    Firstly, we need to install the `cbor` package:

    - - -

    - Then, we create a folder, `data` and copy the `plutus.json` file - into it. -

    - -

    Next, open `pages/index.tsx` and import the following packages:

    - - -

    Importing the contract

    -

    We import the contract into our frontend:

    - - - -

    - Here, we are using the `plutus.json` file to create the script. We - are also using the `resolvePlutusScriptAddress` function to resolve - the script address. -

    - -

    - If you look at it closely, we are encoding with cbor the compiled - code of the validator. This is because the validator is encoded in a - flat format, which is not the format expected by the cardano-cli and - `cardano serialization library`. -

    - -

    Locking assets

    - -

    - We create the transactions to lock assets on the Cardano blockchain: -

    - - - -

    - Here, we are creating a new transaction to lock assets on the - Cardano blockchain. We are using the `resolvePaymentKeyHash` - function to resolve the payment key hash of the wallet. We are also - using the `sendLovelace` function to send lovelace to the script - address. -

    - -

    - As the contracts requires the owner's address in the datum field, we - are creating a new datum with the owner's address. We are then using - the `build` function to build the transaction, the `signTx` function - to sign the transaction, and the `submitTx` function to submit the - transaction to the Cardano blockchain. -

    -
    - - -

    Unlocking assets

    - -

    Next, we create the transactions to unlock assets.

    - -

    - First, we create a useful function to retrieve the UTXO of the - locked assets: -

    - - - -

    - And here are the codes to create the transactions to unlock assets: -

    - - - -

    - Here, we are creating a new transaction to unlock assets on the - Cardano blockchain. We are using the `resolvePlutusScriptAddress` - function to resolve the script address. We are also using the - `resolvePaymentKeyHash` function to resolve the payment key hash of - the wallet. -

    - -

    - As the contracts requires the owner's address in the datum field, we - are creating a new datum with the owner's address. We are then using - the `_getAssetUtxo` function to retrieve the UTXO of the locked - assets. We are then using the `redeemValue` function to redeem the - locked assets, the `sendValue` function to send the assets to the - owner's address, and the `setRequiredSigners` function to set the - required signers. -

    -

    - As the validator requires `Hello, World!` as the redeemer message, - we are creating a new redeemer with the message `Hello, World!`. We - are then using the `build` function to build the transaction, the - `signTx` function to sign the transaction, and the `submitTx` - function to submit the transaction to the Cardano blockchain. -

    - -

    - You can check the full code on{' '} - - GitHub - - . -

    -
    -
    - - ); -}; - -export default GuideAikenPage; diff --git a/apps/mesh-web/pages/guides/custom-marketplace.tsx b/apps/mesh-web/pages/guides/custom-marketplace.tsx deleted file mode 100644 index db7a60ed6..000000000 --- a/apps/mesh-web/pages/guides/custom-marketplace.tsx +++ /dev/null @@ -1,332 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; -import Image from '../../components/ui/image'; - -const GuideCustomMarketplacePage: NextPage = () => { - const sidebarItems = [ - { label: 'Install Starter Kit', to: 'installstarter' }, - { label: 'Setup MongoDB', to: 'mongodb' }, - { label: 'Customize Marketplace', to: 'marketplace' }, - ]; - - return ( - <> - - - - - - - - - ); -}; - -function IntroSection() { - return ( - <> -

    - A NFT (Non-Fungible Token) marketplace is a digital platform that allows - users to buy and sell NFTs. NFTs are unique digital assets that are - stored on a blockchain, providing proof of ownership and authenticity. - NFT marketplaces provide a platform for artists, collectors, and - investors to showcase and trade their digital assets, including digital - art, music, videos, and other digital goods. -

    -

    - In this guide, we will show you how to build your own NFT marketplace on - a Cardano blockchain. With Mesh, we provide you with a ready-made - marketplace starter kit that you can customize to your needs. -

    - - Live demo - - - ); -} - -function InstallStarter() { - return ( - -

    Install starter kit

    -

    - To begin, you can use Mesh CLI to get the marketplace starter kit by - running the following command: -

    - -

    - Or clone from our{' '} - - GitHub repository - - . -

    -

    - Next you need to install the dependencies by running the following - command in the project directory: -

    - -
    - ); -} - -function Mongodb() { - return ( - -

    Setup MongoDB

    -

    What is MongoDB?

    -

    - MongoDB is a popular, open-source, document-oriented database management - system. It is designed to store and manage large volumes of unstructured - or semi-structured data, such as JSON documents, and provides high - performance and scalability. -

    -

    - Unlike traditional relational databases, MongoDB stores data in - flexible, JSON-like documents with dynamic schemas, which makes it - easier to represent complex hierarchical relationships and evolving data - structures. -

    -

    Create MongoDB Atlas Account

    -

    - The easiest way to get started with MongoDB is by using the Atlas - developer data platform. A free tier is available with basic database - functionalities. This free tier is more than enough for the purposes of - this tutorial.{' '} - - Register a free Atlas account - {' '} - with your email address (no credit card required). -

    -

    Deploy your first cluster

    -

    - Once you have created your account, you will be redirected to the Atlas - UI where you can create your first cluster. Give your cluster a name and - select the region where you want to deploy it. For this article, we will - use the free tier cluster. -

    -

    - Atlas free clusters provide a small-scale development environment to - host your data. Free clusters never expire, and provide access to a{' '} - - subset of Atlas features and functionality - - . Paid clusters provide full access to Atlas features, configuration - options, and operational capabilities. For production throughput and - richer metrics, you can upgrade to a dedicated cluster at any time. For - more information on deployment instructions, see official documentation - on{' '} - - deploy free tier cluster - {' '} - and{' '} - - create new cluster - - . -

    - - - -

    Add Your Connection IP Address to Your IP Access List

    -

    - You must add your IP address to the IP access list before you can - connect to your cluster. You can add 0.0.0.0/0 to access - from any IP address (not recommended for production). -

    -

    - An IP is a unique numeric identifier for a device connecting to a - network. In Atlas, you can only connect to a cluster from a trusted IP - address. Within Atlas, you can create a list of trusted IP addresses, - referred to as a IP access list, that can be used to connect to your - cluster and access your data. For more information on adding your - connection IP address instructions, see{' '} - - official documentation - - . -

    -

    - Configure your .env.local file -

    -

    - Once you have created a cluster, you can connect to it using a - connection string. A connection string is a string of characters that - contains the information required to connect to a MongoDB deployment. - For more information on connecting to your app, see{' '} - - driver-connection - - . -

    -
      -
    1. Click Database in the top-left corner of Atlas.
    2. -
    3. - In the Database Deployments view, click Connect for the - database deployment to which you want to connect. -
    4. -
    5. - Select Connect your application -
    6. -
    7. - Copy your connection string, it should look like this:{' '} - @mesh.meshsdk.mongodb.net/?retryWrites=true&w=majority`} - isJson={false} - /> - -
    8. -
    9. - Go to your project folder, and rename .env.local.example{' '} - to .env.local -
    10. -
    11. - Paste your connection string in the{' '} - MONGODB_URI field in your .env.local file -
    12. -
    13. - Replace {``} with the password you have created - for your database -
    14. -
    15. - Copy the name you have created for your database in the{' '} - MONGODB_DBNAME field in your .env.local file -
    16. -
    -

    - Once the dependencies are installed and the environment variables are in - place, you can start the development server by running the following - command: -

    - -
    - ); -} - -function Marketplace() { - let codeConfig = ``; - codeConfig += `const marketplace = new BasicMarketplace({\n`; - codeConfig += ` fetcher: blockchainProvider,\n`; - codeConfig += ` initiator: wallet,\n`; - codeConfig += ` network: "preprod",\n`; - codeConfig += ` signer: wallet,\n`; - codeConfig += ` submitter: blockchainProvider,\n`; - codeConfig += ` percentage: 25000, // 2.5%\n`; - codeConfig += ` owner: "addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr",\n`; - codeConfig += `});\n`; - - return ( - -

    Customize Marketplace

    -

    - Open the file lib/marketplace.ts, you will see the - following code: -

    - -

    Lets go through what each of these options mean:

    -
      -
    • - fetcher: Using one of our{' '} - blockchain providers, we use the - fetcher to query for the locked UTxO. -
    • -
    • - initiator: For starters, this is the connected{' '} - user's wallet. -
    • -
    • - network: It has to be one of the following values:{' '} - "testnet" | "preview" | "preprod" | "mainnet". -
    • -
    • - signer: For starters, this is the connected{' '} - user's wallet. -
    • -
    • - submitter: use one of our{' '} - blockchain providers, we use the - submitter to submit the transaction. -
    • -
    • - percentage: The percentage of the sale price that the - marketplace owner will take. Note that, the fee numerator - is in the order of millions, for example 3000 implies a - fee of 3000/1_000_000 (or 0.003) implies a - fee of 0.3%. -
    • -
    • - owner: The wallet address of the marketplace owner which will - receive the marketplace fee. -
    • -
    -

    - There are 4 actions (or endpoints) available to interact with this smart - contract: -

    -
      -
    • list asset
    • -
    • buy asset
    • -
    • updating listing
    • -
    • cancel listing
    • -
    -

    - Do visit the{' '} - - marketplace endpoints documentation and live demo - {' '} - to learn more about these actions. -

    -
    - ); -} - -export default GuideCustomMarketplacePage; diff --git a/apps/mesh-web/pages/guides/custom-provider.tsx b/apps/mesh-web/pages/guides/custom-provider.tsx deleted file mode 100644 index 748f45306..000000000 --- a/apps/mesh-web/pages/guides/custom-provider.tsx +++ /dev/null @@ -1,384 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideCustomProviderPage: NextPage = () => { - const sidebarItems = [ - { label: 'How it works', to: 'howworks' }, - { label: 'Implement Your Own Provider', to: 'template' }, - { label: 'Implement Constructor and Functions', to: 'implement' }, - ]; - - // - What is a Mesh Provider? - // - Provider Types - // - Why you may want to implement your own Provider? - // - Look at an existing provider implementation - // - Implement a custom GraphQL fetcher - - return ( - <> - - - - - - - - - ); -}; - -function IntroSection() { - return ( - <> -

    - As of writing (Dec 2022), Mesh offers three options:{' '} - - Blockfrost - - ,{' '} - - Tangocrypto - - , or{' '} - - Koios - {' '} - (see a list of Providers) . These - blockchain providers allow developers to access the Cardano blockchain - and retrieve intricate data. For example, they can be used to query the - UTXO of a smart contract and use it as part of a transaction, or to - submit a signed transaction to the chain. -

    -

    - You can customize a provider to utilize GraphQL, cardano-cli, or - websocket with Mesh SDK. Whatever the query method used to obtain the - data, it will work perfectly with Mesh SDK so long as the output of the function - is compatible with the interface. -

    -

    - This guide will show us how to make a custom provider and how to - integrate it with Mesh so that it works in tandem with the transaction - builder. -

    - - ); -} - -function HowItWorksSection() { - let codeIFetcher = ``; - codeIFetcher += `import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types';\n\n`; - codeIFetcher += `export interface IFetcher {\n`; - codeIFetcher += ` fetchAccountInfo(address: string): Promise;\n`; - codeIFetcher += ` fetchAddressUTxOs(address: string, asset?: string): Promise;\n`; - codeIFetcher += ` fetchAssetAddresses(asset: string): Promise<{ address: string; quantity: string }[]>;\n`; - codeIFetcher += ` fetchAssetMetadata(asset: string): Promise;\n`; - codeIFetcher += ` fetchHandleAddress(handle: string): Promise;\n`; - codeIFetcher += ` fetchProtocolParameters(epoch: number): Promise;\n`; - codeIFetcher += `}\n`; - - return ( - -

    How Does It Work?

    -

    - JavaScript interfaces are structures that define the interface of an - application: they are used to define the syntax for classes to follow. Thus, any classes which - are based on an interface must abide by the structure laid out in the - interface. -

    -

    - All providers have one or more interface(s). For example, the{' '} - KoiosProvider Class implements the{' '} - IFetcher and ISubmitter interfaces, thus{' '} - KoiosProvider needs to strictly conform to the structure of - these two interfaces. -

    -

    - IFetcher and ISubmitter are implemented in the{' '} - KoiosProvider class using the implement{' '} - keyword: -

    - -

    - To see the latest up-to-date list of interfaces used by Mesh, visit the GitHub - repo,{' '} - - packages/module/src/common/contracts - - . -

    -

    - To create a custom provider class, one must create functions with the - same name, input parameters, and return type as the list of defined - methods for each interface. Doing so will allow the functions to work as - expected when building transactions and any of the other many functions provided in - Mesh. -

    -

    - For example, as of writing, IFetcher has 6 functions (see{' '} - - packages/module/src/common/contracts/fetcher.ts - {' '} - for latest implemention): -

    - -

    - As such, KoiosProvider must implement these functions as - defined in IFetcher. -

    -
    - ); -} - -function StarterSection() { - let code = ``; - code += `import { IFetcher, ISubmitter } from "@mesh/common/contracts";\n`; - code += `import { parseHttpError } from "@mesh/common/utils";\n`; - code += `import type {\n`; - code += ` AccountInfo,\n`; - code += ` AssetMetadata,\n`; - code += ` Protocol,\n`; - code += ` UTxO,\n`; - code += `} from "@mesh/common/types";\n`; - code += `\n`; - code += `export class NAMEProvider implements IFetcher, ISubmitter {\n`; - code += ` constructor(network: "") {\n`; - code += ` // init variables and other Javascript libraries needed\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchAccountInfo(address: string): Promise {\n`; - code += ` try {\n`; - code += ` // return {\n`; - code += ` // ...\n`; - code += ` // };\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchAddressUTxOs(address: string, asset?: string): Promise {\n`; - code += ` try {\n`; - code += ` // return [\n`; - code += ` // ...\n`; - code += ` // ];\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchAssetAddresses(\n`; - code += ` asset: string\n`; - code += ` ): Promise<{ address: string; quantity: string }[]> {\n`; - code += ` try {\n`; - code += ` // return AssetAddresses;\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchAssetMetadata(asset: string): Promise {\n`; - code += ` try {\n`; - code += ` // return [\n`; - code += ` // ...\n`; - code += ` // ];\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchHandleAddress(handle: string): Promise {\n`; - code += ` try {\n`; - code += ` // return handleAddress;\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async fetchProtocolParameters(epoch = Number.NaN): Promise {\n`; - code += ` try {\n`; - code += ` // return {\n`; - code += ` // ...\n`; - code += ` // };\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `\n`; - code += ` async submitTx(tx: string): Promise {\n`; - code += ` try {\n`; - code += ` // if (status === 200)\n`; - code += ` // return txHash;\n`; - code += ` } catch (error) {\n`; - code += ` throw parseHttpError(error);\n`; - code += ` }\n`; - code += ` }\n`; - code += `}\n`; - - return ( - -

    Implement Your Own Provider

    -

    - If you want to begin utilizing your own provider, looking at one of the - existing providers is the ideal way to get started. Visit the GitHub - repo,{' '} - - packages/module/src/providers - {' '} - to see a list of providers. -

    -

    This code base below can be used as a starting point:

    - -

    - However, please note that it may no longer be valid when the interface is updated. It is - also important to note that the interface you require may not be{' '} - IFetcher or ISubmitter, but rather other - interfaces, depending on the purpose of the provider you are - implementing. -

    -
    - ); -} - -function ImplementSection() { - let code = ``; - code += `private readonly _axiosInstance: AxiosInstance;\n\n`; - code += `constructor(network: 'api' | 'preview' | 'preprod' | 'guild', version = 0) {\n`; - code += ` this._axiosInstance = axios.create({\n`; - code += ` baseURL: \`https://\${network}.koios.rest/api/v\${version}\`,\n`; - code += ` });\n`; - code += `}\n`; - - let codePP = ``; - codePP += `async fetchProtocolParameters(epoch: number): Promise {\n`; - codePP += ` try {\n`; - codePP += ` const { data, status } = await this._axiosInstance.get(\n`; - codePP += ` \`epoch_params?_epoch_no=\${epoch}\`,\n`; - codePP += ` );\n`; - codePP += `\n`; - codePP += ` if (status === 200)\n`; - codePP += ` return {\n`; - codePP += ` coinsPerUTxOSize: data[0].coins_per_utxo_size,\n`; - codePP += ` collateralPercent: data[0].collateral_percent,\n`; - codePP += ` decentralisation: data[0].decentralisation,\n`; - codePP += ` epoch: data[0].epoch_no,\n`; - codePP += ` keyDeposit: data[0].key_deposit,\n`; - codePP += ` maxBlockExMem: data[0].max_block_ex_mem.toString(),\n`; - codePP += ` maxBlockExSteps: data[0].max_block_ex_steps.toString(),\n`; - codePP += ` maxBlockHeaderSize: data[0].max_bh_size,\n`; - codePP += ` maxBlockSize: data[0].max_block_size,\n`; - codePP += ` maxCollateralInputs: data[0].max_collateral_inputs,\n`; - codePP += ` maxTxExMem: data[0].max_tx_ex_mem.toString(),\n`; - codePP += ` maxTxExSteps: data[0].max_tx_ex_steps.toString(),\n`; - codePP += ` maxTxSize: data[0].max_tx_size,\n`; - codePP += ` maxValSize: data[0].max_val_size.toString(),\n`; - codePP += ` minFeeA: data[0].min_fee_a,\n`; - codePP += ` minFeeB: data[0].min_fee_b,\n`; - codePP += ` minPoolCost: data[0].min_pool_cost,\n`; - codePP += ` poolDeposit: data[0].pool_deposit,\n`; - codePP += ` priceMem: data[0].price_mem,\n`; - codePP += ` priceStep: data[0].price_step,\n`; - codePP += ` };\n`; - codePP += `\n`; - codePP += ` throw parseHttpError(data);\n`; - codePP += ` } catch (error) {\n`; - codePP += ` throw parseHttpError(error);\n`; - codePP += ` }\n`; - codePP += `}\n`; - - return ( - -

    Implement Constructor and Functions

    -

    To start, we want to define the constructor.

    -

    - A constructor is a special function that creates and initializes a - class. This constructor gets called when an object is created using the{' '} - new keyword. The purpose of a constructor is to create a - new object and set values for any existing object properties. -

    -

    - When setting up a provider, it is usually necessary to provide some - basic information, such as which network it should be connected to and - if an API key is required. -

    -

    - In the case of KoiosProvider, we want the users to define - the network and version (optional): -

    - -

    - This constructor initializes the Axios instance, with the parameters - provided by the user. -

    -

    - Next, we can define each function that is required by the interface. To - do this, you must understand the answers to the following: -

    -
      -
    • how to query the blockchain provider?
    • -
    • what are the input parameters of the interface?
    • -
    • - what are the input parameters needed to query the blockchain provider? -
    • -
    • what are the expected outputs of the interface?
    • -
    • what is being returned by the blockchain provider?
    • -
    -

    - By knowing the inputs and outputs of both the interface and the - blockchain provider, one can create the functions that map the data correctly from the - blockchain provider to the interface's required data type. -

    -

    - For example, below we have implemeted the fetchProtocolParameters(){' '} - for KoiosProvider to map the responses returned from Koios, - transforming the output into the required Protocol data - type. This function is used for fetching protocol parameters: -

    - -

    - To complete implementation of your custom provider, simply do the same for every function - specified by the interface and test that they work as expected. -

    -

    - If you think that the provider you have implemented will benefit the - Cardano developer community,{' '} - - create a pull request - - . -

    -
    - ); -} - -export default GuideCustomProviderPage; diff --git a/apps/mesh-web/pages/guides/index.tsx b/apps/mesh-web/pages/guides/index.tsx deleted file mode 100644 index e12ada07f..000000000 --- a/apps/mesh-web/pages/guides/index.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const GuidesPage: NextPage = () => { - const items = [ - { - title: 'Develop your first Web3 App', - desc: 'A step-by-step guide to setup a Next.js web application, add a wallet connection and browse assets.', - link: '/guides/nextjs', - thumbnail: '/guides/develop-first-web-app.png', - }, - { - title: 'Minting Application', - desc: 'Load CLI generated keys and mint assets on Node.js.', - link: '/guides/minting-on-nodejs', - thumbnail: '/guides/minting-application.png', - }, - { - title: 'Multi-Signatures Transaction', - desc: 'Learn about multi-sig transaction, build a minting transaction involving AppWallet and BrowserWallet.', - link: '/guides/multisig-minting', - thumbnail: '/guides/multi-signatures-transaction.png', - }, - { - title: 'Integrating Smart Contract', - desc: 'A step-by-step guide to integrate your Cardano Smart Contract to a web application.', - link: '/guides/smart-contract', - thumbnail: '/guides/integrating-smart-contract.png', - }, - { - title: 'Prove Wallet Ownership', - desc: 'Cryptographically prove the ownership of a wallet by signing a piece of data using data sign.', - link: '/guides/prove-wallet-ownership', - thumbnail: '/guides/cryptographically-prove-wallet-ownership.png', - }, - { - title: 'Implement Custom Provider', - desc: 'Build custom Providers that provides an API to access and process information provided by services.', - link: '/guides/custom-provider', - thumbnail: '/guides/implement-custom-provider.png', - }, - { - title: 'Build your NFT marketplace', - desc: 'Whether you are building a marketplace for your business or for your clients, we have you covered. Get started in minutes.', - link: '/guides/custom-marketplace', - thumbnail: '/guides/custom-marketplace.png', - }, - { - title: 'Smart Contract Transactions', - desc: 'Build a marketplace with Plutus (Haskell), where users can list their assets for sale and purchase the listed assets.', - link: '/guides/smart-contract-transactions', - thumbnail: '/guides/smart-contract-transactions.png', - }, - { - title: 'Aiken Hello World', - desc: 'Create smart contracts with Aiken and execute transactions with Mesh.', - link: '/guides/aiken', - thumbnail: '/guides/aiken.png', - }, - { - title: 'Executing a standalone script', - desc: 'Learn how to execute a standalone script to manage wallets and creating transactions.', - link: '/guides/standalone', - thumbnail: '/guides/standalone.png', - }, - ]; - - return ( - <> - -
    -
    -

    - Our Guides -

    -

    - Whether you are new to web development or a seasoned blockchain - full-stack developer, these guides will help you get started. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default GuidesPage; diff --git a/apps/mesh-web/pages/guides/minting-on-nodejs.tsx b/apps/mesh-web/pages/guides/minting-on-nodejs.tsx deleted file mode 100644 index 4124d3cfe..000000000 --- a/apps/mesh-web/pages/guides/minting-on-nodejs.tsx +++ /dev/null @@ -1,272 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideMintingNodejsPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Project setup', to: 'projectsetup' }, - { label: 'Build minting transaction', to: 'minttx' }, - ]; - - let codeTsconfig = `{\n`; - codeTsconfig += ` ...\n`; - codeTsconfig += ` "target": "ESNext",\n`; - codeTsconfig += ` "module": "ESNext",\n`; - codeTsconfig += ` "moduleResolution": "Node",\n`; - codeTsconfig += ` "outDir": "dist",\n`; - codeTsconfig += ` ...\n`; - codeTsconfig += `}`; - - let codePackage = `{\n`; - codePackage += ` ...\n`; - codePackage += ` "type": "module",\n`; - codePackage += ` "scripts": {\n`; - codePackage += ` "start": "tsc && node ./dist/main.js"\n`; - codePackage += ` }\n`; - codePackage += ` ...\n`; - codePackage += `}`; - - let codeMetadata = ``; - codeMetadata += `export const metadata: { [assetName: string]: any } = {\n`; - codeMetadata += ` MeshToken01: {\n`; - codeMetadata += ` name: "Mesh Token 1",\n`; - codeMetadata += ` image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",\n`; - codeMetadata += ` mediaType: "image/jpg",\n`; - codeMetadata += ` description: "Just a purple coin.",\n`; - codeMetadata += ` artist: "This NFT was minted by Mesh (https://meshjs.dev/).",\n`; - codeMetadata += ` },\n`; - codeMetadata += ` MeshToken02: {\n`; - codeMetadata += ` name: "Mesh Token 2",\n`; - codeMetadata += ` image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",\n`; - codeMetadata += ` mediaType: "image/jpg",\n`; - codeMetadata += ` description: "This is suppose to be a gold coin.",\n`; - codeMetadata += ` artist: "This NFT was minted by Mesh (https://meshjs.dev/).",\n`; - codeMetadata += ` },\n`; - codeMetadata += ` MeshToken03: {\n`; - codeMetadata += ` name: "Mesh Token 3",\n`; - codeMetadata += ` image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",\n`; - codeMetadata += ` mediaType: "image/jpg",\n`; - codeMetadata += ` description: "A coin with a M on it.",\n`; - codeMetadata += ` artist: "This NFT was minted by Mesh (https://meshjs.dev/).",\n`; - codeMetadata += ` },\n`; - codeMetadata += `};`; - - let codeRecipients = ``; - codeRecipients += `export const recipients: { [recipient: string]: string } = {\n`; - codeRecipients += ` addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr:\n`; - codeRecipients += ` "MeshToken01",\n`; - codeRecipients += ` addr_test1qqlcxawu4gxarenqvdqyw0tqyjy69mrgsmfqhm6h65jwm4vvldqg2n2p8y4kyjm8sqfyg0tpq9042atz0fr8c3grjmyscxry4r:\n`; - codeRecipients += ` "MeshToken02",\n`; - codeRecipients += ` addr_test1qq5tay78z9l77vkxvrvtrv70nvjdk0fyvxmqzs57jg0vq6wk3w9pfppagj5rc4wsmlfyvc8xs7ytkumazu9xq49z94pqzl95zt:\n`; - codeRecipients += ` "MeshToken03",\n`; - codeRecipients += `};\n`; - - let codeImport = `import {\n`; - codeImport += ` AppWallet,\n`; - codeImport += ` Transaction,\n`; - codeImport += ` ForgeScript,\n`; - codeImport += ` BlockfrostProvider,\n`; - codeImport += ` resolveTxHash,\n`; - codeImport += `} from '@meshsdk/core';\n`; - codeImport += `import type { Mint, AssetMetadata } from '@meshsdk/core';\n`; - codeImport += `\n`; - codeImport += `import { metadata } from './metadata.js';\n`; - codeImport += `import { recipients } from './recipients.js';\n`; - - let codeVar = `const demoCLIKey = {\n`; - codeVar += ` paymentSkey:\n`; - codeVar += ` '5820aaca553a7b95b38b5d9b82a5daa7a27ac8e34f3cf27152a978f4576520dd6503',\n`; - codeVar += ` stakeSkey:\n`; - codeVar += ` '582097c458f19a3111c3b965220b1bef7d548fd75bc140a7f0a4f080e03cce604f0e',\n`; - codeVar += `};\n`; - codeVar += `const networkId = 0;\n`; - codeVar += `const blockfrostKey = 'BLOCKFROST_KEY_HERE';\n`; - - let codeWallet = ''; - codeWallet += `const wallet = new AppWallet({\n`; - codeWallet += ` networkId: networkId,\n`; - codeWallet += ` fetcher: blockchainProvider,\n`; - codeWallet += ` submitter: blockchainProvider,\n`; - codeWallet += ` key: {\n`; - codeWallet += ` type: 'cli',\n`; - codeWallet += ` payment: demoCLIKey.paymentSkey,\n`; - codeWallet += ` stake: demoCLIKey.stakeSkey,\n`; - codeWallet += ` },\n`; - codeWallet += `});\n\n`; - codeWallet += `const walletAddress = wallet.getPaymentAddress();\n`; - codeWallet += `const forgingScript = ForgeScript.withOneSignature(walletAddress);`; - - let codeTransaction = `const tx = new Transaction({ initiator: wallet });\n`; - codeTransaction += `for (let recipient in recipients) {\n`; - codeTransaction += ` const recipientAddress = recipient;\n`; - codeTransaction += ` const assetName = recipients[recipient];\n`; - codeTransaction += ` const assetMetadata: AssetMetadata = metadata[assetName];\n`; - codeTransaction += ` const asset: Mint = {\n`; - codeTransaction += ` assetName: assetName,\n`; - codeTransaction += ` assetQuantity: '1',\n`; - codeTransaction += ` metadata: assetMetadata,\n`; - codeTransaction += ` label: '721',\n`; - codeTransaction += ` recipient: recipientAddress\n`; - codeTransaction += ` };\n`; - codeTransaction += ` tx.mintAsset(forgingScript, asset);\n`; - codeTransaction += `}\n`; - - let codeSign = `const unsignedTx = await tx.build();\n`; - codeSign += `const signedTx = await wallet.signTx(unsignedTx, false);\n`; - codeSign += `const txHash = await wallet.submitTx(signedTx);\n`; - - return ( - <> - - -

    - In this guide, we will be minting some assets with{' '} - AppWallet on Node.js. -

    - -

    System setup

    - -

    1. Visual Studio Code

    -

    - Visual Studio Code is a code editor made by Microsoft. Download and - install{' '} - - Visual Studio Code - {' '} - for code editing. -

    - -

    2. Node.js

    -

    - Node.js is a cross-platform JavaScript runtime environment that runs - on the V8 engine and executes JavaScript code. Install the Long-Term - Support (LTS) version of{' '} - - Node.js - {' '} - (as of writing v16.16.0). -

    -
    - - -

    Project setup

    -

    Firstly, create a new folder, and initialize a Node.js project:

    - -

    - Next, install the typescript and Mesh{' '} - package: -

    - -

    - Then, initialize Typescript which is require to compile a - TypeScript: -

    - -

    - After that, open the tsconfig.json file and define the - following configurations: -

    - -

    - Finally, open the package.json file add the following - configurations: -

    - -
    - - -

    Build the minting transaction

    -

    1. Create list of NFT's metadata

    -

    - Create a file named metadata.ts and define the metadata - for our NFTs: -

    - -

    2. Create a list of recipients

    -

    - Create a file named recipients.ts and specify the list - of recipients: -

    - -

    - 3. Create main.ts and import the packages: -

    -

    - Lets create a file named main.ts and import the - packages we need and the files we have created: -

    - -

    4. Define variables

    -

    - Next, lets define some variables we will need for minting. You - should be using your own wallet if you want to mint a collection of - your own. For this example, these are the variables we need: -

    - -

    5. Build the minting transaction

    -

    - In this guide, we are building a minting transaction, but it could - be any transactions.{' '} - Learn more about Transaction. -

    -

    - Firstly, we need a blockchain provider, in this guide, we will - import BlockfrostProvider, but you can use other - providers as well: -

    - -

    - Next, lets initialize the AppWallet and its forging - script. In this example, we initialize using CLI generated keys, but - you can also load your wallet with private key and mnemonic phrases.{' '} - Learn more about AppWallet. -

    - -

    - Then, lets create a new Transaction, loop through each - recipient, and mint an assets with mintAsset ( - - Learn more about minting transactions - - ): -

    - -

    Finally, lets sign and submit the transaction:

    - -

    To execute the script, run the following on your Terminal:

    - -

    - For a successful transaction, you should get a transaction hash, you - should have minted multiple assets in a single transaction, and sent - them to multiple recipients. -

    -
    -
    - - ); -}; - -export default GuideMintingNodejsPage; diff --git a/apps/mesh-web/pages/guides/minting-reference-token.tsx b/apps/mesh-web/pages/guides/minting-reference-token.tsx deleted file mode 100644 index f34850da4..000000000 --- a/apps/mesh-web/pages/guides/minting-reference-token.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideMintingReferenceTokenPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Project setup', to: 'projectsetup' }, - // { label: 'Build minting transaction', to: 'minttx' }, - ]; - - const authors = [ - { - url: 'https://twitter.com/jamesdunseith', - image: 'https://pbs.twimg.com/profile_images/1582866510405636096/85X30CfV_400x400.jpg', - name: 'James Dunseith', - about: 'Co-founder Gimbalabs', - }, - ]; - - let codePackage = `{\n`; - codePackage += ` ...\n`; - codePackage += ` "type": "module",\n`; - codePackage += ` "scripts": {\n`; - codePackage += ` "start": "tsc && node ./dist/main.js"\n`; - codePackage += ` }\n`; - codePackage += ` ...\n`; - codePackage += `}`; - - return ( - <> - - -

    write about the purpose of this guide and who is it for

    -

    write some background here.

    - -

    First major component

    - -

    1. do this first

    -

    about this task

    - - -

    2. then do this

    -

    some more things here

    - -
    - - -

    another main component

    -

    Firstly, you need to bla bla bla

    - -
    -
    - - ); -}; - -export default GuideMintingReferenceTokenPage; diff --git a/apps/mesh-web/pages/guides/multisig-minting.tsx b/apps/mesh-web/pages/guides/multisig-minting.tsx deleted file mode 100644 index 68ad3f26b..000000000 --- a/apps/mesh-web/pages/guides/multisig-minting.tsx +++ /dev/null @@ -1,442 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; -import { useEffect, useState } from 'react'; - -import { - AppWallet, - ForgeScript, - Transaction, - BlockfrostProvider, - largestFirst, -} from '@meshsdk/core'; -import type { Mint, AssetMetadata } from '@meshsdk/core'; -import { useWallet } from '@meshsdk/react'; -import RunDemoButton from '../../components/common/runDemoButton'; -import RunDemoResult from '../../components/common/runDemoResult'; -import ConnectCipWallet from '../../components/common/connectCipWallet'; -import { demoMnemonic } from '../../configs/demo'; - -const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! -); -const bankWalletAddress = `addr_test1qzmwuzc0qjenaljs2ytquyx8y8x02en3qxswlfcldwetaeuvldqg2n2p8y4kyjm8sqfyg0tpq9042atz0fr8c3grjmysm5e6yx`; - -const GuideMultisigMintingPage: NextPage = () => { - const sidebarItems = [ - { label: 'See it in action', to: 'demo' }, - { label: 'Connect wallet (client)', to: 'clientConnect' }, - { label: 'Build transaction (application)', to: 'applicationBuildtx' }, - { label: 'Sign transaction (client)', to: 'clientSigntx' }, - { label: 'Sign transaction (application)', to: 'applicationSigntx' }, - ]; - - return ( - <> - - - - - - - - - - - ); -}; - -let originalMetadata = ''; - -function DemoSection() { - const [response, setResponse] = useState(null); - const [responseError, setResponseError] = useState(null); - const [loading, setLoading] = useState(false); - - const { wallet, connected } = useWallet(); - const [appWallet, setAppWallet] = useState({} as AppWallet); - - useEffect(() => { - async function init() { - const _wallet = new AppWallet({ - networkId: 0, - fetcher: blockchainProvider, - submitter: blockchainProvider, - key: { - type: 'mnemonic', - words: demoMnemonic, - }, - }); - setAppWallet(_wallet); - } - init(); - }, []); - - const assetMetadata: AssetMetadata = { - name: 'Mesh Token', - image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua', - mediaType: 'image/jpg', - description: 'This NFT was minted by Mesh (https://meshjs.dev/).', - }; - - async function clientStartMinting() { - const walletNetwork = await wallet.getNetworkId(); - if (walletNetwork != 0) { - setResponseError(`Connect with a Testnet wallet.`); - return; - } - - setLoading(true); - - try { - const recipientAddress = await wallet.getChangeAddress(); - const utxos = await wallet.getUtxos(); - const maskedTx = await applicationSideCreateTx(recipientAddress, utxos); - - const signedTx = await wallet.signTx(maskedTx, true); - const txHash = await applicationSideSignTx(signedTx); - - setResponse(txHash); - } catch (error) { - setResponseError(`${error}`); - } - setLoading(false); - } - - async function applicationSideCreateTx(recipientAddress, utxos) { - const appWalletAddress = appWallet.getPaymentAddress(); - const forgingScript = ForgeScript.withOneSignature(appWalletAddress); - - const asset: Mint = { - assetName: 'MeshToken', - assetQuantity: '1', - metadata: assetMetadata, - label: '721', - recipient: recipientAddress, - }; - - // client utxo select utxo - const costLovelace = '10000000'; - const selectedUtxos = largestFirst(costLovelace, utxos, true); - - const tx = new Transaction({ initiator: appWallet }); - tx.setTxInputs(selectedUtxos); - tx.mintAsset(forgingScript, asset); - tx.sendLovelace(bankWalletAddress, costLovelace); - tx.setChangeAddress(recipientAddress); - - const unsignedTx = await tx.build(); - - const _originalMetadata = Transaction.readMetadata(unsignedTx); - originalMetadata = _originalMetadata; - const maskedTx = Transaction.maskMetadata(unsignedTx); - - return maskedTx; - } - - async function applicationSideSignTx(signedTx) { - const signedOriginalTx = Transaction.writeMetadata( - signedTx, - originalMetadata - ); - const appWalletSignedTx = await appWallet.signTx(signedOriginalTx, true); - const txHash = await appWallet.submitTx(appWalletSignedTx); - return txHash; - } - - return ( - -

    See it in action

    -

    - In this guide, we will connect our CIP wallet ( - - BrowserWallet - - ) to request for a minting transaction. Then, the backend application - wallet ( - - AppWallet - - ) will build the transaction, and we will sign it with our wallet. - Finally, the application wallet will sign the transaction and submit it - to the blockchain. Note: this demo is on preprod network - only. -

    -

    Let's see it in action.

    - {connected ? ( - <> - - - - ) : ( - - )} - -
    -
    -
    - ); -} - -function IntroSection() { - return ( - <> -

    - A multi-signature (multi-sig) transaction requires more than one user to - sign a transaction prior to the transaction being broadcast on a - blockchain. You can think of it like a husband and wife savings account, - where both signatures are required to spend the funds, preventing one - spouse from spending the money without the approval of the other. For a - multi-sig transaction, you can include 2 or more required signers, these - signers can be wallets ( - Browser Wallet or{' '} - App Wallet) or Plutus script. -

    -

    - In this guide, we will build a multi-sig transaction for minting. There - are 2 wallets involved, 1) client wallet belonging to the user who - wishes to buy a native asset, and 2) application wallet that holds the - forging script. -

    - - ); -} - -function ClientConnectWallet() { - let code1 = `import { BrowserWallet } from '@meshsdk/core';\n`; - code1 += `const wallet = await BrowserWallet.enable(walletName);`; - - return ( - -

    Connect wallet (client)

    -

    - In this section, we will connect client's wallet and obtain their wallet - address and UTXO. -

    -

    - Users can connect their wallet with{' '} - - BrowserWallet - - : -

    - -

    Then, we get client's wallet address and UTXOs:

    - -

    - The change address will be the address receiving the minted NFTs and the - transaction's change. Additionally, we will need the client's wallet - UTXOs to build the minting transaction. -

    -
    - ); -} - -function ApplicationBuildTx() { - let code1 = `const blockchainProvider = new BlockfrostProvider(\n`; - code1 += ` ''\n`; - code1 += `);\n`; - code1 += `\n`; - code1 += `const appWallet = new AppWallet({\n`; - code1 += ` networkId: 0,\n`; - code1 += ` fetcher: blockchainProvider,\n`; - code1 += ` submitter: blockchainProvider,\n`; - code1 += ` key: {\n`; - code1 += ` type: 'mnemonic',\n`; - code1 += ` words: yourMnemonic,\n`; - code1 += ` },\n`; - code1 += `});\n`; - - let code2 = `const assetName = 'MeshToken';\n\n`; - code2 += `const assetMetadata: AssetMetadata = {\n`; - code2 += ` name: 'Mesh Token',\n`; - code2 += ` image: 'ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua',\n`; - code2 += ` mediaType: 'image/jpg',\n`; - code2 += ` description: 'This NFT was minted by Mesh (https://meshjs.dev/).',\n`; - code2 += `};\n`; - - let code3 = ``; - code3 += `const asset: Mint = {\n`; - code3 += ` assetName: assetName,\n`; - code3 += ` assetQuantity: '1',\n`; - code3 += ` metadata: assetMetadata,\n`; - code3 += ` label: '721',\n`; - code3 += ` recipient: recipientAddress,\n`; - code3 += `};\n`; - - let code4 = ``; - code4 += `const costLovelace = '10000000';\n`; - code4 += `const selectedUtxos = largestFirst(costLovelace, utxos, true);\n`; - code4 += `const bankWalletAddress = 'addr_test1qzmwuzc0qjenaljs2ytquyx8y8x02en3qxswlfcldwetaeuvldqg2n2p8y4kyjm8sqfyg0tpq9042atz0fr8c3grjmysm5e6yx';`; - - let code5 = ``; - code5 += `const tx = new Transaction({ initiator: appWallet });\n`; - code5 += `tx.setTxInputs(selectedUtxos);\n`; - code5 += `tx.mintAsset(forgingScript, asset);\n`; - code5 += `tx.sendLovelace(bankWalletAddress, costLovelace);\n`; - code5 += `tx.setChangeAddress(recipientAddress);\n`; - code5 += `const unsignedTx = await tx.build();\n`; - - let code6 = `const originalMetadata = Transaction.readMetadata(unsignedTx);\n`; - code6 += `// you want to store 'assetName' and 'originalMetadata' into the database so you can retrive it later\n`; - code6 += `const maskedTx = Transaction.maskMetadata(unsignedTx);`; - - return ( - -

    Build transaction (application)

    -

    In this section, we will build the minting transaction.

    -

    - In this guide, we won't be showing how to set up RESTful APIs and - backend servers. There are thousands of tutorials on YouTube, we - recommend building your backend server with{' '} - - Vercel API - {' '} - or{' '} - - NestJs - - . -

    -

    - First, we initialize the{' '} - blockchain provider and{' '} - - AppWallet - - . In this example, we use mnemonic to restore our wallet, but you can - initialize a wallet with mnemonic phrases, private keys, and Cardano CLI - generated keys, see App Wallet. -

    - -

    - Next, let's define the forging script, here we used the first wallet - address, but you can also define using NativeScript, see{' '} - Transaction - Minting assets: -

    - -

    - Then, we define the AssetMetadata which contains the NFT - metadata. In a NFT collection mint, you would need a selection algorithm - and a database to select available NFTs. -

    - -

    - After that, we create the Mint object: -

    - -

    - Finally, we are ready to create the transaction. Instead of using every - UTXOs from the client's wallet as transaction's inputs, we can use{' '} - largestFirst to get the UTXOs required for this - transaction. In this transaction, we send the payment to a predefined - wallet address (bankWalletAddress). -

    - -

    Let's create the transaction.

    - -

    - Instead of sending the transaction containing the actual metadata, we - will mask the metadata so clients do not know the content of the NFT. - First we extract the original metadata's CBOR with{' '} - Transaction.readMetadata, and execute{' '} - Transaction.maskMetadata to create a masked transaction. -

    - -

    - We will send the transaction CBOR (maskedTx) to the client - for signing. -

    -
    - ); -} - -function ClientSigntx() { - return ( - -

    Sign transaction (client)

    -

    - In this section, we need the client's signature to send the payment to - the bankWalletAddress. The client's wallet will open and - prompts for payment password. Note that the partial sign is set to{' '} - true. -

    - -

    - We will send the signedTx to the backend to complete the - transaction. -

    -
    - ); -} - -function ApplicationSigntx() { - let code1 = `// here you want to retrieve the 'originalMetadata' from the database\n`; - code1 += `const signedOriginalTx = Transaction.writeMetadata(\n`; - code1 += ` signedTx,\n`; - code1 += ` originalMetadata\n`; - code1 += `);`; - - let code2 = `const appWalletSignedTx = await appWallet.signTx(signedOriginalTx, true);\n`; - code2 += `const txHash = await appWallet.submitTx(appWalletSignedTx);`; - - return ( - -

    Sign transaction (application)

    -

    - In this section, we will update the asset's metadata with the actual - metadata, and the application wallet will counter sign the transaction. -

    -

    - Let's update the metadata to the actual asset's metadata. We retrieve - the originalMetadata from the database and update the - metadata with Transaction.writeMetadata. -

    - -

    - Sign the transaction with the application wallet and submit the - transaction: -

    - -

    Voila! You can build any multi-sig transactions!

    -
    - ); -} - -export default GuideMultisigMintingPage; diff --git a/apps/mesh-web/pages/guides/nestjs.tsx b/apps/mesh-web/pages/guides/nestjs.tsx deleted file mode 100644 index d244f9b61..000000000 --- a/apps/mesh-web/pages/guides/nestjs.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideNextjsPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Setup Next.js', to: 'setupnextjs' }, - { label: 'Setup Mesh', to: 'setupmesh' }, - { label: 'See it in action', to: 'seeitinaction' }, - ]; - - return ( - <> - - -

    - - NestJS - {' '} - is a Node.js framework used for building highly scalable server-side - applications. -

    - {/*

    - As this is a intermediate-level guide, if you are new to JavaScript or - programming in general, it is recommended that you start with the{' '} - Start a Web3 app on Next.js guide. -

    */} -

    - If you are looking for frontend web development, visit{' '} - Start a Web3 app on Next.js guide. -

    - - -

    Setting up a Nest project

    - -

    1. New Nest project

    -

    - It is recommended to browse the official{' '} - - NestJS documentation - {' '} - to setting up a Nest project. -

    -

    - If you do not have Nest CLI, with npm installed, install Nest CLI - with the follow command: -

    - -

    - Create a new folder, and start a new Nest project in the folder: -

    - -

    - Generally, I will change the port for backend server to{' '} - 5000 so I can still host my frontend applications on - port 3000. To do so, open src/main.ts and - change the port: -

    - -

    You can start the server with:

    - -

    - Visit{' '} - - http://localhost:5000 - - , you should see Hello World!. -

    - -

    2. Install MeshJS package

    -

    Install the latest version of Mesh with npm:

    - -
    -
    - - ); -}; - -export default GuideNextjsPage; diff --git a/apps/mesh-web/pages/guides/nextjs.tsx b/apps/mesh-web/pages/guides/nextjs.tsx deleted file mode 100644 index 35b02f6ad..000000000 --- a/apps/mesh-web/pages/guides/nextjs.tsx +++ /dev/null @@ -1,342 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideNextjsPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Setup Next.js', to: 'setupnextjs' }, - { label: 'Setup Mesh', to: 'setupmesh' }, - { label: 'See it in action', to: 'seeitinaction' }, - ]; - - return ( - <> - - -

    - - Next.js - {' '} - is a web development framework built on top of Node.js enabling - React-based web applications functionalities such as server-side - rendering and generating static websites. -

    -

    - Next.js and Mesh are JavaScript libraries, and so we will assume that - you have some familiarity with HTML and JavaScript language, but you - should be able to follow along even if you are coming from a different - programming language. If you don't feel very confident, we recommend - going through this{' '} - - JS tutorial - - , or the{' '} - - MDN JavaScript Reference - {' '} - or my preferred method, by watch a few{' '} - - videos from YouTube - - . -

    - - -

    System setup

    - -

    1. Visual Studio Code

    -

    - Visual Studio Code is a code editor made by Microsoft. Download and - install{' '} - - Visual Studio Code - {' '} - for code editing. -

    - -

    2. Node.js

    -

    - Node.js is a cross-platform JavaScript runtime environment that runs - on the V8 engine and executes JavaScript code. Install the Long-Term - Support (LTS) version of{' '} - - Node.js - {' '} - (as of writing v16.16.0). -

    -
    - - -

    Setup Next.js

    -

    1. Create project folder and open Visual Studio Code

    -

    - Create a new folder for your project, and give the folder a - meaningful name. Open the Visual Studio Code application and drag - your project folder into Visual Studio Code. -

    - -

    2. Create Next.js app

    -

    - From the menu options in on your Visual Studio Code, open the{' '} - Terminal and execute this command to create a new - NextJs application: -

    - - -

    3. Start development server

    -

    - After the installation is complete, start the development server - with: -

    - -

    - Visit{' '} - - http://localhost:3000 - {' '} - to view your application. CTRL+C to stop the - application. -

    -
    - - -

    Setup Mesh

    -

    1. Install MeshJS package

    -

    Install the latest version of Mesh with npm:

    - - -

    - 2. Add webpack in next.config.js -

    -

    - Open next.config.js and append webpack{' '} - configurations. Your next.config.js should look like - this: -

    - -

    In the more recent Next version, configuration for next.config.mjs:

    - -

    3. Congratulations

    -

    - You just saved a few weeks of learning and a number days trying to - get started. Your Next.js application is ready to connect wallet, - browse assets and make some transactions. -

    -
    - - -

    See it in action

    -

    - 1. Add MeshProvider -

    -

    - React context is an essential tool for building web applications. It - allow you to easily share state in your applications, so you can use - the data in any component within the app. This means that when the - user has connected their wallet, visiting different pages on the app - ensure their wallet is still connected. -

    -

    - Open pages/_app.tsx, import and include{' '} - - MeshProvider - - . Your _app.tsx should look similar to this: -

    - - - - ); -} - -export default MyApp;`} - isJson={false} - /> - -

    2. Add connect wallet component and check wallet's assets

    -

    - Lets add the{' '} - connect wallet component to - allow users to connect wallets they have installed on their device. - Connecting to wallets will ask the user for permission if not - granted, and proceed to connect the selected wallet. -

    -

    - Lastly, we link those components together, allowing users to choose - a wallet to connect, and query for assets in the wallet with{' '} - wallet.getAssets(). -

    -

    - Open pages/index.tsx and replace it with the following - codes: -

    - { - const { connected, wallet } = useWallet(); - const [assets, setAssets] = useState(null); - const [loading, setLoading] = useState(false); - - async function getAssets() { - if (wallet) { - setLoading(true); - const _assets = await wallet.getAssets(); - setAssets(_assets); - setLoading(false); - } - } - - return ( -
    -

    Connect Wallet

    - - {connected && ( - <> -

    Get Wallet Assets

    - {assets ? ( -
    -              
    -                {JSON.stringify(assets, null, 2)}
    -              
    -            
    - ) : ( - - )} - - )} -
    - ); -}; - -export default Home;`} - isJson={false} - /> - -

    Start the development server and try it:

    - -

    - Visit{' '} - - http://localhost:3000 - {' '} - to connect available wallets and view the assets in wallet. -

    - -

    - If you are new to Cardano, you will first have to download one of - the Cardano wallets. Tall Nupinks has written a detailed{' '} - - Cardano Wallets 101 - {' '} - guide to help you understand the fundamentals of a Cardano wallet, - including its features and how it works. With this guide, you will - be able to make an informed decision on the best Cardano wallet for - your needs. -

    - -

    3. Try on your own

    -

    - Implement another component to display wallet's address and the - amount of lovelace in your Next.js application. Check out the{' '} - wallet page for more - details. -

    -
    -
    - - ); -}; - -export default GuideNextjsPage; diff --git a/apps/mesh-web/pages/guides/pluts.tsx b/apps/mesh-web/pages/guides/pluts.tsx deleted file mode 100644 index 7cacb5c3a..000000000 --- a/apps/mesh-web/pages/guides/pluts.tsx +++ /dev/null @@ -1,1309 +0,0 @@ -import React from 'react'; - -const pluts = () => { - return
    pluts
    ; -}; - -export default pluts; - -// import type { NextPage } from 'next'; -// import Link from 'next/link'; -// import GuidesLayout from '../../components/pages/guides/layout'; -// import Codeblock from '../../components/ui/codeblock'; -// import { Element } from 'react-scroll'; -// import Metatags from '../../components/site/metatags'; -// import RunDemoButton from '../../components/common/runDemoButton'; -// import RunDemoResult from '../../components/common/runDemoResult'; -// import ConnectCipWallet from '../../components/common/connectCipWallet'; - -// import { -// bool, -// compile, -// makeValidator, -// pBool, -// pfn, -// pstruct, -// Script, -// V2, -// PPubKeyHash, -// PScriptContext, -// bs, -// } from '@harmoniclabs/plu-ts'; - -// import { -// KoiosProvider, -// resolvePlutusScriptAddress, -// resolveDataHash, -// resolvePaymentKeyHash, -// Transaction, -// Data, -// BlockfrostProvider, -// } from '@meshsdk/core'; -// import type { PlutusScript } from '@meshsdk/core'; -// import { useWallet } from '@meshsdk/react'; -// import { useState } from 'react'; - -// function getAlwaysSucceedScriptCbor() { -// const Data = pstruct({ -// Anything: {}, -// }); - -// const contract = pfn( -// [Data.type, Data.type, V2.PScriptContext.type], -// bool -// )((datum, redeemer, ctx) => pBool(true)); - -// const untypedValidator = makeValidator(contract); -// const compiledContract = compile(untypedValidator); - -// const script = new Script('PlutusScriptV2', compiledContract); - -// const scriptCbor = script.cbor.toString(); -// return scriptCbor; -// } - -// function getHelloScriptCbor() { -// const contract = pfn( -// [PPubKeyHash.type, bs, PScriptContext.type], -// bool -// )((owner, message, ctx) => { -// const isBeingPolite = message.eq('Hello plu-ts'); - -// const signedByOwner = ctx.tx.signatories.some(owner.eqTerm); - -// return isBeingPolite.and(signedByOwner); -// }); - -// const untypedValidator = makeValidator(contract); -// const compiledContract = compile(untypedValidator); - -// const script = new Script('PlutusScriptV2', compiledContract); - -// const scriptCbor = script.cbor.toString(); -// return scriptCbor; -// } - -// const GuidePlutsPage: NextPage = () => { -// const sidebarItems = [ -// { label: 'Project Set Up', to: 'setup' }, -// { label: 'Always Succeed Script', to: 'alwayssucceed' }, -// { label: 'Lock ADA to Always Succeed', to: 'lock' }, -// { label: 'Unlock ADA from Always Succeed', to: 'unlock' }, -// { label: 'Hello plu-ts Script', to: 'helloscript' }, -// { label: 'Lock ADA in Hello plu-ts', to: 'hellolock' }, -// { label: 'Unlock ADA from Hello plu-ts', to: 'hellounlock' }, -// ]; - -// return ( -// <> -// -// -// -// -// -// -// -// -// -// -// -// -// ); -// }; - -// function IntroSection() { -// return ( -// <> -//

    -// In this guide, we will build an app that interacts with a smart -// contract written in{' '} -// -// plu-ts -// -// . plu-ts is for building Cardano smart contracts which are entirely written, -// compiled and serialized using TypeScript. Here is an introduction to -// plu-ts on{' '} -// -// Gimbalabs PPBL -// -// . -//

    - -//

    -// This guide is a continuation from the{' '} -// -// Hello plu-ts -// {' '} -// example. You can get the entire source code for this guide on{' '} -// -// GitHub -// -// , and start a plu-ts project with this{' '} -// -// starter kit -// {' '} -// (or start on{' '} -// -// Demeter -// -// ). -//

    -//

    -// At the end of this guide, you will be able to deploy an app where users -// can connect their wallets and interact with a smart contract, end-to-end -// written in TypeScript. -//

    - -// - -// -// ); -// } - -// function Setup() { -// return ( -// -//

    Project Set Up

    -//

    -// Firstly, follow the instructions on{' '} -// Start a Web3 app on Next.js, a -// step-by-step guide to setup a Next.js web application. -//

    -//

    -// Or begin the project with this starter kit with a single Mesh CLI -// command: -//

    -// - -//

    Next, install plu-ts with npm (or yarn):

    -// -//
    -// ); -// } - -// function AlwaysSucceed() { -// let codeImport = ``; -// codeImport += `import {\n`; -// codeImport += ` bool,\n`; -// codeImport += ` compile,\n`; -// codeImport += ` makeValidator,\n`; -// codeImport += ` pBool,\n`; -// codeImport += ` pfn,\n`; -// codeImport += ` pstruct,\n`; -// codeImport += ` Script,\n`; -// codeImport += ` V2,\n`; -// codeImport += `} from '@harmoniclabs/plu-ts';\n`; - -// let code1 = ``; -// code1 += `const Data = pstruct({\n`; -// code1 += ` Anything: {},\n`; -// code1 += `});\n`; -// code1 += `\n`; -// code1 += `const contract = pfn(\n`; -// code1 += ` [Data.type, Data.type, V2.PScriptContext.type],\n`; -// code1 += ` bool\n`; -// code1 += `)((datum, redeemer, ctx) =>\n`; -// code1 += ` pBool(true) // always suceeds \n`; -// code1 += `);`; - -// let code2 = ``; -// code2 += `const untypedValidator = makeValidator(contract);\n`; -// code2 += `const compiledContract = compile(untypedValidator);\n`; -// code2 += `\n`; -// code2 += `const script = new Script('PlutusScriptV2', compiledContract);`; - -// let code3 = `const scriptCbor = script.cbor.toString();`; - -// return ( -// -//

    Always Succeed Script

    - -//

    -// In this section, we will be locking 2 ADA from your wallet to an "always -// succeed" smart contract. In practice, multiple assets (both native assets -// and lovelace) can be sent to the contract in a single transaction. -//

    - -//

    Let's import the necessary modules from plu-ts:

    - -// - -//

    -// Let's see how a smart contract that always succeeds is written in -// plu-ts: -//

    - -// - -//

    Yea, I know right? Thats pretty much it!

    - -//

    -// Next, we will execute makeValidator() so that the node will -// be able to evaluate it, then compile() to compile the validator, -// and then wrap it in a Script that can be used offchain: -//

    - -// - -//

    Finally, we will get the compiled contract's CBOR:

    - -// - -//

    -// As you can see, we wrote and compiled the smart contract and serialized -// it to CBOR entirely in TypeScript. You can learn more about it on{' '} -// -// plu-ts documentation -// -// . -//

    -//
    -// ); -// } - -// function TransactionLock() { -// const [response, setResponse] = useState(null); -// const [responseError, setResponseError] = useState(null); -// const [loading, setLoading] = useState(false); -// const { wallet, connected } = useWallet(); - -// async function lockAsset() { -// setLoading(true); -// setResponse(null); -// setResponseError(null); - -// try { -// const script: PlutusScript = { -// code: getAlwaysSucceedScriptCbor(), -// version: 'V2', -// }; -// const scriptAddress = resolvePlutusScriptAddress(script, 0); - -// const address = (await wallet.getUsedAddresses())[0]; -// const walletKeyhash = resolvePaymentKeyHash(address); - -// const tx = new Transaction({ initiator: wallet }).sendLovelace( -// { -// address: scriptAddress, -// datum: { -// value: walletKeyhash, -// }, -// }, -// '2000000' -// ); - -// const unsignedTx = await tx.build(); -// const signedTx = await wallet.signTx(unsignedTx); -// const txHash = await wallet.submitTx(signedTx); - -// setResponse(txHash); -// } catch (error) { -// setResponseError(`${error}`); -// } -// setLoading(false); -// } - -// let code1 = ``; -// code1 += `const script: PlutusScript = {\n`; -// code1 += ` code: scriptCbor,\n`; -// code1 += ` version: 'V2',\n`; -// code1 += `};\n`; -// code1 += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; - -// let code2 = ``; -// code2 += `const address = (await wallet.getUsedAddresses())[0];\n`; -// code2 += `const walletKeyhash = resolvePaymentKeyHash(address);\n`; - -// let code3 = ``; -// code3 += `const tx = new Transaction({ initiator: wallet })\n`; -// code3 += ` .sendLovelace(\n`; -// code3 += ` {\n`; -// code3 += ` address: scriptAddress,\n`; -// code3 += ` datum: {\n`; -// code3 += ` value: walletKeyhash,\n`; -// code3 += ` },\n`; -// code3 += ` },\n`; -// code3 += ` '2000000'\n`; -// code3 += ` );\n`; -// code3 += `\n`; -// code3 += `const unsignedTx = await tx.build();\n`; -// code3 += `const signedTx = await wallet.signTx(unsignedTx);\n`; -// code3 += `const txHash = await wallet.submitTx(signedTx);\n`; - -// return ( -// -//

    Lock Assets in the Always Succeed Script

    -//

    -// Asset locking is a feature wherein certain assets are reserved on the -// smart contract. The assets can only be unlocked again when certain conditions -// are met. In this example, we will lock 2 ADA in the always succeed script. By -// "always succeeds", we mean that the validator does not check for any specific -// conditions, and so will always return true. -//

    -//

    -// First, we initialize a new PlutusScript with the -// serialized CBOR, and get the script's address. -//

    - -// - -//

    -// Next, we get the wallet's address (for multiple address wallet, we -// select the first address) and use that to build the hash, which will be -// used as the datum value. -//

    - -// - -//

    -// Then, we build the transaction and send the ADA to the script's address. -// Lastly, we sign and submit the transaction. -//

    - -// - -//

    -// That is all! You can now lock your ADA (and other assets) in the script. -// You can also give the demo a try: you can lock your ADA by clicking the -// button below. -//

    - -// {connected ? ( -// <> -// -// -// -// ) : ( -// -// )} -// - -//

    -// Here is an example of a successful transaction on{' '} -// -// preprod.cardanoscan.io -// -// . -//

    - -//

    Next, we will see how to unlock the asset.

    -//
    -// ); -// } - -// function TransactionUnlock() { -// const [response, setResponse] = useState(null); -// const [responseError, setResponseError] = useState(null); -// const [loading, setLoading] = useState(false); -// const { wallet, connected } = useWallet(); - -// async function unlockAsset() { -// setLoading(true); -// setResponse(null); -// setResponseError(null); - -// try { -// const script: PlutusScript = { -// code: getAlwaysSucceedScriptCbor(), -// version: 'V2', -// }; -// const scriptAddress = resolvePlutusScriptAddress(script, 0); - -// const address = (await wallet.getUsedAddresses())[0]; -// const walletKeyhash = resolvePaymentKeyHash(address); - -// const blockchainProvider = new KoiosProvider('preprod'); -// const dataHash = resolveDataHash(walletKeyhash); -// const utxos = await blockchainProvider.fetchAddressUTxOs( -// scriptAddress, -// 'lovelace' -// ); -// let utxo = utxos.find((utxo: any) => { -// return utxo.output.dataHash == dataHash; -// }); - -// if (utxo) { -// const tx = new Transaction({ initiator: wallet }) -// .redeemValue({ -// value: utxo, -// script: script, -// datum: walletKeyhash, -// }) -// .sendValue(address, utxo) -// .setRequiredSigners([address]); - -// const unsignedTx = await tx.build(); -// const signedTx = await wallet.signTx(unsignedTx, true); -// const txHash = await wallet.submitTx(signedTx); - -// setResponse(txHash); -// } else { -// setResponseError(`No utxo found, please lock asset first`); -// } -// } catch (error) { -// setResponseError(`${error}`); -// } -// setLoading(false); -// } - -// let code1 = ``; -// code1 += `const script: PlutusScript = {\n`; -// code1 += ` code: scriptCbor,\n`; -// code1 += ` version: 'V2',\n`; -// code1 += `};\n`; -// code1 += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; -// code1 += `\n`; -// code1 += `const address = (await wallet.getUsedAddresses())[0];\n`; -// code1 += `const walletKeyhash = resolvePaymentKeyHash(address);\n`; - -// let code2 = ``; -// code2 += `const blockchainProvider = new KoiosProvider('preprod');\n`; -// code2 += `const dataHash = resolveDataHash(walletKeyhash);\n`; -// code2 += `const utxos = await blockchainProvider.fetchAddressUTxOs(\n`; -// code2 += ` scriptAddress,\n`; -// code2 += ` 'lovelace'\n`; -// code2 += `);\n`; -// code2 += `let utxo = utxos.find((utxo: any) => {\n`; -// code2 += ` return utxo.output.dataHash == dataHash;\n`; -// code2 += `});\n`; - -// let code3 = ``; -// code3 += `const tx = new Transaction({ initiator: wallet })\n`; -// code3 += ` .redeemValue({\n`; -// code3 += ` value: utxo,\n`; -// code3 += ` script: script,\n`; -// code3 += ` datum: walletKeyhash,\n`; -// code3 += ` })\n`; -// code3 += ` .sendValue(address, utxo)\n`; -// code3 += ` .setRequiredSigners([address]);\n`; -// code3 += `\n`; -// code3 += `const unsignedTx = await tx.build();\n`; -// code3 += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; -// code3 += `const txHash = await wallet.submitTx(signedTx);\n`; - -// return ( -// -//

    Unlock Asset from Always Succeed Script

    - -//

    -// As we may have locked assets in the contract, you can create -// transactions to unlock the assets. -//

    - -//

    -// Similar to locking assets, let's get the PlutusScript, -// script address, wallet address and the wallet's keyhash. -//

    - -// - -//

    -// Then, we fetch the input UTXO from the script address. This input UTXO is -// needed for transaction builder. In this demo, we are using{' '} -// KoiosProvider, but this can be interchanged with other -// providers that Mesh provides, see{' '} -// Providers. -//

    - -// - -//

    -// Next, we build the transaction and send the ADA back to the wallet -// address. We use redeemValue() to consume the UTXO on the -// script, and sendValue() to send the ADA back to the wallet -// address. Note that here we do a partial sign. Lastly, we sign and submit -// the transaction. -//

    - -// - -//

    If you want to see it in action, click the button below to unlock your ADA.

    - -// {connected ? ( -// <> -// -// -// -// ) : ( -// -// )} -// - -//

    -// Here is an example of a successful transaction on{' '} -// -// preprod.cardanoscan.io -// -// . -//

    - -//

    -// Now, you have successfully locked and unlocked assets from the script. -// You can start your own project with our{' '} -// -// plu-ts starter kit -// -// . -//

    -//
    -// ); -// } - -// /** -// * Hello Contract -// */ - -// function HelloWorldScript() { -// let codeImport = ``; -// codeImport += `import {\n`; -// codeImport += ` bool,\n`; -// codeImport += ` compile,\n`; -// codeImport += ` makeValidator,\n`; -// codeImport += ` pfn,\n`; -// codeImport += ` Script,\n`; -// codeImport += ` PPubKeyHash,\n`; -// codeImport += ` PScriptContext,\n`; -// codeImport += ` bs,\n`; -// codeImport += `} from '@harmoniclabs/plu-ts';\n`; - -// let code1 = ``; -// code1 += `const contract = pfn(\n`; -// code1 += ` [PPubKeyHash.type, bs, PScriptContext.type],\n`; -// code1 += ` bool\n`; -// code1 += `)((owner, message, ctx) => {\n`; -// code1 += ` const isBeingPolite = message.eq('Hello plu-ts');\n`; -// code1 += `\n`; -// code1 += ` const signedByOwner = ctx.tx.signatories.some(owner.eqTerm);\n`; -// code1 += `\n`; -// code1 += ` return isBeingPolite.and(signedByOwner);\n`; -// code1 += `});\n`; - -// let code2 = ``; -// code2 += `const untypedValidator = makeValidator(contract);\n`; -// code2 += `const compiledContract = compile(untypedValidator);\n`; -// code2 += `\n`; -// code2 += `const script = new Script('PlutusScriptV2', compiledContract);`; - -// let code3 = `const scriptCbor = script.cbor.toString();`; - -// return ( -// -//

    Hello plu-ts Script

    - -//

    -// In this section, we will be locking 2 ADA from your wallet to a{' '} -// -// Hello plu-ts -// {' '} -// smart contract. Unlike the Always Succeed script, this script will only -// be able to unlock if we redeem with a string Hello plu-ts{' '} -// in our redeemer. Let's learn how we can do that. -//

    - -//

    Let's import the necessary modules from plu-ts:

    - -// - -//

    -// Here is a Hello plu-ts script written in plu-ts: -//

    - -// - -//

    -// Next, we will execute makeValidator() so that the node will -// be able to evaluate it, compile() to compile the validator, -// and wrapping it in a Script that can be used offchain: -//

    - -// - -//

    Lasly, we will get the compiled contract's CBOR:

    - -// -//
    -// ); -// } - -// function HelloWorldLock() { -// const [response, setResponse] = useState(null); -// const [responseError, setResponseError] = useState(null); -// const [loading, setLoading] = useState(false); -// const { wallet, connected } = useWallet(); - -// async function lockAsset() { -// setLoading(true); -// setResponse(null); -// setResponseError(null); - -// try { -// const script: PlutusScript = { -// code: getHelloScriptCbor(), -// version: 'V2', -// }; -// const scriptAddress = resolvePlutusScriptAddress(script, 0); - -// const address = (await wallet.getUsedAddresses())[0]; -// const walletKeyhash: Data = resolvePaymentKeyHash(address); - -// const tx = new Transaction({ initiator: wallet }).sendLovelace( -// { -// address: scriptAddress, -// datum: { -// value: walletKeyhash, -// inline: true, -// }, -// }, -// '2000000' -// ); - -// const unsignedTx = await tx.build(); -// const signedTx = await wallet.signTx(unsignedTx); -// const txHash = await wallet.submitTx(signedTx); - -// setResponse(txHash); -// } catch (error) { -// setResponseError(`${error}`); -// } -// setLoading(false); -// } - -// let code1 = ``; -// code1 += `const script: PlutusScript = {\n`; -// code1 += ` code: scriptCbor,\n`; -// code1 += ` version: 'V2',\n`; -// code1 += `};\n`; -// code1 += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; - -// let code2 = ``; -// code2 += `const address = (await wallet.getUsedAddresses())[0];\n`; -// code2 += `const walletKeyhash = resolvePaymentKeyHash(address);\n`; - -// let code3 = ``; -// code3 += `const tx = new Transaction({ initiator: wallet })\n`; -// code3 += ` .sendLovelace(\n`; -// code3 += ` {\n`; -// code3 += ` address: scriptAddress,\n`; -// code3 += ` datum: {\n`; -// code3 += ` value: walletKeyhash,\n`; -// code3 += ` inline: true,\n`; -// code3 += ` },\n`; -// code3 += ` },\n`; -// code3 += ` '2000000'\n`; -// code3 += ` );\n`; -// code3 += `\n`; -// code3 += `const unsignedTx = await tx.build();\n`; -// code3 += `const signedTx = await wallet.signTx(unsignedTx);\n`; -// code3 += `const txHash = await wallet.submitTx(signedTx);\n`; - -// return ( -// -//

    Lock ADA in Hello plu-ts Script

    - -//

    -// Similar to the Always Succeed script, we will be locking 2 ADA from your -// wallet to the{' '} -// -// Hello plu-ts -// {' '} -// script. Let's see how we can do that. -//

    - -//

    -// Firstly, we initialize a new PlutusScript with the -// serialized CBOR, and get the script's address. -//

    - -// - -//

    -// Next, we get the wallet's address (for multiple address wallet, we -// select the first address) and use that to build the hash, which will be -// used as the datum value. -//

    - -// - -//

    -// Then, we build the transaction and send the ADA to the script's address. -// We also include the datum value, which is the wallet's hash. Lastly, we -// sign and submit the transaction. -//

    - -// - -//

    To see it in action, connect your wallet and give it a try.

    - -// {connected ? ( -// <> -// -// -// -// ) : ( -// -// )} -// - -//

    -// Here is an example of a successful transaction on{' '} -// -// preprod.cardanoscan.io -// -// . -//

    -//
    -// ); -// } - -// function HelloWorldUnlock() { -// const [response, setResponse] = useState(null); -// const [responseError, setResponseError] = useState(null); -// const [loading, setLoading] = useState(false); -// const { wallet, connected } = useWallet(); - -// async function unlockAsset() { -// setLoading(true); -// setResponse(null); -// setResponseError(null); - -// try { -// const script: PlutusScript = { -// code: getHelloScriptCbor(), -// version: 'V2', -// }; -// const scriptAddress = resolvePlutusScriptAddress(script, 0); -// const address = (await wallet.getUsedAddresses())[0]; -// const walletKeyhash: Data = resolvePaymentKeyHash(address); - -// const blockchainProvider = new BlockfrostProvider( -// process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! -// ); - -// const dataHash = resolveDataHash(walletKeyhash); -// const utxos = await blockchainProvider.fetchAddressUTxOs( -// scriptAddress, -// 'lovelace' -// ); -// let utxo = utxos.find((utxo: any) => { -// return utxo.output.dataHash == dataHash; -// }); - -// if (utxo) { -// const redeemer = { -// data: 'Hello plu-ts', -// }; - -// const tx = new Transaction({ initiator: wallet }) -// .redeemValue({ -// value: utxo, -// script: script, -// datum: utxo, -// redeemer: redeemer, -// }) -// .sendValue(address, utxo) -// .setRequiredSigners([address]); - -// const unsignedTx = await tx.build(); -// const signedTx = await wallet.signTx(unsignedTx, true); -// const txHash = await wallet.submitTx(signedTx); - -// setResponse(txHash); -// } else { -// setResponseError(`No utxo found, please lock asset first`); -// } -// } catch (error) { -// setResponseError(`${error}`); -// } -// setLoading(false); -// } - -// let code1 = ``; -// code1 += `const script: PlutusScript = {\n`; -// code1 += ` code: scriptCbor,\n`; -// code1 += ` version: 'V2',\n`; -// code1 += `};\n`; -// code1 += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; -// code1 += `\n`; -// code1 += `const address = (await wallet.getUsedAddresses())[0];\n`; -// code1 += `const walletKeyhash = resolvePaymentKeyHash(address);\n`; - -// let code2 = ``; -// code2 += `const dataHash = resolveDataHash(walletKeyhash);\n\n`; -// code2 += `const blockchainProvider = new KoiosProvider('preprod');\n`; -// code2 += `const utxos = await blockchainProvider.fetchAddressUTxOs(\n`; -// code2 += ` scriptAddress,\n`; -// code2 += ` 'lovelace'\n`; -// code2 += `);\n\n`; -// code2 += `let utxo = utxos.find((utxo: any) => {\n`; -// code2 += ` return utxo.output.dataHash == dataHash;\n`; -// code2 += `});\n`; - -// let codeRedeemer = ``; -// codeRedeemer += `const redeemer = {\n`; -// codeRedeemer += ` data: 'Hello plu-ts',\n`; -// codeRedeemer += `};\n`; - -// let code3 = ``; -// code3 += `const tx = new Transaction({ initiator: wallet })\n`; -// code3 += ` .redeemValue({\n`; -// code3 += ` value: utxo,\n`; -// code3 += ` script: script,\n`; -// code3 += ` datum: utxo,\n`; -// code3 += ` redeemer: redeemer,\n`; -// code3 += ` })\n`; -// code3 += ` .sendValue(address, utxo)\n`; -// code3 += ` .setRequiredSigners([address]);\n`; -// code3 += `\n`; -// code3 += `const unsignedTx = await tx.build();\n`; -// code3 += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; -// code3 += `const txHash = await wallet.submitTx(signedTx);\n`; - -// return ( -// -//

    Unlock ADA from Hello plu-ts Script

    - -//

    -// Now that we have locked ADA in the Hello plu-ts script, let's see how we -// can unlock it. We will be using the same script as before. Let's get the{' '} -// PlutusScript, script address, wallet address and the -// wallet's keyhash. -//

    - -// - -//

    -// Then, we use KoiosProvider to fetch input UTXO from the -// script address. This input UTXO is needed for transaction builder. In -// this demo, we are using KoiosProvider, but this can be -// interchange with other providers that Mesh provides, see{' '} -// Providers. -//

    - -//

    -// We use resolveDataHash() to get the data hash of the wallet -// address. Doing so allow us to retrive the UTXO that is locked in the -// script. We then use find() to filter the UTXO that is -// locked by the user who locked it. -//

    - -// - -//

    -// Next, we need to create a redeemer to redeem the locked asset from the -// script. The redeemer is the argument specified by the user that -// interacts with the smart contract In this contract, we want to send the -// string "Hello plu-ts". -//

    - -// - -//

    -// Now that we have the input UTXO and the redeemer, we can build the -// transaction. We use redeemValue() to consume the UTXO on -// the script, and sendValue() to send the ADA back to the -// wallet address. Notice that we use utxo in the{' '} -// redeemValue(), this is how we can use reference input. Note -// that here we do a partial sign because we have smart contracts in the -// transaction. Lastly, we sign and submit the transaction. -//

    - -// - -//

    If you want to see it in action, click the button below to unlock your ADA.

    - -// {connected ? ( -// <> -// -// -// -// ) : ( -// -// )} -// - -//

    -// Here is an example of a successful transaction on{' '} -// -// preprod.cardanoscan.io -// -// . -//

    - -//

    -// Now, you have successfully locked and unlocked assets from the script. -// If you want to see the full code, you can check it out in our{' '} -// -// GitHub -// {' '} -// repo or start your own project with our{' '} -// -// plu-ts starter kit -// -// . -//

    -//
    -// ); -// } - -// // function VestingScript() { -// // let codeImport = ``; -// // codeImport += `import {\n`; -// // codeImport += ` bool,\n`; -// // codeImport += ` compile,\n`; -// // codeImport += ` makeValidator,\n`; -// // codeImport += ` pBool,\n`; -// // codeImport += ` pfn,\n`; -// // codeImport += ` pstruct,\n`; -// // codeImport += ` Script,\n`; -// // codeImport += ` V2,\n`; -// // codeImport += ` PPubKeyHash,\n`; -// // codeImport += ` int,\n`; -// // codeImport += ` data,\n`; -// // codeImport += ` PScriptContext,\n`; -// // codeImport += ` pmatch,\n`; -// // codeImport += `} from '@harmoniclabs/plu-ts';\n`; - -// // let code1 = ``; -// // code1 += `const VestingDatum = pstruct({\n`; -// // code1 += ` VestingDatum: {\n`; -// // code1 += ` beneficiary: PPubKeyHash.type,\n`; -// // code1 += ` deadline: int,\n`; -// // code1 += ` },\n`; -// // code1 += `});\n`; -// // code1 += `\n`; -// // code1 += `const contract = pfn(\n`; -// // code1 += ` [VestingDatum.type, data, PScriptContext.type],\n`; -// // code1 += ` bool\n`; -// // code1 += `)((datum, _redeemer, ctx) => {\n`; -// // code1 += ` const signedByBeneficiary = ctx.tx.signatories.some(\n`; -// // code1 += ` datum.beneficiary.eqTerm\n`; -// // code1 += ` );\n`; -// // code1 += `\n`; -// // code1 += ` const deadlineReached = pmatch(ctx.tx.interval.from.bound)\n`; -// // code1 += ` .onPFinite(({ _0: lowerInterval }) => datum.deadline.ltEq(lowerInterval))\n`; -// // code1 += ` ._((_) => pBool(false));\n`; -// // code1 += `\n`; -// // code1 += ` return signedByBeneficiary.and(deadlineReached);\n`; -// // code1 += `});`; - -// // let code2 = ``; -// // code2 += `const untypedValidator = makeValidator(contract);\n`; -// // code2 += `const compiledContract = compile(untypedValidator);\n`; -// // code2 += `\n`; -// // code2 += `const script = new Script('PlutusScriptV2', compiledContract);`; - -// // let code3 = `const scriptCbor = script.cbor.toString();`; - -// // return ( -// // -// //

    Vesting Script

    - -// //

    -// // In this section, we will be locking 2 ADA from your wallet to a{' '} -// // -// // Vesting -// // {' '} -// // smart contract. Unlike the Always Succeed script, this script will only -// // be able to unlock by the beneficiary after the deadline. -// //

    - -// //

    Let's import the necessary modules from plu-ts:

    - -// // - -// //

    Here is a Vesting script written in plu-ts:

    - -// // - -// //

    -// // Next, we will execute makeValidator() so that the node will -// // be able to evaluate it, compile() to compile the validator, -// // and wrapping it in a Script that can be used offchain: -// //

    - -// // - -// //

    Lasly, we will get the compiled contract's CBOR:

    - -// // -// //
    -// // ); -// // } - -// // function VestingLock() { -// // const [response, setResponse] = useState(null); -// // const [responseError, setResponseError] = useState(null); -// // const [loading, setLoading] = useState(false); -// // const { wallet, connected } = useWallet(); - -// // async function lockAsset() { -// // setLoading(true); -// // setResponse(null); -// // setResponseError(null); - -// // try { -// // const script: PlutusScript = { -// // code: getVestingScriptCbor(), -// // version: 'V2', -// // }; -// // const scriptAddress = resolvePlutusScriptAddress(script, 0); -// // console.log('scriptAddress', scriptAddress); - -// // const address = (await wallet.getUsedAddresses())[0]; - -// // const nowPosix = Date.now(); -// // console.log('nowPosix', nowPosix); - -// // const datum: Data = { -// // alternative: 0, -// // fields: [resolvePaymentKeyHash(address), nowPosix + 10_000], -// // }; -// // console.log('datum', resolvePaymentKeyHash(address), nowPosix + 10_000); - -// // const tx = new Transaction({ initiator: wallet }).sendLovelace( -// // { -// // address: scriptAddress, -// // datum: { -// // value: datum, -// // inline: true, -// // }, -// // }, -// // '2000000' -// // ); - -// // const unsignedTx = await tx.build(); -// // const signedTx = await wallet.signTx(unsignedTx); -// // const txHash = await wallet.submitTx(signedTx); - -// // setResponse(txHash); -// // } catch (error) { -// // setResponseError(`${error}`); -// // } -// // setLoading(false); -// // } - -// // return ( -// // -// //

    Lock ADA in Vesting Script

    - -// //

    - -// // {connected ? ( -// // <> -// // -// // -// // -// // ) : ( -// // -// // )} -// // -// //
    -// // ); -// // } - -// // function VestingUnlock() { -// // const [response, setResponse] = useState(null); -// // const [responseError, setResponseError] = useState(null); -// // const [loading, setLoading] = useState(false); -// // const { wallet, connected } = useWallet(); - -// // async function unlockAsset() { -// // setLoading(true); -// // setResponse(null); -// // setResponseError(null); - -// // try { -// // const script: PlutusScript = { -// // code: getVestingScriptCbor(), -// // version: 'V2', -// // }; -// // const scriptAddress = resolvePlutusScriptAddress(script, 0); -// // console.log('scriptAddress', scriptAddress); -// // const address = (await wallet.getUsedAddresses())[0]; - -// // /** -// // * -// // 556f3a70b8a68081cf36c918dd9933abdca34f20fc534499c817182b 1681052219252 - -// // 5867c3b8e27840f556ac268b781578b14c5661fc63ee720dbeab663f 1681132778699 - -// // addr_test1wzaax9v49zvk592unvgjh6az2597he2z8779jmhcmxkw3mqn5u4kd -// // datum 5867c3b8e27840f556ac268b781578b14c5661fc63ee720dbeab663f 1681146278850 -// // */ -// // const datum: Data = { -// // alternative: 0, -// // fields: [resolvePaymentKeyHash(address), 1681146278850], -// // }; - -// // // const blockchainProvider = new KoiosProvider('preprod'); -// // const blockchainProvider = new BlockfrostProvider( -// // process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! -// // ); - -// // const dataHash = resolveDataHash(datum); -// // const utxos = await blockchainProvider.fetchAddressUTxOs( -// // scriptAddress, -// // 'lovelace' -// // ); -// // let utxo = utxos.find((utxo: any) => { -// // return utxo.output.dataHash == dataHash; -// // }); -// // console.log('dataHash', dataHash); -// // console.log('utxo', utxo); - -// // if (utxo) { -// // const redeemer = { -// // data: 0, -// // }; - -// // const tx = new Transaction({ initiator: wallet }) -// // .redeemValue({ -// // value: utxo, -// // script: script, -// // datum: utxo, -// // redeemer: redeemer, -// // }) -// // .sendValue(address, utxo) -// // .setRequiredSigners([address]) -// // .setTimeToStart(Date.now().toString()); -// // // .setTimeToExpire('9999999999999') -// // const unsignedTx = await tx.build(); -// // const signedTx = await wallet.signTx(unsignedTx, true); -// // console.log('signedTx', signedTx); -// // // const txHash = await wallet.submitTx(signedTx); -// // const txHash = await blockchainProvider.submitTx(signedTx); - -// // setResponse(txHash); -// // } else { -// // setResponseError(`No utxo found, please lock asset first`); -// // } -// // } catch (error) { -// // setResponseError(`${error}`); -// // } -// // setLoading(false); -// // } - -// // return ( -// // -// //

    Unlock ADA from Vesting Script

    - -// // {connected ? ( -// // <> -// // -// // -// // -// // ) : ( -// // -// // )} -// // -// //
    -// // ); -// // } - -// export default GuidePlutsPage; diff --git a/apps/mesh-web/pages/guides/prove-wallet-ownership.tsx b/apps/mesh-web/pages/guides/prove-wallet-ownership.tsx deleted file mode 100644 index 6cf47cd00..000000000 --- a/apps/mesh-web/pages/guides/prove-wallet-ownership.tsx +++ /dev/null @@ -1,409 +0,0 @@ -import type { NextPage } from 'next'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; -import { checkSignature, generateNonce } from '@meshsdk/core'; -import { CardanoWallet, useWallet } from '@meshsdk/react'; -import { useState } from 'react'; -import RunDemoResult from '../../components/common/runDemoResult'; - -const GuideLoginWithWalletPage: NextPage = () => { - const { wallet, connected } = useWallet(); - const [state, setState] = useState(0); - const [response, setResponse] = useState(null); - - const sidebarItems = [ - { label: 'How does it work?', to: 'howwork' }, - { label: 'Client: Connect wallet and get staking address', to: 'step1' }, - { label: 'Server: Generate nonce and store in database', to: 'step2' }, - { label: 'Client: Verify ownership by signing the nonce', to: 'step3' }, - { label: 'Server: Verify signature', to: 'step4' }, - { label: 'Put them all together', to: 'step5' }, - ]; - - async function frontendStep1() { - if (connected) { - setState(1); - const userAddress = (await wallet.getRewardAddresses())[0]; - await backendStep1(userAddress); - } - } - - async function backendStep1(userAddress) { - const nonce = generateNonce('Sign to login in to Mesh: '); - await frontendStep2(userAddress, nonce); - } - - async function frontendStep2(userAddress, nonce) { - try { - const signature = await wallet.signData(userAddress, nonce); - await backendStep2(userAddress, nonce, signature); - } catch (error) { - setState(0); - } - } - - async function backendStep2(userAddress, nonce, signature) { - const result = checkSignature(nonce, userAddress, signature); - setResponse(result); - setState(0); - } - - let codeSnippet1 = `const { wallet, connected } = useWallet();\n\n`; - codeSnippet1 += `async function frontendStartLoginProcess() {\n`; - codeSnippet1 += ` if (connected) {\n`; - codeSnippet1 += ` const userAddress = (await wallet.getRewardAddresses())[0];\n\n `; - codeSnippet1 += ` // do: send request with 'userAddress' to the backend\n`; - codeSnippet1 += ` }\n`; - codeSnippet1 += `}\n`; - - let codeSnippet2 = `import { generateNonce } from '@meshsdk/core';\n\n`; - codeSnippet2 += `async function backendGetNonce(userAddress) {\n`; - codeSnippet2 += ` // do: if new user, create new user model in the database\n\n`; - codeSnippet2 += ` const nonce = generateNonce('Sign to login in to Mesh: ');\n\n`; - codeSnippet2 += ` // do: store 'nonce' in user model in the database\n\n`; - codeSnippet2 += ` // do: return 'nonce'\n`; - codeSnippet2 += `}\n`; - - let codeSnippet3 = ``; - codeSnippet3 += `async function frontendSignMessage(nonce) {\n`; - codeSnippet3 += ` try {\n`; - codeSnippet3 += ` const userAddress = (await wallet.getRewardAddresses())[0];\n`; - codeSnippet3 += ` const signature = await wallet.signData(userAddress, nonce);\n\n`; - codeSnippet3 += ` // do: send request with 'signature' and 'userAddress' to the backend\n`; - codeSnippet3 += ` } catch (error) {\n`; - codeSnippet3 += ` // catch error if user refuse to sign\n`; - codeSnippet3 += ` }\n`; - codeSnippet3 += `}\n`; - - let codeSnippet4 = `import { checkSignature } from '@meshsdk/core';\n\n`; - codeSnippet4 += `async function backendVerifySignature(userAddress, signature) {\n`; - codeSnippet4 += ` // do: get 'nonce' from user (database) using 'userAddress'\n\n`; - codeSnippet4 += ` const result = checkSignature(nonce, userAddress, signature);\n\n`; - codeSnippet4 += ` // do: update 'nonce' in the database with another random string\n\n`; - codeSnippet4 += ` // do: do whatever you need to do, once the user has proven ownership\n`; - codeSnippet4 += ` // it could be creating a valid JSON Web Token (JWT) or session\n`; - codeSnippet4 += ` // it could be doing something offchain\n`; - codeSnippet4 += ` // it could just be updating something in the database\n`; - codeSnippet4 += `}\n`; - - let codeSnippetClient = `import { CardanoWallet, useWallet } from '@meshsdk/react';\n\n`; - codeSnippetClient += `export default function Page() {\n`; - codeSnippetClient += ` const { wallet, connected } = useWallet();\n`; - codeSnippetClient += ` \n`; - codeSnippetClient += ` async function frontendStartLoginProcess() {\n`; - codeSnippetClient += ` if (connected) {\n`; - codeSnippetClient += ` const userAddress = (await wallet.getRewardAddresses())[0];\n`; - codeSnippetClient += ` const nonce = await backendGetNonce(userAddress);\n`; - codeSnippetClient += ` await frontendSignMessage(nonce);\n`; - codeSnippetClient += ` }\n`; - codeSnippetClient += ` }\n`; - codeSnippetClient += ` \n`; - codeSnippetClient += ` async function frontendSignMessage(nonce) {\n`; - codeSnippetClient += ` try {\n`; - codeSnippetClient += ` const userAddress = (await wallet.getRewardAddresses())[0];\n`; - codeSnippetClient += ` const signature = await wallet.signData(userAddress, nonce);\n`; - codeSnippetClient += ` await backendVerifySignature(userAddress, signature);\n`; - codeSnippetClient += ` } catch (error) {\n`; - codeSnippetClient += ` setState(0);\n`; - codeSnippetClient += ` }\n`; - codeSnippetClient += ` }\n\n`; - codeSnippetClient += ` return (\n`; - codeSnippetClient += ` <>\n`; - codeSnippetClient += ` frontendStartLoginProcess()}\n`; - codeSnippetClient += ` />\n`; - codeSnippetClient += ` \n`; - codeSnippetClient += ` );\n`; - codeSnippetClient += `}\n`; - - let codeSnippetServer = ``; - codeSnippetServer += `import { checkSignature, generateNonce } from '@meshsdk/core';\n`; - codeSnippetServer += `\n`; - codeSnippetServer += `async function backendGetNonce(userAddress) {\n`; - codeSnippetServer += ` const nonce = generateNonce('Sign to login in to Mesh: ');\n`; - codeSnippetServer += ` return nonce;\n`; - codeSnippetServer += `}\n`; - codeSnippetServer += `\n`; - codeSnippetServer += `async function backendVerifySignature(userAddress, signature) {\n`; - codeSnippetServer += ` // do: get 'nonce' from database\n\n`; - codeSnippetServer += ` const result = checkSignature(nonce, userAddress, signature);\n`; - codeSnippetServer += ` if(result){\n`; - codeSnippetServer += ` // create JWT or approve certain process\n`; - codeSnippetServer += ` }\n`; - codeSnippetServer += ` else{\n`; - codeSnippetServer += ` // prompt user that signature is not correct\n`; - codeSnippetServer += ` }\n`; - codeSnippetServer += `}\n`; - - let codeSnippetWallet = ``; - codeSnippetWallet += ` frontendStartLoginProcess()}\n`; - codeSnippetWallet += `/>\n`; - - return ( - <> - - -

    - It's cryptographically easy to prove the ownership of an account by - signing a piece of data using a private key. Since a user's public - address can be used as their identifier, we can build an authentication - mechanism that is based on message signing. This mechanism is made - possible because we are able to cryptographically prove the ownership of an - account by signing a specific piece of data using the corresponding - private key. If the data is correctly signed, then the backend will - recognize it as coming from the owner of the public address. -

    - -

    - JSON Web Token (JWT) claims can typically be used to pass identity of - authenticated users between an identity provider and a service - provider. A server (service provider) could generate a token and - provide that to a client (identity provider). For example, a client could then - use that token to prove ownership of a wallet, as these tokens can - be signed by one party's private key (in this case, the client's). -

    - -

    Some example uses of data signing to cryptographically prove ownership:

    - -
      -
    • - Authenticate user sign in using JSON Web Token (JWT). A - cryptographically-secure login to prove the ownership of an account - by signing a piece of data using a private key. -
    • -
    • - Authenticate user's action. If the backend wants to confirm - a user's authorization on an off-chain action, for example, engaging in - in-game trading. -
    • -
    • - Off chain account flow. If you need to display certain data - that is off-chain or on a website only to a particular user - identified by their wallet, you could use message signing as a means of - doing so. -
    • -
    - - -

    Demo

    -

    Try the demo. Sign in with your Cardano wallet.

    - frontendStep1()} - /> - -

    - You will get true if the nonce has been signed by the - user's wallet. -

    -
    - - -

    How does It Work?

    - - - -

    - By signing a message, you are affirming that you are in control of - the wallet address linked to the Blockchain, and thus can prove - ownership of it. -

    - -

    There are 4 ingredients to signing a message:

    - -
      -
    • user wallet address
    • -
    • private key
    • -
    • public key
    • -
    • message to sign
    • -
    - -

    - To check if a user owns a certain address on a Web3 site, one needs - to provide a message and have the user "sign" it. This "signature" - is generated using the message, the user's private key, the public - key, and a cryptographic algorithm. -

    - -

    - To ensure the signature is valid, the same cryptographic algorithm - is applied to the message and the public key is obtained. You may be - wondering how this can be secure? The answer is that without the - private key, the validation of the message and the public key cannot - be cryptographically matched, thereby confirming ownership. -

    -
    - - -

    Client: Connect Wallet and Get Staking Address

    -

    - The User model stored in the database of the backend server must - have two compulsory fields: public address and nonce. Furthermore, - this address has to be unique. Other details about the user, such as - username, Twitter ID, and name fields can be added, but are not essential - for this process. -

    -

    - On Cardano, to obtain a user's public address as an identifier, we can use their - wallet's staking address. This will be stored in the server side - database, so that authorized wallets can be linked. The user never - has to worry about manually entering their address, since it can be - retrieved using wallet.getRewardAddresses(). -

    - -

    - With the user's wallet connected, the first step is to get the user's staking address and - send it to our backend server. -

    - - -
    - - -

    Server: Generate Nonce and Store in Database

    - -

    - In the backend, we first need to generate a new nonce, which is initialized as a - random string. The purpose of this is to create a unique message - that can be used for authentication of the user's wallet. This nonce - will be the payload for the user to prove ownership of the wallet. With - Mesh, you can generate a new nonce with generateNonce() - , and set the message as{' '} - Sign to login in to Mesh: nonce. -

    -

    - By utilizing the userAddress, we can look up the - database to determine whether the user is new or already exists. -

    -

    - If the user is new, we can create a new user entry, storing their - staking address, nonce, and set their status as "not verified". Once - the user has successfully verified, we can update their status to - "verified" in our database. -

    -

    - For existing users, we just have to store the newly generated nonce - in the database. -

    - - - -

    - Lastly, we will return the nonce for the user to sign - using their private key. -

    -
    - - -

    Client: Verify ownership by signing the nonce

    -

    - We are ready to use the private key associated with the wallet to - sign the nonce with{' '} - await wallet.signData(userAddress, nonce), which - enables the dApp to request the user to sign a payload according to{' '} - - CIP-8 - - . -

    -

    - We request the user's authorization and show them the message that - is to be signed: Sign to login in to Mesh: nonce. Once - accepted, the signature will be generated and the dApp will process - the signature to authenticate the user. -

    - - -
    - - -

    Server: Verify Signature

    - -

    - When the backend receives the request, it retrieves the user associated - with the specified address from the database. It then obtains the - associated nonce from the database, - which is a random value that is only known to the user. -

    -

    - With the nonce, staking address, and signature, the backend can - cryptographically check that the nonce has been correctly signed by - the user. This allows the backend to verify that the user is the - owner of the public address, as only the owner of the address would - know the nonce value and be able to sign it with the associated - private key. -

    -

    - If the signature is verified, the user has successfully - authenticated and the frontend will then receive a JSON Web Token - (JWT) or session identifier to allow the user to access further - resources. This is an example is for login process, but you can - change it to use in approving a specific action, for example. -

    -

    - We also ensure that the nonce is not re-used (as this would make it - possible for an attacker to gain access to the user's account). This - is done by generating a random nonce for the user and saving it to - the database. By constantly generating a unique nonce each time the - user logs in, we can guarantee the user's signature is secure and - keep their account safe. -

    - -
    - - -

    Putting It All Together

    -

    - OK, let's put it all together! Your frontend code should now contain two - functions frontendStartLoginProcess() and{' '} - frontendSignMessage(nonce). -

    -

    - For signing in with a wallet, you can use the CardanoWallet{' '} - React UI component to connect and sign in with the user's wallet: -

    - -

    Putting the frontend code together might look like this:

    - -

    - And the server side code should have 2 REST endpoints,{' '} - backendGetNonce(userAddress) and{' '} - backendVerifySignature(userAddress, signature). The - code might look like this: -

    - -

    - There you go! Although this guide shows you how somebody can sign in with - wallet, the same technique can be used to authenticate any of a user's - actions. -

    -
    -
    - - ); -}; - -export default GuideLoginWithWalletPage; diff --git a/apps/mesh-web/pages/guides/smart-contract-transactions.tsx b/apps/mesh-web/pages/guides/smart-contract-transactions.tsx deleted file mode 100644 index 04ff22669..000000000 --- a/apps/mesh-web/pages/guides/smart-contract-transactions.tsx +++ /dev/null @@ -1,1176 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; -import { CardanoWallet, useWallet } from '@meshsdk/react'; -import { BlockfrostProvider } from '@meshsdk/core'; -import { - Transaction, - resolvePaymentKeyHash, - resolvePlutusScriptAddress, - resolveDataHash, -} from '@meshsdk/core'; -import type { Data, PlutusScript } from '@meshsdk/core'; -import { useEffect, useState } from 'react'; -import Button from '../../components/ui/button'; -import RunDemoResult from '../../components/common/runDemoResult'; -import ShowMoreDetails from '../../components/common/showMoreDetails'; -import useLocalStorage from '../../hooks/useLocalStorage'; -import MintMeshToken from '../../components/common/mintMeshToken'; -import { assetAssetId, assetPolicyId } from '../../configs/demo'; - -const policyId = assetPolicyId; -const assetId = assetAssetId; -const price = 10000000; - -const GuideSmartContractTransactionsPage: NextPage = () => { - const sidebarItems = [ - { label: 'Initialize the Marketplace', to: 'init' }, - { label: 'Listing asset for sale', to: 'listasset' }, - { label: 'Cancel the listing', to: 'cancelListing' }, - { label: 'Purchase the listed asset', to: 'purchaseAsset' }, - { label: 'Update listing', to: 'updateListing' }, - ]; - - return ( - <> - - - - - - - - - - - - ); -}; - -function IntroSection() { - const { wallet, connected } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - - return ( - <> -

    - In this guide, we will build a marketplace where users can list their - assets for sale and purchase the listed assets. The seller can update or - cancel the listing at any time. The contract is written in Haskell, and - it is open-source and available on{' '} - - GitHub - - . -

    -

    - If you would like to try out the demo in this guide, you can mint a Mesh - token which we will use for listing on this marketplace demo. Connect - your wallet and mint the token on preprod/preview testnet. -

    - - - {/* {connected ? ( - <> - - {response !== null && ( - <> -

    Mesh token minted successful.

    - - - )} - - ) : ( - - )} */} - -

    - If you now have the Mesh token, we can list it on the marketplace in - this demo. -

    - - ); -} - -function Init() { - return ( - <> - -

    Initialize the Plutus script

    -

    - The first step is to initialize the Plutus script. The compiled plutus - smart contract script CBOR is: -

    - -

    The Plutus script is initialized with the following code:

    - -

    - Let's say we are testing our marketplace implementation on{' '} - preprod, we can resolve the Plutus script address with{' '} - resolvePlutusScriptAddress where we input the{' '} - PlutusScript and define the network (in our - demo we use 0 for testnet): -

    - -
    - - ); -} - -function ListAsset() { - let code = ``; - code += `const addr = (await wallet.getUsedAddresses())[0];\n\n`; - code += `const datumConstr: Data = {\n`; - code += ` alternative: 0,\n`; - code += ` fields: [\n`; - code += ` resolvePaymentKeyHash(addr),\n`; - code += ` listPriceInLovelace,\n`; - code += ` policyId,\n`; - code += ` assetId,\n`; - code += ` ],\n`; - code += `};\n\n`; - code += `const tx = new Transaction({ initiator: wallet })\n`; - code += `.sendAssets(\n`; - code += ` {\n`; - code += ` address: scriptAddress,\n`; - code += ` datum: {\n`; - code += ` value: datumConstr,\n`; - code += ` },\n`; - code += ` },\n`; - code += ` [\n`; - code += ` {\n`; - code += ` unit: policyId + assetId,\n`; - code += ` quantity: '1',\n`; - code += ` },\n`; - code += ` ]\n`; - code += `);\n\n`; - code += `const unsignedTx = await tx.build();\n`; - code += `const signedTx = await wallet.signTx(unsignedTx);\n`; - code += `const txHash = await wallet.submitTx(signedTx);\n`; - - let codeDatum = ``; - codeDatum += `const datumConstr: Data = {\n`; - codeDatum += ` alternative: 0,\n`; - codeDatum += ` fields: [\n`; - codeDatum += ` resolvePaymentKeyHash(addr), // seller address as pubkeyhash\n`; - codeDatum += ` listPriceInLovelace, // price\n`; - codeDatum += ` policyId, // policy ID of token\n`; - codeDatum += ` assetId, // asset name of token in hex\n`; - codeDatum += ` ],\n`; - codeDatum += `};\n`; - - let codeAddress = `const addr = (await wallet.getUsedAddresses())[0];`; - - let codeTransaction = ``; - codeTransaction += `const tx = new Transaction({ initiator: wallet })\n`; - codeTransaction += `.sendAssets(\n`; - codeTransaction += ` {\n`; - codeTransaction += ` address: scriptAddress,\n`; - codeTransaction += ` datum: {\n`; - codeTransaction += ` value: datumConstr,\n`; - codeTransaction += ` },\n`; - codeTransaction += ` },\n`; - codeTransaction += ` [\n`; - codeTransaction += ` {\n`; - codeTransaction += ` unit: policyId + assetId,\n`; - codeTransaction += ` quantity: '1',\n`; - codeTransaction += ` },\n`; - codeTransaction += ` ]\n`; - codeTransaction += `);\n\n`; - codeTransaction += `const unsignedTx = await tx.build();\n`; - codeTransaction += `const signedTx = await wallet.signTx(unsignedTx);\n`; - codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; - - // - - const { wallet, connected } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - const [userLocalStorage, setUserlocalStorage] = useLocalStorage( - 'meshMarketplaceDemo', - {} - ); - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const { listAsset } = useMarketplacePlutus({ - blockchainFetcher: blockchainProvider, - network: 0, - }); - - async function doListAsset() { - setLoading(true); - setResponse(null); - - try { - const address = (await wallet.getUsedAddresses())[0]; - - const txHash = await listAsset({ - policyId: policyId, - assetId: assetId, - listPriceInLovelace: price, - quantity: '1', - }); - setUserlocalStorage({ - sellerAddress: address, - listPrice: price, - }); - setResponse(txHash); - } catch (error) { - setResponse(`${error}`); - } - setLoading(false); - } - - return ( - -

    Listing Asset for Sale

    - -

    - Firstly, we get the user's wallet address: this address is the seller's - address. We can acquire the first wallet's address from the connected - wallet with getUsedAddresses(): -

    - -

    Then, we create the datum that has the following schema:

    - -

    - Lastly, we create a transaction that uses sendAssets(), to - send the asset for sale to the script address with the datum we have - defined. policyId + assetId is the asset name in hex. We - build the transaction, the seller signs the transaction and submits the - transaction to the blockchain. -

    - - -

    Give the demo a try!

    - - {connected ? ( - <> - - {response !== null && ( - <> -

    Asset listed successful.

    - - - )} - - ) : ( - - )} - -

    - Now implement your own marketplace. Note: you may need a database to - store the listing information. -

    - - - - -
    - ); -} - -function CancelListing() { - let codeDatum = ``; - codeDatum += `const datumConstr: Data = {\n`; - codeDatum += ` alternative: 0,\n`; - codeDatum += ` fields: [\n`; - codeDatum += ` resolvePaymentKeyHash(addr), // seller address as pubkeyhash\n`; - codeDatum += ` listPriceInLovelace, // price\n`; - codeDatum += ` policyId, // policy ID of token\n`; - codeDatum += ` assetId, // asset name of token in hex\n`; - codeDatum += ` ],\n`; - codeDatum += `};\n`; - - let codegetAssetUtxo = ``; - codegetAssetUtxo += `async function _getAssetUtxo({ scriptAddress, asset, datum }) {\n`; - codegetAssetUtxo += ` const utxos = await blockchainFetcher.fetchAddressUTxOs(\n`; - codegetAssetUtxo += ` scriptAddress,\n`; - codegetAssetUtxo += ` asset\n`; - codegetAssetUtxo += ` );\n`; - codegetAssetUtxo += ` if (utxos.length == 0) {\n`; - codegetAssetUtxo += ` throw 'No listing found.';\n`; - codegetAssetUtxo += ` }\n`; - codegetAssetUtxo += ` const dataHash = resolveDataHash(datum);\n`; - codegetAssetUtxo += ` let utxo = utxos.find((utxo: any) => {\n`; - codegetAssetUtxo += ` return utxo.output.dataHash == dataHash;\n`; - codegetAssetUtxo += ` });\n`; - codegetAssetUtxo += ` return utxo;\n`; - codegetAssetUtxo += `}\n`; - - let codeRedeemer = `const redeemer = { data: { alternative: 1, fields: [] } };\n`; - - let codeTransaction = ''; - codeTransaction += `const tx = new Transaction({ initiator: wallet })\n`; - codeTransaction += ` .redeemValue({\n`; - codeTransaction += ` value: assetUtxo,\n`; - codeTransaction += ` script: script,\n`; - codeTransaction += ` datum: datumConstr,\n`; - codeTransaction += ` redeemer: redeemer,\n`; - codeTransaction += ` })\n`; - codeTransaction += ` .sendValue(addr, assetUtxo)\n`; - codeTransaction += ` .setRequiredSigners([addr]);\n`; - codeTransaction += `\n`; - codeTransaction += `const unsignedTx = await tx.build();\n`; - codeTransaction += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; - - let code = ``; - code += `const addr = (await wallet.getUsedAddresses())[0];\n`; - code += `\n`; - code += `const datumConstr: Data = {\n`; - code += ` alternative: 0,\n`; - code += ` fields: [\n`; - code += ` resolvePaymentKeyHash(addr),\n`; - code += ` listPriceInLovelace,\n`; - code += ` policyId,\n`; - code += ` assetId,\n`; - code += ` ],\n`; - code += `};\n`; - code += `\n`; - code += `const assetUtxo = await _getAssetUtxo({\n`; - code += ` scriptAddress: scriptAddress,\n`; - code += ` asset: '${policyId}${assetId}',\n`; - code += ` datum: datumConstr,\n`; - code += `});\n`; - code += `\n`; - code += `if (assetUtxo === undefined) {\n`; - code += ` throw 'No listing found.';\n`; - code += `}\n`; - code += `\n`; - code += `const redeemer = { data: { alternative: 1, fields: [] } };\n`; - code += `\n`; - code += `const tx = new Transaction({ initiator: wallet })\n`; - code += ` .redeemValue({\n`; - code += ` value: assetUtxo,\n`; - code += ` script: script,\n`; - code += ` datum: datumConstr,\n`; - code += ` redeemer: redeemer,\n`; - code += ` })\n`; - code += ` .sendValue(addr, assetUtxo)\n`; - code += ` .setRequiredSigners([addr]);\n`; - code += `\n`; - code += `const unsignedTx = await tx.build();\n`; - code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - code += `const txHash = await wallet.submitTx(signedTx);\n`; - - // - - const { connected } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const { cancelListing } = useMarketplacePlutus({ - blockchainFetcher: blockchainProvider, - network: 0, - }); - - async function doCancelListing() { - setLoading(true); - setResponse(null); - - try { - const txHash = await cancelListing({ - policyId: policyId, - assetId: assetId, - listPriceInLovelace: price, - }); - setResponse(txHash); - } catch (error) { - setResponse(`${error}`); - } - setLoading(false); - } - - return ( - -

    Cancel the Listing

    - -

    - Next, we will learn how to cancel the listing. Only the seller of the - NFT can cancel the listing, thus we will define the datum with the - following information: -

    - - - -

    - For cancel, update and purchase endpoints, we need the UTxO in the - script address as inputs to create the transaction. We use{' '} - fetchAddressUTxOs() from one of the{' '} - providers to query for UTxOs that contain - the asset of our interest. Next, we filter the UTxO list by the datum - hash, which we can get from the datum with{' '} - resolveDataHash() (see{' '} - resolvers). Here is the - implementation for _getAssetUtxo(), to get the UTxO in the - script address that consists of the listed asset, and we use the datum - hash to filter and get the correct UTxO for the transaction's input: -

    - - - -

    Next, we define the redeemer for cancelling the listing:

    - - - -

    - Finally, we can build the transaction with the following code. We use - the redeemValue() method to redeem the UTxO in the script - address, and send the value back to the seller's address. We also need - to set the "required signers" to include just the seller's address. -

    - - - -

    - Give the demo a try! Try cancelling the listing and get your NFT back if - you have listed one. -

    - - {connected ? ( - <> - - {response !== null && ( - <> -

    Listing cancelled successful.

    - - - )} - - ) : ( - - )} - - - - -
    - ); -} - -function PurchaseListing() { - let codeAddress = - "const addr = (await wallet.getUsedAddresses())[0]; // buyer's address"; - - let codeDatum = ``; - codeDatum += `const datumConstr: Data = {\n`; - codeDatum += ` alternative: 0,\n`; - codeDatum += ` fields: [\n`; - codeDatum += ` resolvePaymentKeyHash(sellerAddr), // seller address as pubkeyhash\n`; - codeDatum += ` listPriceInLovelace, // price\n`; - codeDatum += ` policyId, // policy ID of token\n`; - codeDatum += ` assetId, // asset name of token in hex\n`; - codeDatum += ` ],\n`; - codeDatum += `};\n`; - - let codeRedeemer = `const redeemer = { data: { alternative: 0, fields: [] } };\n`; - - let codeTransaction = ''; - codeTransaction += `const tx = new Transaction({ initiator: wallet })\n`; - codeTransaction += ` .redeemValue({\n`; - codeTransaction += ` value: assetUtxo,\n`; - codeTransaction += ` script: script,\n`; - codeTransaction += ` datum: datumConstr,\n`; - codeTransaction += ` redeemer: redeemer,\n`; - codeTransaction += ` })\n`; - codeTransaction += ` .sendValue(addr, assetUtxo)\n`; - codeTransaction += ` .sendLovelace(sellerAddr, listPriceInLovelace.toString())\n`; - codeTransaction += ` .setRequiredSigners([addr]);\n`; - codeTransaction += `\n`; - codeTransaction += `const unsignedTx = await tx.build();\n`; - codeTransaction += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; - - let code = ``; - code += `const addr = (await wallet.getUsedAddresses())[0]; // buyer's address\n`; - code += `\n`; - code += `const datumConstr: Data = {\n`; - code += ` alternative: 0,\n`; - code += ` fields: [\n`; - code += ` resolvePaymentKeyHash(sellerAddr),\n`; - code += ` listPriceInLovelace,\n`; - code += ` policyId,\n`; - code += ` assetId,\n`; - code += ` ],\n`; - code += `};\n`; - code += `\n`; - code += `const assetUtxo = await _getAssetUtxo({\n`; - code += ` scriptAddress: scriptAddress,\n`; - code += ` asset: '${policyId}${assetId}',\n`; - code += ` datum: datumConstr,\n`; - code += `});\n`; - code += `\n`; - code += `const redeemer = { data: { alternative: 0, fields: [] } };\n`; - code += `\n`; - code += `const tx = new Transaction({ initiator: wallet })\n`; - code += ` .redeemValue({\n`; - code += ` value: assetUtxo,\n`; - code += ` script: script,\n`; - code += ` datum: datumConstr,\n`; - code += ` redeemer: redeemer,\n`; - code += ` })\n`; - code += ` .sendValue(addr, assetUtxo)\n`; - code += ` .sendLovelace(sellerAddr, listPriceInLovelace.toString())\n`; - code += ` .setRequiredSigners([addr]);\n`; - code += `\n`; - code += `const unsignedTx = await tx.build();\n`; - code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - code += `const txHash = await wallet.submitTx(signedTx);\n`; - - // - - const { connected } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - const [userLocalStorage, setUserlocalStorage] = useLocalStorage( - 'meshMarketplaceDemo', - {} - ); - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const { buyAsset } = useMarketplacePlutus({ - blockchainFetcher: blockchainProvider, - network: 0, - }); - - async function doPurchase() { - setLoading(true); - setResponse(null); - - try { - const txHash = await buyAsset({ - policyId: policyId, - assetId: assetId, - listPriceInLovelace: price, - sellerAddr: userLocalStorage.sellerAddress, - }); - setResponse(txHash); - } catch (error) { - setResponse(`${error}`); - } - setLoading(false); - } - - return ( - -

    Purchase the Listed Asset

    - -

    - A key feature of a marketplace is the ability to purchase the listed - asset from the seller. The purchase endpoint will take the asset, the - price and the seller address as parameters. These parameters will be - used to create the datum for the validator. A successful purchase will - result in the transfer of the asset to the buyer and the listed price to - the seller. -

    - -

    First, we need the buyer's address to send the asset to:

    - - - -

    - Like the cancel endpoint, we need to create the datum for the validator. - It is important to note that we are using the seller's address to create - the datum: -

    - - - -

    Then, we will define the redeemer:

    - - - -

    - Finally, we can build the transaction and submit it to the blockchain. - We will use the redeemValue() method to redeem the asset - from the validator, use sendValue() to send the asset to - the buyer and sendLovelace() to send the payment price to - the seller: -

    - - - -

    - Give the demo a try! Try purchasing the NFT by connecting another - wallet. -

    - - {connected ? ( - <> - - {response !== null && ( - <> -

    Purchase successful.

    - - - )} - - ) : ( - - )} - - - - -
    - ); -} - -function UpdateListing() { - let codeDatum = ``; - codeDatum += `const datumConstr: Data = {\n`; - codeDatum += ` alternative: 0,\n`; - codeDatum += ` fields: [\n`; - codeDatum += ` resolvePaymentKeyHash(addr), // seller address as pubkeyhash\n`; - codeDatum += ` listPriceInLovelace, // listed price\n`; - codeDatum += ` policyId, // policy ID of token\n`; - codeDatum += ` assetId, // asset name of token in hex\n`; - codeDatum += ` ],\n`; - codeDatum += `};\n`; - - let codeDatumNew = ''; - codeDatumNew += `const datumConstrNew: Data = {\n`; - codeDatumNew += ` alternative: 0,\n`; - codeDatumNew += ` fields: [\n`; - codeDatumNew += ` resolvePaymentKeyHash(addr), // seller address as pubkeyhash\n`; - codeDatumNew += ` updatedPriceInLovelace, // updated price\n`; - codeDatumNew += ` policyId, // policy ID of token\n`; - codeDatumNew += ` assetId, // asset name of token in hex\n`; - codeDatumNew += ` ],\n`; - codeDatumNew += `};\n`; - - let codeRedeemer = `const redeemer = { data: { alternative: 1, fields: [] } };\n`; - - let codeTransaction = ''; - codeTransaction += `const tx = new Transaction({ initiator: wallet })\n`; - codeTransaction += ` .redeemValue({\n`; - codeTransaction += ` value: assetUtxo,\n`; - codeTransaction += ` script: script,\n`; - codeTransaction += ` datum: datumConstr,\n`; - codeTransaction += ` redeemer: redeemer,\n`; - codeTransaction += ` })\n`; - codeTransaction += ` .setRequiredSigners([addr])\n`; - codeTransaction += ` .sendAssets(\n`; - codeTransaction += ` {\n`; - codeTransaction += ` address: scriptAddress,\n`; - codeTransaction += ` datum: {\n`; - codeTransaction += ` value: datumConstrNew,\n`; - codeTransaction += ` },\n`; - codeTransaction += ` },\n`; - codeTransaction += ` [\n`; - codeTransaction += ` {\n`; - codeTransaction += ` unit: '${policyId}${assetId}',\n`; - codeTransaction += ` quantity: '1',\n`; - codeTransaction += ` },\n`; - codeTransaction += ` ]\n`; - codeTransaction += ` );\n`; - codeTransaction += `\n`; - codeTransaction += `const unsignedTx = await tx.build();\n`; - codeTransaction += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; - - let code = ``; - code += `const addr = (await wallet.getUsedAddresses())[0];\n`; - code += `\n`; - code += `const datumConstr: Data = {\n`; - code += ` alternative: 0,\n`; - code += ` fields: [\n`; - code += ` resolvePaymentKeyHash(addr),\n`; - code += ` listPriceInLovelace,\n`; - code += ` policyId,\n`; - code += ` assetId,\n`; - code += ` ],\n`; - code += `};\n`; - code += `\n`; - code += `const datumConstrNew: Data = {\n`; - code += ` alternative: 0,\n`; - code += ` fields: [\n`; - code += ` resolvePaymentKeyHash(addr),\n`; - code += ` updatedPriceInLovelace,\n`; - code += ` policyId,\n`; - code += ` assetId,\n`; - code += ` ],\n`; - code += `};\n`; - code += `\n`; - code += `const assetUtxo = await _getAssetUtxo({\n`; - code += ` scriptAddress: scriptAddress,\n`; - code += ` asset: '${policyId}${assetId}',\n`; - code += ` datum: datumConstr,\n`; - code += `});\n`; - code += `\n`; - code += `const redeemer = { data: { alternative: 1, fields: [] } };\n`; - code += `\n`; - code += `const tx = new Transaction({ initiator: wallet })\n`; - code += ` .redeemValue({\n`; - code += ` value: assetUtxo,\n`; - code += ` script: script,\n`; - code += ` datum: datumConstr,\n`; - code += ` redeemer: redeemer,\n`; - code += ` })\n`; - code += ` .setRequiredSigners([addr])\n`; - code += ` .sendAssets(\n`; - code += ` {\n`; - code += ` address: scriptAddress,\n`; - code += ` datum: {\n`; - code += ` value: datumConstrNew,\n`; - code += ` },\n`; - code += ` },\n`; - code += ` [\n`; - code += ` {\n`; - code += ` unit: '${policyId}${assetId}',\n`; - code += ` quantity: '1',\n`; - code += ` },\n`; - code += ` ]\n`; - code += ` );\n`; - code += `\n`; - code += `const unsignedTx = await tx.build();\n`; - code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; - code += `const txHash = await wallet.submitTx(signedTx);\n`; - - // - - const { connected } = useWallet(); - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - - const blockchainProvider = new BlockfrostProvider( - process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - ); - - const { updateListing } = useMarketplacePlutus({ - blockchainFetcher: blockchainProvider, - network: 0, - }); - - async function doUpdatelListing() { - setLoading(true); - setResponse(null); - - try { - const txHash = await updateListing({ - policyId: policyId, - assetId: assetId, - listPriceInLovelace: price, - quantity: '1', - updatedPriceInLovelace: price, - }); - setResponse(txHash); - } catch (error) { - setResponse(`${error}`); - } - setLoading(false); - } - - return ( - -

    Update the Listing

    - -

    - Finally, we will learn how to update the listing. Only the seller of the - NFT can update the listing, thus we will define the datum with the - following information: -

    - - - -

    We will also need to create the updated datum with the new price:

    - - - -

    Next, we define the redeemer for updating the listing:

    - - - -

    - Finally, we can build the transaction to update the listing. We use the{' '} - redeemValue() method to redeem the UTxO in the script - address with the original datum, and then we use the{' '} - sendAssets() method to send the NFT to the same script - address, with the new datum. -

    - - - -

    - Give the demo a try! Try updating the listing. Just simplicity for this - demo, we will update the price to the same price, but in a real - application you would update the price to a new price. -

    - - {connected ? ( - <> - - {response !== null && ( - <> -

    Listing updated successful.

    - - - )} - - ) : ( - - )} - - - - -
    - ); -} - -function OutroSection() { - return ( - <> -

    - And there you go! I hope this is a good starting point for you to start - building your own apps that use smart contracts! -

    - - ); -} - -///////// - -export default GuideSmartContractTransactionsPage; - -// const scriptCbor = '590d74590d7101000033232323232323232323232323233223232323232223232323223223232533533300b3333573466e1cd55cea804a400046666444424666600200a0080060046eb8d5d0a8049bad35742a0106eb8d5d0a8039bae357426ae89401c8c98c8078cd5ce00f80f00e1999ab9a3370ea0089001109100091999ab9a3370ea00a9000109100111931900f99ab9c02001f01d01c3333573466e1cd55cea80124000466442466002006004646464646464646464646464646666ae68cdc39aab9d500c480008cccccccccccc88888888888848cccccccccccc00403403002c02802402001c01801401000c008cd406c070d5d0a80619a80d80e1aba1500b33501b01d35742a014666aa03eeb94078d5d0a804999aa80fbae501e35742a01066a03604c6ae85401cccd5407c09dd69aba150063232323333573466e1cd55cea801240004664424660020060046464646666ae68cdc39aab9d5002480008cc8848cc00400c008cd40c5d69aba150023032357426ae8940088c98c80d0cd5ce01a81a01909aab9e5001137540026ae854008c8c8c8cccd5cd19b8735573aa004900011991091980080180119a818bad35742a00460646ae84d5d1280111931901a19ab9c035034032135573ca00226ea8004d5d09aba2500223263203033573806206005c26aae7940044dd50009aba1500533501b75c6ae854010ccd5407c08c8004d5d0a801999aa80fbae200135742a004604a6ae84d5d1280111931901619ab9c02d02c02a135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d55cf280089baa00135742a004602a6ae84d5d1280111931900f19ab9c01f01e01c101d13263201d335738921035054350001d135573ca00226ea80044d55ce9baa001135744a00226ae8940044d55cf280089baa0011232230023758002640026aa028446666aae7c004940288cd4024c010d5d080118019aba2002014232323333573466e1cd55cea8012400046644246600200600460186ae854008c014d5d09aba2500223263201433573802a02802426aae7940044dd50009191919191999ab9a3370e6aae75401120002333322221233330010050040030023232323333573466e1cd55cea80124000466442466002006004602a6ae854008cd403c050d5d09aba2500223263201933573803403202e26aae7940044dd50009aba150043335500875ca00e6ae85400cc8c8c8cccd5cd19b875001480108c84888c008010d5d09aab9e500323333573466e1d4009200223212223001004375c6ae84d55cf280211999ab9a3370ea00690001091100191931900d99ab9c01c01b019018017135573aa00226ea8004d5d0a80119a805bae357426ae8940088c98c8054cd5ce00b00a80989aba25001135744a00226aae7940044dd5000899aa800bae75a224464460046eac004c8004d5404488c8cccd55cf80112804119a8039991091980080180118031aab9d5002300535573ca00460086ae8800c0484d5d080088910010910911980080200189119191999ab9a3370ea0029000119091180100198029aba135573ca00646666ae68cdc3a801240044244002464c6402066ae700440400380344d55cea80089baa001232323333573466e1d400520062321222230040053007357426aae79400c8cccd5cd19b875002480108c848888c008014c024d5d09aab9e500423333573466e1d400d20022321222230010053007357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6402066ae7004404003803403002c4d55cea80089baa001232323333573466e1cd55cea80124000466442466002006004600a6ae854008dd69aba135744a004464c6401866ae700340300284d55cf280089baa0012323333573466e1cd55cea800a400046eb8d5d09aab9e500223263200a33573801601401026ea80048c8c8c8c8c8cccd5cd19b8750014803084888888800c8cccd5cd19b875002480288488888880108cccd5cd19b875003480208cc8848888888cc004024020dd71aba15005375a6ae84d5d1280291999ab9a3370ea00890031199109111111198010048041bae35742a00e6eb8d5d09aba2500723333573466e1d40152004233221222222233006009008300c35742a0126eb8d5d09aba2500923333573466e1d40192002232122222223007008300d357426aae79402c8cccd5cd19b875007480008c848888888c014020c038d5d09aab9e500c23263201333573802802602202001e01c01a01801626aae7540104d55cf280189aab9e5002135573ca00226ea80048c8c8c8c8cccd5cd19b875001480088ccc888488ccc00401401000cdd69aba15004375a6ae85400cdd69aba135744a00646666ae68cdc3a80124000464244600400660106ae84d55cf280311931900619ab9c00d00c00a009135573aa00626ae8940044d55cf280089baa001232323333573466e1d400520022321223001003375c6ae84d55cf280191999ab9a3370ea004900011909118010019bae357426aae7940108c98c8024cd5ce00500480380309aab9d50011375400224464646666ae68cdc3a800a40084244400246666ae68cdc3a8012400446424446006008600c6ae84d55cf280211999ab9a3370ea00690001091100111931900519ab9c00b00a008007006135573aa00226ea80048c8cccd5cd19b8750014800884880088cccd5cd19b8750024800084880048c98c8018cd5ce00380300200189aab9d37540029309000a48103505431001123230010012233003300200200132323232332232323233223232332232323232323232323232332232323222232533500313301c3301249010131003301a33300f3300550015335323500122222222222200450011622153350011002221635004222200235004222200148008cc070cc0492410132003232333573466e2000800407c080d4014888800cccc03ccc0154004c05801006c06ccc0492410133003301a32333355300c12001323350132233350110030010023500e00133501222230033002001200122337000029001000a4000664464600266aa60342400246a00244002646a002444444444444018a008640026aa04844a66a002200644264a66a64646a004446a006446466a00a466a0084a66a666ae68cdc78010008170168a80188169016919a80210169299a999ab9a3371e00400205c05a2a006205a2a66a00642a66a0044266a004466a004466a004466a0044660420040024060466a004406046604200400244406044466a0084060444a66a666ae68cdc38030018198190a99a999ab9a3370e00a00406606426605e0080022064206420562a66a002420562056664424660020060046424460020066aa66a6a014446a0044444444444446666a01a4a0564a0564a0564666aa604424002a04e46a00244a66aa66a666ae68cdc79a801110011a8021100101c01b8999ab9a3370e6a004440026a0084400207006e206e26a05e0062a05c01a426a002446a00244446a0084466a0044606493119aa8198008028981424c44004a0386a006444400826600e00600220026008002a030a03290010998092481013400323235002222222222222533533355301912001501e25335333573466e3c0380040b40b04d40900045408c010840b440acc05c014c04c0084c04800488ccd54c0104800488cd54c024480048d400488cd5408c008cd54c030480048d400488cd54098008ccd40048cc0952000001223302600200123302500148000004cd54c024480048d400488cd5408c008ccd40048cd54c034480048d400488cd5409c008d5403c00400488ccd5540280480080048cd54c034480048d400488cd5409c008d54038004004ccd5540140340080054058d4008888888888888ccd54c0404800488d40088888d401088cd400894cd4ccd5cd19b8f01600103002f133502a00600810082008502200a111222333553004120015015335530071200123500122335502100235500900133355300412001223500222533533355300c120013233501322333500322002002001350012200112330012253350021022100101f235001223300a002005006100313350190040035016001335530071200123500122323355022003300100532001355022225335001135500a003221350022253353300c002008112223300200a004130060030023200135501b2211222533500110022213300500233355300712001005004001112122230030041121222300100432001355018221122533500115013221335014300400233553006120010040013200135501722112225335001135006003221333500900530040023335530071200100500400112350012200112350012200222333573466e3c008004048044888c8c8c004014c8004d5405c88cd400520002235002225335333573466e3c0080240640604c01c0044c01800cc8004d5405888cd400520002235002225335333573466e3c00801c06005c40044c01800c4cd4004894cd40088400c4005401048848cc00400c008894cd400440384cd5ce00100691a80091001090911801001889100091a8009111002190009aa805910891299a8008a80311099a803980200119aa98030900080200088910010910911980080200191199ab9a3370e00400200c00a910100225335002100110031220021220012233700004002464c649319ab9c4901024c67001200111221233001003002112323001001223300330020020011'; - -// const scriptCbor = -// '5911690100003323322333222332233223232333222323332223233333333222222223233322232333322223232332232333222323332223232332233223232333332222233223322332233223322332222323232323232232232325335303833300d3333573466e1cd55cea805a400046666664444446666660ba00c00a0080060040026eb8d5d0a8059bad35742a0146eb8d5d0a8049bae35742a0106eb8d5d0a8039bad357426ae89401c8d4138d4c13ccd5ce2490350543100050499263333573466e1d40112002205423333573466e1d40152000205623504f353050335738921035054310005149926498cccd5cd19b8735573aa004900011980819191919191919191919191999ab9a3370e6aae75402920002333333333301e33502c232323333573466e1cd55cea80124000466048607e6ae854008c0c4d5d09aba2500223505e35305f3357389201035054310006049926135573ca00226ea8004d5d0a80519a8160169aba150093335503375ca0646ae854020ccd540cdd728191aba1500733502c04835742a00c66a05866aa0b20a2eb4d5d0a8029919191999ab9a3370e6aae754009200023350263232323333573466e1cd55cea80124000466a05c66a08eeb4d5d0a80118261aba135744a00446a0c46a60c666ae712401035054310006449926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502c33504775a6ae854008c130d5d09aba250022350623530633357389201035054310006449926135573ca00226ea8004d5d09aba2500223505e35305f3357389201035054310006049926135573ca00226ea8004d5d0a80219a8163ae35742a00666a05866aa0b2eb88004d5d0a801181f1aba135744a00446a0b46a60b666ae71241035054310005c49926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031181198201aba135573ca00646666ae68cdc3a801240084604460946ae84d55cf280211999ab9a3370ea006900111811181a9aba135573ca00a46666ae68cdc3a802240004604a6eb8d5d09aab9e50062350553530563357389201035054310005749926499264984d55cea80089baa001357426ae8940088d4138d4c13ccd5ce249035054310005049926104f13504d35304e3357389201035054350004f4984d55cf280089baa001135573a6ea80044d5d1280089aba25001135744a00226ae8940044d55cf280089baa0012212330010030022001222222222212333333333300100b00a00900800700600500400300220012212330010030022001122123300100300212001122123300100300212001122123300100300212001212222300400521222230030052122223002005212222300100520011232230023758002640026aa072446666aae7c004940388cd4034c010d5d080118019aba200203323232323333573466e1cd55cea801a4000466600e6464646666ae68cdc39aab9d5002480008cc034c0c4d5d0a80119a8098169aba135744a00446a06c6a606e66ae71241035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540cc88c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004488008488004800488888848cccccc00401c01801401000c0088004448c8c00400488cc00cc008008004cc8c8c8ccc888c8c8cc88c8c8ccc888c8c8cccc8888c8cc88cc88c8c8cc88cc88c8c8c8c8cc88ccc888ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8c888c888c94cd4c0dc00c54cd4c168cc0f4c028ccc01cccd54c128480054111414ccc02001940052201004881003303e3303c4800920c801300a35303a00522222200515335305a333573466e1cccc01cccd54c128480054111414ccc0214cd4d4144d4c0354004888888888800c4c178588854cd4d414c0044008884c188594004d4c0e8014888888010d4c0e801488888800d200205c05b15335305a3303d300a33300733355304a12001504450533300835303a0052222220065001489004881003303e3303c3370266e0520d00f48050d4c0e801488888800520d00f300a35303a00522222200515335305a5335305a333573466e1d4011200005c05b105c13303d300a33300733355304a12001504450533300835303a0052222220025001489004881003303e3303c5004483403cc028d4c0e80148888880144ccd5cd19b87323320013200133355305112001323350592233350590030010023505600133505822230033002001200122337000029001000a4000666aa60942400244a66a60b86a602a6a60260044440064466a607000440c04a66a6a034004420c220c2266a0a80040022002a0a6664464600266aa60182400246a6026002440026a6020a0084444444444014640026aa0c244a66a6a0aa0022006442646600e0060026008002a0a4a0a6900102e02d882d882d882d882d899911a98078011111111111299a9a810999aa982e0900099a83191299a9a811801108018800a8111299a9833999ab9a3371e0180020d20d026a0480022a046006420d220ce6a6016004440046a607400a44444400c26a60140024400426a606c0024444440024446464600200a640026aa0b84466a6a0a00029000111a9aa82480111299a982e999ab9a3371e0040120be0bc2600e0022600c006640026aa0b64466a6a09e0029000111a9aa82400111299a982e199ab9a3371e00400e0bc0ba20022600c006446a600e0024444444444666aa609c24002446a602e0044446a60380064466a607e0044a66a60cc666ae68cdc780a000834033899a82f00280388039003a82b804990009aa82b110891299a9a8260008a82711099a827980200119aa980309000802000919a81d000a40044424660020060044002444444444424666666666600201601401201000e00c00a0080060044002442466002006004400244424666002008006004400244246600200600440022424460040062244002240022442466002006004240022442466002006004240022442466002006004240022424446006008224440042244400224002424444600800a424444600600a424444600400a424444600200a40024424660020060044002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024244600400644424466600200a00800640024244600400642446002006400224400424400240024444442466666600200e00c00a0080060044002446600a66e080094cd4c080ccd5cd19b870014800008808452000153353020333573466e2400520000210221480084cdc0a40009001299a9810199ab9a337100029000011010899b8148000004400488d4d401c00888d4d402400c88c94cd4c090ccd5cd19b87005003026025153353024333573466e1c0100080980944098540045400454cd4c08cccd5cd19b893370400800266e0800800c0940904090409488d4d401800888d4d402000c88cc01ccdc100200119b8200300122325335301e333573466e1c009200002001f132635300433573892103505433000054984cd401ccdc2001a80099b84002500113301c5335301d333573466e20009200001f01e13370290000010801299a980e999ab9a33710002900000f80f099b8148000004400448004800448848cc00400c00848004488cd54c034480048d4d5401c00488cd54028008cd54c040480048d4d5402800488cd54034008ccd4d5403c0048cc0892000001223302300200123302200148000004cd54c034480048d4d5401c00488cd54028008ccd4d540300048cd54c044480048d4d5402c00488cd54038008d5404c00400488ccd55402006c0080048cd54c044480048d4d5402c00488cd54038008d54044004004ccd55400c058008004444888ccd54c020480054040cd54c034480048d4d5401c00488cd54028008d5403c004ccd54c0204800488d4d54020008894cd4c070ccd54c04848004c8cd406888ccd4d402c00c88008008004d4d402400488004cd4024894cd4c078008408040040748d4d5402c00488cc028008014018400c4cd405001000d4044004cd54c034480048d4d5401c00488c8cd5402c00cc004014c8004d54080894cd4d40500044d5403c00c884d4d54034008894cd4c084cc0300080204cd5405001c0044c01800c00848848cc00400c00848004448848cc00400c008448004c8004d5405488448894cd4d40300044008884cc014008ccd54c01c480040140100044484888c00c01044884888cc0080140104484888c004010448004c8004d540408844894cd4d401800454020884cd4024c010008cd54c01848004010004c8004d5403c88448894cd4d40180044d402400c884ccd4030014c010008ccd54c01c480040140100044488008488488cc00401000c4800448d4d400c0048800448d4d40080048800848848cc00400c0084800488ccd5cd19b8f0020010060053200135500622253353004333573466e1c005200000600510021330030013370a00400224400424400240024466e0000800498448c8c00400488cc00cc00800800522011c09aaedfc2c267948a623a4dddd093327c235c3fa88a47f14d41a73470001'; - -const scriptCbor = - '59079559079201000033232323232323232323232323232332232323232323232222232325335333006300800530070043333573466e1cd55cea80124000466442466002006004646464646464646464646464646666ae68cdc39aab9d500c480008cccccccccccc88888888888848cccccccccccc00403403002c02802402001c01801401000c008cd4060064d5d0a80619a80c00c9aba1500b33501801a35742a014666aa038eb9406cd5d0a804999aa80e3ae501b35742a01066a0300466ae85401cccd54070091d69aba150063232323333573466e1cd55cea801240004664424660020060046464646666ae68cdc39aab9d5002480008cc8848cc00400c008cd40b9d69aba15002302f357426ae8940088c98c80c8cd5ce01981901809aab9e5001137540026ae854008c8c8c8cccd5cd19b8735573aa004900011991091980080180119a8173ad35742a004605e6ae84d5d1280111931901919ab9c033032030135573ca00226ea8004d5d09aba2500223263202e33573805e05c05826aae7940044dd50009aba1500533501875c6ae854010ccd540700808004d5d0a801999aa80e3ae200135742a00460446ae84d5d1280111931901519ab9c02b02a028135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d55cf280089baa00135742a00460246ae84d5d1280111931900e19ab9c01d01c01a101b13263201b3357389201035054350001b135573ca00226ea80054049404448c88c008dd6000990009aa80a911999aab9f0012500a233500930043574200460066ae880080548c8c8cccd5cd19b8735573aa004900011991091980080180118061aba150023005357426ae8940088c98c8054cd5ce00b00a80989aab9e5001137540024646464646666ae68cdc39aab9d5004480008cccc888848cccc00401401000c008c8c8c8cccd5cd19b8735573aa0049000119910919800801801180a9aba1500233500f014357426ae8940088c98c8068cd5ce00d80d00c09aab9e5001137540026ae854010ccd54021d728039aba150033232323333573466e1d4005200423212223002004357426aae79400c8cccd5cd19b875002480088c84888c004010dd71aba135573ca00846666ae68cdc3a801a400042444006464c6403866ae700740700680640604d55cea80089baa00135742a00466a016eb8d5d09aba2500223263201633573802e02c02826ae8940044d5d1280089aab9e500113754002266aa002eb9d6889119118011bab00132001355012223233335573e0044a010466a00e66442466002006004600c6aae754008c014d55cf280118021aba200301313574200222440042442446600200800624464646666ae68cdc3a800a40004642446004006600a6ae84d55cf280191999ab9a3370ea0049001109100091931900899ab9c01201100f00e135573aa00226ea80048c8c8cccd5cd19b875001480188c848888c010014c01cd5d09aab9e500323333573466e1d400920042321222230020053009357426aae7940108cccd5cd19b875003480088c848888c004014c01cd5d09aab9e500523333573466e1d40112000232122223003005375c6ae84d55cf280311931900899ab9c01201100f00e00d00c135573aa00226ea80048c8c8cccd5cd19b8735573aa004900011991091980080180118029aba15002375a6ae84d5d1280111931900699ab9c00e00d00b135573ca00226ea80048c8cccd5cd19b8735573aa002900011bae357426aae7940088c98c802ccd5ce00600580489baa001232323232323333573466e1d4005200c21222222200323333573466e1d4009200a21222222200423333573466e1d400d2008233221222222233001009008375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c4664424444444660040120106eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc8848888888cc018024020c030d5d0a8049bae357426ae8940248cccd5cd19b875006480088c848888888c01c020c034d5d09aab9e500b23333573466e1d401d2000232122222223005008300e357426aae7940308c98c8050cd5ce00a80a00900880800780700680609aab9d5004135573ca00626aae7940084d55cf280089baa0012323232323333573466e1d400520022333222122333001005004003375a6ae854010dd69aba15003375a6ae84d5d1280191999ab9a3370ea0049000119091180100198041aba135573ca00c464c6401a66ae7003803402c0284d55cea80189aba25001135573ca00226ea80048c8c8cccd5cd19b875001480088c8488c00400cdd71aba135573ca00646666ae68cdc3a8012400046424460040066eb8d5d09aab9e500423263200a33573801601401000e26aae7540044dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6401666ae7003002c02402001c4d55cea80089baa0012323333573466e1d40052002212200223333573466e1d40092000212200123263200733573801000e00a00826aae74dd5000891999ab9a3370e6aae74dd5000a40004008464c6400866ae700140100092612001490103505431001123230010012233003300200200122212200201'; - -export function useMarketplacePlutus({ blockchainFetcher, network = 0 }) { - const { connected, wallet } = useWallet(); - const [scriptAddress, setScriptAddress] = useState(''); - const [script, setScript] = useState({}); - - useEffect(() => { - const _script: PlutusScript = { - code: scriptCbor, - version: 'V2', - }; - setScript(_script); - const _scriptAddress = resolvePlutusScriptAddress(_script, network); - setScriptAddress(_scriptAddress); - }, []); - - async function checkWallet() { - if (!connected) { - throw 'Wallet not connected'; - } - const walletNetwork = await wallet.getNetworkId(); - if (walletNetwork !== network) { - throw 'Wallet wrong network'; - } - } - - async function _getAssetUtxo({ scriptAddress, asset, datum }) { - const utxos = await blockchainFetcher.fetchAddressUTxOs( - scriptAddress, - asset - ); - if (utxos.length == 0) { - throw 'No listing found.'; - } - const dataHash = resolveDataHash(datum); - let utxo = utxos.find((utxo: any) => { - return utxo.output.dataHash == dataHash; - }); - return utxo; - } - - async function listAsset({ - policyId, - assetId, - listPriceInLovelace, - quantity, - }: { - policyId: string; - assetId: string; - listPriceInLovelace: number; - quantity: number | string; - }) { - await checkWallet(); - - const addr = (await wallet.getUsedAddresses())[0]; - const datumConstr: Data = { - alternative: 0, - fields: [ - resolvePaymentKeyHash(addr), - listPriceInLovelace, - policyId, - assetId, - ], - }; - const tx = new Transaction({ initiator: wallet }).sendAssets( - { - address: scriptAddress, - datum: { - value: datumConstr, - }, - }, - [ - { - unit: `${policyId}${assetId}`, - quantity: quantity.toString(), - }, - ] - ); - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx); - const txHash = await wallet.submitTx(signedTx); - return txHash; - } - - async function cancelListing({ - policyId, - assetId, - listPriceInLovelace, - }: { - policyId: string; - assetId: string; - listPriceInLovelace: number; - }) { - const addr = (await wallet.getUsedAddresses())[0]; - const datumConstr: Data = { - alternative: 0, - fields: [ - resolvePaymentKeyHash(addr), - listPriceInLovelace, - policyId, - assetId, - ], - }; - - if (wallet) { - const assetUtxo = await _getAssetUtxo({ - scriptAddress: scriptAddress, - asset: `${policyId}${assetId}`, - datum: datumConstr, - }); - - if (assetUtxo === undefined) { - throw 'No listing found.'; - } - - const redeemer = { data: { alternative: 1, fields: [] } }; - - const tx = new Transaction({ initiator: wallet }) - .redeemValue({ - value: assetUtxo, - script: script, - datum: datumConstr, - redeemer: redeemer, - }) - .sendValue(addr, assetUtxo) - .setRequiredSigners([addr]); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx, true); - const txHash = await wallet.submitTx(signedTx); - - return txHash; - } - } - - async function buyAsset({ - policyId, - assetId, - listPriceInLovelace, - sellerAddr, - }: { - policyId: string; - assetId: string; - listPriceInLovelace: number; - sellerAddr: string; - }) { - const addr = (await wallet.getUsedAddresses())[0]; // buyer's address - const datumConstr: Data = { - alternative: 0, - fields: [ - resolvePaymentKeyHash(sellerAddr), - listPriceInLovelace, - policyId, - assetId, - ], - }; - - if (wallet) { - const assetUtxo = await _getAssetUtxo({ - scriptAddress: scriptAddress, - asset: `${policyId}${assetId}`, - datum: datumConstr, - }); - - const redeemer = { data: { alternative: 0, fields: [] } }; - - const tx = new Transaction({ initiator: wallet }) - .redeemValue({ - value: assetUtxo, - script: script, - datum: datumConstr, - redeemer: redeemer, - }) - .sendValue(addr, assetUtxo) - .sendLovelace(sellerAddr, listPriceInLovelace.toString()) - .setRequiredSigners([addr]); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx, true); - const txHash = await wallet.submitTx(signedTx); - return txHash; - } - } - - async function updateListing({ - policyId, - assetId, - listPriceInLovelace, - quantity, - updatedPriceInLovelace, - }: { - policyId: string; - assetId: string; - listPriceInLovelace: number; - quantity: number | string; - updatedPriceInLovelace: number; - }) { - const addr = (await wallet.getUsedAddresses())[0]; - const datumConstr: Data = { - alternative: 0, - fields: [ - resolvePaymentKeyHash(addr), - listPriceInLovelace, - policyId, - assetId, - ], - }; - const datumConstrNew: Data = { - alternative: 0, - fields: [ - resolvePaymentKeyHash(addr), - updatedPriceInLovelace, - policyId, - assetId, - ], - }; - if (wallet) { - const assetUtxo = await _getAssetUtxo({ - scriptAddress: scriptAddress, - asset: `${policyId}${assetId}`, - datum: datumConstr, - }); - - const redeemer = { data: { alternative: 1, fields: [] } }; - - const tx = new Transaction({ initiator: wallet }) - .redeemValue({ - value: assetUtxo, - script: script, - datum: datumConstr, - redeemer: redeemer, - }) - .setRequiredSigners([addr]) - .sendAssets( - { - address: scriptAddress, - datum: { - value: datumConstrNew, - }, - }, - [ - { - unit: `${policyId}${assetId}`, - quantity: quantity.toString(), - }, - ] - ); - - const unsignedTx = await tx.build(); - const signedTx = await wallet.signTx(unsignedTx, true); - const txHash = await wallet.submitTx(signedTx); - return txHash; - } - } - - return { listAsset, buyAsset, updateListing, cancelListing }; -} diff --git a/apps/mesh-web/pages/guides/smart-contract.tsx b/apps/mesh-web/pages/guides/smart-contract.tsx deleted file mode 100644 index c9aae3c71..000000000 --- a/apps/mesh-web/pages/guides/smart-contract.tsx +++ /dev/null @@ -1,580 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideNextjsPage: NextPage = () => { - const sidebarItems = [ - { label: 'System setup', to: 'systemsetup' }, - { label: 'Setup Next.js', to: 'setupnextjs' }, - { label: 'Setup Mesh', to: 'setupmesh' }, - { label: 'Add a wallet connection', to: 'addawalletconnection' }, - { label: 'Integrate your smart contract', to: 'integrateSC' }, - ]; - - return ( - <> - - -

    - Cardano introduced smart contract support in 2021, which allowed the - creation of a number of decentralised applications. However, the - knowledge required to develop such apps is still quite extensive and may - be frightening for new developers or companies looking to build on - Cardano. Mesh aims to solve this problem by doing most of the work, and - here we provide a comprehensive guide to ease new developers into - Cardano development. -

    -

    - Next.js and Mesh are JavaScript libraries, and we will assume that - you have some familiarity with HTML and JavaScript language, but you - should be able to follow along even if you are coming from a different - programming language. If you would like to learn more about JavaScript, we recommend - going through this{' '} - - JS tutorial - - , or the looking at the {' '} - - MDN JavaScript Reference - - . -

    -

    - To follow this guide you will also need a compiled Plutus smart - contract, specifically its "CBOR" representation. If you are not - familiar with this, check out{' '} - - Mesh.plutus - - , a repository written by the Mesh team which contains a selection of - simple pre-built smart contracts for various use cases. -

    - - -

    System setup

    - -

    1. Visual Studio Code

    -

    - Visual Studio Code is a code editor made by Microsoft. Download and - install{' '} - - Visual Studio Code - {' '} - for code editing. -

    - -

    2. Node.js

    -

    - Node.js is a cross-platform JavaScript runtime environment that runs - on the V8 engine and executes JavaScript code. Install the Long-Term - Support (LTS) version of{' '} - - Node.js - {' '} - (as of writing v18.12.1). -

    -

    3. Yarn

    -

    - To follow this guide you will to install Yarn. Do it with the following command: -

    - - -
    - - -

    Setup Next.js

    -

    1. Create project folder and open Visual Studio Code

    -

    - Create a new folder for your project, and give the folder a - meaningful name. Open the Visual Studio Code application and drag - your project folder into Visual Studio Code. -

    - -

    2. Create Next.js app

    -

    - From the options menu in on Visual Studio Code, open the{' '} - Terminal and execute this command to create a new - NextJs application: -

    - - -

    3. Start development server

    -

    - After the installation is complete, start the development server - with: -

    - -

    - Visit{' '} - - http://localhost:3000 - {' '} - to view your application. CTRL+C to stop the - application. -

    -
    - - -

    Setup Mesh

    -

    1. Install MeshJS package

    -

    Install the latest version of Mesh with npm:

    - - -

    - 2. Add webpack in next.config.js -

    -

    - Open next.config.js and append webpack{' '} - configurations. Your next.config.js should look like - this: -

    - -

    3. Congratulations

    -

    - You just saved yourself a few weeks of learning and several days trying to - get started. Your Next.js application is ready to accept wallet - connections, browse assets and make some transactions. -

    -
    - - -

    Add a wallet connection

    -

    1. Install @meshsdk/react package

    -

    Install the latest version of Mesh-react with npm:

    - -

    2. Setup MeshProvider

    -

    - Open pages/_app.tsx and replace it with the following - code: -

    - - - - ); -}; - -export default MyApp;`} - isJson={false} - /> -

    3. Add a connect button to your website

    -

    - Open pages/index.tsx and replace it with the following:{' '} -

    - { - const { wallet, connected, connecting } = useWallet(); - const [loading, setLoading] = useState(false); - - return ( -
    -

    Connect Wallet

    - -
    - ); -}; - -export default Home;`} - isJson={false} - /> -

    - Done! Now visit{' '} - - http://localhost:3000 - {' '} - to see your connect wallet button. -

    -
    - - -

    Integrate your smart contract

    -

    1. Add your Plutus compiled code to the project

    -

    - Here you will need the compiled version of your Plutus smart - contract. If you don't have one (or don't know what this is), check - out the available pre-built smart contracts provided by the Mesh - team{' '} - - here - - . In this guide we will use the{' '} - - Always True - {' '} - script, that, as its name suggests, always succeeds, although you can - follow this guide with any of the pre-built Mesh smart contracts. - Details for each contract are provided in their individual Github branch. -

    -

    - Create a new folder named config and in it create a new - file named contract.ts. Open it and insert the - following code: -

    - -

    - The code: field is where you put the compiled CBOR - code of your smart contract. If you are using a different smart - contract to follow this guide, please replace the CBOR showed here - with yours. Also, here our script is a V2 script, but feel free to - modify this according to your needs. -

    -

    - Note that here we use a Mesh resolver to get the address of the - script. The resolver resolvePlutusScriptAddress takes - two arguments: a PlutusScript and an integer representing the - Network Id. Here we use the mainnet network that has an Id of{' '} - 1, but feel free to change it according to your - needs (For Testnet, Preview or PreProd use 0). For more information see{' '} - Resolvers. -

    - -

    2. See your contract in action - Lock funds

    -

    - Now that we successfully imported our contract to the project, we - can start using it in our web application. -

    -

    - Open pages/index.tsx and add the following two imports - at the top of your file: -

    - -

    - Now we will use the Mesh transaction builder to build the locking - transaction. Depending on your contract you will probably need to - modify the value and datum fields, here we will be locking one{' '} - - Testtoken - {' '} - with a datum containing a simple integer. Indeed, because the Always - True contract does not depend on the datum value, we can put - whatever datum we want, and to make it simple we use an integer. -

    -

    - Add the following function to your pages/index.tsx{' '} - file, right before the return part. -

    - -

    - If you are wondering, we use policyId+hexTokenName to - create the unit field of the value. To get this unit - you can go to any Cardano explorer and search for your token, you'll - see its policy id as well as token name both in plain text and hex. - For example the{' '} - - Testtoken - {' '} - on mainnet has a policy id of{' '} - - 22f20d5382cec46166b566821f16f79cb03ee1520c71e5f83a4b3f20 - {' '} - and a hex token name of 54657374746f6b656e - which results in {' '} - - unit: - 22f20d5382cec46166b566821f16f79cb03ee1520c71e5f83a4b3f2054657374746f6b656e - -

    -

    - Now replace the return function with the following -

    - -

    Connect Wallet

    - - {connected && ( - <> -

    Lock funds in your contract

    - - - - - )} - -);`} - isJson={false} - /> -

    - Visit{' '} - - http://localhost:3000 - {' '} - to lock some funds. -

    - -

    - We've now successfully locked an NFT in our script with a datum of - value '42'. If you want to learn how to build more complex datum - structures, check out{' '} - APIs - Transaction{' '} - docs in theDesigning datum section. -

    - -

    3. See your contract in action - Unlock funds

    -

    - After successfully locking some funds, now it's time to unlock them. - Here, in addition to the datum, we will need to construct a - redeemer. In this example we will use a simple integer, but feel - free to modify it in accordance to what your contract requires. -

    -

    - First let's fetch data from the blockchain at the script address to - get the exact UTxO we are trying to spend. For this we will use - BlockfrostProvider, but you can use any provider that - Mesh supports, see{' '} - Providers. -

    -

    - Paste the following function right before yourreturn{' '} - section -

    - ', - ); - const utxos = await blockfrostProvider.fetchAddressUTxOs( - scriptAddress, - asset - ); - const dataHash = resolveDataHash(datum); - let utxo = utxos.find((utxo: any) => { - return utxo.output.dataHash == dataHash; - }); - return utxo; -};`} - isJson={false} - /> -

    - The function _getAssetUtxo scans UTxOs at the{' '} - scriptAddress and filters by datum hash to find the - exact UTxO we are trying to spend. We need this UTxO to build the - unlocking transaction. -

    -

    - Now we can build our unlocking transaction, paste the following - function right before your return section. Make sure to - construct the same datum you used when locking the funds. -

    - -

    - Let's take a look at what this function does. We first set our - constants addr, datumConstr, redeemer, as explained - previously in this guide we use the Always Succeed script - that contains no specific validating logic. Although it is called "always - succeeds", it is important to note that contracts on Cardano currently - always require a datum to be supplied that is the same as the one locked - at the script in the UTxO we are trying to spend. However, we can use - a random redeemer. Then we use the previously defined{' '} - _getAssetUtxo function to fetch the UTxO we are trying - to spend. The next step is to build the unlocking transaction in tx{' '} - where we pass all the necessary fields to unlock funds from the - script. -

    -

    - Finally, let's change the return function once more, changing it - so that it unlocks funds this time. Replace with the following code: -

    - -

    Connect Wallet

    - - {connected && ( - <> -

    Unlock your funds from your contract

    - - - - - )} - -);`} - isJson={false} - /> -

    - Visit{' '} - - http://localhost:3000 - {' '} - and unlock your funds. -

    - -

    4. Explore further

    -

    - Congratulations, you've succesfully integrated your smart contract - into a web application! -

    -

    - Now you may want to explore more complex datum/redeemer structures, - V2 features, Plutus minting and more. Mesh supports each of these - features and we are continuously working on adding more guides and - expanding the docs. If you have any issues please report them in our{' '} - Discord server or open - an issue on{' '} - Mesh's Github page.{' '} -

    -
    -
    - - ); -}; - -export default GuideNextjsPage; diff --git a/apps/mesh-web/pages/guides/standalone.tsx b/apps/mesh-web/pages/guides/standalone.tsx deleted file mode 100644 index 8245a8442..000000000 --- a/apps/mesh-web/pages/guides/standalone.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import type { NextPage } from 'next'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const GuideNextjsPage: NextPage = () => { - const sidebarItems = [ - { label: 'Setting up', to: 'settingup' }, - { label: 'Make a transaction', to: 'createtx' }, - ]; - - let codePackage = ``; - codePackage += `{\n`; - codePackage += ` "type": "module",\n`; - codePackage += ` "dependencies": {},\n`; - codePackage += ` "scripts": {\n`; - codePackage += ` "dev": "tsx index.ts"\n`; - codePackage += ` }\n`; - codePackage += `}\n`; - - let codeInstall = ``; - codeInstall += `npm install\n`; - codeInstall += `npm install tsx @meshsdk/core\n`; - - let codePackageUpdated = ``; - codePackageUpdated += `{\n`; - codePackageUpdated += ` "type": "module",\n`; - codePackageUpdated += ` "dependencies": {\n`; - codePackageUpdated += ` "@meshsdk/core": "^1.5.18",\n`; - codePackageUpdated += ` "tsx": "^4.9.4"\n`; - codePackageUpdated += ` },\n`; - codePackageUpdated += ` "scripts": {\n`; - codePackageUpdated += ` "dev": "tsx index.ts"\n`; - codePackageUpdated += ` }\n`; - codePackageUpdated += `}\n`; - - let codeTx = ``; - codeTx += `import { BlockfrostProvider, MeshWallet, Transaction } from "@meshsdk/core";\n`; - codeTx += `\n`; - codeTx += `// Set up the blockchain provider with your key\n`; - codeTx += `const blockchainProvider = new BlockfrostProvider("YOUR_KEY_HERE");\n`; - codeTx += `\n`; - codeTx += `// Initialize the wallet with a mnemonic key\n`; - codeTx += `const wallet = new MeshWallet({\n`; - codeTx += ` networkId: 0,\n`; - codeTx += ` fetcher: blockchainProvider,\n`; - codeTx += ` submitter: blockchainProvider,\n`; - codeTx += ` key: {\n`; - codeTx += ` type: "mnemonic",\n`; - codeTx += ` words: [\n`; - codeTx += ` "your", "mnemonic", "...", "here",\n`; - codeTx += ` ],\n`; - codeTx += ` },\n`; - codeTx += `});\n`; - codeTx += `\n`; - codeTx += `// Create and send a transaction\n`; - codeTx += `const tx = new Transaction({ initiator: wallet }).sendLovelace(\n`; - codeTx += ` "addr_test1qp2k7wnshzngpqw0xmy33hvexw4aeg60yr79x3yeeqt3s2uvldqg2n2p8y4kyjm8sqfyg0tpq9042atz0fr8c3grjmysdp6yv3",\n`; - codeTx += ` "1000000"\n`; - codeTx += `);\n`; - codeTx += `\n`; - codeTx += `const unsignedTx = await tx.build();\n`; - codeTx += `const signedTx = await wallet.signTx(unsignedTx);\n`; - codeTx += `const txHash = await wallet.submitTx(signedTx);\n`; - - return ( - <> - - -

    - If you're looking to run a javascript files to interact with the - blockchain, you can use the tsx package to run the files directly from - the command line. -

    -

    - This guide will walk you through setting up a simple project using - MeshSDK. By the end, you'll have a working environment that can create - a wallet, build and sign transactions, and submit them to the - blockchain. -

    -

    In this tutorial, we'll cover:

    -
      -
    • - Creating a package.json file to manage your project dependencies. -
    • -
    • Installing the necessary packages, including MeshSDK.
    • -
    • - Writing a TypeScript script to create a wallet and send a - transaction. -
    • -
    • Running your project to see the results.
    • -
    -

    Let's get started!

    - - -

    Setting up

    - -

    Create a package.json file

    -

    - First, create a new `package.json` file in the root of your project - with the following content: -

    - - - -

    Install the necessary packages

    - -

    - Open your terminal and run these commands to install the required - packages and MeshSDK: -

    - - -

    - Here's how your `package.json` file should look after installing the - packages: -

    - - - -
      -
    • - @meshsdk/core: Core functionality for network interactions, - wallets, and transactions. -
    • -
    • - tsx: Allows running TypeScript files directly from the command - line. -
    • -
    -
    - - -

    Make a simple transaction

    - -

    Create the index.ts file

    - -

    - Next, create a new `index.ts` file in the root of your project and - add the following code: -

    - - - -

    Explanation:

    -
      -
    • - Wallet Initialization: The code sets up a new wallet using - MeshWallet with a mnemonic key and a blockchain provider. -
    • -
    • - Transaction Creation: A new transaction is created to send 1 ADA - to a specific address. The transaction is built, signed, and - submitted to the blockchain. -
    • -
    • Output: The transaction hash is logged to the console.
    • -
    - -

    Run Your Application

    - -

    - In the code, you must replace `YOUR_KEY_HERE` with a valid - blockfrost key, and replace the mnemonic words with your own. You - can visit{' '} - - Blockfrost - {' '} - to get a free API key, and generate a new mnemonic key from the{' '} - - Mesh website - - . -

    - -

    Finally, start your application by running this command:

    - - -

    - If everything is set up correctly, you should see the transaction - hash logged to the console. Congratulations! You've successfully - created a wallet and sent a transaction using MeshSDK. -

    - -

    - You can find the complete code for this guide in the{' '} - - Mesh GitHub repo - - . -

    -
    -
    - - ); -}; - -export default GuideNextjsPage; diff --git a/apps/mesh-web/pages/index.tsx b/apps/mesh-web/pages/index.tsx deleted file mode 100644 index 7d1388c24..000000000 --- a/apps/mesh-web/pages/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextPage } from 'next'; -import Home from '../components/pages/home'; -import Metatags from '../components/site/metatags'; - -const HomePage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default HomePage; diff --git a/apps/mesh-web/pages/migration-manual-installation/index.tsx b/apps/mesh-web/pages/migration-manual-installation/index.tsx deleted file mode 100644 index 4970be754..000000000 --- a/apps/mesh-web/pages/migration-manual-installation/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import type { NextPage } from 'next'; -import CommonLayout from '../../components/common/layout'; -import InstallGatsby from '../../components/pages/migrateManualInstall/gatsby'; -import InstallNestjs from '../../components/pages/migrateManualInstall/nestjs'; -import InstallNextjs from '../../components/pages/migrateManualInstall/nextjs'; -import InstallWebpack from '../../components/pages/migrateManualInstall/webpack'; -import Metatags from '../../components/site/metatags'; -import InstallVueVite from '../../components/pages/migrateManualInstall/vue'; - -const MigrationManualPage: NextPage = () => { - const sidebarItems = [ - { label: 'Next.js', to: 'nextjs' }, - { label: 'NestJS', to: 'nestjs' }, - { label: 'Gatsby', to: 'gatsby' }, - { label: 'Vue / Vite', to: 'vuevite' }, - { label: 'Webpack', to: 'webpack' }, - ]; - - return ( - - - -
    -
    -

    - Install Mesh into your existing project -

    -

    - If you are looking to use Mesh into your existing project, you can - choose the stack and configure them. -

    -
    -
    - - - - - - -
    - ); -}; - -export default MigrationManualPage; diff --git a/apps/mesh-web/pages/providers/blockfrost.tsx b/apps/mesh-web/pages/providers/blockfrost.tsx deleted file mode 100644 index 0fe88b2eb..000000000 --- a/apps/mesh-web/pages/providers/blockfrost.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { useState, useEffect } from 'react'; -import CommonLayout from '../../components/common/layout'; -import Metatags from '../../components/site/metatags'; -import Codeblock from '../../components/ui/codeblock'; -import { - BadgeFetcher, - BadgeListener, - BadgeSubmitter, -} from '../../components/pages/providers/badges'; -import Fetcher from '../../components/pages/providers/fetcher'; -import { BlockfrostProvider } from '@meshsdk/core'; -import Submitter from '../../components/pages/providers/submitter'; -import ButtonGroup from '../../components/ui/buttongroup'; -import Listener from '../../components/pages/providers/listener'; - -export default function ProvidersBlockfrost() { - const sidebarItems = [ - { label: 'Fetch Account Info', to: 'fetchAccountInfo' }, - { label: 'Fetch Address Utxos', to: 'fetchAddressUtxos' }, - { label: 'Fetch Asset Addresses', to: 'fetchAssetAddresses' }, - { label: 'Fetch Asset Metadata', to: 'fetchAssetMetadata' }, - { label: 'Fetch Block Info', to: 'fetchBlockInfo' }, - { label: 'Fetch Collection Assets', to: 'fetchCollectionAssets' }, - { label: 'Fetch Handle Address', to: 'fetchHandleAddress' }, - { label: 'Fetch Protocol Parameters', to: 'fetchProtocolParameters' }, - { label: 'Fetch Transaction Info', to: 'fetchTxInfo' }, - { label: 'Submit Tx', to: 'submitTx' }, - { label: 'On Transaction Confirmed', to: 'onTxConfirmed' }, - ]; - const [network, setNetwork] = useState('preprod'); - - return ( - <> - - - -
    - - - ); -} - -function Hero({ network, setNetwork }) { - let code1 = `const blockfrostProvider = new BlockfrostProvider('');\n`; - let code2 = `const blockfrostProvider = new BlockfrostProvider('');\n`; - - return ( -
    -

    - Blockfrost - - - - - -

    -

    - Accessing and processing information stored on the blockchain -

    - -
    -
    -

    - - Blockfrost - {' '} - provides restful APIs which allows your app to access information - stored on the blockchain. Get started: -

    - -

    - If you are using a privately hosted Blockfrost instance, you can set - the URL in the parameter: -

    - -

    Choose network for this demo:

    - setNetwork('mainnet'), - }, - { - key: 'preprod', - label: 'Preprod', - onClick: () => setNetwork('preprod'), - }, - ]} - currentSelected={network} - /> -
    -
    -
    -
    - ); -} - -function Main({ network }) { - const [blockfrostProvider, setBlockfrostProvider] = - useState(null); - - useEffect(() => { - async function load() { - const _blockfrostProvider = new BlockfrostProvider( - network == 'mainnet' - ? process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_MAINNET! - : network == 'preprod' - ? process.env.NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD! - : '' - ); - setBlockfrostProvider(_blockfrostProvider); - } - load(); - }, [network]); - - return ( - <> - - - - - ); -} diff --git a/apps/mesh-web/pages/providers/index.tsx b/apps/mesh-web/pages/providers/index.tsx deleted file mode 100644 index 73ef776f2..000000000 --- a/apps/mesh-web/pages/providers/index.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const ProvidersPage: NextPage = () => { - const items = [ - { - title: 'Maestro', - link: '/providers/maestro', - thumbnail: '/providers/maestro.png', - }, - { - title: 'Koios', - link: '/providers/koios', - thumbnail: '/providers/koios.png', - }, - { - title: 'Blockfrost', - link: '/providers/blockfrost', - thumbnail: '/providers/blockfrost.png', - }, - { - title: 'Ogmios', - link: '/providers/ogmios', - thumbnail: '/providers/ogmios.png', - }, - ]; - - return ( - <> - -
    -
    -

    - Providers -

    -

    - Providers are services provided by the Cardano developer community, - to help you ship your apps faster. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default ProvidersPage; diff --git a/apps/mesh-web/pages/providers/koios.tsx b/apps/mesh-web/pages/providers/koios.tsx deleted file mode 100644 index d7c58784b..000000000 --- a/apps/mesh-web/pages/providers/koios.tsx +++ /dev/null @@ -1,154 +0,0 @@ -import { useState, useEffect } from 'react'; -import CommonLayout from '../../components/common/layout'; -import Metatags from '../../components/site/metatags'; -import Codeblock from '../../components/ui/codeblock'; -import { - BadgeFetcher, - BadgeSubmitter, - BadgeListener, -} from '../../components/pages/providers/badges'; -import Fetcher from '../../components/pages/providers/fetcher'; -import { KoiosProvider } from '@meshsdk/core'; -import Submitter from '../../components/pages/providers/submitter'; -import ButtonGroup from '../../components/ui/buttongroup'; -import Listener from '../../components/pages/providers/listener'; - -export default function ProvidersKoios() { - const sidebarItems = [ - { label: 'Fetch Account Info', to: 'fetchAccountInfo' }, - { label: 'Fetch Address Utxos', to: 'fetchAddressUtxos' }, - { label: 'Fetch Asset Addresses', to: 'fetchAssetAddresses' }, - { label: 'Fetch Asset Metadata', to: 'fetchAssetMetadata' }, - { label: 'Fetch Block Info', to: 'fetchBlockInfo' }, - { label: 'Fetch Collection Assets', to: 'fetchCollectionAssets' }, - { label: 'Fetch Handle Address', to: 'fetchHandleAddress' }, - { label: 'Fetch Protocol Parameters', to: 'fetchProtocolParameters' }, - { label: 'Fetch Transaction Info', to: 'fetchTxInfo' }, - { label: 'Submit Tx', to: 'submitTx' }, - { label: 'On Transaction Confirmed', to: 'onTxConfirmed' }, - ]; - - const [network, setNetwork] = useState('preprod'); - - return ( - <> - - - -
    - - - ); -} - -function Hero({ network, setNetwork }) { - let code1 = `const koiosProvider = new KoiosProvider('${network}', '');\n`; - let code2 = `const koiosProvider = new KoiosProvider('');\n`; - - return ( -
    -

    - Koios - - - - - -

    -

    - Accessing and processing information stored on the blockchain -

    - -
    -
    -

    - - Koios - {' '} - provides a query layer which allows your app to access information - stored on the blockchain. -

    - -

    Get started:

    - -

    There are 4 network that Koios provides:

    - - setNetwork('api'), - }, - { - key: 'preprod', - label: 'Preprod', - onClick: () => setNetwork('preprod'), - }, - { - key: 'preview', - label: 'Preview', - onClick: () => setNetwork('preview'), - }, - { - key: 'guild', - label: 'Guild', - onClick: () => setNetwork('guild'), - }, - ]} - currentSelected={network} - /> - - -

    - Get your token from{' '} - - Koios - - , by connecting your wallet and select a tier of your choice. -

    -

    - If you are using a privately hosted instance, you can set the URL in - the parameter: -

    - -
    -
    -
    -
    - ); -} - -function Main({ network }) { - const [koiosProvider, setKoiosProvider] = - useState(null); - - useEffect(() => { - async function load() { - const _koiosProvider = new KoiosProvider( - network, - process.env.NEXT_PUBLIC_KOIOS_TOKEN! - ); - setKoiosProvider(_koiosProvider); - } - load(); - }, [network]); - - return ( - <> - - - - - ); -} diff --git a/apps/mesh-web/pages/providers/maestro.tsx b/apps/mesh-web/pages/providers/maestro.tsx deleted file mode 100644 index 03828a0e4..000000000 --- a/apps/mesh-web/pages/providers/maestro.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import { useState, useEffect } from 'react'; -import CommonLayout from '../../components/common/layout'; -import Metatags from '../../components/site/metatags'; -import Codeblock from '../../components/ui/codeblock'; -import { - BadgeEvaluator, - BadgeFetcher, - BadgeSubmitter, - BadgeListener, -} from '../../components/pages/providers/badges'; -import Fetcher from '../../components/pages/providers/fetcher'; -import { MaestroSupportedNetworks, MaestroProvider } from '@meshsdk/core'; -import Submitter from '../../components/pages/providers/submitter'; -import Evaluator from '../../components/pages/providers/evaluator' -import ButtonGroup from '../../components/ui/buttongroup'; -import Listener from '../../components/pages/providers/listener'; - -export default function ProvidersMaestro() { - const sidebarItems = [ - { label: 'Fetch Account Info', to: 'fetchAccountInfo' }, - { label: 'Fetch Address Utxos', to: 'fetchAddressUtxos' }, - { label: 'Fetch Asset Addresses', to: 'fetchAssetAddresses' }, - { label: 'Fetch Asset Metadata', to: 'fetchAssetMetadata' }, - { label: 'Fetch Block Info', to: 'fetchBlockInfo' }, - { label: 'Fetch Collection Assets', to: 'fetchCollectionAssets' }, - { label: 'Fetch Handle Address', to: 'fetchHandleAddress' }, - { label: 'Fetch Protocol Parameters', to: 'fetchProtocolParameters' }, - { label: 'Fetch Transaction Info', to: 'fetchTxInfo' }, - { label: 'Evaluate Tx', to: 'evaluateTx' }, - { label: 'Submit Tx', to: 'submitTx' }, - { label: 'On Transaction Confirmed', to: 'onTxConfirmed' }, - ]; - - const [network, setNetwork] = useState('preprod'); - - return ( - <> - - - -
    - - - ); -} - -function Hero({ network, setNetwork }) { - let code1 = `const MaestroProvider = new MaestroProvider({ - network: '${network.charAt(0).toUpperCase() + network.slice(1)}', - apiKey: '', // Get yours by visiting https://docs.gomaestro.org/docs/Getting-started/Sign-up-login. - turboSubmit: false // Read about paid turbo transaction submission feature at https://docs.gomaestro.org/docs/Dapp%20Platform/Turbo%20Transaction. - });\n`; - - return ( -
    -

    - Maestro - - - - - - -

    -

    - Accessing and processing information stored on the blockchain -

    - -
    -
    -

    - - Maestro - {' '} - is the complete Web3 stack for Cardano which provides among others:- -

    -
      -
    • ⛓️ Enterprise-grade onchain data access.
    • -
    • - ⚡️ Transaction monitoring system with submission retires, - rollback notifications and accelerated tranaction finality. -
    • -
    • - 💰 High-fidelity smart contract data feeds from top Cardano DeFi - protocols. -
    • -
    • - 📝 Fully managed smart contract APIs and ready-to-go UI plugins. -
    • -
    -

    Get started:

    - -

    Choose network for this demo:

    - setNetwork('mainnet'), - }, - { - key: 'preprod', - label: 'Preprod', - onClick: () => setNetwork('preprod'), - }, - { - key: 'preview', - label: 'Preview', - onClick: () => setNetwork('preview'), - }, - ]} - currentSelected={network} - /> -
    -
    -
    -
    - ); -} - -function Main({ network }) { - const [provider, setProvider] = useState(null); - - useEffect(() => { - async function load() { - let key = ''; - let maestroNetwork: MaestroSupportedNetworks = 'Mainnet'; - switch (network) { - case 'mainnet': - key = process.env.NEXT_PUBLIC_MAESTRO_API_KEY_MAINNET!; - maestroNetwork = 'Mainnet'; - break; - case 'preprod': - key = process.env.NEXT_PUBLIC_MAESTRO_API_KEY_PREPROD!; - maestroNetwork = 'Preprod'; - break; - case 'preview': - key = process.env.NEXT_PUBLIC_MAESTRO_API_KEY_PREVIEW!; - maestroNetwork = 'Preview'; - break; - default: - break; - } - const _provider = new MaestroProvider({ - network: maestroNetwork, - apiKey: key, - }); - setProvider(_provider); - } - load(); - }, [network]); - const providerName = "maestroProvider" - return ( - <> - - - - - - ); -} diff --git a/apps/mesh-web/pages/providers/ogmios.tsx b/apps/mesh-web/pages/providers/ogmios.tsx deleted file mode 100644 index 26898ec01..000000000 --- a/apps/mesh-web/pages/providers/ogmios.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { useState, useEffect } from 'react'; -import CommonLayout from '../../components/common/layout'; -import Metatags from '../../components/site/metatags'; -import Codeblock from '../../components/ui/codeblock'; -import { - BadgeEvaluator, - BadgeSubmitter, -} from '../../components/pages/providers/badges'; -import { OgmiosProvider } from '@meshsdk/core'; -import Submitter from '../../components/pages/providers/submitter'; -import Evaluator from '../../components/pages/providers/evaluator'; -import ButtonGroup from '../../components/ui/buttongroup'; - -export default function ProvidersOgmios() { - const sidebarItems = [ - { label: 'Evaluate Tx', to: 'evaluateTx' }, - { label: 'Submit Tx', to: 'submitTx' }, - ]; - const [network, setNetwork] = useState('preprod'); - - return ( - <> - - - -
    - - - ); -} - -function Hero({ network, setNetwork }) { - let code1 = `const ogmiosProvider = new OgmiosProvider();\n`; - - return ( -
    -

    - Ogmios - - - - -

    -

    - Ogmios is a lightweight bridge interface for cardano-node. It offers a - WebSockets API that enables local clients to speak Ouroboros' - mini-protocols via JSON/RPC. -

    - -
    -
    -

    - Ogmios is a lightweight bridge interface for cardano-node. It offers - a WebSockets API that enables local clients to speak Ouroboros' - mini-protocols via JSON/RPC. Ogmios is a fast and lightweight - solution that can be deployed alongside relays to create entry - points on the Cardano network for various types of applications. - (reference:{' '} - - ogmios.dev - - ) -

    -

    Get started:

    - - -

    Choose network for this demo:

    - setNetwork('mainnet'), - }, - { - key: 'preprod', - label: 'Preprod', - onClick: () => setNetwork('preprod'), - }, - ]} - currentSelected={network} - /> -
    -
    -
    -
    - ); -} - -function Main({ network }) { - const [provider, setProvider] = useState(null); - - useEffect(() => { - async function load() { - const _provider = new OgmiosProvider('preprod'); - setProvider(_provider); - } - load(); - }, [network]); - - return ( - <> - - - - ); -} diff --git a/apps/mesh-web/pages/providers/tangocrypto.tsx b/apps/mesh-web/pages/providers/tangocrypto.tsx deleted file mode 100644 index a7c030474..000000000 --- a/apps/mesh-web/pages/providers/tangocrypto.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import { useState, useEffect } from 'react'; -import CommonLayout from '../../components/common/layout'; -import Metatags from '../../components/site/metatags'; -import Codeblock from '../../components/ui/codeblock'; -import { - BadgeFetcher, - BadgeSubmitter, - BadgeListener, - BadgeEvaluator, -} from '../../components/pages/providers/badges'; -// import Fetcher from '../../components/pages/providers/fetcher'; -// import { TangoProvider } from '@meshsdk/core'; -// import Submitter from '../../components/pages/providers/submitter'; -import ButtonGroup from '../../components/ui/buttongroup'; -// import Listener from '../../components/pages/providers/listener'; -// import Evaluator from '../../components/pages/providers/evaluator'; - -export default function ProvidersTangocrypto() { - const sidebarItems = [ - { label: 'Fetch Account Info', to: 'fetchAccountInfo' }, - { label: 'Fetch Address Utxos', to: 'fetchAddressUtxos' }, - { label: 'Fetch Asset Addresses', to: 'fetchAssetAddresses' }, - { label: 'Fetch Asset Metadata', to: 'fetchAssetMetadata' }, - { label: 'Fetch Block Info', to: 'fetchBlockInfo' }, - { label: 'Fetch Collection Assets', to: 'fetchCollectionAssets' }, - { label: 'Fetch Handle Address', to: 'fetchHandleAddress' }, - { label: 'Fetch Protocol Parameters', to: 'fetchProtocolParameters' }, - { label: 'Fetch Transaction Info', to: 'fetchTxInfo' }, - { label: 'Submit Tx', to: 'submitTx' }, - { label: 'On Transaction Confirmed', to: 'onTxConfirmed' }, - { label: 'Evaluate Tx', to: 'evaluateTx' }, - ]; - const [network, setNetwork] = useState('preprod'); - - return ( - <> - - - -
    - - - ); -} - -function Hero({ network, setNetwork }) { - let codeTango = `import { TangoProvider } from '@meshsdk/core';\n\n`; - codeTango += `const tangocryptoProvider = new TangoProvider(\n`; - codeTango += ` '',\n`; - codeTango += ` ''\n`; - codeTango += ` ''\n`; - codeTango += `);`; - - return ( -
    -

    - Tangocrypto - - - - - - -

    -

    - Accessing and processing information stored on the blockchain -

    - -
    -
    -

    - - Tangocrypto - {' '} - globally-distributed edge network offer realtime messaging - performance, scalability, and reliability; which allows your app to - access information stored on the blockchain. -

    -

    Get started:

    - -

    Choose network for this demo:

    - setNetwork('mainnet'), - }, - { - key: 'preprod', - label: 'Preprod', - onClick: () => setNetwork('preprod'), - }, - ]} - currentSelected={network} - /> -
    -
    -
    -
    - ); -} - -function Main({ network }) { - // const [tangocryptoProvider, setTangocryptoProvider] = - // useState(null); - - // useEffect(() => { - // async function load() { - // if (network === 'mainnet') { - // const _provider = new TangoProvider( - // 'mainnet', - // process.env.NEXT_PUBLIC_TANGOCRYPTO_API_ID_MAINNET!, - // process.env.NEXT_PUBLIC_TANGOCRYPTO_API_KEY_MAINNET! - // ); - // setTangocryptoProvider(_provider); - // } else if (network === 'preprod') { - // const _provider = new TangoProvider( - // 'testnet', - // process.env.NEXT_PUBLIC_TANGOCRYPTO_API_ID_TESTNET!, - // process.env.NEXT_PUBLIC_TANGOCRYPTO_API_KEY_TESTNET! - // ); - // setTangocryptoProvider(_provider); - // } - // } - // load(); - // }, [network]); - - return ( - <> - {/* - - - */} - - ); -} diff --git a/apps/mesh-web/pages/react/getting-started.tsx b/apps/mesh-web/pages/react/getting-started.tsx deleted file mode 100644 index 40579766a..000000000 --- a/apps/mesh-web/pages/react/getting-started.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import type { NextPage } from 'next'; -import Link from 'next/link'; -import GuidesLayout from '../../components/pages/guides/layout'; -import Codeblock from '../../components/ui/codeblock'; -import { Element } from 'react-scroll'; -import Metatags from '../../components/site/metatags'; - -const ReactGetStartedPage: NextPage = () => { - const sidebarItems = [ - { label: 'Installation', to: 'installation' }, - { label: 'Setup MeshProvider', to: 'meshProvider' }, - ]; - - let codeMeshProvider = ``; - codeMeshProvider += `import { MeshProvider } from "@meshsdk/react";\n`; - codeMeshProvider += `\n`; - codeMeshProvider += `function MyApp({ Component, pageProps }: AppProps) {\n`; - codeMeshProvider += ` return (\n`; - codeMeshProvider += ` \n`; - codeMeshProvider += ` \n`; - codeMeshProvider += ` \n`; - codeMeshProvider += ` );\n`; - codeMeshProvider += `};\n`; - - return ( - <> - - - {/* -

    Install with CLI

    -

    - The easiest way to get started building your own app is to use the - Mesh CLI to install one of our templates. -

    -

    - For instance, create a new starter project with Next.js & TypeScript - with: -

    - -

    - Visit Starter Templates{' '} - and kick start your project with one of our starters. -

    -
    */} - - -

    Install Mesh React

    -

    - Mesh provide a collection of useful UI components, so you can easily - include web3 functionality and convenient utilities for your - application. -

    -

    - To start, install mesh-react: -

    - -

    - Next, let's add MeshProvider to the root of the - application. -

    -
    - - -

    - Setup MeshProvider -

    -

    - - React Context - {' '} - allows apps to share data across the app, and{' '} - MeshProvider allows your app to subscribe to context - changes. If you use the CLI to initialize your project,{' '} - MeshProvider has been added in the root component. - Otherwise, you can wrap MeshProvider at the root of - your application, for example in Next.js: -

    - -

    - Now your application is ready, explore the available{' '} - UI components and{' '} - wallet hooks and start using - them in your application. -

    -
    -
    - - ); -}; - -export default ReactGetStartedPage; diff --git a/apps/mesh-web/pages/react/index.tsx b/apps/mesh-web/pages/react/index.tsx deleted file mode 100644 index 6e9ac28bc..000000000 --- a/apps/mesh-web/pages/react/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { - BoltIcon, - PaintBrushIcon, - RocketLaunchIcon, -} from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const ReactPage: NextPage = () => { - const items = [ - { - title: 'Getting Started', - desc: 'Start building web3 applications, interact with your contracts using your wallets.', - link: '/react/getting-started', - // thumbnail: '/react/rocket-gdc66999bf_640.png', - thumbnailHeroicon: , - }, - { - title: 'UI Components', - desc: 'UI components to speed up your app development.', - link: '/react/ui-components', - // thumbnail: '/react/ux-g389fb9d2b_1280.jpg', - thumbnailHeroicon: , - }, - { - title: 'Wallet Hooks', - desc: 'React hooks for interacting with connected wallets.', - link: '/react/wallet-hooks', - // thumbnail: '/react/pocket-g7546ee58e_1280.jpg', - thumbnailHeroicon: , - }, - ]; - - return ( - <> - -
    -
    -

    - React -

    -

    - Frontend components for wallet connections, and useful React - hooks to getting wallet states - Mesh provides everything you need - to bring your Web3 user interface to life. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default ReactPage; diff --git a/apps/mesh-web/pages/react/ui-components.tsx b/apps/mesh-web/pages/react/ui-components.tsx deleted file mode 100644 index d19d0e15c..000000000 --- a/apps/mesh-web/pages/react/ui-components.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ReactUiComponents from '../../components/pages/react/uiComponents'; - -const ReactUiComponentsPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default ReactUiComponentsPage; diff --git a/apps/mesh-web/pages/react/wallet-hooks.tsx b/apps/mesh-web/pages/react/wallet-hooks.tsx deleted file mode 100644 index 2b84a0dfc..000000000 --- a/apps/mesh-web/pages/react/wallet-hooks.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import ReactWalletHooks from '../../components/pages/react/walletHooks'; -import Metatags from '../../components/site/metatags'; - -const ReactWalletHooksPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default ReactWalletHooksPage; diff --git a/apps/mesh-web/pages/smart-contracts/coupon-bond-guaranteed.tsx b/apps/mesh-web/pages/smart-contracts/coupon-bond-guaranteed.tsx deleted file mode 100644 index 1cb23015a..000000000 --- a/apps/mesh-web/pages/smart-contracts/coupon-bond-guaranteed.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ContractsCouponBondGuaranteed from '../../components/pages/contracts/coupon-bond-guaranteed'; - -const SmartContractsCouponBondGuaranteed: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsCouponBondGuaranteed; diff --git a/apps/mesh-web/pages/smart-contracts/escrow.tsx b/apps/mesh-web/pages/smart-contracts/escrow.tsx deleted file mode 100644 index 15df60e72..000000000 --- a/apps/mesh-web/pages/smart-contracts/escrow.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import ContractsEscrow from '../../components/pages/contracts/escrow'; -import Metatags from '../../components/site/metatags'; - -const SmartContractsEscrow: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsEscrow; diff --git a/apps/mesh-web/pages/smart-contracts/giftcard.tsx b/apps/mesh-web/pages/smart-contracts/giftcard.tsx deleted file mode 100644 index 99b6c2643..000000000 --- a/apps/mesh-web/pages/smart-contracts/giftcard.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ContractsGiftcard from '../../components/pages/contracts/giftcard'; - -const SmartContractsGiftcard: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsGiftcard; diff --git a/apps/mesh-web/pages/smart-contracts/index.tsx b/apps/mesh-web/pages/smart-contracts/index.tsx deleted file mode 100644 index 83b075d76..000000000 --- a/apps/mesh-web/pages/smart-contracts/index.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { - ShoppingCartIcon, - LockClosedIcon, - DocumentTextIcon, - GiftIcon, - ArrowsRightLeftIcon, - ArrowsPointingOutIcon, -} from '@heroicons/react/24/solid'; -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import CardTitleDescImage from '../../components/ui/cardTitleDescImage'; - -const ReactPage: NextPage = () => { - const items = [ - { - title: 'Markplace', - desc: 'Build a NFT marketplace effortlessly', - link: '/smart-contracts/marketplace', - thumbnailHeroicon: , - }, - { - title: 'Vesting', - desc: 'Locks up funds for a period of time', - link: '/smart-contracts/vesting', - thumbnailHeroicon: , - }, - { - title: 'Escrow', - desc: 'Secure exchange of assets between two parties', - link: '/smart-contracts/escrow', - thumbnailHeroicon: , - }, - { - title: 'Giftcard', - desc: 'Create a giftcard with native tokens', - link: '/smart-contracts/giftcard', - thumbnailHeroicon: , - }, - { - title: 'Swap', - desc: 'Trade assets between two parties', - link: '/smart-contracts/swap', - thumbnailHeroicon: , - }, - { - title: 'Payment Splitter', - desc: 'Split contract payouts equally among all payees', - link: '/smart-contracts/payment-splitter', - thumbnailHeroicon: , - }, - ]; - - return ( - <> - -
    -
    -

    - Smart Contracts -

    -

    - Want to get started with smart contracts? Here are some contracts - for the most common use-cases. -

    -
    -
    - {items.map((item, i) => { - return ( - - ); - })} -
    -
    - - ); -}; - -export default ReactPage; diff --git a/apps/mesh-web/pages/smart-contracts/marketplace.tsx b/apps/mesh-web/pages/smart-contracts/marketplace.tsx deleted file mode 100644 index 2e717b4dc..000000000 --- a/apps/mesh-web/pages/smart-contracts/marketplace.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import ContractsMarketplace from '../../components/pages/contracts/marketplace'; -import Metatags from '../../components/site/metatags'; - -const SmartContractsMarketplace: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsMarketplace; diff --git a/apps/mesh-web/pages/smart-contracts/payment-splitter.tsx b/apps/mesh-web/pages/smart-contracts/payment-splitter.tsx deleted file mode 100644 index aaef0d807..000000000 --- a/apps/mesh-web/pages/smart-contracts/payment-splitter.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ContractsPaymentSplitter from '../../components/pages/contracts/payment-splitter'; - -const SmartContractsPaymentSplitter: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsPaymentSplitter; diff --git a/apps/mesh-web/pages/smart-contracts/swap.tsx b/apps/mesh-web/pages/smart-contracts/swap.tsx deleted file mode 100644 index 9aa816701..000000000 --- a/apps/mesh-web/pages/smart-contracts/swap.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ContractsSwap from '../../components/pages/contracts/swap'; - -const SmartSwap: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartSwap; diff --git a/apps/mesh-web/pages/smart-contracts/vesting.tsx b/apps/mesh-web/pages/smart-contracts/vesting.tsx deleted file mode 100644 index ddf05007a..000000000 --- a/apps/mesh-web/pages/smart-contracts/vesting.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import ContractsVesting from '../../components/pages/contracts/vesting'; -import Metatags from '../../components/site/metatags'; - -const SmartContractsVesting: NextPage = () => { - return ( - <> - - - - ); -}; - -export default SmartContractsVesting; diff --git a/apps/mesh-web/pages/starter-templates/index.tsx b/apps/mesh-web/pages/starter-templates/index.tsx deleted file mode 100644 index f078b1c0b..000000000 --- a/apps/mesh-web/pages/starter-templates/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextPage } from 'next'; -import Metatags from '../../components/site/metatags'; -import ReactStarterTemplates from '../../components/pages/starterTemplates'; - -const ReactStarterTemplatesPage: NextPage = () => { - return ( - <> - - - - ); -}; - -export default ReactStarterTemplatesPage; diff --git a/apps/mesh-web/postcss.config.js b/apps/mesh-web/postcss.config.js deleted file mode 100644 index 33ad091d2..000000000 --- a/apps/mesh-web/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/apps/mesh-web/public/.well-known/nostr.json b/apps/mesh-web/public/.well-known/nostr.json deleted file mode 100644 index 80330f6b4..000000000 --- a/apps/mesh-web/public/.well-known/nostr.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "names": { - "_": "de6177ee8f62e948c41d22fe76b62d0a6bf7aeb3d54653f9cb472bfbb4d08fe5", - "mesh": "de6177ee8f62e948c41d22fe76b62d0a6bf7aeb3d54653f9cb472bfbb4d08fe5" - }, - "relays": { - "de6177ee8f62e948c41d22fe76b62d0a6bf7aeb3d54653f9cb472bfbb4d08fe5": [ - "wss://relay.damus.io", - "wss://relay.nostr.band", - "wss://relay.snort.social" - ] - } -} \ No newline at end of file diff --git a/apps/mesh-web/public/about/road-g5604c4b4e_1280.jpg b/apps/mesh-web/public/about/road-g5604c4b4e_1280.jpg deleted file mode 100644 index 583fe3bf7..000000000 Binary files a/apps/mesh-web/public/about/road-g5604c4b4e_1280.jpg and /dev/null differ diff --git a/apps/mesh-web/public/courses/intro-to-web3/github.png b/apps/mesh-web/public/courses/intro-to-web3/github.png deleted file mode 100644 index e64ae2b4c..000000000 Binary files a/apps/mesh-web/public/courses/intro-to-web3/github.png and /dev/null differ diff --git a/apps/mesh-web/public/courses/intro-to-web3/mesh-starter-template.png b/apps/mesh-web/public/courses/intro-to-web3/mesh-starter-template.png deleted file mode 100644 index 98991a3b3..000000000 Binary files a/apps/mesh-web/public/courses/intro-to-web3/mesh-starter-template.png and /dev/null differ diff --git a/apps/mesh-web/public/courses/intro-to-web3/starter-template.png b/apps/mesh-web/public/courses/intro-to-web3/starter-template.png deleted file mode 100644 index 9ed6a0694..000000000 Binary files a/apps/mesh-web/public/courses/intro-to-web3/starter-template.png and /dev/null differ diff --git a/apps/mesh-web/public/css/template.css b/apps/mesh-web/public/css/template.css deleted file mode 100644 index 06aa80840..000000000 --- a/apps/mesh-web/public/css/template.css +++ /dev/null @@ -1,132 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -} - -.container { - background-color: rgb(17 24 39); - color: rgb(241 245 249); -} - -.main { - min-height: 100vh; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -.footer { - display: flex; - flex: 1; - padding: 2rem 0; - border-top: 1px solid #eaeaea; - justify-content: center; - align-items: center; -} - -.title a { - color: rgb(2 132 199); - text-decoration: none; -} - -.title { - margin: 0; - line-height: 1.15; - font-size: 4rem; - font-weight: 200; -} - -.demo { - margin: 4rem 0; - line-height: 1.5; - font-size: 1.5rem; - text-align: center; -} - -.grid { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - max-width: 1200px; -} - -.card { - margin: 1rem; - padding: 1.5rem; - text-align: left; - color: inherit; - text-decoration: none; - border: 1px solid #eaeaea; - border-radius: 10px; - transition: color 0.15s ease, border-color 0.15s ease; - max-width: 300px; - background-color: rgb(31 41 55); -} - -.card:hover, -.card:focus, -.card:active { - border-color: rgb(55 65 81); -} - -.card h2 { - margin: 0 0 1rem 0; - font-size: 1.5rem; -} - -.card p { - margin: 0; - font-weight: 400; - line-height: 1.5; - color: rgb(156 163 175); -} - -.title, -.description, -.card { - text-align: center; -} - -.demo code { - background: #111; - border-radius: 5px; - padding: 0.75rem; - font-size: 1.1rem; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; - display: block; - margin-top: 1rem; -} - -.demo button { - padding: 1rem; - border-radius: 0.375rem; - font-size: 24px; - cursor: pointer; -} - -.demo button:disabled { - border: 1px solid #999999; - background-color: #cccccc; -} - -@media (max-width: 600px) { - .grid { - width: 100%; - flex-direction: column; - } -} - -@media (prefers-color-scheme: dark) { - .card, - .footer { - border-color: #222; - } -} diff --git a/apps/mesh-web/public/favicon/site.webmanifest b/apps/mesh-web/public/favicon/site.webmanifest deleted file mode 100644 index 143228268..000000000 --- a/apps/mesh-web/public/favicon/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Mesh", - "short_name": "Mesh", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/apps/mesh-web/public/getting-started/color-samples-g2e3c7e40c_1280.jpg b/apps/mesh-web/public/getting-started/color-samples-g2e3c7e40c_1280.jpg deleted file mode 100644 index d5982b9d4..000000000 Binary files a/apps/mesh-web/public/getting-started/color-samples-g2e3c7e40c_1280.jpg and /dev/null differ diff --git a/apps/mesh-web/public/getting-started/office-g8b03895cc_640.jpg b/apps/mesh-web/public/getting-started/office-g8b03895cc_640.jpg deleted file mode 100644 index 944f84e1e..000000000 Binary files a/apps/mesh-web/public/getting-started/office-g8b03895cc_640.jpg and /dev/null differ diff --git a/apps/mesh-web/public/providers/ogmios.png b/apps/mesh-web/public/providers/ogmios.png deleted file mode 100644 index d1cac84c8..000000000 Binary files a/apps/mesh-web/public/providers/ogmios.png and /dev/null differ diff --git a/apps/mesh-web/public/providers/tangocrypto.png b/apps/mesh-web/public/providers/tangocrypto.png deleted file mode 100644 index 57b688666..000000000 Binary files a/apps/mesh-web/public/providers/tangocrypto.png and /dev/null differ diff --git a/apps/mesh-web/public/react/athlete-gca57603b5_1280.jpg b/apps/mesh-web/public/react/athlete-gca57603b5_1280.jpg deleted file mode 100644 index f8c05db1a..000000000 Binary files a/apps/mesh-web/public/react/athlete-gca57603b5_1280.jpg and /dev/null differ diff --git a/apps/mesh-web/public/react/interior-design-g3564a671e_640.jpg b/apps/mesh-web/public/react/interior-design-g3564a671e_640.jpg deleted file mode 100644 index 8e783745e..000000000 Binary files a/apps/mesh-web/public/react/interior-design-g3564a671e_640.jpg and /dev/null differ diff --git a/apps/mesh-web/public/react/pocket-g7546ee58e_1280.jpg b/apps/mesh-web/public/react/pocket-g7546ee58e_1280.jpg deleted file mode 100644 index c6b1ee0ba..000000000 Binary files a/apps/mesh-web/public/react/pocket-g7546ee58e_1280.jpg and /dev/null differ diff --git a/apps/mesh-web/public/react/rocket-gdc66999bf_640.png b/apps/mesh-web/public/react/rocket-gdc66999bf_640.png deleted file mode 100644 index bce09615f..000000000 Binary files a/apps/mesh-web/public/react/rocket-gdc66999bf_640.png and /dev/null differ diff --git a/apps/mesh-web/public/react/ux-g389fb9d2b_1280.jpg b/apps/mesh-web/public/react/ux-g389fb9d2b_1280.jpg deleted file mode 100644 index 12eec264c..000000000 Binary files a/apps/mesh-web/public/react/ux-g389fb9d2b_1280.jpg and /dev/null differ diff --git a/apps/mesh-web/public/sitemap.xml b/apps/mesh-web/public/sitemap.xml deleted file mode 100644 index c501a660d..000000000 --- a/apps/mesh-web/public/sitemap.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - https://meshjs.dev/ - - - https://meshjs.dev/starter-templates - - - https://meshjs.dev/guides - - - https://meshjs.dev/guides/nextjs - - - https://meshjs.dev/guides/minting-on-nodejs - - - https://meshjs.dev/guides/multisig-minting - - - https://meshjs.dev/guides/smart-contract - - - https://meshjs.dev/guides/prove-wallet-ownership - - - https://meshjs.dev/guides/custom-provider - - - https://meshjs.dev/migration-manual-installation - - - https://meshjs.dev/apis/appwallet - - - https://meshjs.dev/apis/browserwallet - - - https://meshjs.dev/apis/transaction - - - https://meshjs.dev/apis/transaction/smart-contract - - - https://meshjs.dev/apis/transaction/minting - - - https://meshjs.dev/apis/transaction/staking - - - https://meshjs.dev/react/getting-started - - - https://meshjs.dev/react/ui-components - - - https://meshjs.dev/react/wallet-hooks - - - https://meshjs.dev/smart-contracts/marketplace - - - https://meshjs.dev/providers - - - https://meshjs.dev/providers/blockfrost - - - https://meshjs.dev/providers/tangocrypto - - - https://meshjs.dev/providers/koios - - - https://meshjs.dev/providers/ogmios - - - https://meshjs.dev/apis/resolvers - - - https://meshjs.dev/about - - - https://meshjs.dev/about/cips - - - https://meshjs.dev/about/support-us - - - https://meshjs.dev/about/media-kit - - - https://meshjs.dev/about/references - - \ No newline at end of file diff --git a/apps/mesh-web/public/support/grasp-g76b6d77d5_640.jpg b/apps/mesh-web/public/support/grasp-g76b6d77d5_640.jpg deleted file mode 100644 index eeb9248c7..000000000 Binary files a/apps/mesh-web/public/support/grasp-g76b6d77d5_640.jpg and /dev/null differ diff --git a/apps/mesh-web/public/templates/aiken.png b/apps/mesh-web/public/templates/aiken.png deleted file mode 100644 index 020795c9a..000000000 Binary files a/apps/mesh-web/public/templates/aiken.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/ecommerce.png b/apps/mesh-web/public/templates/ecommerce.png deleted file mode 100644 index 81443a23e..000000000 Binary files a/apps/mesh-web/public/templates/ecommerce.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/gatsby.png b/apps/mesh-web/public/templates/gatsby.png deleted file mode 100644 index 4108fbdfe..000000000 Binary files a/apps/mesh-web/public/templates/gatsby.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/javascript.png b/apps/mesh-web/public/templates/javascript.png deleted file mode 100644 index 4c9c4ee9c..000000000 Binary files a/apps/mesh-web/public/templates/javascript.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/marketplace.png b/apps/mesh-web/public/templates/marketplace.png deleted file mode 100644 index 214d6e433..000000000 Binary files a/apps/mesh-web/public/templates/marketplace.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/minting.png b/apps/mesh-web/public/templates/minting.png deleted file mode 100644 index 0bb7461c5..000000000 Binary files a/apps/mesh-web/public/templates/minting.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/nextjs.png b/apps/mesh-web/public/templates/nextjs.png deleted file mode 100644 index 82bc94a59..000000000 Binary files a/apps/mesh-web/public/templates/nextjs.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/pluts.png b/apps/mesh-web/public/templates/pluts.png deleted file mode 100644 index 26068da33..000000000 Binary files a/apps/mesh-web/public/templates/pluts.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/remix.svg b/apps/mesh-web/public/templates/remix.svg deleted file mode 100644 index 185a4d43f..000000000 --- a/apps/mesh-web/public/templates/remix.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - Slice - - - - - \ No newline at end of file diff --git a/apps/mesh-web/public/templates/signin.png b/apps/mesh-web/public/templates/signin.png deleted file mode 100644 index b24b819a4..000000000 Binary files a/apps/mesh-web/public/templates/signin.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/stakepool.png b/apps/mesh-web/public/templates/stakepool.png deleted file mode 100644 index 4a05deeb3..000000000 Binary files a/apps/mesh-web/public/templates/stakepool.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/starter.png b/apps/mesh-web/public/templates/starter.png deleted file mode 100644 index 958f2341b..000000000 Binary files a/apps/mesh-web/public/templates/starter.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/svelte.png b/apps/mesh-web/public/templates/svelte.png deleted file mode 100644 index 42c700ccf..000000000 Binary files a/apps/mesh-web/public/templates/svelte.png and /dev/null differ diff --git a/apps/mesh-web/public/templates/typescript.svg b/apps/mesh-web/public/templates/typescript.svg deleted file mode 100644 index 19edd56e3..000000000 --- a/apps/mesh-web/public/templates/typescript.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/mesh-web/public/templates/vite.svg b/apps/mesh-web/public/templates/vite.svg deleted file mode 100644 index de4aeddc1..000000000 --- a/apps/mesh-web/public/templates/vite.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/apps/mesh-web/public/templates/vue.png b/apps/mesh-web/public/templates/vue.png deleted file mode 100644 index 60e17006a..000000000 Binary files a/apps/mesh-web/public/templates/vue.png and /dev/null differ diff --git a/apps/mesh-web/public/wallets/eternl.webp b/apps/mesh-web/public/wallets/eternl.webp deleted file mode 100644 index 87698696a..000000000 Binary files a/apps/mesh-web/public/wallets/eternl.webp and /dev/null differ diff --git a/apps/mesh-web/public/wallets/flint.svg b/apps/mesh-web/public/wallets/flint.svg deleted file mode 100644 index fddb53781..000000000 --- a/apps/mesh-web/public/wallets/flint.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/mesh-web/public/wallets/gerowallet.svg b/apps/mesh-web/public/wallets/gerowallet.svg deleted file mode 100644 index a66e6820e..000000000 --- a/apps/mesh-web/public/wallets/gerowallet.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/mesh-web/public/wallets/nami.svg b/apps/mesh-web/public/wallets/nami.svg deleted file mode 100644 index 154a32502..000000000 --- a/apps/mesh-web/public/wallets/nami.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/apps/mesh-web/public/wallets/typhon.svg b/apps/mesh-web/public/wallets/typhon.svg deleted file mode 100644 index 8afe52b0a..000000000 --- a/apps/mesh-web/public/wallets/typhon.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/mesh-web/styles/custom.css b/apps/mesh-web/styles/custom.css deleted file mode 100644 index 664a5cadf..000000000 --- a/apps/mesh-web/styles/custom.css +++ /dev/null @@ -1,19 +0,0 @@ -.grid2cols { - @apply grid gap-4 grid-cols-1 sm:grid-cols-2; -} - -.tableForInputs { - @apply border border-slate-300 w-full text-sm text-left text-gray-500 dark:text-gray-400; -} - -.tableForInputsThead { - @apply text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-700 dark:text-gray-400; -} - -.thead { - @apply text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-700 dark:text-gray-400; -} - -.link { - @apply inline-flex items-center text-sm font-medium text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 cursor-pointer; -} diff --git a/apps/mesh-web/styles/highlight/stackoverflow-dark.css b/apps/mesh-web/styles/highlight/stackoverflow-dark.css deleted file mode 100644 index 4e96bc029..000000000 --- a/apps/mesh-web/styles/highlight/stackoverflow-dark.css +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * StackOverflow.com dark style - * - * @stackoverflow/stacks v0.56.0 - * https://github.com/StackExchange/Stacks - */ - -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - color: #ffffff; - background: #1c1b1b; -} - -.hljs-comment { - color: #999999; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-meta-keyword, -.hljs-doctag, -.hljs-section, -.hljs-selector-class, -.hljs-meta, -.hljs-selector-pseudo, -.hljs-attr { - color: #88aece; -} - -.hljs-attribute { - color: v#c59bc1; -} - -.hljs-name, -.hljs-type, -.hljs-number, -.hljs-selector-id, -.hljs-quote, -.hljs-template-tag, -.hljs-built_in, -.hljs-title, -.hljs-literal { - color: #f08d49; -} - -.hljs-string, -.hljs-regexp, -.hljs-symbol, -.hljs-variable, -.hljs-template-variable, -.hljs-link, -.hljs-selector-attr, -.hljs-meta-string { - color: #b5bd68; -} - -.hljs-bullet, -.hljs-code { - color: #cccccc; -} - -.hljs-deletion { - color: #de7176; -} - -.hljs-addition { - color: #76c490; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} diff --git a/apps/mesh-web/styles/highlight/stackoverflow-light.css b/apps/mesh-web/styles/highlight/stackoverflow-light.css deleted file mode 100644 index de8dd156b..000000000 --- a/apps/mesh-web/styles/highlight/stackoverflow-light.css +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * StackOverflow.com light style - * - * @stackoverflow/stacks v0.56.0 - * https://github.com/StackExchange/Stacks - */ - -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - color: #2f3337; - background: #f6f6f6; -} - -.hljs-comment { - color: #656e77; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-meta-keyword, -.hljs-doctag, -.hljs-section, -.hljs-selector-class, -.hljs-meta, -.hljs-selector-pseudo, -.hljs-attr { - color: #015692; -} - -.hljs-attribute { - color: #803378; -} - -.hljs-name, -.hljs-type, -.hljs-number, -.hljs-selector-id, -.hljs-quote, -.hljs-template-tag, -.hljs-built_in, -.hljs-title, -.hljs-literal { - color: #b75501; -} - -.hljs-string, -.hljs-regexp, -.hljs-symbol, -.hljs-variable, -.hljs-template-variable, -.hljs-link, -.hljs-selector-attr, -.hljs-meta-string { - color: #54790d; -} - -.hljs-bullet, -.hljs-code { - color: #535a60; -} - -.hljs-deletion { - color: #c02d2e; -} - -.hljs-addition { - color: #2f6f44; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} diff --git a/apps/mesh-web/tailwind.config.js b/apps/mesh-web/tailwind.config.js deleted file mode 100644 index 2728c3c5c..000000000 --- a/apps/mesh-web/tailwind.config.js +++ /dev/null @@ -1,77 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - './node_modules/flowbite/**/*.js', - './node_modules/flowbite-react/**/*.js', - './pages/**/*.{ts,tsx}', - './components/**/*.{js,ts,jsx,tsx}', - ], - darkMode: 'class', - theme: { - extend: { - colors: { - primary: { - 50: '#eff6ff', - 100: '#dbeafe', - 200: '#bfdbfe', - 300: '#93c5fd', - 400: '#60a5fa', - 500: '#3b82f6', - 600: '#2563eb', - 700: '#1d4ed8', - 800: '#1e40af', - 900: '#1e3a8a', - }, - }, - typography: { - DEFAULT: { - css: { - pre: { - margin: '0px', - 'margin-bottom': '8px', - padding: '0px', - 'background-color': 'transparent', - }, - }, - }, - }, - }, - fontFamily: { - body: [ - 'Inter', - 'ui-sans-serif', - 'system-ui', - '-apple-system', - 'system-ui', - 'Segoe UI', - 'Roboto', - 'Helvetica Neue', - 'Arial', - 'Noto Sans', - 'sans-serif', - 'Apple Color Emoji', - 'Segoe UI Emoji', - 'Segoe UI Symbol', - 'Noto Color Emoji', - ], - sans: [ - 'Inter', - 'ui-sans-serif', - 'system-ui', - '-apple-system', - 'system-ui', - 'Segoe UI', - 'Roboto', - 'Helvetica Neue', - 'Arial', - 'Noto Sans', - 'sans-serif', - 'Apple Color Emoji', - 'Segoe UI Emoji', - 'Segoe UI Symbol', - 'Noto Color Emoji', - ], - }, - }, - plugins: [require('flowbite-typography'), require('flowbite/plugin')], -}; diff --git a/apps/mesh-web/tsconfig.json b/apps/mesh-web/tsconfig.json deleted file mode 100644 index 6db37c02f..000000000 --- a/apps/mesh-web/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve" - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/apps/playground/.env.example b/apps/playground/.env.example new file mode 100644 index 000000000..ef77c84df --- /dev/null +++ b/apps/playground/.env.example @@ -0,0 +1,9 @@ +BLOCKFROST_API_KEY_MAINNET= +BLOCKFROST_API_KEY_TESTNET= +BLOCKFROST_API_KEY_PREVIEW= +BLOCKFROST_API_KEY_PREPROD= + +DONATE_ADA_ADDRESS= +DONATE_MESHTOKEN_WALLET= + +NEXT_PUBLIC_GOOGLE_ANALYTICS= \ No newline at end of file diff --git a/apps/playground/.eslintrc.js b/apps/playground/.eslintrc.js new file mode 100644 index 000000000..3ce0ea923 --- /dev/null +++ b/apps/playground/.eslintrc.js @@ -0,0 +1,9 @@ +/** @type {import("eslint").Linter.Config} */ +module.exports = { + root: true, + extends: ["@meshsdk/eslint-config/next.js"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: true, + }, +}; diff --git a/apps/mesh-web/next-env.d.ts b/apps/playground/next-env.d.ts similarity index 100% rename from apps/mesh-web/next-env.d.ts rename to apps/playground/next-env.d.ts diff --git a/apps/playground/next.config.js b/apps/playground/next.config.js new file mode 100644 index 000000000..d4cde4ff5 --- /dev/null +++ b/apps/playground/next.config.js @@ -0,0 +1,15 @@ +const withMDX = require("@next/mdx")(); + +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + webpack: function (config, options) { + config.experiments = { + asyncWebAssembly: true, + layers: true, + }; + return config; + }, + pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"], +}; +module.exports = withMDX(nextConfig); diff --git a/apps/playground/package.json b/apps/playground/package.json new file mode 100644 index 000000000..6f162a730 --- /dev/null +++ b/apps/playground/package.json @@ -0,0 +1,56 @@ +{ + "name": "@meshsdk/playground", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build:apps": "next build", + "start": "next start", + "lint": "eslint", + "clean": "rm -rf .turbo && rm -rf dist && rm -rf node_modules", + "format": "prettier --check . --ignore-path ../../.gitignore" + }, + "dependencies": { + "@heroicons/react": "^2.1.3", + "@mdx-js/loader": "^3.0.1", + "@mdx-js/react": "^3.0.1", + "@meshsdk/contract": "*", + "@meshsdk/core": "*", + "@meshsdk/core-csl": "*", + "@meshsdk/react": "*", + "@next/mdx": "^14.2.3", + "@next/third-parties": "^14.2.5", + "copy-to-clipboard": "^3.3.3", + "flowbite": "^2.3.0", + "flowbite-react": "^0.9.0", + "flowbite-typography": "^1.0.3", + "next": "^14.1.1", + "persist-and-sync": "^1.2.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-highlight": "^0.15.0", + "react-scroll": "^1.9.0", + "zustand": "^4.5.4", + "json-bigint": "^1.0.0" + }, + "devDependencies": { + "@meshsdk/eslint-config": "*", + "@meshsdk/tailwind-config": "*", + "@meshsdk/typescript-config": "*", + "@next/eslint-plugin-next": "^14.1.1", + "@tailwindcss/typography": "^0.5.13", + "@types/eslint": "^8.56.5", + "@types/mdx": "^2.0.13", + "@types/node": "^20.11.24", + "@types/react": "^18.2.61", + "@types/react-dom": "^18.2.19", + "@types/react-highlight": "^0.12.8", + "@types/react-scroll": "^1.8.10", + "autoprefixer": "^10.4.19", + "eslint": "^8.57.0", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.3", + "typescript": "^5.3.3" + }, + "prettier": "@meshsdk/prettier-config" +} \ No newline at end of file diff --git a/apps/playground/postcss.config.js b/apps/playground/postcss.config.js new file mode 100644 index 000000000..12a703d90 --- /dev/null +++ b/apps/playground/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/apps/playground/public/favicon.ico b/apps/playground/public/favicon.ico new file mode 100644 index 000000000..4570eb8d9 Binary files /dev/null and b/apps/playground/public/favicon.ico differ diff --git a/apps/mesh-web/public/favicon/android-chrome-192x192.png b/apps/playground/public/favicon/android-chrome-192x192.png similarity index 100% rename from apps/mesh-web/public/favicon/android-chrome-192x192.png rename to apps/playground/public/favicon/android-chrome-192x192.png diff --git a/apps/mesh-web/public/favicon/android-chrome-512x512.png b/apps/playground/public/favicon/android-chrome-512x512.png similarity index 100% rename from apps/mesh-web/public/favicon/android-chrome-512x512.png rename to apps/playground/public/favicon/android-chrome-512x512.png diff --git a/apps/mesh-web/public/favicon/apple-touch-icon.png b/apps/playground/public/favicon/apple-touch-icon.png similarity index 100% rename from apps/mesh-web/public/favicon/apple-touch-icon.png rename to apps/playground/public/favicon/apple-touch-icon.png diff --git a/apps/mesh-web/public/favicon/browserconfig.xml b/apps/playground/public/favicon/browserconfig.xml similarity index 100% rename from apps/mesh-web/public/favicon/browserconfig.xml rename to apps/playground/public/favicon/browserconfig.xml diff --git a/apps/mesh-web/public/favicon/favicon-16x16.png b/apps/playground/public/favicon/favicon-16x16.png similarity index 100% rename from apps/mesh-web/public/favicon/favicon-16x16.png rename to apps/playground/public/favicon/favicon-16x16.png diff --git a/apps/mesh-web/public/favicon/favicon-32x32.png b/apps/playground/public/favicon/favicon-32x32.png similarity index 100% rename from apps/mesh-web/public/favicon/favicon-32x32.png rename to apps/playground/public/favicon/favicon-32x32.png diff --git a/apps/playground/public/favicon/favicon.ico b/apps/playground/public/favicon/favicon.ico new file mode 100644 index 000000000..a3cbedfa9 Binary files /dev/null and b/apps/playground/public/favicon/favicon.ico differ diff --git a/apps/mesh-web/public/favicon/mstile-150x150.png b/apps/playground/public/favicon/mstile-150x150.png similarity index 100% rename from apps/mesh-web/public/favicon/mstile-150x150.png rename to apps/playground/public/favicon/mstile-150x150.png diff --git a/apps/mesh-web/public/favicon/safari-pinned-tab.svg b/apps/playground/public/favicon/safari-pinned-tab.svg similarity index 100% rename from apps/mesh-web/public/favicon/safari-pinned-tab.svg rename to apps/playground/public/favicon/safari-pinned-tab.svg diff --git a/apps/playground/public/favicon/site.webmanifest b/apps/playground/public/favicon/site.webmanifest new file mode 100644 index 000000000..e2aaa06cc --- /dev/null +++ b/apps/playground/public/favicon/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "Mesh", + "short_name": "Mesh", + "icons": [ + { + "src": "/favicon/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/favicon/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/apps/mesh-web/public/guides/aiken.png b/apps/playground/public/guides/aiken.png similarity index 100% rename from apps/mesh-web/public/guides/aiken.png rename to apps/playground/public/guides/aiken.png diff --git a/apps/mesh-web/public/guides/arches-1866598_1280.jpg b/apps/playground/public/guides/arches-1866598_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/arches-1866598_1280.jpg rename to apps/playground/public/guides/arches-1866598_1280.jpg diff --git a/apps/mesh-web/public/guides/art-g68512aa8d_1280.jpg b/apps/playground/public/guides/art-g68512aa8d_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/art-g68512aa8d_1280.jpg rename to apps/playground/public/guides/art-g68512aa8d_1280.jpg diff --git a/apps/mesh-web/public/guides/blockchain.jpg b/apps/playground/public/guides/blockchain.jpg similarity index 100% rename from apps/mesh-web/public/guides/blockchain.jpg rename to apps/playground/public/guides/blockchain.jpg diff --git a/apps/mesh-web/public/guides/cryptographically-prove-wallet-ownership-process.png b/apps/playground/public/guides/cryptographically-prove-wallet-ownership-process.png similarity index 100% rename from apps/mesh-web/public/guides/cryptographically-prove-wallet-ownership-process.png rename to apps/playground/public/guides/cryptographically-prove-wallet-ownership-process.png diff --git a/apps/mesh-web/public/guides/cryptographically-prove-wallet-ownership.png b/apps/playground/public/guides/cryptographically-prove-wallet-ownership.png similarity index 100% rename from apps/mesh-web/public/guides/cryptographically-prove-wallet-ownership.png rename to apps/playground/public/guides/cryptographically-prove-wallet-ownership.png diff --git a/apps/mesh-web/public/guides/custom-marketplace-1.jpeg b/apps/playground/public/guides/custom-marketplace-1.jpeg similarity index 100% rename from apps/mesh-web/public/guides/custom-marketplace-1.jpeg rename to apps/playground/public/guides/custom-marketplace-1.jpeg diff --git a/apps/mesh-web/public/guides/custom-marketplace-2.png b/apps/playground/public/guides/custom-marketplace-2.png similarity index 100% rename from apps/mesh-web/public/guides/custom-marketplace-2.png rename to apps/playground/public/guides/custom-marketplace-2.png diff --git a/apps/mesh-web/public/guides/custom-marketplace.png b/apps/playground/public/guides/custom-marketplace.png similarity index 100% rename from apps/mesh-web/public/guides/custom-marketplace.png rename to apps/playground/public/guides/custom-marketplace.png diff --git a/apps/mesh-web/public/guides/develop-first-web-app.png b/apps/playground/public/guides/develop-first-web-app.png similarity index 100% rename from apps/mesh-web/public/guides/develop-first-web-app.png rename to apps/playground/public/guides/develop-first-web-app.png diff --git a/apps/mesh-web/public/guides/door-gf0710cc4d_640.jpg b/apps/playground/public/guides/door-gf0710cc4d_640.jpg similarity index 100% rename from apps/mesh-web/public/guides/door-gf0710cc4d_640.jpg rename to apps/playground/public/guides/door-gf0710cc4d_640.jpg diff --git a/apps/mesh-web/public/guides/implement-custom-provider.png b/apps/playground/public/guides/implement-custom-provider.png similarity index 100% rename from apps/mesh-web/public/guides/implement-custom-provider.png rename to apps/playground/public/guides/implement-custom-provider.png diff --git a/apps/mesh-web/public/guides/integrating-smart-contract.png b/apps/playground/public/guides/integrating-smart-contract.png similarity index 100% rename from apps/mesh-web/public/guides/integrating-smart-contract.png rename to apps/playground/public/guides/integrating-smart-contract.png diff --git a/apps/mesh-web/public/guides/key-gb17103099_640.jpg b/apps/playground/public/guides/key-gb17103099_640.jpg similarity index 100% rename from apps/mesh-web/public/guides/key-gb17103099_640.jpg rename to apps/playground/public/guides/key-gb17103099_640.jpg diff --git a/apps/mesh-web/public/guides/keys-g25a80b203_1280.jpg b/apps/playground/public/guides/keys-g25a80b203_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/keys-g25a80b203_1280.jpg rename to apps/playground/public/guides/keys-g25a80b203_1280.jpg diff --git a/apps/mesh-web/public/guides/laptop-g44c60b4ed_1280.jpg b/apps/playground/public/guides/laptop-g44c60b4ed_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/laptop-g44c60b4ed_1280.jpg rename to apps/playground/public/guides/laptop-g44c60b4ed_1280.jpg diff --git a/apps/mesh-web/public/guides/minting-application.png b/apps/playground/public/guides/minting-application.png similarity index 100% rename from apps/mesh-web/public/guides/minting-application.png rename to apps/playground/public/guides/minting-application.png diff --git a/apps/mesh-web/public/guides/multi-signatures-transaction.png b/apps/playground/public/guides/multi-signatures-transaction.png similarity index 100% rename from apps/mesh-web/public/guides/multi-signatures-transaction.png rename to apps/playground/public/guides/multi-signatures-transaction.png diff --git a/apps/mesh-web/public/guides/nextjs.png b/apps/playground/public/guides/nextjs.png similarity index 100% rename from apps/mesh-web/public/guides/nextjs.png rename to apps/playground/public/guides/nextjs.png diff --git a/apps/mesh-web/public/guides/nodejs.jpg b/apps/playground/public/guides/nodejs.jpg similarity index 100% rename from apps/mesh-web/public/guides/nodejs.jpg rename to apps/playground/public/guides/nodejs.jpg diff --git a/apps/mesh-web/public/guides/pluts.png b/apps/playground/public/guides/pluts.png similarity index 100% rename from apps/mesh-web/public/guides/pluts.png rename to apps/playground/public/guides/pluts.png diff --git a/apps/mesh-web/public/guides/salt-harvesting-3060093_1280.jpg b/apps/playground/public/guides/salt-harvesting-3060093_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/salt-harvesting-3060093_1280.jpg rename to apps/playground/public/guides/salt-harvesting-3060093_1280.jpg diff --git a/apps/mesh-web/public/guides/service-g2192fe835_640.jpg b/apps/playground/public/guides/service-g2192fe835_640.jpg similarity index 100% rename from apps/mesh-web/public/guides/service-g2192fe835_640.jpg rename to apps/playground/public/guides/service-g2192fe835_640.jpg diff --git a/apps/mesh-web/public/guides/smart-contract-transactions.png b/apps/playground/public/guides/smart-contract-transactions.png similarity index 100% rename from apps/mesh-web/public/guides/smart-contract-transactions.png rename to apps/playground/public/guides/smart-contract-transactions.png diff --git a/apps/mesh-web/public/guides/smart-contracts.jpg b/apps/playground/public/guides/smart-contracts.jpg similarity index 100% rename from apps/mesh-web/public/guides/smart-contracts.jpg rename to apps/playground/public/guides/smart-contracts.jpg diff --git a/apps/mesh-web/public/guides/standalone.png b/apps/playground/public/guides/standalone.png similarity index 100% rename from apps/mesh-web/public/guides/standalone.png rename to apps/playground/public/guides/standalone.png diff --git a/apps/mesh-web/public/guides/sunset-g52fe9bcd1_1280.jpg b/apps/playground/public/guides/sunset-g52fe9bcd1_1280.jpg similarity index 100% rename from apps/mesh-web/public/guides/sunset-g52fe9bcd1_1280.jpg rename to apps/playground/public/guides/sunset-g52fe9bcd1_1280.jpg diff --git a/apps/mesh-web/public/guides/supermarket-g42acef7c1_640.jpg b/apps/playground/public/guides/supermarket-g42acef7c1_640.jpg similarity index 100% rename from apps/mesh-web/public/guides/supermarket-g42acef7c1_640.jpg rename to apps/playground/public/guides/supermarket-g42acef7c1_640.jpg diff --git a/apps/mesh-web/public/home/starter-template-cli.mp4 b/apps/playground/public/home/starter-template-cli.mp4 similarity index 100% rename from apps/mesh-web/public/home/starter-template-cli.mp4 rename to apps/playground/public/home/starter-template-cli.mp4 diff --git a/apps/playground/public/images/aiken/aiken-card.png b/apps/playground/public/images/aiken/aiken-card.png new file mode 100644 index 000000000..d432da4b9 Binary files /dev/null and b/apps/playground/public/images/aiken/aiken-card.png differ diff --git a/apps/playground/public/images/aiken/aiken-icon.png b/apps/playground/public/images/aiken/aiken-icon.png new file mode 100644 index 000000000..45a8ab90d Binary files /dev/null and b/apps/playground/public/images/aiken/aiken-icon.png differ diff --git a/apps/playground/public/images/aiken/logo-dark.png b/apps/playground/public/images/aiken/logo-dark.png new file mode 100644 index 000000000..ee588e12d Binary files /dev/null and b/apps/playground/public/images/aiken/logo-dark.png differ diff --git a/apps/playground/public/images/aiken/logo-light.png b/apps/playground/public/images/aiken/logo-light.png new file mode 100644 index 000000000..adb30b2d9 Binary files /dev/null and b/apps/playground/public/images/aiken/logo-light.png differ diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-128x128.png b/apps/playground/public/logos/black/logo-mesh-black-128x128.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-128x128.png rename to apps/playground/public/logos/black/logo-mesh-black-128x128.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-16x16.png b/apps/playground/public/logos/black/logo-mesh-black-16x16.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-16x16.png rename to apps/playground/public/logos/black/logo-mesh-black-16x16.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-256x256.png b/apps/playground/public/logos/black/logo-mesh-black-256x256.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-256x256.png rename to apps/playground/public/logos/black/logo-mesh-black-256x256.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-300x300.png b/apps/playground/public/logos/black/logo-mesh-black-300x300.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-300x300.png rename to apps/playground/public/logos/black/logo-mesh-black-300x300.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-32x32.png b/apps/playground/public/logos/black/logo-mesh-black-32x32.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-32x32.png rename to apps/playground/public/logos/black/logo-mesh-black-32x32.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-512x512.png b/apps/playground/public/logos/black/logo-mesh-black-512x512.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-512x512.png rename to apps/playground/public/logos/black/logo-mesh-black-512x512.png diff --git a/apps/mesh-web/public/logo-mesh/black/logo-mesh-black-64x64.png b/apps/playground/public/logos/black/logo-mesh-black-64x64.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/black/logo-mesh-black-64x64.png rename to apps/playground/public/logos/black/logo-mesh-black-64x64.png diff --git a/apps/mesh-web/public/logo-mesh/logo-mesh-vector.svg b/apps/playground/public/logos/logo-mesh-vector.svg similarity index 100% rename from apps/mesh-web/public/logo-mesh/logo-mesh-vector.svg rename to apps/playground/public/logos/logo-mesh-vector.svg diff --git a/apps/mesh-web/public/logo-mesh/mesh.png b/apps/playground/public/logos/mesh.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/mesh.png rename to apps/playground/public/logos/mesh.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-128x128.png b/apps/playground/public/logos/white/logo-mesh-white-128x128.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-128x128.png rename to apps/playground/public/logos/white/logo-mesh-white-128x128.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-16x16.png b/apps/playground/public/logos/white/logo-mesh-white-16x16.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-16x16.png rename to apps/playground/public/logos/white/logo-mesh-white-16x16.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-256x256.png b/apps/playground/public/logos/white/logo-mesh-white-256x256.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-256x256.png rename to apps/playground/public/logos/white/logo-mesh-white-256x256.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-300x300.png b/apps/playground/public/logos/white/logo-mesh-white-300x300.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-300x300.png rename to apps/playground/public/logos/white/logo-mesh-white-300x300.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-32x32.png b/apps/playground/public/logos/white/logo-mesh-white-32x32.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-32x32.png rename to apps/playground/public/logos/white/logo-mesh-white-32x32.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-512x512.png b/apps/playground/public/logos/white/logo-mesh-white-512x512.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-512x512.png rename to apps/playground/public/logos/white/logo-mesh-white-512x512.png diff --git a/apps/mesh-web/public/logo-mesh/white/logo-mesh-white-64x64.png b/apps/playground/public/logos/white/logo-mesh-white-64x64.png similarity index 100% rename from apps/mesh-web/public/logo-mesh/white/logo-mesh-white-64x64.png rename to apps/playground/public/logos/white/logo-mesh-white-64x64.png diff --git a/apps/mesh-web/public/providers/blockfrost.png b/apps/playground/public/providers/blockfrost.png similarity index 100% rename from apps/mesh-web/public/providers/blockfrost.png rename to apps/playground/public/providers/blockfrost.png diff --git a/apps/mesh-web/public/providers/koios.png b/apps/playground/public/providers/koios.png similarity index 100% rename from apps/mesh-web/public/providers/koios.png rename to apps/playground/public/providers/koios.png diff --git a/apps/mesh-web/public/providers/maestro.png b/apps/playground/public/providers/maestro.png similarity index 100% rename from apps/mesh-web/public/providers/maestro.png rename to apps/playground/public/providers/maestro.png diff --git a/apps/playground/public/providers/ogmios.png b/apps/playground/public/providers/ogmios.png new file mode 100644 index 000000000..9a43b69fe Binary files /dev/null and b/apps/playground/public/providers/ogmios.png differ diff --git a/apps/playground/public/providers/yaci.png b/apps/playground/public/providers/yaci.png new file mode 100644 index 000000000..69bd3e4f6 Binary files /dev/null and b/apps/playground/public/providers/yaci.png differ diff --git a/apps/mesh-web/public/support/logo-g8677b0968_640.png b/apps/playground/public/support/discord.png similarity index 100% rename from apps/mesh-web/public/support/logo-g8677b0968_640.png rename to apps/playground/public/support/discord.png diff --git a/apps/mesh-web/public/support/github-dark.png b/apps/playground/public/support/github-dark.png similarity index 100% rename from apps/mesh-web/public/support/github-dark.png rename to apps/playground/public/support/github-dark.png diff --git a/apps/mesh-web/public/support/github-light.png b/apps/playground/public/support/github-light.png similarity index 100% rename from apps/mesh-web/public/support/github-light.png rename to apps/playground/public/support/github-light.png diff --git a/apps/mesh-web/public/support/meshbadge.png b/apps/playground/public/support/meshbadge.png similarity index 100% rename from apps/mesh-web/public/support/meshbadge.png rename to apps/playground/public/support/meshbadge.png diff --git a/apps/mesh-web/public/support/thank-g28bb2235f_640.png b/apps/playground/public/support/thank-you.png similarity index 100% rename from apps/mesh-web/public/support/thank-g28bb2235f_640.png rename to apps/playground/public/support/thank-you.png diff --git a/apps/mesh-web/public/support/social-g6f05844cb_640.png b/apps/playground/public/support/twitter.png similarity index 100% rename from apps/mesh-web/public/support/social-g6f05844cb_640.png rename to apps/playground/public/support/twitter.png diff --git a/apps/mesh-web/backend/index.ts b/apps/playground/src/backend/index.ts similarity index 100% rename from apps/mesh-web/backend/index.ts rename to apps/playground/src/backend/index.ts diff --git a/apps/mesh-web/backend/support.ts b/apps/playground/src/backend/support.ts similarity index 100% rename from apps/mesh-web/backend/support.ts rename to apps/playground/src/backend/support.ts diff --git a/apps/playground/src/components/button/button-group.tsx b/apps/playground/src/components/button/button-group.tsx new file mode 100644 index 000000000..2ec270c43 --- /dev/null +++ b/apps/playground/src/components/button/button-group.tsx @@ -0,0 +1,27 @@ +export default function ButtonGroup({ + items, + currentSelected, +}: { + items: { key: string | number; label: string; onClick: () => void }[]; + currentSelected: string | number; +}) { + return ( +
    + {items.map((item, i) => { + return ( + + ); + })} +
    + ); +} diff --git a/apps/playground/src/components/button/button.tsx b/apps/playground/src/components/button/button.tsx new file mode 100644 index 000000000..f73c0c501 --- /dev/null +++ b/apps/playground/src/components/button/button.tsx @@ -0,0 +1,58 @@ +export default function Button({ + children, + className, + style, + onClick, + disabled, +}: { + children: React.ReactNode; + className?: string; + style?: + | "primary" + | "success" + | "error" + | "warning" + | "info" + | "light" + | "dark"; + onClick: () => void; + disabled?: boolean; +}) { + const styles = { + primary: + "inline-flex items-center border border-indigo-500 bg-indigo-500 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-indigo-600 focus:outline-none focus:shadow-outline", + success: + "inline-flex items-center border border-green-500 bg-green-500 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-green-600 focus:outline-none focus:shadow-outline", + error: + "inline-flex items-center border border-red-500 bg-red-500 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-red-600 focus:outline-none focus:shadow-outline", + warning: + "inline-flex items-center border border-yellow-500 bg-yellow-500 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-yellow-600 focus:outline-none focus:shadow-outline", + info: "inline-flex items-center border border-teal-500 bg-teal-500 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-teal-600 focus:outline-none focus:shadow-outline", + light: + "inline-flex items-center border border-gray-200 bg-gray-200 text-gray-700 rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-gray-300 focus:outline-none focus:shadow-outline", + dark: "inline-flex items-center border border-gray-700 bg-gray-700 text-white rounded-md px-4 py-2 mr-2 mt-2 mb-2 transition duration-500 ease select-none hover:bg-gray-800 focus:outline-none focus:shadow-outline", + }; + + let _style = style && styles[style] ? styles[style] : styles.primary; + + if (className) { + style += ` ${className}`; + } + + if (disabled) { + _style += ` cursor-not-allowed`; + } + + style += ` not-format`; + + return ( + + ); +} diff --git a/apps/playground/src/components/button/run-demo-button.tsx b/apps/playground/src/components/button/run-demo-button.tsx new file mode 100644 index 000000000..a8587cd73 --- /dev/null +++ b/apps/playground/src/components/button/run-demo-button.tsx @@ -0,0 +1,27 @@ +import { PlayIcon } from "@heroicons/react/24/solid"; + +import Button from "./button"; + +export default function RunDemoButton({ + runFunction, + loading, + response, + label = "Run code snippet", + disabled = false, +}: { + runFunction: () => void; + loading: boolean; + response: any; + label?: string; + disabled?: boolean; +}) { + return ( + + ); +} diff --git a/apps/playground/src/components/card/card-title-desc-image.tsx b/apps/playground/src/components/card/card-title-desc-image.tsx new file mode 100644 index 000000000..1e739a102 --- /dev/null +++ b/apps/playground/src/components/card/card-title-desc-image.tsx @@ -0,0 +1,69 @@ +import React from "react"; +import Image from "next/image"; +import Link from "next/link"; + +import Card from "./card"; + +export default function CardTitleDescImage({ + title, + desc, + link, + thumbnailHeroicon, + thumbnailImage, + thumbnailNotioly, +}: { + title: string; + desc?: string; + link: string; + thumbnailHeroicon?: any; + thumbnailImage?: string; + thumbnailNotioly?: string; +}) { + return ( + + + {thumbnailHeroicon ? ( +
    + {React.createElement(thumbnailHeroicon)} +
    + ) : thumbnailNotioly ? ( +
    + +
    {title}
    +
    + {title} + {title} +
    + ) : ( + thumbnailImage && ( + {title} + ) + )} +

    + {title} +

    + {desc && ( +

    {desc}

    + )} +
    + + ); +} diff --git a/apps/playground/src/components/card/card.tsx b/apps/playground/src/components/card/card.tsx new file mode 100644 index 000000000..6bc9d9d28 --- /dev/null +++ b/apps/playground/src/components/card/card.tsx @@ -0,0 +1,31 @@ +export default function Card({ + children, + className, + title, + subtitle, +}: { + children: React.ReactNode; + className?: string; + title?: string; + subtitle?: string; +}) { + return ( +
    + {title && ( +
    + {title} + {subtitle && ( +

    + {subtitle} +

    + )} +
    + )} + {children} +
    + ); +} diff --git a/apps/playground/src/components/cardano/blockchain-providers-code-snippet.tsx b/apps/playground/src/components/cardano/blockchain-providers-code-snippet.tsx new file mode 100644 index 000000000..339dda7c7 --- /dev/null +++ b/apps/playground/src/components/cardano/blockchain-providers-code-snippet.tsx @@ -0,0 +1,65 @@ +import { useState } from "react"; + +import ButtonGroup from "../button/button-group"; +import Codeblock from "../text/codeblock"; + +export default function BlockchainProviderCodeSnippet() { + const [blockchainProvider, setBlockchainProvider] = useState("blockfrost"); + + let codeBF = `import { BlockfrostProvider } from '@meshsdk/core';\n\n`; + codeBF += `const blockchainProvider = new BlockfrostProvider('');`; + + let codeKoios = `import { KoiosProvider } from '@meshsdk/core';\n\n`; + codeKoios += `const blockchainProvider = new KoiosProvider('', '');`; + + let codeTango = `import { TangoProvider } from '@meshsdk/core';\n\n`; + codeTango += `const blockchainProvider = new TangoProvider(\n`; + codeTango += ` '',\n`; + codeTango += ` ''\n`; + codeTango += ` ''\n`; + codeTango += `);`; + + let codeMaestro = `import { MaestroProvider } from '@meshsdk/core';\n\n`; + codeMaestro += `const blockchainProvider = new MaestroProvider({\n`; + codeMaestro += ` network: 'Preprod',\n`; + codeMaestro += ` apiKey: '', // Get yours by visiting https://docs.gomaestro.org/docs/Getting-started/Sign-up-login.\n`; + codeMaestro += ` turboSubmit: false // Read about paid turbo transaction submission feature at https://docs.gomaestro.org/docs/Dapp%20Platform/Turbo%20Transaction.\n`; + codeMaestro += `});\n`; + + let code = codeBF; + if (blockchainProvider == "koios") { + code = codeKoios; + } + if (blockchainProvider == "tango") { + code = codeTango; + } + if (blockchainProvider == "maestro") { + code = codeMaestro; + } + + return ( + <> + setBlockchainProvider("maestro"), + }, + { + key: "blockfrost", + label: "Blockfrost", + onClick: () => setBlockchainProvider("blockfrost"), + }, + { + key: "koios", + label: "Koios", + onClick: () => setBlockchainProvider("koios"), + }, + ]} + currentSelected={blockchainProvider} + /> + + + ); +} diff --git a/apps/playground/src/components/cardano/blockchain-providers-key.tsx b/apps/playground/src/components/cardano/blockchain-providers-key.tsx new file mode 100644 index 000000000..86ce23016 --- /dev/null +++ b/apps/playground/src/components/cardano/blockchain-providers-key.tsx @@ -0,0 +1,150 @@ +import { + KoiosSupportedNetworks, + MaestroSupportedNetworks, +} from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import { useProviders } from "~/hooks/useProviders"; +import Select from "../form/select"; + +export default function BlockchainProviderKey({ + provider, +}: { + provider: string; +}) { + const blockfrostKey = useProviders((state) => state.blockfrostKey); + const setBlockfrostKey = useProviders((state) => state.setBlockfrostKey); + const koiosKey = useProviders((state) => state.koiosKey); + const setKoiosKey = useProviders((state) => state.setKoiosKey); + const maestroKey = useProviders((state) => state.maestroKey); + const setMaestroKey = useProviders((state) => state.setMaestroKey); + const yaciUrl = useProviders((state) => state.yaciUrl); + const setYaciUrl = useProviders((state) => state.setYaciUrl); + const ogmiosUrl = useProviders((state) => state.ogmiosUrl); + const setOgmiosUrl = useProviders((state) => state.setOgmiosUrl); + + if (provider == "maestro") { + return ( + + setMaestroKey(maestroKey?.network || "Preprod", e.target.value) + } + placeholder="API Key" + label="API Key" + type="password" + key={0} + />, + + setKoiosKey( + e.target.value as KoiosSupportedNetworks, + koiosKey?.apiKey || "", + ) + } + label="Select network" + key={1} + />, + ]} + /> + ); + } + + if (provider == "yaci") { + return ( + setYaciUrl(e.target.value)} + placeholder="Instance URL" + label="Instance URL" + key={0} + />, + ]} + /> + ); + } + + if (provider == "ogmios") { + return ( + setOgmiosUrl(e.target.value)} + placeholder="Instance URL" + label="Instance URL" + key={0} + />, + ]} + /> + ); + } + + return <>; +} diff --git a/apps/playground/src/components/cardano/connect-browser-wallet.tsx b/apps/playground/src/components/cardano/connect-browser-wallet.tsx new file mode 100644 index 000000000..85f43f53c --- /dev/null +++ b/apps/playground/src/components/cardano/connect-browser-wallet.tsx @@ -0,0 +1,9 @@ +import { CardanoWallet, useWalletList } from "@meshsdk/react"; + +export default function ConnectBrowserWallet() { + const wallets = useWalletList(); + const hasAvailableWallets = wallets.length > 0; + return ( + <>{hasAvailableWallets ? : <>No wallets installed} + ); +} diff --git a/apps/playground/src/components/cardano/fetch-utxo-by-datum.ts b/apps/playground/src/components/cardano/fetch-utxo-by-datum.ts new file mode 100644 index 000000000..c66a42f45 --- /dev/null +++ b/apps/playground/src/components/cardano/fetch-utxo-by-datum.ts @@ -0,0 +1,22 @@ +import { resolveDataHash } from "@meshsdk/core"; + +import { getProvider } from "./mesh-wallet"; + +export async function fetchAssetUtxo({ + address, + asset, + datum, +}: { + address: string; + asset: string; + datum: string; +}) { + const blockchainProvider = getProvider(); + const utxos = await blockchainProvider.fetchAddressUTxOs(address, asset); + const dataHash = resolveDataHash(datum); + + let utxo = utxos.find((utxo: any) => { + return utxo.output.dataHash == dataHash; + }); + return utxo; +} diff --git a/apps/playground/src/components/cardano/mesh-wallet.ts b/apps/playground/src/components/cardano/mesh-wallet.ts new file mode 100644 index 000000000..15c62efba --- /dev/null +++ b/apps/playground/src/components/cardano/mesh-wallet.ts @@ -0,0 +1,20 @@ +import { BlockfrostProvider, MeshWallet } from "@meshsdk/core"; + +export function getProvider(network = "preprod") { + return new BlockfrostProvider(`/api/blockfrost/${network}/`); +} + +export function getMeshWallet() { + const blockchainProvider = getProvider(); + + const wallet = new MeshWallet({ + networkId: 0, + fetcher: blockchainProvider, + submitter: blockchainProvider, + key: { + type: "mnemonic", + words: "solution,".repeat(24).split(",").slice(0, 24), + }, + }); + return wallet; +} diff --git a/apps/playground/src/components/form/input.tsx b/apps/playground/src/components/form/input.tsx new file mode 100644 index 000000000..9daa255d2 --- /dev/null +++ b/apps/playground/src/components/form/input.tsx @@ -0,0 +1,42 @@ +export default function Input({ + value, + onChange, + placeholder = "", + type = "text", + className = "", + disabled = false, + label = undefined, +}: { + value: string | number; + onChange: (e: React.ChangeEvent) => void; + placeholder?: string; + type?: string; + className?: string; + disabled?: boolean; + label?: undefined | string; +}) { + let _classname = + "shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 mb-4"; + + if (className.length > 0) { + _classname += ` ${className}`; + } + + return ( + <> + {label && ( + + )} + + + ); +} diff --git a/apps/playground/src/components/form/select.tsx b/apps/playground/src/components/form/select.tsx new file mode 100644 index 000000000..3e1513d46 --- /dev/null +++ b/apps/playground/src/components/form/select.tsx @@ -0,0 +1,43 @@ +export default function Select({ + id = "select", + options, + value, + onChange, + label = "Select an option", + hasDefaultOption = false, +}: { + id?: string; + options: {}; + value: string | number; + onChange: (e: React.ChangeEvent) => void; + disabled?: boolean; + label?: undefined | string; + hasDefaultOption?: boolean; +}) { + return ( + <> + + + + ); +} diff --git a/apps/playground/src/components/form/textarea.tsx b/apps/playground/src/components/form/textarea.tsx new file mode 100644 index 000000000..5e6369ec9 --- /dev/null +++ b/apps/playground/src/components/form/textarea.tsx @@ -0,0 +1,41 @@ +const Textarea = ({ + value, + onChange, + className = "", + disabled = false, + rows = 4, + label = undefined, +}: { + value: string; + onChange: (e: React.ChangeEvent) => void; + className?: string; + disabled?: boolean; + rows?: number; + label?: undefined | string; +}) => { + let _classname = + "block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 mb-4"; + + if (className.length > 0) { + _classname = className; + } + + return ( + <> + {label && ( + + )} + + + ); +}; + +export default Textarea; diff --git a/apps/playground/src/components/layouts/header-and-cards.tsx b/apps/playground/src/components/layouts/header-and-cards.tsx new file mode 100644 index 000000000..7509fc55f --- /dev/null +++ b/apps/playground/src/components/layouts/header-and-cards.tsx @@ -0,0 +1,40 @@ +import CardTitleDescImage from "~/components/card/card-title-desc-image"; +import CenterAlignHeaderParagraph from "~/components/sections/center-align-header-paragraph"; +import { MenuItem } from "~/types/menu-item"; +import CenterPadded from "./root/center-padded"; + +export default function HeaderAndCards({ + headerTitle, + headerParagraph, + listCards, +}: { + headerTitle: string; + headerParagraph?: string; + listCards?: MenuItem[]; +}) { + return ( + + {headerParagraph && ( + + {headerParagraph} + + )} + {listCards && ( +
    + {listCards.map((item, i) => { + return ( + + ); + })} +
    + )} +
    + ); +} diff --git a/apps/playground/src/components/layouts/image-header-and-body.tsx b/apps/playground/src/components/layouts/image-header-and-body.tsx new file mode 100644 index 000000000..e5c6c74a9 --- /dev/null +++ b/apps/playground/src/components/layouts/image-header-and-body.tsx @@ -0,0 +1,51 @@ +import Metatags from "~/components/site/metatags"; +import Markdown from "./markdown"; + +export default function LayoutImageHeaderAndBody({ + children, + title, + description, + image, + cover, +}: { + children: React.ReactNode; + title: string; + description: string; + image: string; + cover: string; +}) { + return ( + <> + +
    +
    +
    +
    +

    + {title} +

    +

    {description}

    +
    +
    +
    +
    + {children} +
    + {/* */} +
    +
    + + ); +} diff --git a/apps/playground/src/components/layouts/markdown.tsx b/apps/playground/src/components/layouts/markdown.tsx new file mode 100644 index 000000000..b351acc0c --- /dev/null +++ b/apps/playground/src/components/layouts/markdown.tsx @@ -0,0 +1,23 @@ +import { useEffect, useState } from "react"; +import { MDXProvider } from "@mdx-js/react"; + +import Codeblock from "~/components/text/codeblock"; + +export default function Markdown({ children }: { children: React.ReactNode }) { + const [mounted, setMounted] = useState(false); + + useEffect(() => { + setMounted(true); + }, []); + + if (mounted) + return ( + , + }} + > + {children} + + ); +} diff --git a/apps/playground/src/components/layouts/root/center-padded.tsx b/apps/playground/src/components/layouts/root/center-padded.tsx new file mode 100644 index 000000000..817e5c5d3 --- /dev/null +++ b/apps/playground/src/components/layouts/root/center-padded.tsx @@ -0,0 +1,11 @@ +export default function CenterPadded({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
    + {children} +
    + ); +} diff --git a/apps/playground/src/components/layouts/root/full-width.tsx b/apps/playground/src/components/layouts/root/full-width.tsx new file mode 100644 index 000000000..24a1be29f --- /dev/null +++ b/apps/playground/src/components/layouts/root/full-width.tsx @@ -0,0 +1,7 @@ +export default function FullWidth({ children }: { children: React.ReactNode }) { + return ( +
    + {children} +
    + ); +} diff --git a/apps/playground/src/components/layouts/sidebar-fullwidth.tsx b/apps/playground/src/components/layouts/sidebar-fullwidth.tsx new file mode 100644 index 000000000..63b4481d0 --- /dev/null +++ b/apps/playground/src/components/layouts/sidebar-fullwidth.tsx @@ -0,0 +1,19 @@ +import FullWidth from "~/components/layouts/root/full-width"; +import Sidebar from "./sidebar"; + +export default function SidebarFullwidth({ + children, + sidebarItems, +}: { + children: any; + sidebarItems: { to: string; label: string }[]; +}) { + return ( + + +
    + {children} +
    +
    + ); +} diff --git a/apps/playground/src/components/layouts/sidebar/index.tsx b/apps/playground/src/components/layouts/sidebar/index.tsx new file mode 100644 index 000000000..7ee9329f6 --- /dev/null +++ b/apps/playground/src/components/layouts/sidebar/index.tsx @@ -0,0 +1,48 @@ +import Link from "next/link"; +import { Link as RSLink } from "react-scroll"; + +export default function Sidebar({ + sidebarItems, +}: { + sidebarItems: { to: string; label: string }[]; +}) { + return ( +
    +
    + +
    +
    + ); +} + +function LinkWithinPage({ item }: { item: { to: string; label: string } }) { + return ( + + {item.label} + + ); +} diff --git a/apps/playground/src/components/sections/center-align-header-paragraph.tsx b/apps/playground/src/components/sections/center-align-header-paragraph.tsx new file mode 100644 index 000000000..a80a0bbef --- /dev/null +++ b/apps/playground/src/components/sections/center-align-header-paragraph.tsx @@ -0,0 +1,17 @@ +import Header2 from "~/components/text/header2"; +import Paragraph2 from "~/components/text/paragraph2"; + +export default function CenterAlignHeaderParagraph({ + children, + headerTitle, +}: { + children: React.ReactNode; + headerTitle: string; +}) { + return ( +
    + {headerTitle} + {children} +
    + ); +} diff --git a/apps/playground/src/components/sections/demo-result.tsx b/apps/playground/src/components/sections/demo-result.tsx new file mode 100644 index 000000000..125905d8e --- /dev/null +++ b/apps/playground/src/components/sections/demo-result.tsx @@ -0,0 +1,22 @@ +import Codeblock from "~/components/text/codeblock"; + +export default function DemoResult({ + response, + label = "Result", +}: { + response: any; + label?: string; +}) { + return ( + <> + {response !== null && response !== undefined && ( + <> +

    + {label}: +

    + + + )} + + ); +} diff --git a/apps/playground/src/components/sections/hero-two-sections.tsx b/apps/playground/src/components/sections/hero-two-sections.tsx new file mode 100644 index 000000000..b585c2b42 --- /dev/null +++ b/apps/playground/src/components/sections/hero-two-sections.tsx @@ -0,0 +1,65 @@ +import React from "react"; +import Link from "next/link"; + +import Codeblock from "../text/codeblock"; + +export default function HeroTwoSections({ + children, + title, + description, + image, + link, + code, +}: { + children?: React.ReactNode; + title: string; + description: string; + image: string | React.ReactNode; + link?: { label: string; href: string }; + code?: string; +}) { + return ( +
    +
    +
    +

    + {title} +

    +

    + {description} +

    + + {link && ( + + {link.label} + + + + + )} + + {code && } + + {children && children} +
    +
    + {typeof image === "string" ? : image} +
    +
    +
    + ); +} diff --git a/apps/playground/src/components/sections/input-table.tsx b/apps/playground/src/components/sections/input-table.tsx new file mode 100644 index 000000000..fb054d45b --- /dev/null +++ b/apps/playground/src/components/sections/input-table.tsx @@ -0,0 +1,21 @@ +export default function InputTable({ + listInputs, +}: { + listInputs: React.ReactNode[]; +}) { + return ( +
    + + + {listInputs.map((input, i) => { + return ( + + + + ); + })} + +
    {input}
    +
    + ); +} diff --git a/apps/playground/src/components/sections/live-code-demo.tsx b/apps/playground/src/components/sections/live-code-demo.tsx new file mode 100644 index 000000000..882f809cf --- /dev/null +++ b/apps/playground/src/components/sections/live-code-demo.tsx @@ -0,0 +1,110 @@ +import { useState } from "react"; +import JSONBig from "json-bigint"; + +import { useWallet } from "@meshsdk/react"; + +import RunDemoButton from "../button/run-demo-button"; +import Card from "../card/card"; +import BlockchainProviderKey from "../cardano/blockchain-providers-key"; +import ConnectBrowserWallet from "../cardano/connect-browser-wallet"; +import Codeblock from "../text/codeblock"; +import DemoResult from "./demo-result"; + +export default function LiveCodeDemo({ + children, + title, + subtitle, + code, + runCodeFunction, + disabled = false, + childrenAfterCodeFunctions = false, + runDemoButtonLabel = "Run code snippet", + runDemoButtonTooltip, + runDemoShowBrowseWalletConnect = false, + runDemoShowProviderInit = false, + runDemoProvider = undefined, +}: { + children?: React.ReactNode; + title: string; + subtitle: string; + code?: string; + runCodeFunction?: () => void; + disabled?: boolean; + childrenAfterCodeFunctions?: boolean; + runDemoButtonLabel?: string; + runDemoButtonTooltip?: string; + runDemoShowBrowseWalletConnect?: boolean; + runDemoShowProviderInit?: boolean; + runDemoProvider?: string | undefined; +}) { + const { connected } = useWallet(); + const [loading, setLoading] = useState(false); + const [demoResponse, setDemoResponse] = useState(null); + const [responseError, setResponseError] = useState(null); + + async function runDemo() { + if (!runCodeFunction) return; + setResponseError(null); + setDemoResponse(null); + setLoading(true); + try { + const response = await runCodeFunction(); + setDemoResponse(JSONBig.stringify(response, null, 2)); + } catch (error: any) { + let message = `Error running code snippet`; + if (error.message) { + message = error.message; + } else if (typeof error === "string") { + if (error.substring(0, 1) === "{") { + message = JSONBig.stringify(JSONBig.parse(error), null, 2); + } + message = error; + } + setResponseError(message); + } + setLoading(false); + } + + return ( + + {children && !childrenAfterCodeFunctions && ( +
    {children}
    + )} + + {code && } + + {runDemoShowProviderInit && runDemoProvider && ( + + )} + + {runCodeFunction && ( +
    + + {runDemoButtonTooltip && ( +

    + {runDemoButtonTooltip} +

    + )} + + + +
    + )} + {runDemoShowBrowseWalletConnect && ( +
    + +
    + )} + + {children && childrenAfterCodeFunctions && ( +
    {children}
    + )} +
    + ); +} diff --git a/apps/playground/src/components/sections/title-icon-description-body.tsx b/apps/playground/src/components/sections/title-icon-description-body.tsx new file mode 100644 index 000000000..c19af17c1 --- /dev/null +++ b/apps/playground/src/components/sections/title-icon-description-body.tsx @@ -0,0 +1,26 @@ +import React from "react"; + +import Header2 from "~/components/text/header2"; +import Paragraph2 from "~/components/text/paragraph2"; + +export default function TitleIconDescriptionBody({ + children, + title, + description, + heroicon, +}: { + children: React.ReactNode; + title: string; + description?: string; + heroicon?: any; +}) { + return ( + <> +
    + {title} + {description && {description}} +
    +
    {children}
    + + ); +} diff --git a/apps/playground/src/components/sections/two-columns-scroll.tsx b/apps/playground/src/components/sections/two-columns-scroll.tsx new file mode 100644 index 000000000..7f3384b8a --- /dev/null +++ b/apps/playground/src/components/sections/two-columns-scroll.tsx @@ -0,0 +1,36 @@ +import { useRouter } from "next/router"; +import { LinkIcon } from "@heroicons/react/24/solid"; +import { Element } from "react-scroll"; + +import { rootUrl } from "~/data/site"; +import { useClipboard } from "~/hooks/useCopyClipboard"; + +export default function TwoColumnsScroll({ + sidebarTo, + title, + leftSection, + rightSection, +}: { + sidebarTo: string; + title: string; + leftSection: JSX.Element; + rightSection?: JSX.Element; +}) { + const { pathname } = useRouter(); + const { onCopy } = useClipboard(`${rootUrl}${pathname}#${sidebarTo}`); + + return ( + +
    +

    {title}

    + +
    +
    +
    {leftSection}
    + {rightSection &&
    {rightSection}
    } +
    +
    + ); +} diff --git a/apps/playground/src/components/site/footer/index.tsx b/apps/playground/src/components/site/footer/index.tsx new file mode 100644 index 000000000..4a5479f5c --- /dev/null +++ b/apps/playground/src/components/site/footer/index.tsx @@ -0,0 +1,74 @@ +import React from "react"; +import Image from "next/image"; +import Link from "next/link"; + +import { socials } from "~/data/social"; +import Sitemap from "./sitemap"; + +export default function Footer() { + return ( +
    +
    +
    +
    +
    + logo + logo dark +
    + Mesh +
    +

    + Mesh is an open-source library to advance Web3 development on + Cardano. +

    +
      + {socials.map((social, i) => { + return ( +
    • + + {React.createElement(social.icon, { + className: "w-5 h-5", + })} + +
    • + ); + })} +
    +
    + + + +
    + + © {new Date().getFullYear()} Mesh.{" "} + + Apache-2.0 license + + . + +
    +
    + ); +} diff --git a/apps/playground/src/components/site/footer/sitemap.tsx b/apps/playground/src/components/site/footer/sitemap.tsx new file mode 100644 index 000000000..679763748 --- /dev/null +++ b/apps/playground/src/components/site/footer/sitemap.tsx @@ -0,0 +1,65 @@ +import Link from "next/link"; + +import { linksAbout } from "~/data/links-about"; +import { linksApi } from "~/data/links-api"; +import { metaGetStarted } from "~/data/links-get-started"; +import { metaGuides } from "~/data/links-guides"; +import { metaSmartContract } from "~/data/links-smart-contracts"; +import { MenuItem } from "~/types/menu-item"; + +export default function Sitemap() { + return ( +
    +
    +
    + + {linksApi.map((api, i) => ( +
    + ))} + +
    +
    + +
    +

    + About Mesh +

    +
      + {linksAbout.map((about, i) => ( + + ))} +
    +
    +
    +
    + ); +} + +function SitemapLinks({ href, label }: { href: string; label: string }) { + return ( +
  • + +
    {label}
    + +
  • + ); +} + +function Section({ menuItem }: { menuItem: MenuItem }) { + return ( +
    +

    + +

    +
      + {menuItem.items ? ( + menuItem.items.map((link, i) => ( + + )) + ) : ( + + )} +
    +
    + ); +} diff --git a/apps/playground/src/components/site/metatags.tsx b/apps/playground/src/components/site/metatags.tsx new file mode 100644 index 000000000..ce41a63e8 --- /dev/null +++ b/apps/playground/src/components/site/metatags.tsx @@ -0,0 +1,83 @@ +import Head from "next/head"; + +export default function Metatags({ + title, + keywords, + description, + image = "/logo-mesh/mesh.png", +}: { + title?: string; + keywords?: string; + description?: string; + image?: string; +}) { + if (description === undefined) { + description = + "Intuitive and easy-to-use Web3 development framework to build amazing applications on Cardano."; + } + if (keywords === undefined) { + keywords = + "developer, tools, cardano, blockchain, sdk, plutus, crypto, web3, metaverse, gaming, ecommerce, nfts, apis"; + } + if (title === undefined) { + title = "Web3 Development Made Easy"; + } + + title = title + " - MeshJS"; + + return ( + + + + + {title} + + + + + + + + + + {image && ( + + )} + {image && } + + + + + + {image && ( + + )} + + + + + + + + + + ); +} diff --git a/apps/playground/src/components/site/navbar/index.tsx b/apps/playground/src/components/site/navbar/index.tsx new file mode 100644 index 000000000..7db710ba5 --- /dev/null +++ b/apps/playground/src/components/site/navbar/index.tsx @@ -0,0 +1,141 @@ +import React, { useEffect, useState } from "react"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { + Bars4Icon, + MoonIcon, + SunIcon, + XMarkIcon, +} from "@heroicons/react/24/solid"; + +import SvgMesh from "~/components/svgs/mesh"; +import { linksAbout } from "~/data/links-about"; +import { linksApi } from "~/data/links-api"; +import { linksGetStarted } from "~/data/links-get-started"; +import { linksGuides } from "~/data/links-guides"; +import { linksSmartContracts } from "~/data/links-smart-contracts"; +import { socials } from "~/data/social"; +import { useDarkmode } from "~/hooks/useDarkmode"; +import MenuItem from "./menu-item"; +import MenuItemDropdown from "./menu-item-dropdown"; + +export default function Navbar() { + const isDark = useDarkmode((state) => state.isDark); + const setDarkMode = useDarkmode((state) => state.setDarkMode); + + const [isSSR, setIsSSR] = useState(true); + const [showMobileMenu, setShowMobileMenu] = useState(false); + const router = useRouter(); + + useEffect(() => { + setIsSSR(false); + }, []); + + function toggle() { + setDarkMode(!isDark); + } + + function toggleMobileMenu() { + setShowMobileMenu(!showMobileMenu); + } + + useEffect(() => { + function setDarkTheme(bool: boolean) { + if (bool) { + document.documentElement.classList.add("dark"); + } else { + document.documentElement.classList.remove("dark"); + } + } + setDarkTheme(isDark); + }, [isDark]); + + useEffect(() => { + setShowMobileMenu(false); + }, [router.asPath]); + + return ( +
    + +
    + ); +} diff --git a/apps/playground/src/components/site/navbar/menu-item-dropdown.tsx b/apps/playground/src/components/site/navbar/menu-item-dropdown.tsx new file mode 100644 index 000000000..099e9acb4 --- /dev/null +++ b/apps/playground/src/components/site/navbar/menu-item-dropdown.tsx @@ -0,0 +1,57 @@ +import { useState } from "react"; +import { ChevronDownIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; +import SubmenuItem from "./submenu-item"; +import SubmenuItemDropdown from "./submenu-item-dropdown"; + +export default function MenuItemDropdown({ + title, + items, +}: { + title: string; + items: MenuItem[]; +}) { + const [showMenu, setShowMenu] = useState(false); + return ( +
  • setShowMenu(true)} + onMouseLeave={() => setShowMenu(false)} + onClick={() => setShowMenu(!showMenu)} + > + +
    +
      + {items.map((item, i) => + item.items ? ( + + ) : ( + + ), + )} +
    +
    +
  • + ); +} diff --git a/apps/playground/src/components/site/navbar/menu-item.tsx b/apps/playground/src/components/site/navbar/menu-item.tsx new file mode 100644 index 000000000..1113d7ce9 --- /dev/null +++ b/apps/playground/src/components/site/navbar/menu-item.tsx @@ -0,0 +1,20 @@ +import Link from "next/link"; + +export default function MenuItem({ + title, + link, +}: { + title: string; + link: string; +}) { + return ( +
  • + + {title} + +
  • + ); +} diff --git a/apps/playground/src/components/site/navbar/submenu-item-dropdown.tsx b/apps/playground/src/components/site/navbar/submenu-item-dropdown.tsx new file mode 100644 index 000000000..3addc4a5b --- /dev/null +++ b/apps/playground/src/components/site/navbar/submenu-item-dropdown.tsx @@ -0,0 +1,81 @@ +import React, { useState } from "react"; +import Link from "next/link"; +import { ChevronRightIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export default function SubmenuItemDropdown({ + title, + icon, + items, + link, +}: { + title: string; + icon?: any; + items: MenuItem[]; + link?: string; +}) { + const [showMenu, setShowMenu] = useState(false); + + return ( +
  • setShowMenu(true)} + onMouseLeave={() => setShowMenu(false)} + onClick={() => setShowMenu(!showMenu)} + > + + + + +
    +
      + {items && + items.map((item, i) => ( + + ))} +
    +
    +
  • + ); +} + +function Item({ + title, + link, + icon, +}: { + title: string; + link: string; + icon?: any; +}) { + return ( +
  • + + {icon && React.createElement(icon, { className: "mr-2 w-4 h-4" })} + {title} + +
  • + ); +} diff --git a/apps/playground/src/components/site/navbar/submenu-item.tsx b/apps/playground/src/components/site/navbar/submenu-item.tsx new file mode 100644 index 000000000..b14c8757f --- /dev/null +++ b/apps/playground/src/components/site/navbar/submenu-item.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import Link from "next/link"; + +export default function SubmenuItem({ + title, + icon, + link, +}: { + title: string; + icon: any; + link: string; +}) { + return ( +
  • + + {icon && React.createElement(icon, { className: "mr-2 w-4 h-4" })} + {title} + +
  • + ); +} diff --git a/apps/playground/src/components/site/scroller.tsx b/apps/playground/src/components/site/scroller.tsx new file mode 100644 index 000000000..cf124d5c7 --- /dev/null +++ b/apps/playground/src/components/site/scroller.tsx @@ -0,0 +1,23 @@ +import { useEffect } from "react"; +import { useRouter } from "next/router"; + +var Scroll = require("react-scroll"); +var scroller = Scroll.scroller; + +export default function Scroller() { + const router = useRouter(); + + useEffect(() => { + const splitedUrl = router.asPath.split("#"); + if (splitedUrl.length === 2) { + scroller.scrollTo(splitedUrl[1], { + duration: 500, + delay: 100, + smooth: true, + offset: 0, + }); + } + }, [router.asPath]); + + return <>; +} diff --git a/apps/playground/src/components/svgs/discord.tsx b/apps/playground/src/components/svgs/discord.tsx new file mode 100644 index 000000000..8bf0513f7 --- /dev/null +++ b/apps/playground/src/components/svgs/discord.tsx @@ -0,0 +1,29 @@ +const SvgDiscord = ({ + className, + fill = "currentColor", +}: { + className?: string; + fill?: string; +}) => { + return ( + // + // + // + + + + + ); +}; + +export default SvgDiscord; diff --git a/apps/playground/src/components/svgs/github.tsx b/apps/playground/src/components/svgs/github.tsx new file mode 100644 index 000000000..6cde2095b --- /dev/null +++ b/apps/playground/src/components/svgs/github.tsx @@ -0,0 +1,20 @@ +const SvgGithub = ({ + className, + fill = "currentColor", +}: { + className?: string; + fill?: string; +}) => { + return ( + + + + ); +}; + +export default SvgGithub; diff --git a/apps/mesh-web/components/svgs/mesh.tsx b/apps/playground/src/components/svgs/mesh.tsx similarity index 91% rename from apps/mesh-web/components/svgs/mesh.tsx rename to apps/playground/src/components/svgs/mesh.tsx index eb1abd3b2..c9d697485 100644 --- a/apps/mesh-web/components/svgs/mesh.tsx +++ b/apps/playground/src/components/svgs/mesh.tsx @@ -1,4 +1,10 @@ -const SvgMesh = ({ className, fill = 'currentColor' }) => { +const SvgMesh = ({ + className, + fill = "currentColor", +}: { + className?: string; + fill?: string; +}) => { return ( { +const SvgSurprise = ({ + className, + fill = "currentColor", +}: { + className?: string; + fill?: string; +}) => { return ( { + return ( + + + + ); +}; + +export default SvgTwitter; diff --git a/apps/playground/src/components/text/codeblock.tsx b/apps/playground/src/components/text/codeblock.tsx new file mode 100644 index 000000000..592da83ae --- /dev/null +++ b/apps/playground/src/components/text/codeblock.tsx @@ -0,0 +1,44 @@ +import { useEffect, useState } from "react"; +import { DocumentDuplicateIcon } from "@heroicons/react/24/solid"; +import Highlight from "react-highlight"; + +import { useClipboard } from "~/hooks/useCopyClipboard"; + +export default function Codeblock({ + data, + language = "language-js", + isJson = false, +}: { + data: any; + language?: string; + isJson?: boolean; +}) { + const [isMounted, setIsMounted] = useState(false); + + const { onCopy } = useClipboard( + isJson ? JSON.stringify(data, null, 2) : data, + ); + + useEffect(() => { + setIsMounted(true); + }, []); + + if (!isMounted) { + return null; + } + + return ( +
    + + + {isJson ? JSON.stringify(data, null, 2) : data} + +
    + ); +} diff --git a/apps/playground/src/components/text/header2.tsx b/apps/playground/src/components/text/header2.tsx new file mode 100644 index 000000000..00961bc17 --- /dev/null +++ b/apps/playground/src/components/text/header2.tsx @@ -0,0 +1,31 @@ +import React from "react"; + +export default function Header2({ + children, + heroicon, +}: { + children: React.ReactNode; + heroicon?: any; +}) { + if (heroicon) { + return ( + + <div className="flex items-center"> + <div className="mr-4 p-2"> + {React.createElement(heroicon, { className: "w-16 h-16" })} + </div> + <span>{children}</span> + </div> + + ); + } + return {children}; +} + +function Title({ children }: { children: React.ReactNode }) { + return ( +

    + {children} +

    + ); +} diff --git a/apps/playground/src/components/text/header3.tsx b/apps/playground/src/components/text/header3.tsx new file mode 100644 index 000000000..b5501362e --- /dev/null +++ b/apps/playground/src/components/text/header3.tsx @@ -0,0 +1,9 @@ +import React from "react"; + +export default function Header3({ children }: { children: React.ReactNode }) { + return ( +

    + {children} +

    + ); +} diff --git a/apps/playground/src/components/text/paragraph2.tsx b/apps/playground/src/components/text/paragraph2.tsx new file mode 100644 index 000000000..8135c340f --- /dev/null +++ b/apps/playground/src/components/text/paragraph2.tsx @@ -0,0 +1,11 @@ +export default function Paragraph2({ + children, +}: { + children: React.ReactNode; +}) { + return ( +

    + {children} +

    + ); +} diff --git a/apps/playground/src/contexts/app-wallet.tsx b/apps/playground/src/contexts/app-wallet.tsx new file mode 100644 index 000000000..b2bcbc97b --- /dev/null +++ b/apps/playground/src/contexts/app-wallet.tsx @@ -0,0 +1,45 @@ +import React, { createContext, useContext, useMemo, useState } from "react"; + +import { AppWallet } from "@meshsdk/core"; + +const WalletContext = createContext({ + wallet: {} as AppWallet, + setWallet: (wallet: AppWallet) => {}, + walletNetwork: 0, + setWalletNetwork: (network: number) => {}, + walletConnected: false, +}); + +export const AppWalletProvider = ({ + children, +}: { + children: React.ReactNode; +}) => { + const [wallet, setWallet] = useState({} as AppWallet); + const [walletNetwork, setWalletNetwork] = useState(0); + + const walletConnected = useMemo(() => { + return Object.keys(wallet).length == 0 ? false : true; + }, [wallet]); + + const memoedValue = useMemo( + () => ({ + wallet, + setWallet, + walletNetwork, + setWalletNetwork, + walletConnected, + }), + [wallet, walletNetwork, walletConnected], + ); + + return ( + + {children} + + ); +}; + +export default function useAppWallet() { + return useContext(WalletContext); +} diff --git a/apps/playground/src/contexts/mesh-wallet.tsx b/apps/playground/src/contexts/mesh-wallet.tsx new file mode 100644 index 000000000..eb48ce0bf --- /dev/null +++ b/apps/playground/src/contexts/mesh-wallet.tsx @@ -0,0 +1,50 @@ +import React, { createContext, useContext, useMemo, useState } from "react"; + +import { MeshWallet } from "@meshsdk/core"; + +import { getMeshWallet } from "~/components/cardano/mesh-wallet"; + +const WalletContext = createContext({ + getWallet: () => ({}) as MeshWallet, + setWallet: (wallet: MeshWallet) => {}, + walletConnected: false, +}); + +export const MeshWalletProvider = ({ + children, +}: { + children: React.ReactNode; +}) => { + const [wallet, setWallet] = useState({} as MeshWallet); + + const walletConnected = useMemo(() => { + return Object.keys(wallet).length == 0 ? false : true; + }, [wallet]); + + function getWallet() { + if (!walletConnected) { + const _wallet = getMeshWallet(); + setWallet(_wallet); + } + return wallet; + } + + const memoedValue = useMemo( + () => ({ + getWallet, + setWallet, + walletConnected, + }), + [wallet, walletConnected], + ); + + return ( + + {children} + + ); +}; + +export default function useMeshWallet() { + return useContext(WalletContext); +} diff --git a/apps/playground/src/contexts/providers.tsx b/apps/playground/src/contexts/providers.tsx new file mode 100644 index 000000000..0216fc4e7 --- /dev/null +++ b/apps/playground/src/contexts/providers.tsx @@ -0,0 +1,10 @@ +import { AppWalletProvider } from "./app-wallet"; +import { MeshWalletProvider } from "./mesh-wallet"; + +export default function Providers({ children }: { children: React.ReactNode }) { + return ( + + {children} + + ); +} diff --git a/apps/playground/src/data/cardano.ts b/apps/playground/src/data/cardano.ts new file mode 100644 index 000000000..afdf1da29 --- /dev/null +++ b/apps/playground/src/data/cardano.ts @@ -0,0 +1,56 @@ +import { MeshMarketplaceBlueprint } from "@meshsdk/contract"; + +export const demoAddresses = { + mainnet: "addr1v9vx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c93pyfx", + testnet: "addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr", + testnetPayment: + "addr_test1qzl2r3fpmav0fmh0vrry0e0tmzxxqwv32sylnlty2jj8dwg636sfudakhsh65qggs4ttjjsk8fuu3fkd65uaxcxv0tfqv3z0y3", + testnetStake: + "stake_test1uqdgagy7x7mtcta2qyyg244efgtr57wg5mxa2wwnvrx845s4sa2vp", +}; + +export const demoMnemonic = "solution,".repeat(24).split(",").slice(0, 24); + +export const demoPrivateKey = + "xprv1cqa46gk29plgkg98upclnjv5t425fcpl4rgf9mq2txdxuga7jfq5shk7np6l55nj00sl3m4syzna3uwgrwppdm0azgy9d8zahyf32s62klfyhe0ayyxkc7x92nv4s77fa0v25tufk9tnv7x6dgexe9kdz5gpeqgu"; + +export const demoCLIKey = { + paymentSkey: + "5820aaca553a7b95b38b5d9b82a5daa7a27ac8e34f3cf27152a978f4576520dd6503", + stakeSkey: + "582097c458f19a3111c3b965220b1bef7d548fd75bc140a7f0a4f080e03cce604f0e", +}; + +export const demoPlutusMintingScript = + "5883588101000032323232323232322232533300632323232533300a3370e9000000899b8f375c601c601000e911046d6573680014a0601000260180026018002600800429309b2b19299980319b87480000044c8c94ccc02cc03400852616375c601600260080062c60080044600a6ea80048c00cdd5000ab9a5573aaae7955cfaba15745"; + +export const demoPlutusAlwaysSucceedScript = "4e4d01000033222220051200120011"; + +export const demoPolicyId = + "d9312da562da182b02322fd8acb536f37eb9d29fba7c49dc17255527"; +export const demoAssetId = "4d657368546f6b656e"; +export const demoAsset = demoPolicyId + demoAssetId; + +export const demoAssetMetadata = { + name: "Mesh Token", + image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua", + mediaType: "image/jpg", + description: "This NFT was minted by Mesh (https://meshjs.dev/).", +}; + +export const demoPool = + "pool107k26e3wrqxwghju2py40ngngx2qcu48ppeg7lk0cm35jl2aenx"; + +export const demoMarketplaceCompiledCode = MeshMarketplaceBlueprint; + +export const demoPubKeyHash = + "aa048e4cc8a1e67e1d97ffbd4be614388014cbc2b2451527202943b6"; + +export const demoStakeCredential = + "9d4dcd7e454d2434164f4efb8edeb358d86a1dad9ec6224cfcbce3e6"; + +export const oneTimeMintingPolicy = + "5901e6010000323232323232322232322533300632323232533300a3007300b3754002264a666016601060186ea802454ccc02cc020c030dd519198008009bac3011300e375400844a6660200022980103d87a800013232533300f3375e01c601260226ea80084cdd2a40006602600497ae01330040040013014002301200114a229404c8cc004004c8cc004004c8cc004004dd59809980a180a180a180a18081baa00622533301200114bd6f7b630099191919299980999b9148900002153330133371e91010000210031005133017337606ea4008dd3000998030030019bab3014003375c6024004602c004602800244a666022002297ae01323332223233001001003225333017001100313233019374e660326ea4018cc064c058004cc064c05c0052f5c066006006603600460320026eb8c040004dd5980880099801801980a80118098009129998080008a51132533300e32533300f3371e6eb8c0240040144cdc41bad301430153015001480005289bac301300213300300300114a060260026eb8c03cc030dd50008a50300e300f002300d001300937540044601800229309b2b19299980298010008a99980418039baa00314985854ccc014cdc3a40040022a666010600e6ea800c5261616300537540046e1d20005734aae7555cf2ab9f5740ae855d101"; + +export const demoTransactionCbor = + "84a70081825820859d3b4fd3a4c012b43ee1bbbc99240aec1827c3b8a74b867d10a7f4759149bc00018382583900e4cfbbc317c718f78d137b6535d8940618cc3d2ac04f1f35acf78e53a1521c2cea3cc79762d575581e47ea60b8eaa03430716cfd6140c796821a0011b0dea1581c67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152a149000643b0546573743101a300581d7067dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a113615201821a001ad510a1581c67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152a149000de140546573743101028201d8185882d8799fa4446e616d6545546573743145696d6167655835697066733a2f2f516d527a6963705265757477436b4d36616f74754b6a4572464355443231334470775071364279757a4d4a617561496d656469615479706549696d6167652f6a70674b6465736372697074696f6e5348656c6c6f20776f726c64202d20434950363802ff825839003659ed2a30abb32e97589f2a01c8500ce8fc4897b868ebe42fbf4a8aa1521c2cea3cc79762d575581e47ea60b8eaa03430716cfd6140c7961a00134249021a000c830909a1581c67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152a249000643b054657374310149000de1405465737431010b58207ae25a8a9286347cc1e0444a0de75e07432a6ed243591ef673fd837bb5235a670d82825820859d3b4fd3a4c012b43ee1bbbc99240aec1827c3b8a74b867d10a7f4759149bc00825820859d3b4fd3a4c012b43ee1bbbc99240aec1827c3b8a74b867d10a7f4759149bc050e81581ce4cfbbc317c718f78d137b6535d8940618cc3d2ac04f1f35acf78e53a206815883588101000032323232323232322232533300632323232533300a3370e9000000899b8f375c601c601000e911046d6573680014a0601000260180026018002600800429309b2b19299980319b87480000044c8c94ccc02cc03400852616375c601600260080062c60080044600a6ea80048c00cdd5000ab9a5573aaae7955cfaba157450581840100d8799f446d657368ff821a006acfc01ab2d05e00f5f6"; diff --git a/apps/playground/src/data/links-about.ts b/apps/playground/src/data/links-about.ts new file mode 100644 index 000000000..3e4ceb273 --- /dev/null +++ b/apps/playground/src/data/links-about.ts @@ -0,0 +1,29 @@ +import { + CheckBadgeIcon, + CodeBracketIcon, + FilmIcon, + HeartIcon, + NewspaperIcon, +} from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; +import { metaCatalyst } from "./links-catalyst"; + +export const metaSupportUs = { + link: `/about/support-us`, + title: "Support Us", + desc: "Thank you for your interest in Mesh, we appreciate any kind of support! Here are some ways you can support us.", + icon: HeartIcon, +}; +export const metaMediaKit = { + link: `/about/media-kit`, + title: "Media Kit", + desc: "Choose from these logo files. These resources exist to help you use Mesh's assets.", + icon: FilmIcon, +}; + +export const linksAbout: MenuItem[] = [ + metaCatalyst, + metaSupportUs, + metaMediaKit, +]; diff --git a/apps/playground/src/data/links-aiken.ts b/apps/playground/src/data/links-aiken.ts new file mode 100644 index 000000000..ee941ae91 --- /dev/null +++ b/apps/playground/src/data/links-aiken.ts @@ -0,0 +1,36 @@ +import { MenuItem } from "~/types/menu-item"; + +export const metaAikenGettingStarted = { + title: "Getting Started", + desc: "We will walk you through the process of setting up your system to compile Aiken smart contracts", + link: "/aiken/getting-started", +}; +export const metaAikenFirstScript = { + title: "Write a Smart Contract", + desc: "Learn how to write your first Aiken script, with a simple redeemer", + link: "/aiken/first-script", +}; +export const metaAikenTransactions = { + title: "Build Transactions", + desc: "Build transactions to interact with smart contracts", + link: "/aiken/transactions", +}; +export const metaAikenContractsLib = { + title: "Smart Contracts Library", + desc: "A library of smart contracts to help you start building and learning", + link: "/smart-contracts", +}; + +export const linksAiken: MenuItem[] = [ + metaAikenGettingStarted, + metaAikenFirstScript, + metaAikenTransactions, + metaAikenContractsLib, +]; + +export const metaAiken: MenuItem = { + title: "Aiken", + desc: "A functional programming language created for Cardano smart contract development", + link: "/aiken", + items: linksAiken, +}; diff --git a/apps/playground/src/data/links-api.ts b/apps/playground/src/data/links-api.ts new file mode 100644 index 000000000..b0975b523 --- /dev/null +++ b/apps/playground/src/data/links-api.ts @@ -0,0 +1,18 @@ +import { MenuItem } from "~/types/menu-item"; +import { metaData } from "./links-data"; +import { metaProviders } from "./links-providers"; +import { metaReact } from "./links-react"; +import { metaTransaction } from "./links-transactions"; +// import { metaTxbuilder } from "./links-txbuilders"; +import { metaUtilities } from "./links-utilities"; +import { metaWallets } from "./links-wallets"; + +export const linksApi: MenuItem[] = [ + metaWallets, + metaTransaction, + // metaTxbuilder, // todo, work on txbuilder docs + metaData, + metaReact, + metaProviders, + metaUtilities, +]; diff --git a/apps/playground/src/data/links-catalyst.ts b/apps/playground/src/data/links-catalyst.ts new file mode 100644 index 000000000..17dbb6205 --- /dev/null +++ b/apps/playground/src/data/links-catalyst.ts @@ -0,0 +1,127 @@ +import { LightBulbIcon } from "@heroicons/react/24/solid"; + +export const metaCatalyst = { + link: `/about/catalyst`, + title: "Project Catalyst", + desc: "Here are proposals that we have submitted to Project Catalyst and its progress.", + icon: LightBulbIcon, +}; + +export const fund12 = [ + { + title: "Cardano Service Layer Framework for DApps", + desc: "R&D a framework to quickly spin up a service layer for specific Cardano DApps, allowing DApps to re-use all infrastructure such as contracts and MeshJS, while possible for custom protocol parameters.", + url: "https://cardano.ideascale.com/c/idea/121847", + completed: [], + tobecompleted: [ + `Parallel Cardano Blockchain MeshJS Integration`, + `Customized Protocol Parameters`, + `Persistent Record & Immutability`, + `Framework DevOps`, + `Documentation and training materials`, + ], + status: "In Progress", + }, + { + title: + "Mesh New Features to Improve Developer experience and Cardano Adoption", + desc: "We will upgrade Mesh by implementing CIP 45, WebRTC wallet connect, handle multiple serialization libs, revamp to support backend transactions building, and improve error messages to improve DevXP.", + url: "https://cardano.ideascale.com/c/idea/122160", + completed: [], + tobecompleted: [ + "CIP 45", + "Mesh application wallet", + "Modular CSL library", + "Improve error messages", + "Wallet support for private blockchain networks (e.g. Yaci)", + ], + status: "In Progress", + }, + { + title: "Mesh Software as a Service", + desc: "We provide hosted server instances for wallet and transactions builder by restful APIs, this allow integration and interaction to Cardano blockchain from any technology stacks and systems.", + url: "https://cardano.ideascale.com/c/idea/122098", + completed: [], + tobecompleted: [ + "Cloud infrastructure and transaction endpoints", + "Upgrade Mesh SDK to support SaaS", + "Hosted wallet / private key for signing", + "User-defined transaction building", + "JSON schema for transaction", + ], + status: "In Progress", + }, + { + title: + "Maintaining Mesh SDK, community support and content creation to onboard developers", + desc: "Maintenance and operations of Mesh SDK, community support and content creation, in order to onboard developers and users to the Cardano blockchain ecosystem.", + url: "https://cardano.ideascale.com/c/idea/122471", + completed: [], + tobecompleted: [ + `Provide community support`, + `Resolve GitHub issues`, + `Create tutorials and documentation`, + `Create workshops and live coding sessions`, + ], + status: "In Progress", + }, +]; + +export const fund11 = [ + { + title: "Aiken Open-Source Smart Contract Library", + desc: "We create a collection of open-source smart contracts with Aiken (including Workspace, Mesh TX builder components) and integrate them into the Mesh SDK library on Github - open and accessible to all. ", + url: "https://projectcatalyst.io/funds/11/cardano-open-developers/aiken-open-source-smart-contract-library-by-meshjs-and-trustlevel", + completed: [ + "Marketplace contract", + "Escrow contract", + "Vesting contract", + "Gift card contract", + "Coupon bond guaranteed contract", + ], + tobecompleted: [ + "Content ownership contract", + "Advanced contract #2", + "Advanced contract #3", + "Bad examples", + ], + status: "In Progress", + }, + + { + title: "Sustain & Maintain MeshJS", + desc: "This proposal enables implementations not limited to Voltaire features, Hydra & Aiken integration, and data providers integrations. Including bounties for issues, features, and learning materials.", + url: "https://projectcatalyst.io/funds/11/cardano-open-developers/sustain-and-maintain-meshjs", + completed: [ + "Lower-level APIs completed", + "Technical documentation released", + "Resolved numerous reported GitHub issues", + "Active Discord engagement to help developers", + "Transaction building support for Hydra apps", + ], + tobecompleted: [ + "Plutus version 3 integration", + "Revamped/refactored transaction and utilities class", + "Conway features", + ], + status: "In Progress", + }, +]; + +export const fund10 = [ + { + title: + "Supporting Open-Source Library Development, Developer Resources & Builder Community", + desc: "To guarantee and ensure sustainability of a team dedicated to maintaining and developing one of the best open-source libraries on Cardano, providing devs with something easy-to-use, fun and productive.", + url: "https://projectcatalyst.io/funds/10/f10-osde-open-source-dev-ecosystem/meshjs-sdk-operations-supporting-open-source-library-development-developer-resources-and-builder-community", + completed: [ + "Lower-level APIs core functionality", + "Mesh PBL course content", + "Workshops and live coding", + "Community Q&A support", + "Demos and tutorials repository", + ], + tobecompleted: ["Mesh PBL Season #1", "Student projects"], + status: "In Progress", + }, +]; diff --git a/apps/playground/src/data/links-data.ts b/apps/playground/src/data/links-data.ts new file mode 100644 index 000000000..97fd5cf2d --- /dev/null +++ b/apps/playground/src/data/links-data.ts @@ -0,0 +1,57 @@ +import { + Bars2Icon, + Bars3Icon, + Bars4Icon, + CircleStackIcon, + WrenchIcon, +} from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaOverview = { + title: "Cardano Data Overview", + desc: "Learn about the basics, and how Mesh handles Cardano data", + link: "/apis/data/overview", + icon: CircleStackIcon, +}; + +export const metaDataMesh = { + title: "Mesh Data", + desc: "Parse and manipulate Cardano data with Mesh Data type", + link: "/apis/data/mesh", + icon: Bars2Icon, +}; +export const metaDataJson = { + title: "JSON Data", + desc: "Parse and manipulate Cardano data with JSON", + link: "/apis/data/json", + icon: Bars3Icon, +}; +export const metaDataCbor = { + title: "CBOR Data", + desc: "Parse and manipulate Cardano data with CBOR", + link: "/apis/data/cbor", + icon: Bars4Icon, +}; +export const metaDataUtils = { + title: "Advance Utility for Data", + desc: "Making data manipulation easier with Mesh", + link: "/apis/data/utils", + icon: WrenchIcon, +}; + +export const linksData: MenuItem[] = [ + metaOverview, + metaDataMesh, + metaDataJson, + // metaDataCbor, + // metaDataUtils, +]; + +export const metaData = { + title: "Data", + desc: "Parse and manipulate data", + link: "/apis/data", + icon: CircleStackIcon, + items: linksData, +}; diff --git a/apps/playground/src/data/links-frameworks.ts b/apps/playground/src/data/links-frameworks.ts new file mode 100644 index 000000000..18d856746 --- /dev/null +++ b/apps/playground/src/data/links-frameworks.ts @@ -0,0 +1,35 @@ +import { CpuChipIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaNextjs = { + title: "Next.js", + desc: "React-based web applications with server-side rendering and static website generation", + link: "/getting-started/frameworks/nextjs", +}; + +export const metaSvelte = { + title: "Svelte", + desc: "Cybernetically enhanced web apps", + link: "/getting-started/frameworks/svelte", +}; + +// vite +// svelte +// vue +// angular +// react +// gatsby +// nuxt +// react-native + + +export const linksFrameworks: MenuItem[] = [metaNextjs, metaSvelte]; + +export const metaFrameworks: MenuItem = { + title: "Setup on Frameworks", + desc: "Get started with Mesh on different frameworks", + link: "/getting-started/frameworks", + items: linksFrameworks, + icon: CpuChipIcon, +}; diff --git a/apps/playground/src/data/links-get-started.ts b/apps/playground/src/data/links-get-started.ts new file mode 100644 index 000000000..c57bc13ab --- /dev/null +++ b/apps/playground/src/data/links-get-started.ts @@ -0,0 +1,41 @@ +import { AcademicCapIcon, StarIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; +import { metaAiken } from "./links-aiken"; +import { metaGuides } from "./links-guides"; +import { metaYaci } from "./links-yaci"; + +// import { metaFrameworks } from "./links-frameworks"; + +export const linksGetStarted: MenuItem[] = [ + metaGuides, + // metaFrameworks, + { + link: `https://pbl.meshjs.dev/`, + title: "Project Based Learning", + desc: "Start your building journey", + icon: AcademicCapIcon, + }, + metaAiken, + metaYaci, + // { + // link: `/getting-started/starter-templates`, + // title: "Starter Templates", + // desc: "Kick start your projects with our templates using CLI", + // icon: RocketLaunchIcon, + // }, + // { + // link: `/getting-started/migration-manual-installation`, + // title: "Migration / Manual Installation", + // desc: "Install Mesh into your existing project", + // icon: WrenchScrewdriverIcon, + // }, +]; + +export const metaGetStarted: MenuItem = { + title: "Get Started", + desc: "Whether you are new to web development or a seasoned blockchain full-stack developer, Mesh is the SDK for you.", + link: "/getting-started", + icon: StarIcon, + items: linksGetStarted, +}; diff --git a/apps/playground/src/data/links-guides.ts b/apps/playground/src/data/links-guides.ts new file mode 100644 index 000000000..1429a9d6e --- /dev/null +++ b/apps/playground/src/data/links-guides.ts @@ -0,0 +1,68 @@ +import { DocumentTextIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const linksGuides: MenuItem[] = [ + { + title: "Develop your first Web3 App", + desc: "A step-by-step guide to setup a Next.js web application, add a wallet connection and browse assets.", + link: "/guides/nextjs", + thumbnail: "/guides/develop-first-web-app.png", + }, + { + title: "Minting Application", + desc: "Load CLI generated keys and mint assets on Node.js.", + link: "/guides/minting-on-nodejs", + thumbnail: "/guides/minting-application.png", + }, + { + title: "Multi-Signatures Transaction", + desc: "Learn about multi-sig transaction, build a minting transaction involving AppWallet and BrowserWallet.", + link: "/guides/multisig-minting", + thumbnail: "/guides/multi-signatures-transaction.png", + }, + { + title: "Integrating Smart Contract", + desc: "A step-by-step guide to integrate your Cardano Smart Contract to a web application.", + link: "/guides/smart-contract", + thumbnail: "/guides/integrating-smart-contract.png", + }, + { + title: "Prove Wallet Ownership", + desc: "Cryptographically prove the ownership of a wallet by signing a piece of data using data sign.", + link: "/guides/prove-wallet-ownership", + thumbnail: "/guides/cryptographically-prove-wallet-ownership.png", + }, + { + title: "Implement Custom Provider", + desc: "Build custom Providers that provides an API to access and process information provided by services.", + link: "/guides/custom-provider", + thumbnail: "/guides/implement-custom-provider.png", + }, + { + title: "Smart Contract Transactions", + desc: "Build a marketplace with Plutus (Haskell), where users can list their assets for sale and purchase the listed assets.", + link: "/guides/smart-contract-transactions", + thumbnail: "/guides/smart-contract-transactions.png", + }, + { + title: "Aiken Hello World", + desc: "Create smart contracts with Aiken and execute transactions with Mesh.", + link: "/guides/aiken", + thumbnail: "/guides/aiken.png", + }, + { + title: "Executing a standalone script", + desc: "Learn how to execute a standalone script to manage wallets and creating transactions.", + link: "/guides/standalone", + thumbnail: "/guides/standalone.png", + }, +]; + +export const metaGuides: MenuItem = { + link: `/guides`, + title: "Guides", + desc: "Whether you are new to web development or a seasoned blockchain full-stack developer, these guides will help you get started.", + icon: DocumentTextIcon, + items: linksGuides, +}; diff --git a/apps/playground/src/data/links-providers.ts b/apps/playground/src/data/links-providers.ts new file mode 100644 index 000000000..16beff801 --- /dev/null +++ b/apps/playground/src/data/links-providers.ts @@ -0,0 +1,54 @@ +import { CloudIcon } from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaMaestro = { + title: "Maestro", + link: "/providers/maestro", + desc: "Advanced UTxO-indexing data layer to supercharge Defi on Bitcoin, Cardano & Dogecoin", + thumbnail: "/providers/maestro.png", +}; + +export const metaKoios = { + title: "Koios", + link: "/providers/koios", + desc: "Distributed & open-source public API query layer for Cardano", + thumbnail: "/providers/koios.png", +}; + +export const metaBlockfrost = { + title: "Blockfrost", + link: "/providers/blockfrost", + desc: "Featuring over 100 APIs tailored for easy access to Cardano blockchain", + thumbnail: "/providers/blockfrost.png", +}; + +export const metaYaci = { + title: "Yaci DevKit", + link: "/providers/yaci", + desc: "Custom Cardano devnet to tailor your devnet needs with a builtin indexer and custom viewer for devnet", + thumbnail: "/providers/yaci.png", +}; + +export const metaOgmios = { + title: "Ogmios", + link: "/providers/ogmios", + desc: "Lightweight bridge interface for cardano-node that offers WebSockets API that enables local clients to speak Ouroboros' mini-protocols", + thumbnail: "/providers/ogmios.png", +}; + +export const linksProviders: MenuItem[] = [ + metaBlockfrost, + metaKoios, + metaMaestro, + metaOgmios, + metaYaci, +]; + +export const metaProviders = { + title: "Providers", + desc: "Data providers for connecting to the blockchain", + link: "/providers", + icon: CloudIcon, + items: linksProviders, +}; diff --git a/apps/playground/src/data/links-react.ts b/apps/playground/src/data/links-react.ts new file mode 100644 index 000000000..7d2772143 --- /dev/null +++ b/apps/playground/src/data/links-react.ts @@ -0,0 +1,41 @@ +import { + BoltIcon, + ComputerDesktopIcon, + PaintBrushIcon, + RocketLaunchIcon, +} from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaReactGettingstarted = { + title: "Getting Started Mesh React Components", + desc: "Frontend components for wallet connections, and useful React hooks to getting wallet states - Mesh provides everything you need to bring your Web3 user interface to life.", + link: "/react/getting-started", + icon: RocketLaunchIcon, +}; +export const metaReactUicomponents = { + title: "UI Components", + desc: "UI components to speed up your app development.", + link: "/react/ui-components", + icon: PaintBrushIcon, +}; +export const metaReactWallethooks = { + title: "Wallet Hooks", + desc: "React hooks for interacting with connected wallets.", + link: "/react/wallet-hooks", + icon: BoltIcon, +}; + +export const linksReact: MenuItem[] = [ + metaReactGettingstarted, + metaReactUicomponents, + metaReactWallethooks, +]; + +export const metaReact = { + title: "React Components", + desc: "Frontend components for wallet connections, and useful React hooks to getting wallet states - Mesh provides everything you need to bring your Web3 user interface to life.", + link: "/react", + icon: ComputerDesktopIcon, + items: linksReact, +}; diff --git a/apps/playground/src/data/links-smart-contracts.ts b/apps/playground/src/data/links-smart-contracts.ts new file mode 100644 index 000000000..1382e7466 --- /dev/null +++ b/apps/playground/src/data/links-smart-contracts.ts @@ -0,0 +1,64 @@ +import { + ArrowsPointingOutIcon, + ArrowsRightLeftIcon, + DocumentCheckIcon, + GiftIcon, + LockClosedIcon, + ShoppingCartIcon, +} from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaMarketplace = { + title: "Markplace", + desc: "Build a NFT marketplace effortlessly", + link: "/smart-contracts/marketplace", + icon: ShoppingCartIcon, +}; +export const metaVesting = { + title: "Vesting", + desc: "Vesting contract is a smart contract that locks up funds for a period of time and allows the owner to withdraw the funds after the lockup period.", + link: "/smart-contracts/vesting", + icon: LockClosedIcon, +}; +export const metaEscrow = { + title: "Escrow", + desc: "Secure exchange of assets between two parties", + link: "/smart-contracts/escrow", + icon: ArrowsRightLeftIcon, +}; +export const metaGiftcard = { + title: "Giftcard", + desc: "Create a giftcard with native tokens", + link: "/smart-contracts/giftcard", + icon: GiftIcon, +}; +export const metaSwap = { + title: "Swap", + desc: "Swap contract facilitates the exchange of assets between two parties", + link: "/smart-contracts/swap", + icon: ArrowsRightLeftIcon, +}; +export const metaPaymentSplitter = { + title: "Payment Splitter", + desc: "Split payouts equally among a list of specified payees", + link: "/smart-contracts/payment-splitter", + icon: ArrowsPointingOutIcon, +}; + +export const linksSmartContracts: MenuItem[] = [ + metaEscrow, + metaGiftcard, + metaMarketplace, + metaPaymentSplitter, + metaSwap, + metaVesting, +]; + +export const metaSmartContract: MenuItem = { + title: "Smart Contracts", + desc: "Want to get started with smart contracts? Here are some contracts for the most common use-cases.", + link: "/smart-contracts", + icon: DocumentCheckIcon, + items: linksSmartContracts, +}; diff --git a/apps/playground/src/data/links-transactions.ts b/apps/playground/src/data/links-transactions.ts new file mode 100644 index 000000000..56852d07b --- /dev/null +++ b/apps/playground/src/data/links-transactions.ts @@ -0,0 +1,50 @@ +import { + ArrowsPointingInIcon, + BanknotesIcon, + FireIcon, + NewspaperIcon, + PaperAirplaneIcon, +} from "@heroicons/react/24/solid"; + +export const metaTransactionBasic = { + link: `/apis/transaction/basics`, + title: "Transaction Basics", + desc: "Working with transactions and its various options", + icon: PaperAirplaneIcon, +}; + +export const metaMinting = { + link: `/apis/transaction/minting`, + title: "Mint and Burn Assets", + desc: "Minting and burning assets with Native Script and Plutus Script", + icon: FireIcon, +}; + +export const metaTransactionSmartContract = { + link: `/apis/transaction/smart-contract`, + title: "Smart Contracts", + desc: "Transactions to work with smart contracts", + icon: NewspaperIcon, +}; + +export const metaStaking = { + link: `/apis/transaction/staking`, + title: "Staking Transactions", + desc: "Transactions for delegating ADA and managing stakepools", + icon: ArrowsPointingInIcon, +}; + +export const linksTransactions = [ + metaTransactionBasic, + metaMinting, + metaTransactionSmartContract, + metaStaking, +]; + +export const metaTransaction = { + title: "Transactions", + desc: "For sending and minting assets and working with smart contracts", + link: "/apis/transaction", + icon: BanknotesIcon, + items: linksTransactions, +}; diff --git a/apps/playground/src/data/links-txbuilders.ts b/apps/playground/src/data/links-txbuilders.ts new file mode 100644 index 000000000..430e0e860 --- /dev/null +++ b/apps/playground/src/data/links-txbuilders.ts @@ -0,0 +1,50 @@ +import { + ArrowsPointingInIcon, + BanknotesIcon, + FireIcon, + NewspaperIcon, + PaperAirplaneIcon, +} from "@heroicons/react/24/solid"; + +export const metaTxbuilderBasic = { + link: `/apis/txbuilder/basics`, + title: "Transaction Basics", + desc: "Working with transactions and its various options", + icon: PaperAirplaneIcon, +}; + +export const metaTxbuilderMinting = { + link: `/apis/txbuilder/minting`, + title: "Mint and Burn Assets", + desc: "Minting and burning assets with Native Script and Plutus Script", + icon: FireIcon, +}; + +export const metaTxbuilderSmartContract = { + link: `/apis/txbuilder/smart-contract`, + title: "Smart Contracts", + desc: "Transactions to work with smart contracts", + icon: NewspaperIcon, +}; + +export const metaTxbuilderStaking = { + link: `/apis/txbuilder/staking`, + title: "Staking Transactions", + desc: "Transactions for delegating ADA and managing stakepools", + icon: ArrowsPointingInIcon, +}; + +export const linksTxbuilder = [ + metaTxbuilderBasic, + metaTxbuilderMinting, + metaTxbuilderSmartContract, + metaTxbuilderStaking, +]; + +export const metaTxbuilder = { + title: "Transaction Builder", + desc: "Build all possible transaction with our cardano-cli like APIs", + link: "/apis/txbuilder", + icon: BanknotesIcon, + items: linksTxbuilder, +}; diff --git a/apps/playground/src/data/links-utilities.ts b/apps/playground/src/data/links-utilities.ts new file mode 100644 index 000000000..7bc9f7768 --- /dev/null +++ b/apps/playground/src/data/links-utilities.ts @@ -0,0 +1,43 @@ +import { + ArrowRightIcon, + ArrowTurnRightDownIcon, + ArrowTurnRightUpIcon, + WrenchScrewdriverIcon, +} from "@heroicons/react/24/solid"; + +import { MenuItem } from "~/types/menu-item"; + +export const metaResolvers = { + title: "Resolvers", + desc: "Converts between different formats.", + link: "/apis/utilities/resolvers", + icon: ArrowRightIcon, +}; + +export const metaSerializers = { + title: "Serializers", + desc: "Encode objects into CBOR or bech32 format.", + link: "/apis/utilities/serializers", + icon: ArrowTurnRightDownIcon, +}; + +export const metaDeserializers = { + title: "Deserializers", + desc: "Parse CBOR or bech32 into objects.", + link: "/apis/utilities/deserializers", + icon: ArrowTurnRightUpIcon, +}; + +export const linksUtilities: MenuItem[] = [ + // metaSerializers, + // metaDeserializers, + metaResolvers, +]; + +export const metaUtilities = { + title: "Utilities", + desc: "Useful functions that you need while building applications.", + link: "/apis/utilities", + icon: WrenchScrewdriverIcon, + items: linksUtilities, +}; diff --git a/apps/playground/src/data/links-wallets.ts b/apps/playground/src/data/links-wallets.ts new file mode 100644 index 000000000..1475eecf1 --- /dev/null +++ b/apps/playground/src/data/links-wallets.ts @@ -0,0 +1,34 @@ +import { + BanknotesIcon, + CodeBracketSquareIcon, + WalletIcon, +} from "@heroicons/react/24/solid"; + +export const metaAppwallet = { + link: `/apis/wallets/appwallet`, + title: "App Wallet", + desc: "Core wallet functionality for building other user wallets and fully customed applications's backend.", + icon: CodeBracketSquareIcon, +}; +export const metaBrowserwallet = { + link: `/apis/wallets/browserwallet`, + title: "Browser Wallet", + desc: "For connecting, queries and performs wallet functions in accordance to CIP-30.", + icon: BanknotesIcon, +}; +export const metaMeshwallet = { + link: `/apis/wallets/meshwallet`, + title: "Mesh Wallet", + desc: "Mesh Wallet provides a set of APIs to interact with the blockchain. This wallet is compatible with Mesh transaction builders.", + icon: WalletIcon, +}; + +export const linksWallets = [metaBrowserwallet, metaMeshwallet, metaAppwallet]; + +export const metaWallets = { + title: "Wallets", + desc: "Wallet for building amazing applications", + link: "/apis/wallets", + icon: WalletIcon, + items: linksWallets, +}; diff --git a/apps/playground/src/data/links-yaci.ts b/apps/playground/src/data/links-yaci.ts new file mode 100644 index 000000000..a151d6331 --- /dev/null +++ b/apps/playground/src/data/links-yaci.ts @@ -0,0 +1,29 @@ +import { MenuItem } from "~/types/menu-item"; + +export const metaYaciGettingStarted = { + title: "Getting Started", + desc: "Set up Yaci Dev Kit and start the devnet", + link: "/yaci/getting-started", +}; +export const metaYaciTransactions = { + title: "Build Transactions", + desc: "Building and submitting transactions on Yaci", + link: "/yaci/transactions", +}; +export const metaYaciProvider = { + title: "Yaci Provider", + desc: "For fetching data and submitting transactions on Yaci", + link: "/providers/yaci", +}; +export const linksYaci: MenuItem[] = [ + metaYaciGettingStarted, + metaYaciTransactions, + metaYaciProvider, +]; + +export const metaYaci: MenuItem = { + title: "Yaci", + desc: "A custom Cardano devnet to tailor your devnet needs with a builtin indexer and custom viewer for devnet", + link: "/yaci", + items: linksYaci, +}; diff --git a/apps/playground/src/data/site.ts b/apps/playground/src/data/site.ts new file mode 100644 index 000000000..9fd78c48d --- /dev/null +++ b/apps/playground/src/data/site.ts @@ -0,0 +1 @@ +export const rootUrl = "https://meshjs.dev"; diff --git a/apps/playground/src/data/social.ts b/apps/playground/src/data/social.ts new file mode 100644 index 000000000..455149680 --- /dev/null +++ b/apps/playground/src/data/social.ts @@ -0,0 +1,21 @@ +import SvgDiscord from "~/components/svgs/discord"; +import SvgGithub from "~/components/svgs/github"; +import SvgTwitter from "~/components/svgs/twitter"; + +export const linkDiscord = { + icon: SvgDiscord, + link: "/go/discord", + redirect: "https://discord.gg/WvnCNqmAxy", +}; +export const linkGithub = { + icon: SvgGithub, + link: "/go/github", + redirect: "https://github.com/MeshJS/mesh", +}; +export const linkTwitter = { + icon: SvgTwitter, + link: "/go/twitter", + redirect: "https://twitter.com/meshsdk", +}; + +export const socials = [linkDiscord, linkTwitter, linkGithub]; diff --git a/apps/mesh-web/hooks/useCopyClipboard.ts b/apps/playground/src/hooks/useCopyClipboard.ts similarity index 99% rename from apps/mesh-web/hooks/useCopyClipboard.ts rename to apps/playground/src/hooks/useCopyClipboard.ts index d055469e4..db91968df 100644 --- a/apps/mesh-web/hooks/useCopyClipboard.ts +++ b/apps/playground/src/hooks/useCopyClipboard.ts @@ -1,5 +1,5 @@ -import copy from "copy-to-clipboard"; import { useCallback, useEffect, useState } from "react"; +import copy from "copy-to-clipboard"; export interface UseClipboardOptions { timeout?: number; @@ -39,4 +39,4 @@ export function useClipboard( }, [timeout, hasCopied]); return { value: text, onCopy, hasCopied }; -} \ No newline at end of file +} diff --git a/apps/playground/src/hooks/useDarkmode.ts b/apps/playground/src/hooks/useDarkmode.ts new file mode 100644 index 000000000..2f4f22680 --- /dev/null +++ b/apps/playground/src/hooks/useDarkmode.ts @@ -0,0 +1,17 @@ +import { persistNSync } from "persist-and-sync"; +import { create } from "zustand"; + +interface State { + isDark: boolean; + setDarkMode: (isDark: boolean) => void; +} + +export const useDarkmode = create( + persistNSync( + (set) => ({ + isDark: false, + setDarkMode: (bool) => set((state) => ({ isDark: bool })), + }), + { name: "mesh-darkmode" }, + ), +); diff --git a/apps/playground/src/hooks/useProviders.ts b/apps/playground/src/hooks/useProviders.ts new file mode 100644 index 000000000..61e51b74d --- /dev/null +++ b/apps/playground/src/hooks/useProviders.ts @@ -0,0 +1,41 @@ +import { persistNSync } from "persist-and-sync"; +import { create } from "zustand"; + +import { KoiosSupportedNetworks } from "@meshsdk/core"; + +interface State { + blockfrostKey: string | undefined; + setBlockfrostKey: (key: string) => void; + maestroKey: + | { network: "Mainnet" | "Preprod" | "Preview"; apiKey: string } + | undefined; + setMaestroKey: ( + network: "Mainnet" | "Preprod" | "Preview", + apiKey: string, + ) => void; + koiosKey: { network: KoiosSupportedNetworks; apiKey: string } | undefined; + setKoiosKey: (network: KoiosSupportedNetworks, apiKey: string) => void; + yaciUrl: string; + setYaciUrl: (url: string) => void; + ogmiosUrl: string; + setOgmiosUrl: (url: string) => void; +} + +export const useProviders = create( + persistNSync( + (set) => ({ + blockfrostKey: undefined, + setBlockfrostKey: (key) => set({ blockfrostKey: key }), + maestroKey: undefined, + setMaestroKey: (network, apiKey) => + set({ maestroKey: { network, apiKey } }), + koiosKey: undefined, + setKoiosKey: (network, apiKey) => set({ koiosKey: { network, apiKey } }), + yaciUrl: "http://localhost:8080/api/v1/", + setYaciUrl: (url) => set({ yaciUrl: url }), + ogmiosUrl: "", + setOgmiosUrl: (url) => set({ ogmiosUrl: url }), + }), + { name: "mesh-providers" }, + ), +); diff --git a/apps/playground/src/pages/404.tsx b/apps/playground/src/pages/404.tsx new file mode 100644 index 000000000..33d0e4dea --- /dev/null +++ b/apps/playground/src/pages/404.tsx @@ -0,0 +1,22 @@ +import type { NextPage } from "next"; + +import Metatags from "~/components/site/metatags"; + +const ReactPage: NextPage = () => { + return ( + <> + +
    +
    +
    +

    + Whoops! This page doesn't exist. +

    +
    +
    +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/_app.tsx b/apps/playground/src/pages/_app.tsx new file mode 100644 index 000000000..fafa091dd --- /dev/null +++ b/apps/playground/src/pages/_app.tsx @@ -0,0 +1,35 @@ +import "~/styles/globals.css"; +import "~/styles/highlight/stackoverflow-dark.css"; +import "@meshsdk/react/styles.css"; + +import type { AppProps } from "next/app"; +import { GoogleTagManager } from "@next/third-parties/google"; + +import { MeshProvider } from "@meshsdk/react"; + +import Footer from "~/components/site/footer"; +import Metatags from "~/components/site/metatags"; +import Navbar from "~/components/site/navbar"; +import Providers from "~/contexts/providers"; + +export default function App({ Component, pageProps }: AppProps) { + ; + + return ( + + + +
    +
    + +
    +
    + +
    +
    + {/* */} +
    +
    +
    + ); +} diff --git a/apps/playground/src/pages/_document.tsx b/apps/playground/src/pages/_document.tsx new file mode 100644 index 000000000..cc11bbf15 --- /dev/null +++ b/apps/playground/src/pages/_document.tsx @@ -0,0 +1,13 @@ +import { Head, Html, Main, NextScript } from "next/document"; + +export default function Document() { + return ( + + + +
    + + + + ); +} diff --git a/apps/playground/src/pages/about/catalyst/index.tsx b/apps/playground/src/pages/about/catalyst/index.tsx new file mode 100644 index 000000000..dd012f87b --- /dev/null +++ b/apps/playground/src/pages/about/catalyst/index.tsx @@ -0,0 +1,126 @@ +import type { NextPage } from "next"; +import Link from "next/link"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import Header3 from "~/components/text/header3"; +import { fund10, fund11, fund12, metaCatalyst } from "~/data/links-catalyst"; + +const ReactPage: NextPage = () => { + return ( + <> + + +
    +
    +
    + + ); +}; + +export default ReactPage; + +function Section({ title, items }: { title: string; items: any[] }) { + return ( +
    +
    + {title} +
    + {items.map((item, index) => ( + + ))} +
    +
    +
    + ); +} + +function CardLink({ + title, + desc, + url, + completed, + tobecompleted, + status, +}: { + title: string; + desc: string; + url?: string; + completed: string[]; + tobecompleted: string[]; + status: string; +}) { + return ( +
    +
    + {title} +
    +
    + + {status} + +
    +

    {desc}

    +
      + {completed.map((item, index) => ( +
    • +
      + + + +
      + {item} +
    • + ))} +
    +
      + {tobecompleted.map((item, index) => ( +
    • +
      + + + +
      + {item} +
    • + ))} +
    + {url && ( +
    + + + projectcatalyst.io + + +
    + )} +
    + ); +} diff --git a/apps/playground/src/pages/about/media-kit.tsx b/apps/playground/src/pages/about/media-kit.tsx new file mode 100644 index 000000000..bd6b8bb35 --- /dev/null +++ b/apps/playground/src/pages/about/media-kit.tsx @@ -0,0 +1,44 @@ +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { metaMediaKit } from "~/data/links-about"; + +export default function Media() { + return ( + <> + + +
    +
    + + + + + + + + + + + + + +
    +
    + + ); +} + +function Image({ img }: { img: string }) { + return ( + <> +
    + + {img} + +
    + + ); +} diff --git a/apps/playground/src/pages/about/support-us/donate-section.tsx b/apps/playground/src/pages/about/support-us/donate-section.tsx new file mode 100644 index 000000000..5931f7e7f --- /dev/null +++ b/apps/playground/src/pages/about/support-us/donate-section.tsx @@ -0,0 +1,89 @@ +import { useState } from "react"; + +import { CardanoWallet, useWallet } from "@meshsdk/react"; + +import { createTransactionDonate } from "~/backend/support"; +import Input from "~/components/form/input"; + +export default function SendPayment() { + const [amount, setAmount] = useState("25"); + const [done, setDone] = useState(false); + const { connected, wallet } = useWallet(); + const [loading, setLoading] = useState(false); + + async function makeTx() { + setLoading(true); + + const network = await wallet.getNetworkId(); + + if (network != 1) { + setLoading(false); + setDone(false); + return; + } + + let _amount = parseInt(amount); + if (_amount < 1) { + setLoading(false); + setDone(false); + return; + } + + const recipientAddress = await wallet.getChangeAddress(); + const utxos = await wallet.getUtxos(); + const { unsignedTx } = await createTransactionDonate( + recipientAddress, + _amount, + utxos, + ); + + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + console.log({ txHash }); + + setLoading(false); + setDone(true); + } + + return ( +
    +
    + {!done && connected ? ( +
    +
    + setAmount(e.target.value)} + placeholder="Amount in ADA" + label="Amount in ADA" + type="number" + /> +
    + +
    + ) : ( + !connected && ( + <> + + + ) + )} + {done && ( + <> + support + + )} +
    +
    + ); +} diff --git a/apps/playground/src/pages/about/support-us/index.tsx b/apps/playground/src/pages/about/support-us/index.tsx new file mode 100644 index 000000000..85c1ec36b --- /dev/null +++ b/apps/playground/src/pages/about/support-us/index.tsx @@ -0,0 +1,86 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import HeroTwoSections from "~/components/sections/hero-two-sections"; +import Metatags from "~/components/site/metatags"; +import SvgSurprise from "~/components/svgs/surpriseSvg"; +import { metaSupportUs } from "~/data/links-about"; +import { linkDiscord, linkGithub, linkTwitter } from "~/data/social"; +import SendPayment from "./donate-section"; + +const ReactPage: NextPage = () => { + let codeBadge = ``; + codeBadge += `import { MeshBadge } from '@meshsdk/react';\n`; + codeBadge += `\n`; + codeBadge += `export default function Page() {\n`; + codeBadge += ` return (\n`; + codeBadge += ` <>\n`; + codeBadge += ` \n`; + codeBadge += ` \n`; + codeBadge += ` );\n`; + codeBadge += `}\n`; + + return ( + <> + + + + + + } + children={} + /> + + + support + support + + } + link={{ label: "Star GitHub repo", href: linkGithub.redirect }} + /> + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/aiken/common.tsx b/apps/playground/src/pages/aiken/common.tsx new file mode 100644 index 000000000..0b719c62d --- /dev/null +++ b/apps/playground/src/pages/aiken/common.tsx @@ -0,0 +1,70 @@ +import { + BrowserWallet, + PlutusScript, + resolveDataHash, + resolvePaymentKeyHash, + resolvePlutusScriptAddress, +} from "@meshsdk/core"; +import { applyParamsToScript } from "@meshsdk/core-csl"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import { linksAiken } from "~/data/links-aiken"; + +export function getPageLinks() { + const sidebarItems = linksAiken.map((link) => ({ + label: link.title, + to: link.link, + })); + return sidebarItems; +} + +export const compiledCode = `58f0010000323232323232323222232325333008323232533300b002100114a06644646600200200644a66602200229404c8c94ccc040cdc78010028a511330040040013014002375c60240026eb0c038c03cc03cc03cc03cc03cc03cc03cc03cc020c008c020014dd71801180400399b8f375c6002600e00a91010d48656c6c6f2c20576f726c6421002300d001149858c94ccc020cdc3a400000226464a66601a601e0042930b1bae300d00130060041630060033253330073370e900000089919299980618070010a4c2c6eb8c030004c01401058c01400c8c014dd5000918019baa0015734aae7555cf2ab9f5742ae89`; + +export async function getWalletAddress(wallet: BrowserWallet) { + const addresses = await wallet.getUsedAddresses(); + const address = addresses[0]; + + if (!address) { + throw new Error("No address found"); + } + + const hash = resolvePaymentKeyHash(address); + return { address, hash }; +} + +export function getScript() { + const scriptCbor = applyParamsToScript(compiledCode, []); + + const script: PlutusScript = { + code: scriptCbor, + version: "V2", + }; + const scriptAddress = resolvePlutusScriptAddress(script, 0); + return { script, scriptAddress }; +} + +export async function getAssetUtxo({ + scriptAddress, + asset, + datum, +}: { + scriptAddress: string; + asset: string; + datum: any; +}) { + const blockchainProvider = getProvider(); + const utxos = await blockchainProvider.fetchAddressUTxOs( + scriptAddress, + asset, + ); + + const dataHash = resolveDataHash(datum); + + let utxo = utxos.find((utxo: any) => { + return utxo.output.dataHash == dataHash; + }); + + return utxo; +} + +export default function Placeholder() {} diff --git a/apps/playground/src/pages/aiken/first-script/build.tsx b/apps/playground/src/pages/aiken/first-script/build.tsx new file mode 100644 index 000000000..c76f9d5de --- /dev/null +++ b/apps/playground/src/pages/aiken/first-script/build.tsx @@ -0,0 +1,35 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function AikenBuildScript() { + return ( + + ); +} + +function Left() { + return ( + <> +

    Let's compile the smart contract with the Aiken CLI:

    + +

    + This command will compile the smart contract and generate the + plutus.json file in the root folder. This file is a{" "} + + CIP-0057 Plutus blueprint + + , blueprint describes your on-chain contract and its binary interface. +

    + + ); +} diff --git a/apps/playground/src/pages/aiken/first-script/index.tsx b/apps/playground/src/pages/aiken/first-script/index.tsx new file mode 100644 index 000000000..44c36c085 --- /dev/null +++ b/apps/playground/src/pages/aiken/first-script/index.tsx @@ -0,0 +1,33 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaAikenFirstScript } from "~/data/links-aiken"; +import { getPageLinks } from "../common"; +import AikenBuildScript from "./build"; +import AikenFirstScript from "./script"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + <> + + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/aiken/first-script/script.tsx b/apps/playground/src/pages/aiken/first-script/script.tsx new file mode 100644 index 000000000..7f8ae3331 --- /dev/null +++ b/apps/playground/src/pages/aiken/first-script/script.tsx @@ -0,0 +1,81 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function AikenFirstScript() { + return ( + + ); +} + +function Left() { + let code1 = ``; + code1 += `use aiken/hash.{Blake2b_224, Hash}\n`; + code1 += `use aiken/list\n`; + code1 += `use aiken/transaction.{ScriptContext}\n`; + code1 += `use aiken/transaction/credential.{VerificationKey}\n`; + code1 += `\n`; + code1 += `type Datum {\n`; + code1 += ` owner: Hash,\n`; + code1 += `}\n`; + code1 += `\n`; + code1 += `type Redeemer {\n`; + code1 += ` msg: ByteArray,\n`; + code1 += `}\n`; + code1 += `\n`; + code1 += `validator {\n`; + code1 += ` fn hello_world(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {\n`; + code1 += ` let must_say_hello =\n`; + code1 += ` redeemer.msg == "Hello, World!"\n`; + code1 += `\n`; + code1 += ` let must_be_signed =\n`; + code1 += ` list.has(context.transaction.extra_signatories, datum.owner)\n`; + code1 += `\n`; + code1 += ` must_say_hello && must_be_signed\n`; + code1 += ` }\n`; + code1 += `}\n`; + + return ( + <> +

    + In this section, we will walk you through the process of writing a + simple smart contract in Aiken. +

    +

    + We will use the Visual Studio Code editor for this tutorial. You can use + any other editor of your choice, but we recommend using Visual Studio + Code for its rich feature set and support for Aiken. +

    +

    First, we create a new Aiken project within this project folder:

    + +

    + Remember to check your Aiken project by running aiken check{" "} + after creating a new project and as you develop the contract. +

    +

    Write the smart contract

    +

    + Let's create file for our validator,{" "} + validators/hello_world.ak: +

    + +

    The validator checks for two conditions:

    +
      +
    • + The redeemer message is Hello, World! +
    • +
    • The transaction is signed by the owner
    • +
    +

    + If both conditions are met, the validator returns true. + Otherwise, it returns false. +

    + + ); +} diff --git a/apps/playground/src/pages/aiken/getting-started/commands.tsx b/apps/playground/src/pages/aiken/getting-started/commands.tsx new file mode 100644 index 000000000..4c9607bf7 --- /dev/null +++ b/apps/playground/src/pages/aiken/getting-started/commands.tsx @@ -0,0 +1,43 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function AikenCommands() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Here are some useful commands you can use to compile and test your + scripts. +

    +
      +
    • + aiken build - compiles the Aiken smart contract and + generates a plutus.json file which contains type + information, params, redeemer, datum, and the compiled code for each + validator of your project and their corresponding hash digests to be + used in addresses +
    • +
    • + aiken check - type-check a project and run tests +
    • +
    • + aiken docs - if you're writing a library, this generate + documentation from you project +
    • +
    • + aiken blueprint - provides utility functions to generate + addresses, apply parameters and convert the build output to various + formats +
    • +
    + + ); +} diff --git a/apps/playground/src/pages/aiken/getting-started/editors.tsx b/apps/playground/src/pages/aiken/getting-started/editors.tsx new file mode 100644 index 000000000..4f9a3e1bd --- /dev/null +++ b/apps/playground/src/pages/aiken/getting-started/editors.tsx @@ -0,0 +1,35 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function AikenEditorintegrations() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Aiken language support for Visual Studio Code is provided by the Aiken + extension. This extension provides syntax highlighting, code snippets, + and error checking for Aiken smart contracts. Download the extension + from the{" "} + + Visual Studio Code Marketplace + {" "} + or search aiken in the extensions tab of Visual Studio + Code. +

    + + ); +} diff --git a/apps/playground/src/pages/aiken/getting-started/index.tsx b/apps/playground/src/pages/aiken/getting-started/index.tsx new file mode 100644 index 000000000..791eac983 --- /dev/null +++ b/apps/playground/src/pages/aiken/getting-started/index.tsx @@ -0,0 +1,35 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaAikenGettingStarted } from "~/data/links-aiken"; +import { getPageLinks } from "../common"; +import AikenCommands from "./commands"; +import AikenEditorintegrations from "./editors"; +import AikenInstallationInstructions from "./install"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + <> + + + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/aiken/getting-started/install.tsx b/apps/playground/src/pages/aiken/getting-started/install.tsx new file mode 100644 index 000000000..e995cd2b3 --- /dev/null +++ b/apps/playground/src/pages/aiken/getting-started/install.tsx @@ -0,0 +1,72 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function AikenInstallationInstructions() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + This section will guide you through the process of setting up your + system compile Aiken smart contracts. You can skip this section if you + have already set up your system or do not wish to compile the contract. +

    +

    Using aikup (on Linux & MacOS only)

    +

    + If you are using Linux or MacOS, you can use the utility tool to + download and manage Aiken's pre-compiled executables. +

    +

    + You can install the Aiken CLI by running the following command in your + terminal: +

    + +

    + After installing the Aiken CLI, you can use the following command to + installs the latest version available. aikup is a + cross-platform utility tool to download and manage Aiken's across + multiple versions and for seamless upgrades. +

    + +

    From sources (all platforms)

    +

    + You will know you have successfully installed Rust and Cargo when you + can run the following commands in your terminal: +

    + +

    + Next, you will need to install the Aiken CLI. You can install the Aiken + CLI by running the following command in your terminal: +

    + +

    Check your installation

    +

    + You will know you have successfully installed the Aiken CLI when you can + run the following command in your terminal: +

    + +

    + If you face any issues, please check the installation instructions on + the{" "} + + Aiken website + {" "} + for more information. +

    + + ); +} diff --git a/apps/playground/src/pages/aiken/index.tsx b/apps/playground/src/pages/aiken/index.tsx new file mode 100644 index 000000000..6ffdfd690 --- /dev/null +++ b/apps/playground/src/pages/aiken/index.tsx @@ -0,0 +1,88 @@ +import type { NextPage } from "next"; +import Link from "next/link"; +import { ChevronRightIcon } from "@heroicons/react/24/solid"; + +import Metatags from "~/components/site/metatags"; +import { linksAiken, metaAiken } from "~/data/links-aiken"; + +const ReactPage: NextPage = () => { + return ( + <> + +
    +
    +
    + Aiken logo + Aiken logo dark +
    + +
    +
    +
    +

    + Overview +

    +

    + Aiken is a functional programming language created for Cardano + smart contract development. It prioritizes on-chain execution + and offers a user-friendly approach for building secure and + efficient smart contracts, making it a valuable choice for + developers aiming to create robust on-chain applications. +

    +
    + +
      + {linksAiken.map((link) => ( +
    • + + + + {link.title} + + +
    • + ))} +
    +
    + +
    + {/*
    +

    + Something +

    +

    + Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio + iste nam cupiditate, eveniet ab possimus quisquam accusantium, + porro, vel temporibus molestiae rerum eaque vitae modi hic! + Commodi ad quis ducimus? +

    +
    + +
    +

    + Something +

    +

    + Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio + iste nam cupiditate, eveniet ab possimus quisquam accusantium, + porro, vel temporibus molestiae rerum eaque vitae modi hic! + Commodi ad quis ducimus? +

    +
    */} +
    +
    +
    +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/aiken/transactions/index.tsx b/apps/playground/src/pages/aiken/transactions/index.tsx new file mode 100644 index 000000000..7cbd46d9c --- /dev/null +++ b/apps/playground/src/pages/aiken/transactions/index.tsx @@ -0,0 +1,33 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaAikenTransactions } from "~/data/links-aiken"; +import { getPageLinks } from "../common"; +import AikenLock from "./lock"; +import AikenRedeem from "./redeem"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + <> + + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/aiken/transactions/lock.tsx b/apps/playground/src/pages/aiken/transactions/lock.tsx new file mode 100644 index 000000000..39aac4927 --- /dev/null +++ b/apps/playground/src/pages/aiken/transactions/lock.tsx @@ -0,0 +1,159 @@ +import Link from "next/link"; + +import { Data, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { getScript, getWalletAddress } from "../common"; + +export default function AikenLock() { + return ( + + ); +} + +function Left() { + let codeGetScript = ``; + codeGetScript += `function getScript() {\n`; + codeGetScript += ` const scriptCbor = applyParamsToScript(compiledCode, []);\n`; + codeGetScript += `\n`; + codeGetScript += ` const script: PlutusScript = {\n`; + codeGetScript += ` code: scriptCbor,\n`; + codeGetScript += ` version: "V2",\n`; + codeGetScript += ` };\n`; + codeGetScript += ` const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; + codeGetScript += ` return { script, scriptAddress };\n`; + codeGetScript += `}\n`; + + let codeGetWallet = ``; + codeGetWallet += `async function getWalletAddress(wallet: BrowserWallet) {\n`; + codeGetWallet += ` const addresses = await wallet.getUsedAddresses();\n`; + codeGetWallet += ` const address = addresses[0];\n`; + codeGetWallet += `\n`; + codeGetWallet += ` if (!address) {\n`; + codeGetWallet += ` throw new Error("No address found");\n`; + codeGetWallet += ` }\n`; + codeGetWallet += `\n`; + codeGetWallet += ` const hash = resolvePaymentKeyHash(address);\n`; + codeGetWallet += ` return { address, hash };\n`; + codeGetWallet += `}\n`; + + let codeDatum = ``; + codeDatum += `const datum: Data = {\n`; + codeDatum += ` alternative: 0,\n`; + codeDatum += ` fields: [hash],\n`; + codeDatum += `};\n`; + + let codeTransaction = ``; + codeTransaction += `const tx = new Transaction({ initiator: wallet });\n`; + codeTransaction += `tx.sendLovelace(\n`; + codeTransaction += ` {\n`; + codeTransaction += ` address: scriptAddress,\n`; + codeTransaction += ` datum: { value: datum },\n`; + codeTransaction += ` },\n`; + codeTransaction += ` "5000000",\n`; + codeTransaction += `);\n`; + codeTransaction += `\n`; + codeTransaction += `const unsignedTx = await tx.build();\n`; + codeTransaction += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + In this section, we will create a simple UI that allows users to lock + assets on the Cardano blockchain. +

    +

    + First, we get initialze the PlutusScript and resolve the + script address: +

    + + +

    + We are using the `resolvePlutusScriptAddress` function to resolve the + script address. +

    +

    + You notice here we use the applyParamsToScript, which apply + parameters to a script allows you to create a custom{" "} + + CIP-57 compliant script + {" "} + based on some inputs. For this script, we don't have any parameters to + apply, but simply applied with double CBOR encoding to{" "} + scriptCbor. +

    +

    Next, we get the wallet address hash:

    {" "} + + +

    + Here, we use the `resolvePaymentKeyHash` function to resolve the payment + key hash of the wallet. +

    +

    + Then, we create the Data (datum) object containing the + address hash: +

    + +

    + Finally, we prepare the transaction to lock the assets on the Cardano + blockchain. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const { scriptAddress } = await getScript(); + + const { hash } = await getWalletAddress(wallet); + + const datum: Data = { + alternative: 0, + fields: [hash], + }; + + const tx = new Transaction({ initiator: wallet }); + tx.sendLovelace( + { + address: scriptAddress, + datum: { value: datum }, + }, + "5000000", + ); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/aiken/transactions/redeem.tsx b/apps/playground/src/pages/aiken/transactions/redeem.tsx new file mode 100644 index 000000000..ca8fe2c14 --- /dev/null +++ b/apps/playground/src/pages/aiken/transactions/redeem.tsx @@ -0,0 +1,175 @@ +import { Data, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { getAssetUtxo, getScript, getWalletAddress } from "../common"; + +export default function AikenRedeem() { + return ( + + ); +} + +function Left() { + let codeDatum = ``; + codeDatum += `const datum: Data = {\n`; + codeDatum += ` alternative: 0,\n`; + codeDatum += ` fields: [hash],\n`; + codeDatum += `};\n`; + + let codeUtxo = ``; + codeUtxo += `async function getAssetUtxo({\n`; + codeUtxo += ` scriptAddress,\n`; + codeUtxo += ` asset,\n`; + codeUtxo += ` datum,\n`; + codeUtxo += `}: {\n`; + codeUtxo += ` scriptAddress: string;\n`; + codeUtxo += ` asset: string;\n`; + codeUtxo += ` datum: any;\n`; + codeUtxo += `}) {\n`; + codeUtxo += ` const blockchainProvider = getProvider();\n`; + codeUtxo += ` const utxos = await blockchainProvider.fetchAddressUTxOs(\n`; + codeUtxo += ` scriptAddress,\n`; + codeUtxo += ` asset,\n`; + codeUtxo += ` );\n`; + codeUtxo += `\n`; + codeUtxo += ` const dataHash = resolveDataHash(datum);\n`; + codeUtxo += `\n`; + codeUtxo += ` let utxo = utxos.find((utxo: any) => {\n`; + codeUtxo += ` return utxo.output.dataHash == dataHash;\n`; + codeUtxo += ` });\n`; + codeUtxo += `\n`; + codeUtxo += ` return utxo;\n`; + codeUtxo += `}\n`; + + let codeUtxo2 = ``; + codeUtxo2 += `const assetUtxo = await getAssetUtxo({\n`; + codeUtxo2 += ` scriptAddress: scriptAddress,\n`; + codeUtxo2 += ` asset: "lovelace",\n`; + codeUtxo2 += ` datum: datum,\n`; + codeUtxo2 += `});\n`; + + let codeTransaction = ``; + codeTransaction += `const redeemer = { data: { alternative: 0, fields: ["Hello, World!"] } };\n`; + codeTransaction += `\n`; + codeTransaction += `const tx = new Transaction({ initiator: wallet })\n`; + codeTransaction += ` .redeemValue({\n`; + codeTransaction += ` value: assetUtxo,\n`; + codeTransaction += ` script: script,\n`; + codeTransaction += ` datum: datum,\n`; + codeTransaction += ` redeemer: redeemer,\n`; + codeTransaction += ` })\n`; + codeTransaction += ` .sendValue(address, assetUtxo)\n`; + codeTransaction += ` .setRequiredSigners([address]);\n`; + codeTransaction += `\n`; + codeTransaction += `const unsignedTx = await tx.build();\n`; + codeTransaction += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + codeTransaction += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + In this section, we will walk you through the process of creating a + transaction to redeem tokens. +

    +

    + First, we need to get the script and script address. We can do this by + calling the function we created in the previous section. +

    + +

    + Next, we need to get the wallet address and its hash. We can do this by + calling the function we created in the previous section. +

    + +

    + As the contracts requires the owner's address in the datum field, we are + creating a new datum with the owner's address. We create the{" "} + Data (datum) object containing the address hash: +

    + +

    After that, we get the UTXO in the script based on the datum:

    + + +

    Finally, we prepare the transaction to redeem the tokens:

    + +

    + Here you notice that in the redeemer. As the validator + requires, here we specify Hello, World!, which is the + message we need to provide to unlock the tokens. +

    +

    + For the transaction, we use the redeemValue function to + redeem the locked assets, the sendValue function to send + the assets to the owner's address, and the{" "} + setRequiredSigners function to set the required signers. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const { script, scriptAddress } = await getScript(); + + const { address, hash } = await getWalletAddress(wallet); + + const datum: Data = { + alternative: 0, + fields: [hash], + }; + + const assetUtxo = await getAssetUtxo({ + scriptAddress: scriptAddress, + asset: "lovelace", + datum: datum, + }); + + if (assetUtxo === undefined) { + throw new Error("No utxo found"); + } + + const redeemer = { data: { alternative: 0, fields: ["Hello, World!"] } }; + + const tx = new Transaction({ initiator: wallet }) + .redeemValue({ + value: assetUtxo, + script: script, + datum: datum, + redeemer: redeemer, + }) + .sendValue(address, assetUtxo) + .setRequiredSigners([address]); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/api/blockfrost/[...slug].ts b/apps/playground/src/pages/api/blockfrost/[...slug].ts new file mode 100644 index 000000000..ea1708cc8 --- /dev/null +++ b/apps/playground/src/pages/api/blockfrost/[...slug].ts @@ -0,0 +1,68 @@ +import type { NextApiRequest, NextApiResponse } from "next"; +import axios from "axios"; + +import { bytesToHex, toBytes } from "@meshsdk/common"; + +export default async function handler( + _req: NextApiRequest, + _res: NextApiResponse, +) { + try { + let { slug } = _req.query; + slug = slug as string[]; + + const network = slug[0]; + let key = process.env.BLOCKFROST_API_KEY_PREPROD; + switch (network) { + case "testnet": + key = process.env.BLOCKFROST_API_KEY_TESTNET; + break; + case "mainnet": + key = process.env.BLOCKFROST_API_KEY_MAINNET; + break; + case "preview": + key = process.env.BLOCKFROST_API_KEY_PREVIEW; + break; + } + + const axiosInstance = axios.create({ + baseURL: `https://cardano-${network}.blockfrost.io/api/v0`, + headers: { project_id: key }, + }); + + /** + * get url from slug + */ + let url = slug?.slice(1).join("/"); + + // get params if exists + let params = _req.query; + delete _req.query["slug"]; + if (Object.keys(params).length > 0) { + url += "?"; + + for (const key in params) { + url += `${key}=${params[key]}&`; + } + } + // end get params if exists + + /** + * call blockfrost api + */ + if (url == "tx/submit") { + const tx = _req.body; + + const headers = { "Content-Type": "application/cbor" }; + const { data, status } = await axiosInstance.post("tx/submit", tx, { + headers, + }); + _res.status(status).json(data); + } else { + const { data, status } = await axiosInstance.get(`${url}`); + _res.status(status).json(data); + } + } catch (error) { + _res.status(500).json(error); + } +} diff --git a/apps/playground/src/pages/api/donate-mint-mesh.ts b/apps/playground/src/pages/api/donate-mint-mesh.ts new file mode 100644 index 000000000..2c3409340 --- /dev/null +++ b/apps/playground/src/pages/api/donate-mint-mesh.ts @@ -0,0 +1,110 @@ +import type { NextApiRequest, NextApiResponse } from "next"; + +import { + BlockfrostProvider, + ForgeScript, + MeshTxBuilder, + MeshWallet, + resolveScriptHash, + stringToHex, +} from "@meshsdk/core"; + +const words = [ + "gratitude", + "recognition", + "thanks", + "gratefulness", + "indebtedness", + "tribute", + "admiration", + "affection", + "awareness", + "commendation", + "knowledge", + "respect", + "acknowledgment", + "appreciativeness", + "thankfulness", + "thanksgiving", + "respect", + "salute", + "honor", + "trust", + "tribute", + "admire", + "commemorate", + "commend", +]; + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse, +) { + try { + const recipientAddress = req.body.recipientAddress; + const utxos = req.body.utxos; + const amount = req.body.amount; + + const blockchainProvider = new BlockfrostProvider( + process.env.BLOCKFROST_API_KEY_MAINNET!, + ); + + const wallet = new MeshWallet({ + networkId: 1, + fetcher: blockchainProvider, + submitter: blockchainProvider, + key: { + type: "root", + bech32: process.env.DONATE_MESHTOKEN_WALLET!, + }, + }); + + const walletAddress = wallet.getUsedAddresses()[0]; + const forgingScript = ForgeScript.withOneSignature(walletAddress!); + + const costLovelace = amount * 1000000; + + const assetMetadata = { + name: "Mesh Token of Appreciation", + image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua", + mediaType: "image/jpg", + description: `Thank you for supporting the development of Mesh SDK.`, + // ["\u20B3"]: `${amount.toString()}`, // this unicode = ₳ + ada: `${amount.toString()}`, + }; + + var dt = new Date(); + var secs = dt.getSeconds() + 60 * dt.getMinutes() + 60 * 60 * dt.getHours(); + let word = words[Math.floor(Math.random() * words.length)]; + word = word!.charAt(0).toUpperCase() + word!.slice(1); + + const policyId = resolveScriptHash(forgingScript); + const assetName = `Mesh${word}Token-${secs}`; + const fullAssetMetadata = { + [policyId]: { + [assetName]: assetMetadata, + }, + }; + + const txBuilder = new MeshTxBuilder({ fetcher: blockchainProvider }); + + const donateAddress = process.env.DONATE_ADA_ADDRESS!; + + const txHex = await txBuilder + .selectUtxosFrom(utxos) + .mint("1", policyId, stringToHex(assetName)) + .mintingScript(forgingScript) + .metadataValue("721", fullAssetMetadata) + .txOut(donateAddress, [ + { unit: "lovelace", quantity: costLovelace.toString() }, + ]) + .changeAddress(recipientAddress) + .complete(); + + const unsignedTx = wallet.signTx(txHex, true); + + res.status(200).json({ unsignedTx }); + } catch (error) { + res.status(500).json({ error: error }); + } +} diff --git a/apps/playground/src/pages/apis/data/index.tsx b/apps/playground/src/pages/apis/data/index.tsx new file mode 100644 index 000000000..32a00ccf5 --- /dev/null +++ b/apps/playground/src/pages/apis/data/index.tsx @@ -0,0 +1,20 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { linksData, metaData } from "~/data/links-data"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/data/json/index.tsx b/apps/playground/src/pages/apis/data/json/index.tsx new file mode 100644 index 000000000..7e5cee96b --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/index.tsx @@ -0,0 +1,72 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaDataJson } from "~/data/links-data"; +import OtherUtils from "./other-utils"; +import UtilsBool from "./utils-bool"; +import UtilsByteString from "./utils-bytestring"; +import UtilsConstructor from "./utils-constructor"; +import UtilsInteger from "./utils-integer"; +import UtilsList from "./utils-list"; +import UtilsMap from "./utils-map"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Utils - Constructors", to: "UtilsConstructor" }, + { label: "Utils - Integer", to: "UtilsInteger" }, + { label: "Utils - ByteString", to: "UtilsByteString" }, + { label: "Utils - Bool", to: "UtilsBool" }, + { label: "Utils - List", to: "UtilsList" }, + { label: "Utils - Map", to: "UtilsMap" }, + { label: "Other Utils", to: "OtherUtils" }, + ]; + + return ( + <> + + + +

    + Mesh offers a full set of utility functions to help constructing the + JSON data you need for your Cardano DApp, with the naming philosophy + similar to Mesh Data type, with extra utilities + mimicing the data type names in PlutusTx and Aiken. +

    +

    Types Support

    +

    + All the utilities are designed to return a type with the same naming + as the utilities function, with capitalizing first letter, you can + build your data in JSON with robust type supports, some examples: +

    +
      +
    • + constr returns Constr type +
    • +
    • + integer returns Integer type +
    • +
    • + byteString returns ByteString type +
    • +
    +
    + + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/data/json/other-utils.tsx b/apps/playground/src/pages/apis/data/json/other-utils.tsx new file mode 100644 index 000000000..5ac8844d4 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/other-utils.tsx @@ -0,0 +1,57 @@ +import { bool } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function OtherUtils() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + The code example showing above does not cover all utilities, please + checkout the hosted documentation for more details. The not covered + utilities are as below: +

    +
      +
    • + assetClass +
    • +
    • + outputReference +
    • +
    • + txOutRef +
    • +
    • + dict +
    • +
    • + tuple +
    • +
    • + maybeStakingHash +
    • +
    • + pubKeyAddress +
    • +
    • + scriptAddress +
    • +
    + + ); +} + +function Right() { + return <>; +} diff --git a/apps/playground/src/pages/apis/data/json/utils-bool.tsx b/apps/playground/src/pages/apis/data/json/utils-bool.tsx new file mode 100644 index 000000000..90e8c07c7 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-bool.tsx @@ -0,0 +1,51 @@ +import { bool } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsBool() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + bool build the boolean object, with parameters: +

    +
      +
    • + b (boolean | boolean) - the boolean to be built +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = bool(true); + return result; + } + + let code = `import { bool } from "@meshsdk/core";\n`; + code += `bool(${true});\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/json/utils-bytestring.tsx b/apps/playground/src/pages/apis/data/json/utils-bytestring.tsx new file mode 100644 index 000000000..0a551bd8a --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-bytestring.tsx @@ -0,0 +1,86 @@ +import { useState } from "react"; + +import { byteString } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsByteString() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + byteString build the byte string object, with parameters: +

    +
      +
    • + bytes (string) - the byte string in hex to be built, validation + would be performed on whether the bytes is a valid hex string +
    • +
    +

    Aliases

    +
      +
    • + builtinByteString - for the same functionality, for + developers more familiar to the PlutusTx naming convention. +
    • +
    • + scriptHash / pubKeyHash /{" "} + policyId / currencySymbol /{" "} + assetName / tokenName - same building the + byte string JSON but with further input validation. +
    • +
    + + ); +} + +function Right() { + const [value, setValue] = useState( + "a0bd47e8938e7c41d4c1d7c22033892319d28f86fdace791d45c51946553791b", + ); + + async function runDemo() { + const result = byteString(value); + return result; + } + + let code = `import { byteString } from "@meshsdk/core";\n`; + code += `byteString("${value}");\n`; + + return ( + <> + + { + setValue(e.target.value); + }} + label="byteString" + key={0} + value={value} + />, + ]} + /> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/json/utils-constructor.tsx b/apps/playground/src/pages/apis/data/json/utils-constructor.tsx new file mode 100644 index 000000000..ce3671257 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-constructor.tsx @@ -0,0 +1,69 @@ +import { conStr } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsConstructors() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + conStr build the constructor object, with parameters: +

    +
      +
    • + constructor (number) - the constructor index +
    • +
    • + fields (any[]) - the constructor fields in array +
    • +
    +

    + There are also some quick utilities only taking in fields as + parameters for 0 - 2 indices: +

    +
      +
    • + conStr0 - building index 0 constructor +
    • +
    • + conStr1 - building index 1 constructor +
    • +
    • + conStr2 - building index 2 constructor +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = conStr(0, []); + return result; + } + + let code = `import { conStr } from "@meshsdk/core";\n`; + code += `conStr(0, []);\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/json/utils-integer.tsx b/apps/playground/src/pages/apis/data/json/utils-integer.tsx new file mode 100644 index 000000000..2d3b917d2 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-integer.tsx @@ -0,0 +1,84 @@ +import { useState } from "react"; + +import { integer } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsInteger() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + integer build the integer object, with parameters: +

    +
      +
    • + int (number | bigint) - the integer to be built +
    • +
    +

    + This utility is compatible for both number and bigint type, which allow + big integer exceeding the JS precision limit. +

    +

    Aliases

    +
      +
    • + posixTime - for the same functionality. +
    • +
    + + ); +} + +function Right() { + const [value, setValue] = useState(1000000); + + async function runDemo() { + const result = integer(value); + return result; + } + + let code = `import { integer } from "@meshsdk/core";\n`; + code += `integer(${value});\n`; + + return ( + <> + + { + try { + setValue(Number(e.target.value)); + } catch { + setValue(0); + } + }} + label="int" + key={0} + value={value} + />, + ]} + /> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/json/utils-list.tsx b/apps/playground/src/pages/apis/data/json/utils-list.tsx new file mode 100644 index 000000000..d8be1c915 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-list.tsx @@ -0,0 +1,68 @@ +import { bool, byteString, integer, list } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsList() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + list build the list object, with parameters: +

    +
      +
    • + pList (T[]) - the list with items to be built. The items in the +
    • +
    • + optional - validation (boolean) - indicate if the current data + construction should perform basic validation of whether it is of type + object (where all JSON data is in type of object) +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = list([ + byteString( + "a0bd47e8938e7c41d4c1d7c22033892319d28f86fdace791d45c51946553791b", + ), + integer(1000000), + bool(false), + ]); + return result; + } + + let code = `import { bool, byteString, integer, list } from "@meshsdk/core";\n`; + code += `list([\n`; + code += ` byteString(\n`; + code += ` "a0bd47e8938e7c41d4c1d7c22033892319d28f86fdace791d45c51946553791b"\n`; + code += ` ),\n`; + code += ` integer(1000000),\n`; + code += ` bool(false),\n`; + code += `]);\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/json/utils-map.tsx b/apps/playground/src/pages/apis/data/json/utils-map.tsx new file mode 100644 index 000000000..acd0dc462 --- /dev/null +++ b/apps/playground/src/pages/apis/data/json/utils-map.tsx @@ -0,0 +1,64 @@ +import { assocMap, byteString, integer } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsMap() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + assocMap build the (associative) map object, with + parameters: +

    +
      +
    • + mapItems - ([KeyType, ValueType][]) - the array of map item in + JS tuple format (array of array). +
    • +
    • + optional - validation (boolean) - indicate if the current data + construction should perform basic validation of whether it is of type + object (where all JSON data is in type of object) +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = assocMap([ + [byteString("aa"), integer(1000000)], + [byteString("bb"), integer(2000000)], + ]); + return result; + } + + let code = `import { assocMap, byteString, integer } from "@meshsdk/core";\n`; + code += `assocMap([\n`; + code += ` [byteString("aa"), integer(1000000)],\n`; + code += ` [byteString("bb"), integer(2000000)],\n`; + code += `]);\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/mesh/index.tsx b/apps/playground/src/pages/apis/data/mesh/index.tsx new file mode 100644 index 000000000..050a9ba63 --- /dev/null +++ b/apps/playground/src/pages/apis/data/mesh/index.tsx @@ -0,0 +1,58 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaDataMesh } from "~/data/links-data"; +import OtherUtils from "./other-utils"; +import UtilsConstructor from "./utils-constructor"; +import UtilsPrimitives from "./utils-primitives"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Utils - Constructors", to: "UtilsConstructor" }, + { label: "Utils - Primitives", to: "UtilsPrimitives" }, + { label: "Other Utils", to: "OtherUtils" }, + ]; + + return ( + <> + + + +

    + Mesh provides a full set of utility functions to help constructing + the Mesh Data + type you need for your Cardano DApp. +

    +

    Types Support

    +

    + All utility functions start with the prefix of m and all + types All the utility functions start with the prefix of m, + and are designed to return a type with the same naming as the + utilities function, with capitalizing first letter, you can build + your data with type supports in complex types, some examples: +

    +
      +
    • + mConstr returns MConstr type +
    • +
    • + mBool returns MBool type +
    • +
    +
    + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/data/mesh/other-utils.tsx b/apps/playground/src/pages/apis/data/mesh/other-utils.tsx new file mode 100644 index 000000000..495370bda --- /dev/null +++ b/apps/playground/src/pages/apis/data/mesh/other-utils.tsx @@ -0,0 +1,54 @@ +import { bool } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function OtherUtils() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + The code example showing above does not cover all utilities, please + checkout the hosted documentation for more details. The not covered + utilities are as below: +

    +
      +
    • + mAssetClass +
    • +
    • + mOutputReference +
    • +
    • + mTxOutRef +
    • +
    • + mTuple +
    • +
    • + mMaybeStakingHash +
    • +
    • + mPubKeyAddress +
    • +
    • + mScriptAddress +
    • +
    + + ); +} + +function Right() { + return <>; +} diff --git a/apps/playground/src/pages/apis/data/mesh/utils-constructor.tsx b/apps/playground/src/pages/apis/data/mesh/utils-constructor.tsx new file mode 100644 index 000000000..ef5f568fb --- /dev/null +++ b/apps/playground/src/pages/apis/data/mesh/utils-constructor.tsx @@ -0,0 +1,70 @@ +import { mConStr } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsConstructors() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + mConStr build the constructor object in Mesh{" "} + Data type, with parameters: +

    +
      +
    • + alternative (number) - the constructor index +
    • +
    • + fields (any[]) - the constructor fields in array +
    • +
    +

    + There are also some quick utilities only taking in fields as + parameters for 0 - 2 indices: +

    +
      +
    • + mConStr0 - building index 0 constructor +
    • +
    • + mConStr1 - building index 1 constructor +
    • +
    • + mConStr2 - building index 2 constructor +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = mConStr(0, []); + return result; + } + + let code = `import { mConStr } from "@meshsdk/core";\n`; + code += `mConStr(0, []);\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/mesh/utils-primitives.tsx b/apps/playground/src/pages/apis/data/mesh/utils-primitives.tsx new file mode 100644 index 000000000..e11efa29e --- /dev/null +++ b/apps/playground/src/pages/apis/data/mesh/utils-primitives.tsx @@ -0,0 +1,69 @@ +import { mBool } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function UtilsPrimitives() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + mBool build the boolean object in , with parameters: +

    +
      +
    • + b (boolean | boolean) - the boolean to be built +
    • +
    +

    + For the rest of Cardano data primitives, they are represented by JS + primitives: +

    +
      +
    • + Integer - number and bigint +
    • +
    • + Byte string - string +
    • +
    • + List - JS Array +
    • +
    • + Map - JS Map +
    • +
    + + ); +} + +function Right() { + async function runDemo() { + const result = mBool(true); + return result; + } + + let code = `import { mBool } from "@meshsdk/core";\n`; + code += `mBool(${true});\n`; + + return ( + <> + + + ); +} diff --git a/apps/playground/src/pages/apis/data/overview/cbor-plutus-data.tsx b/apps/playground/src/pages/apis/data/overview/cbor-plutus-data.tsx new file mode 100644 index 000000000..eded4656e --- /dev/null +++ b/apps/playground/src/pages/apis/data/overview/cbor-plutus-data.tsx @@ -0,0 +1,35 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function CBORPlutusData() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + CBOR is the lowest level representation of data in Cardano. Mesh + provides endpoints to allow users to provide CBOR in providing data, + which is the case for developers utilizing other serialization package + other than mesh in part the application. +

    + + ); +} + +function Right() { + return ( + <> + {/* + + */} + + ); +} diff --git a/apps/playground/src/pages/apis/data/overview/index.tsx b/apps/playground/src/pages/apis/data/overview/index.tsx new file mode 100644 index 000000000..94fd23861 --- /dev/null +++ b/apps/playground/src/pages/apis/data/overview/index.tsx @@ -0,0 +1,43 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaOverview } from "~/data/links-data"; +import CBORPlutusData from "./cbor-plutus-data"; +import JSONPlutusData from "./json-plutus-data"; +import MeshPlutusData from "./mesh-plutus-data"; +import PlutusDataIntro from "./plutus-data-intro"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Introduction", to: "PlutusDataIntro" }, + { label: "Mesh Types", to: "MeshPlutusData" }, + { label: "JSON Types", to: "JSONPlutusData" }, + { label: "CBOR", to: "CBORPlutusData" }, + ]; + + return ( + <> + + + +

    + Parsing and converting data in Plutus is a common task when working + with transactions. This page will show you how to do that. +

    +
    + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/data/overview/json-plutus-data.tsx b/apps/playground/src/pages/apis/data/overview/json-plutus-data.tsx new file mode 100644 index 000000000..d776a84f2 --- /dev/null +++ b/apps/playground/src/pages/apis/data/overview/json-plutus-data.tsx @@ -0,0 +1,40 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function JSONPlutusData() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + All Cardano data has the JSON representation, which is suitable for + building DApp which needs frequent back and forth conversion between + on-chain and off-chain code. Mesh also supports building data in JSON + format with strong input validation support. +

    + + + + + ); +} + +function Right() { + return ( + <> + {/* + + */} + + ); +} diff --git a/apps/playground/src/pages/apis/data/overview/mesh-plutus-data.tsx b/apps/playground/src/pages/apis/data/overview/mesh-plutus-data.tsx new file mode 100644 index 000000000..d9d190feb --- /dev/null +++ b/apps/playground/src/pages/apis/data/overview/mesh-plutus-data.tsx @@ -0,0 +1,39 @@ +import React from "react"; +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function MeshPlutusData() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Mesh Data type is best used when you want to quickly and + easily compose your data types. +

    + + + + + ); +} + +function Right() { + return ( + <> + {/* + + */} + + ); +} diff --git a/apps/playground/src/pages/apis/data/overview/plutus-data-intro.tsx b/apps/playground/src/pages/apis/data/overview/plutus-data-intro.tsx new file mode 100644 index 000000000..64936cc89 --- /dev/null +++ b/apps/playground/src/pages/apis/data/overview/plutus-data-intro.tsx @@ -0,0 +1,54 @@ +import React from "react"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function PlutusDataIntro() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Cardano data and information is usually communicated in{" "} + CBOR encoding format, which can be decoded into{" "} + JSON representation. +

    +

    + On top of the 2, Mesh also provides the Data type which get + rids of unnecessary wrappers. +

    +

    + Mesh supports building data for your DApp in all 3 different formats.{" "} +

    +
    +
  • + Mesh - the Data type +
  • +
  • + JSON{" "} +
  • +
  • + CBOR{" "} +
  • +
    + + ); +} + +function Right() { + return ( + <> + {/* + + */} + + ); +} diff --git a/apps/playground/src/pages/apis/data/utils/assets-to-plutus-value.tsx b/apps/playground/src/pages/apis/data/utils/assets-to-plutus-value.tsx new file mode 100644 index 000000000..5b67b31da --- /dev/null +++ b/apps/playground/src/pages/apis/data/utils/assets-to-plutus-value.tsx @@ -0,0 +1,143 @@ +import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function DataAssetsToPlutusValue() { + return ( + + ); +} + +function Left() { + return ( + <> +

    Converting a list of assets to Plutus Value.

    +

    + value() converts a list of assets into a Plutus Value. The + function accepts the following parameters: +

    +
      +
    • + assets (Asset[]) - the list of assets to be converted +
    • +
    +

    + The list of assets will be converted into a Plutus Value. The Plutus + Value can be used in transactions building. +

    + + ); +} + +function Right() { + return ( + <> + + + + + ); +} + +function ADAValue() { + async function runDemo() { + const val: Asset[] = [{ unit: "lovelace", quantity: "1000000" }]; + const plutusValue: Value = value(val); + return plutusValue; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + code += `const val: Asset[] = [{ unit: "lovelace", quantity: "1000000" }];\n\n`; + code += `const plutusValue: Value = value(val);\n`; + + return ( + + ); +} + +function TokenValue() { + async function runDemo() { + const val: Asset[] = [ + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461", + quantity: "345", + }, + ]; + const plutusValue: Value = value(val); + return plutusValue; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + + code += `const val: Asset[] = [\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461",\n`; + code += ` quantity: "345",\n`; + code += ` },\n`; + code += `];\n\n`; + + code += `const plutusValue: Value = value(val);\n`; + + return ( + + ); +} + +function MultipleValue() { + async function runDemo() { + const val: Asset[] = [ + { unit: "lovelace", quantity: "1000000" }, + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc817001234", + quantity: "567", + }, + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461", + quantity: "345", + }, + ]; + const plutusValue: Value = value(val); + return plutusValue; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + + code += `const val: Asset[] = [\n`; + code += ` { unit: "lovelace", quantity: "1000000" },\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc817001234",\n`; + code += ` quantity: "567",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461",\n`; + code += ` quantity: "345",\n`; + code += ` },\n`; + code += `];\n\n`; + + code += `const plutusValue: Value = value(val);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/data/utils/index.tsx b/apps/playground/src/pages/apis/data/utils/index.tsx new file mode 100644 index 000000000..57df7d4ab --- /dev/null +++ b/apps/playground/src/pages/apis/data/utils/index.tsx @@ -0,0 +1,65 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaDataUtils } from "~/data/links-data"; +import DataAssetsToPlutusValue from "./assets-to-plutus-value"; +import DataPlutusPlutusArrayString from "./plutus-array-to-string"; +import DataPlutusValueToAssets from "./plutus-value-to-assets"; +import DataPlutusStringPlutusArray from "./string-to-plutus-array"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "String to Plutus Array", to: "DataPlutusStringPlutusArray" }, + { label: "Plutus Array to String", to: "DataPlutusPlutusArrayString" }, + { label: "Assets to Plutus Value", to: "DataAssetsToPlutusValue" }, + { label: "Plutus Value to Assets", to: "DataPlutusValueToAssets" }, + ]; + + return ( + <> + + + +

    + Mesh offers a full set of utility functions to help constructing the + JSON data you need for your Cardano DApp, with the naming philosophy + similar to Mesh Data type, with extra utilities + mimicing the data type names in PlutusTx and Aiken. + The code example showing below does not cover all utilities, please + checkout the hosted documentation for more details. +

    +

    Types Support

    +

    + All the utilities are designed to return a type with the same naming + as the utilities function, with capitalizing first letter, you can + build your data in JSON with robust type supports, some examples: +

    +
      +
    • + constr returns Constr type +
    • +
    • + integer returns Integer type +
    • +
    • + byteString returns ByteString type +
    • +
    +
    + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/data/utils/plutus-array-to-string.tsx b/apps/playground/src/pages/apis/data/utils/plutus-array-to-string.tsx new file mode 100644 index 000000000..2d71f076a --- /dev/null +++ b/apps/playground/src/pages/apis/data/utils/plutus-array-to-string.tsx @@ -0,0 +1,102 @@ +import { BuiltinByteString, List, plutusBSArrayToString } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function DataPlutusPlutusArrayString() { + return ( + + ); +} + +function Left() { + return ( + <> +

    Converting BuiltinByteString Array into a hex string.

    +

    + plutusBSArrayToString() converts a BuiltinByteString Array + into a hex string. The function accepts the following parameters: +

    +
      +
    • + bsArray (List BuiltinByteString) - the BuiltinByteString Array +
    • +
    +

    + The BuiltinByteString Array will be joined into a single hex string. +

    + + ); +} + +function Right() { + async function runDemo() { + const testList: List = { + list: [ + { + bytes: + "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374", + }, + { + bytes: + "696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbd", + }, + { + bytes: + "d3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b19", + }, + { + bytes: + "1be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e6577", + }, + { + bytes: "77616c2e616461", + }, + ], + }; + + const result = plutusBSArrayToString(testList); + return result; + } + + let code = `import { BuiltinByteString, List, plutusBSArrayToString } from "@meshsdk/core";\n\n`; + code += `const testList: List = {\n`; + code += ` list: [\n`; + code += ` {\n`; + code += ` bytes:\n`; + code += ` "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` bytes:\n`; + code += ` "696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbd",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` bytes:\n`; + code += ` "d3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b19",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` bytes:\n`; + code += ` "1be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e6577",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` bytes: "77616c2e616461",\n`; + code += ` },\n`; + code += ` ],\n`; + code += `};\n`; + code += `\n`; + code += `plutusBSArrayToString(testList);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/data/utils/plutus-value-to-assets.tsx b/apps/playground/src/pages/apis/data/utils/plutus-value-to-assets.tsx new file mode 100644 index 000000000..4e4c2f4a2 --- /dev/null +++ b/apps/playground/src/pages/apis/data/utils/plutus-value-to-assets.tsx @@ -0,0 +1,146 @@ +import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function DataPlutusValueToAssets() { + return ( + + ); +} + +function Left() { + return ( + <> +

    Converting a Plutus Value into a list of assets.

    +

    + parsePlutusValueToAssets() converts a Plutus Value into a + list of assets. The function accepts the following parameters: +

    +
      +
    • + value (Value) - the Plutus Value to be converted +
    • +
    +

    The Plutus Value will be converted into a list of assets.

    + + ); +} + +function Right() { + return ( + <> + + + + + ); +} + +function ADAValue() { + async function runDemo() { + const val: Asset[] = [{ unit: "lovelace", quantity: "1000000" }]; + const plutusValue: Value = value(val); + const assets: Asset[] = parsePlutusValueToAssets(plutusValue); + return assets; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + code += `const val: Asset[] = [{ unit: "lovelace", quantity: "1000000" }];\n\n`; + code += `const plutusValue: Value = value(val);\n`; + code += `parsePlutusValueToAssets(plutusValue);\n`; + + return ( + + ); +} + +function TokenValue() { + async function runDemo() { + const val: Asset[] = [ + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461", + quantity: "345", + }, + ]; + const plutusValue: Value = value(val); + const assets: Asset[] = parsePlutusValueToAssets(plutusValue); + return assets; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + + code += `const val: Asset[] = [\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461",\n`; + code += ` quantity: "345",\n`; + code += ` },\n`; + code += `];\n\n`; + + code += `const plutusValue: Value = value(val);\n`; + code += `parsePlutusValueToAssets(plutusValue);\n`; + + return ( + + ); +} + +function MultipleValue() { + async function runDemo() { + const val: Asset[] = [ + { unit: "lovelace", quantity: "1000000" }, + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc817001234", + quantity: "567", + }, + { + unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461", + quantity: "345", + }, + ]; + const plutusValue: Value = value(val); + const assets: Asset[] = parsePlutusValueToAssets(plutusValue); + return assets; + } + + let code = `import { Asset, parsePlutusValueToAssets, value, Value } from "@meshsdk/core";\n\n`; + + code += `const val: Asset[] = [\n`; + code += ` { unit: "lovelace", quantity: "1000000" },\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc817001234",\n`; + code += ` quantity: "567",\n`; + code += ` },\n`; + code += ` {\n`; + code += ` unit: "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461",\n`; + code += ` quantity: "345",\n`; + code += ` },\n`; + code += `];\n\n`; + + code += `const plutusValue: Value = value(val);\n`; + code += `parsePlutusValueToAssets(plutusValue);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/data/utils/string-to-plutus-array.tsx b/apps/playground/src/pages/apis/data/utils/string-to-plutus-array.tsx new file mode 100644 index 000000000..f98a10e6a --- /dev/null +++ b/apps/playground/src/pages/apis/data/utils/string-to-plutus-array.tsx @@ -0,0 +1,63 @@ +import { stringToBSArray } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function DataPlutusStringPlutusArray() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converting a hex string into a BuiltinByteString Array, with max 32 + bytes on each items. +

    +

    + stringToPlutusBSArray() converts a hex string into a + BuiltinByteString Array. The function accepts the following parameters: +

    +
      +
    • + hexString (string) - the hex string to be converted +
    • +
    +

    + The hex string will be split into multiple BuiltinByteString items, with + a maximum of 32 bytes on each item +

    + + ); +} + +function Right() { + async function runDemo() { + const testString = + "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461"; + + const result = stringToBSArray(testString); + return result; + } + + let code = `import { stringToPlutusBSArray } from "@meshsdk/core";\n\n`; + code += `const testString =\n`; + code += ` "baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461baefdc6c5b191be372a794cd8d40d839ec0dbdd3c28957267dc8170074657374696e676e657777616c2e616461";\n`; + code += `stringToPlutusBSArray(testString);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/index.tsx b/apps/playground/src/pages/apis/index.tsx new file mode 100644 index 000000000..7abb15bbb --- /dev/null +++ b/apps/playground/src/pages/apis/index.tsx @@ -0,0 +1,23 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { linksApi } from "~/data/links-api"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/basics/begin.tsx b/apps/playground/src/pages/apis/transaction/basics/begin.tsx new file mode 100644 index 000000000..21791aede --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/begin.tsx @@ -0,0 +1,109 @@ +import { useState } from "react"; + +import { BeginProvider, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionBegin() { + return ( + + ); +} + +function Left() { + let example = ``; + example += `const provider = new BeginProvider();\n`; + example += `const beginId = await provider.resolveAddress('mesh');\n`; + example += `const address = beginId.address;\n\n`; + example += `const tx = new Transaction({ initiator: wallet });\n`; + example += `tx.sendLovelace(address, '1000000');\n`; + + return ( + <> +

    + Send assets to a Begin ID. Initialize BeginProvider and + fetch the address. +

    +

    Must be a valid name on the mainnet.

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [handle, setHandle] = useState("mesh"); + const [amount, setAmount] = useState("1000000"); + + async function runDemo() { + const provider = new BeginProvider(); + const beginId = await provider.resolveAddress(handle); + const address = beginId.address; + + const tx = new Transaction({ initiator: wallet }); + tx.sendLovelace(address, amount); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { BeginProvider, Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const provider = new BeginProvider();\n`; + codeSnippet += `const beginId = await provider.resolveAddress('${handle}');\n`; + codeSnippet += `const address = beginId.address;\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.sendLovelace(address, '${amount}');\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setHandle(e.target.value)} + placeholder="Begin ID" + label="Begin ID" + key={0} + />, + setAmount(e.target.value)} + placeholder="Lovelace amount" + label="Lovelace amount" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/cip20.tsx b/apps/playground/src/pages/apis/transaction/basics/cip20.tsx new file mode 100644 index 000000000..894bcde2e --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/cip20.tsx @@ -0,0 +1,108 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Textarea from "~/components/form/textarea"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionCip20() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Add messages/comments/memos as transaction metadata. This is useful for + attaching additional information to a transaction. +

    + +

    + The specification for the individual strings follow the general design + specification for JSON metadata, which is already implemented and in + operation on the cardano blockchain. The used metadatum label is{" "} + 674:, this number was choosen because it is the T9 encoding + of the string + msg. The message content has the key msg: and + consists of an array of individual message-strings. The number of theses + message-strings must be at least one for a single message, more for + multiple messages/lines. Each of theses individual message-strings array + entries must be at most 64 bytes when UTF-8 encoded. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [message, setMessage] = useState( + "Invoice-No: 1234567890\nCustomer-No: 555-1234", + ); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }); + tx.setMetadata(674, { + msg: message.split("\n"), + }); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.setMetadata(674, {\n`; + codeSnippet += ` msg: [\n`; + for (let line of message.split("\n")) { + codeSnippet += ` '${line}',\n`; + } + codeSnippet += ` ],\n`; + codeSnippet += `});\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setMessage(e.target.value)} + label="Message (breakline for new line)" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/coin-selection.tsx b/apps/playground/src/pages/apis/transaction/basics/coin-selection.tsx new file mode 100644 index 000000000..0a11e9867 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/coin-selection.tsx @@ -0,0 +1,317 @@ +import { useState } from "react"; + +import { + keepRelevant, + largestFirst, + largestFirstMultiAsset, + Quantity, + Unit, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset } from "~/data/cardano"; + +export default function TransactionCoinSelection() { + return ( + + ); +} + +function Left() { + let codeSnippet1 = `import { largestFirst } from '@meshsdk/core';\n\n`; + codeSnippet1 += `const utxos = await wallet.getUtxos();\n\n`; + codeSnippet1 += `const costLovelace = '10000000';\n`; + codeSnippet1 += `const selectedUtxos = largestFirst(costLovelace, utxos, true);`; + + let codeSnippet2 = `import { largestFirstMultiAsset } from '@meshsdk/core';\n`; + codeSnippet2 += `import type { Unit, Quantity } from '@meshsdk/core';\n\n`; + codeSnippet2 += `const utxos = await wallet.getUtxos();\n\n`; + codeSnippet2 += `const assetMap = new Map();\n`; + codeSnippet2 += `assetMap.set(\n`; + codeSnippet2 += ` '${demoAsset}',\n`; + codeSnippet2 += ` '1'\n`; + codeSnippet2 += `);\n`; + codeSnippet2 += `// if you need to include lovelace\n`; + codeSnippet2 += `assetMap.set(\n`; + codeSnippet2 += ` 'lovelace',\n`; + codeSnippet2 += ` '10000000'\n`; + codeSnippet2 += `);\n`; + codeSnippet2 += `// if you need to include more than 1 native asset\n`; + codeSnippet2 += `assetMap.set(\n`; + codeSnippet2 += ` 'another asset unit',\n`; + codeSnippet2 += ` '1'\n`; + codeSnippet2 += `);\n\n`; + codeSnippet2 += `const selectedUtxos = largestFirstMultiAsset(assetMap, utxos, true);`; + + let code3 = ``; + code3 += `largestFirst = (\n`; + code3 += ` lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees = false,\n`; + code3 += ` { maxTxSize, minFeeA, minFeeB } = DEFAULT_PROTOCOL_PARAMETERS,\n`; + code3 += `): UTxO[]`; + let code4 = ``; + code4 += `largestFirstMultiAsset = (\n`; + code4 += ` requestedOutputSet: Map, initialUTxOSet: UTxO[],\n`; + code4 += ` includeTxFees = false, parameters = DEFAULT_PROTOCOL_PARAMETERS,\n`; + code4 += `): UTxO[]\n`; + + let codeKeepRelevant = ``; + codeKeepRelevant += `import { keepRelevant } from '@meshsdk/core';\n`; + codeKeepRelevant += `import type { Unit, Quantity } from '@meshsdk/core';\n`; + codeKeepRelevant += `\n`; + codeKeepRelevant += `const utxos = await wallet.getUtxos();\n\n`; + codeKeepRelevant += `const assetMap = new Map();\n`; + codeKeepRelevant += `assetMap.set(\n`; + codeKeepRelevant += ` '${demoAsset}',\n`; + codeKeepRelevant += ` '1'\n`; + codeKeepRelevant += `);\n`; + codeKeepRelevant += `// if you need to include lovelace\n`; + codeKeepRelevant += `assetMap.set(\n`; + codeKeepRelevant += ` 'lovelace',\n`; + codeKeepRelevant += ` '10000000'\n`; + codeKeepRelevant += `);\n\n`; + codeKeepRelevant += `const selectedUtxos = keepRelevant(assetMap, utxos);\n`; + + let codeKeepRelevantDesc = ``; + codeKeepRelevantDesc += `keepRelevant = (\n`; + codeKeepRelevantDesc += ` requestedOutputSet: Map,\n`; + codeKeepRelevantDesc += ` initialUTxOSet: UTxO[],\n`; + codeKeepRelevantDesc += ` minimumLovelaceRequired = '5000000',\n`; + codeKeepRelevantDesc += `);\n`; + + return ( + <> +

    There are currently three coin selection algorithms available:

    +
      +
    • Keep Relevant
    • +
    • Largest First
    • +
    • Largest First Multi-Asset
    • +
    + +

    Keep Relevant

    +

    + keepRelevant is a two-step coin selection algorithm. First, + given a Map (of requested assets and respective quantities) and a set of + UTxOs, it tries to eliminate the irrelevant UTxOs from the set. Next, it + checks that this UTxO set includes enough lovelace to cover all/any + multi-assets in the set. If the set does not include enough lovelace, + then it will try to also pick up another UTxO from the wallet, + containing the largest amount of lovelace. +

    + +

    + Here is an example how you can use keepRelevant(): +

    + + +

    Largest First

    +

    + To select UTXOs for transaction that only requires lovelace, use{" "} + largestFirst. +

    + +

    For example, selecting the UTXOs for sending 10000000 lovelace:

    + + +

    Largest First Multi-Asset

    +

    + largestFirstMultiAsset allows you to define which native + assets you require for sending out by defining a Map. The + Map is matches the Unit with the quantity of each asset. +

    + +

    + Note that if lovelace, aside from the "minimum Ada" which in any case + needs to accompany the other assets, this must be explicitly specified. + This can also be useful in the case that your transaction only{" "} + requires transfer of lovelace. In this case, the algorithm will exclude + all multiasset UTxOs from the selection, which can result in more + efficient selection of the required UTxOs. +

    + +

    + The third parameter is includeTxFees. If True, + Mesh will calculate the fees required for the transaction, and include + additional UTxOs to necessary to fulfill the fees requirements. +

    + + ); +} + +function Right() { + return ( + <> + + + + + ); +} + +function DemoLargestFirst() { + const { wallet, connected } = useWallet(); + const [amount, setAmount] = useState("15000000"); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const selectedUtxos = largestFirst(amount, utxos, true); + return selectedUtxos; + } + + let code = ``; + code += `const utxos = await wallet.getUtxos();\n`; + code += `const selectedUtxos = largestFirst('${amount}', utxos, true);\n`; + + return ( + + setAmount(e.target.value)} + placeholder="Lovelace Amount" + label="Lovelace Amount" + key={0} + />, + ]} + /> + + ); +} + +function DemoLargestFirstMultiAsset() { + const { wallet, connected } = useWallet(); + const [amount, setAmount] = useState("15000000"); + const [asset, setAsset] = useState(demoAsset); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + + const assetMap = new Map(); + assetMap.set("lovelace", amount); + assetMap.set(asset, "1"); + + const selectedUtxos = largestFirstMultiAsset(assetMap, utxos, true); + return selectedUtxos; + } + + let code = ``; + code += `const utxos = await wallet.getUtxos();\n`; + code += `\n`; + code += `const assetMap = new Map();\n`; + code += `assetMap.set("lovelace", '${amount}');\n`; + code += `assetMap.set('${asset}', "1");\n`; + code += `\n`; + code += `const selectedUtxos = largestFirstMultiAsset(assetMap, utxos, true);\n`; + + return ( + + setAmount(e.target.value)} + placeholder="Lovelace Amount" + label="Lovelace Amount" + key={0} + />, + setAsset(e.target.value)} + placeholder="Asset" + label="Asset" + key={1} + />, + ]} + /> + + ); +} + +function DemoKeepRelevant() { + const { wallet, connected } = useWallet(); + const [amount, setAmount] = useState("15000000"); + const [asset, setAsset] = useState(demoAsset); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + + const assetMap = new Map(); + assetMap.set("lovelace", amount); + assetMap.set(asset, "1"); + + const selectedUtxos = keepRelevant(assetMap, utxos); + return selectedUtxos; + } + + let code = ``; + code += `const utxos = await wallet.getUtxos();\n`; + code += `\n`; + code += `const assetMap = new Map();\n`; + code += `assetMap.set("lovelace", '${amount}');\n`; + code += `assetMap.set('${asset}', "1");\n`; + code += `\n`; + code += `const selectedUtxos = keepRelevant(assetMap, utxos);\n`; + + return ( + + setAmount(e.target.value)} + placeholder="Lovelace Amount" + label="Lovelace Amount" + key={0} + />, + setAsset(e.target.value)} + placeholder="Asset" + label="Asset" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/handle.tsx b/apps/playground/src/pages/apis/transaction/basics/handle.tsx new file mode 100644 index 000000000..28d37bcb3 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/handle.tsx @@ -0,0 +1,107 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionHandle() { + return ( + + ); +} + +function Left() { + let example = ``; + example += `const blockchainprovider = new BlockfrostProvider('API_KEY_HERE');\n`; + example += `const address = await blockchainprovider.fetchHandleAddress('mesh');\n\n`; + example += `const tx = new Transaction({ initiator: wallet });\n`; + example += `tx.sendLovelace(address, '1000000');\n`; + + return ( + <> +

    + Send assets to a handle. Initialize a provider and fetch the address of + a handle. +

    +

    The handle should be a valid handle on the mainnet.

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [handle, setHandle] = useState("mesh"); + const [amount, setAmount] = useState("1000000"); + + async function runDemo() { + const blockchainprovider = getProvider("mainnet"); + const address = await blockchainprovider.fetchHandleAddress(handle); + + const tx = new Transaction({ initiator: wallet }); + tx.sendLovelace(address, amount); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { BlockfrostProvider, Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const blockchainprovider = new BlockfrostProvider('API_KEY_HERE');\n`; + codeSnippet += `const address = await blockchainprovider.fetchHandleAddress('${handle}');\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.sendLovelace(address, '${amount}');\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setHandle(e.target.value)} + placeholder="Handle" + label="Handle" + key={0} + />, + setAmount(e.target.value)} + placeholder="Lovelace amount" + label="Lovelace amount" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/index.tsx b/apps/playground/src/pages/apis/transaction/basics/index.tsx new file mode 100644 index 000000000..b4aa41938 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/index.tsx @@ -0,0 +1,84 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import Codeblock from "~/components/text/codeblock"; +import { metaTransactionBasic } from "~/data/links-transactions"; +import { Intro } from "../common"; +import TransactionBegin from "./begin"; +import TransactionCip20 from "./cip20"; +import TransactionCoinSelection from "./coin-selection"; +import TransactionHandle from "./handle"; +import TransactionSendAssets from "./send-assets"; +import TransactionSendLovelace from "./send-lovelace"; +import TransactionSendValue from "./send-value"; +import TransactionSetCollateral from "./set-collateral"; +import TransactionSetMetadata from "./set-metadata"; +import TransactionSetRequiredSigners from "./set-required-signers"; +import TransactionSetTime from "./set-time"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Send lovelace", to: "sendLovelace" }, + { label: "Send assets", to: "sendAssets" }, + { label: "Send value", to: "sendValue" }, + + { label: "Send assets to Handle", to: "handler" }, + { label: "Send assets to Begin ID", to: "begin" }, + + { label: "Coin selection", to: "coinSelection" }, + + { label: "Set metadata", to: "metadata" }, + { label: "Set transaction message", to: "cip20" }, + + { label: "Set collateral", to: "collateral" }, + { label: "Set required signers", to: "requiredSigners" }, + + { label: "Set time", to: "setTime" }, + ]; + + return ( + <> + + + +

    + Transactions are used to send assets from one wallet to another and + to smart contracts. +

    + +

    + In this page, you will find the APIs to create transactions for + sending assets and various options to customize the transaction. +

    +
    + + + + + + + + + + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/basics/send-assets.tsx b/apps/playground/src/pages/apis/transaction/basics/send-assets.tsx new file mode 100644 index 000000000..00f00ace7 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/send-assets.tsx @@ -0,0 +1,133 @@ +import { useState } from "react"; + +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses, demoAsset } from "~/data/cardano"; +import { Transaction } from "@meshsdk/core"; + +export default function TransactionSendAssets() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + You can chain the component to send assets to multiple recipients. For + each recipients, append: +

    + +

    + The Asset object is defined as: +

    + +

    + The unit field is the policy ID and asset name in hex + format. The quantity field is the amount of the asset to + send. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [asset, setAsset] = useState(demoAsset); + const [amount, setAmount] = useState("1"); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }); + tx.sendAssets({ address: address }, [ + { + unit: asset, + quantity: amount, + }, + ]); + tx.setMetadata(674, { + msg: [ + "Invoice-No: 1234567890", + "Customer-No: 555-1234", + "P.S.: i will shop again at your store :-)", + ], + }); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.sendAssets(\n`; + codeSnippet += ` { address: '${address}' },\n`; + codeSnippet += ` [\n`; + codeSnippet += ` {\n`; + codeSnippet += ` unit: '${asset}',\n`; + codeSnippet += ` quantity: '${amount}',\n`; + codeSnippet += ` },\n`; + codeSnippet += ` ]\n`; + codeSnippet += `);\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAsset(e.target.value)} + placeholder="Asset" + label="Asset" + key={1} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={2} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/send-lovelace.tsx b/apps/playground/src/pages/apis/transaction/basics/send-lovelace.tsx new file mode 100644 index 000000000..0fbca7bcc --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/send-lovelace.tsx @@ -0,0 +1,98 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; + +export default function TransactionSendLovelace() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + You can chain the component to send lovelace to multiple recipients. For + each recipients, append: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [amount, setAmount] = useState("1000000"); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }).sendLovelace( + address, + amount, + ); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + codeSnippet += `const tx = new Transaction({ initiator: wallet })\n`; + codeSnippet += ` .sendLovelace(\n`; + codeSnippet += ` '${address}',\n`; + codeSnippet += ` '${amount}'\n`; + codeSnippet += ` );\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/send-value.tsx b/apps/playground/src/pages/apis/transaction/basics/send-value.tsx new file mode 100644 index 000000000..76d65fc74 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/send-value.tsx @@ -0,0 +1,98 @@ +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionSendValue() { + return ( + + ); +} + +function Left() { + let codeUtxo = ``; + codeUtxo += `{\n`; + codeUtxo += ` input: {\n`; + codeUtxo += ` outputIndex: number;\n`; + codeUtxo += ` txHash: string;\n`; + codeUtxo += ` };\n`; + codeUtxo += ` output: {\n`; + codeUtxo += ` address: string;\n`; + codeUtxo += ` amount: Asset[];\n`; + codeUtxo += ` dataHash?: string;\n`; + codeUtxo += ` plutusData?: string;\n`; + codeUtxo += ` scriptRef?: string;\n`; + codeUtxo += ` };\n`; + codeUtxo += `}\n`; + + return ( + <> +

    + Specify an output for the transaction. This funcion allows you to design + the output UTXOs, either by splitting the outputs from multiple UTxOs or + by creating reference inputs. +

    +

    + sendValue() is useful when working with smart contracts, + when you want to redeem a UTxO from the script. +

    + +

    + where UTxO has the following format (use one of our + providers): +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const utxo = utxos[0]; + + if (utxo) { + const tx = new Transaction({ initiator: wallet }); + tx.sendValue(await wallet.getChangeAddress(), utxo); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } else { + return "No UTXO found"; + } + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.sendValue(recipient, UTxO);\n`; + codeSnippet += `\n`; + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/set-collateral.tsx b/apps/playground/src/pages/apis/transaction/basics/set-collateral.tsx new file mode 100644 index 000000000..30ddb05eb --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/set-collateral.tsx @@ -0,0 +1,70 @@ +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionSetCollateral() { + return ( + + ); +} + +function Left() { + return ( + <> +

    Specify the UTXOs that you want to use as collateral.

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const utxo = (await wallet.getUtxos())[0]; + + if (utxo) { + const tx = new Transaction({ initiator: wallet }); + tx.setCollateral([utxo]); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } else { + return "No UTXOs available"; + } + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.setCollateral([utxo]);\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/set-metadata.tsx b/apps/playground/src/pages/apis/transaction/basics/set-metadata.tsx new file mode 100644 index 000000000..6cd96f268 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/set-metadata.tsx @@ -0,0 +1,86 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionSetMetadata() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Add messages/comments/memos as transaction metadata. This is useful for + attaching additional information to a transaction. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [message, setMessage] = useState( + "This is a message from the Mesh SDK", + ); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }); + tx.setMetadata(0, message); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.setMetadata(0, '${message}');\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setMessage(e.target.value)} + label="Message" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/set-required-signers.tsx b/apps/playground/src/pages/apis/transaction/basics/set-required-signers.tsx new file mode 100644 index 000000000..aa573dcf2 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/set-required-signers.tsx @@ -0,0 +1,68 @@ +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionSetRequiredSigners() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Sets the required signers for the transaction. This is useful when you + want to include multiple signers, such as in a multi-signature + transaction or smart contracts. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }); + tx.setRequiredSigners(await wallet.getUsedAddresses()); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.setRequiredSigners(['addr1...']);\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/basics/set-time.tsx b/apps/playground/src/pages/apis/transaction/basics/set-time.tsx new file mode 100644 index 000000000..9f0392567 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/basics/set-time.tsx @@ -0,0 +1,66 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TransactionSetTime() { + return ( + + ); +} + +function Left() { + let code1 = `import { resolveSlotNo } from '@meshsdk/core';\n`; + code1 += `let minutes = 5; // add 5 minutes\n`; + code1 += `let nowDateTime = new Date();\n`; + code1 += `let dateTimeAdd5Min = new Date(nowDateTime.getTime() + minutes*60000);\n`; + code1 += `const slot = resolveSlotNo('mainnet', dateTimeAdd5Min.getTime());\n`; + + let codeExpire = `const tx = new Transaction({ initiator: wallet });\n`; + codeExpire += `// do tx.sendLovelace() or any transactions actions\n`; + codeExpire += `tx.setTimeToExpire(slot)\n`; + codeExpire += `const unsignedTx = await tx.build();\n`; + + let codeValid = `const tx = new Transaction({ initiator: wallet });\n`; + codeValid += `// do tx.sendLovelace() or any transactions actions\n`; + codeValid += `tx.setTimeToStart(slot)\n`; + codeValid += `const unsignedTx = await tx.build();\n`; + + return ( + <> +

    + We can define the time-to-live (TTL) for the transaction. TTL is the + time limit for our transaction to be included in a blockchain, if it is + not in a blockchain by then the transaction will be cancelled. This time + limit is defined as slot. +

    +

    + In order to get the slot of the time you wish the + transaction would expire, you can use resolveSlotNo. For + example, if you would like the transaction to expire in 5 minutes, you + can get the slot in the following way: +

    + +

    + Next, we set the TTL with setTimeToExpire and providing the{" "} + slot, this means that if the transaction is submitted after + after slot will not be valid. +

    + +

    + Likewise, we can set a "validity start interval" for the transaction, + where it is the time the transaction will be valid. We can define the + start time with setTimeToStart and providing the{" "} + slot: +

    + +

    + Note that, if you are using a policy locking script, you must define{" "} + setTimeToExpire before the expiry; otherwise, you will + catch the ScriptWitnessNotValidatingUTXOW error. +

    + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/common.tsx b/apps/playground/src/pages/apis/transaction/common.tsx new file mode 100644 index 000000000..3e38d8503 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/common.tsx @@ -0,0 +1,30 @@ +import Codeblock from "~/components/text/codeblock"; + +export function Intro() { + let example = ``; + example += `import { Transaction } from '@meshsdk/core';\n\n`; + example += `const tx = new Transaction({ initiator: wallet });\n`; + example += `tx.foo(...); // add transaction methods\n`; + example += `tx.bar(...); // add transaction methods\n\n`; + example += `const unsignedTx = await tx.build();\n`; + example += `const signedTx = await wallet.signTx(unsignedTx);\n`; + example += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + To initiate a transaction, we import the Transaction class + from the @meshsdk/core package and assign the wallet to the{" "} + initiator property. We build the transaction with{" "} + .build() constructs the transaction and returns a + transaction CBOR. Behind the scenes, it selects all of the necessary + inputs belonging to the wallet, calculates the fee for this transaction + and returns the remaining assets to the change address. Use{" "} + wallet.signTx() to sign transaction CBOR. +

    + + + ); +} + +export default function Placeholder() {} diff --git a/apps/playground/src/pages/apis/transaction/index.tsx b/apps/playground/src/pages/apis/transaction/index.tsx new file mode 100644 index 000000000..bf2f1c0b6 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/index.tsx @@ -0,0 +1,23 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { linksTransactions, metaTransaction } from "~/data/links-transactions"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/minting/burning-one-signature.tsx b/apps/playground/src/pages/apis/transaction/minting/burning-one-signature.tsx new file mode 100644 index 000000000..ebc24c5f5 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/burning-one-signature.tsx @@ -0,0 +1,167 @@ +import { useEffect, useState } from "react"; + +import { Asset, ForgeScript, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoAssetId } from "~/data/cardano"; + +export default function BurningOneSignature() { + const [userInput, setUserInput] = useState(demoAsset); + + return ( + + ); +} + +function Left(userInput: string) { + let codeSnippet = `import { Transaction, ForgeScript } from '@meshsdk/core';\n`; + codeSnippet += `import type { Asset } from '@meshsdk/core';\n\n`; + + codeSnippet += `// prepare forgingScript\n`; + codeSnippet += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet += `const address = usedAddress[0];\n`; + codeSnippet += `const forgingScript = ForgeScript.withOneSignature(address);\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n\n`; + + codeSnippet += `// burn asset \n`; + codeSnippet += `const asset: Asset = {\n`; + codeSnippet += ` unit: '${userInput}',\n`; + codeSnippet += ` quantity: '1',\n`; + codeSnippet += `};\n`; + codeSnippet += `tx.burnAsset(forgingScript, asset);\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + let codeSnippet1 = `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet1 += `const address = usedAddress[0];\n`; + codeSnippet1 += `const forgingScript = ForgeScript.withOneSignature(address);`; + + let codeSnippet2 = `const asset: Asset = {\n`; + codeSnippet2 += ` unit: assetAsset,\n`; + codeSnippet2 += ` quantity: '1',\n`; + codeSnippet2 += `};\n`; + codeSnippet2 += `tx.burnAsset(forgingScript, asset);`; + + return ( + <> +

    + Like minting assets, we need to define the forgingScript{" "} + with ForgeScript. We use the first wallet address as the + "minting address". Note that, assets can only be burned by its minting + address. +

    + +

    + Then, we define Asset and set tx.burnAsset() +

    + +

    Here is the full code:

    + + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + useEffect(() => { + async function load() { + if (connected) { + const assets = await wallet.getAssets(); + const _assets = assets.filter((asset) => + asset.unit.includes(demoAssetId), + ); + if (_assets[0]) { + setUserInput(_assets[0].unit); + } + } + } + load(); + }, [connected]); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "No address found"; + } + + // create forgingScript + const forgingScript = ForgeScript.withOneSignature(address); + + const asset: Asset = { + unit: userInput, + quantity: "1", + }; + + // create transaction + const tx = new Transaction({ initiator: wallet }); + tx.burnAsset(forgingScript, asset); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let code = ``; + code += `const usedAddress = await wallet.getUsedAddresses();\n`; + code += `const address = usedAddress[0];\n`; + code += `\n`; + code += `// create forgingScript\n`; + code += `const forgingScript = ForgeScript.withOneSignature(address);\n`; + code += `\n`; + code += `const asset: Asset = {\n`; + code += ` unit: '${userInput}',\n`; + code += ` quantity: "1",\n`; + code += `};\n`; + code += `\n`; + code += `// create transaction\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.burnAsset(forgingScript, asset);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Asset Unit" + label="Asset Unit" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/minting/index.tsx b/apps/playground/src/pages/apis/transaction/minting/index.tsx new file mode 100644 index 000000000..69e448803 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/index.tsx @@ -0,0 +1,60 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import Codeblock from "~/components/text/codeblock"; +import { metaMinting } from "~/data/links-transactions"; +import { Intro } from "../common"; +import BurningOneSignature from "./burning-one-signature"; +import MintingCip68 from "./minting-cip68"; +import MintingNativeScript from "./minting-native-script"; +import MintingOneSignature from "./minting-one-signature"; +import MintingPlutusScript from "./minting-plutus-script"; +import MintingRoyaltyToken from "./minting-royalty-token"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Mint with One Signature", to: "mintingOneSignature" }, + { label: "Burn asset", to: "burningOneSignature" }, + { label: "Mint with Native Script", to: "mintingNativeScript" }, + { label: "Mint with Plutus Script", to: "mintingPlutusScript" }, + { label: "Mint with CIP-68", to: "mintingCip68" }, + { label: "Mint Royalty Token", to: "mintingRoyaltyToken" }, + ]; + + return ( + <> + + + +

    + Minting and burning assets is a common operation in blockchain + applications. In the Cardano ecosystem, minting and burning are + achieved through Native Scripts and Plutus Scripts. The Mesh SDK + provides a set of APIs to interact with the blockchain and build + transactions that can mint or burn assets. +

    + +

    + In this page, you will find the APIs to create transactions for + minting and burning assets. +

    +
    + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/minting/minting-cip68.tsx b/apps/playground/src/pages/apis/transaction/minting/minting-cip68.tsx new file mode 100644 index 000000000..e75a3e471 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/minting-cip68.tsx @@ -0,0 +1,250 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + DEFAULT_REDEEMER_BUDGET, + Mint, + mTxOutRef, + PlutusScript, + resolvePlutusScriptAddress, + Transaction, +} from "@meshsdk/core"; +import { applyParamsToScript } from "@meshsdk/core-csl"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { + demoPlutusAlwaysSucceedScript, + oneTimeMintingPolicy, +} from "~/data/cardano"; + +export default function MintingCip68() { + const [userInput, setUserInput] = useState("MeshCIP68"); + + return ( + + ); +} + +function Left(userInput: string) { + let codeSnippet1 = ``; + + return ( + <> +

    + + CIP-68 + {" "} + proposes a metadata standard for assets on the Cardano blockchain, not + limited to just NFTs but any asset class. It aims to address the + limitations of a previous standard ( + + CIP-25 + + ). +

    + +

    + The basic idea is to have two assets issued, where one references the + other. We call these two a reference NFT and an{" "} + user token, where the + user token can be an NFT, FT or any other asset class that + is transferable and represents any value. So, the{" "} + user token is the actual asset that lives in a user's + wallet. +

    +

    + To find the metadata for the user token you need to look + for the output, where the reference NFT is locked in. How + this is done concretely will become clear below. Moreover, this output + contains a datum, which holds the metadata. The advantage of this + approach is that the issuer of the assets can decide how the transaction + output with the reference NFT is locked and further + handled. If the issuer wants complete immutable metadata, the{" "} + reference NFT can be locked at the address of an + unspendable script. Similarly, if the issuer wants the NFTs/FTs to + evolve or wants a mechanism to update the metadata, the{" "} + reference NFT + can be locked at the address of a script with arbitrary logic that the + issuer decides. +

    +

    + Lastly and most importantly, with this construction, the metadata can be + used by a Plutus V2 script with the use of reference inputs ( + + CIP-31 + + ) . This will drive further innovation in the token space. +

    + + {/* */} + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "Address not found"; + } + + const redeemer = { + data: { alternative: 0, fields: [] }, + tag: "MINT", + budget: DEFAULT_REDEEMER_BUDGET, + }; + + const alawysSucceedPlutusScript: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V2", + }; + + const scriptAddress = resolvePlutusScriptAddress( + alawysSucceedPlutusScript, + address.substring(0, 5) === "addr1" ? 1 : 0, + ); + + const userTokenMetadata = { + name: userInput, + image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua", + mediaType: "image/jpg", + description: "Hello world - CIP68", + }; + + const cip68Token: Mint = { + assetName: userInput, + assetQuantity: "1", + metadata: userTokenMetadata, + recipient: address, + cip68ScriptAddress: scriptAddress, + }; + + const utxos = await wallet.getUtxos(); + + if (!utxos || utxos.length <= 0) { + throw "No UTxOs found in wallet"; + } + + const scriptCode = applyParamsToScript(oneTimeMintingPolicy, [ + mTxOutRef(utxos[0]?.input.txHash!, utxos[0]?.input.outputIndex!), + ]); + const script: PlutusScript = { + code: scriptCode, + version: "V2", + }; + + const tx = new Transaction({ initiator: wallet }) + .setTxInputs([utxos[0]!]) + .mintAsset(script, cip68Token, redeemer); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let code = ``; + code += `const usedAddress = await wallet.getUsedAddresses();\n`; + code += `const address = usedAddress[0];\n`; + code += `\n`; + code += `const redeemer = {\n`; + code += ` data: { alternative: 0, fields: [] },\n`; + code += ` tag: "MINT",\n`; + code += ` budget: DEFAULT_REDEEMER_BUDGET,\n`; + code += `};\n`; + code += `\n`; + code += `const alawysSucceedPlutusScript: PlutusScript = {\n`; + code += ` code: demoPlutusAlwaysSucceedScript,\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `\n`; + code += `const scriptAddress = resolvePlutusScriptAddress(\n`; + code += ` alawysSucceedPlutusScript,\n`; + code += ` address.substring(0, 5) === "addr1" ? 1 : 0,\n`; + code += `);\n`; + code += `\n`; + code += `const userTokenMetadata = {\n`; + code += ` name: '${userInput}',\n`; + code += ` image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",\n`; + code += ` mediaType: "image/jpg",\n`; + code += ` description: "Hello world - CIP68",\n`; + code += `};\n`; + code += `\n`; + code += `const cip68Token: Mint = {\n`; + code += ` assetName: '${userInput}',\n`; + code += ` assetQuantity: "1",\n`; + code += ` metadata: userTokenMetadata,\n`; + code += ` recipient: address,\n`; + code += ` cip68ScriptAddress: scriptAddress,\n`; + code += `};\n`; + code += `\n`; + code += `const utxos = await wallet.getUtxos();\n`; + code += `\n`; + code += `const scriptCode = applyParamsToScript(oneTimeMintingPolicy, [\n`; + code += ` mTxOutRef(utxos[0]?.input.txHash!, utxos[0]?.input.outputIndex!),\n`; + code += `]);\n`; + code += `const script: PlutusScript = {\n`; + code += ` code: scriptCode,\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet })\n`; + code += ` .setTxInputs([utxos[0]!])\n`; + code += ` .mintAsset(script, cip68Token, redeemer);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Token Name" + label="Token Name" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/minting/minting-native-script.tsx b/apps/playground/src/pages/apis/transaction/minting/minting-native-script.tsx new file mode 100644 index 000000000..bda9ae60e --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/minting-native-script.tsx @@ -0,0 +1,182 @@ +import Link from "next/link"; + +import { AssetMetadata, Mint, NativeScript } from "@meshsdk/core"; +import { Transaction } from "@meshsdk/core"; +import { ForgeScript, resolvePaymentKeyHash } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses, demoAssetMetadata } from "~/data/cardano"; + +export default function MintingNativeScript() { + return ( + + ); +} + +function Left() { + let codeSnippetNative = ``; + codeSnippetNative += `import type { NativeScript } from '@meshsdk/core';\n`; + codeSnippetNative += `\n`; + + codeSnippetNative += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippetNative += `const address = usedAddress[0];\n`; + codeSnippetNative += `\n`; + codeSnippetNative += `const keyHash = resolvePaymentKeyHash(address);\n\n`; + + codeSnippetNative += `const nativeScript: NativeScript = {\n`; + codeSnippetNative += ` type: "all",\n`; + codeSnippetNative += ` scripts: [\n`; + codeSnippetNative += ` {\n`; + codeSnippetNative += ` type: "before",\n`; + codeSnippetNative += ` slot: "99999999",\n`; + codeSnippetNative += ` },\n`; + codeSnippetNative += ` {\n`; + codeSnippetNative += ` type: "sig",\n`; + codeSnippetNative += ` keyHash: keyHash,\n`; + codeSnippetNative += ` },\n`; + codeSnippetNative += ` ],\n`; + codeSnippetNative += `};\n`; + + let codeSnippet1 = `const forgingScript = ForgeScript.fromNativeScript(nativeScript);\n`; + + let codeSnippet2 = `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + codeSnippet2 += `const asset: Mint = {\n`; + codeSnippet2 += ` assetName: 'MeshToken',\n`; + codeSnippet2 += ` assetQuantity: '1',\n`; + codeSnippet2 += ` metadata: assetMetadata,\n`; + codeSnippet2 += ` label: '721',\n`; + codeSnippet2 += ` recipient: '${demoAddresses.testnet}' \n`; + codeSnippet2 += `};\n`; + + let codeSnippet3 = `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet3 += `tx.mintAsset(\n`; + codeSnippet3 += ` forgingScript,\n`; + codeSnippet3 += ` asset,\n`; + codeSnippet3 += `);\n\n`; + codeSnippet3 += `const unsignedTx = await tx.build();\n`; + codeSnippet3 += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet3 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + Additionally, you can define the forging script with{" "} + NativeScript. For example if you want to have a policy + locking script, you can create a new ForgeScript from{" "} + NativeScript: +

    + + +

    + To get the keyHash, use the{" "} + resolvePaymentKeyHash(). To get the slot, use the{" "} + resolveSlotNo(). Check out{" "} + Resolvers on how to use these + functions. +

    +

    + Important: if you are using a policy locking script, you must define{" "} + setTimeToExpire before the expiry; otherwise, you will + catch the ScriptWitnessNotValidatingUTXOW error. See{" "} + Transaction - set time. +

    + +

    + Next, we define the metadata for the asset and create the asset object: +

    + + + +

    + Finally, we create a transaction and mint the asset with the{" "} + mintAsset method: +

    + + +

    + You can get the policy ID for this Native Script with{" "} + resolveNativeScriptHash: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "Address not found"; + } + + const keyHash = resolvePaymentKeyHash(address); + + const nativeScript: NativeScript = { + type: "all", + scripts: [ + { + type: "before", + slot: "99999999", + }, + { + type: "sig", + keyHash: keyHash, + }, + ], + }; + + const forgingScript = ForgeScript.fromNativeScript(nativeScript); + + // define asset metadata + const assetMetadata1: AssetMetadata = demoAssetMetadata; + + const asset1: Mint = { + assetName: "MeshToken", + assetQuantity: "1", + metadata: assetMetadata1, + label: "721", + recipient: address, + }; + + const tx = new Transaction({ initiator: wallet }); + tx.mintAsset(forgingScript, asset1); + tx.setTimeToExpire("99999999"); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/minting/minting-one-signature.tsx b/apps/playground/src/pages/apis/transaction/minting/minting-one-signature.tsx new file mode 100644 index 000000000..5fcc2d2db --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/minting-one-signature.tsx @@ -0,0 +1,129 @@ +import Link from "next/link"; + +import { AssetMetadata, ForgeScript, Mint, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses, demoAssetMetadata } from "~/data/cardano"; + +export default function MintingOneSignature() { + return ( + + ); +} + +function Left() { + let codeSnippet1 = ``; + codeSnippet1 += `// use browser wallet to get address\n`; + codeSnippet1 += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet1 += `const address = usedAddress[0];\n`; + codeSnippet1 += `// use app wallet to get address\n`; + codeSnippet1 += `const address = wallet.getPaymentAddress();\n\n`; + codeSnippet1 += `// create forgingScript\n`; + codeSnippet1 += `const forgingScript = ForgeScript.withOneSignature(address);`; + + let codeSnippet2 = `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + codeSnippet2 += `const asset: Mint = {\n`; + codeSnippet2 += ` assetName: 'MeshToken',\n`; + codeSnippet2 += ` assetQuantity: '1',\n`; + codeSnippet2 += ` metadata: assetMetadata,\n`; + codeSnippet2 += ` label: '721',\n`; + codeSnippet2 += ` recipient: '${demoAddresses.testnet}' \n`; + codeSnippet2 += `};\n`; + + let codeSnippet3 = `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet3 += `tx.mintAsset(\n`; + codeSnippet3 += ` forgingScript,\n`; + codeSnippet3 += ` asset,\n`; + codeSnippet3 += `);\n\n`; + codeSnippet3 += `const unsignedTx = await tx.build();\n`; + codeSnippet3 += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet3 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + In this section, we will see how to mint native assets with a{" "} + ForgeScript. For minting assets with smart contract, visit{" "} + + Transaction - Smart Contract - Minting Assets with Smart Contract + + . +

    +

    + Firstly, we need to define the forgingScript with{" "} + ForgeScript. We use the first wallet address as the + "minting address" (you can use other addresses). +

    + +

    Then, we define the metadata.

    + +

    + Finally, we create a transaction and mint the asset with the{" "} + mintAsset method. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "No address found"; + } + + // create forgingScript + const forgingScript = ForgeScript.withOneSignature(address); + + // create asset metadata + const assetMetadata: AssetMetadata = demoAssetMetadata; + + const asset: Mint = { + assetName: "MeshToken", + assetQuantity: "1", + metadata: assetMetadata, + label: "721", + recipient: address, + }; + + // create transaction + const tx = new Transaction({ initiator: wallet }); + tx.mintAsset(forgingScript, asset); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/minting/minting-plutus-script.tsx b/apps/playground/src/pages/apis/transaction/minting/minting-plutus-script.tsx new file mode 100644 index 000000000..8a23af9fc --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/minting-plutus-script.tsx @@ -0,0 +1,198 @@ +import { useState } from "react"; + +import { AssetMetadata, Mint, PlutusScript, Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { + demoAddresses, + demoAssetMetadata, + demoPlutusMintingScript, +} from "~/data/cardano"; + +export default function MintingPlutusScript() { + const [userInput, setUserInput] = useState("mesh"); + + return ( + + ); +} + +function Left(userInput: string) { + let codeSnippet1 = ``; + + codeSnippet1 += `const script: PlutusScript = {\n`; + codeSnippet1 += ` code: '${demoPlutusMintingScript}',\n`; + codeSnippet1 += ` version: "V2",\n`; + codeSnippet1 += `};\n`; + codeSnippet1 += `\n`; + codeSnippet1 += `const redeemer = {\n`; + codeSnippet1 += ` data: { alternative: 0, fields: ["${userInput}"] },\n`; + codeSnippet1 += ` tag: "MINT",\n`; + codeSnippet1 += `};\n`; + + let codeSnippet2 = `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + codeSnippet2 += `const asset: Mint = {\n`; + codeSnippet2 += ` assetName: 'MeshToken',\n`; + codeSnippet2 += ` assetQuantity: '1',\n`; + codeSnippet2 += ` metadata: assetMetadata,\n`; + codeSnippet2 += ` label: '721',\n`; + codeSnippet2 += ` recipient: '${demoAddresses.testnet}' \n`; + codeSnippet2 += `};\n`; + + let codeSnippet3 = ``; + codeSnippet3 += `const tx = new Transaction({ initiator: wallet })\n`; + codeSnippet3 += ` .mintAsset(script, asset, redeemer)\n`; + codeSnippet3 += ` .setRequiredSigners([address]);\n`; + codeSnippet3 += `\n`; + codeSnippet3 += `const unsignedTx = await tx.build();\n`; + codeSnippet3 += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + codeSnippet3 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + In this section, we will see how to mint native assets with a{" "} + PlutusScript. +

    +

    + The PlutusScript object is used to define the Plutus script + that will be used to mint the asset. The redeemer object is + used to provide the data that the validator script will use to validate + the transaction. For this example, the validator script is expecting a + tag of "MINT" and a data field of "mesh". +

    + +

    + Similar to previous examples, we define the asset metadata and mint + object. The asset metadata is a JSON object that contains the metadata + for the asset. The mint object contains the asset name, quantity, + metadata, label, and recipient address. +

    + +

    + Finally, we create a transaction and mint the asset with the{" "} + mintAsset method. We set the required signers to include + the address that is minting the asset. +

    + + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "Address not found"; + } + + const assetMetadata: AssetMetadata = demoAssetMetadata; + + const asset: Mint = { + assetName: "MeshToken", + assetQuantity: "1", + metadata: assetMetadata, + label: "721", + recipient: address, + }; + + const script: PlutusScript = { + code: demoPlutusMintingScript, + version: "V2", + }; + + const redeemer = { + data: { alternative: 0, fields: [userInput] }, + tag: "MINT", + }; + + const tx = new Transaction({ initiator: wallet }) + .mintAsset(script, asset, redeemer) + .setRequiredSigners([address]); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let code = ``; + code += `const usedAddress = await wallet.getUsedAddresses();\n`; + code += `const address = usedAddress[0];\n`; + code += `\n`; + code += `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + code += `const asset: Mint = {\n`; + code += ` assetName: "MeshToken",\n`; + code += ` assetQuantity: "1",\n`; + code += ` metadata: assetMetadata,\n`; + code += ` label: "721",\n`; + code += ` recipient: address,\n`; + code += `};\n`; + code += `\n`; + code += `const script: PlutusScript = {\n`; + code += ` code: demoPlutusMintingScript,\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `\n`; + code += `const redeemer = {\n`; + code += ` data: { alternative: 0, fields: ['${userInput}'] },\n`; + code += ` tag: "MINT",\n`; + code += `};\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet })\n`; + code += ` .mintAsset(script, asset, redeemer)\n`; + code += ` .setRequiredSigners([address]);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Datum value" + label="Datum value" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/minting/minting-royalty-token.tsx b/apps/playground/src/pages/apis/transaction/minting/minting-royalty-token.tsx new file mode 100644 index 000000000..6b1d1446b --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/minting/minting-royalty-token.tsx @@ -0,0 +1,183 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + ForgeScript, + Mint, + RoyaltiesStandard, + Transaction, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; + +export default function MintingRoyaltyToken() { + return ( + + ); +} + +function Left() { + let codeSnippet = ``; + codeSnippet += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet += `const address = usedAddress[0];\n`; + codeSnippet += `\n`; + codeSnippet += `// create forgingScript, you can also use native script here\n`; + codeSnippet += `const forgingScript = ForgeScript.withOneSignature(address);\n`; + codeSnippet += `\n`; + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `\n`; + codeSnippet += `const _assetMetadata = {\n`; + codeSnippet += ` rate: '0.2',\n`; + codeSnippet += ` addr: '${demoAddresses.testnet}'\n`; + codeSnippet += `};\n`; + codeSnippet += `const asset: Mint = {\n`; + codeSnippet += ` assetName: '',\n`; + codeSnippet += ` assetQuantity: '1',\n`; + codeSnippet += ` metadata: _assetMetadata,\n`; + codeSnippet += ` label: '777',\n`; + codeSnippet += ` recipient: address,\n`; + codeSnippet += `};\n`; + codeSnippet += `\n`; + codeSnippet += `tx.mintAsset(forgingScript, asset);\n`; + codeSnippet += `\n`; + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + Royalty tokens is a special type of token that allows the creator to + collect a royalty fee, this proposed standard will allow for uniform + royalties' distributions across the secondary market space. Read{" "} + + CIP-27 + {" "} + for more information. +

    +

    + The implementation of royalty tokens is very simple, minting a token + with 777 label, with "rate" and "addr" in the metadata. +

    + +

    Here is the full code:

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState("0.2"); + const [userInput2, setUserInput2] = useState(demoAddresses.testnet); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "No address found"; + } + + const forgingScript = ForgeScript.withOneSignature(address); + + const tx = new Transaction({ initiator: wallet }); + + const _assetMetadata: RoyaltiesStandard = { + rate: userInput, + address: userInput2, + }; + const asset: Mint = { + assetName: "", + assetQuantity: "1", + metadata: _assetMetadata, + label: "777", + recipient: address, + }; + + tx.mintAsset(forgingScript, asset); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = ``; + code += `const usedAddress = await wallet.getUsedAddresses();\n`; + code += `const address = usedAddress[0];\n`; + code += `\n`; + code += `const forgingScript = ForgeScript.withOneSignature(address);\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `\n`; + code += `const _assetMetadata: RoyaltiesStandard = {\n`; + code += ` rate: '${userInput}',\n`; + code += ` address: '${userInput2}',\n`; + code += `};\n`; + code += `const asset: Mint = {\n`; + code += ` assetName: "",\n`; + code += ` assetQuantity: "1",\n`; + code += ` metadata: _assetMetadata,\n`; + code += ` label: "777",\n`; + code += ` recipient: address,\n`; + code += `};\n`; + code += `\n`; + code += `tx.mintAsset(forgingScript, asset);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Rate" + label="Rate" + key={0} + />, + ]} + /> + setUserInput2(e.target.value)} + placeholder="Address" + label="Address" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/apply-param-to-script.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/apply-param-to-script.tsx new file mode 100644 index 000000000..1b694cca1 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/apply-param-to-script.tsx @@ -0,0 +1,223 @@ +import Link from "next/link"; + +import { MeshMarketplaceBlueprint } from "@meshsdk/contract"; +import { integer, mPubKeyAddress, pubKeyAddress } from "@meshsdk/core"; +import { applyParamsToScript, CSLSerializer } from "@meshsdk/core-csl"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { + demoPlutusMintingScript, + demoPubKeyHash, + demoStakeCredential, +} from "~/data/cardano"; + +const serializer = new CSLSerializer(); + +const demoCompiledCode = MeshMarketplaceBlueprint.validators[0]!.compiledCode; + +export default function ContractApplyParamToScript() { + return ( + + ); +} + +function Left() { + let codeAikenScript1 = ``; + codeAikenScript1 += `pub fn marketplace_logic(\n`; + codeAikenScript1 += ` owner: Address, // parameter 1\n`; + codeAikenScript1 += ` fee_percentage_basis_point: Int, // parameter 2\n`; + codeAikenScript1 += ` datum: MarketplaceDatum,\n`; + codeAikenScript1 += ` redeemer: MarketplaceRedeemer,\n`; + codeAikenScript1 += ` ctx: ScriptContext,\n`; + codeAikenScript1 += `) -> Bool {\n`; + + let applyScript1 = ``; + applyScript1 += `scriptCbor = applyParamsToScript(\n`; + applyScript1 += ` compiledCode,\n`; + applyScript1 += ` [\n`; + applyScript1 += ` pubKeyAddress(pubKeyHash, stakeCredential),\n`; + applyScript1 += ` integer(feePercentageBasisPoint),\n`; + applyScript1 += ` ],\n`; + applyScript1 += ` "JSON",\n`; + applyScript1 += `);\n`; + + let signature = ``; + signature += `applyParamsToScript(\n`; + signature += ` rawScript: string, \n`; + signature += ` params: object[] | Data[], \n`; + signature += ` type?: "Mesh" | "JSON" | "CBOR"\n`; + signature += `): string\n`; + + return ( + <> +

    + Apply parameters to a script allows you to create a custom{" "} + + CIP-57 compliant script + {" "} + based on some inputs. For example, for the{" "} + Marketplace contract, + we define the owner of the marketplace and the fee percentage that the + owner will receive. The script will be created based on these parameters + which will return a unique script CBOR and script address. +

    +

    + Note, currently only core-csl supports applying parameters + to a script. As such, you must install the package to use this feature. +

    + + +

    + applyParamsToScript has the following signature: +

    + +

    + The parameters allowed for a script depends on how the script is + written. For example the{" "} + + Marketplace script + + : +

    + +

    + Thus, in order to apply parameters to this script, we resolve the pubkey + address and the fee percentage basis point: +

    + +

    + With Mesh, there are 3 PlutusData types of parameters that + can be applied to a script. For more details about the 3 types, please + refer to the{" "} + + documentation on PlutusData + +

    +
      +
    • + Mesh (default) +
    • +
    • + JSON +
    • +
    • + CBOR +
    • +
    + + ); +} + +function Right() { + return ( + <> + + + + + ); +} + +function DemoMeshType() { + async function runDemo() { + const scriptCbor = applyParamsToScript( + demoPlutusMintingScript, + [mPubKeyAddress(demoPubKeyHash, demoStakeCredential), 100], + "Mesh", + ); + return scriptCbor; + } + + let code = `import { applyParamsToScript } from "@meshsdk/core-csl"; \n\n`; + code += `const scriptCbor = applyParamsToScript(\n`; + code += ` '',\n`; + code += ` [mPubKeyAddress('${demoPubKeyHash}', '${demoStakeCredential}'), 100],\n`; + code += ` "Mesh",\n`; + code += `);\n`; + + return ( + + ); +} + +function DemoJsonType() { + async function runDemo() { + const scriptCbor = applyParamsToScript( + demoCompiledCode, + [pubKeyAddress(demoPubKeyHash, demoStakeCredential), integer(100)], + "JSON", + ); + return scriptCbor; + } + + let code = ``; + code += `const scriptCbor = applyParamsToScript(\n`; + code += ` '',\n`; + code += ` [pubKeyAddress('${demoPubKeyHash}', '${demoStakeCredential}'), integer(100)],\n`; + code += ` "JSON",\n`; + code += `);\n`; + + return ( + + ); +} + +function DemoCborType() { + const pubKeyAddressCbor = serializer.serializeData({ + type: "JSON", + content: JSON.stringify(pubKeyAddress(demoPubKeyHash, demoStakeCredential)), + }); + + const integerCbor = serializer.serializeData({ + type: "JSON", + content: JSON.stringify(integer(100)), + }); + + async function runDemo() { + const scriptCbor = applyParamsToScript( + demoPlutusMintingScript, + [pubKeyAddressCbor, integerCbor], + "CBOR", + ); + return scriptCbor; + } + + let code = ``; + code += `const scriptCbor = applyParamsToScript(\n`; + code += ` '',\n`; + code += ` ['${pubKeyAddressCbor}', '${integerCbor}'],\n`; + code += ` "CBOR",\n`; + code += `);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/designing-datum.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/designing-datum.tsx new file mode 100644 index 000000000..e0679719a --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/designing-datum.tsx @@ -0,0 +1,130 @@ +import { Data, resolveDataHash } from "@meshsdk/core"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function ContractDesigningDatum() { + return ( + + ); +} + +function Left() { + // string + const datumString: Data = "meshtoken"; + const datumStringHash = resolveDataHash(datumString); + let codeSnippetdatumString = `const datumString: Data = 'meshtoken';\n`; + codeSnippetdatumString += `const datumStringHash = resolveDataHash(datumString);\n`; + codeSnippetdatumString += `// datahash: ${datumStringHash}`; + + // number + const datumNumber: Data = 12345678; + const datumNumberHash = resolveDataHash(datumNumber); + let codeSnippetdatumNumber = `const datumNumber: Data = 12345678;\n`; + codeSnippetdatumNumber += `const datumNumberHash = resolveDataHash(datumNumber);\n`; + codeSnippetdatumNumber += `// datahash: ${datumNumberHash}`; + + // array + const datumList: Data = ["meshtoken", 12345678]; + const datumListHash = resolveDataHash(datumList); + let codeSnippetdatumList = `const datumList: Data = [12345678, 'meshtoken'];\n`; + codeSnippetdatumList += `const datumListHash = resolveDataHash(datumList);\n`; + codeSnippetdatumList += `// datahash: ${datumListHash}\n\n`; + + // array of arrays + const datumList2: Data = [ + ["meshtoken", 12345678], + [ + ["super", "secret", "datum"], + ["addr_123", 5], + ], + ]; + const datumList2Hash = resolveDataHash(datumList2); + codeSnippetdatumList += `const datumList2: Data = [\n`; + codeSnippetdatumList += ` ['meshtoken', 12345678],\n`; + codeSnippetdatumList += ` [\n`; + codeSnippetdatumList += ` ['super', 'secret', 'datum'],\n`; + codeSnippetdatumList += ` ['addr_123', 5],\n`; + codeSnippetdatumList += ` ],\n`; + codeSnippetdatumList += `];\n`; + codeSnippetdatumList += `const datumList2Hash = resolveDataHash(datumList2);\n`; + codeSnippetdatumList += `// datahash: ${datumList2Hash}`; + + // map + const datumMap: Data = new Map(); + datumMap.set("token", "meshtoken"); + datumMap.set("price", "12345678"); + const datumMapHash = resolveDataHash(datumMap); + let codeSnippetdatumMap = `const datumMap: Data = new Map();\n`; + codeSnippetdatumMap += `datumMap.set('token', 'meshtoken');\n`; + codeSnippetdatumMap += `datumMap.set('price', '12345678');\n`; + codeSnippetdatumMap += `const datumMapHash = resolveDataHash(datumMap);\n`; + codeSnippetdatumMap += `// datahash: ${datumMapHash}\n\n`; + + const datumMap2: Data = new Map(); + datumMap2.set([1, 2], ["meshtoken", 123]); + datumMap2.set([3, 4], 12345678); + const datumMap2Hash = resolveDataHash(datumMap2); + codeSnippetdatumMap += `const datumMap2: Data = new Map();\n`; + codeSnippetdatumMap += `datumMap2.set([1, 2], ['meshtoken', 123]);\n`; + codeSnippetdatumMap += `datumMap2.set([3, 4], 12345678);\n`; + codeSnippetdatumMap += `const datumMap2Hash = resolveDataHash(datumMap2);\n`; + codeSnippetdatumMap += `// datahash: ${datumMap2Hash}`; + + // constructor + const datumConstructor: Data = { + alternative: 0, + fields: ["meshtoken", 12345678], + }; + const datumConstructorHash = resolveDataHash(datumConstructor); + + let codeSnippetdatumConstructor = `const datumConstructor: Data = {\n`; + codeSnippetdatumConstructor += ` alternative: 0,\n`; + codeSnippetdatumConstructor += ` fields: ['meshtoken', 12345678],\n`; + codeSnippetdatumConstructor += `};\n`; + codeSnippetdatumConstructor += `const datumConstructorHash = resolveDataHash(datumConstructor);\n`; + codeSnippetdatumConstructor += `// datahash: ${datumConstructorHash}`; + + return ( + <> +

    + Mesh allows you to freely design the datum structure to suit the plutus + smart contract requirements. You can import the Data type + to help you design the datum. +

    + + +

    A string

    +

    A datum as simple as just a string, preferably a hex string.

    + +

    A number

    +

    It can also be a number.

    + +

    An array

    +

    + Or an array, where each item can be either a string, number, a list, or + a map. +

    + +

    A Map

    +

    + It can also be a map, where both the keys and its values can be a + string, number, a list, or a map. +

    + +

    With constructor

    +

    + Or a datum with a constructor, where alternative is a + number, and fields is an array. +

    + + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx new file mode 100644 index 000000000..c89e584d5 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx @@ -0,0 +1,66 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import Codeblock from "~/components/text/codeblock"; +import { metaSmartContract } from "~/data/links-smart-contracts"; +import { Intro } from "../common"; +import MintingPlutusScript from "../minting/minting-plutus-script"; +import ContractApplyParamToScript from "./apply-param-to-script"; +import ContractDesigningDatum from "./designing-datum"; +import ContractInlineDatum from "./inline-datum"; +import ContractLockAssets from "./lock-assets"; +import ContractReferenceScript from "./reference-script"; +import ContractUnlockAssets from "./unlock-assets"; +import ContractUsingRedeemer from "./using-redeemer"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Lock assets", to: "lockAssets" }, + { label: "Unlock assets", to: "unlockAssets" }, + { label: "Minting assets", to: "mintingPlutusScript" }, + { label: "Apply param to script", to: "applyParamToScript" }, + { label: "Inline datum", to: "inlineDatum" }, + { label: "Reference script", to: "referenceScript" }, + { label: "Designing datum", to: "datum" }, + { label: "Using redeemer", to: "redeemer" }, + ]; + + return ( + <> + + + +

    + Cardano introduced smart contract support in 2021, which allowed the + creation of a number of decentralised applications. +

    + +

    + In this page, we will demonstrate various ways to interact with + smart contracts. +

    +
    + + + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/inline-datum.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/inline-datum.tsx new file mode 100644 index 000000000..fe20ef1b5 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/inline-datum.tsx @@ -0,0 +1,63 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function ContractInlineDatum() { + return ( + + ); +} + +function Left() { + let codeExample = ``; + codeExample += `sendAssets(\n`; + codeExample += ` {\n`; + codeExample += ` address: someAddress,\n`; + codeExample += ` datum: {\n`; + codeExample += ` value: 'supersecret',\n`; + codeExample += ` inline: true,\n`; + codeExample += ` },\n`; + codeExample += ` },\n`; + codeExample += ` [\n`; + codeExample += ` {\n`; + codeExample += ` unit: "64af286e2ad0df4de2e7de15f8ff5b3d27faecf4ab2757056d860a424d657368546f6b656e",\n`; + codeExample += ` quantity: "1",\n`; + codeExample += ` },\n`; + codeExample += ` ],\n`; + codeExample += `)\n`; + + return ( + <> +

    + It is possible to attach a "datum" (piece of data) inline to a + UTxO outputs, which allows us to use the UTxO to hold information which + we can then use without having to spend it (as with normal UTxOs). You + can learn more from{" "} + + CIP-32 + + . +

    +

    Here's an example of creating a UTxO with inline datum:

    + +

    + As you can see, you simply have to define the datum field + in the Recipient input parameter, including a ( + value) and setting inline to true + . This works for every{" "} + transaction endpoints (e.g.{" "} + sendLovelace(), sendAssets(),{" "} + sendValue()). +

    + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/lock-assets.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/lock-assets.tsx new file mode 100644 index 000000000..0a699d3cd --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/lock-assets.tsx @@ -0,0 +1,220 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + Asset, + PlutusScript, + resolvePlutusScriptAddress, + Transaction, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano"; + +export default function ContractLockAssets() { + return ( + + ); +} + +function Left() { + let codeScript = `import { resolvePlutusScriptAddress } from '@meshsdk/core';\n`; + codeScript += `import type { PlutusScript } from '@meshsdk/core';\n\n`; + codeScript += `const script: PlutusScript = {\n`; + codeScript += ` code: '${demoPlutusAlwaysSucceedScript}',\n`; + codeScript += ` version: 'V2',\n`; + codeScript += `};\n\n`; + codeScript += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; + + let code1 = ``; + code1 += `const assets: Asset[] = [\n`; + code1 += ` {\n`; + code1 += ` unit: '',\n`; + code1 += ` quantity: "1",\n`; + code1 += ` },\n`; + code1 += `];\n`; + + let code2 = ``; + code2 += `const tx = new Transaction({ initiator: wallet });\n`; + code2 += `tx.sendAssets(\n`; + code2 += ` {\n`; + code2 += ` address: scriptAddress,\n`; + code2 += ` datum: {\n`; + code2 += ` value: '',\n`; + code2 += ` },\n`; + code2 += ` },\n`; + code2 += ` assets,\n`; + code2 += `);\n`; + code2 += `\n`; + code2 += `const unsignedTx = await tx.build();\n`; + code2 += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code2 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + Assets may be reserved in a smart contract by "locking" them at the + script's address. The assets can only be subsequently unlocked when + certain conditions are met, for example, in the case of making a + purchase in a marketplace contract. +

    +

    + In this demo, we will lock selected assets from your wallet in an + always succeed smart contract. Even though it is called + "always succeed" because there is no actual "validating" logic, + unlocking the assets still requires the correct datum to be supplied. + Also note that in practice, multiple assets (both native assets and + lovelace) can be sent to the contract in a single transaction. +

    + +

    + First, we need to create a script and resolve the script address. + Luckily Mesh has a handy function to "resolve" (work out) the script + address using:{" "} + + Resolve Script Address + {" "} + from the script's CBOR. Here's how it's done: +

    + + +

    + Next, we need to define the assets we want to lock in the smart + contract. +

    + + + +

    + Finally, we can build the transaction and submit it to the blockchain. + You realize here we provided the datum value in the transaction. Since + this is an always succeed script, any datum value will work, for this + example, we used it to allow us to seach for this transaction later. +

    + + + +

    + If the transaction is successful, you would usually want to keep a + record of the asset's unit and the datum used + in the transaction, as this information is useful to unlock the assets. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState(demoAsset); + const [userInput2, setUserInput2] = useState("meshsecretcode"); + + async function runDemo() { + // script + const script: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V2", + }; + const scriptAddress = resolvePlutusScriptAddress(script, 0); + + // asset + const assets: Asset[] = [ + { + unit: userInput, + quantity: "1", + }, + ]; + + // transaction + const tx = new Transaction({ initiator: wallet }); + tx.sendAssets( + { + address: scriptAddress, + datum: { + value: userInput2, + }, + }, + assets, + ); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let code = ``; + code += `// script\n`; + code += `const script: PlutusScript = {\n`; + code += ` code: '${demoPlutusAlwaysSucceedScript}',\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; + code += `\n`; + code += `// asset\n`; + code += `const assets: Asset[] = [\n`; + code += ` {\n`; + code += ` unit: '${userInput}',\n`; + code += ` quantity: "1",\n`; + code += ` },\n`; + code += `];\n`; + code += `\n`; + code += `// transaction\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.sendAssets(\n`; + code += ` {\n`; + code += ` address: scriptAddress,\n`; + code += ` datum: {\n`; + code += ` value: '${userInput2}',\n`; + code += ` },\n`; + code += ` },\n`; + code += ` assets,\n`; + code += `);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Asset Unit" + label="Asset Unit" + key={0} + />, + setUserInput2(e.target.value)} + placeholder="Datum" + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/reference-script.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/reference-script.tsx new file mode 100644 index 000000000..80b1926e9 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/reference-script.tsx @@ -0,0 +1,56 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function ContractReferenceScript() { + return ( + + ); +} + +function Left() { + let codeExample = ``; + codeExample += `sendAssets(\n`; + codeExample += ` {\n`; + codeExample += ` address: someAddress,\n`; + codeExample += ` script: {\n`; + codeExample += ` version: 'V2',\n`; + codeExample += ` code: '...',\n`; + codeExample += ` },\n`; + codeExample += ` },\n`; + codeExample += ` [\n`; + codeExample += ` {\n`; + codeExample += ` unit: "64af286e2ad0df4de2e7de15f8ff5b3d27faecf4ab2757056d860a424d657368546f6b656e",\n`; + codeExample += ` quantity: "1",\n`; + codeExample += ` },\n`; + codeExample += ` ],\n`; + codeExample += `)\n`; + + return ( + <> +

    + Validation requires access to any scripts that are involved, but adding + entire scripts to transactions increases the transaction size and can + lead to bloating of the blockchain. A useful solution is to instead + store script references in a UTxO, which allows us to later use that + UTxO to build future transactions without having to include the entire + script. Thus we can reduce the size of the transaction, which may allow + us to send (for example) multiple scripts within one transaction without + exceeding the maximum transaction size. +

    + +

    + Simply define the script as the Recipient{" "} + input parameter. This works for every{" "} + transaction endpoints (e.g..{" "} + sendLovelace(), sendAssets(),{" "} + sendValue()). +

    + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/unlock-assets.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/unlock-assets.tsx new file mode 100644 index 000000000..31f1aa76d --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/unlock-assets.tsx @@ -0,0 +1,239 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + PlutusScript, + resolvePlutusScriptAddress, + Transaction, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { fetchAssetUtxo } from "~/components/cardano/fetch-utxo-by-datum"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano"; + +export default function ContractUnlockAssets() { + return ( + + ); +} + +function Left() { + let codeScript = `import { resolvePlutusScriptAddress } from '@meshsdk/core';\n`; + codeScript += `import type { PlutusScript } from '@meshsdk/core';\n\n`; + codeScript += `const script: PlutusScript = {\n`; + codeScript += ` code: '${demoPlutusAlwaysSucceedScript}',\n`; + codeScript += ` version: 'V2',\n`; + codeScript += `};\n\n`; + codeScript += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; + + let codeSnippetGetAssetUtxo = ``; + codeSnippetGetAssetUtxo += `async function _getAssetUtxo({ scriptAddress, asset, datum }) {\n`; + codeSnippetGetAssetUtxo += ` const koios = new KoiosProvider('preprod');\n\n`; + codeSnippetGetAssetUtxo += ` const utxos = await koios.fetchAddressUTxOs(\n`; + codeSnippetGetAssetUtxo += ` scriptAddress,\n`; + codeSnippetGetAssetUtxo += ` asset\n`; + codeSnippetGetAssetUtxo += ` );\n\n`; + codeSnippetGetAssetUtxo += ` const dataHash = resolveDataHash(datum);\n\n`; + codeSnippetGetAssetUtxo += ` let utxo = utxos.find((utxo: any) => {\n`; + codeSnippetGetAssetUtxo += ` return utxo.output.dataHash == dataHash;\n`; + codeSnippetGetAssetUtxo += ` });\n\n`; + codeSnippetGetAssetUtxo += ` return utxo;\n`; + codeSnippetGetAssetUtxo += `}\n`; + + let codeSnippetCallAssetUtxo = ""; + codeSnippetCallAssetUtxo += `// fetch input UTXO\n`; + codeSnippetCallAssetUtxo += `const assetUtxo = await _getAssetUtxo({\n`; + codeSnippetCallAssetUtxo += ` scriptAddress: scriptAddress,\n`; + codeSnippetCallAssetUtxo += ` asset: '',\n`; + codeSnippetCallAssetUtxo += ` datum: '',\n`; + codeSnippetCallAssetUtxo += `});`; + + let codeSnippetCreateTx = ""; + codeSnippetCreateTx += `// create the unlock asset transaction\n`; + codeSnippetCreateTx += `const tx = new Transaction({ initiator: wallet })\n`; + codeSnippetCreateTx += ` .redeemValue({\n`; + codeSnippetCreateTx += ` value: assetUtxo,\n`; + codeSnippetCreateTx += ` script: {\n`; + codeSnippetCreateTx += ` version: 'V2',\n`; + codeSnippetCreateTx += ` code: '${demoPlutusAlwaysSucceedScript}',\n`; + codeSnippetCreateTx += ` },\n`; + codeSnippetCreateTx += ` datum: '',\n`; + codeSnippetCreateTx += ` })\n`; + + codeSnippetCreateTx += ` .sendValue(address, assetUtxo) // address is recipient address\n`; + codeSnippetCreateTx += ` .setRequiredSigners([address]);\n`; + + let codeSnippetSign = `const unsignedTx = await tx.build();\n`; + codeSnippetSign += `// note that the partial sign is set to true\n`; + codeSnippetSign += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + codeSnippetSign += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + <> +

    + In this section, we will demonstrate how to unlock assets in a smart + contract. +

    +

    + First, we need to define the smart contract script and resolve the + script address. +

    + +

    + Next, let's create a function to fetch the correct input UTxO from the + script address. This input UTxO is needed for the transaction builder. + Notee that in this demo, we are using KoiosProvider, but + any of the providers which are implemented by Mesh can be used (see{" "} + Providers). +

    + +

    + For this demo, we search for the UTxO by using the datum that we have + set in the previous step. In fact, depends on the redeemer logic of the + script, only a transaction with the corrent datum supplied is able to + unlock the assets. We query the script address for the UTxO that + contains the correct data hash: +

    + +

    + Then, we create the transaction to unlock the asset. We use the{" "} + redeemValue method. The method takes the asset UTxO, the + script, and the datum as parameters. We also use the{" "} + sendValue method to send the asset to the recipient + address. The setRequiredSigners method is used to set the + required signers for the transaction. +

    + +

    + Lastly, we build and sign the transaction. Note that here we need to set + the 'partial sign' parameter to true. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState(demoAsset); + const [userInput2, setUserInput2] = useState("meshsecretcode"); + + let code = ``; + + code += `// script\n`; + code += `const script: PlutusScript = {\n`; + code += ` code: '${demoPlutusAlwaysSucceedScript}',\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `const scriptAddress = resolvePlutusScriptAddress(script, 0);\n`; + code += `\n`; + code += `// retrieve asset utxo\n`; + code += `const assetUtxo = await fetchAssetUtxo({\n`; + code += ` address: scriptAddress,\n`; + code += ` asset: '${userInput}',\n`; + code += ` datum: '${userInput2}',\n`; + code += `});\n`; + code += `\n`; + code += `if (assetUtxo === undefined) {\n`; + code += ` throw "Asset UTXO not found";\n`; + code += `}\n`; + code += `\n`; + code += `// transaction\n`; + code += `\n`; + code += `const address = await wallet.getChangeAddress();\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet })\n`; + code += ` .redeemValue({\n`; + code += ` value: assetUtxo,\n`; + code += ` script: script as PlutusScript,\n`; + code += ` datum: '${userInput2}',\n`; + code += ` })\n`; + code += ` .sendValue(address, assetUtxo)\n`; + code += ` .setRequiredSigners([address]);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + async function runDemo() { + // script + const script: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V2", + }; + const scriptAddress = resolvePlutusScriptAddress(script, 0); + + // retrieve asset utxo + const assetUtxo = await fetchAssetUtxo({ + address: scriptAddress, + asset: userInput, + datum: userInput2, + }); + + if (assetUtxo === undefined) { + throw "Asset UTXO not found"; + } + + // transaction + + const address = await wallet.getChangeAddress(); + + const tx = new Transaction({ initiator: wallet }) + .redeemValue({ + value: assetUtxo, + script: script as PlutusScript, + datum: userInput2, + }) + .sendValue(address, assetUtxo) + .setRequiredSigners([address]); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + return ( + + setUserInput(e.target.value)} + placeholder="Asset Unit" + label="Asset Unit" + key={0} + />, + setUserInput2(e.target.value)} + placeholder="Datum" + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/using-redeemer.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/using-redeemer.tsx new file mode 100644 index 000000000..fb4bc3c89 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/smart-contract/using-redeemer.tsx @@ -0,0 +1,90 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function ContractUsingRedeemer() { + return ( + + ); +} + +function Left() { + // haskell redeemer type + let haskellRedeemer = "-- The Redeemer data type in Plutus\n"; + haskellRedeemer += + "data MyRedeemer = StartRedeemer PaymentPubKeyHash | SecondRedeemer | EndRedeemer\n"; + haskellRedeemer += + "PlutusTx.makeIsDataIndexed ''MyRedeemer [('StartRedeemer,0),('SecondRedeemer,1),('EndRedeemer,2)]"; + + // 1st redeemer + let firstRedeemer = ""; + firstRedeemer += "const addresses = await wallet.getUsedAddresses();\n"; + firstRedeemer += "const pkh = resolvePaymentKeyHash(addresses[0]);\n"; + firstRedeemer += "const redeemer = {\n"; + firstRedeemer += " data: { alternative: 0, fields: [pkh]},\n"; + firstRedeemer += "};\n"; + + // 2nd redeemer + let secondRedeemer = "const redeemer = {\n"; + secondRedeemer += " data: { alternative: 1, fields: []},\n"; + secondRedeemer += "};\n"; + + // 3rd redeemer + let thirdRedeemer = "const redeemer = {\n"; + thirdRedeemer += " data: { alternative: 2, fields: []},\n"; + thirdRedeemer += "};\n"; + + let txWithRedeemer = "const tx = new Transaction({ initiator: wallet })\n"; + txWithRedeemer += ` .redeemValue(\n`; + txWithRedeemer += ` '4e4d01000033222220051200120011',\n`; + txWithRedeemer += ` assetUtxo,\n`; + txWithRedeemer += ` { datum: 'supersecret', redeemer: redeemer }\n`; + txWithRedeemer += ` )\n`; + txWithRedeemer += " .sendValue(address, assetUtxo)\n"; + txWithRedeemer += " .setRequiredSigners([address]);"; + + return ( + <> +

    + For redeemers in Mesh, you use the type Action and you only + supply the Data part to construct it. +

    + + + +

    Designing Redeemer

    +

    + Similarly to the datum, there is freedom in design to suit any smart + contract, but the redeemer needs to be supplied a little differently. +

    +

    + In this example, we represent a redeemer which matches the{" "} + StartRedeemer + as defined above with the first Used Address as input: +

    + +

    + Supplying the SecondRedeemer as defined above: +

    + +

    + Supplying the EndRedeemer as defined above: +

    + +

    Transaction construction

    +

    + Within the transaction, we can include the redeemer within{" "} + redeemValue: +

    + + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/staking/delegate-stake.tsx b/apps/playground/src/pages/apis/transaction/staking/delegate-stake.tsx new file mode 100644 index 000000000..c6f3b58e4 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/staking/delegate-stake.tsx @@ -0,0 +1,100 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoPool } from "~/data/cardano"; + +export default function StakingDelegate() { + return ( + + ); +} + +function Left() { + let codeSnippet = `const addresses = await wallet.getRewardAddresses();\n`; + codeSnippet += `const rewardAddress = addresses[0];\n\n`; + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.delegateStake(rewardAddress, '${demoPool}');`; + + return ( + <> +

    + Delegation is the process by which ADA holders delegate the stake + associated with their ADA to a stake pool. Doing so, this allows ADA + holders to participate in the network and be rewarded in proportion to + the amount of stake delegated. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState(demoPool); + + async function runDemo() { + const addresses = await wallet.getRewardAddresses(); + const rewardAddress = addresses[0]; + + if (rewardAddress === undefined) { + throw "No address found"; + } + + const tx = new Transaction({ initiator: wallet }); + tx.delegateStake(rewardAddress, userInput); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = ``; + code += `const addresses = await wallet.getRewardAddresses();\n`; + code += `const rewardAddress = addresses[0];\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.delegateStake(rewardAddress, '${userInput}');\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Pool ID" + label="Pool ID" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/staking/deregister-stake.tsx b/apps/playground/src/pages/apis/transaction/staking/deregister-stake.tsx new file mode 100644 index 000000000..3af163143 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/staking/deregister-stake.tsx @@ -0,0 +1,82 @@ +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function StakingDeregister() { + return ( + + ); +} + +function Left() { + let codeSnippet = `deregisterStake(rewardAddress: string)`; + + return ( + <> +

    + Deregister a stake address. The function accepts the following + parameters: +

    +
      +
    • + rewardAddress (string) - the reward address to deregister +
    • +
    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const addresses = await wallet.getRewardAddresses(); + const rewardAddress = addresses[0]; + + if (rewardAddress === undefined) { + throw "No address found"; + } + + const tx = new Transaction({ initiator: wallet }); + tx.deregisterStake(rewardAddress); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = ``; + code += `const addresses = await wallet.getRewardAddresses();\n`; + code += `const rewardAddress = addresses[0];\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.deregisterStake(rewardAddress);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/staking/index.tsx b/apps/playground/src/pages/apis/transaction/staking/index.tsx new file mode 100644 index 000000000..c1a3908de --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/staking/index.tsx @@ -0,0 +1,51 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import Codeblock from "~/components/text/codeblock"; +import { metaStaking } from "~/data/links-transactions"; +import { Intro } from "../common"; +import StakingDelegate from "./delegate-stake"; +import StakingDeregister from "./deregister-stake"; +import StakingRegister from "./register-stake"; +import StakingWithdraw from "./withdraw-stake"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Register Stake", to: "registerStake" }, + { label: "Delegate Stake", to: "delegateStake" }, + { label: "Withdraw Rewards", to: "withdrawRewards" }, + { label: "Deregister Stake", to: "deregisterStake" }, + ]; + + return ( + <> + + + +

    + Staking is the process of participating in the network by + delegating, registering, or withdrawing stake. Staking allows users + to earn rewards by participating in the network. +

    + +

    + In this page, you will find the APIs to create transactions for the + staking process. +

    +
    + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/transaction/staking/register-stake.tsx b/apps/playground/src/pages/apis/transaction/staking/register-stake.tsx new file mode 100644 index 000000000..4d19ed476 --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/staking/register-stake.tsx @@ -0,0 +1,127 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoPool } from "~/data/cardano"; + +export default function StakingRegister() { + return ( + + ); +} + +function Left() { + let codeSnippet = `import { Transaction } from '@meshsdk/core';\n\n`; + + codeSnippet += `const addresses = await wallet.getRewardAddresses();\n`; + codeSnippet += `const rewardAddress = addresses[0];\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.registerStake(rewardAddress);\n`; + codeSnippet += `tx.delegateStake(rewardAddress, '${demoPool}');\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + let code2 = ``; + code2 += `{\n`; + code2 += ` "active": true,\n`; + code2 += ` "poolId": "${demoPool}",\n`; + code2 += ` "balance": "389290551",\n`; + code2 += ` "rewards": "0",\n`; + code2 += ` "withdrawals": "0"\n`; + code2 += `}\n`; + + return ( + <> +

    + New address must "register" before they can delegate to stakepools. To + check if a reward address has been register, use{" "} + + blockchainProvider.fetchAccountInfo(rewardAddress) + + . For example this account information, active shows the + address is registered. +

    + +

    + You can chain with delegateStake() to register and delegate + to a stake pool. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState(demoPool); + + async function runDemo() { + const addresses = await wallet.getRewardAddresses(); + const rewardAddress = addresses[0]; + + if (rewardAddress === undefined) { + throw "No address found"; + } + + const tx = new Transaction({ initiator: wallet }); + tx.registerStake(rewardAddress); + tx.delegateStake(rewardAddress, userInput); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = ``; + code += `const addresses = await wallet.getRewardAddresses();\n`; + code += `const rewardAddress = addresses[0];\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.registerStake(rewardAddress);\n`; + code += `tx.delegateStake(rewardAddress, '${userInput}');\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Pool ID" + label="Pool ID" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/transaction/staking/withdraw-stake.tsx b/apps/playground/src/pages/apis/transaction/staking/withdraw-stake.tsx new file mode 100644 index 000000000..2cad6605c --- /dev/null +++ b/apps/playground/src/pages/apis/transaction/staking/withdraw-stake.tsx @@ -0,0 +1,101 @@ +import { useState } from "react"; + +import { Transaction } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function StakingWithdraw() { + return ( + + ); +} + +function Left() { + let codeSnippet = `tx.withdrawRewards(rewardAddress, lovelace);`; + + return ( + <> +

    + Withdraw staking rewards. The function accepts the following parameters: +

    +
      +
    • + rewardAddress (string) - the reward address to withdraw from +
    • +
    • + lovelace (number) - the amount to withdraw in Lovelace +
    • +
    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + const [userInput, setUserInput] = useState("1000000"); + + async function runDemo() { + const addresses = await wallet.getRewardAddresses(); + const rewardAddress = addresses[0]; + + if (rewardAddress === undefined) { + throw "No address found"; + } + + const tx = new Transaction({ initiator: wallet }); + tx.withdrawRewards(rewardAddress, userInput); + + const unsignedTx = await tx.build(); + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = ``; + code += `const addresses = await wallet.getRewardAddresses();\n`; + code += `const rewardAddress = addresses[0];\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet });\n`; + code += `tx.withdrawRewards(rewardAddress, '${userInput}');\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Amount in lovelace" + label="Amount in lovelace" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/build-with-object.tsx b/apps/playground/src/pages/apis/txbuilder/basics/build-with-object.tsx new file mode 100644 index 000000000..148600e91 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/build-with-object.tsx @@ -0,0 +1,153 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { MeshTxBuilderBody } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderBuildWithObject() { + return ( + + ); +} + +function Left() { + let code1 = `const meshTxBody: Partial = {\n`; + code1 += ` outputs: [\n`; + code1 += ` {\n`; + code1 += ` address: address,\n`; + code1 += ` amount: [{ unit: "lovelace", quantity: amount }],\n`; + code1 += ` },\n`; + code1 += ` ],\n`; + code1 += ` changeAddress: changeAddress,\n`; + code1 += ` extraInputs: utxos,\n`; + code1 += ` selectionConfig: {\n`; + code1 += ` threshold: "5000000",\n`; + code1 += ` strategy: "largestFirst",\n`; + code1 += ` includeTxFees: true,\n`; + code1 += ` },\n`; + code1 += `};\n`; + code1 += `\n`; + code1 += `const unsignedTx = await txBuilder.complete(meshTxBody);`; + + return ( + <> +

    + One alternative to use the lower level APIs is to build the transaction + with an object. +

    +

    + The following shows a simple example of building a transaction to send + values to a recipient: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [amount, setAmount] = useState("2000000"); + + async function runDemo() { + const changeAddress = await wallet.getChangeAddress(); + + const utxos = await wallet.getUtxos(); + + // transaction + const txBuilder = getTxBuilder(); + + const meshTxBody: Partial = { + outputs: [ + { + address: address, + amount: [{ unit: "lovelace", quantity: amount }], + }, + ], + changeAddress: changeAddress, + extraInputs: utxos, + selectionConfig: { + threshold: "5000000", + strategy: "largestFirst", + includeTxFees: true, + }, + }; + + const unsignedTx = await txBuilder.complete(meshTxBody); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let code = `import { MeshTxBuilder } from "@meshsdk/core";\n\n`; + code += `const changeAddress = await wallet.getChangeAddress();\n`; + code += `const utxos = await wallet.getUtxos();\n`; + code += `const txBuilder = getTxBuilder();\n`; + code += `const meshTxBody: Partial = {\n`; + code += ` outputs: [\n`; + code += ` {\n`; + code += ` address: "addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr",\n`; + code += ` amount: [{ unit: "lovelace", quantity: "2000000" }],\n`; + code += ` },\n`; + code += ` ],\n`; + code += ` changeAddress: changeAddress,\n`; + code += ` extraInputs: utxos,\n`; + code += ` selectionConfig: {\n`; + code += ` threshold: "5000000",\n`; + code += ` strategy: "largestFirst",\n`; + code += ` includeTxFees: true,\n`; + code += ` },\n`; + code += `};\n`; + code += `\n`; + code += `const unsignedTx = await txBuilder.complete(meshTxBody);\n`; + code += `const signedTx = await wallet.signTx(unsignedTx);\n`; + code += `const txHash = await wallet.submitTx(signedTx);`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/cip20.tsx b/apps/playground/src/pages/apis/txbuilder/basics/cip20.tsx new file mode 100644 index 000000000..038e77c5c --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/cip20.tsx @@ -0,0 +1,125 @@ +import { useState } from "react"; + +import { useWallet } from "@meshsdk/react"; + +import Textarea from "~/components/form/textarea"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderCip20() { + return ( + + ); +} + +function Left() { + let code = `txBuilder\n`; + code += ` .metadataValue(tag, metadata)\n`; + + return ( + <> +

    + Add messages/comments/memos as transaction metadata. This is useful for + attaching additional information to a transaction. +

    + +

    + The specification for the individual strings follow the general design + specification for JSON metadata, which is already implemented and in + operation on the cardano blockchain. The used metadatum label is{" "} + 674:, this number was choosen because it is the T9 encoding + of the string + msg. The message content has the key msg: and + consists of an array of individual message-strings. The number of theses + message-strings must be at least one for a single message, more for + multiple messages/lines. Each of theses individual message-strings array + entries must be at most 64 bytes when UTF-8 encoded. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [message, setMessage] = useState( + "Invoice-No: 1234567890\nCustomer-No: 555-1234", + ); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const changeAddress = await wallet.getChangeAddress(); + const txBuilder = getTxBuilder(); + + const tag = "674"; + const metadata = { + msg: message.split("\n"), + }; + + const unsignedTx = await txBuilder + .changeAddress(changeAddress) + .metadataValue(tag.toString(), metadata) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + let codeSnippet = ``; + codeSnippet += `const utxos = await wallet.getUtxos();\n`; + codeSnippet += `const changeAddress = await wallet.getChangeAddress();\n`; + codeSnippet += `const txBuilder = getTxBuilder();\n`; + codeSnippet += `\n`; + codeSnippet += `const tag = "674";\n`; + codeSnippet += `const metadata = {\n`; + codeSnippet += ` msg: [\n`; + for (let line of message.split("\n")) { + codeSnippet += ` '${line}',\n`; + } + codeSnippet += ` ],\n`; + codeSnippet += `});\n\n`; + codeSnippet += `const unsignedTx = await txBuilder\n`; + codeSnippet += ` .changeAddress(changeAddress)\n`; + codeSnippet += ` .metadataValue(tag, metadata)\n`; + codeSnippet += ` .selectUtxosFrom(utxos)\n`; + codeSnippet += ` .complete();\n`; + codeSnippet += `\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setMessage(e.target.value)} + label="Message (breakline for new line)" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/common-functions.tsx b/apps/playground/src/pages/apis/txbuilder/basics/common-functions.tsx new file mode 100644 index 000000000..5d1728891 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/common-functions.tsx @@ -0,0 +1,37 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TxbuilderCommonFunctions() { + return ( + + ); +} + +function Left() { + let code1 = `import { BlockfrostProvider, MeshTxBuilder } from "@meshsdk/core";\n\n`; + code1 += `function getTxBuilder() {\n`; + code1 += ` const blockchainProvider = new BlockfrostProvider('');\n`; + code1 += ` \n`; + code1 += ` const txBuilder = new MeshTxBuilder({\n`; + code1 += ` fetcher: blockchainProvider,\n`; + code1 += ` });\n`; + code1 += ` \n`; + code1 += ` return txBuilder;\n`; + code1 += `}\n`; + + return ( + <> +

    The function(s) that we use in most of these examples.

    +

    Get tx builder

    +

    + This function creates a new instance of the MeshTxBuilder with the + blockchain provider. +

    + + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/index.tsx b/apps/playground/src/pages/apis/txbuilder/basics/index.tsx new file mode 100644 index 000000000..8d7225d00 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/index.tsx @@ -0,0 +1,71 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaTxbuilderBasic } from "~/data/links-txbuilders"; +import TxbuilderBuildWithObject from "./build-with-object"; +import TxbuilderCip20 from "./cip20"; +import TxbuilderCommonFunctions from "./common-functions"; +import TxbuilderInitializeTxbuilder from "./initialize-txbuilder"; +import TxbuilderSendValues from "./send-values"; +import TxbuilderSetCollateral from "./set-collateral"; +import TxbuilderSetMetadata from "./set-metadata"; +import TxbuilderSetRequiredSigners from "./set-required-signers"; +import TxbuilderSetTime from "./set-time"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Initialize Tx Builder", to: "initializeTxbuilder" }, + { label: "Common functions", to: "commonFunctions" }, + { label: "Send value", to: "sendValue" }, + { label: "Build with object", to: "buildWithObject" }, + { label: "Set metadata", to: "metadata" }, + { label: "Set transaction message", to: "cip20" }, + { label: "Set collateral", to: "collateral" }, + { label: "Set required signers", to: "requiredSigners" }, + { label: "Set time", to: "setTime" }, + ]; + + return ( + <> + + + + <> +

    + The MeshTxBuilder is a powerful low-level API that + allows you to build and sign transactions. Under the hood, it + interface with cardano-sdk and Whisky SDK to construct + transactions. +

    +

    + In this page, we will cover how to initialize the{" "} + MeshTxBuilder and the basic operations of building a + transaction. +

    + +
    + + + + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/txbuilder/basics/initialize-txbuilder.tsx b/apps/playground/src/pages/apis/txbuilder/basics/initialize-txbuilder.tsx new file mode 100644 index 000000000..6543891dc --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/initialize-txbuilder.tsx @@ -0,0 +1,97 @@ +import Link from "next/link"; + +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TxbuilderInitializeTxbuilder() { + return ( + + ); +} + +function Left() { + let example = ``; + example += `import { BlockfrostProvider, MeshTxBuilder } from "@meshsdk/core";\n`; + example += `\n`; + example += `const blockchainProvider = new BlockfrostProvider('');\n\n`; + example += `const txBuilder = new MeshTxBuilder({\n`; + example += ` fetcher: blockchainProvider,\n`; + example += `});\n`; + + let signature = ``; + signature += `{\n`; + signature += ` fetcher?: IFetcher;\n`; + signature += ` submitter?: ISubmitter;\n`; + signature += ` evaluator?: IEvaluator;\n`; + signature += ` serializer?: IMeshTxSerializer;\n`; + signature += ` isHydra?: boolean;\n`; + signature += ` params?: Partial;\n`; + signature += `}\n`; + + return ( + <> +

    + To start building an customized transaction, you need to first + initialize MeshTxBuilder: +

    + + + +

    + The MeshTxBuilder instance has the following signature: +

    + + +

    + There are 6 optional fields to pass in to initialized the lower level + APIs instance: +

    + +
      +
    1. + serializer: The default serializer is{" "} + CSLSerializer. You can pass in your own serializer + instance. +
    2. +
    3. + fetcher: When you build the transaction without + sufficient fields as required by the serialization library, we would + index the blockchain to fill the information for you. Affected APIs + are txIn, txInCollateral,{" "} + spendingTxInReference. +
    4. +
    5. + submitter: It is used if you would like to use the{" "} + submitter submitTx API directly from the instance. +
    6. +
    7. + evaluator: It would perform redeemer execution unit + optimization, returning error message in case of invalid transaction. +
    8. +
    9. + isHydra: Use another set of default protocol parameters + for building transactions. +
    10. +
    11. + params: You can pass in the protocol parameters directly. +
    12. +
    + +

    + Below provides some examples of transaction building. Complete working + examples can be found in{" "} + + mesh-lower-level-api-demo + +

    + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/send-values.tsx b/apps/playground/src/pages/apis/txbuilder/basics/send-values.tsx new file mode 100644 index 000000000..cd0d7476b --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/send-values.tsx @@ -0,0 +1,116 @@ +import { useState } from "react"; + +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderSendValue() { + return ( + + ); +} + +function Left() { + let code1 = ``; + code1 += `txBuilder\n`; + code1 += ` .txIn(utxo.input.txHash, utxo.input.outputIndex)\n`; + code1 += ` .txOut(address, [{ unit: "lovelace", quantity: '1000000' }])\n`; + code1 += ` .changeAddress(await wallet.getChangeAddress());\n`; + + return ( + <> +

    + Sending values to a recipient is a common operation in blockchain + transactions. The Mesh SDK provides a simple way to build a transaction + to send values to a recipient. +

    +

    + The following shows a simple example of building a transaction to send + values to a recipient: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [amount, setAmount] = useState("2000000"); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const changeAddress = await wallet.getChangeAddress(); + const txBuilder = getTxBuilder(); + + const unsignedTx = await txBuilder + .txOut(address, [{ unit: "lovelace", quantity: amount }]) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let codeSnippet = `import { MeshTxBuilder } from "@meshsdk/core";\n`; + codeSnippet += `\n`; + codeSnippet += `const utxos = await wallet.getUtxos();\n`; + codeSnippet += `const changeAddress = await wallet.getChangeAddress();\n`; + codeSnippet += `const txBuilder = getTxBuilder();\n`; + codeSnippet += `\n`; + codeSnippet += `const unsignedTx = await txBuilder\n`; + codeSnippet += ` .txOut('${address}', [{ unit: "lovelace", quantity: '${amount}' }])\n`; + codeSnippet += ` .changeAddress(changeAddress)\n`; + codeSnippet += ` .selectUtxosFrom(utxos)\n`; + codeSnippet += ` .complete();\n`; + codeSnippet += `\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/set-collateral.tsx b/apps/playground/src/pages/apis/txbuilder/basics/set-collateral.tsx new file mode 100644 index 000000000..8d85f51b2 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/set-collateral.tsx @@ -0,0 +1,30 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TxbuilderSetCollateral() { + return ( + + ); +} + +function Left() { + let code = ``; + code += `txBuilder\n`; + code += ` .txInCollateral(\n`; + code += ` utxo.input.txHash,\n`; + code += ` utxo.input.outputIndex,\n`; + code += ` utxo.output.amount,\n`; + code += ` utxo.output.address,\n`; + code += ` )\n`; + + return ( + <> +

    Specify the UTXOs that you want to use as collateral.

    + + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/set-metadata.tsx b/apps/playground/src/pages/apis/txbuilder/basics/set-metadata.tsx new file mode 100644 index 000000000..ae9f7bda8 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/set-metadata.tsx @@ -0,0 +1,104 @@ +import { useState } from "react"; + +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderSetMetadata() { + return ( + + ); +} + +function Left() { + let code = `txBuilder\n`; + code += ` .metadataValue(tag, metadata)\n`; + + return ( + <> +

    + Add messages/comments/memos as transaction metadata. This is useful for + attaching additional information to a transaction. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [message, setMessage] = useState( + "This is a message from the Mesh SDK", + ); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const changeAddress = await wallet.getChangeAddress(); + const txBuilder = getTxBuilder(); + + const tag = "0"; + const metadata = "This is a message from the Mesh SDK"; + + const unsignedTx = await txBuilder + .changeAddress(changeAddress) + .metadataValue(tag.toString(), metadata) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let codeSnippet = ``; + codeSnippet += `const utxos = await wallet.getUtxos();\n`; + codeSnippet += `const address = await wallet.getChangeAddress();\n`; + codeSnippet += `const txBuilder = getTxBuilder();\n`; + codeSnippet += `\n`; + codeSnippet += `const tag = "0";\n`; + codeSnippet += `const metadata = "This is a message from the Mesh SDK";\n\n`; + codeSnippet += `const unsignedTx = await txBuilder\n`; + codeSnippet += ` .changeAddress(address)\n`; + codeSnippet += ` .metadataValue(tag, metadata)\n`; + codeSnippet += ` .selectUtxosFrom(utxos)\n`; + codeSnippet += ` .complete();\n`; + codeSnippet += `\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setMessage(e.target.value)} + label="Message" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/set-required-signers.tsx b/apps/playground/src/pages/apis/txbuilder/basics/set-required-signers.tsx new file mode 100644 index 000000000..60972487e --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/set-required-signers.tsx @@ -0,0 +1,29 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TxbuilderSetRequiredSigners() { + return ( + + ); +} + +function Left() { + let code = ``; + code += `txBuilder\n`; + code += ` .requiredSignerHash(pubKeyHash)\n`; + + return ( + <> +

    + Sets the required signers for the transaction. This is useful when you + want to include multiple signers, such as in a multi-signature + transaction or smart contracts. +

    + + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/basics/set-time.tsx b/apps/playground/src/pages/apis/txbuilder/basics/set-time.tsx new file mode 100644 index 000000000..2f26e3181 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/basics/set-time.tsx @@ -0,0 +1,59 @@ +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; + +export default function TxbuilderSetTime() { + return ( + + ); +} + +function Left() { + let code1 = `import { resolveSlotNo } from '@meshsdk/core';\n`; + code1 += `let minutes = 5; // add 5 minutes\n`; + code1 += `let nowDateTime = new Date();\n`; + code1 += `let dateTimeAdd5Min = new Date(nowDateTime.getTime() + minutes*60000);\n`; + code1 += `const slot = resolveSlotNo('mainnet', dateTimeAdd5Min.getTime());\n`; + + let codeExpire = ``; + codeExpire += `txBuilder\n`; + codeExpire += ` .invalidHereafter(Number(slot));\n`; + + let codeValid = ``; + codeValid += `txBuilder\n`; + codeValid += ` .invalidBefore(Number(slot));\n`; + + return ( + <> +

    + We can define the time-to-live (TTL) for the transaction. TTL is the + time limit for our transaction to be included in a blockchain, if it is + not in a blockchain by then the transaction will be cancelled. This time + limit is defined as slot. +

    +

    + In order to get the slot of the time you wish the + transaction would expire, you can use resolveSlotNo. For + example, if you would like the transaction to expire in 5 minutes, you + can get the slot in the following way: +

    + +

    + Next, we set the TTL with invalidHereafter and providing + the slot, this means that if the transaction is submitted + after after slot will not be valid. +

    + +

    + Likewise, we can set a "validity start interval" for the transaction, + where it is the time the transaction will be valid. We can define the + start time with invalidBefore and providing the{" "} + slot: +

    + + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/common.tsx b/apps/playground/src/pages/apis/txbuilder/common.tsx new file mode 100644 index 000000000..3e780b8fd --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/common.tsx @@ -0,0 +1,18 @@ +import { + BrowserWallet, + keepRelevant, + MeshTxBuilder, + Quantity, + Unit, +} from "@meshsdk/core"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; + +export function getTxBuilder() { + const blockchainProvider = getProvider(); + return new MeshTxBuilder({ + fetcher: blockchainProvider, + }); +} + +export default function Placeholder() {} diff --git a/apps/playground/src/pages/apis/txbuilder/index.tsx b/apps/playground/src/pages/apis/txbuilder/index.tsx new file mode 100644 index 000000000..8a1828b82 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/index.tsx @@ -0,0 +1,20 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { linksTxbuilder, metaTxbuilder } from "~/data/links-txbuilders"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/txbuilder/minting/burning-one-signature.tsx b/apps/playground/src/pages/apis/txbuilder/minting/burning-one-signature.tsx new file mode 100644 index 000000000..fe7f073f0 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/burning-one-signature.tsx @@ -0,0 +1,153 @@ +import { useEffect, useState } from "react"; + +import { + cst, + ForgeScript, + resolveScriptHash, + stringToHex, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoAssetId } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderBurningOneSignature() { + const [userInput, setUserInput] = useState(demoAsset); + + return ( + + ); +} + +function Left(userInput: string) { + // todo docs + let codeSnippet = `import { Transaction, ForgeScript } from '@meshsdk/core';\n`; + codeSnippet += `import type { Asset } from '@meshsdk/core';\n\n`; + + codeSnippet += `// prepare forgingScript\n`; + codeSnippet += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet += `const address = usedAddress[0];\n`; + codeSnippet += `const forgingScript = ForgeScript.withOneSignature(address);\n\n`; + + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n\n`; + + codeSnippet += `// burn asset \n`; + codeSnippet += `const asset: Asset = {\n`; + codeSnippet += ` unit: '${userInput}',\n`; + codeSnippet += ` quantity: '1',\n`; + codeSnippet += `};\n`; + codeSnippet += `tx.burnAsset(forgingScript, asset);\n\n`; + + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);`; + + let codeSnippet1 = `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippet1 += `const address = usedAddress[0];\n`; + codeSnippet1 += `const forgingScript = ForgeScript.withOneSignature(address);`; + + let codeSnippet2 = `const asset: Asset = {\n`; + codeSnippet2 += ` unit: assetAsset,\n`; + codeSnippet2 += ` quantity: '1',\n`; + codeSnippet2 += `};\n`; + codeSnippet2 += `tx.burnAsset(forgingScript, asset);`; + + return ( + <> +

    + Like minting assets, we need to define the forgingScript{" "} + with ForgeScript. We use the first wallet address as the + "minting address". Note that, assets can only be burned by its minting + address. +

    + +

    + Then, we define Asset and set tx.burnAsset() +

    + +

    Here is the full code:

    + + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + useEffect(() => { + async function load() { + if (connected) { + const assets = await wallet.getAssets(); + const _assets = assets.filter((asset) => + asset.unit.includes(demoAssetId), + ); + if (_assets[0]) { + setUserInput(_assets[0].unit); + } + } + } + load(); + }, [connected]); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const changeAddress = await wallet.getChangeAddress(); + const txBuilder = getTxBuilder(); + + const forgingScript = ForgeScript.withOneSignature(changeAddress); + + const policyId = resolveScriptHash(forgingScript); + const tokenName = stringToHex("MeshToken"); + + const unsignedTx = await txBuilder + .mint("-1", policyId, tokenName) + .mintingScript(forgingScript) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + // todo docs + let code = ``; + + return ( + + setUserInput(e.target.value)} + placeholder="Asset Unit" + label="Asset Unit" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/minting/index.tsx b/apps/playground/src/pages/apis/txbuilder/minting/index.tsx new file mode 100644 index 000000000..30339ac0f --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/index.tsx @@ -0,0 +1,50 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaTxbuilderMinting } from "~/data/links-txbuilders"; +import TxbuilderBurningOneSignature from "./burning-one-signature"; +import TxbuilderMintingCip68 from "./minting-cip68"; +import TxbuilderMintingNativeScript from "./minting-native-script"; +import TxbuilderMintAsset from "./minting-one-signature"; +import TxbuilderMintingPlutusScript from "./minting-plutus-script"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Mint with One Signature", to: "mintingOneSignature" }, + { label: "Burn asset", to: "burningOneSignature" }, + { label: "Mint with Native Script", to: "mintingNativeScript" }, + { label: "Mint with Plutus Script", to: "mintingPlutusScript" }, + { label: "Mint with CIP-68", to: "mintingCip68" }, + { label: "Mint Royalty Token", to: "mintingRoyaltyToken" }, + ]; + + return ( + <> + + + + <> +

    + +
    + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/txbuilder/minting/minting-cip68.tsx b/apps/playground/src/pages/apis/txbuilder/minting/minting-cip68.tsx new file mode 100644 index 000000000..eb6d921b2 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/minting-cip68.tsx @@ -0,0 +1,217 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + CIP68_100, + CIP68_222, + mConStr0, + metadataToCip68, + Mint, + mTxOutRef, + PlutusScript, + resolvePlutusScriptAddress, + resolveScriptHash, + serializePlutusScript, + stringToHex, + UTxO, +} from "@meshsdk/core"; +import { applyParamsToScript } from "@meshsdk/core-csl"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { + demoPlutusAlwaysSucceedScript, + oneTimeMintingPolicy, +} from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function MintingCip68() { + const [userInput, setUserInput] = useState("Test1"); + + return ( + + ); +} + +function Left(userInput: string) { + let codeSnippet1 = ``; + + return ( + <> +

    + + CIP-68 + {" "} + proposes a metadata standard for assets on the Cardano blockchain, not + limited to just NFTs but any asset class. It aims to address the + limitations of a previous standard ( + + CIP-25 + + ). +

    + +

    + The basic idea is to have two assets issued, where one references the + other. We call these two a reference NFT and an{" "} + user token, where the + user token can be an NFT, FT or any other asset class that + is transferable and represents any value. So, the{" "} + user token is the actual asset that lives in a user's + wallet. +

    +

    + To find the metadata for the user token you need to look + for the output, where the reference NFT is locked in. How + this is done concretely will become clear below. Moreover, this output + contains a datum, which holds the metadata. The advantage of this + approach is that the issuer of the assets can decide how the transaction + output with the reference NFT is locked and further + handled. If the issuer wants complete immutable metadata, the{" "} + reference NFT can be locked at the address of an + unspendable script. Similarly, if the issuer wants the NFTs/FTs to + evolve or wants a mechanism to update the metadata, the{" "} + reference NFT + can be locked at the address of a script with arbitrary logic that the + issuer decides. +

    +

    + Lastly and most importantly, with this construction, the metadata can be + used by a Plutus V2 script with the use of reference inputs ( + + CIP-31 + + ) . This will drive further innovation in the token space. +

    + + {/* */} + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const usedAddress = await wallet.getUsedAddresses(); + const address = usedAddress[0]; + + if (address === undefined) { + throw "Address not found"; + } + + const userTokenMetadata = { + name: userInput, + image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua", + mediaType: "image/jpg", + description: "Hello world - CIP68", + }; + + const alawysSucceedPlutusScript: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V1", + }; + + const { address: scriptAddress } = serializePlutusScript( + alawysSucceedPlutusScript, + ); + + const utxos = await wallet.getUtxos(); + + if (!utxos || utxos.length <= 0) { + throw "No UTxOs found in wallet"; + } + + const scriptCode = applyParamsToScript(oneTimeMintingPolicy, [ + mTxOutRef(utxos[0]?.input.txHash!, utxos[0]?.input.outputIndex!), + ]); + + const collateral: UTxO = (await wallet.getCollateral())[0]!; + const changeAddress = await wallet.getChangeAddress(); + + const policyId = resolveScriptHash(scriptCode, "V2"); + const tokenName = "MeshToken"; + const tokenNameHex = stringToHex(tokenName); + + const txBuilder = getTxBuilder(); + + const unsignedTx = await txBuilder + .txIn( + utxos[0]?.input.txHash!, + utxos[0]?.input.outputIndex!, + utxos[0]?.output.amount!, + utxos[0]?.output.address!, + ) + .mintPlutusScriptV2() + .mint("1", policyId, CIP68_100(tokenNameHex)) + .mintingScript(scriptCode) + .mintRedeemerValue(mConStr0([])) + .mintPlutusScriptV2() + .mint("1", policyId, CIP68_222(tokenNameHex)) + .mintingScript(scriptCode) + .mintRedeemerValue(mConStr0([])) + .txOut(scriptAddress, [ + { unit: policyId + CIP68_100(tokenNameHex), quantity: "1" }, + ]) + .txOutInlineDatumValue(metadataToCip68(userTokenMetadata)) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .txInCollateral( + collateral.input.txHash, + collateral.input.outputIndex, + collateral.output.amount, + collateral.output.address, + ) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + return ( + + setUserInput(e.target.value)} + placeholder="Token Name" + label="Token Name" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/minting/minting-native-script.tsx b/apps/playground/src/pages/apis/txbuilder/minting/minting-native-script.tsx new file mode 100644 index 000000000..337290e30 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/minting-native-script.tsx @@ -0,0 +1,186 @@ +import Link from "next/link"; + +import { + AssetMetadata, + cst, + ForgeScript, + NativeScript, + resolvePaymentKeyHash, + stringToHex, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses, demoAssetMetadata } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderMintingNativeScript() { + return ( + + ); +} + +function Left() { + let codeSnippetNative = ``; + codeSnippetNative += `import type { NativeScript } from '@meshsdk/core';\n`; + codeSnippetNative += `\n`; + + codeSnippetNative += `const usedAddress = await wallet.getUsedAddresses();\n`; + codeSnippetNative += `const address = usedAddress[0];\n`; + codeSnippetNative += `\n`; + codeSnippetNative += `const keyHash = resolvePaymentKeyHash(address);\n\n`; + + codeSnippetNative += `const nativeScript: NativeScript = {\n`; + codeSnippetNative += ` type: "all",\n`; + codeSnippetNative += ` scripts: [\n`; + codeSnippetNative += ` {\n`; + codeSnippetNative += ` type: "before",\n`; + codeSnippetNative += ` slot: "99999999",\n`; + codeSnippetNative += ` },\n`; + codeSnippetNative += ` {\n`; + codeSnippetNative += ` type: "sig",\n`; + codeSnippetNative += ` keyHash: keyHash,\n`; + codeSnippetNative += ` },\n`; + codeSnippetNative += ` ],\n`; + codeSnippetNative += `};\n`; + + let codeSnippet1 = `const forgingScript = ForgeScript.fromNativeScript(nativeScript);\n`; + + let codeSnippet2 = `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + codeSnippet2 += `const asset: Mint = {\n`; + codeSnippet2 += ` assetName: 'MeshToken',\n`; + codeSnippet2 += ` assetQuantity: '1',\n`; + codeSnippet2 += ` metadata: assetMetadata,\n`; + codeSnippet2 += ` label: '721',\n`; + codeSnippet2 += ` recipient: '${demoAddresses.testnet}' \n`; + codeSnippet2 += `};\n`; + + let codeSnippet3 = `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet3 += `tx.mintAsset(\n`; + codeSnippet3 += ` forgingScript,\n`; + codeSnippet3 += ` asset,\n`; + codeSnippet3 += `);\n\n`; + codeSnippet3 += `const unsignedTx = await tx.build();\n`; + codeSnippet3 += `const signedTx = await wallet.signTx(unsignedTx);\n`; + codeSnippet3 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + Additionally, you can define the forging script with{" "} + NativeScript. For example if you want to have a policy + locking script, you can create a new ForgeScript from{" "} + NativeScript: +

    + + +

    + To get the keyHash, use the{" "} + resolvePaymentKeyHash(). To get the slot, use the{" "} + resolveSlotNo(). Check out{" "} + Resolvers on how to use these + functions. +

    +

    + Important: if you are using a policy locking script, you must define{" "} + setTimeToExpire before the expiry; otherwise, you will + catch the ScriptWitnessNotValidatingUTXOW error. See{" "} + Transaction - set time. +

    + +

    + Next, we define the metadata for the asset and create the asset object: +

    + + + +

    + Finally, we create a transaction and mint the asset with the{" "} + mintAsset method: +

    + + +

    + You can get the policy ID for this Native Script with{" "} + resolveNativeScriptHash: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const changeAddress = await wallet.getChangeAddress(); + + const keyHash = resolvePaymentKeyHash(changeAddress); + + const nativeScript: NativeScript = { + type: "all", + scripts: [ + { + type: "before", + slot: "99999999", + }, + { + type: "sig", + keyHash: keyHash, + }, + ], + }; + const forgingScript = ForgeScript.fromNativeScript(nativeScript); + + const policyId = cst + .deserializeNativeScript(forgingScript) + .hash() + .toString(); + const tokenName = "MeshToken"; + const tokenNameHex = stringToHex(tokenName); + const metadata = { [policyId]: { [tokenName]: { ...demoAssetMetadata } } }; + + const txBuilder = getTxBuilder(); + + const unsignedTx = await txBuilder + .mint("1", policyId, tokenNameHex) + .mintingScript(forgingScript) + .metadataValue("721", metadata) + .changeAddress(changeAddress) + .invalidHereafter(99999999) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/minting/minting-one-signature.tsx b/apps/playground/src/pages/apis/txbuilder/minting/minting-one-signature.tsx new file mode 100644 index 000000000..9271f6602 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/minting-one-signature.tsx @@ -0,0 +1,93 @@ +import { + cst, + ForgeScript, + resolveScriptHash, + stringToHex, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAssetMetadata } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderMintAsset() { + return ( + + ); +} + +function Left() { + let code1 = ``; + code1 += `const unsignedTx = await txBuilder\n`; + code1 += ` .txIn(utxo.input.txHash, utxo.input.outputIndex)\n`; + code1 += ` .mint("1", policyId, tokenName)\n`; + code1 += ` .mintingScript(forgingScript)\n`; + code1 += ` .changeAddress(changeAddress)\n`; + code1 += ` .complete();\n`; + + return ( + <> +

    + Sending values to a recipient is a common operation in blockchain + transactions. The Mesh SDK provides a simple way to build a transaction + to send values to a recipient. +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + + const changeAddress = await wallet.getChangeAddress(); + const forgingScript = ForgeScript.withOneSignature(changeAddress); + + const policyId = resolveScriptHash(forgingScript); + const tokenName = "MeshToken"; + const tokenNameHex = stringToHex(tokenName); + + const metadata = { [policyId]: { [tokenName]: { ...demoAssetMetadata } } }; + + const txBuilder = getTxBuilder(); + + const unsignedTx = await txBuilder + .mint("1", policyId, tokenNameHex) + .mintingScript(forgingScript) + .metadataValue("721", metadata) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + // todo docs, determine the `cst` import + let codeSnippet = ``; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/minting/minting-plutus-script.tsx b/apps/playground/src/pages/apis/txbuilder/minting/minting-plutus-script.tsx new file mode 100644 index 000000000..d7fdb8713 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/minting/minting-plutus-script.tsx @@ -0,0 +1,201 @@ +import { useState } from "react"; + +import { + mConStr0, + PlutusScript, + resolveScriptHash, + stringToHex, + UTxO, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { + demoAddresses, + demoAssetMetadata, + demoPlutusMintingScript, +} from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderMintingPlutusScript() { + const [userInput, setUserInput] = useState("mesh"); + + return ( + + ); +} + +function Left(userInput: string) { + let codeSnippet1 = ``; + + codeSnippet1 += `const script: PlutusScript = {\n`; + codeSnippet1 += ` code: '${demoPlutusMintingScript}',\n`; + codeSnippet1 += ` version: "V2",\n`; + codeSnippet1 += `};\n`; + codeSnippet1 += `\n`; + codeSnippet1 += `const redeemer = {\n`; + codeSnippet1 += ` data: { alternative: 0, fields: ["${userInput}"] },\n`; + codeSnippet1 += ` tag: "MINT",\n`; + codeSnippet1 += `};\n`; + + let codeSnippet2 = `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + codeSnippet2 += `const asset: Mint = {\n`; + codeSnippet2 += ` assetName: 'MeshToken',\n`; + codeSnippet2 += ` assetQuantity: '1',\n`; + codeSnippet2 += ` metadata: assetMetadata,\n`; + codeSnippet2 += ` label: '721',\n`; + codeSnippet2 += ` recipient: '${demoAddresses.testnet}' \n`; + codeSnippet2 += `};\n`; + + let codeSnippet3 = ``; + codeSnippet3 += `const tx = new Transaction({ initiator: wallet })\n`; + codeSnippet3 += ` .mintAsset(script, asset, redeemer)\n`; + codeSnippet3 += ` .setRequiredSigners([address]);\n`; + codeSnippet3 += `\n`; + codeSnippet3 += `const unsignedTx = await tx.build();\n`; + codeSnippet3 += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + codeSnippet3 += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + <> +

    + In this section, we will see how to mint native assets with a{" "} + PlutusScript. +

    +

    + The PlutusScript object is used to define the Plutus script + that will be used to mint the asset. The redeemer object is + used to provide the data that the validator script will use to validate + the transaction. For this example, the validator script is expecting a + tag of "MINT" and a data field of "mesh". +

    + +

    + Similar to previous examples, we define the asset metadata and mint + object. The asset metadata is a JSON object that contains the metadata + for the asset. The mint object contains the asset name, quantity, + metadata, label, and recipient address. +

    + +

    + Finally, we create a transaction and mint the asset with the{" "} + mintAsset method. We set the required signers to include + the address that is minting the asset. +

    + + + ); +} + +function Right(userInput: string, setUserInput: (value: string) => void) { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const collateral: UTxO = (await wallet.getCollateral())[0]!; + const changeAddress = await wallet.getChangeAddress(); + + const policyId = resolveScriptHash(demoPlutusMintingScript, "V2"); + const tokenName = "MeshToken"; + const tokenNameHex = stringToHex(tokenName); + const metadata = { [policyId]: { [tokenName]: { ...demoAssetMetadata } } }; + + const txBuilder = getTxBuilder(); + + const unsignedTx = await txBuilder + .mintPlutusScriptV2() + .mint("1", policyId, tokenNameHex) + .mintingScript(demoPlutusMintingScript) + .mintRedeemerValue(mConStr0([userInput])) + .metadataValue("721", metadata) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .txInCollateral( + collateral.input.txHash, + collateral.input.outputIndex, + collateral.output.amount, + collateral.output.address, + ) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx, true); + const txHash = await wallet.submitTx(signedTx); + + return txHash; + } + + // todo docs, determine the `cst` import + let code = ``; + code += `const usedAddress = await wallet.getUsedAddresses();\n`; + code += `const address = usedAddress[0];\n`; + code += `\n`; + code += `const assetMetadata: AssetMetadata = ${JSON.stringify( + demoAssetMetadata, + null, + 2, + )};\n\n`; + code += `const asset: Mint = {\n`; + code += ` assetName: "MeshToken",\n`; + code += ` assetQuantity: "1",\n`; + code += ` metadata: assetMetadata,\n`; + code += ` label: "721",\n`; + code += ` recipient: address,\n`; + code += `};\n`; + code += `\n`; + code += `const script: PlutusScript = {\n`; + code += ` code: demoPlutusMintingScript,\n`; + code += ` version: "V2",\n`; + code += `};\n`; + code += `\n`; + code += `const redeemer = {\n`; + code += ` data: { alternative: 0, fields: ['${userInput}'] },\n`; + code += ` tag: "MINT",\n`; + code += `};\n`; + code += `\n`; + code += `const tx = new Transaction({ initiator: wallet })\n`; + code += ` .mintAsset(script, asset, redeemer)\n`; + code += ` .setRequiredSigners([address]);\n`; + code += `\n`; + code += `const unsignedTx = await tx.build();\n`; + code += `const signedTx = await wallet.signTx(unsignedTx, true);\n`; + code += `const txHash = await wallet.submitTx(signedTx);\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Datum value" + label="Datum value" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx b/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx new file mode 100644 index 000000000..d68097748 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx @@ -0,0 +1,41 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaTxbuilderSmartContract } from "~/data/links-txbuilders"; +import TxbuilderContractLockAssets from "./lock-assets"; +import TxbuilderContractPlutusMinting from "./plutus-minting"; +import TxbuilderContractUnlockAssets from "./unlock-assets"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Lock assets", to: "TxbuilderContractLockAssets" }, + { label: "Unlock assets", to: "TxbuilderContractUnlockAssets" }, + { label: "Plutus minting", to: "TxbuilderContractPlutusMinting" }, + ]; + + return ( + <> + + + + <> + + + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/txbuilder/smart-contract/lock-assets.tsx b/apps/playground/src/pages/apis/txbuilder/smart-contract/lock-assets.tsx new file mode 100644 index 000000000..87353eab5 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/smart-contract/lock-assets.tsx @@ -0,0 +1,110 @@ +import { useState } from "react"; + +import { + keepRelevant, + MeshTxBuilder, + PlutusScript, + Quantity, + resolvePlutusScriptAddress, + Unit, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderContractLockAssets() { + return ( + + ); +} + +function Left() { + let code1 = ``; + + return ( + <> +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [userInput, setUserInput] = useState(demoAsset); + const [userInput2, setUserInput2] = useState("meshsecretcode"); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + + const changeAddress = await wallet.getChangeAddress(); + + const script: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V2", + }; + const scriptAddress = resolvePlutusScriptAddress(script, 0); + + const txBuilder = getTxBuilder(); + + // todo + const unsignedTx = await txBuilder + .txOut(scriptAddress, []) + .txOutInlineDatumValue(userInput2) + .changeAddress(changeAddress) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let codeSnippet = `import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core";\n\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Asset unit" + label="Asset unit" + key={0} + />, + setUserInput2(e.target.value)} + placeholder="Datum" + label="Datum" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/smart-contract/plutus-minting.tsx b/apps/playground/src/pages/apis/txbuilder/smart-contract/plutus-minting.tsx new file mode 100644 index 000000000..7df40ee87 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/smart-contract/plutus-minting.tsx @@ -0,0 +1,102 @@ +import { useState } from "react"; + +import { + keepRelevant, + MeshTxBuilder, + PlutusScript, + Quantity, + Unit, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoPlutusMintingScript } from "~/data/cardano"; + +export default function TxbuilderContractPlutusMinting() { + return ( + + ); +} + +function Left() { + let code1 = ``; + + return ( + <> +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [userInput, setUserInput] = useState("mesh"); + + async function runDemo() { + const blockchainProvider = getProvider(); + + const walletAddress = await wallet.getChangeAddress(); + + // script + const script: PlutusScript = { + code: demoPlutusMintingScript, + version: "V2", + }; + + // get utxo + const assetMap = new Map(); + assetMap.set("lovelace", "5000000"); + + const walletUtxos = await wallet.getUtxos(); + const utxos = keepRelevant(assetMap, walletUtxos); + const utxo = utxos[0]; + + if (utxo === undefined) { + throw new Error("No utxo found"); + } + + // const signedTx = await wallet.signTx(unsignedTx); + // const txHash = await wallet.submitTx(signedTx); + return "txHash"; + } + + let codeSnippet = `import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core";\n\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Datum" + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/smart-contract/unlock-assets.tsx b/apps/playground/src/pages/apis/txbuilder/smart-contract/unlock-assets.tsx new file mode 100644 index 000000000..5e399583e --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/smart-contract/unlock-assets.tsx @@ -0,0 +1,130 @@ +import { useState } from "react"; + +import { + keepRelevant, + mConStr0, + MeshTxBuilder, + PlutusScript, + Quantity, + resolvePlutusScriptAddress, + Unit, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { fetchAssetUtxo } from "~/components/cardano/fetch-utxo-by-datum"; +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano"; +import { getTxBuilder } from "../common"; + +export default function TxbuilderContractUnlockAssets() { + return ( + + ); +} + +function Left() { + let code1 = ``; + + return ( + <> +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [userInput, setUserInput] = useState(demoAsset); + const [userInput2, setUserInput2] = useState("meshsecretcode"); + + async function runDemo() { + const utxos = await wallet.getUtxos(); + const collateral = await wallet.getCollateral(); + + const changeAddress = await wallet.getChangeAddress(); + + const script: PlutusScript = { + code: demoPlutusAlwaysSucceedScript, + version: "V2", + }; + const scriptAddress = resolvePlutusScriptAddress(script, 0); + + const assetUtxo = await fetchAssetUtxo({ + address: scriptAddress, + asset: userInput, + datum: userInput2, + }); + if (assetUtxo === undefined) { + throw "Asset UTXO not found"; + } + + const txBuilder = getTxBuilder(); + + // todo + const unsignedTx = await txBuilder + .spendingPlutusScriptV2() + .txIn(assetUtxo.input.txHash, assetUtxo.input.outputIndex) + .txInInlineDatumPresent() + .txInRedeemerValue(mConStr0([])) + // .txInScript(getScriptCbor("Spending")) // todo + .txOut(changeAddress, []) + .changeAddress(changeAddress) + .txInCollateral( + collateral[0]?.input.txHash!, + collateral[0]?.input.outputIndex!, + ) + .selectUtxosFrom(utxos) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let codeSnippet = `import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core";\n\n`; + + return ( + + setUserInput(e.target.value)} + placeholder="Asset unit" + label="Asset unit" + key={0} + />, + setUserInput2(e.target.value)} + placeholder="Datum" + label="Datum" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/staking/delegate-stake.tsx b/apps/playground/src/pages/apis/txbuilder/staking/delegate-stake.tsx new file mode 100644 index 000000000..f630445a9 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/staking/delegate-stake.tsx @@ -0,0 +1,124 @@ +import { useState } from "react"; + +import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; + +export default function TxbuilderSendValues() { + return ( + + ); +} + +function Left() { + let code1 = ``; + code1 += `const txBuilder = new MeshTxBuilder({\n`; + code1 += ` fetcher: blockchainProvider,\n`; + code1 += `});\n`; + code1 += `\n`; + code1 += `const unsignedTx = await txBuilder\n`; + code1 += ` .txIn(utxo.input.txHash, utxo.input.outputIndex)\n`; + code1 += ` .txOut(address, [{ unit: "lovelace", quantity: '1000000' }])\n`; + code1 += ` .changeAddress(await wallet.getChangeAddress())\n`; + code1 += ` .complete();\n`; + + return ( + <> +

    + Sending values to a recipient is a common operation in blockchain + transactions. The Mesh SDK provides a simple way to build a transaction + to send values to a recipient. +

    +

    + The following shows a simple example of building a transaction to send + values to a recipient: +

    + + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [amount, setAmount] = useState("2000000"); + + async function runDemo() { + const blockchainProvider = getProvider(); + + // get utxo + const assetMap = new Map(); + assetMap.set("lovelace", amount); + + const walletUtxos = await wallet.getUtxos(); + const utxos = keepRelevant(assetMap, walletUtxos); + const utxo = utxos[0]; + + if (utxo === undefined) { + throw new Error("No utxo found"); + } + + // transaction + const txBuilder = new MeshTxBuilder({ + fetcher: blockchainProvider, + }); + + const unsignedTx = await txBuilder + .txIn(utxo.input.txHash, utxo.input.outputIndex) + .txOut(address, [{ unit: "lovelace", quantity: amount }]) + .changeAddress(await wallet.getChangeAddress()) + .complete(); + + const signedTx = await wallet.signTx(unsignedTx); + const txHash = await wallet.submitTx(signedTx); + return txHash; + } + + let codeSnippet = `import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core";\n\n`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/txbuilder/staking/index.tsx b/apps/playground/src/pages/apis/txbuilder/staking/index.tsx new file mode 100644 index 000000000..1d9067308 --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/staking/index.tsx @@ -0,0 +1,33 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaTxbuilderStaking } from "~/data/links-txbuilders"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Send values", to: "sendValues" }, + { label: "Build with Object", to: "buildWithObject" }, + ]; + + return ( + <> + + + + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/txbuilder/staking/register-stake.tsx b/apps/playground/src/pages/apis/txbuilder/staking/register-stake.tsx new file mode 100644 index 000000000..0c4114baa --- /dev/null +++ b/apps/playground/src/pages/apis/txbuilder/staking/register-stake.tsx @@ -0,0 +1,150 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { + keepRelevant, + MeshTxBuilder, + MeshTxBuilderBody, + Quantity, + Unit, +} from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import { demoAddresses } from "~/data/cardano"; + +export default function TxbuilderBuildWithObject() { + return ( + + ); +} + +function Left() { + let code1 = ``; + + return ( + <> +

    + One alternative to use the lower level APIs is to build the transaction + with an object. +

    +

    + The following shows a simple example of building a transaction to send + values to a recipient: +

    + +

    + + Full Code Snippet in Github + +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + const [address, setAddress] = useState(demoAddresses.testnet); + const [amount, setAmount] = useState("2000000"); + + async function runDemo() { + const blockchainProvider = getProvider(); + + const changeAddress = await wallet.getChangeAddress(); + + // get utxo + const assetMap = new Map(); + assetMap.set("lovelace", amount); + + const walletUtxos = await wallet.getUtxos(); + const utxos = keepRelevant(assetMap, walletUtxos); + const utxo = utxos[0]; + + if (utxo === undefined) { + throw new Error("No utxo found"); + } + + // transaction + const txBuilder = new MeshTxBuilder({ + fetcher: blockchainProvider, + }); + + // const meshTxBody: MeshTxBuilderBody = { + // inputs: [ + // { + // type: "PubKey", + // txIn: { + // txHash: utxo.input.txHash, + // txIndex: utxo.input.outputIndex, + // }, + // }, + // ], + // outputs: [ + // { + // address: address, + // amount: [{ unit: "lovelace", quantity: amount }], + // }, + // ], + // collaterals: [], + // requiredSignatures: [], + // referenceInputs: [], + // mints: [], + // changeAddress: changeAddress, + // metadata: [], + // validityRange: {}, + // signingKey: [], + // }; + + // const unsignedTx = await mesh.complete(meshTxBody); + + // const signedTx = await wallet.signTx(unsignedTx); + // const txHash = await wallet.submitTx(signedTx); + return 'txHash'; + } + + let codeSnippet = `import { keepRelevant, MeshTxBuilder, Quantity, Unit } from "@meshsdk/core";\n\n`; + + return ( + + setAddress(e.target.value)} + placeholder="Address" + label="Address" + key={0} + />, + setAmount(e.target.value)} + placeholder="Amount" + label="Amount" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/deserializers/index.tsx b/apps/playground/src/pages/apis/utilities/deserializers/index.tsx new file mode 100644 index 000000000..6df1900eb --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/deserializers/index.tsx @@ -0,0 +1,32 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaDeserializers } from "~/data/links-utilities"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Coming soon", to: "resolveDataHash" }, + ]; + + return ( + <> + + + + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/utilities/deserializers/resolve-data-hash.tsx b/apps/playground/src/pages/apis/utilities/deserializers/resolve-data-hash.tsx new file mode 100644 index 000000000..dac16a3b7 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/deserializers/resolve-data-hash.tsx @@ -0,0 +1,70 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { Data } from "@meshsdk/core"; +import { resolveDataHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveDataHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts datum into hash. Getting the hash is useful when you need to + query for the UTXO that contain the assets you need for your + transaction's input. +

    +

    + Explore Transaction to learn more + about designing Datum, and learn how to query for UTXOs containing the + datum hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState("supersecretdatum"); + + async function runDemo() { + const datum: Data = userInput; + const dataHash = resolveDataHash(datum); + return dataHash; + } + + let codeSnippet = `resolveDataHash('${userInput}');`; + + return ( + + setUserInput(e.target.value)} + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/index.tsx b/apps/playground/src/pages/apis/utilities/index.tsx new file mode 100644 index 000000000..4f4db0db7 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/index.tsx @@ -0,0 +1,20 @@ +import type { NextPage } from "next"; + +import HeaderAndCards from "~/components/layouts/header-and-cards"; +import Metatags from "~/components/site/metatags"; +import { linksUtilities, metaUtilities } from "~/data/links-utilities"; + +const ReactPage: NextPage = () => { + return ( + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/utilities/resolvers/index.tsx b/apps/playground/src/pages/apis/utilities/resolvers/index.tsx new file mode 100644 index 000000000..7c19b8940 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/index.tsx @@ -0,0 +1,68 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaResolvers } from "~/data/links-utilities"; +import ResolveDataHash from "./resolve-data-hash"; +import ResolveEpochNumber from "./resolve-epoch-number"; +import ResolveFingerprint from "./resolve-fingerprint"; +import ResolveNativeScriptAddress from "./resolve-native-script-address"; +import ResolveNativeScriptHash from "./resolve-native-script-hash"; +import ResolvePaymentKeyHash from "./resolve-payment-key-hash"; +import ResolvePlutusScriptAddress from "./resolve-plutus-script-address"; +import ResolvePlutusScriptHash from "./resolve-plutus-script-hash"; +import ResolvePrivateKey from "./resolve-private-key"; +import ResolveSlotNumber from "./resolve-slot-number"; +import ResolveRewardAddress from "./resolve-stake-address"; +import ResolveRewardHash from "./resolve-stake-hash"; +import ResolveTxHash from "./resolve-tx-hash"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Data Hash", to: "resolveDataHash" }, + { label: "Fingerprint", to: "resolveFingerprint" }, + { label: "Native Script Address", to: "resolveNativeScriptAddress" }, + { label: "Native Script Hash", to: "resolveNativeScriptHash" }, + { label: "Payment Key Hash", to: "resolvePaymentKeyHash" }, + { label: "Plutus Script Address", to: "resolvePlutusScriptAddress" }, + { label: "Plutus Script Hash", to: "resolvePlutusScriptHash" }, + { label: "Private Key", to: "resolvePrivateKey" }, + { label: "Stake Address", to: "resolveRewardAddress" }, + { label: "Stake Key Hash", to: "resolveRewardHash" }, + { label: "Transaction Hash", to: "resolveTxHash" }, + { label: "Epoch Number", to: "resolveEpochNumber" }, + { label: "Slot Number", to: "resolveSlotNumber" }, + ]; + + return ( + <> + + + + <> + + + + + + + + + + + + + + + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-data-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-data-hash.tsx new file mode 100644 index 000000000..dac16a3b7 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-data-hash.tsx @@ -0,0 +1,70 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { Data } from "@meshsdk/core"; +import { resolveDataHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveDataHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts datum into hash. Getting the hash is useful when you need to + query for the UTXO that contain the assets you need for your + transaction's input. +

    +

    + Explore Transaction to learn more + about designing Datum, and learn how to query for UTXOs containing the + datum hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState("supersecretdatum"); + + async function runDemo() { + const datum: Data = userInput; + const dataHash = resolveDataHash(datum); + return dataHash; + } + + let codeSnippet = `resolveDataHash('${userInput}');`; + + return ( + + setUserInput(e.target.value)} + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-epoch-number.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-epoch-number.tsx new file mode 100644 index 000000000..eb0c53d44 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-epoch-number.tsx @@ -0,0 +1,81 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { resolveEpochNo } from "@meshsdk/core"; + +import Select from "~/components/form/select"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveEpochNumber() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts datum into hash. Getting the hash is useful when you need to + query for the UTXO that contain the assets you need for your + transaction's input. +

    +

    + Explore Transaction to learn more + about designing Datum, and learn how to query for UTXOs containing the + datum hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState< + "preprod" | "testnet" | "preview" | "mainnet" + >("preprod"); + + async function runDemo() { + const slot = resolveEpochNo(userInput); + return slot; + } + + let codeSnippet = `resolveDataHash('${userInput}');`; + + return ( + + ) => + setUserInput( + e.target.value as "preprod" | "testnet" | "preview" | "mainnet", + ) + } + label="Select network" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-fingerprint.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-fingerprint.tsx new file mode 100644 index 000000000..dba554cc0 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-fingerprint.tsx @@ -0,0 +1,82 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { resolveFingerprint } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveFingerprint() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Takes policy ID and asset name, and return asset fingerprint based on{" "} + + CIP-14 + + . +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + "426117329844ccb3b0ba877220ff06a5bdf21eab3fb33e2f3a3f8e69", + ); + const [userInput2, setUserInput2] = useState("4d657368546f6b656e"); + + async function runDemo() { + const hash = resolveFingerprint(userInput, userInput2); + return hash; + } + + let codeSnippet = ``; + codeSnippet += `resolveFingerprint(\n`; + codeSnippet += ` '${userInput}',\n`; + codeSnippet += ` '${userInput2}'\n`; + codeSnippet += `)\n`; + + return ( + + setUserInput(e.target.value)} + label="Policy ID" + key={0} + />, + setUserInput2(e.target.value)} + label="Asset Name" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-address.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-address.tsx new file mode 100644 index 000000000..0934426fa --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-address.tsx @@ -0,0 +1,96 @@ +import { useState } from "react"; + +import { NativeScript } from "@meshsdk/core"; +import { + resolveNativeScriptAddress, + resolvePaymentKeyHash, +} from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolveNativeScriptAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts NativeScript into address. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState(demoAddresses.testnet); + + async function runDemo() { + const keyHash = resolvePaymentKeyHash(userInput); + + const nativeScript: NativeScript = { + type: "all", + scripts: [ + { + type: "sig", + keyHash: keyHash, + }, + ], + }; + + const address = resolveNativeScriptAddress( + nativeScript, + userInput.substring(0, 5) === "addr1" ? 1 : 0, + ); + return address; + } + + let codeSnippet = ``; + codeSnippet += `const keyHash = resolvePaymentKeyHash('${userInput}');\n`; + codeSnippet += `\n`; + codeSnippet += `const nativeScript: NativeScript = {\n`; + codeSnippet += ` type: "all",\n`; + codeSnippet += ` scripts: [\n`; + codeSnippet += ` {\n`; + codeSnippet += ` type: "sig",\n`; + codeSnippet += ` keyHash: keyHash,\n`; + codeSnippet += ` },\n`; + codeSnippet += ` ],\n`; + codeSnippet += `};\n`; + codeSnippet += `\n`; + codeSnippet += `const address = resolveNativeScriptAddress(\n`; + codeSnippet += ` nativeScript,\n`; + codeSnippet += ` userInput.substring(0, 5) === "addr1" ? 1 : 0,\n`; + codeSnippet += `);\n`; + + return ( + + setUserInput(e.target.value)} + label="Address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-hash.tsx new file mode 100644 index 000000000..c9d3ce90c --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-native-script-hash.tsx @@ -0,0 +1,90 @@ +import { useState } from "react"; + +import { NativeScript } from "@meshsdk/core"; +import { + resolveNativeScriptHash, + resolvePaymentKeyHash, +} from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolveNativeScriptHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts NativeScript into hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState(demoAddresses.testnet); + + async function runDemo() { + const keyHash = resolvePaymentKeyHash(userInput); + + const nativeScript: NativeScript = { + type: "all", + scripts: [ + { + type: "sig", + keyHash: keyHash, + }, + ], + }; + + const hash = resolveNativeScriptHash(nativeScript); + return hash; + } + + let codeSnippet = ``; + codeSnippet += `const keyHash = resolvePaymentKeyHash('${userInput}');\n`; + codeSnippet += `\n`; + codeSnippet += `const nativeScript: NativeScript = {\n`; + codeSnippet += ` type: "all",\n`; + codeSnippet += ` scripts: [\n`; + codeSnippet += ` {\n`; + codeSnippet += ` type: "sig",\n`; + codeSnippet += ` keyHash: keyHash,\n`; + codeSnippet += ` },\n`; + codeSnippet += ` ],\n`; + codeSnippet += `};\n`; + codeSnippet += `\n`; + codeSnippet += `const hash = resolveNativeScriptHash(nativeScript);`; + + return ( + + setUserInput(e.target.value)} + label="Address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-payment-key-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-payment-key-hash.tsx new file mode 100644 index 000000000..6063ab570 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-payment-key-hash.tsx @@ -0,0 +1,63 @@ +import { useState } from "react"; + +import { resolvePaymentKeyHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolvePaymentKeyHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide an address, and resolvePaymentKeyHash will return + the pub key hash of the payment key. This key hash is useful for + building the NativeScript. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState(demoAddresses.testnet); + + async function runDemo() { + const hash = resolvePaymentKeyHash(userInput); + return hash; + } + + let codeSnippet = `resolvePaymentKeyHash('${userInput}')`; + + return ( + + setUserInput(e.target.value)} + label="Address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-address.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-address.tsx new file mode 100644 index 000000000..5989e15ce --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-address.tsx @@ -0,0 +1,106 @@ +import { useState } from "react"; + +import { PlutusScript, resolvePlutusScriptAddress } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import Select from "~/components/form/select"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoPlutusAlwaysSucceedScript } from "~/data/cardano"; + +export default function ResolvePlutusScriptAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide the Plutus script in CBOR, and{" "} + resolvePlutusScriptAddress will return a bech32 address of + the script. +

    +

    + For example, we can get the address of the always succeed{" "} + smart contract. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + demoPlutusAlwaysSucceedScript, + ); + const [userInput2, setUserInput2] = useState(0); + const [userInput3, setUserInput3] = useState<"V1" | "V2" | "V3">("V2"); + + async function runDemo() { + const script: PlutusScript = { + code: userInput, + version: userInput3, + }; + const address = resolvePlutusScriptAddress(script, userInput2); + return address; + } + + let codeSnippet = ``; + codeSnippet += `const script: PlutusScript = {\n`; + codeSnippet += ` code: '${userInput}',\n`; + codeSnippet += ` version: "${userInput3}",\n`; + codeSnippet += `};\n`; + codeSnippet += `const address = resolvePlutusScriptAddress(script, ${userInput2});\n`; + + return ( + + setUserInput(e.target.value)} + label="Plutus script CBOR" + key={0} + />, + + setUserInput3(e.target.value as "V1" | "V2" | "V3") + } + label="Plutus script version" + key={2} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-hash.tsx new file mode 100644 index 000000000..4b14210e7 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-plutus-script-hash.tsx @@ -0,0 +1,64 @@ +import { useState } from "react"; + +import { resolvePlutusScriptHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolvePlutusScriptHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide the Plutus script address, and resolveScriptHash{" "} + will return a script hash. This script hash can be use for building + minting transaction with Plutus contract. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + "addr_test1wpnlxv2xv9a9ucvnvzqakwepzl9ltx7jzgm53av2e9ncv4sysemm8", + ); + + async function runDemo() { + const hash = resolvePlutusScriptHash(userInput); + return hash; + } + + let codeSnippet = `resolvePlutusScriptHash('${userInput}')`; + + return ( + + setUserInput(e.target.value)} + label="Plutus script address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-private-key.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-private-key.tsx new file mode 100644 index 000000000..0ec75143a --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-private-key.tsx @@ -0,0 +1,74 @@ +import { useState } from "react"; + +import { resolvePrivateKey } from "@meshsdk/core"; + +import Textarea from "~/components/form/textarea"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoMnemonic } from "~/data/cardano"; + +export default function ResolvePrivateKey() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide the mnemonic phrases and resolvePrivateKey will + return a private key. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + JSON.stringify(demoMnemonic, null, 2), + ); + + async function runDemo() { + let _mnemonic = []; + try { + _mnemonic = JSON.parse(userInput); + } catch (e) { + return "Mnemonic input is not a valid array."; + } + const dataHash = resolvePrivateKey(_mnemonic); + return dataHash; + } + + let _mnemonic = JSON.stringify(demoMnemonic); + try { + _mnemonic = JSON.stringify(JSON.parse(userInput)); + } catch (e) {} + let codeSnippet = `resolvePrivateKey(${_mnemonic});`; + + return ( + + setUserInput(e.target.value)} + label="Mnemonic" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-slot-number.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-slot-number.tsx new file mode 100644 index 000000000..8d288de11 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-slot-number.tsx @@ -0,0 +1,81 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { resolveSlotNo } from "@meshsdk/core"; + +import Select from "~/components/form/select"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveSlotNumber() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts datum into hash. Getting the hash is useful when you need to + query for the UTXO that contain the assets you need for your + transaction's input. +

    +

    + Explore Transaction to learn more + about designing Datum, and learn how to query for UTXOs containing the + datum hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState< + "preprod" | "testnet" | "preview" | "mainnet" + >("preprod"); + + async function runDemo() { + const slot = resolveSlotNo(userInput); + return slot; + } + + let codeSnippet = `resolveDataHash('${userInput}');`; + + return ( + + ) => + setUserInput( + e.target.value as "preprod" | "testnet" | "preview" | "mainnet", + ) + } + label="Select network" + key={1} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-address.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-address.tsx new file mode 100644 index 000000000..69a633c56 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-address.tsx @@ -0,0 +1,64 @@ +import { useState } from "react"; + +import { resolveRewardAddress } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolveRewardAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide a wallet address, and resolveRewardAddress will + return a staking address in bech32 format. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + demoAddresses.testnetPayment, + ); + + async function runDemo() { + const rewardAddress = resolveRewardAddress(userInput); + return rewardAddress; + } + + let codeSnippet = `resolveRewardAddress('${userInput}');`; + + return ( + + setUserInput(e.target.value)} + label="Address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-hash.tsx new file mode 100644 index 000000000..6e631b993 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-stake-hash.tsx @@ -0,0 +1,65 @@ +import { useState } from "react"; + +import { resolveStakeKeyHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolveRewardHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide a stake address, and resolveStakeKeyHash will + return the pub key hash of the stake address. This key hash is useful + for building the NativeScript. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState( + demoAddresses.testnetStake, + ); + + async function runDemo() { + const hash = resolveStakeKeyHash(userInput); + return hash; + } + + let codeSnippet = `resolveStakeKeyHash('${userInput}');`; + + return ( + + setUserInput(e.target.value)} + label="Address" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/resolvers/resolve-tx-hash.tsx b/apps/playground/src/pages/apis/utilities/resolvers/resolve-tx-hash.tsx new file mode 100644 index 000000000..25e5bbafd --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/resolvers/resolve-tx-hash.tsx @@ -0,0 +1,76 @@ +import { Transaction } from "@meshsdk/core"; +import { resolveTxHash } from "@meshsdk/core"; +import { useWallet } from "@meshsdk/react"; + +import { getMeshWallet } from "~/components/cardano/mesh-wallet"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import { demoAddresses } from "~/data/cardano"; + +export default function ResolveTxHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Provide a cborTx, resolveTxHash will return + the transaction hash. This hash is useful for creating chain + transactions. +

    + + ); +} + +function Right() { + const { wallet, connected } = useWallet(); + + async function runDemo() { + const tx = new Transaction({ initiator: wallet }); + tx.sendLovelace(demoAddresses.testnet, "1500000"); + const unsignedTx = await tx.build(); + const hash1 = resolveTxHash(unsignedTx); + + const signedTx = await wallet.signTx(unsignedTx, false); + const hash2 = resolveTxHash(signedTx); + + const txHash = await wallet.submitTx(signedTx); + + return { hash1, hash2, txHash }; + } + + let codeSnippet = ``; + codeSnippet += `const tx = new Transaction({ initiator: wallet });\n`; + codeSnippet += `tx.sendLovelace('${demoAddresses.testnet}', '1500000');\n`; + codeSnippet += `\n`; + codeSnippet += `const unsignedTx = await tx.build();\n`; + codeSnippet += `const hash1 = resolveTxHash(unsignedTx);\n`; + codeSnippet += `\n`; + codeSnippet += `const signedTx = await wallet.signTx(unsignedTx, false);\n`; + codeSnippet += `const hash2 = resolveTxHash(signedTx);\n`; + codeSnippet += `\n`; + codeSnippet += `const txHash = await wallet.submitTx(signedTx);\n\n`; + codeSnippet += `// txHash == hash1 == hash2`; + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/utilities/serializers/index.tsx b/apps/playground/src/pages/apis/utilities/serializers/index.tsx new file mode 100644 index 000000000..2dac46942 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/serializers/index.tsx @@ -0,0 +1,30 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaSerializers } from "~/data/links-utilities"; + +const ReactPage: NextPage = () => { + const sidebarItems = [{ label: "Coming soon", to: "resolveDataHash" }]; + + return ( + <> + + + + <> + + + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/utilities/serializers/resolve-data-hash.tsx b/apps/playground/src/pages/apis/utilities/serializers/resolve-data-hash.tsx new file mode 100644 index 000000000..dac16a3b7 --- /dev/null +++ b/apps/playground/src/pages/apis/utilities/serializers/resolve-data-hash.tsx @@ -0,0 +1,70 @@ +import { useState } from "react"; +import Link from "next/link"; + +import { Data } from "@meshsdk/core"; +import { resolveDataHash } from "@meshsdk/core"; + +import Input from "~/components/form/input"; +import InputTable from "~/components/sections/input-table"; +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function ResolveDataHash() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Converts datum into hash. Getting the hash is useful when you need to + query for the UTXO that contain the assets you need for your + transaction's input. +

    +

    + Explore Transaction to learn more + about designing Datum, and learn how to query for UTXOs containing the + datum hash. +

    + + ); +} + +function Right() { + const [userInput, setUserInput] = useState("supersecretdatum"); + + async function runDemo() { + const datum: Data = userInput; + const dataHash = resolveDataHash(datum); + return dataHash; + } + + let codeSnippet = `resolveDataHash('${userInput}');`; + + return ( + + setUserInput(e.target.value)} + label="Datum" + key={0} + />, + ]} + /> + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/generate-wallet.tsx b/apps/playground/src/pages/apis/wallets/appwallet/generate-wallet.tsx new file mode 100644 index 000000000..6d62f7ef5 --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/generate-wallet.tsx @@ -0,0 +1,57 @@ +import Link from "next/link"; + +import { AppWallet } from "@meshsdk/core"; + +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; + +export default function AppWalletGenerateWallet() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + You can generate deterministic keys based on the{" "} + + Bitcoin BIP39 + + . These mnemonic phrases allow you to recover your wallet. +

    +

    + Once you have your mnemonic phrase, you can use it to generate your + deterministic keys. See Load AppWallet in the following + section on loading a mnemonic phrase. It will typically generate a + series of private keys and corresponding public keys, which you can use + to manage your cryptocurrencies. +

    + + ); +} + +function Right() { + async function runDemo() { + return AppWallet.brew(); + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/get-enterprise-address.tsx b/apps/playground/src/pages/apis/wallets/appwallet/get-enterprise-address.tsx new file mode 100644 index 000000000..e5bf7d948 --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/get-enterprise-address.tsx @@ -0,0 +1,46 @@ +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import useAppWallet from "~/contexts/app-wallet"; + +export default function AppWalletGetEnterpriseAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Get wallet's address. For multi-addresses wallet, it will return the + first address. To choose other address, `accountIndex` can be specified. +

    + + ); +} + +function Right() { + const { wallet, walletConnected } = useAppWallet(); + + async function runDemo() { + return wallet.getEnterpriseAddress(); + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/get-networkid.tsx b/apps/playground/src/pages/apis/wallets/appwallet/get-networkid.tsx new file mode 100644 index 000000000..4c49f0cd0 --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/get-networkid.tsx @@ -0,0 +1,48 @@ +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import useAppWallet from "~/contexts/app-wallet"; + +export default function AppWalletGetNetworkId() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Returns the network ID of the currently connected account.{" "} + 0 is testnet and 1 is mainnet but other + networks can possibly be returned by wallets. Those other network ID + values are not governed by CIP-30. This result will stay the same unless + the connected account has changed. +

    + + ); +} + +function Right() { + const { wallet, walletConnected } = useAppWallet(); + async function runDemo() { + let results = wallet.getNetworkId(); + return results; + } + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/get-payment-address.tsx b/apps/playground/src/pages/apis/wallets/appwallet/get-payment-address.tsx new file mode 100644 index 000000000..bc304bad2 --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/get-payment-address.tsx @@ -0,0 +1,46 @@ +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import useAppWallet from "~/contexts/app-wallet"; + +export default function AppWalletGetPaymentAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Get wallet's address. For multi-addresses wallet, it will return the + first address. To choose other address, `accountIndex` can be specified. +

    + + ); +} + +function Right() { + const { wallet, walletConnected } = useAppWallet(); + + async function runDemo() { + return wallet.getPaymentAddress(); + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/get-reward-address.tsx b/apps/playground/src/pages/apis/wallets/appwallet/get-reward-address.tsx new file mode 100644 index 000000000..4522acfdd --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/get-reward-address.tsx @@ -0,0 +1,47 @@ +import LiveCodeDemo from "~/components/sections/live-code-demo"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import useAppWallet from "~/contexts/app-wallet"; + +export default function AppWalletGetRewardAddress() { + return ( + + ); +} + +function Left() { + return ( + <> +

    + Get wallet's reward address. For multi-addresses wallet, it will return + the first address. To choose other address, `accountIndex` can be + specified. +

    + + ); +} + +function Right() { + const { wallet, walletConnected } = useAppWallet(); + + async function runDemo() { + return wallet.getRewardAddress(); + } + + return ( + + ); +} diff --git a/apps/playground/src/pages/apis/wallets/appwallet/index.tsx b/apps/playground/src/pages/apis/wallets/appwallet/index.tsx new file mode 100644 index 000000000..faba4f39a --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/index.tsx @@ -0,0 +1,56 @@ +import type { NextPage } from "next"; + +import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth"; +import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body"; +import Metatags from "~/components/site/metatags"; +import { metaAppwallet } from "~/data/links-wallets"; +import AppWalletGenerateWallet from "./generate-wallet"; +import AppWalletGetEnterpriseAddress from "./get-enterprise-address"; +import AppWalletGetNetworkId from "./get-networkid"; +import AppWalletGetPaymentAddress from "./get-payment-address"; +import AppWalletGetRewardAddress from "./get-reward-address"; +import AppwWalletLoadWallet from "./load-wallet"; +import AppWalletSignData from "./sign-data"; +import AppWalletSignTx from "./sign-tx"; + +const ReactPage: NextPage = () => { + const sidebarItems = [ + { label: "Generate wallet", to: "generateWallet" }, + { label: "Load wallet", to: "loadWallet" }, + { label: "Get payment address", to: "getPaymentAddress" }, + { label: "Get enterprise address", to: "getEnterpriseAddress" }, + { label: "Get reward address", to: "getRewardAddress" }, + { label: "Get network ID", to: "getNetworkId" }, + { label: "Sign transactions", to: "signTx" }, + { label: "Sign data", to: "signData" }, + ]; + + return ( + <> + + + +

    + AppWallet is useful for building other user wallets and + fully customed applications's backend. +

    +
    + + + + + + + + + +
    + + ); +}; + +export default ReactPage; diff --git a/apps/playground/src/pages/apis/wallets/appwallet/load-wallet.tsx b/apps/playground/src/pages/apis/wallets/appwallet/load-wallet.tsx new file mode 100644 index 000000000..52e22693b --- /dev/null +++ b/apps/playground/src/pages/apis/wallets/appwallet/load-wallet.tsx @@ -0,0 +1,398 @@ +import { useState } from "react"; + +import { AppWallet, BlockfrostProvider } from "@meshsdk/core"; + +import ButtonGroup from "~/components/button/button-group"; +import RunDemoButton from "~/components/button/run-demo-button"; +import Card from "~/components/card/card"; +import BlockchainProviderCodeSnippet from "~/components/cardano/blockchain-providers-code-snippet"; +import { getProvider } from "~/components/cardano/mesh-wallet"; +import Input from "~/components/form/input"; +import Textarea from "~/components/form/textarea"; +import DemoResult from "~/components/sections/demo-result"; +import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; +import Codeblock from "~/components/text/codeblock"; +import useAppWallet from "~/contexts/app-wallet"; +import { demoCLIKey, demoMnemonic, demoPrivateKey } from "~/data/cardano"; + +export default function AppwWalletLoadWallet() { + const [demoMethod, setDemoMethod] = useState(0); + const [mnemonic, setMnemonic] = useState( + JSON.stringify(demoMnemonic, null, 2), + ); + const [network, setNetwork] = useState(0); + const [privatekey, setPrivatekey] = useState(demoPrivateKey); + const [paymentSkey, setPaymentSkey] = useState( + demoCLIKey.paymentSkey, + ); + const [stakeSkey, setStakeSkey] = useState(demoCLIKey.stakeSkey); + + return ( + + ); +} + +function Left( + mnemonic: string, + network: number, + privatekey: string, + paymentSkey: string, + stakeSkey: string, +) { + let _mnemonic = JSON.stringify(demoMnemonic); + try { + _mnemonic = JSON.stringify(JSON.parse(mnemonic)); + } catch (e) {} + + let codeCommon = `import { AppWallet } from '@meshsdk/core';\n\n`; + + let code1 = codeCommon; + code1 += `const wallet = new AppWallet({\n`; + code1 += ` networkId: ${network},\n`; + code1 += ` fetcher: blockchainProvider,\n`; + code1 += ` submitter: blockchainProvider,\n`; + code1 += ` key: {\n`; + code1 += ` type: 'mnemonic',\n`; + code1 += ` words: ${_mnemonic},\n`; + code1 += ` },\n`; + code1 += `});\n`; + + let code2 = `const address = wallet.getPaymentAddress();`; + + let code3 = codeCommon; + code3 += `const wallet = new AppWallet({\n`; + code3 += ` networkId: ${network},\n`; + code3 += ` fetcher: blockchainProvider,\n`; + code3 += ` submitter: blockchainProvider,\n`; + code3 += ` key: {\n`; + code3 += ` type: 'root',\n`; + code3 += ` bech32: '${privatekey}',\n`; + code3 += ` },\n`; + code3 += `});\n`; + + let code4 = codeCommon; + code4 += `const wallet = new AppWallet({\n`; + code4 += ` networkId: ${network},\n`; + code4 += ` fetcher: blockchainProvider,\n`; + code4 += ` submitter: blockchainProvider,\n`; + code4 += ` key: {\n`; + code4 += ` type: 'cli',\n`; + code4 += ` payment: '${paymentSkey}',\n`; + if (stakeSkey && stakeSkey.length) { + code4 += ` stake: '${stakeSkey}',\n`; + } + code4 += ` },\n`; + code4 += `});\n`; + + return ( + <> +

    With Mesh, you can initialize a wallet with:

    +
      +
    • mnemonic phrases
    • +
    • Cardano CLI generated keys
    • +
    • private keys
    • +
    +

    Lets import a blockchain provider:

    + + + +

    Mnemonic phrases

    +

    We can load wallet with mnemonic phrases:

    + +

    + With the wallet loaded, you can sign transactions, we will + see how to do this in the next section, for now lets get the wallet's + address: +

    + + +

    Cardano CLI generated skeys

    +

    + We can load wallet with CLI generated keys by providing the{" "} + skey generated by Cardano CLI. There are two files + generated by Cardano CLI, by default it is named{" "} + signing.skey and stake.skey. Opening the{" "} + signing.skey file it should contains: +

    + +

    + We can get the cborHex from the signing.skey{" "} + file, and load wallet with Cardano CLI generated skeys. Stake key is + optional, but without it, you cannot sign staking transactions. +

    + + +

    Private keys

    +

    We can load wallet with private keys:

    + + + ); +} + +function Right( + demoMethod: number, + setDemoMethod: (method: number) => void, + network: number, + setNetwork: (network: number) => void, + mnemonic: string, + setMnemonic: (mnemonic: string) => void, + privatekey: string, + setPrivatekey: (privatekey: string) => void, + paymentSkey: string, + setPaymentSkey: (paymentSkey: string) => void, + stakeSkey: string, + setStakeSkey: (stakeSkey: string) => void, +) { + const [loading, setLoading] = useState(false); + const { setWallet, setWalletNetwork } = useAppWallet(); + const [responseAddress, setResponseAddress] = useState(null); + const [responseError, setResponseError] = useState(null); + + async function runDemoLoadWallet() { + setLoading(true); + setResponseError(null); + setResponseAddress(null); + setWallet({} as AppWallet); + + const blockchainProvider = getProvider(); + + if (demoMethod == 0) { + let _mnemonic = []; + try { + _mnemonic = JSON.parse(mnemonic); + } catch (e) { + setResponseError("Mnemonic input is not a valid array."); + } + + try { + if (_mnemonic.length) { + const _wallet = new AppWallet({ + networkId: network, + fetcher: blockchainProvider, + submitter: blockchainProvider, + key: { + type: "mnemonic", + words: _mnemonic, + }, + }); + setWallet(_wallet); + setWalletNetwork(network); + const address = _wallet.getPaymentAddress(); + setResponseAddress(address); + } + } catch (error) { + setResponseError(`${error}`); + } + } + if (demoMethod == 1) { + try { + const _wallet = new AppWallet({ + networkId: network, + fetcher: blockchainProvider, + submitter: blockchainProvider, + key: { + type: "root", + bech32: privatekey, + }, + }); + setWallet(_wallet); + setWalletNetwork(network); + const address = _wallet.getPaymentAddress(); + setResponseAddress(address); + } catch (error) { + setResponseError(`${error}`); + } + } + if (demoMethod == 2) { + try { + const stake = stakeSkey?.length > 0 ? stakeSkey : undefined; + const _wallet = new AppWallet({ + networkId: network, + fetcher: blockchainProvider, + submitter: blockchainProvider, + key: { + type: "cli", + payment: paymentSkey, + stake, + }, + }); + setWallet(_wallet); + setWalletNetwork(network); + const address = _wallet.getPaymentAddress(); + setResponseAddress(address); + } catch (error) { + setResponseError(`${error}`); + } + } + + setLoading(false); + } + + return ( + <> + + setDemoMethod(0), + }, + { + key: 1, + label: "Private key", + onClick: () => setDemoMethod(1), + }, + { + key: 2, + label: "CLI keys", + onClick: () => setDemoMethod(2), + }, + ]} + currentSelected={demoMethod} + /> + + + + + + + + ); +} + +function InputTable({ + demoMethod, + network, + setNetwork, + mnemonic, + setMnemonic, + privatekey, + setPrivatekey, + paymentSkey, + setPaymentSkey, + stakeSkey, + setStakeSkey, +}: { + demoMethod: number; + network: number; + setNetwork: (network: number) => void; + mnemonic: string; + setMnemonic: (mnemonic: string) => void; + privatekey: string; + setPrivatekey: (privatekey: string) => void; + paymentSkey: string; + setPaymentSkey: (paymentSkey: string) => void; + stakeSkey: string; + setStakeSkey: (stakeSkey: string) => void; +}) { + return ( +
    + + + + +
    + Load wallet with {demoMethod == 0 && "mnemonic phrases"} + {demoMethod == 1 && "private keys"} + {demoMethod == 2 && "CLI generated keys"} +

    + Provide the {demoMethod == 0 && "mnemonic phrases"} + {demoMethod == 1 && "private keys"} + {demoMethod == 2 && "CLI generated keys"} to recover your wallet. + After initializing the AppWallet, we will get the + wallet's payment address. +

    +

    + Note: Mesh Playground is safe if you really have to recover your + Mainnet wallet, but recovering your testing wallet on Mesh + Playground is recommended. +

    +
    + {demoMethod == 0 && ( + <> + +