├── .eslintrc.js
├── .github
├── ISSUE_TEMPLATE
│ ├── -bug.yml
│ ├── -docs.yml
│ └── -feature.yml
├── pull_request_template.md
└── workflows
│ ├── build.yml
│ └── publish.yml
├── .gitignore
├── .npmrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── apps
├── docs
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── app
│ │ │ ├── [package]
│ │ │ │ ├── classes
│ │ │ │ │ └── [name]
│ │ │ │ │ │ └── page.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── contracts.tsx
│ │ │ │ ├── core-csl.tsx
│ │ │ │ ├── functions
│ │ │ │ │ └── [name]
│ │ │ │ │ │ └── page.tsx
│ │ │ │ ├── interfaces
│ │ │ │ │ └── [name]
│ │ │ │ │ │ └── page.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── providers.tsx
│ │ │ │ ├── transactions.tsx
│ │ │ │ ├── types
│ │ │ │ │ └── [name]
│ │ │ │ │ │ └── page.tsx
│ │ │ │ └── wallets.tsx
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ ├── page.tsx
│ │ │ └── providers.tsx
│ │ ├── components
│ │ │ ├── Button.tsx
│ │ │ ├── Code.tsx
│ │ │ ├── Feedback.tsx
│ │ │ ├── Footer.tsx
│ │ │ ├── GridPattern.tsx
│ │ │ ├── Guides.tsx
│ │ │ ├── Header.tsx
│ │ │ ├── Heading.tsx
│ │ │ ├── HeroPattern.tsx
│ │ │ ├── Layout.tsx
│ │ │ ├── Libraries.tsx
│ │ │ ├── Logo.tsx
│ │ │ ├── MobileNavigation.tsx
│ │ │ ├── Navigation.tsx
│ │ │ ├── Prose.tsx
│ │ │ ├── Resources.tsx
│ │ │ ├── Search.tsx
│ │ │ ├── SectionProvider.tsx
│ │ │ ├── Tag.tsx
│ │ │ ├── ThemeToggle.tsx
│ │ │ ├── docs
│ │ │ │ └── index.tsx
│ │ │ ├── icons
│ │ │ │ ├── BellIcon.tsx
│ │ │ │ ├── BoltIcon.tsx
│ │ │ │ ├── BookIcon.tsx
│ │ │ │ ├── CalendarIcon.tsx
│ │ │ │ ├── CartIcon.tsx
│ │ │ │ ├── ChatBubbleIcon.tsx
│ │ │ │ ├── CheckIcon.tsx
│ │ │ │ ├── ChevronRightLeftIcon.tsx
│ │ │ │ ├── ClipboardIcon.tsx
│ │ │ │ ├── CogIcon.tsx
│ │ │ │ ├── CopyIcon.tsx
│ │ │ │ ├── DocumentIcon.tsx
│ │ │ │ ├── EnvelopeIcon.tsx
│ │ │ │ ├── FaceSmileIcon.tsx
│ │ │ │ ├── FolderIcon.tsx
│ │ │ │ ├── LinkIcon.tsx
│ │ │ │ ├── ListIcon.tsx
│ │ │ │ ├── MagnifyingGlassIcon.tsx
│ │ │ │ ├── MapPinIcon.tsx
│ │ │ │ ├── PackageIcon.tsx
│ │ │ │ ├── PaperAirplaneIcon.tsx
│ │ │ │ ├── PaperClipIcon.tsx
│ │ │ │ ├── ShapesIcon.tsx
│ │ │ │ ├── ShirtIcon.tsx
│ │ │ │ ├── SquaresPlusIcon.tsx
│ │ │ │ ├── TagIcon.tsx
│ │ │ │ ├── UserIcon.tsx
│ │ │ │ └── UsersIcon.tsx
│ │ │ ├── mdx.tsx
│ │ │ └── route-change-listener.tsx
│ │ ├── config
│ │ │ └── index.ts
│ │ ├── contexts
│ │ │ └── route-context.tsx
│ │ ├── data
│ │ │ ├── get-children-by-id.ts
│ │ │ ├── get-class-children.ts
│ │ │ ├── get-class-groups.ts
│ │ │ ├── get-class.ts
│ │ │ ├── get-classes.ts
│ │ │ ├── get-data.ts
│ │ │ ├── get-function.ts
│ │ │ ├── get-functions.ts
│ │ │ ├── get-interface-groups.ts
│ │ │ ├── get-interface.ts
│ │ │ ├── get-interfaces.ts
│ │ │ ├── get-type.ts
│ │ │ ├── get-types.ts
│ │ │ ├── page-routes.ts
│ │ │ └── utils.ts
│ │ ├── favicon.ico
│ │ ├── lib
│ │ │ └── remToPx.ts
│ │ ├── mdx
│ │ │ ├── recma.mjs
│ │ │ ├── rehype.mjs
│ │ │ ├── remark.mjs
│ │ │ └── search.mjs
│ │ └── styles
│ │ │ └── tailwind.css
│ ├── tailwind.config.ts
│ ├── tsconfig.json
│ └── typography.ts
└── playground
│ ├── .env.example
│ ├── .eslintrc.js
│ ├── next-env.d.ts
│ ├── next.config.js
│ ├── package.json
│ ├── postcss.config.js
│ ├── public
│ ├── articles
│ │ └── spices-4185324_640.jpg
│ ├── favicon.ico
│ ├── favicon
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── browserconfig.xml
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ ├── mstile-150x150.png
│ │ ├── safari-pinned-tab.svg
│ │ └── site.webmanifest
│ ├── governance
│ │ ├── meshjs.jsonld
│ │ └── network-3524352_640.jpg
│ ├── guides
│ │ ├── aiken.png
│ │ ├── arches-1866598_1280.jpg
│ │ ├── art-g68512aa8d_1280.jpg
│ │ ├── blockchain.jpg
│ │ ├── cryptographically-prove-wallet-ownership-process.png
│ │ ├── cryptographically-prove-wallet-ownership.png
│ │ ├── custom-marketplace-1.jpeg
│ │ ├── custom-marketplace-2.png
│ │ ├── custom-marketplace.png
│ │ ├── develop-first-web-app.png
│ │ ├── door-gf0710cc4d_640.jpg
│ │ ├── electrician-3087536_640.jpg
│ │ ├── implement-custom-provider.png
│ │ ├── integrating-smart-contract.png
│ │ ├── key-gb17103099_640.jpg
│ │ ├── keys-g25a80b203_1280.jpg
│ │ ├── laptop-3196481_640.jpg
│ │ ├── laptop-g44c60b4ed_1280.jpg
│ │ ├── mint-nft-collection.png
│ │ ├── minting-application.png
│ │ ├── multi-signatures-transaction.png
│ │ ├── nextjs.png
│ │ ├── node-specific-imports.png
│ │ ├── nodejs.jpg
│ │ ├── pluts.png
│ │ ├── salt-harvesting-3060093_1280.jpg
│ │ ├── service-g2192fe835_640.jpg
│ │ ├── smart-contract-transactions.png
│ │ ├── smart-contracts.jpg
│ │ ├── standalone.png
│ │ ├── sunset-g52fe9bcd1_1280.jpg
│ │ ├── supermarket-g42acef7c1_640.jpg
│ │ └── vesting.png
│ ├── home
│ │ ├── developer-8764521_640.jpg
│ │ └── starter-template-cli.mp4
│ ├── images
│ │ └── aiken
│ │ │ ├── aiken-card.png
│ │ │ ├── aiken-icon.png
│ │ │ ├── logo-dark.png
│ │ │ └── logo-light.png
│ ├── logo-mesh
│ │ ├── black
│ │ │ ├── logo-mesh-black-128x128.png
│ │ │ ├── logo-mesh-black-16x16.png
│ │ │ ├── logo-mesh-black-256x256.png
│ │ │ ├── logo-mesh-black-300x300.png
│ │ │ ├── logo-mesh-black-32x32.png
│ │ │ ├── logo-mesh-black-512x512.png
│ │ │ ├── logo-mesh-black-64x64.png
│ │ │ └── logo-mesh-vector.svg
│ │ ├── mesh.png
│ │ ├── meshlogo-with-title-black.svg
│ │ ├── meshlogo-with-title-white.svg
│ │ └── white
│ │ │ ├── logo-mesh-vector.svg
│ │ │ ├── logo-mesh-white-128x128.png
│ │ │ ├── logo-mesh-white-16x16.png
│ │ │ ├── logo-mesh-white-256x256.png
│ │ │ ├── logo-mesh-white-300x300.png
│ │ │ ├── logo-mesh-white-32x32.png
│ │ │ ├── logo-mesh-white-512x512.png
│ │ │ └── logo-mesh-white-64x64.png
│ ├── providers
│ │ ├── blockfrost.png
│ │ ├── hydra.png
│ │ ├── hydra.svg
│ │ ├── koios.png
│ │ ├── maestro.png
│ │ ├── ogmios.png
│ │ ├── utxo-rpc.png
│ │ └── yaci.png
│ ├── support
│ │ ├── discord.png
│ │ ├── github-dark.png
│ │ ├── github-light.png
│ │ ├── meshbadge.png
│ │ ├── thank-you.png
│ │ └── twitter.png
│ └── team
│ │ ├── abdelkrim.png
│ │ ├── erick.jpg
│ │ ├── felix.png
│ │ ├── hinson.png
│ │ ├── jingles.png
│ │ └── tszwai.png
│ ├── src
│ ├── backend
│ │ ├── index.ts
│ │ ├── search.ts
│ │ └── support.ts
│ ├── components
│ │ ├── button
│ │ │ ├── button-float-documentation.tsx
│ │ │ ├── button-group.tsx
│ │ │ ├── button.tsx
│ │ │ └── run-demo-button.tsx
│ │ ├── card
│ │ │ ├── card-title-desc-image.tsx
│ │ │ └── card.tsx
│ │ ├── cardano
│ │ │ ├── blockchain-providers-code-snippet.tsx
│ │ │ ├── blockchain-providers-key.tsx
│ │ │ ├── connect-browser-wallet
│ │ │ │ ├── index.tsx
│ │ │ │ └── metamask.ts
│ │ │ ├── fetch-utxo-by-datum.ts
│ │ │ ├── mesh-wallet.ts
│ │ │ └── mint-mesh-token.tsx
│ │ ├── form
│ │ │ ├── input.tsx
│ │ │ ├── select.tsx
│ │ │ └── textarea.tsx
│ │ ├── icon.tsx
│ │ ├── layouts
│ │ │ ├── header-and-cards.tsx
│ │ │ ├── image-header-and-body.tsx
│ │ │ ├── markdown.tsx
│ │ │ ├── root
│ │ │ │ ├── center-padded.tsx
│ │ │ │ └── full-width.tsx
│ │ │ ├── sidebar-fullwidth.tsx
│ │ │ └── sidebar
│ │ │ │ ├── index.tsx
│ │ │ │ └── sticky-sidebar.tsx
│ │ ├── link
│ │ │ └── index.tsx
│ │ ├── sections
│ │ │ ├── center-align-header-paragraph.tsx
│ │ │ ├── demo-result.tsx
│ │ │ ├── hero-logo-two-sections-links.tsx
│ │ │ ├── hero-two-sections.tsx
│ │ │ ├── input-table.tsx
│ │ │ ├── live-code-demo.tsx
│ │ │ ├── title-icon-description-body.tsx
│ │ │ └── two-columns-scroll.tsx
│ │ ├── site
│ │ │ ├── footer
│ │ │ │ ├── index.tsx
│ │ │ │ └── sitemap.tsx
│ │ │ ├── metatags.tsx
│ │ │ ├── navbar
│ │ │ │ ├── index.tsx
│ │ │ │ ├── menu-item-dropdown.tsx
│ │ │ │ ├── menu-item.tsx
│ │ │ │ ├── submenu-item-dropdown.tsx
│ │ │ │ └── submenu-item.tsx
│ │ │ └── scroller.tsx
│ │ ├── svgs
│ │ │ ├── discord.tsx
│ │ │ ├── github.tsx
│ │ │ ├── hydra.tsx
│ │ │ ├── mesh.tsx
│ │ │ ├── midnight.tsx
│ │ │ ├── polkadot.tsx
│ │ │ ├── surpriseSvg.tsx
│ │ │ └── twitter.tsx
│ │ └── text
│ │ │ ├── alert.tsx
│ │ │ ├── codeblock.tsx
│ │ │ ├── header2.tsx
│ │ │ ├── header3.tsx
│ │ │ └── paragraph2.tsx
│ ├── contexts
│ │ ├── app-wallet.tsx
│ │ ├── mesh-wallet.tsx
│ │ └── providers.tsx
│ ├── data
│ │ ├── cardano.ts
│ │ ├── catalyst.ts
│ │ ├── links-about.ts
│ │ ├── links-aiken.ts
│ │ ├── links-api.ts
│ │ ├── links-articles.ts
│ │ ├── links-data.ts
│ │ ├── links-frameworks.ts
│ │ ├── links-guides.ts
│ │ ├── links-hydra.ts
│ │ ├── links-midnight.ts
│ │ ├── links-providers.ts
│ │ ├── links-react.ts
│ │ ├── links-resources.ts
│ │ ├── links-smart-contracts.ts
│ │ ├── links-solutions.ts
│ │ ├── links-svelte.ts
│ │ ├── links-transactions.ts
│ │ ├── links-txbuilders.ts
│ │ ├── links-utilities.ts
│ │ ├── links-wallets.ts
│ │ ├── links-yaci.ts
│ │ ├── search-blacklist-links.ts
│ │ ├── site.ts
│ │ ├── social.ts
│ │ └── team.ts
│ ├── hooks
│ │ ├── useCopyClipboard.ts
│ │ ├── useDarkmode.ts
│ │ └── useProviders.ts
│ ├── pages
│ │ ├── 404.tsx
│ │ ├── _app.tsx
│ │ ├── _document.tsx
│ │ ├── about
│ │ │ ├── about-us
│ │ │ │ ├── hero.tsx
│ │ │ │ ├── incorporation.tsx
│ │ │ │ ├── meeting.tsx
│ │ │ │ ├── status.tsx
│ │ │ │ ├── team.tsx
│ │ │ │ └── what-working-on.tsx
│ │ │ ├── branding.tsx
│ │ │ ├── catalyst
│ │ │ │ └── index.tsx
│ │ │ ├── index.tsx
│ │ │ ├── media-kit.tsx
│ │ │ └── support-us
│ │ │ │ ├── donate-section.tsx
│ │ │ │ └── index.tsx
│ │ ├── aiken
│ │ │ ├── common.tsx
│ │ │ ├── first-script
│ │ │ │ ├── build.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── script.tsx
│ │ │ ├── getting-started
│ │ │ │ ├── commands.tsx
│ │ │ │ ├── editors.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── install.tsx
│ │ │ ├── index.tsx
│ │ │ └── transactions
│ │ │ │ ├── index.tsx
│ │ │ │ ├── lock.tsx
│ │ │ │ └── redeem.tsx
│ │ ├── api
│ │ │ ├── blockfrost
│ │ │ │ └── [...slug].ts
│ │ │ ├── donate-mint-mesh.ts
│ │ │ ├── google
│ │ │ │ └── search.ts
│ │ │ ├── hydra
│ │ │ │ └── [...slug].ts
│ │ │ └── og.tsx
│ │ ├── apis
│ │ │ ├── data
│ │ │ │ ├── index.tsx
│ │ │ │ ├── json
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── other-utils.tsx
│ │ │ │ │ ├── utils-bool.tsx
│ │ │ │ │ ├── utils-bytestring.tsx
│ │ │ │ │ ├── utils-constructor.tsx
│ │ │ │ │ ├── utils-integer.tsx
│ │ │ │ │ ├── utils-list.tsx
│ │ │ │ │ └── utils-map.tsx
│ │ │ │ ├── mesh
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── other-utils.tsx
│ │ │ │ │ ├── utils-constructor.tsx
│ │ │ │ │ └── utils-primitives.tsx
│ │ │ │ ├── overview
│ │ │ │ │ ├── cbor-plutus-data.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── json-plutus-data.tsx
│ │ │ │ │ ├── mesh-plutus-data.tsx
│ │ │ │ │ └── plutus-data-intro.tsx
│ │ │ │ ├── utils
│ │ │ │ │ ├── assets-to-plutus-value.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── plutus-array-to-string.tsx
│ │ │ │ │ ├── plutus-value-to-assets.tsx
│ │ │ │ │ └── string-to-plutus-array.tsx
│ │ │ │ └── value
│ │ │ │ │ ├── accessor.tsx
│ │ │ │ │ ├── addasset-operator.tsx
│ │ │ │ │ ├── addassets-operator.tsx
│ │ │ │ │ ├── comparator.tsx
│ │ │ │ │ ├── convertor.tsx
│ │ │ │ │ ├── fromassets-convertor.tsx
│ │ │ │ │ ├── fromvalue-convertor.tsx
│ │ │ │ │ ├── geq-comparator.tsx
│ │ │ │ │ ├── gequnit-comparator.tsx
│ │ │ │ │ ├── get-accessor.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── isempty-comparator.tsx
│ │ │ │ │ ├── leq-comparator.tsx
│ │ │ │ │ ├── lequnit-comparator.tsx
│ │ │ │ │ ├── merge-operator.tsx
│ │ │ │ │ ├── mvalue-convertor.tsx
│ │ │ │ │ ├── negateasset-operator.tsx
│ │ │ │ │ ├── negateassets-operator.tsx
│ │ │ │ │ ├── operators.tsx
│ │ │ │ │ ├── toassets-convertor.tsx
│ │ │ │ │ ├── todata-convertor.tsx
│ │ │ │ │ ├── tojson-convertor.tsx
│ │ │ │ │ ├── units-accessor.tsx
│ │ │ │ │ └── value-convertor.tsx
│ │ │ ├── index.tsx
│ │ │ ├── transaction
│ │ │ │ ├── basics
│ │ │ │ │ ├── begin.tsx
│ │ │ │ │ ├── cip20.tsx
│ │ │ │ │ ├── coin-selection.tsx
│ │ │ │ │ ├── get-txbuilder.tsx
│ │ │ │ │ ├── handle.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── multisig.tsx
│ │ │ │ │ ├── send-assets.tsx
│ │ │ │ │ ├── send-lovelace.tsx
│ │ │ │ │ ├── send-value.tsx
│ │ │ │ │ ├── set-collateral.tsx
│ │ │ │ │ ├── set-metadata.tsx
│ │ │ │ │ ├── set-network.tsx
│ │ │ │ │ ├── set-required-signers.tsx
│ │ │ │ │ └── set-time.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── minting
│ │ │ │ │ ├── asset-metadata.tsx
│ │ │ │ │ ├── burning-one-signature.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── mask-metadata.tsx
│ │ │ │ │ ├── minting-cip68.tsx
│ │ │ │ │ ├── minting-native-script.tsx
│ │ │ │ │ ├── minting-one-signature.tsx
│ │ │ │ │ ├── minting-plutus-script.tsx
│ │ │ │ │ └── minting-royalty-token.tsx
│ │ │ │ ├── smart-contract
│ │ │ │ │ ├── apply-param-to-script.tsx
│ │ │ │ │ ├── designing-datum.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── inline-datum.tsx
│ │ │ │ │ ├── lock-assets.tsx
│ │ │ │ │ ├── reference-script.tsx
│ │ │ │ │ ├── unlock-assets.tsx
│ │ │ │ │ └── using-redeemer.tsx
│ │ │ │ └── staking
│ │ │ │ │ ├── delegate-stake.tsx
│ │ │ │ │ ├── deregister-stake.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── register-pool.tsx
│ │ │ │ │ ├── register-stake.tsx
│ │ │ │ │ ├── retire-pool.tsx
│ │ │ │ │ └── withdraw-stake.tsx
│ │ │ ├── txbuilder
│ │ │ │ ├── basics
│ │ │ │ │ ├── build-with-object.tsx
│ │ │ │ │ ├── cip20.tsx
│ │ │ │ │ ├── coin-selection.tsx
│ │ │ │ │ ├── common-functions.tsx
│ │ │ │ │ ├── custom-pp.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── initialize-txbuilder.tsx
│ │ │ │ │ ├── multisig-native-script.tsx
│ │ │ │ │ ├── multisig.tsx
│ │ │ │ │ ├── send-values.tsx
│ │ │ │ │ ├── set-fee.tsx
│ │ │ │ │ ├── set-metadata.tsx
│ │ │ │ │ ├── set-network.tsx
│ │ │ │ │ ├── set-required-signers.tsx
│ │ │ │ │ └── set-time.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── governance
│ │ │ │ │ ├── deregistration.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── registration.tsx
│ │ │ │ │ ├── update.tsx
│ │ │ │ │ ├── vote-delegation.tsx
│ │ │ │ │ └── vote.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── minting
│ │ │ │ │ ├── burning-one-signature.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── minting-cip68.tsx
│ │ │ │ │ ├── minting-native-script.tsx
│ │ │ │ │ ├── minting-one-signature.tsx
│ │ │ │ │ ├── minting-plutus-script.tsx
│ │ │ │ │ ├── minting-royalty-token.tsx
│ │ │ │ │ └── multiple-assets.tsx
│ │ │ │ ├── smart-contract
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── lock-assets.tsx
│ │ │ │ │ ├── send-reference-script.tsx
│ │ │ │ │ └── unlock-assets.tsx
│ │ │ │ └── staking
│ │ │ │ │ ├── delegate-stake.tsx
│ │ │ │ │ ├── deregister-stake.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── register-stake.tsx
│ │ │ │ │ ├── script-withdrawal.tsx
│ │ │ │ │ └── withdraw-stake.tsx
│ │ │ ├── utilities
│ │ │ │ ├── blueprints
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── minting-blueprint.tsx
│ │ │ │ │ ├── spending-blueprint.tsx
│ │ │ │ │ └── withdrawal-blueprint.tsx
│ │ │ │ ├── deserializers
│ │ │ │ │ ├── deserialize-address.tsx
│ │ │ │ │ ├── deserialize-datum.tsx
│ │ │ │ │ ├── deserialize-poolid.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── resolvers
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── resolve-data-hash.tsx
│ │ │ │ │ ├── resolve-epoch-number.tsx
│ │ │ │ │ ├── resolve-fingerprint.tsx
│ │ │ │ │ ├── resolve-native-script-address.tsx
│ │ │ │ │ ├── resolve-native-script-hash.tsx
│ │ │ │ │ ├── resolve-payment-key-hash.tsx
│ │ │ │ │ ├── resolve-plutus-script-address.tsx
│ │ │ │ │ ├── resolve-plutus-script-hash.tsx
│ │ │ │ │ ├── resolve-private-key.tsx
│ │ │ │ │ ├── resolve-script-hash-rep-id.tsx
│ │ │ │ │ ├── resolve-script-hash.tsx
│ │ │ │ │ ├── resolve-slot-number.tsx
│ │ │ │ │ ├── resolve-stake-address.tsx
│ │ │ │ │ ├── resolve-stake-hash.tsx
│ │ │ │ │ └── resolve-tx-hash.tsx
│ │ │ │ └── serializers
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── serialize-address-obj.tsx
│ │ │ │ │ ├── serialize-native-script.tsx
│ │ │ │ │ ├── serialize-plutus-script.tsx
│ │ │ │ │ ├── serialize-poolid.tsx
│ │ │ │ │ └── serialize-reward-address.tsx
│ │ │ └── wallets
│ │ │ │ ├── appwallet
│ │ │ │ ├── generate-wallet.tsx
│ │ │ │ ├── get-enterprise-address.tsx
│ │ │ │ ├── get-networkid.tsx
│ │ │ │ ├── get-payment-address.tsx
│ │ │ │ ├── get-reward-address.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── load-wallet.tsx
│ │ │ │ ├── sign-data.tsx
│ │ │ │ └── sign-tx.tsx
│ │ │ │ ├── browserwallet
│ │ │ │ ├── connect-wallet.tsx
│ │ │ │ ├── get-assets.tsx
│ │ │ │ ├── get-available-wallets.tsx
│ │ │ │ ├── get-balance.tsx
│ │ │ │ ├── get-change-address.tsx
│ │ │ │ ├── get-collateral.tsx
│ │ │ │ ├── get-drep.tsx
│ │ │ │ ├── get-extensions.tsx
│ │ │ │ ├── get-installed-wallets.tsx
│ │ │ │ ├── get-lovelace.tsx
│ │ │ │ ├── get-networkid.tsx
│ │ │ │ ├── get-policyid-assets.tsx
│ │ │ │ ├── get-policyids.tsx
│ │ │ │ ├── get-registeredpubstakekeys.tsx
│ │ │ │ ├── get-reward-addresses.tsx
│ │ │ │ ├── get-supported-extensions.tsx
│ │ │ │ ├── get-unregisteredpubstakekeys.tsx
│ │ │ │ ├── get-unused-addresses.tsx
│ │ │ │ ├── get-used-addresses.tsx
│ │ │ │ ├── get-utxos.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── sign-data.tsx
│ │ │ │ ├── sign-tx.tsx
│ │ │ │ └── submit-tx.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── meshwallet
│ │ │ │ ├── common.tsx
│ │ │ │ ├── create-collateral.tsx
│ │ │ │ ├── generate-wallet.tsx
│ │ │ │ ├── get-assets.tsx
│ │ │ │ ├── get-balance.tsx
│ │ │ │ ├── get-change-address.tsx
│ │ │ │ ├── get-collateral.tsx
│ │ │ │ ├── get-drep.tsx
│ │ │ │ ├── get-lovelace.tsx
│ │ │ │ ├── get-networkid.tsx
│ │ │ │ ├── get-policyid-assets.tsx
│ │ │ │ ├── get-policyids.tsx
│ │ │ │ ├── get-reward-addresses.tsx
│ │ │ │ ├── get-unused-addresses.tsx
│ │ │ │ ├── get-used-addresses.tsx
│ │ │ │ ├── get-utxos.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── load-wallet.tsx
│ │ │ │ ├── sign-data.tsx
│ │ │ │ ├── sign-tx.tsx
│ │ │ │ └── submit-tx.tsx
│ │ ├── article
│ │ │ ├── elements-of-cardano.mdx
│ │ │ ├── typescript-cardano-sdk.mdx
│ │ │ └── whats-new-in-16.mdx
│ │ ├── bitcoin
│ │ │ └── index.tsx
│ │ ├── go
│ │ │ ├── discord.tsx
│ │ │ ├── github.tsx
│ │ │ └── twitter.tsx
│ │ ├── governance
│ │ │ └── index.mdx
│ │ ├── guides
│ │ │ ├── aiken.mdx
│ │ │ ├── custom-provider.mdx
│ │ │ ├── index.tsx
│ │ │ ├── minting-on-nodejs.mdx
│ │ │ ├── multisig-minting
│ │ │ │ ├── demo.tsx
│ │ │ │ └── index.mdx
│ │ │ ├── multisig-tx
│ │ │ │ └── demo.tsx
│ │ │ ├── nextjs.mdx
│ │ │ ├── nft-collection
│ │ │ │ └── index.mdx
│ │ │ ├── node-specific-imports.mdx
│ │ │ ├── prove-wallet-ownership
│ │ │ │ ├── demo.tsx
│ │ │ │ └── index.mdx
│ │ │ ├── smart-contract-transactions.mdx
│ │ │ ├── standalone.mdx
│ │ │ └── vesting
│ │ │ │ ├── demo.tsx
│ │ │ │ └── index.mdx
│ │ ├── home
│ │ │ ├── features.tsx
│ │ │ ├── get-started.tsx
│ │ │ ├── index.tsx
│ │ │ └── reasons.tsx
│ │ ├── hydra
│ │ │ ├── common.tsx
│ │ │ ├── getting-started
│ │ │ │ ├── index.tsx
│ │ │ │ └── install.tsx
│ │ │ ├── index.tsx
│ │ │ └── tutorial
│ │ │ │ ├── index.tsx
│ │ │ │ ├── prerequisites.tsx
│ │ │ │ ├── step2.tsx
│ │ │ │ ├── step3.tsx
│ │ │ │ ├── step4.tsx
│ │ │ │ ├── step5.tsx
│ │ │ │ └── step6.tsx
│ │ ├── index.tsx
│ │ ├── providers
│ │ │ ├── blockfrost.tsx
│ │ │ ├── evaluators
│ │ │ │ ├── evaluate-tx.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── fetchers
│ │ │ │ ├── fetch-account-info.tsx
│ │ │ │ ├── fetch-address-assets.tsx
│ │ │ │ ├── fetch-address-utxos.tsx
│ │ │ │ ├── fetch-asset-addresses.tsx
│ │ │ │ ├── fetch-asset-metadata.tsx
│ │ │ │ ├── fetch-block-info.tsx
│ │ │ │ ├── fetch-collection-assets.tsx
│ │ │ │ ├── fetch-handle-address.tsx
│ │ │ │ ├── fetch-handle.tsx
│ │ │ │ ├── fetch-proposals.tsx
│ │ │ │ ├── fetch-protocol-parameters.tsx
│ │ │ │ ├── fetch-transaction-info.tsx
│ │ │ │ ├── fetch-utxos.tsx
│ │ │ │ ├── get.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── hydra-endpoints
│ │ │ │ ├── abort.tsx
│ │ │ │ ├── close.tsx
│ │ │ │ ├── commit.tsx
│ │ │ │ ├── connect.tsx
│ │ │ │ ├── contest.tsx
│ │ │ │ ├── decommit.tsx
│ │ │ │ ├── fanout.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── init-head.tsx
│ │ │ │ ├── new-tx.tsx
│ │ │ │ └── on-message.tsx
│ │ │ ├── hydra.tsx
│ │ │ ├── index.tsx
│ │ │ ├── koios.tsx
│ │ │ ├── listeners
│ │ │ │ ├── index.tsx
│ │ │ │ └── on-transaction-confirmed.tsx
│ │ │ ├── maestro.tsx
│ │ │ ├── offline-evaluator.tsx
│ │ │ ├── offline-fetcher.tsx
│ │ │ ├── ogmios.tsx
│ │ │ ├── submitters
│ │ │ │ ├── index.tsx
│ │ │ │ └── submit-transaction.tsx
│ │ │ ├── utxorpc.tsx
│ │ │ ├── yaci-endpoints
│ │ │ │ ├── devnet-info.tsx
│ │ │ │ ├── genesis-info-era.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── topup-address.tsx
│ │ │ └── yaci.tsx
│ │ ├── react
│ │ │ ├── getting-started
│ │ │ │ ├── index.tsx
│ │ │ │ ├── mesh-provider.tsx
│ │ │ │ └── setup.tsx
│ │ │ ├── index.tsx
│ │ │ ├── ui-components
│ │ │ │ ├── connect-wallet.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── powered-mesh.tsx
│ │ │ │ └── stake-button.tsx
│ │ │ └── wallet-hooks
│ │ │ │ ├── index.tsx
│ │ │ │ ├── use-address.tsx
│ │ │ │ ├── use-assets.tsx
│ │ │ │ ├── use-lovelace.tsx
│ │ │ │ ├── use-network.tsx
│ │ │ │ ├── use-wallet-list.tsx
│ │ │ │ └── use-wallet.tsx
│ │ ├── resources
│ │ │ ├── index.tsx
│ │ │ └── platforms
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── nextjs
│ │ │ │ ├── index.tsx
│ │ │ │ └── setup.tsx
│ │ ├── search
│ │ │ └── index.tsx
│ │ ├── sitemap.tsx
│ │ ├── sitemap.xml.ts
│ │ ├── smart-contracts
│ │ │ ├── common.tsx
│ │ │ ├── content-ownership
│ │ │ │ ├── common.tsx
│ │ │ │ ├── create-content-registry.tsx
│ │ │ │ ├── create-content.tsx
│ │ │ │ ├── create-ownership-registry.tsx
│ │ │ │ ├── get-content.tsx
│ │ │ │ ├── get-oracle-data.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── mint-minting-policy.tsx
│ │ │ │ ├── mint-user-token.tsx
│ │ │ │ ├── send-ref-script-onchain.tsx
│ │ │ │ └── setup-oracle-utxo.tsx
│ │ │ ├── escrow
│ │ │ │ ├── cancel-escrow.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── complete-escrow.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── initiate-escrow.tsx
│ │ │ │ └── recipient-deposit.tsx
│ │ │ ├── giftcard
│ │ │ │ ├── common.tsx
│ │ │ │ ├── create-giftcard.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── redeem-giftcard.tsx
│ │ │ ├── hello-world
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── lock-asset.tsx
│ │ │ │ └── unlock-asset.tsx
│ │ │ ├── index.tsx
│ │ │ ├── marketplace
│ │ │ │ ├── buy-asset.tsx
│ │ │ │ ├── cancel-listing.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── list-asset.tsx
│ │ │ │ └── update-listing.tsx
│ │ │ ├── payment-splitter
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── send-lovelace.tsx
│ │ │ │ └── trigger-payout.tsx
│ │ │ ├── plutus-nft
│ │ │ │ ├── common.tsx
│ │ │ │ ├── get-oracle-data.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── mint-plutus-nft.tsx
│ │ │ │ └── setup-oracle.tsx
│ │ │ ├── swap
│ │ │ │ ├── accept-swap.tsx
│ │ │ │ ├── cancel-swap.tsx
│ │ │ │ ├── common.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── initiate-swap.tsx
│ │ │ └── vesting
│ │ │ │ ├── common.tsx
│ │ │ │ ├── deposit-fund.tsx
│ │ │ │ ├── full-tutorial.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── withdraw-fund.tsx
│ │ ├── solutions
│ │ │ └── index.tsx
│ │ ├── svelte
│ │ │ ├── getting-started
│ │ │ │ ├── index.tsx
│ │ │ │ ├── setup.tsx
│ │ │ │ └── state.tsx
│ │ │ ├── index.tsx
│ │ │ └── ui-components
│ │ │ │ ├── connect-wallet.tsx
│ │ │ │ └── index.tsx
│ │ └── yaci
│ │ │ ├── common.tsx
│ │ │ ├── getting-started
│ │ │ ├── commands.tsx
│ │ │ ├── hosted.tsx
│ │ │ ├── index.tsx
│ │ │ ├── setup.tsx
│ │ │ └── start.tsx
│ │ │ ├── index.tsx
│ │ │ └── transactions
│ │ │ ├── basic-transaction.tsx
│ │ │ ├── index.tsx
│ │ │ └── provider.tsx
│ ├── styles
│ │ ├── globals.css
│ │ └── highlight
│ │ │ ├── stackoverflow-dark.css
│ │ │ └── stackoverflow-light.css
│ └── types
│ │ └── menu-item.ts
│ ├── tailwind.config.js
│ └── tsconfig.json
├── awesome.md
├── docs
├── javascript.md
├── pull-requests.md
├── react.md
└── typescript.md
├── package-lock.json
├── package.json
├── packages
├── bitcoin
│ ├── README.md
│ ├── package.json
│ ├── src
│ │ ├── core.ts
│ │ ├── index.ts
│ │ ├── interfaces
│ │ │ ├── index.ts
│ │ │ ├── provider.ts
│ │ │ └── wallet.ts
│ │ ├── providers
│ │ │ ├── blockstream.ts
│ │ │ ├── common.ts
│ │ │ └── index.ts
│ │ ├── types
│ │ │ ├── address-info.ts
│ │ │ ├── address.ts
│ │ │ ├── chain-stats.ts
│ │ │ ├── index.ts
│ │ │ ├── mempool-stats.ts
│ │ │ ├── script-info.ts
│ │ │ ├── transactions-info.ts
│ │ │ ├── transactions-status.ts
│ │ │ └── utxo.ts
│ │ └── wallets
│ │ │ ├── browser
│ │ │ └── index.ts
│ │ │ ├── embedded
│ │ │ └── index.ts
│ │ │ └── index.ts
│ ├── tsconfig.json
│ └── tsup.config.ts
├── configs
│ ├── eslint
│ │ ├── library.js
│ │ ├── next.js
│ │ └── react.js
│ ├── jest
│ │ └── jest.config.ts
│ ├── package.json
│ ├── prettier
│ │ └── index.js
│ ├── tailwind
│ │ └── tailwind.config.ts
│ └── typescript
│ │ ├── base.json
│ │ ├── nextjs.json
│ │ ├── react-library.json
│ │ └── wasm-base.json
├── mesh-common
│ ├── .env.example
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── constants
│ │ │ ├── cost-models.ts
│ │ │ ├── index.ts
│ │ │ ├── language-views.ts
│ │ │ ├── protocol-parameters.ts
│ │ │ └── supported-wallets.ts
│ │ ├── data
│ │ │ ├── index.ts
│ │ │ ├── json
│ │ │ │ ├── aliases.ts
│ │ │ │ ├── constructors.ts
│ │ │ │ ├── credentials.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── mpf.ts
│ │ │ │ └── primitives.ts
│ │ │ ├── mesh
│ │ │ │ ├── aliases.ts
│ │ │ │ ├── constructors.ts
│ │ │ │ ├── credentials.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── primitives.ts
│ │ │ ├── parser.ts
│ │ │ ├── time.ts
│ │ │ └── value.ts
│ │ ├── index.ts
│ │ ├── interfaces
│ │ │ ├── evaluator.ts
│ │ │ ├── fetcher.ts
│ │ │ ├── index.ts
│ │ │ ├── initiator.ts
│ │ │ ├── listener.ts
│ │ │ ├── serializer.ts
│ │ │ ├── signer.ts
│ │ │ ├── submitter.ts
│ │ │ └── wallet.ts
│ │ ├── types
│ │ │ ├── account-info.ts
│ │ │ ├── action.ts
│ │ │ ├── asset-extended.ts
│ │ │ ├── asset-metadata.ts
│ │ │ ├── asset.ts
│ │ │ ├── block-info.ts
│ │ │ ├── blueprint
│ │ │ │ ├── index.ts
│ │ │ │ ├── minting.ts
│ │ │ │ ├── spending.ts
│ │ │ │ └── withdrawal.ts
│ │ │ ├── data-signature.ts
│ │ │ ├── data.ts
│ │ │ ├── deserialized
│ │ │ │ ├── deserialized-address.ts
│ │ │ │ ├── deserialized-script.ts
│ │ │ │ └── index.ts
│ │ │ ├── era.ts
│ │ │ ├── extension.ts
│ │ │ ├── governance.ts
│ │ │ ├── index.ts
│ │ │ ├── message.ts
│ │ │ ├── mint.ts
│ │ │ ├── native-script.ts
│ │ │ ├── network.ts
│ │ │ ├── plutus-script.ts
│ │ │ ├── pool-params.ts
│ │ │ ├── protocol.ts
│ │ │ ├── recipient.ts
│ │ │ ├── relay.ts
│ │ │ ├── token.ts
│ │ │ ├── transaction-builder
│ │ │ │ ├── certificate.ts
│ │ │ │ ├── credential.ts
│ │ │ │ ├── data.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── mint.ts
│ │ │ │ ├── output.ts
│ │ │ │ ├── script.ts
│ │ │ │ ├── txin.ts
│ │ │ │ ├── vote.ts
│ │ │ │ └── withdrawal.ts
│ │ │ ├── transaction-info.ts
│ │ │ ├── tx-output.ts
│ │ │ ├── utxo.ts
│ │ │ └── wallet.ts
│ │ ├── utils
│ │ │ ├── asset-fingerprint.ts
│ │ │ ├── big-num.ts
│ │ │ ├── data-hash.ts
│ │ │ ├── file.ts
│ │ │ └── index.ts
│ │ └── utxo-selection
│ │ │ ├── common.ts
│ │ │ ├── experimental.ts
│ │ │ ├── index.ts
│ │ │ ├── keepRelevant.ts
│ │ │ ├── largestFirst.ts
│ │ │ └── largestFirstMultiAsset.ts
│ ├── test
│ │ ├── data
│ │ │ ├── json
│ │ │ │ ├── aliases.test.ts
│ │ │ │ ├── constructors.test.ts
│ │ │ │ ├── credentials.test.ts
│ │ │ │ └── primitives.test.ts
│ │ │ ├── mesh
│ │ │ │ ├── aliases.test.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── constructors.test.ts
│ │ │ │ ├── credentials.test.ts
│ │ │ │ └── primitives.test.ts
│ │ │ ├── time.test.ts
│ │ │ └── value
│ │ │ │ ├── accessor.test.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── comparator.test.ts
│ │ │ │ ├── convertor.test.ts
│ │ │ │ └── operators.test.ts
│ │ ├── drep
│ │ │ └── hash-drep-anchor.test.ts
│ │ ├── types
│ │ │ └── protocol.test.ts
│ │ ├── utils
│ │ │ ├── asset-fingerprint.test.ts
│ │ │ ├── bigNum.test.ts
│ │ │ └── data-hash.test.ts
│ │ └── utxo-selection
│ │ │ └── experimental.test.ts
│ └── tsconfig.json
├── mesh-contract
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── asteria
│ │ │ ├── _reference.zip
│ │ │ ├── aiken-workspace
│ │ │ │ └── readme.md
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── common.ts
│ │ ├── content-ownership
│ │ │ ├── aiken-workspace
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── lib
│ │ │ │ │ └── content-ownership
│ │ │ │ │ │ ├── common.ak
│ │ │ │ │ │ ├── placeholder.ak
│ │ │ │ │ │ ├── types.ak
│ │ │ │ │ │ └── utils.ak
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ ├── specs
│ │ │ │ │ ├── scripts_specs.md
│ │ │ │ │ └── user_actions.md
│ │ │ │ └── validators
│ │ │ │ │ ├── content_registry.ak
│ │ │ │ │ ├── content_registry_ref_token.ak
│ │ │ │ │ ├── one_time_minting_policy.ak
│ │ │ │ │ ├── oracle_validator.ak
│ │ │ │ │ ├── ownership_registry.ak
│ │ │ │ │ ├── ownership_registry_ref_token.ak
│ │ │ │ │ └── tests
│ │ │ │ │ ├── integration-tests
│ │ │ │ │ ├── create_content.ak
│ │ │ │ │ ├── create_content_registry.ak
│ │ │ │ │ ├── create_ownership_registry.ak
│ │ │ │ │ └── update_content.ak
│ │ │ │ │ └── unit-tests
│ │ │ │ │ ├── content_registry.ak
│ │ │ │ │ ├── content_registry_ref_token.ak
│ │ │ │ │ ├── one_time_minting_policy.ak
│ │ │ │ │ ├── oracle_validator.ak
│ │ │ │ │ ├── ownership_registry.ak
│ │ │ │ │ └── ownership_registry_ref_token.ak
│ │ │ ├── index.ts
│ │ │ ├── offchain
│ │ │ │ ├── common.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── offchain.ts
│ │ │ │ └── type.ts
│ │ │ └── readme.md
│ │ ├── escrow
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── lib
│ │ │ │ │ └── escrow
│ │ │ │ │ │ └── types.ak
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ ├── escrow.ak
│ │ │ │ │ └── tests
│ │ │ │ │ └── escrow.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ ├── escrow.ak
│ │ │ │ │ └── tests
│ │ │ │ │ └── escrow.ak
│ │ │ ├── aiken-workspace-v3
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ ├── escrow.ak
│ │ │ │ │ └── tests
│ │ │ │ │ └── escrow.ak
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ ├── readme.md
│ │ │ └── unbound-value
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── validators
│ │ │ │ ├── escrow.ak
│ │ │ │ └── tests
│ │ │ │ │ └── escrow.ak
│ │ │ │ └── vulnerabiltiy_test.png
│ │ ├── giftcard
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ └── oneshot.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ └── oneshot.ak
│ │ │ ├── index.ts
│ │ │ ├── infinite-mint
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── validators
│ │ │ │ │ └── oneshot.ak
│ │ │ │ └── vulnerabiltiy_test.png
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── hello-world
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── contract.md
│ │ │ │ ├── plutus.json
│ │ │ │ └── validators
│ │ │ │ │ └── hello-world.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── contract.md
│ │ │ │ ├── plutus.json
│ │ │ │ └── validators
│ │ │ │ │ └── hello-world.ak
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── index.ts
│ │ ├── marketplace
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── lib
│ │ │ │ │ └── marketplace
│ │ │ │ │ │ └── types.ak
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ ├── marketplace.ak
│ │ │ │ │ └── tests
│ │ │ │ │ └── marketplace.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ ├── marketplace.ak
│ │ │ │ │ └── tests
│ │ │ │ │ └── marketplace.ak
│ │ │ ├── index.ts
│ │ │ ├── insufficient-stake-control
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── validators
│ │ │ │ │ └── marketplace.ak
│ │ │ │ └── vulnerability_test.png
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── payment-splitter
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ └── validators
│ │ │ │ │ └── payment-splitter.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ └── validators
│ │ │ │ │ └── payment-splitter.ak
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── plutus-nft
│ │ │ ├── aiken-workspace
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ └── validators
│ │ │ │ │ ├── oracle.ak
│ │ │ │ │ ├── oracle_nft.ak
│ │ │ │ │ └── plutus_nft.ak
│ │ │ ├── index.ts
│ │ │ ├── locked-value
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── validators
│ │ │ │ │ ├── oracle.ak
│ │ │ │ │ ├── oracle_nft.ak
│ │ │ │ │ └── plutus_nft.ak
│ │ │ │ └── vulnerabiltiy_test.png
│ │ │ ├── offchain.ts
│ │ │ ├── readme.md
│ │ │ └── type.ts
│ │ ├── royalties
│ │ │ ├── _reference.zip
│ │ │ ├── aiken-workspace
│ │ │ │ └── readme.md
│ │ │ ├── cip102.md
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ ├── swap
│ │ │ ├── aiken-workspace-v1
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ └── swap.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ │ ├── .gitignore
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── readme.md
│ │ │ │ └── validators
│ │ │ │ │ └── swap.ak
│ │ │ ├── double-satisfaction
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── aiken.lock
│ │ │ │ ├── aiken.toml
│ │ │ │ ├── plutus.json
│ │ │ │ ├── validators
│ │ │ │ │ └── swap.ak
│ │ │ │ └── vulnerability_test.png
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ │ └── vesting
│ │ │ ├── aiken-workspace-v1
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── aiken.lock
│ │ │ ├── aiken.toml
│ │ │ ├── lib
│ │ │ │ └── vesting
│ │ │ │ │ └── types.ak
│ │ │ ├── plutus.json
│ │ │ └── validators
│ │ │ │ ├── tests
│ │ │ │ └── vesting.ak
│ │ │ │ └── vesting.ak
│ │ │ ├── aiken-workspace-v2
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── aiken.lock
│ │ │ ├── aiken.toml
│ │ │ ├── plutus.json
│ │ │ └── validators
│ │ │ │ └── vesting.ak
│ │ │ ├── index.ts
│ │ │ ├── offchain.ts
│ │ │ └── readme.md
│ └── tsconfig.json
├── mesh-core-csl
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── core
│ │ │ ├── adaptor
│ │ │ │ ├── certificate.ts
│ │ │ │ ├── data.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── metadata.ts
│ │ │ │ ├── mint.ts
│ │ │ │ ├── network.ts
│ │ │ │ ├── output.ts
│ │ │ │ ├── script.ts
│ │ │ │ ├── txIn.ts
│ │ │ │ ├── utxo.ts
│ │ │ │ ├── vote.ts
│ │ │ │ └── withdrawal.ts
│ │ │ ├── index.ts
│ │ │ └── serializer.ts
│ │ ├── deser
│ │ │ ├── constants.ts
│ │ │ ├── converter.ts
│ │ │ ├── csl.ts
│ │ │ ├── deserializer.ts
│ │ │ ├── index.ts
│ │ │ └── resolver.ts
│ │ ├── index.ts
│ │ ├── offline-providers
│ │ │ ├── index.ts
│ │ │ └── offline-evaluator.ts
│ │ ├── utils
│ │ │ ├── address.ts
│ │ │ ├── aiken.ts
│ │ │ ├── credentials.ts
│ │ │ ├── datum.ts
│ │ │ ├── drep.ts
│ │ │ ├── index.ts
│ │ │ ├── scripts.ts
│ │ │ ├── staking.ts
│ │ │ └── transaction.ts
│ │ └── wasm.ts
│ ├── test
│ │ ├── core
│ │ │ ├── adaptor.test.ts
│ │ │ └── builder.test.ts
│ │ ├── deser
│ │ │ └── converter.test.ts.bak
│ │ ├── offline-providers
│ │ │ └── evaluator.test.ts
│ │ └── utils
│ │ │ ├── address.test.ts
│ │ │ ├── aiken.test.ts
│ │ │ ├── drep.test.ts
│ │ │ ├── scripts.test.ts
│ │ │ ├── serializer.test.ts
│ │ │ └── transaction.test.ts
│ ├── tsconfig-cjs.json
│ └── tsconfig.json
├── mesh-core-cst
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ ├── message-signing
│ │ │ ├── check-signature.ts
│ │ │ ├── cose-sign1.ts
│ │ │ ├── generate-nonce.ts
│ │ │ ├── index.ts
│ │ │ └── sign-data.ts
│ │ ├── plutus-tools
│ │ │ └── index.ts
│ │ ├── resolvers
│ │ │ └── index.ts
│ │ ├── serializer
│ │ │ └── index.ts
│ │ ├── types
│ │ │ ├── cardano-sdk.ts
│ │ │ ├── index.ts
│ │ │ └── signer.ts
│ │ └── utils
│ │ │ ├── address.ts
│ │ │ ├── builder.ts
│ │ │ ├── certificate.ts
│ │ │ ├── converter.ts
│ │ │ ├── data.ts
│ │ │ ├── deserializer.ts
│ │ │ ├── encoding.ts
│ │ │ ├── fee.ts
│ │ │ ├── index.ts
│ │ │ ├── metadata.ts
│ │ │ ├── script-data-hash.ts
│ │ │ ├── value.ts
│ │ │ ├── vote.ts
│ │ │ └── witness-set.ts
│ ├── test
│ │ ├── message-signing.test.ts
│ │ ├── ref-script-input-fee-calc.test.ts
│ │ ├── ref-script-output.test.ts
│ │ ├── resolvers.test.ts
│ │ ├── sanitize-outputs.test.ts
│ │ ├── script-integrity-hash.test.ts
│ │ ├── unbalanced.test.ts
│ │ └── utils
│ │ │ ├── apply-params.test.ts
│ │ │ ├── bip32.test.ts
│ │ │ ├── converter.test.ts
│ │ │ ├── drep.test.ts
│ │ │ ├── serializer-utils.test.ts
│ │ │ ├── serializer.test.ts
│ │ │ └── witness-set.test.ts
│ └── tsconfig.json
├── mesh-core
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── core.ts
│ │ ├── index.ts
│ │ └── utils
│ │ │ ├── blueprint
│ │ │ ├── index.ts
│ │ │ ├── minting.ts
│ │ │ ├── spending.ts
│ │ │ └── withdrawal.ts
│ │ │ ├── deserializer.ts
│ │ │ ├── index.ts
│ │ │ ├── resolver.ts
│ │ │ └── serializer.ts
│ └── tsconfig.json
├── mesh-hydra
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── hydra-connection.ts
│ │ ├── hydra-instance.ts
│ │ ├── hydra-provider.test.ts
│ │ ├── hydra-provider.ts
│ │ ├── index.ts
│ │ ├── types
│ │ │ ├── events.ts
│ │ │ ├── hAssets.ts
│ │ │ ├── hReferenceScript.ts
│ │ │ ├── hStatus.ts
│ │ │ ├── hTransaction.ts
│ │ │ ├── hUTxOs.ts
│ │ │ ├── hydra-post-chain-tx.ts
│ │ │ ├── hydra.ts
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── index.ts
│ │ │ └── parse-http-error.ts
│ ├── tsconfig.json
│ └── tsup.config.ts
├── mesh-provider
│ ├── .env.example
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── begin.ts
│ │ ├── blockfrost.ts
│ │ ├── common
│ │ │ └── utxos-to-assets.ts
│ │ ├── index.ts
│ │ ├── koios.ts
│ │ ├── maestro.ts
│ │ ├── offline
│ │ │ ├── index.ts
│ │ │ └── offline-fetcher.ts
│ │ ├── ogmios.ts
│ │ ├── types
│ │ │ ├── blockfrost.ts
│ │ │ ├── index.ts
│ │ │ ├── koios.ts
│ │ │ └── maestro.ts
│ │ ├── utils
│ │ │ ├── index.ts
│ │ │ ├── parse-asset-unit.ts
│ │ │ └── parse-http-error.ts
│ │ ├── utxo-rpc.ts
│ │ └── yaci.ts
│ ├── test
│ │ ├── blockfrost
│ │ │ └── evaluator.test.ts
│ │ ├── maestro
│ │ │ └── evaluator.test.ts
│ │ ├── offline
│ │ │ └── fetcher.test.ts
│ │ └── yaci
│ │ │ └── evaluator.test.ts
│ └── tsconfig.json
├── mesh-react
│ ├── .eslintrc.js
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── cardano-wallet-dropdown
│ │ │ ├── checkmark.tsx
│ │ │ ├── chevron-down.tsx
│ │ │ ├── index.tsx
│ │ │ ├── menu-item.tsx
│ │ │ └── wallet-balance.tsx
│ │ ├── cardano-wallet
│ │ │ ├── connected-button.tsx
│ │ │ ├── data.ts
│ │ │ ├── index.tsx
│ │ │ ├── screen-burner.tsx
│ │ │ ├── screen-main.tsx
│ │ │ ├── screen-p2p.tsx
│ │ │ ├── screen-webauthn.tsx
│ │ │ ├── wallet-icon.tsx
│ │ │ └── web3-services.tsx
│ │ ├── common
│ │ │ ├── button-dropdown.tsx
│ │ │ ├── button.tsx
│ │ │ ├── cn.ts
│ │ │ ├── dialog.tsx
│ │ │ ├── dropdown-menu.tsx
│ │ │ ├── icons
│ │ │ │ ├── icon-bitcoin.tsx
│ │ │ │ ├── icon-book-dashed.tsx
│ │ │ │ ├── icon-chevron-right.tsx
│ │ │ │ ├── icon-discord.tsx
│ │ │ │ ├── icon-download.tsx
│ │ │ │ ├── icon-fingerprint.tsx
│ │ │ │ ├── icon-google.tsx
│ │ │ │ ├── icon-monitor-smartphone.tsx
│ │ │ │ ├── icon-plus.tsx
│ │ │ │ └── icon-twitter.tsx
│ │ │ ├── input.tsx
│ │ │ ├── label.tsx
│ │ │ └── tooltip.tsx
│ │ ├── contexts
│ │ │ ├── WalletContext.ts
│ │ │ └── index.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useAddress.ts
│ │ │ ├── useAssets.ts
│ │ │ ├── useLovelace.ts
│ │ │ ├── useNetwork.ts
│ │ │ ├── useRewardAddress.ts
│ │ │ ├── useWallet.ts
│ │ │ ├── useWalletList.ts
│ │ │ └── useWalletSubmit.ts
│ │ ├── index.ts
│ │ ├── mesh-badge
│ │ │ ├── index.tsx
│ │ │ └── mesh-logo.tsx
│ │ ├── stake-button
│ │ │ └── index.tsx
│ │ └── styles.css
│ ├── tailwind.config.ts
│ ├── tsconfig.json
│ └── tsup.config.ts
├── mesh-svelte
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── app.d.ts
│ │ ├── app.html
│ │ ├── index.ts
│ │ ├── lib
│ │ │ ├── cardano-wallet-dropdown
│ │ │ │ ├── component
│ │ │ │ │ ├── cardano-wallet-dropdown-button.svelte
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ │ ├── cardano-wallet
│ │ │ │ ├── component
│ │ │ │ │ ├── cardano-wallet.svelte
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ │ ├── common
│ │ │ │ ├── index.ts
│ │ │ │ └── types.ts
│ │ │ ├── index.ts
│ │ │ └── state
│ │ │ │ ├── browser-wallet-state.svelte.ts
│ │ │ │ └── index.ts
│ │ └── styles.css
│ ├── svelte.config.js
│ ├── tailwind.config.ts
│ ├── tsconfig.json
│ └── vite.config.ts
├── mesh-transaction
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ ├── mesh-tx-builder
│ │ │ ├── coin-selection
│ │ │ │ ├── cardano-sdk-adapter.ts
│ │ │ │ ├── coin-selection-interface.ts
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── tx-builder-core.ts
│ │ │ └── utils.ts
│ │ ├── scripts
│ │ │ ├── forge.script.ts
│ │ │ └── index.ts
│ │ ├── transaction
│ │ │ ├── index.ts
│ │ │ └── transaction-v2.ts
│ │ └── utils
│ │ │ ├── index.ts
│ │ │ └── metadata.ts
│ ├── test
│ │ ├── mesh-tx-builder
│ │ │ ├── balance.test.ts
│ │ │ ├── coin-selection.test.ts
│ │ │ ├── coin-selection
│ │ │ │ └── cardano-sdk-adapter.test.ts
│ │ │ ├── collateral-return.test.ts
│ │ │ ├── complete-info.test.ts
│ │ │ ├── complete.test.ts
│ │ │ ├── duplicate-input.test.ts
│ │ │ ├── info-completeness-checker.test.ts
│ │ │ ├── query.test.ts
│ │ │ ├── redeemer-update.test.ts
│ │ │ ├── script-fee.test.ts
│ │ │ ├── script-tx-fail.test.ts
│ │ │ ├── script-tx-fetcher.test.ts
│ │ │ ├── script-tx.test.ts
│ │ │ ├── tx.test.ts
│ │ │ ├── unbalanced-tx.test.ts
│ │ │ └── vkeys-count.test.ts
│ │ ├── test-util.ts
│ │ └── transaction
│ │ │ ├── sendAssets.test.ts
│ │ │ └── txMetadata.test.ts
│ ├── tsconfig.json
│ └── types
│ │ └── index.ts
└── mesh-wallet
│ ├── README.md
│ ├── jest.config.ts
│ ├── package.json
│ ├── src
│ ├── app
│ │ └── index.ts
│ ├── browser
│ │ ├── browser-wallet.ts
│ │ ├── index.ts
│ │ └── webauthn
│ │ │ ├── auth
│ │ │ ├── connect.ts
│ │ │ ├── index.ts
│ │ │ ├── login.ts
│ │ │ └── register.ts
│ │ │ ├── cardano
│ │ │ └── build-wallet-from-passkey.ts
│ │ │ ├── common
│ │ │ ├── error-codes
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │ └── index.ts
│ ├── embedded
│ │ └── index.ts
│ ├── index.ts
│ ├── mesh
│ │ └── index.ts
│ └── types
│ │ └── index.ts
│ ├── test
│ ├── app.test.ts
│ ├── browser.test.ts
│ ├── embedded.test.ts
│ ├── mesh.test.ts
│ └── message-signing.test.ts
│ └── tsconfig.json
├── patches
├── @basementuniverse+commonjs+1.2.10.patch
├── @basementuniverse+marble-identicons+0.1.2.patch
└── @fabianbormann+cardano-peer-connect+1.2.18.patch
├── scripts
├── bump-version.sh
└── mesh-cli
│ ├── README.md
│ ├── bin
│ └── meshjs.js
│ ├── package.json
│ ├── src
│ ├── actions
│ │ ├── create.ts
│ │ └── index.ts
│ ├── helpers
│ │ ├── index.ts
│ │ ├── resolvePkgManager.ts
│ │ ├── setProjectName.ts
│ │ └── tryGitInit.ts
│ ├── index.ts
│ └── utils
│ │ ├── index.ts
│ │ └── logger.ts
│ └── tsconfig.json
├── tsconfig.json
└── turbo.json
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // This configuration only applies to the package manager root.
2 | /** @type {import("eslint").Linter.Config} */
3 | module.exports = {
4 | ignorePatterns: ["apps/**", "packages/**", "scripts/**"],
5 | extends: ["@meshsdk/configs/eslint/library.js"],
6 | parser: "@typescript-eslint/parser",
7 | parserOptions: {
8 | project: true,
9 | },
10 | };
11 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/.npmrc
--------------------------------------------------------------------------------
/apps/docs/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | root: true,
4 | extends: ["@meshsdk/configs/eslint/next.js"],
5 | parser: "@typescript-eslint/parser",
6 | parserOptions: {
7 | project: true,
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/apps/docs/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/apps/docs/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | images: {
4 | remotePatterns: [
5 | {
6 | protocol: "https",
7 | hostname: "meshjs.dev",
8 | port: "",
9 | pathname: "/**",
10 | },
11 | ],
12 | },
13 | webpack: (config) => {
14 | config.resolve.fallback = { fs: false };
15 | return config;
16 | },
17 | typescript: {
18 | ignoreBuildErrors: true,
19 | },
20 | };
21 |
22 | export default nextConfig;
23 |
--------------------------------------------------------------------------------
/apps/docs/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/apps/docs/src/app/[package]/contracts.tsx:
--------------------------------------------------------------------------------
1 | import { Prose } from "@/components/Prose";
2 |
3 | export default function IntroContracts() {
4 | return (
5 |
6 |
7 | Smart Contracts
8 |
9 | Here's a list of open-source smart contracts, complete with documentation, live
10 | demos, and end-to-end source code.
11 |
12 |
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/apps/docs/src/components/Logo.tsx:
--------------------------------------------------------------------------------
1 | import { useTheme } from 'next-themes';
2 | import Image from 'next/image';
3 |
4 | export function Logo(props: React.ComponentPropsWithoutRef<'svg'>) {
5 | let { theme } = useTheme();
6 | return (
7 |
8 |
18 | Mesh SDK Docs
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/BellIcon.tsx:
--------------------------------------------------------------------------------
1 | export function BellIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/BoltIcon.tsx:
--------------------------------------------------------------------------------
1 | export function BoltIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
10 | )
11 | }
12 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/BookIcon.tsx:
--------------------------------------------------------------------------------
1 | export function BookIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/CartIcon.tsx:
--------------------------------------------------------------------------------
1 | export function CartIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
14 | )
15 | }
16 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/ChatBubbleIcon.tsx:
--------------------------------------------------------------------------------
1 | export function ChatBubbleIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/CheckIcon.tsx:
--------------------------------------------------------------------------------
1 | export function CheckIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/ChevronRightLeftIcon.tsx:
--------------------------------------------------------------------------------
1 | export function ChevronRightLeftIcon(
2 | props: React.ComponentPropsWithoutRef<'svg'>,
3 | ) {
4 | return (
5 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/CopyIcon.tsx:
--------------------------------------------------------------------------------
1 | export function CopyIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/DocumentIcon.tsx:
--------------------------------------------------------------------------------
1 | export function DocumentIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/EnvelopeIcon.tsx:
--------------------------------------------------------------------------------
1 | export function EnvelopeIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/FaceSmileIcon.tsx:
--------------------------------------------------------------------------------
1 | export function FaceSmileIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/LinkIcon.tsx:
--------------------------------------------------------------------------------
1 | export function LinkIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
11 | )
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/ListIcon.tsx:
--------------------------------------------------------------------------------
1 | export function ListIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/MagnifyingGlassIcon.tsx:
--------------------------------------------------------------------------------
1 | export function MagnifyingGlassIcon(
2 | props: React.ComponentPropsWithoutRef<'svg'>,
3 | ) {
4 | return (
5 |
14 | )
15 | }
16 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/PackageIcon.tsx:
--------------------------------------------------------------------------------
1 | export function PackageIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
15 | )
16 | }
17 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/PaperAirplaneIcon.tsx:
--------------------------------------------------------------------------------
1 | export function PaperAirplaneIcon(
2 | props: React.ComponentPropsWithoutRef<'svg'>,
3 | ) {
4 | return (
5 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/PaperClipIcon.tsx:
--------------------------------------------------------------------------------
1 | export function PaperClipIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
11 | )
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/ShapesIcon.tsx:
--------------------------------------------------------------------------------
1 | export function ShapesIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/components/icons/ShirtIcon.tsx:
--------------------------------------------------------------------------------
1 | export function ShirtIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
2 | return (
3 |
10 | )
11 | }
12 |
--------------------------------------------------------------------------------
/apps/docs/src/components/route-change-listener.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useRouteContext } from "@/contexts/route-context";
4 | import { usePathname } from "next/navigation";
5 | import { useEffect } from "react";
6 |
7 | export function RouteChangeListener() {
8 | const pathname = usePathname();
9 | const { setCurrentRoute } = useRouteContext();
10 |
11 | useEffect(() => {
12 | const currentPackage = pathname.split("/")[1];
13 |
14 | if (currentPackage) {
15 | setCurrentRoute(currentPackage);
16 | } else {
17 | setCurrentRoute("");
18 | }
19 | }, [pathname]);
20 |
21 | return <>>;
22 | }
23 |
--------------------------------------------------------------------------------
/apps/docs/src/config/index.ts:
--------------------------------------------------------------------------------
1 | export const githubFileUrl = `https://github.com/MeshJS/mesh/blob/main/packages/module/`;
2 | export const githubUrl = `https://github.com/MeshJS`;
3 | export const twitterhUrl = `https://twitter.com/meshsdk`;
4 | export const discordUrl = `https://discord.gg/WvnCNqmAxy`;
5 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-class-children.ts:
--------------------------------------------------------------------------------
1 | import getClass from "./get-class";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getClassChildren(
5 | name: string,
6 | id: number,
7 | dataSource: string
8 | ) {
9 | const thisClass = getClass(name, dataSource);
10 |
11 | const children = findObjectInArray({
12 | array: thisClass.children,
13 | key: "id",
14 | value: id,
15 | });
16 |
17 | return children;
18 | }
19 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-class.ts:
--------------------------------------------------------------------------------
1 | import getClasses from "./get-classes";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getClass(name, dataSource: string) {
5 | const classes = getClasses(dataSource);
6 |
7 | const meshClass = findObjectInArray({
8 | array: classes,
9 | key: "name",
10 | value: name,
11 | });
12 |
13 | return meshClass;
14 | }
15 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-classes.ts:
--------------------------------------------------------------------------------
1 | import getData from "./get-data";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getClasses(dataSource: string) {
5 | let data: any = getData(dataSource);
6 | if (data === undefined) return [];
7 |
8 | const groupClasses = findObjectInArray({
9 | array: data.groups,
10 | key: "title",
11 | value: "Classes",
12 | });
13 |
14 | const classes = groupClasses.children.map((child: any) => {
15 | const classData = findObjectInArray({
16 | array: data.children,
17 | key: "id",
18 | value: child,
19 | });
20 | return classData;
21 | });
22 |
23 | if (!classes) return [];
24 |
25 | return classes;
26 | }
27 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-function.ts:
--------------------------------------------------------------------------------
1 | import getFunctions from './get-functions';
2 | import { findObjectInArray } from './utils';
3 |
4 | export default function getFunction(name: string, dataSource: string) {
5 | const functions = getFunctions(dataSource);
6 |
7 | return findObjectInArray({
8 | array: functions,
9 | key: 'name',
10 | value: name,
11 | });
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-functions.ts:
--------------------------------------------------------------------------------
1 | import getData from "./get-data";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getFunctions(dataSource: string) {
5 | let data: any = getData(dataSource);
6 | if (data === undefined) return [];
7 |
8 | const group = findObjectInArray({
9 | array: data.groups,
10 | key: "title",
11 | value: "Functions",
12 | });
13 |
14 | const classes = group?.children.map((child: any) => {
15 | const classData = findObjectInArray({
16 | array: data.children,
17 | key: "id",
18 | value: child,
19 | });
20 | return classData;
21 | });
22 |
23 | if (!classes) return [];
24 |
25 | return classes;
26 | }
27 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-interface.ts:
--------------------------------------------------------------------------------
1 | import getInterfaces from './get-interfaces';
2 | import { findObjectInArray } from './utils';
3 |
4 | export default function getInterface(name: string, dataSource: string) {
5 | const interfaces = getInterfaces(dataSource);
6 |
7 | return findObjectInArray({
8 | array: interfaces,
9 | key: 'name',
10 | value: name,
11 | });
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-interfaces.ts:
--------------------------------------------------------------------------------
1 | import getData from "./get-data";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getInterfaces(dataSource: string) {
5 | let data: any = getData(dataSource);
6 | if (data === undefined) return [];
7 |
8 | const group = findObjectInArray({
9 | array: data.groups,
10 | key: "title",
11 | value: "Interfaces",
12 | });
13 |
14 | const classes = group?.children.map((child: any) => {
15 | const classData = findObjectInArray({
16 | array: data.children,
17 | key: "id",
18 | value: child,
19 | });
20 | return classData;
21 | });
22 |
23 | if (!classes) return [];
24 |
25 | return classes;
26 | }
27 |
--------------------------------------------------------------------------------
/apps/docs/src/data/get-type.ts:
--------------------------------------------------------------------------------
1 | import getTypes from "./get-types";
2 | import { findObjectInArray } from "./utils";
3 |
4 | export default function getType(name: string, dataSource: string) {
5 | const types = getTypes(dataSource);
6 |
7 | return findObjectInArray({
8 | array: types,
9 | key: "name",
10 | value: name,
11 | });
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/data/page-routes.ts:
--------------------------------------------------------------------------------
1 | export const pageRoutes = [
2 | {
3 | id: "common",
4 | url: "/common",
5 | title: "Common",
6 | },
7 | {
8 | id: "contracts",
9 | url: "/contracts",
10 | title: "Contracts",
11 | },
12 | {
13 | id: "core-csl",
14 | url: "/core-csl",
15 | title: "Core CSL",
16 | },
17 | {
18 | id: "providers",
19 | url: "/providers",
20 | title: "Providers",
21 | },
22 | {
23 | id: "transactions",
24 | url: "/transactions",
25 | title: "Transactions",
26 | },
27 | {
28 | id: "wallets",
29 | url: "/wallets",
30 | title: "Wallets",
31 | },
32 | ];
33 |
--------------------------------------------------------------------------------
/apps/docs/src/data/utils.ts:
--------------------------------------------------------------------------------
1 | export function findObjectInArray({
2 | array,
3 | key,
4 | value,
5 | }: {
6 | array: any[];
7 | key: string;
8 | value: any;
9 | }) {
10 | return array.find((x: any) => x[key] === value);
11 | }
12 |
--------------------------------------------------------------------------------
/apps/docs/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/docs/src/favicon.ico
--------------------------------------------------------------------------------
/apps/docs/src/lib/remToPx.ts:
--------------------------------------------------------------------------------
1 | export function remToPx(remValue: number) {
2 | let rootFontSize =
3 | typeof window === 'undefined'
4 | ? 16
5 | : parseFloat(window.getComputedStyle(document.documentElement).fontSize);
6 |
7 | return remValue * rootFontSize;
8 | }
9 |
--------------------------------------------------------------------------------
/apps/docs/src/mdx/recma.mjs:
--------------------------------------------------------------------------------
1 | import { mdxAnnotations } from 'mdx-annotations'
2 |
3 | export const recmaPlugins = [mdxAnnotations.recma]
4 |
--------------------------------------------------------------------------------
/apps/docs/src/mdx/remark.mjs:
--------------------------------------------------------------------------------
1 | import { mdxAnnotations } from 'mdx-annotations'
2 | import remarkGfm from 'remark-gfm'
3 |
4 | export const remarkPlugins = [mdxAnnotations.remark, remarkGfm]
5 |
--------------------------------------------------------------------------------
/apps/docs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/nextjs.json",
3 | "compilerOptions": {
4 | "paths": {
5 | "@/*": ["./src/*"]
6 | }
7 | },
8 | "include": [
9 | "next-env.d.ts",
10 | "next.config.js",
11 | "**/*.ts",
12 | "**/*.tsx",
13 | ".next/types/**/*.ts"
14 | ],
15 | "exclude": ["node_modules"]
16 | }
17 |
--------------------------------------------------------------------------------
/apps/playground/.env.example:
--------------------------------------------------------------------------------
1 | BLOCKFROST_API_KEY_MAINNET=
2 | BLOCKFROST_API_KEY_TESTNET=
3 | BLOCKFROST_API_KEY_PREVIEW=
4 | BLOCKFROST_API_KEY_PREPROD=
5 |
6 | DONATE_ADA_ADDRESS=
7 | DONATE_MESHTOKEN_WALLET=
8 |
9 | NEXT_PUBLIC_GOOGLE_ANALYTICS=
10 |
11 | GOOGLE_SEARCH_API=
12 | GOOGLE_SEARCH_CX=
--------------------------------------------------------------------------------
/apps/playground/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | root: true,
4 | extends: ["@meshsdk/configs/eslint/next.js"],
5 | parser: "@typescript-eslint/parser",
6 | parserOptions: {
7 | project: true,
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/apps/playground/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
6 |
--------------------------------------------------------------------------------
/apps/playground/next.config.js:
--------------------------------------------------------------------------------
1 | const withMDX = require("@next/mdx")();
2 |
3 | /** @type {import('next').NextConfig} */
4 | const nextConfig = {
5 | reactStrictMode: true,
6 | // webpack: function (config, options) {
7 | // config.experiments = {
8 | // asyncWebAssembly: true,
9 | // layers: true,
10 | // };
11 | // return config;
12 | // },
13 | pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
14 | };
15 | module.exports = withMDX(nextConfig);
16 |
--------------------------------------------------------------------------------
/apps/playground/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/apps/playground/public/articles/spices-4185324_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/articles/spices-4185324_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/android-chrome-512x512.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #444444
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/apps/playground/public/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/favicon.ico
--------------------------------------------------------------------------------
/apps/playground/public/favicon/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/favicon/mstile-150x150.png
--------------------------------------------------------------------------------
/apps/playground/public/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mesh",
3 | "short_name": "Mesh",
4 | "icons": [
5 | {
6 | "src": "/favicon/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/favicon/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/apps/playground/public/governance/network-3524352_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/governance/network-3524352_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/aiken.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/aiken.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/arches-1866598_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/arches-1866598_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/art-g68512aa8d_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/art-g68512aa8d_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/blockchain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/blockchain.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/cryptographically-prove-wallet-ownership-process.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/cryptographically-prove-wallet-ownership-process.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/cryptographically-prove-wallet-ownership.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/cryptographically-prove-wallet-ownership.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/custom-marketplace-1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/custom-marketplace-1.jpeg
--------------------------------------------------------------------------------
/apps/playground/public/guides/custom-marketplace-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/custom-marketplace-2.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/custom-marketplace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/custom-marketplace.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/develop-first-web-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/develop-first-web-app.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/door-gf0710cc4d_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/door-gf0710cc4d_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/electrician-3087536_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/electrician-3087536_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/implement-custom-provider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/implement-custom-provider.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/integrating-smart-contract.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/integrating-smart-contract.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/key-gb17103099_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/key-gb17103099_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/keys-g25a80b203_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/keys-g25a80b203_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/laptop-3196481_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/laptop-3196481_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/laptop-g44c60b4ed_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/laptop-g44c60b4ed_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/mint-nft-collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/mint-nft-collection.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/minting-application.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/minting-application.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/multi-signatures-transaction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/multi-signatures-transaction.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/nextjs.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/node-specific-imports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/node-specific-imports.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/nodejs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/nodejs.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/pluts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/pluts.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/salt-harvesting-3060093_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/salt-harvesting-3060093_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/service-g2192fe835_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/service-g2192fe835_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/smart-contract-transactions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/smart-contract-transactions.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/smart-contracts.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/smart-contracts.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/standalone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/standalone.png
--------------------------------------------------------------------------------
/apps/playground/public/guides/sunset-g52fe9bcd1_1280.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/sunset-g52fe9bcd1_1280.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/supermarket-g42acef7c1_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/supermarket-g42acef7c1_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/guides/vesting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/guides/vesting.png
--------------------------------------------------------------------------------
/apps/playground/public/home/developer-8764521_640.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/home/developer-8764521_640.jpg
--------------------------------------------------------------------------------
/apps/playground/public/home/starter-template-cli.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/home/starter-template-cli.mp4
--------------------------------------------------------------------------------
/apps/playground/public/images/aiken/aiken-card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/images/aiken/aiken-card.png
--------------------------------------------------------------------------------
/apps/playground/public/images/aiken/aiken-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/images/aiken/aiken-icon.png
--------------------------------------------------------------------------------
/apps/playground/public/images/aiken/logo-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/images/aiken/logo-dark.png
--------------------------------------------------------------------------------
/apps/playground/public/images/aiken/logo-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/images/aiken/logo-light.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-128x128.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-16x16.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-256x256.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-300x300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-300x300.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-32x32.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-512x512.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/black/logo-mesh-black-64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/black/logo-mesh-black-64x64.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/mesh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/mesh.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-128x128.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-16x16.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-256x256.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-300x300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-300x300.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-32x32.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-512x512.png
--------------------------------------------------------------------------------
/apps/playground/public/logo-mesh/white/logo-mesh-white-64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/logo-mesh/white/logo-mesh-white-64x64.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/blockfrost.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/blockfrost.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/hydra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/hydra.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/koios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/koios.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/maestro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/maestro.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/ogmios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/ogmios.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/utxo-rpc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/utxo-rpc.png
--------------------------------------------------------------------------------
/apps/playground/public/providers/yaci.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/providers/yaci.png
--------------------------------------------------------------------------------
/apps/playground/public/support/discord.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/discord.png
--------------------------------------------------------------------------------
/apps/playground/public/support/github-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/github-dark.png
--------------------------------------------------------------------------------
/apps/playground/public/support/github-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/github-light.png
--------------------------------------------------------------------------------
/apps/playground/public/support/meshbadge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/meshbadge.png
--------------------------------------------------------------------------------
/apps/playground/public/support/thank-you.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/thank-you.png
--------------------------------------------------------------------------------
/apps/playground/public/support/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/support/twitter.png
--------------------------------------------------------------------------------
/apps/playground/public/team/abdelkrim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/abdelkrim.png
--------------------------------------------------------------------------------
/apps/playground/public/team/erick.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/erick.jpg
--------------------------------------------------------------------------------
/apps/playground/public/team/felix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/felix.png
--------------------------------------------------------------------------------
/apps/playground/public/team/hinson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/hinson.png
--------------------------------------------------------------------------------
/apps/playground/public/team/jingles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/jingles.png
--------------------------------------------------------------------------------
/apps/playground/public/team/tszwai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/apps/playground/public/team/tszwai.png
--------------------------------------------------------------------------------
/apps/playground/src/backend/index.ts:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | const instance = axios.create({
4 | baseURL: `/api/`,
5 | withCredentials: true,
6 | });
7 |
8 | export async function post(route: string, body = {}) {
9 | return await instance
10 | .post(`${route}`, body)
11 | .then(({ data }) => {
12 | return data;
13 | })
14 | .catch((error) => {
15 | throw error;
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/apps/playground/src/backend/search.ts:
--------------------------------------------------------------------------------
1 | import { post } from "./";
2 |
3 | export async function searchQuery(query: string) {
4 | return await post(`google/search`, { query });
5 | }
6 |
--------------------------------------------------------------------------------
/apps/playground/src/backend/support.ts:
--------------------------------------------------------------------------------
1 | import { post } from './';
2 | import type { UTxO } from '@meshsdk/core';
3 |
4 | export async function createTransactionDonate(
5 | recipientAddress: string,
6 | amount: number,
7 | utxos: UTxO[]
8 | ) {
9 | return await post(`donate-mint-mesh`, { recipientAddress, amount, utxos });
10 | }
11 |
--------------------------------------------------------------------------------
/apps/playground/src/components/button/button-float-documentation.tsx:
--------------------------------------------------------------------------------
1 | import { DocumentTextIcon } from "@heroicons/react/24/solid";
2 |
3 | import Link from "../link";
4 | import Button from "./button";
5 |
6 | export default function ButtonFloatDocumentation({ href }: { href: string }) {
7 | return (
8 |
9 |
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/apps/playground/src/components/cardano/fetch-utxo-by-datum.ts:
--------------------------------------------------------------------------------
1 | import { resolveDataHash } from "@meshsdk/core";
2 |
3 | import { getProvider } from "./mesh-wallet";
4 |
5 | export async function fetchAssetUtxo({
6 | address,
7 | asset,
8 | datum,
9 | }: {
10 | address: string;
11 | asset: string;
12 | datum: string;
13 | }) {
14 | const provider = getProvider();
15 | const utxos = await provider.fetchAddressUTxOs(address, asset);
16 |
17 | const dataHash = resolveDataHash(datum);
18 |
19 | let utxo = utxos.find((utxo: any) => {
20 | return utxo.output.dataHash == dataHash;
21 | });
22 |
23 | return utxo;
24 | }
25 |
--------------------------------------------------------------------------------
/apps/playground/src/components/cardano/mesh-wallet.ts:
--------------------------------------------------------------------------------
1 | import { BlockfrostProvider, MeshWallet } from "@meshsdk/core";
2 |
3 | export function getProvider(network = "preprod") {
4 | const provider = new BlockfrostProvider(
5 | `/api/blockfrost/${network}/`,
6 | );
7 | provider.setSubmitTxToBytes(false);
8 | return provider;
9 | }
10 |
11 | export function getMeshWallet() {
12 | const provider = getProvider();
13 | const wallet = new MeshWallet({
14 | networkId: 0,
15 | fetcher: provider,
16 | submitter: provider,
17 | key: {
18 | type: "mnemonic",
19 | words: "solution,".repeat(24).split(",").slice(0, 24),
20 | },
21 | });
22 | return wallet;
23 | }
24 |
--------------------------------------------------------------------------------
/apps/playground/src/components/icon.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default function Icon({
4 | icon,
5 | className,
6 | }: {
7 | icon: any;
8 | className?: string;
9 | }) {
10 | if (icon) {
11 | if (typeof icon === "object" || typeof icon === "function") {
12 | return React.createElement(icon, { className: className });
13 | }
14 |
15 | if (typeof icon === "string") {
16 | return
;
17 | }
18 | }
19 |
20 | return <>>;
21 | }
22 |
--------------------------------------------------------------------------------
/apps/playground/src/components/layouts/root/center-padded.tsx:
--------------------------------------------------------------------------------
1 | export default function CenterPadded({
2 | children,
3 | }: {
4 | children: React.ReactNode;
5 | }) {
6 | return (
7 |
8 | {children}
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/playground/src/components/layouts/root/full-width.tsx:
--------------------------------------------------------------------------------
1 | export default function FullWidth({ children }: { children: React.ReactNode }) {
2 | return (
3 |
4 | {children}
5 |
6 | );
7 | }
8 |
--------------------------------------------------------------------------------
/apps/playground/src/components/layouts/sidebar-fullwidth.tsx:
--------------------------------------------------------------------------------
1 | import FullWidth from "~/components/layouts/root/full-width";
2 | import Sidebar from "./sidebar";
3 |
4 | export default function SidebarFullwidth({
5 | children,
6 | sidebarItems,
7 | }: {
8 | children: any;
9 | sidebarItems: { to: string; label: string }[];
10 | }) {
11 | return (
12 |
13 |
14 |
15 | {children}
16 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/apps/playground/src/components/sections/center-align-header-paragraph.tsx:
--------------------------------------------------------------------------------
1 | import Header2 from "~/components/text/header2";
2 | import Paragraph2 from "~/components/text/paragraph2";
3 |
4 | export default function CenterAlignHeaderParagraph({
5 | children,
6 | headerTitle,
7 | }: {
8 | children: React.ReactNode;
9 | headerTitle: string;
10 | }) {
11 | return (
12 |
13 |
{headerTitle}
14 |
{children}
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/apps/playground/src/components/sections/demo-result.tsx:
--------------------------------------------------------------------------------
1 | import Codeblock from "~/components/text/codeblock";
2 |
3 | export default function DemoResult({
4 | response,
5 | label = "Result",
6 | }: {
7 | response: any;
8 | label?: string;
9 | }) {
10 | return (
11 | <>
12 | {response !== null && response !== undefined && (
13 | <>
14 |
15 | {label}:
16 |
17 |
18 | >
19 | )}
20 | >
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/apps/playground/src/components/sections/input-table.tsx:
--------------------------------------------------------------------------------
1 | export default function InputTable({
2 | listInputs,
3 | }: {
4 | listInputs: React.ReactNode[];
5 | }) {
6 | return (
7 |
8 |
9 |
10 | {listInputs.map((input, i) => {
11 | return (
12 |
13 | {input} |
14 |
15 | );
16 | })}
17 |
18 |
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/apps/playground/src/components/site/navbar/menu-item.tsx:
--------------------------------------------------------------------------------
1 | import Link from "~/components/link";
2 |
3 | export default function MenuItem({
4 | title,
5 | link,
6 | }: {
7 | title: string;
8 | link: string;
9 | }) {
10 | return (
11 |
12 |
16 | {title}
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/playground/src/components/site/navbar/submenu-item.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import Icon from "~/components/icon";
4 | import Link from "~/components/link";
5 |
6 | export default function SubmenuItem({
7 | title,
8 | icon,
9 | link,
10 | }: {
11 | title: string;
12 | icon: any;
13 | link: string;
14 | }) {
15 | return (
16 |
17 |
22 |
23 | {title}
24 |
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/apps/playground/src/components/site/scroller.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 | import { useRouter } from "next/router";
3 |
4 | var Scroll = require("react-scroll");
5 | var scroller = Scroll.scroller;
6 |
7 | export default function Scroller() {
8 | const router = useRouter();
9 |
10 | useEffect(() => {
11 | const splitedUrl = router.asPath.split("#");
12 | if (splitedUrl.length === 2) {
13 | scroller.scrollTo(splitedUrl[1], {
14 | duration: 500,
15 | delay: 100,
16 | smooth: true,
17 | offset: 0,
18 | });
19 | }
20 | }, [router.asPath]);
21 |
22 | return <>>;
23 | }
24 |
--------------------------------------------------------------------------------
/apps/playground/src/components/text/alert.tsx:
--------------------------------------------------------------------------------
1 | export default function Alert({ children }: { children: React.ReactNode }) {
2 | return (
3 |
4 | {children}
5 |
6 | );
7 | }
8 |
--------------------------------------------------------------------------------
/apps/playground/src/components/text/header3.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default function Header3({ children }: { children: React.ReactNode }) {
4 | return (
5 |
6 | {children}
7 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/apps/playground/src/components/text/paragraph2.tsx:
--------------------------------------------------------------------------------
1 | export default function Paragraph2({
2 | children,
3 | }: {
4 | children: React.ReactNode;
5 | }) {
6 | return (
7 |
8 | {children}
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/playground/src/contexts/providers.tsx:
--------------------------------------------------------------------------------
1 | import { AppWalletProvider } from "./app-wallet";
2 | import { MeshWalletProvider } from "./mesh-wallet";
3 |
4 | export default function Providers({ children }: { children: React.ReactNode }) {
5 | return (
6 |
7 | {children}
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/apps/playground/src/data/links-midnight.ts:
--------------------------------------------------------------------------------
1 | import SvgMidnight from "~/components/svgs/midnight";
2 | import { MenuItem } from "~/types/menu-item";
3 |
4 | export const metaMidnight: MenuItem = {
5 | title: "Midnight",
6 | desc: "Leveraging zero-knowledge technology to enable data protection",
7 | link: "https://midnight.meshjs.dev/",
8 | icon: SvgMidnight,
9 | };
10 |
--------------------------------------------------------------------------------
/apps/playground/src/data/search-blacklist-links.ts:
--------------------------------------------------------------------------------
1 | export const searchBlacklistLinks = [
2 | "https://meshjs.dev/apis/wallets/appwallet",
3 | "https://pbl.meshjs.dev",
4 | "https://meshjs.dev/about/catalyst",
5 | ];
6 |
--------------------------------------------------------------------------------
/apps/playground/src/data/site.ts:
--------------------------------------------------------------------------------
1 | export const rootUrl = "https://meshjs.dev";
2 |
--------------------------------------------------------------------------------
/apps/playground/src/data/social.ts:
--------------------------------------------------------------------------------
1 | import SvgDiscord from "~/components/svgs/discord";
2 | import SvgGithub from "~/components/svgs/github";
3 | import SvgTwitter from "~/components/svgs/twitter";
4 |
5 | export const linkDiscord = {
6 | icon: SvgDiscord,
7 | link: "/go/discord",
8 | redirect: "https://discord.gg/WvnCNqmAxy",
9 | };
10 | export const linkGithub = {
11 | icon: SvgGithub,
12 | link: "/go/github",
13 | redirect: "https://github.com/MeshJS/mesh",
14 | };
15 | export const linkTwitter = {
16 | icon: SvgTwitter,
17 | link: "/go/twitter",
18 | redirect: "https://twitter.com/meshsdk",
19 | };
20 |
21 | export const socials = [linkDiscord, linkTwitter, linkGithub];
22 |
--------------------------------------------------------------------------------
/apps/playground/src/hooks/useDarkmode.ts:
--------------------------------------------------------------------------------
1 | import { create } from "zustand";
2 | import { persist } from "zustand/middleware";
3 |
4 | interface State {
5 | isDark: boolean;
6 | setDarkMode: (isDark: boolean) => void;
7 | }
8 |
9 | export const useDarkmode = create()(
10 | persist(
11 | (set, get) => ({
12 | isDark: false,
13 | setDarkMode: (bool) => set((state) => ({ isDark: bool })),
14 | }),
15 | {
16 | name: "mesh-darkmode",
17 | },
18 | ),
19 | );
20 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/_document.tsx:
--------------------------------------------------------------------------------
1 | import { Head, Html, Main, NextScript } from "next/document";
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/about/about-us/incorporation.tsx:
--------------------------------------------------------------------------------
1 | import { AboutSection } from "../";
2 |
3 | export default function AboutIncorporation() {
4 | return (
5 |
9 | <>>
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/about/about-us/what-working-on.tsx:
--------------------------------------------------------------------------------
1 | import Link from "~/components/link";
2 | import { AboutSection } from "../";
3 |
4 | export default function AboutWhatWorkingOn() {
5 | return (
6 |
10 | Check out our{" "}
11 |
12 | GitHub milestones
13 | {" "}
14 | to see what we are currently working on.
15 | >
16 | }
17 | >
18 | <>>
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/apis/data/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksData, metaData } from "~/data/links-data";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/apis/txbuilder/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksTxbuilder, metaTxbuilder } from "~/data/links-txbuilders";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/apis/utilities/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksUtilities, metaUtilities } from "~/data/links-utilities";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/apis/wallets/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksWallets, metaWallets } from "~/data/links-wallets";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/apis/wallets/meshwallet/common.tsx:
--------------------------------------------------------------------------------
1 | export function AboutGetAddressType() {
2 | return (
3 | <>
4 |
5 | This API accepts the addressType
parameter, where you can
6 | specify the type of address you want to get. The available options are:
7 |
8 |
9 | - payment (default)
10 | - enterprise
11 |
12 | >
13 | );
14 | }
15 | export default function Placeholder() {}
16 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/article/typescript-cardano-sdk.mdx:
--------------------------------------------------------------------------------
1 | import LayoutImageHeaderAndBody from "~/components/layouts/image-header-and-body";
2 | import { articleMesh20 } from "~/data/links-articles";
3 |
4 | export default function MDXPage({ children }) {
5 | return (
6 |
12 | {children}
13 |
14 | );
15 | }
16 |
17 | New article
--------------------------------------------------------------------------------
/apps/playground/src/pages/article/whats-new-in-16.mdx:
--------------------------------------------------------------------------------
1 | import LayoutImageHeaderAndBody from "~/components/layouts/image-header-and-body";
2 | import { articleNew16 } from "~/data/links-articles";
3 |
4 | export default function MDXPage({ children }) {
5 | return (
6 |
12 | {children}
13 |
14 | );
15 | }
16 |
17 | New article
18 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/go/discord.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 | import { useRouter } from "next/navigation";
3 |
4 | import { linkDiscord } from "~/data/social";
5 |
6 | export default function Redirect() {
7 | const { push } = useRouter();
8 | useEffect(() => {
9 | push(linkDiscord.redirect);
10 | }, []);
11 | return <>>;
12 | }
13 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/go/github.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 | import { useRouter } from "next/navigation";
3 |
4 | import { linkGithub } from "~/data/social";
5 |
6 | export default function Redirect() {
7 | const { push } = useRouter();
8 | useEffect(() => {
9 | push(linkGithub.redirect);
10 | }, []);
11 | return <>>;
12 | }
13 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/go/twitter.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 | import { useRouter } from "next/navigation";
3 |
4 | import { linkTwitter } from "~/data/social";
5 |
6 | export default function Redirect() {
7 | const { push } = useRouter();
8 | useEffect(() => {
9 | push(linkTwitter.redirect);
10 | }, []);
11 | return <>>;
12 | }
13 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/guides/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksGuides, metaGuides } from "~/data/links-guides";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/guides/vesting/demo.tsx:
--------------------------------------------------------------------------------
1 | import { VestingDepositFundDemo } from "../../smart-contracts/vesting/deposit-fund";
2 | import { VestingWithdrawFundDemo } from "../../smart-contracts/vesting/withdraw-fund";
3 |
4 | export default function Demo() {
5 | return (
6 | <>
7 |
8 |
9 | >
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/hydra/common.tsx:
--------------------------------------------------------------------------------
1 | import { linksHydra } from "~/data/links-hydra";
2 |
3 | export function getPageLinks() {
4 | const sidebarItems = linksHydra.map((link) => ({
5 | label: link.title,
6 | to: link.link,
7 | }));
8 | return sidebarItems;
9 | }
10 |
11 | export default function Placeholder() {}
12 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/hydra/getting-started/install.tsx:
--------------------------------------------------------------------------------
1 | import TwoColumnsScroll from "~/components/sections/two-columns-scroll";
2 | import Codeblock from "~/components/text/codeblock";
3 |
4 | export default function MidnightInstallationInstructions() {
5 | return (
6 |
11 | );
12 | }
13 |
14 | function Left() {
15 | return (
16 | <>
17 |
18 | How to get started?
19 |
20 |
21 | Check your installation
22 |
23 | More instructions here.
24 |
25 | >
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HomePage from "./home";
4 |
5 | const ReactPage: NextPage = () => {
6 | return ;
7 | };
8 |
9 | export default ReactPage;
10 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/providers/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksProviders, metaProviders } from "~/data/links-providers";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/react/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksReact, metaReact } from "~/data/links-react";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/resources/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksResources, metaResources } from "~/data/links-resources";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/resources/platforms/common.tsx:
--------------------------------------------------------------------------------
1 | import { linksFrameworks } from "~/data/links-frameworks";
2 |
3 | export function getPageLinks() {
4 | const sidebarItems = linksFrameworks.map((link) => ({
5 | label: link.title,
6 | to: link.link,
7 | }));
8 | return sidebarItems;
9 | }
10 |
11 | export default function Placeholder() {}
12 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/resources/platforms/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksFrameworks, metaFrameworks } from "~/data/links-frameworks";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/smart-contracts/common.tsx:
--------------------------------------------------------------------------------
1 | import Codeblock from "~/components/text/codeblock";
2 |
3 | export function InstallSmartContract() {
4 | return (
5 | <>
6 | Install package
7 |
8 | First you can to install the @meshsdk/contracts
package:
9 |
10 |
11 | >
12 | );
13 | }
14 |
15 | export default function Placeholder() {}
16 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/solutions/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksSolutions, metaSolutions } from "~/data/links-solutions";
6 |
7 | const ReactPage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default ReactPage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/svelte/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 |
3 | import HeaderAndCards from "~/components/layouts/header-and-cards";
4 | import Metatags from "~/components/site/metatags";
5 | import { linksSvelte, metaSvelte } from "~/data/links-svelte";
6 |
7 | const SveltePage: NextPage = () => {
8 | return (
9 | <>
10 |
11 |
16 | >
17 | );
18 | };
19 |
20 | export default SveltePage;
21 |
--------------------------------------------------------------------------------
/apps/playground/src/pages/yaci/common.tsx:
--------------------------------------------------------------------------------
1 | import { linksYaci } from "~/data/links-yaci";
2 |
3 | export function getPageLinks() {
4 | const sidebarItems = linksYaci.map((link) => ({
5 | label: link.title,
6 | to: link.link,
7 | }));
8 | return sidebarItems;
9 | }
10 |
11 | export default function Placeholder() {}
12 |
--------------------------------------------------------------------------------
/apps/playground/src/types/menu-item.ts:
--------------------------------------------------------------------------------
1 | export type MenuItem = {
2 | title: string;
3 | desc: string;
4 | link: string;
5 | icon?: any;
6 | items?: MenuItem[];
7 | thumbnail?: string;
8 | };
9 |
--------------------------------------------------------------------------------
/apps/playground/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/nextjs.json",
3 | "compilerOptions": {
4 | "paths": {
5 | "~/*": ["./src/*"]
6 | }
7 | },
8 | "include": [
9 | "next-env.d.ts",
10 | "next.config.js",
11 | "**/*.ts",
12 | "**/*.tsx",
13 | ".next/types/**/*.ts"
14 | ],
15 | "exclude": ["node_modules"]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/bitcoin/README.md:
--------------------------------------------------------------------------------
1 | # mesh-bitcoin
2 |
3 | Bitcoin integration for MeshJS, enabling developers to build applications that interact with the Bitcoin blockchain.
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
7 | ## Get started
8 |
9 | ```bash
10 | npm install @meshsdk/bitcoin
11 | ```
12 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/core.ts:
--------------------------------------------------------------------------------
1 | import * as bitcoin from "bitcoinjs-lib";
2 | import * as ecc from "@bitcoin-js/tiny-secp256k1-asmjs";
3 | import * as bip39 from "bip39";
4 | import { BIP32Factory } from "bip32";
5 | import { ECPairFactory } from "ecpair";
6 |
7 | const bip32 = BIP32Factory(ecc);
8 | const ECPair = ECPairFactory(ecc);
9 |
10 | bitcoin.initEccLib(ecc);
11 |
12 | export { bitcoin, ECPair, bip32, bip39 };
13 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./core";
2 | export * from "./interfaces";
3 | export * from "./providers";
4 | export * from "./types";
5 | export * from "./wallets";
6 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./wallet";
2 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/interfaces/wallet.ts:
--------------------------------------------------------------------------------
1 | export interface IBitcoinWallet {
2 | getChangeAddress(): Promise;
3 | getNetworkId(): Promise<0 | 1>;
4 | signTx(signedTx: string): Promise;
5 | submitTx(tx: string): Promise;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/providers/common.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export const parseHttpError = (error: unknown): string => {
4 | if (!axios.isAxiosError(error)) {
5 | return JSON.stringify(error);
6 | }
7 |
8 | if (error.response) {
9 | return JSON.stringify({
10 | data: error.response.data,
11 | headers: error.response.headers,
12 | status: error.response.status,
13 | });
14 | }
15 |
16 | if (error.request && !(error.request instanceof XMLHttpRequest)) {
17 | return JSON.stringify(error.request);
18 | }
19 |
20 | return JSON.stringify({ code: error.code, message: error.message });
21 | };
22 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/providers/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./blockstream";
2 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/address-info.ts:
--------------------------------------------------------------------------------
1 | import { ChainStats } from "./chain-stats";
2 | import { MempoolStats } from "./mempool-stats";
3 |
4 | export type AddressInfo = {
5 | address: string;
6 | chain_stats: ChainStats;
7 | mempool_stats: MempoolStats;
8 | };
9 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/address.ts:
--------------------------------------------------------------------------------
1 | export type Address = {
2 | address: string;
3 | publicKey: string;
4 | purpose: "payment" | "ordinals" | "stacks";
5 | addressType: "p2tr" | "p2wpkh" | "p2sh" | "stacks";
6 | }
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/chain-stats.ts:
--------------------------------------------------------------------------------
1 | export type ChainStats = {
2 | funded_txo_count: number;
3 | funded_txo_sum: number;
4 | spent_txo_count: number;
5 | spent_txo_sum: number;
6 | tx_count: number;
7 | };
8 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from './address';
2 | export * from './utxo';
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/mempool-stats.ts:
--------------------------------------------------------------------------------
1 | export type MempoolStats = {
2 | funded_txo_count: number;
3 | funded_txo_sum: number;
4 | spent_txo_count: number;
5 | spent_txo_sum: number;
6 | tx_count: number;
7 | };
8 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/script-info.ts:
--------------------------------------------------------------------------------
1 | import { ChainStats } from "./chain-stats";
2 | import { MempoolStats } from "./mempool-stats";
3 |
4 | export type ScriptInfo = {
5 | scripthash: string;
6 | chain_stats: ChainStats;
7 | mempool_stats: MempoolStats;
8 | };
9 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/transactions-status.ts:
--------------------------------------------------------------------------------
1 | export type TransactionsStatus = {
2 | confirmed: boolean;
3 | block_height: number;
4 | block_hash: string;
5 | block_time: number;
6 | };
7 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/types/utxo.ts:
--------------------------------------------------------------------------------
1 | export type UTxO = {
2 | status: {
3 | block_hash: string;
4 | block_height: number;
5 | block_time: number;
6 | confirmed: boolean;
7 | };
8 | txid: string;
9 | value: number;
10 | vout: number;
11 | };
12 |
--------------------------------------------------------------------------------
/packages/bitcoin/src/wallets/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./browser";
2 | export * from "./embedded";
3 |
--------------------------------------------------------------------------------
/packages/bitcoin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "CommonJS",
5 | "lib": ["ES6"],
6 | "strict": true,
7 | "esModuleInterop": true,
8 | "outDir": "./dist"
9 | },
10 | "include": ["src"]
11 | }
--------------------------------------------------------------------------------
/packages/bitcoin/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup";
2 |
3 | export default defineConfig({
4 | entry: ["src/index.ts"],
5 | format: ["esm", "cjs"],
6 | dts: true,
7 | splitting: false,
8 | sourcemap: true,
9 | clean: true,
10 | external: [
11 | "bip32",
12 | "ecpair",
13 | "@bitcoin-js/tiny-secp256k1-asmjs",
14 | "bitcoinjs-lib",
15 | ],
16 | noExternal: ["@meshsdk/bitcoin"],
17 | esbuildOptions(options) {
18 | options.define = {
19 | global: "globalThis",
20 | process: JSON.stringify({
21 | env: {
22 | NODE_ENV: "production",
23 | },
24 | }),
25 | };
26 | options.platform = "browser";
27 | },
28 | });
--------------------------------------------------------------------------------
/packages/configs/jest/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/configs/tailwind/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Omit = {
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [],
8 | };
9 | export default config;
10 |
--------------------------------------------------------------------------------
/packages/configs/typescript/nextjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Next.js",
4 | "extends": "./base.json",
5 | "compilerOptions": {
6 | "plugins": [{ "name": "next" }],
7 | "module": "ESNext",
8 | "moduleResolution": "Bundler",
9 | "allowJs": true,
10 | "jsx": "preserve",
11 | "noEmit": true,
12 | "noUnusedLocals": false,
13 | "noImplicitAny": false
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/configs/typescript/react-library.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "React Library",
4 | "extends": "./base.json",
5 | "compilerOptions": {
6 | "jsx": "react-jsx"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/configs/typescript/wasm-base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "allowSyntheticDefaultImports": true,
5 | "baseUrl": "src",
6 | "declaration": true,
7 | "esModuleInterop": true,
8 | "inlineSourceMap": false,
9 | "lib": [
10 | "esnext"
11 | ],
12 | "listEmittedFiles": false,
13 | "listFiles": false,
14 | "moduleResolution": "node",
15 | "noFallthroughCasesInSwitch": true,
16 | "pretty": true,
17 | "resolveJsonModule": true,
18 | "skipLibCheck": true,
19 | "strict": true,
20 | "traceResolution": false,
21 | "types": [
22 | "node",
23 | "jest"
24 | ]
25 | },
26 | "compileOnSave": false
27 | }
--------------------------------------------------------------------------------
/packages/mesh-common/.env.example:
--------------------------------------------------------------------------------
1 | # API keys for running unit test cases
2 | BLOCKFROST_API_KEY_PREPROD=preprodxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 | BLOCKFROST_API_KEY_MAINNET=mainnetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 | BLOCKFROST_API_KEY_PREVIEW=previewxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--------------------------------------------------------------------------------
/packages/mesh-common/README.md:
--------------------------------------------------------------------------------
1 | # mesh-common
2 |
3 | Contains constants, types and interfaces used across the SDK and different serialization libraries
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-common/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/constants/supported-wallets.ts:
--------------------------------------------------------------------------------
1 | export const SUPPORTED_WALLETS = [
2 | "begin",
3 | "eternl",
4 | "flint",
5 | "lace",
6 | "nami",
7 | "nufi",
8 | "gerowallet",
9 | "typhoncip30",
10 | "vespr",
11 | "yoroi",
12 | ];
13 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/data/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./mesh";
2 | export * from "./json";
3 | export * from "./parser";
4 | export * from "./time";
5 | export * from "./value";
6 |
7 | export type PlutusDataType = "Mesh" | "JSON" | "CBOR";
8 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/data/mesh/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./aliases";
2 | export * from "./constructors";
3 | export * from "./credentials";
4 | export * from "./primitives";
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./constants";
2 | export * from "./interfaces";
3 | export * from "./types";
4 | export * from "./data";
5 | export * from "./utils";
6 | export * from "./utxo-selection";
7 |
8 | export { generateMnemonic, mnemonicToEntropy } from "bip39";
9 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/evaluator.ts:
--------------------------------------------------------------------------------
1 | import { Action, UTxO } from "../types";
2 |
3 | export interface IEvaluator {
4 | evaluateTx(
5 | tx: string,
6 | additionalUtxos?: UTxO[],
7 | additionalTxs?: string[],
8 | ): Promise[]>;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./fetcher";
2 | export * from "./initiator";
3 | export * from "./listener";
4 | export * from "./submitter";
5 | export * from "./serializer";
6 | export * from "./signer";
7 | export * from "./evaluator";
8 | export * from "./wallet";
9 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/initiator.ts:
--------------------------------------------------------------------------------
1 | import { UTxO } from "../types";
2 |
3 | export interface IInitiator {
4 | getChangeAddress(): Promise;
5 | getCollateral(): Promise;
6 | getUtxos(): Promise;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/listener.ts:
--------------------------------------------------------------------------------
1 | export interface IListener {
2 | onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/signer.ts:
--------------------------------------------------------------------------------
1 | import { DataSignature } from "../types";
2 |
3 | export interface ISigner {
4 | signData(payload: string, address?: string): Promise;
5 | signTx(unsignedTx: string, partialSign?: boolean): Promise;
6 | signTxs(unsignedTxs: string[], partialSign?: boolean): Promise;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/interfaces/submitter.ts:
--------------------------------------------------------------------------------
1 | export interface ISubmitter {
2 | submitTx(tx: string): Promise;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/account-info.ts:
--------------------------------------------------------------------------------
1 | export type AccountInfo = {
2 | active: boolean;
3 | poolId?: string;
4 | balance: string;
5 | rewards: string;
6 | withdrawals: string;
7 | };
8 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/action.ts:
--------------------------------------------------------------------------------
1 | import { Data } from "./data";
2 |
3 | export type RedeemerTagType = "CERT" | "MINT" | "REWARD" | "SPEND" | "VOTE" | "PROPOSE";
4 |
5 | export type Action = {
6 | data: Data;
7 | index: number;
8 | budget: Budget;
9 | tag: RedeemerTagType;
10 | };
11 |
12 | export type Budget = {
13 | mem: number;
14 | steps: number;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/asset-extended.ts:
--------------------------------------------------------------------------------
1 | import { Quantity, Unit } from "./asset";
2 |
3 | export type AssetExtended = {
4 | unit: Unit;
5 | policyId: string;
6 | assetName: string;
7 | fingerprint: string;
8 | quantity: Quantity;
9 | };
10 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/asset.ts:
--------------------------------------------------------------------------------
1 | export type Asset = {
2 | unit: Unit;
3 | quantity: Quantity;
4 | };
5 |
6 | export type Unit = string;
7 |
8 | export type Quantity = string;
9 |
10 | export const mergeAssets = (assets: Asset[]): Asset[] => {
11 | const merged: Asset[] = [];
12 | assets.forEach((asset) => {
13 | const existing = merged.find((a) => a.unit === asset.unit);
14 | if (existing) {
15 | existing.quantity = (
16 | BigInt(existing.quantity) + BigInt(asset.quantity)
17 | ).toString();
18 | } else {
19 | merged.push(asset);
20 | }
21 | });
22 | return merged;
23 | };
24 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/block-info.ts:
--------------------------------------------------------------------------------
1 | export type BlockInfo = {
2 | time: number;
3 | hash: string;
4 | slot: string;
5 | epoch: number;
6 | epochSlot: string;
7 | slotLeader: string;
8 | size: number;
9 | txCount: number;
10 | output: string;
11 | fees: string;
12 | previousBlock: string;
13 | nextBlock: string;
14 | confirmations: number;
15 | operationalCertificate: string;
16 | VRFKey: string;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/blueprint/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./minting";
2 | export * from "./spending";
3 | export * from "./withdrawal";
4 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/blueprint/minting.ts:
--------------------------------------------------------------------------------
1 | import { LanguageVersion } from "..";
2 | import { PlutusDataType } from "../../data";
3 |
4 | export interface IMintingBlueprint {
5 | version: LanguageVersion;
6 | cbor: string;
7 | hash: string;
8 | paramScript(
9 | compiledCode: string,
10 | params: string[],
11 | paramsType: PlutusDataType,
12 | ): this;
13 | noParamScript(compiledCode: string): this;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/blueprint/spending.ts:
--------------------------------------------------------------------------------
1 | import { LanguageVersion } from "..";
2 | import { PlutusDataType } from "../../data";
3 |
4 | export interface ISpendingBlueprint {
5 | version: LanguageVersion;
6 | networkId: number;
7 | cbor: string;
8 | hash: string;
9 | address: string;
10 | stakeHash?: string;
11 | isStakeScriptCredential: boolean;
12 | paramScript(
13 | compiledCode: string,
14 | params: string[],
15 | paramsType: PlutusDataType,
16 | ): this;
17 | noParamScript(compiledCode: string): this;
18 | }
19 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/blueprint/withdrawal.ts:
--------------------------------------------------------------------------------
1 | import { PlutusDataType } from "../../data";
2 | import { LanguageVersion } from "../plutus-script";
3 |
4 | export interface IWithdrawalBlueprint {
5 | version: LanguageVersion;
6 | networkId: number;
7 | cbor: string;
8 | hash: string;
9 | address: string;
10 | paramScript(
11 | compiledCode: string,
12 | params: string[],
13 | paramsType: PlutusDataType,
14 | ): this;
15 | noParamScript(compiledCode: string): this;
16 | }
17 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/data-signature.ts:
--------------------------------------------------------------------------------
1 | export type DataSignature = {
2 | signature: string;
3 | key: string;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/data.ts:
--------------------------------------------------------------------------------
1 | export type Data =
2 | | string
3 | | number
4 | | bigint
5 | | Array
6 | | Map
7 | | {
8 | alternative: number;
9 | fields: Array;
10 | };
11 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/deserialized/deserialized-address.ts:
--------------------------------------------------------------------------------
1 | export type DeserializedAddress = {
2 | pubKeyHash: string;
3 | scriptHash: string;
4 | stakeCredentialHash: string;
5 | stakeScriptCredentialHash: string;
6 | };
7 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/deserialized/deserialized-script.ts:
--------------------------------------------------------------------------------
1 | export type DeserializedScript = {
2 | scriptHash: string;
3 | scriptCbor?: string;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/deserialized/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./deserialized-address";
2 | export * from "./deserialized-script";
3 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/era.ts:
--------------------------------------------------------------------------------
1 | export type Era = "ALONZO" | "BABBAGE";
2 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/extension.ts:
--------------------------------------------------------------------------------
1 | export type Extension = {
2 | cip: number;
3 | };
4 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/governance.ts:
--------------------------------------------------------------------------------
1 | export type GovernanceProposalInfo = {
2 | txHash: string;
3 | certIndex: number;
4 | governanceType: string;
5 | deposit: number;
6 | returnAddress: string;
7 | governanceDescription: string;
8 | ratifiedEpoch: number;
9 | enactedEpoch: number;
10 | droppedEpoch: number;
11 | expiredEpoch: number;
12 | expiration: number;
13 | metadata: object;
14 | };
15 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/message.ts:
--------------------------------------------------------------------------------
1 | export type Message = {
2 | payload: string;
3 | externalAAD?: string;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/mint.ts:
--------------------------------------------------------------------------------
1 | import { Quantity } from "./asset";
2 | import { AssetMetadata } from "./asset-metadata";
3 | import { Recipient } from "./recipient";
4 |
5 | export type Mint = {
6 | assetName: string;
7 | assetQuantity: Quantity;
8 | recipient?: Recipient;
9 | metadata?: AssetMetadata;
10 | label?: "20" | "721" | "777" | `${number}`;
11 | cip68ScriptAddress?: string;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/native-script.ts:
--------------------------------------------------------------------------------
1 | export type NativeScript =
2 | | {
3 | type: "after" | "before";
4 | slot: string;
5 | }
6 | | {
7 | type: "all" | "any";
8 | scripts: NativeScript[];
9 | }
10 | | {
11 | type: "atLeast";
12 | required: number;
13 | scripts: NativeScript[];
14 | }
15 | | {
16 | type: "sig";
17 | keyHash: string;
18 | };
19 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/network.ts:
--------------------------------------------------------------------------------
1 | const ALL_NETWORKS = ["testnet", "preview", "preprod", "mainnet"] as const;
2 |
3 | export type Network = (typeof ALL_NETWORKS)[number];
4 |
5 | export const isNetwork = (value: unknown): value is Network => {
6 | return ALL_NETWORKS.includes(value as Network);
7 | };
8 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/plutus-script.ts:
--------------------------------------------------------------------------------
1 | import { LANGUAGE_VERSIONS } from "../constants";
2 |
3 | export type PlutusScript = {
4 | version: LanguageVersion;
5 | code: string;
6 | };
7 |
8 | export type LanguageVersion = keyof typeof LANGUAGE_VERSIONS;
9 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/pool-params.ts:
--------------------------------------------------------------------------------
1 | import { Relay } from "./relay";
2 |
3 | export type PoolParams = {
4 | vrfKeyHash: string;
5 | operator: string;
6 | pledge: string;
7 | cost: string;
8 | margin: [number, number];
9 | relays: Relay[];
10 | owners: string[];
11 | rewardAddress: string;
12 | metadata?: PoolMetadata;
13 | };
14 |
15 | export type PoolMetadata = {
16 | URL: string;
17 | hash: string;
18 | };
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/recipient.ts:
--------------------------------------------------------------------------------
1 | import { Data } from "./data";
2 |
3 | // import { NativeScript } from './native-script';
4 | // import { PlutusScript } from './plutus-script';
5 |
6 | export type Recipient =
7 | | string
8 | | {
9 | address: string;
10 | datum?: {
11 | value: Data;
12 | inline?: boolean;
13 | };
14 | // script?: PlutusScript | NativeScript;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/relay.ts:
--------------------------------------------------------------------------------
1 | export type Relay =
2 | | {
3 | type: "SingleHostAddr";
4 | IPV4?: string;
5 | IPV6?: string;
6 | port?: number;
7 | }
8 | | {
9 | type: "SingleHostName";
10 | domainName: string;
11 | port?: number;
12 | }
13 | | {
14 | type: "MultiHostName";
15 | domainName: string;
16 | };
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/token.ts:
--------------------------------------------------------------------------------
1 | import { SUPPORTED_TOKENS } from "../constants";
2 |
3 | export type Token = keyof typeof SUPPORTED_TOKENS;
4 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-builder/credential.ts:
--------------------------------------------------------------------------------
1 | export type Credential =
2 | | {
3 | type: "ScriptHash";
4 | scriptHash: string;
5 | }
6 | | {
7 | type: "KeyHash";
8 | keyHash: string;
9 | };
10 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-builder/data.ts:
--------------------------------------------------------------------------------
1 | import { Budget, Data } from "..";
2 |
3 | export type BuilderData =
4 | | {
5 | type: "Mesh";
6 | content: Data;
7 | }
8 | | {
9 | type: "JSON";
10 | content: object | string;
11 | }
12 | | {
13 | type: "CBOR";
14 | content: string;
15 | };
16 |
17 | export type Redeemer = {
18 | data: BuilderData;
19 | exUnits: Budget;
20 | };
21 |
22 | export type DatumSource =
23 | | {
24 | type: "Provided";
25 | data: BuilderData;
26 | }
27 | | {
28 | type: "Inline";
29 | txHash: string;
30 | txIndex: number;
31 | };
32 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-builder/mint.ts:
--------------------------------------------------------------------------------
1 | import { Redeemer } from "./data";
2 | import { ScriptSource, SimpleScriptSourceInfo } from "./script";
3 |
4 | export type MintParam = {
5 | type: "Plutus" | "Native";
6 | policyId: string;
7 | mintValue: {
8 | assetName: string;
9 | amount: string;
10 | }[];
11 | redeemer?: Redeemer;
12 | scriptSource?: ScriptSource | SimpleScriptSourceInfo;
13 | };
14 |
15 | export type MintItem = {
16 | type: "Plutus" | "Native";
17 | policyId: string;
18 | assetName: string;
19 | amount: string;
20 | redeemer?: Redeemer;
21 | scriptSource?: ScriptSource | SimpleScriptSourceInfo;
22 | };
23 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-builder/output.ts:
--------------------------------------------------------------------------------
1 | import { Asset, PlutusScript } from "..";
2 | import { BuilderData } from "./data";
3 |
4 | export type Output = {
5 | address: string;
6 | amount: Asset[];
7 | datum?: {
8 | type: "Hash" | "Inline" | "Embedded";
9 | data: BuilderData;
10 | };
11 | referenceScript?: PlutusScript;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-builder/script.ts:
--------------------------------------------------------------------------------
1 | import { LanguageVersion, PlutusScript } from "..";
2 |
3 | export type ScriptSource =
4 | | {
5 | type: "Provided";
6 | script: PlutusScript;
7 | }
8 | | {
9 | type: "Inline";
10 | txHash: string;
11 | txIndex: number;
12 | scriptHash?: string;
13 | scriptSize?: string;
14 | version?: LanguageVersion;
15 | };
16 |
17 | export type SimpleScriptSourceInfo =
18 | | {
19 | type: "Provided";
20 | scriptCode: string;
21 | }
22 | | {
23 | type: "Inline";
24 | txHash: string;
25 | txIndex: number;
26 | simpleScriptHash?: string;
27 | scriptSize?: string;
28 | };
29 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/transaction-info.ts:
--------------------------------------------------------------------------------
1 | import { UTxO } from "./utxo";
2 |
3 | export type TransactionInfo = {
4 | index: number;
5 | block: string;
6 | hash: string;
7 | slot: string;
8 | fees: string;
9 | size: number;
10 | deposit: string;
11 | invalidBefore: string;
12 | invalidAfter: string;
13 | inputs: UTxO[];
14 | outputs: UTxO[];
15 | blockHeight?: number;
16 | blockTime?: number;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/tx-output.ts:
--------------------------------------------------------------------------------
1 | import {Asset} from "./asset";
2 |
3 | export type TxOutput = {
4 | address: string;
5 | amount: Asset[];
6 | dataHash?: string;
7 | plutusData?: string;
8 | scriptRef?: string;
9 | scriptHash?: string;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/utxo.ts:
--------------------------------------------------------------------------------
1 | import { Asset } from "./asset";
2 | import {TxOutput} from "./tx-output";
3 |
4 | export type UTxO = {
5 | input: {
6 | outputIndex: number;
7 | txHash: string;
8 | };
9 | output: TxOutput
10 | };
11 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/types/wallet.ts:
--------------------------------------------------------------------------------
1 | export type Wallet = {
2 | id: string;
3 | name: string;
4 | icon: string;
5 | version: string;
6 | };
7 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/utils/data-hash.ts:
--------------------------------------------------------------------------------
1 | import { blake2b } from "blakejs";
2 |
3 | export const hashDrepAnchor = (jsonLD: object): string => {
4 | const jsonHash = blake2b(JSON.stringify(jsonLD, null, 2), undefined, 32);
5 | return Buffer.from(jsonHash).toString("hex");
6 | };
7 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/utils/file.ts:
--------------------------------------------------------------------------------
1 | export function getFile(url: string) {
2 | var Httpreq = new XMLHttpRequest();
3 | Httpreq.open("GET", url, false);
4 | Httpreq.send(null);
5 | return Httpreq.responseText;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/mesh-common/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./asset-fingerprint";
2 | export * from "./big-num";
3 | export * from "./data-hash";
4 | export * from "./file";
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/test/data/mesh/common.ts:
--------------------------------------------------------------------------------
1 | import { Data } from "@meshsdk/common";
2 | import { castDataToPlutusData } from "@meshsdk/core-csl";
3 |
4 | export const serializeData = (mesh: Data, json: any) => {
5 | const meshData = castDataToPlutusData({
6 | type: "Mesh",
7 | content: mesh,
8 | }).to_hex();
9 | const jsonData = castDataToPlutusData({
10 | type: "JSON",
11 | content: JSON.stringify(json),
12 | }).to_hex();
13 | return [meshData, jsonData];
14 | };
15 |
--------------------------------------------------------------------------------
/packages/mesh-common/test/data/value/common.ts:
--------------------------------------------------------------------------------
1 | export const mockPolicyId =
2 | "c21d710605bb00e69f3c175150552fc498316d80e7efdb1b186db38c";
3 | export const mockAssetName = "000643b04d65736820676f6f64";
4 | export const mockUnit = mockPolicyId + mockAssetName;
5 |
--------------------------------------------------------------------------------
/packages/mesh-common/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["jest.config.ts", "src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-contract/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/asteria/_reference.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/asteria/_reference.zip
--------------------------------------------------------------------------------
/packages/mesh-contract/src/asteria/aiken-workspace/readme.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/asteria/aiken-workspace/readme.md
--------------------------------------------------------------------------------
/packages/mesh-contract/src/asteria/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/asteria/offchain.ts:
--------------------------------------------------------------------------------
1 | import { MeshTxInitiator, MeshTxInitiatorInput } from "../common";
2 |
3 | export class MeshAsteriaContract extends MeshTxInitiator {
4 |
5 | constructor(inputs: MeshTxInitiatorInput) {
6 | super(inputs);
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.1.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.1.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/content-ownership"
2 | version = "0.0.0"
3 | compiler = "v1.1.3"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/content-ownership'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "content-ownership"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.1.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.1-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/lib/content-ownership/utils.ak:
--------------------------------------------------------------------------------
1 | use aiken/primitive/bytearray
2 | use cardano/assets.{AssetName}
3 | use content_ownership/common.{convert_int_to_bytes}
4 |
5 | pub fn get_registry_token_name(count: Int) -> AssetName {
6 | bytearray.concat("Registry (", convert_int_to_bytes(count))
7 | |> bytearray.concat(")")
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/readme.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/content-ownership/aiken-workspace/readme.md
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/validators/tests/integration-tests/create_content_registry.ak:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/validators/tests/integration-tests/create_ownership_registry.ak:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/aiken-workspace/validators/tests/integration-tests/update_content.ak:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./offchain/offchain";
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/offchain/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./offchain";
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/content-ownership/readme.md:
--------------------------------------------------------------------------------
1 | # Content Ownership
2 |
3 | This contract allows you to create a content registry and users can create content that is stored in the registry.
4 |
5 | It facilitates on-chain record of content (i.e. file on IPFS) ownership and transfer. While one cannot prefer others from obtaining a copy of the content, the app owner of the contract can serve the single source of truth of who owns the content. With the blockchain trace and record in place, it provides a trustless way to verify the ownership of the content and facilitates further application logics such as royalties, licensing, etc.
6 |
7 | [Read more and live demo](https://meshjs.dev/smart-contracts/content-ownership)
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v1/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.0.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "1.9.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.0.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/escrow"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'meshjs/escrow'"
5 |
6 | [repository]
7 | user = "meshjs"
8 | project = "escrow"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
20 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v1/lib/escrow/types.ak:
--------------------------------------------------------------------------------
1 | use aiken/transaction/credential.{Address}
2 | use aiken/transaction/value.{AssetName, PolicyId}
3 |
4 | pub type MValue =
5 | Pairs>
6 |
7 | pub type EscrowDatum {
8 | Initiation { initiator: Address, initiator_assets: MValue }
9 | ActiveEscrow {
10 | initiator: Address,
11 | initiator_assets: MValue,
12 | recipient: Address,
13 | recipient_assets: MValue,
14 | }
15 | }
16 |
17 | pub type EscrowRedeemer {
18 | RecipientDeposit { recipient: Address, recipient_assets: MValue }
19 | CancelTrade
20 | CompleteTrade
21 | }
22 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/escrow"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/escrow'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "escrow"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v3/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/aiken-workspace-v3/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/escrow"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/escrow'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "escrow"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/unbound-value/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/unbound-value/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.2.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.9"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.2.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.9"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/unbound-value/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/escrow"
2 | version = "0.0.0"
3 | compiler = "v1.1.9"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/escrow'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "escrow"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.2.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.9"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/escrow/unbound-value/vulnerabiltiy_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/escrow/unbound-value/vulnerabiltiy_test.png
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/aiken-workspace-v1/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.0.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "1.9.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.0.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/giftcard"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'meshjs/giftcard'"
5 |
6 | [repository]
7 | user = "meshjs"
8 | project = "giftcard"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/giftcard"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/giftcard'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "giftcard"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/infinite-mint/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/infinite-mint/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.2.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.9"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.2.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.9"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/infinite-mint/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/giftcard"
2 | version = "0.0.0"
3 | compiler = "v1.1.9"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/giftcard'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "giftcard"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.2.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.9"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/giftcard/infinite-mint/vulnerabiltiy_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/giftcard/infinite-mint/vulnerabiltiy_test.png
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v1/README.md:
--------------------------------------------------------------------------------
1 | # Hello World - Specification
2 |
3 | ### Parameter - no parameter
4 |
5 | ### Datum
6 |
7 | - `owner`: Owner's pub key hash
8 | - `message`: Must be a string, e.g. "Hello, World!"
9 |
10 | ### User Action
11 |
12 | 1. Unlock by owner
13 |
14 | - Signed by `owner`
15 |
16 | 2. Unlock by owner
17 |
18 | - Signed by `beneficiary`
19 | - Only valid after `lock_until`
20 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[packages]]
10 | name = "aiken-lang/stdlib"
11 | version = "1.9.0"
12 | requirements = []
13 | source = "github"
14 |
15 | [etags]
16 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/aiken"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken on MeshJS"
5 |
6 | [repository]
7 | user = "jingles"
8 | project = "test1"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
20 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v1/contract.md:
--------------------------------------------------------------------------------
1 |
2 | ```
3 | use aiken/hash.{Blake2b_224, Hash}
4 | use aiken/list
5 | use aiken/transaction.{ScriptContext}
6 | use aiken/transaction/credential.{VerificationKey}
7 |
8 | type Datum {
9 | owner: Hash,
10 | }
11 |
12 | type Redeemer {
13 | msg: ByteArray,
14 | }
15 |
16 | validator {
17 | fn hello_world(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
18 | let must_say_hello =
19 | redeemer.msg == "Hello, World!"
20 |
21 | let must_be_signed =
22 | list.has(context.transaction.extra_signatories, datum.owner)
23 |
24 | must_say_hello && must_be_signed
25 | }
26 | }
27 | ```
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v2/README.md:
--------------------------------------------------------------------------------
1 | # Hello World - Specification
2 |
3 | ### Parameter - no parameter
4 |
5 | ### Datum
6 |
7 | - `owner`: Owner's pub key hash
8 | - `message`: Must be a string, e.g. "Hello, World!"
9 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/aiken"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken on MeshJS"
7 |
8 | [repository]
9 | user = "jingles"
10 | project = "test1"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/aiken-workspace-v2/contract.md:
--------------------------------------------------------------------------------
1 |
2 | ```
3 | use aiken/hash.{Blake2b_224, Hash}
4 | use aiken/list
5 | use aiken/transaction.{ScriptContext}
6 | use aiken/transaction/credential.{VerificationKey}
7 |
8 | type Datum {
9 | owner: Hash,
10 | }
11 |
12 | type Redeemer {
13 | msg: ByteArray,
14 | }
15 |
16 | validator {
17 | fn hello_world(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
18 | let must_say_hello =
19 | redeemer.msg == "Hello, World!"
20 |
21 | let must_be_signed =
22 | list.has(context.transaction.extra_signatories, datum.owner)
23 |
24 | must_say_hello && must_be_signed
25 | }
26 | }
27 | ```
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/hello-world/readme.md:
--------------------------------------------------------------------------------
1 | # Hello World Contract
2 |
3 | The Hello World smart contract is a simple lock-and-unlock assets contract, providing a hands-on introduction to end-to-end smart contract validation and transaction building.
4 |
5 | There are 2 conditions to unlock the assets:
6 |
7 | - Signer must be the same as the one who locked the assets
8 | - Signer must provide the message `Hello, World!`
9 |
10 | There are 2 actions (or endpoints) available to interact with this smart contract:
11 |
12 | - Lock assets
13 | - Redeem assets
14 |
15 | [Read more and live demo](https://meshjs.dev/smart-contracts/hello-world)
16 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./content-ownership";
2 | export * from "./escrow";
3 | export * from "./giftcard";
4 | export * from "./hello-world";
5 | export * from "./marketplace";
6 | export * from "./payment-splitter";
7 | export * from "./plutus-nft";
8 | export * from "./swap";
9 | export * from "./vesting";
10 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v1/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.0.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "1.9.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.0.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/marketplace"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'meshjs/marketplace'"
5 |
6 | [repository]
7 | user = "meshjs"
8 | project = "marketplace"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v1/lib/marketplace/types.ak:
--------------------------------------------------------------------------------
1 | use aiken/transaction/credential.{Address}
2 |
3 | pub type MarketplaceDatum {
4 | MarketplaceDatum {
5 | seller: Address,
6 | price: Int,
7 | policy: ByteArray,
8 | tokenName: ByteArray,
9 | }
10 | }
11 |
12 | pub type MarketplaceRedeemer {
13 | Buy
14 | Close
15 | }
16 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/marketplace"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/marketplace'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "marketplace"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/insufficient-stake-control/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/insufficient-stake-control/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.2.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.9"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.2.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.9"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/insufficient-stake-control/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/marketplace"
2 | version = "0.0.0"
3 | compiler = "v1.1.9"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/marketplace'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "marketplace"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.2.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.9"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/marketplace/insufficient-stake-control/vulnerability_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/marketplace/insufficient-stake-control/vulnerability_test.png
--------------------------------------------------------------------------------
/packages/mesh-contract/src/payment-splitter/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[packages]]
10 | name = "aiken-lang/stdlib"
11 | version = "1.9.0"
12 | requirements = []
13 | source = "github"
14 |
15 | [etags]
16 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/payment-splitter/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "fabianbormann/payment-splitter"
2 | version = "0.1.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'fabianbormann/payment-splitter'"
5 |
6 | [repository]
7 | user = "fabianbormann"
8 | project = "payment-splitter"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/payment-splitter/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/payment-splitter/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "fabianbormann/payment-splitter"
2 | version = "0.1.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'fabianbormann/payment-splitter'"
7 |
8 | [repository]
9 | user = "fabianbormann"
10 | project = "payment-splitter"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/payment-splitter/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/aiken-workspace/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/aiken-workspace/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.1.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.1.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/aiken-workspace/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/plutus-nft"
2 | version = "0.0.0"
3 | compiler = "v1.1.4"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/plutus-nft'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "plutus-nft"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.1.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.1-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./offchain";
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/locked-value/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/locked-value/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "v2.2.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.1.9"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "v2.2.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.1.9"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/locked-value/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/plutus-nft"
2 | version = "0.0.0"
3 | compiler = "v1.1.9"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/plutus-nft'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "plutus-nft"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2.2.0"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.9"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/locked-value/vulnerabiltiy_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/plutus-nft/locked-value/vulnerabiltiy_test.png
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/readme.md:
--------------------------------------------------------------------------------
1 | # NFT Minting Vending Machine
2 |
3 | This NFT minting script enables users to mint NFTs with an automatically incremented index, which increases by one for each newly minted NFT.
4 |
5 | There are 3 actions available to interact with this smart contract:
6 |
7 | - **Setup Oracle**: Mint one-time minting policy to set up the oracle
8 | - **Mint Token**: Mint NFT that ensures the token name is incremented by a counter
9 | - **Get Oracle Data**: Fetch the current oracle data to get the current NFT index and other information
10 |
11 | [Read more and live demo](https://meshjs.dev/smart-contracts/plutus-nft)
--------------------------------------------------------------------------------
/packages/mesh-contract/src/plutus-nft/type.ts:
--------------------------------------------------------------------------------
1 | import { ConStr0, Integer, PubKeyAddress } from "@meshsdk/common";
2 |
3 | export type OracleDatum = ConStr0<[Integer, Integer, PubKeyAddress]>;
4 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/royalties/_reference.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/royalties/_reference.zip
--------------------------------------------------------------------------------
/packages/mesh-contract/src/royalties/aiken-workspace/readme.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/royalties/aiken-workspace/readme.md
--------------------------------------------------------------------------------
/packages/mesh-contract/src/royalties/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/royalties/offchain.ts:
--------------------------------------------------------------------------------
1 | import { MeshTxInitiator, MeshTxInitiatorInput } from "../common";
2 |
3 | export class MeshRoyaltiesContract extends MeshTxInitiator {
4 |
5 | constructor(inputs: MeshTxInitiatorInput) {
6 | super(inputs);
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/packages/mesh-contract/src/royalties/readme.md:
--------------------------------------------------------------------------------
1 | # Royalties
2 |
3 | > Work in progress
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/aiken-workspace-v1/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.0.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "1.9.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.0.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/swap"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'meshjs/swap'"
5 |
6 | [repository]
7 | user = "meshjs"
8 | project = "swap"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
20 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/swap"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/swap'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "swap"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/double-satisfaction/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/double-satisfaction/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/swap"
2 | version = "0.0.0"
3 | compiler = "v1.1.9"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/swap'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "swap"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.8"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/double-satisfaction/vulnerability_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-contract/src/swap/double-satisfaction/vulnerability_test.png
--------------------------------------------------------------------------------
/packages/mesh-contract/src/swap/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v1/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v1/README.md:
--------------------------------------------------------------------------------
1 | # Vesting - Specification
2 |
3 | ## Scripts - VestingValidator
4 |
5 | The validator of locking vesting value.
6 |
7 | ### Parameter - no parameter
8 |
9 | ### Datum
10 |
11 | - `lock_until`: POSIX time in second at locking end, e.g. 1672843961000
12 | - `owner`: Owner's pub key hash
13 | - `beneficiary`: Beneficiary's pub key hash
14 |
15 | ### User Action
16 |
17 | 1. Unlock by owner
18 |
19 | - Signed by `owner`
20 |
21 | 2. Unlock by beneficiary
22 |
23 | - Signed by `beneficiary`
24 | - Only valid after `lock_until`
25 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v1/aiken.lock:
--------------------------------------------------------------------------------
1 | # This file was generated by Aiken
2 | # You typically do not need to edit this file
3 |
4 | [[requirements]]
5 | name = "aiken-lang/stdlib"
6 | version = "1.9.0"
7 | source = "github"
8 |
9 | [[requirements]]
10 | name = "sidan-lab/vodka"
11 | version = "0.0.1-beta"
12 | source = "github"
13 |
14 | [[packages]]
15 | name = "aiken-lang/stdlib"
16 | version = "1.9.0"
17 | requirements = []
18 | source = "github"
19 |
20 | [[packages]]
21 | name = "sidan-lab/vodka"
22 | version = "0.0.1-beta"
23 | requirements = []
24 | source = "github"
25 |
26 | [etags]
27 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v1/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/vesting"
2 | version = "0.0.0"
3 | license = "Apache-2.0"
4 | description = "Aiken contracts for project 'meshjs/vesting'"
5 |
6 | [repository]
7 | user = "meshjs"
8 | project = "vesting"
9 | platform = "github"
10 |
11 | [[dependencies]]
12 | name = "aiken-lang/stdlib"
13 | version = "1.9.0"
14 | source = "github"
15 |
16 | [[dependencies]]
17 | name = "sidan-lab/vodka"
18 | version = "0.0.1-beta"
19 | source = "github"
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v1/lib/vesting/types.ak:
--------------------------------------------------------------------------------
1 | pub type VestingDatum {
2 | /// POSIX time in milliseconds, e.g. 1672843961000
3 | lock_until: Int,
4 | /// Owner's credentials
5 | owner: ByteArray,
6 | /// Beneficiary's credentials
7 | beneficiary: ByteArray,
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v2/.gitignore:
--------------------------------------------------------------------------------
1 | # Aiken compilation artifacts
2 | artifacts/
3 | # Aiken's project working directory
4 | build/
5 | # Aiken's default documentation export
6 | docs/
7 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v2/README.md:
--------------------------------------------------------------------------------
1 | # Vesting - Specification
2 |
3 | ## Scripts - VestingValidator
4 |
5 | The validator of locking vesting value.
6 |
7 | ### Parameter - no parameter
8 |
9 | ### Datum
10 |
11 | - `lock_until`: POSIX time in second at locking end, e.g. 1672843961000
12 | - `owner`: Owner's pub key hash
13 | - `beneficiary`: Beneficiary's pub key hash
14 |
15 | ### User Action
16 |
17 | 1. Unlock by owner
18 |
19 | - Signed by `owner`
20 |
21 | 2. Unlock by beneficiary
22 |
23 | - Signed by `beneficiary`
24 | - Only valid after `lock_until`
25 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/aiken-workspace-v2/aiken.toml:
--------------------------------------------------------------------------------
1 | name = "meshjs/vesting"
2 | version = "0.0.0"
3 | compiler = "v1.1.0"
4 | plutus = "v3"
5 | license = "Apache-2.0"
6 | description = "Aiken contracts for project 'meshjs/vesting'"
7 |
8 | [repository]
9 | user = "meshjs"
10 | project = "vesting"
11 | platform = "github"
12 |
13 | [[dependencies]]
14 | name = "aiken-lang/stdlib"
15 | version = "v2"
16 | source = "github"
17 |
18 | [[dependencies]]
19 | name = "sidan-lab/vodka"
20 | version = "0.1.0-beta"
21 | source = "github"
22 |
23 | [config]
24 |
--------------------------------------------------------------------------------
/packages/mesh-contract/src/vesting/index.ts:
--------------------------------------------------------------------------------
1 | export * from './offchain';
2 |
--------------------------------------------------------------------------------
/packages/mesh-contract/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/README.md:
--------------------------------------------------------------------------------
1 | # mesh-core-csl
2 |
3 | Types and utilities functions between Mesh and [cardano-serialization-lib](https://github.com/Emurgo/cardano-serialization-lib)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/core/adaptor/network.ts:
--------------------------------------------------------------------------------
1 | import { Network } from "@meshsdk/common";
2 |
3 | export const networkToObj = (network: Network | number[][]) => {
4 | if ((typeof network) === "string") {
5 | return network;
6 | } else {
7 | return {
8 | custom: network,
9 | };
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/core/adaptor/utxo.ts:
--------------------------------------------------------------------------------
1 | import { UTxO } from "@meshsdk/common";
2 |
3 | export const utxoToObj = ({
4 | input: { outputIndex, txHash },
5 | output: { address, amount, dataHash, plutusData, scriptRef, scriptHash },
6 | }: UTxO): object => {
7 | return {
8 | input: {
9 | outputIndex,
10 | txHash,
11 | },
12 | output: {
13 | address,
14 | amount,
15 | dataHash: dataHash ?? null,
16 | plutusData: plutusData ?? null,
17 | scriptRef: scriptRef ?? null,
18 | scriptHash: scriptHash ?? null,
19 | },
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/core/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./serializer";
2 | export * from "./adaptor";
3 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/deser/constants.ts:
--------------------------------------------------------------------------------
1 | import { csl } from "./csl";
2 |
3 | export const LANGUAGE_VERSIONS = {
4 | V1: csl.Language.new_plutus_v1(),
5 | V2: csl.Language.new_plutus_v2(),
6 | V3: csl.Language.new_plutus_v3(),
7 | };
8 |
9 | export const REDEEMER_TAGS = {
10 | CERT: csl.RedeemerTag.new_cert(),
11 | MINT: csl.RedeemerTag.new_mint(),
12 | REWARD: csl.RedeemerTag.new_reward(),
13 | SPEND: csl.RedeemerTag.new_spend(),
14 | };
15 |
16 | export const POLICY_ID_LENGTH = 56;
17 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/deser/csl.ts:
--------------------------------------------------------------------------------
1 | export * as csl from "@sidan-lab/whisky-js-nodejs";
2 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/deser/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./deserializer";
2 | export * from "./converter";
3 | export * from "./csl";
4 | export * from "./constants";
5 | export * from "./resolver";
6 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./utils";
2 | export * from "./core";
3 | export * from "./deser";
4 | export * from "./offline-providers";
5 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/offline-providers/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./offline-evaluator"
2 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/utils/credentials.ts:
--------------------------------------------------------------------------------
1 | import { csl } from "../deser";
2 |
3 | export const skeyToPubKeyHash = (skeyHex: string): string => {
4 | const isHexUnclean = skeyHex.slice(0, 4) === "5820" && skeyHex.length === 68;
5 | const cleanHex = isHexUnclean ? skeyHex.slice(4) : skeyHex;
6 | return csl.PrivateKey.from_hex(cleanHex).to_public().hash().to_hex();
7 | };
8 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/utils/datum.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | import { csl } from "../deser";
3 |
4 | export const parseInlineDatum = (
5 | utxo: T,
6 | ): X => {
7 | const datumCbor: string = utxo.inline_datum || "";
8 | const parsedDatum = csl.PlutusData.from_hex(datumCbor);
9 | const datum: X = JSON.parse(parsedDatum.to_json(1));
10 | return datum as X;
11 | };
12 |
13 | export const parseDatumCbor = (datumCbor: string): T => {
14 | const parsedDatum = csl.PlutusData.from_hex(datumCbor);
15 | const datum: T = JSON.parse(parsedDatum.to_json(1));
16 | return datum as T;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/utils/drep.ts:
--------------------------------------------------------------------------------
1 | import { bech32 } from "bech32";
2 |
3 | import { csl } from "../deser";
4 |
5 | export const getDRepIds = (
6 | dRepId: string,
7 | ): {
8 | cip105: string;
9 | cip129: string;
10 | } => {
11 | const cslDrep = csl.DRep.from_bech32(dRepId);
12 | let result = {
13 | cip105: cslDrep.to_bech32(false),
14 | cip129: cslDrep.to_bech32(true),
15 | };
16 | return result;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./address";
2 | export * from "./datum";
3 | export * from "./scripts";
4 | export * from "./credentials";
5 | export * from "./staking";
6 | export * from "./transaction";
7 | export * from "./aiken";
8 | export * from "./drep";
9 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/utils/scripts.ts:
--------------------------------------------------------------------------------
1 | import { csl } from "../deser";
2 |
3 | export const getV2ScriptHash = (script: string): string =>
4 | csl.get_v2_script_hash(script);
5 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/src/wasm.ts:
--------------------------------------------------------------------------------
1 | import { csl } from "./deser/csl";
2 |
3 | export const parseWasmResult = (result: csl.WasmResult): string => {
4 | if (result.get_status() !== "success") {
5 | throw new Error(result.get_data());
6 | }
7 | return result.get_data();
8 | };
9 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/tsconfig-cjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/wasm-base.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "dist/cjs",
6 | "target": "es2015"
7 | },
8 | "rootDir": "src",
9 | "exclude": ["node_modules", "dist"],
10 | "include": ["src"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/mesh-core-csl/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/README.md:
--------------------------------------------------------------------------------
1 | # mesh-core-cst
2 |
3 | Types and utilities functions between Mesh and [cardano-js-sdk](https://github.com/input-output-hk/cardano-js-sdk)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/src/index.ts:
--------------------------------------------------------------------------------
1 | import { Cardano, Serialization } from "@cardano-sdk/core";
2 |
3 | export * from "./types";
4 | export * from "./message-signing";
5 | export * from "./resolvers";
6 | export * from "./serializer";
7 | export * from "./utils";
8 | export * from "./plutus-tools";
9 |
10 | export * as CardanoSDKUtil from "@cardano-sdk/util";
11 | export * as Crypto from "@cardano-sdk/crypto";
12 | export * as CardanoSDK from "@cardano-sdk/core";
13 |
14 | export { Cardano, Serialization };
15 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/src/message-signing/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./check-signature";
2 | export * from "./cose-sign1";
3 | export * from "./generate-nonce";
4 | export * from "./sign-data";
5 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./cardano-sdk";
2 | export * from "./signer";
3 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/src/types/signer.ts:
--------------------------------------------------------------------------------
1 | import { Address } from ".";
2 | import { Ed25519PrivateKey } from "./";
3 |
4 | export type Signer = {
5 | address: Address;
6 | key: Ed25519PrivateKey;
7 | };
8 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./builder";
2 | export * from "./converter";
3 | export * from "./deserializer";
4 | export * from "./value";
5 | export * from "./data";
6 | export * from "./address";
7 | export * from "./encoding";
8 | export * from "./witness-set";
9 | export * from "./fee";
10 |
--------------------------------------------------------------------------------
/packages/mesh-core-cst/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-core/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-core/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./core";
2 | export * from "./utils";
3 | export * from "@meshsdk/common";
4 | export * as cst from "@meshsdk/core-cst";
5 | export * from "@meshsdk/provider";
6 | export * from "@meshsdk/transaction";
7 | export * from "@meshsdk/wallet";
8 |
9 | export { checkSignature, signData, generateNonce } from "@meshsdk/core-cst";
10 |
--------------------------------------------------------------------------------
/packages/mesh-core/src/utils/blueprint/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./minting";
2 | export * from "./spending";
3 | export * from "./withdrawal";
4 |
--------------------------------------------------------------------------------
/packages/mesh-core/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./resolver";
2 | export * from "./deserializer";
3 | export * from "./serializer";
4 | export * from "./blueprint";
5 |
--------------------------------------------------------------------------------
/packages/mesh-core/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/README.md:
--------------------------------------------------------------------------------
1 | # mesh-hydra
2 |
3 | Scaling solution for Cardano that increases transaction throughput and ensures cost efficiency while maintaining rigorous security.
4 |
5 | [meshjs.dev/hydra](https://meshjs.dev/hydra)
6 |
7 | ## Get started
8 |
9 | ```bash
10 | npm install @meshsdk/hydra
11 | ```
12 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./hydra-instance";
2 | export * from "./hydra-provider";
3 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/types/hReferenceScript.ts:
--------------------------------------------------------------------------------
1 | export type hReferenceScript = {
2 | scriptLanguage: string;
3 | script: {
4 | cborHex: string;
5 | description: string;
6 | type:
7 | | "SimpleScript"
8 | | "PlutusScriptV1"
9 | | "PlutusScriptV2"
10 | | "PlutusScriptV3";
11 | };
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/types/hTransaction.ts:
--------------------------------------------------------------------------------
1 | export type hTransaction = {
2 | type: "Tx ConwayEra" | "Unwitnessed Tx ConwayEra" | "Witnessed Tx ConwayEra";
3 | description: string;
4 | cborHex: string;
5 | txId?: string;
6 | };
7 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/types/hydra.ts:
--------------------------------------------------------------------------------
1 | import { hUTxOs } from "./hUTxOs";
2 |
3 | export type HydraCommitTransaction = {
4 | cborHex: string;
5 | description: string;
6 | txId: string;
7 | type: string;
8 | };
9 |
10 | export interface HydraHeadParameters {
11 | contestationPeriod: number;
12 | parties: HydraParty[];
13 | }
14 |
15 | export type HydraParty = {
16 | vkey: string;
17 | };
18 |
19 | export type HydraSnapshot = {
20 | headId: string;
21 | snapshotNumber: string;
22 | utxo: hUTxOs;
23 | confirmedTransactions: string[];
24 | utxoToDecommit: hUTxOs;
25 | version: number;
26 | };
27 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./events";
2 | export * from "./hydra";
3 | export * from "./hAssets";
4 | export * from "./hReferenceScript";
5 | export * from "./hStatus";
6 | export * from "./hTransaction";
7 | export * from "./hUTxOs";
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./parse-http-error";
2 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/src/utils/parse-http-error.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export const parseHttpError = (error: unknown): string => {
4 | if (!axios.isAxiosError(error)) {
5 | return JSON.stringify(error);
6 | }
7 |
8 | if (error.response) {
9 | return JSON.stringify({
10 | data: error.response.data,
11 | headers: error.response.headers,
12 | status: error.response.status,
13 | });
14 | }
15 |
16 | if (error.request && !(error.request instanceof XMLHttpRequest)) {
17 | return JSON.stringify(error.request);
18 | }
19 |
20 | return JSON.stringify({ code: error.code, message: error.message });
21 | };
22 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"],
5 | "compilerOptions": {
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/mesh-hydra/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup";
2 |
3 | export default defineConfig({
4 | entry: ["src/index.ts"],
5 | format: ["esm", "cjs"],
6 | dts: true,
7 | splitting: false,
8 | sourcemap: true,
9 | clean: true,
10 | esbuildOptions(options) {
11 | options.define = {
12 | global: "globalThis",
13 | process: JSON.stringify({
14 | env: {
15 | NODE_ENV: "production",
16 | },
17 | }),
18 | };
19 | options.platform = "browser";
20 | },
21 | });
--------------------------------------------------------------------------------
/packages/mesh-provider/.env.example:
--------------------------------------------------------------------------------
1 | # API keys for running unit test cases
2 | BLOCKFROST_API_KEY_PREPROD=preprodxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 | MAESTRO_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 |
--------------------------------------------------------------------------------
/packages/mesh-provider/README.md:
--------------------------------------------------------------------------------
1 | # mesh-provider
2 |
3 | Blockchain data providers - [meshjs.dev/providers](https://meshjs.dev/providers)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-provider/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./begin";
2 | export * from "./blockfrost";
3 | export * from "./koios";
4 | export * from "./maestro";
5 | export * from "./ogmios";
6 | export * from "./utxo-rpc";
7 | export * from "./yaci";
8 | export * from "./offline";
9 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/offline/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./offline-fetcher";
2 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/types/blockfrost.ts:
--------------------------------------------------------------------------------
1 | import { Asset, Quantity, Unit } from "@meshsdk/common";
2 |
3 | export type BlockfrostUTxO = {
4 | output_index: number;
5 | amount: Array;
6 | address: string;
7 | data_hash?: string;
8 | inline_datum?: string;
9 | collateral?: boolean;
10 | reference_script_hash?: string;
11 | tx_hash: string;
12 | };
13 |
14 | export type BlockfrostAsset = {
15 | asset: Unit;
16 | quantity: Quantity;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./blockfrost";
2 | export * from "./koios";
3 | export * from "./maestro";
--------------------------------------------------------------------------------
/packages/mesh-provider/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./parse-http-error";
2 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/utils/parse-asset-unit.ts:
--------------------------------------------------------------------------------
1 | import { fromUTF8, POLICY_ID_LENGTH } from "@meshsdk/common";
2 |
3 | export const parseAssetUnit = (unit: string) => {
4 | const policyId = unit.slice(0, POLICY_ID_LENGTH);
5 | const assetName = unit.includes(".")
6 | ? fromUTF8(unit.split(".")[1] || "")
7 | : unit.slice(POLICY_ID_LENGTH);
8 |
9 | return { policyId, assetName };
10 | };
11 |
--------------------------------------------------------------------------------
/packages/mesh-provider/src/utils/parse-http-error.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export const parseHttpError = (error: unknown): string => {
4 | if (axios.isAxiosError(error)) {
5 | if (error.response) {
6 | return JSON.stringify({
7 | data: error.response.data,
8 | headers: error.response.headers,
9 | status: error.response.status,
10 | });
11 | } else if (error.request && !(error.request instanceof XMLHttpRequest)) {
12 | return JSON.stringify(error.request);
13 | } else {
14 | return JSON.stringify({ code: error.code, message: error.message });
15 | }
16 | } else {
17 | return JSON.stringify(error);
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/packages/mesh-provider/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-react/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ["@meshsdk/configs/eslint/react.js"],
3 | };
4 |
--------------------------------------------------------------------------------
/packages/mesh-react/README.md:
--------------------------------------------------------------------------------
1 | # mesh-react
2 |
3 | React component library - [meshjs.dev/react](https://meshjs.dev/react)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-react/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-react/postcss.config.js:
--------------------------------------------------------------------------------
1 | // If you want to use other PostCSS plugins, see the following:
2 | // https://tailwindcss.com/docs/using-with-preprocessors
3 |
4 | module.exports = {
5 | plugins: {
6 | tailwindcss: {},
7 | autoprefixer: {},
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/cardano-wallet-dropdown/checkmark.tsx:
--------------------------------------------------------------------------------
1 | export const CheckMark = () => (
2 |
10 | );
11 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/cardano-wallet-dropdown/chevron-down.tsx:
--------------------------------------------------------------------------------
1 | export const ChevronDown = () => (
2 |
17 | );
18 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/cardano-wallet/data.ts:
--------------------------------------------------------------------------------
1 | export const screens = {
2 | main: {
3 | title: "Connect Wallet",
4 | },
5 | p2p: {
6 | title: "Peer Connect (CIP45)",
7 | subtitle: "Use wallet that supports CIP-45, scan this QR code to connect.",
8 | },
9 | burner: {
10 | title: "Burner Wallet",
11 | subtitle:
12 | "Instantly create a new burner wallet. No seed phrase required, keys are generated on your device.",
13 | },
14 | webauthn: {
15 | title: "Passkey",
16 | subtitle:
17 | "Derive self-custody wallet on Chrome, Safari, or Firefox browsers on Android, iOS, macOS, and Windows devices, or using password managers.",
18 | },
19 | };
20 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/common/cn.ts:
--------------------------------------------------------------------------------
1 | import type { ClassValue } from "clsx";
2 | import { clsx } from "clsx";
3 | import { twMerge } from "tailwind-merge";
4 |
5 | export function cn(...inputs: ClassValue[]) {
6 | return twMerge(clsx(inputs));
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/common/icons/icon-chevron-right.tsx:
--------------------------------------------------------------------------------
1 | export default function IconChevronRight() {
2 | return (
3 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/common/icons/icon-plus.tsx:
--------------------------------------------------------------------------------
1 | export default function IconPlus() {
2 | return (
3 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/common/icons/icon-twitter.tsx:
--------------------------------------------------------------------------------
1 | export default function IconTwitter() {
2 | return (
3 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/contexts/index.tsx:
--------------------------------------------------------------------------------
1 | import { useWalletStore, WalletContext } from "./WalletContext";
2 |
3 | export { WalletContext } from "./WalletContext";
4 |
5 | interface Props {
6 | children: React.ReactNode;
7 | }
8 |
9 | export const MeshProvider: React.FC = (props: any) => {
10 | const store = useWalletStore();
11 | return (
12 |
13 | <>{props.children}>
14 |
15 | );
16 | };
17 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./useAddress";
2 | export * from "./useAssets";
3 | export * from "./useWalletList";
4 | export * from "./useLovelace";
5 | export * from "./useNetwork";
6 | export * from "./useRewardAddress";
7 | export * from "./useWallet";
8 | export * from "./useWalletSubmit";
9 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/hooks/useAddress.ts:
--------------------------------------------------------------------------------
1 | import { useContext, useEffect, useState } from "react";
2 |
3 | import { WalletContext } from "../contexts";
4 |
5 | export const useAddress = (accountId = 0) => {
6 | const [address, setAddress] = useState();
7 | const { hasConnectedWallet, connectedWalletInstance } =
8 | useContext(WalletContext);
9 |
10 | useEffect(() => {
11 | if (hasConnectedWallet) {
12 | connectedWalletInstance.getUsedAddresses().then((addresses) => {
13 | if (addresses[accountId]) {
14 | setAddress(addresses[accountId]);
15 | }
16 | });
17 | }
18 | }, [accountId, hasConnectedWallet, connectedWalletInstance]);
19 |
20 | return address;
21 | };
22 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/hooks/useAssets.ts:
--------------------------------------------------------------------------------
1 | import { useContext, useEffect, useState } from "react";
2 |
3 | import type { Asset } from "@meshsdk/common";
4 |
5 | import { WalletContext } from "../contexts";
6 |
7 | export const useAssets = () => {
8 | const [assets, setAssets] = useState();
9 | const { hasConnectedWallet, connectedWalletInstance } =
10 | useContext(WalletContext);
11 |
12 | useEffect(() => {
13 | if (hasConnectedWallet) {
14 | connectedWalletInstance.getAssets().then(setAssets);
15 | }
16 | }, [hasConnectedWallet, connectedWalletInstance]);
17 |
18 | return assets;
19 | };
20 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/hooks/useNetwork.ts:
--------------------------------------------------------------------------------
1 | import { useContext, useEffect, useState } from "react";
2 |
3 | import { WalletContext } from "../contexts";
4 |
5 | export const useNetwork = () => {
6 | const [networkId, setNetworkId] = useState();
7 | const { hasConnectedWallet, connectedWalletInstance } =
8 | useContext(WalletContext);
9 |
10 | useEffect(() => {
11 | if (hasConnectedWallet) {
12 | connectedWalletInstance.getNetworkId().then(setNetworkId);
13 | } else {
14 | setNetworkId(undefined);
15 | }
16 | }, [hasConnectedWallet, connectedWalletInstance]);
17 |
18 | return networkId;
19 | };
20 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/hooks/useWalletList.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 |
3 | import type { Wallet } from "@meshsdk/common";
4 | import { BrowserWallet } from "@meshsdk/wallet";
5 |
6 | export const useWalletList = ({
7 | injectFn = undefined,
8 | }: {
9 | injectFn?: () => Promise;
10 | } = {}) => {
11 | const [wallets, setWallets] = useState([]);
12 | useEffect(() => {
13 | async function get() {
14 | setWallets(await BrowserWallet.getAvailableWallets({ injectFn }));
15 | }
16 | get();
17 | }, []);
18 |
19 | return wallets;
20 | };
21 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./cardano-wallet";
2 | export * from "./contexts";
3 | export * from "./hooks";
4 | export * from "./mesh-badge";
5 | // export * from "./stake-button";
6 |
--------------------------------------------------------------------------------
/packages/mesh-react/src/styles.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/packages/mesh-react/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["node_modules", "dist"],
5 | "compilerOptions": {
6 | "jsx": "react-jsx"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mesh-react/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup";
2 |
3 | export default defineConfig({
4 | entry: ["src/index.ts"],
5 | format: ["esm", "cjs"],
6 | dts: true,
7 | noExternal: ["@fabianbormann/cardano-peer-connect"],
8 | skipNodeModulesBundle: true,
9 | });
10 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/README.md:
--------------------------------------------------------------------------------
1 | # mesh-svelte
2 |
3 | Svelte component library - [meshjs.dev/svelte](https://meshjs.dev/svelte)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/postcss.config.js:
--------------------------------------------------------------------------------
1 | // If you want to use other PostCSS plugins, see the following:
2 | // https://tailwindcss.com/docs/using-with-preprocessors
3 |
4 | export default {
5 | plugins: {
6 | tailwindcss: {},
7 | autoprefixer: {},
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/app.d.ts:
--------------------------------------------------------------------------------
1 | // See https://svelte.dev/docs/kit/types#app.d.ts
2 | // for information about these interfaces
3 | declare global {
4 | namespace App {
5 | // interface Error {}
6 | // interface Locals {}
7 | // interface PageData {}
8 | // interface PageState {}
9 | // interface Platform {}
10 | }
11 | }
12 |
13 | export {};
14 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %sveltekit.head%
8 |
9 |
10 | %sveltekit.body%
11 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./lib";
2 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/cardano-wallet-dropdown/component/index.ts:
--------------------------------------------------------------------------------
1 | import Root from "./cardano-wallet-dropdown-button.svelte";
2 |
3 | export { Root as CardanoWalletDropdown };
4 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/cardano-wallet-dropdown/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./component";
2 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/cardano-wallet/component/index.ts:
--------------------------------------------------------------------------------
1 | import Root from "./cardano-wallet.svelte";
2 |
3 | export { Root as CardanoWallet };
4 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/cardano-wallet/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./component";
2 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./types"
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/common/types.ts:
--------------------------------------------------------------------------------
1 | export type CardanoWalletButtonProps = {
2 | label?: string;
3 | onConnected?: Function;
4 | isDark?: boolean;
5 | extensions?: number[];
6 | };
7 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./cardano-wallet-dropdown";
2 | export * from "./cardano-wallet"
3 | export * from "./state"
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/lib/state/index.ts:
--------------------------------------------------------------------------------
1 | export * from "../state/browser-wallet-state.svelte";
--------------------------------------------------------------------------------
/packages/mesh-svelte/src/styles.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss/base";
2 | @import "tailwindcss/components";
3 | @import "tailwindcss/utilities";
4 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | import sharedConfig from "@meshsdk/configs/tailwind/tailwind.config";
4 |
5 | const config: Pick = {
6 | content: ["./src/**/*.{html,js,svelte,ts}"],
7 | prefix: "mesh-",
8 | presets: [sharedConfig],
9 | };
10 |
11 | export default config;
12 |
--------------------------------------------------------------------------------
/packages/mesh-svelte/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./.svelte-kit/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "checkJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "resolveJsonModule": true,
9 | "skipLibCheck": true,
10 | "sourceMap": true,
11 | "strict": true,
12 | "moduleResolution": "bundler"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/README.md:
--------------------------------------------------------------------------------
1 | # mesh-transaction
2 |
3 | Transactions - [meshjs.dev/apis/transaction](https://meshjs.dev/apis/transaction)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./mesh-tx-builder";
2 | export * from "./scripts";
3 | export * from "./transaction";
4 | export * from "./utils";
5 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/src/mesh-tx-builder/coin-selection/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | BuilderCallbacksSdkBridge,
3 | CardanoSdkInputSelector,
4 | } from './cardano-sdk-adapter';
5 | import * as CoinSelectionInterface from './coin-selection-interface';
6 |
7 | export {
8 | BuilderCallbacksSdkBridge,
9 | CardanoSdkInputSelector,
10 | CoinSelectionInterface,
11 | };
12 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/src/mesh-tx-builder/utils.ts:
--------------------------------------------------------------------------------
1 | import { Asset, UTxO } from "@meshsdk/common";
2 |
3 | /**
4 | * Convert UTxO to TxIn parameters in array for MeshTxBuilder
5 | * @param utxo UTxO
6 | * @returns [txHash, outputIndex, amount, address]
7 | */
8 | export const utxoToTxIn = (utxo: UTxO): [string, number, Asset[], string] => {
9 | return [
10 | utxo.input.txHash,
11 | utxo.input.outputIndex,
12 | utxo.output.amount,
13 | utxo.output.address,
14 | ];
15 | };
16 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/src/scripts/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./forge.script";
2 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./metadata";
2 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mesh-transaction/types/index.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeshJS/mesh/f2673f4e27f63412f22295be330a0f971d9acc95/packages/mesh-transaction/types/index.ts
--------------------------------------------------------------------------------
/packages/mesh-wallet/README.md:
--------------------------------------------------------------------------------
1 | # mesh-wallet
2 |
3 | Wallets - [meshjs.dev/apis/wallets](https://meshjs.dev/apis/wallets)
4 |
5 | [meshjs.dev](https://meshjs.dev/)
6 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/jest.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "jest";
2 |
3 | const jestConfig: Config = {
4 | clearMocks: true,
5 | maxWorkers: 1,
6 | testEnvironment: "node",
7 | testMatch: ["**/packages/**/*.test.ts"],
8 | setupFiles: ["dotenv/config"],
9 | preset: "ts-jest",
10 | moduleNameMapper: {
11 | "^(\\.{1,2}/.*)\\.js$": "$1",
12 | },
13 | transform: {
14 | "^.+\\.[jt]s?$": "ts-jest",
15 | },
16 | transformIgnorePatterns: ["/node_modules/(?!@meshsdk/.*)"],
17 | passWithNoTests: true,
18 | };
19 |
20 | export default jestConfig;
21 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/browser/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./browser-wallet";
2 | export * from "./webauthn";
3 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/browser/webauthn/auth/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./connect";
2 | export * from "./login";
3 | export * from "./register";
4 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/browser/webauthn/common/error-codes/index.ts:
--------------------------------------------------------------------------------
1 | export const ERRORCODES = {
2 | USEREXISTS: 1,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/browser/webauthn/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./error-codes";
2 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/browser/webauthn/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./auth";
2 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./app";
2 | export * from "./browser";
3 | export * from "./embedded";
4 | export * from "./mesh";
5 |
--------------------------------------------------------------------------------
/packages/mesh-wallet/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json",
3 | "include": ["src/**/*"],
4 | "exclude": ["dist", "node_modules"],
5 | "compilerOptions": {
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/bin/meshjs.js:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env node
2 | import('../dist/index.js');
3 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/src/actions/index.ts:
--------------------------------------------------------------------------------
1 | export * from './create';
2 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/src/helpers/index.ts:
--------------------------------------------------------------------------------
1 | export * from './resolvePkgManager';
2 | export * from './setProjectName';
3 | export * from './tryGitInit';
4 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/src/helpers/setProjectName.ts:
--------------------------------------------------------------------------------
1 | import { EOL } from 'os';
2 | import { join } from 'path';
3 | import { readFileSync, writeFileSync } from 'fs';
4 |
5 | export const setProjectName = (path, name) => {
6 | const packagePath = join(path, 'package.json');
7 | const packageContent = readFileSync(packagePath);
8 | const packageJson = JSON.parse(packageContent.toString());
9 |
10 | if (packageJson) {
11 | packageJson.name = name;
12 | }
13 |
14 | writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + EOL);
15 | };
16 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './logger';
2 |
--------------------------------------------------------------------------------
/scripts/mesh-cli/src/utils/logger.ts:
--------------------------------------------------------------------------------
1 | import chalk from 'chalk';
2 |
3 | export const logError = (message) => {
4 | console.log(chalk.redBright(message + '\n'));
5 | };
6 |
7 | export const logSuccess = (message) => {
8 | console.log(chalk.greenBright(message + '\n'));
9 | };
10 |
11 | export const logInfo = (message) => {
12 | console.log(chalk.blueBright(message + '\n'));
13 | };
14 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@meshsdk/configs/typescript/base.json"
3 | }
4 |
--------------------------------------------------------------------------------