Full lesson
mintr-backend
What it does
From the project README:
This repo contains the Mintr infra & backend code that currently invokes the Solana core token program. In the future we will also be using it to invoke our custom written program for logic that includes creating collections and minting from the created collections.
- Original
- mintr-solana/mintr-backend
- SuperStack fork
- Blockchains/mintr-backend @
54f4b3c - Stars
- 1
- Last push (original)
- 2024-11-03
- Languages
- TypeScript, Shell
- Detected stack
- MetaplexSolana Actionsweb3.js
- Categories
- Other
- Licence
- Apache-2.0
Architecture
20 source files. By extension: .ts ×20.
| Top-level directory | Source files |
|---|---|
src | 19 |
(root) | 1 |
Dapp: deploying
This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/mintr-backend/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
src/lambda/services/ActionService.ts L1–24 @ 54f4b3c · Apache-2.0 · originalimport { Logger } from '@aws-lambda-powertools/logger'import { mplCore } from '@metaplex-foundation/mpl-core'import { createNft, mplTokenMetadata } from '@metaplex-foundation/mpl-token-metadata'import { createNoopSigner, createSignerFromKeypair, percentAmount, publicKey, signerIdentity, signerPayer, signTransaction,} from '@metaplex-foundation/umi'import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'import { toWeb3JsTransaction } from '@metaplex-foundation/umi-web3js-adapters'import { ActionPostResponse, createPostResponse } from '@solana/actions'import { ActionGetResponse } from '@solana/actions-spec'import { InternalServerError } from 'http-errors'import { FileService } from './FileService'import { KeyService } from './KeyService'import { getMandatoryEnv } from '../../utils/getMandatoryEnv'import { CreateAssetRequest } from '../types/CreateAssetRequest' export class ActionService { private readonly logger = new Logger({ serviceName: 'ActionService' })- Line 15
import { ActionPostResponse, createPostResponse } from '@solana/actions': Returns the serialized transaction the wallet will sign. - Line 16
import { ActionGetResponse } from '@solana/actions-spec': The metadata a Blink client renders (title, icon, buttons).
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
. | npm run build | npx projen build |
. | npm run test | npx projen test |
. | npm run deploy | ./scripts/deploy.sh |
What you could build from it
- Fork the SuperStack copy and extend it within the Other gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)