create-dig-app 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +217 -0
- package/bin/create-dig-app.js +17 -0
- package/lib/cli.js +438 -0
- package/lib/index.js +235 -0
- package/lib/nft-cli.js +265 -0
- package/lib/nft-metadata.js +515 -0
- package/lib/substitute.js +47 -0
- package/lib/templates.js +185 -0
- package/package.json +51 -0
- package/templates/dapp-window-chia/README.md +63 -0
- package/templates/dapp-window-chia/_env.example +7 -0
- package/templates/dapp-window-chia/_gitignore +10 -0
- package/templates/dapp-window-chia/dig.toml +17 -0
- package/templates/dapp-window-chia/index.html +12 -0
- package/templates/dapp-window-chia/package.json +24 -0
- package/templates/dapp-window-chia/src/App.jsx +91 -0
- package/templates/dapp-window-chia/src/main.jsx +10 -0
- package/templates/dapp-window-chia/src/styles.css +71 -0
- package/templates/dapp-window-chia/src/wallet.js +47 -0
- package/templates/dapp-window-chia/vite.config.js +14 -0
- package/templates/next-static/README.md +41 -0
- package/templates/next-static/_gitignore +6 -0
- package/templates/next-static/app/globals.css +49 -0
- package/templates/next-static/app/layout.jsx +14 -0
- package/templates/next-static/app/page.jsx +18 -0
- package/templates/next-static/dig.toml +17 -0
- package/templates/next-static/next.config.mjs +11 -0
- package/templates/next-static/package.json +16 -0
- package/templates/nft-collection/README.md +119 -0
- package/templates/nft-collection/_env.example +5 -0
- package/templates/nft-collection/_gitignore +9 -0
- package/templates/nft-collection/assets/banner.svg +11 -0
- package/templates/nft-collection/assets/icon.svg +10 -0
- package/templates/nft-collection/collection.json +14 -0
- package/templates/nft-collection/dig.toml +23 -0
- package/templates/nft-collection/images/sample-1.svg +5 -0
- package/templates/nft-collection/images/sample-2.svg +5 -0
- package/templates/nft-collection/licenses/.gitkeep +1 -0
- package/templates/nft-collection/metadata/.gitkeep +2 -0
- package/templates/nft-collection/package.json +18 -0
- package/templates/nft-collection/scripts/dig-nft.mjs +479 -0
- package/templates/nft-collection/src/mint.js +72 -0
- package/templates/nft-collection/src/styles.css +64 -0
- package/templates/nft-collection/traits.csv +3 -0
- package/templates/nft-drop/README.md +71 -0
- package/templates/nft-drop/_env.example +7 -0
- package/templates/nft-drop/_gitignore +10 -0
- package/templates/nft-drop/dig.toml +18 -0
- package/templates/nft-drop/index.html +12 -0
- package/templates/nft-drop/package.json +24 -0
- package/templates/nft-drop/src/App.jsx +91 -0
- package/templates/nft-drop/src/main.jsx +10 -0
- package/templates/nft-drop/src/mint.js +72 -0
- package/templates/nft-drop/src/styles.css +70 -0
- package/templates/nft-drop/vite.config.js +13 -0
- package/templates/static-site/README.md +41 -0
- package/templates/static-site/_gitignore +5 -0
- package/templates/static-site/dig.toml +19 -0
- package/templates/static-site/package.json +10 -0
- package/templates/static-site/scripts/build.mjs +14 -0
- package/templates/static-site/src/index.html +20 -0
- package/templates/static-site/src/styles.css +49 -0
- package/templates/vite-react/README.md +42 -0
- package/templates/vite-react/_gitignore +5 -0
- package/templates/vite-react/dig.toml +17 -0
- package/templates/vite-react/index.html +12 -0
- package/templates/vite-react/package.json +20 -0
- package/templates/vite-react/src/App.jsx +18 -0
- package/templates/vite-react/src/main.jsx +10 -0
- package/templates/vite-react/src/styles.css +49 -0
- package/templates/vite-react/vite.config.js +9 -0
- package/templates-ts/dapp-window-chia/README.md +67 -0
- package/templates-ts/dapp-window-chia/_env.example +7 -0
- package/templates-ts/dapp-window-chia/_gitignore +10 -0
- package/templates-ts/dapp-window-chia/dig.toml +17 -0
- package/templates-ts/dapp-window-chia/index.html +12 -0
- package/templates-ts/dapp-window-chia/package.json +28 -0
- package/templates-ts/dapp-window-chia/src/App.tsx +93 -0
- package/templates-ts/dapp-window-chia/src/main.tsx +13 -0
- package/templates-ts/dapp-window-chia/src/styles.css +71 -0
- package/templates-ts/dapp-window-chia/src/vite-env.d.ts +11 -0
- package/templates-ts/dapp-window-chia/src/wallet.ts +62 -0
- package/templates-ts/dapp-window-chia/tsconfig.json +20 -0
- package/templates-ts/dapp-window-chia/vite.config.ts +14 -0
- package/templates-ts/next-static/README.md +43 -0
- package/templates-ts/next-static/_gitignore +7 -0
- package/templates-ts/next-static/app/globals.css +49 -0
- package/templates-ts/next-static/app/layout.tsx +16 -0
- package/templates-ts/next-static/app/page.tsx +18 -0
- package/templates-ts/next-static/dig.toml +17 -0
- package/templates-ts/next-static/next-env.d.ts +5 -0
- package/templates-ts/next-static/next.config.mjs +11 -0
- package/templates-ts/next-static/package.json +23 -0
- package/templates-ts/next-static/tsconfig.json +21 -0
- package/templates-ts/nft-drop/README.md +74 -0
- package/templates-ts/nft-drop/_env.example +7 -0
- package/templates-ts/nft-drop/_gitignore +10 -0
- package/templates-ts/nft-drop/dig.toml +18 -0
- package/templates-ts/nft-drop/index.html +12 -0
- package/templates-ts/nft-drop/package.json +28 -0
- package/templates-ts/nft-drop/src/App.tsx +93 -0
- package/templates-ts/nft-drop/src/main.tsx +13 -0
- package/templates-ts/nft-drop/src/mint.ts +86 -0
- package/templates-ts/nft-drop/src/styles.css +70 -0
- package/templates-ts/nft-drop/src/vite-env.d.ts +11 -0
- package/templates-ts/nft-drop/tsconfig.json +20 -0
- package/templates-ts/nft-drop/vite.config.ts +13 -0
- package/templates-ts/vite-react/README.md +44 -0
- package/templates-ts/vite-react/_gitignore +5 -0
- package/templates-ts/vite-react/dig.toml +17 -0
- package/templates-ts/vite-react/index.html +12 -0
- package/templates-ts/vite-react/package.json +24 -0
- package/templates-ts/vite-react/src/App.tsx +18 -0
- package/templates-ts/vite-react/src/main.tsx +13 -0
- package/templates-ts/vite-react/src/styles.css +49 -0
- package/templates-ts/vite-react/src/vite-env.d.ts +1 -0
- package/templates-ts/vite-react/tsconfig.json +20 -0
- package/templates-ts/vite-react/vite.config.ts +9 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light dark;
|
|
3
|
+
--fg: #0f172a;
|
|
4
|
+
--muted: #64748b;
|
|
5
|
+
--bg: #f8fafc;
|
|
6
|
+
--error: #dc2626;
|
|
7
|
+
|
|
8
|
+
/* DIG brand accent — violet -> magenta (SYSTEM.md visual theme; matches dig.net/hub/status). */
|
|
9
|
+
--dig-violet: #5800D6;
|
|
10
|
+
--dig-magenta: #FF00DE;
|
|
11
|
+
--accent: var(--dig-violet);
|
|
12
|
+
--grad-brand: linear-gradient(115deg, #5800D6 0%, #FF00DE 100%);
|
|
13
|
+
|
|
14
|
+
/* DIG brand fonts — named first, system stack as the offline/no-fetch fallback so a scaffolded
|
|
15
|
+
capsule never depends on an external font host (keeps the site self-contained + offline-safe). */
|
|
16
|
+
--dig-font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
|
|
17
|
+
--dig-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
18
|
+
}
|
|
19
|
+
@media (prefers-color-scheme: dark) {
|
|
20
|
+
:root { --fg: #e2e8f0; --muted: #94a3b8; --bg: #0b1120; }
|
|
21
|
+
}
|
|
22
|
+
* { box-sizing: border-box; }
|
|
23
|
+
body {
|
|
24
|
+
margin: 0;
|
|
25
|
+
min-height: 100vh;
|
|
26
|
+
display: grid;
|
|
27
|
+
place-items: center;
|
|
28
|
+
font: 16px/1.6 var(--dig-font);
|
|
29
|
+
color: var(--fg);
|
|
30
|
+
background: var(--bg);
|
|
31
|
+
}
|
|
32
|
+
.wrap { max-width: 40rem; padding: 2rem; }
|
|
33
|
+
h1 {
|
|
34
|
+
font-size: 2.25rem;
|
|
35
|
+
margin: 0 0 0.5rem;
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
background: var(--grad-brand);
|
|
38
|
+
-webkit-background-clip: text;
|
|
39
|
+
background-clip: text;
|
|
40
|
+
color: transparent;
|
|
41
|
+
}
|
|
42
|
+
.muted { color: var(--muted); }
|
|
43
|
+
pre {
|
|
44
|
+
font-family: var(--dig-mono);
|
|
45
|
+
background: rgba(127, 127, 127, 0.12);
|
|
46
|
+
padding: 1rem;
|
|
47
|
+
border-radius: 0.5rem;
|
|
48
|
+
overflow-x: auto;
|
|
49
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./globals.css";
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
title: "__DISPLAY_NAME__",
|
|
5
|
+
description: "A Next.js static site on the DIG Network.",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function RootLayout({ children }) {
|
|
9
|
+
return (
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<body>{children}</body>
|
|
12
|
+
</html>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default function Home() {
|
|
2
|
+
return (
|
|
3
|
+
<main className="wrap">
|
|
4
|
+
<h1>__DISPLAY_NAME__</h1>
|
|
5
|
+
<p>
|
|
6
|
+
A Next.js static-export site on the <strong>DIG Network</strong> — served from a network no
|
|
7
|
+
host can read, change, or take down.
|
|
8
|
+
</p>
|
|
9
|
+
<p className="muted">
|
|
10
|
+
Build and preview for <strong>free</strong>. You only spend $DIG when you publish.
|
|
11
|
+
</p>
|
|
12
|
+
<pre>
|
|
13
|
+
<code>{`digstore dev # preview, free
|
|
14
|
+
digstore deploy # publish a capsule ($DIG)`}</code>
|
|
15
|
+
</pre>
|
|
16
|
+
</main>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# dig.toml — the project manifest digstore (and the DIG SDK adapters) read.
|
|
2
|
+
# Keys are kebab-case (snake_case also accepted). See:
|
|
3
|
+
# https://docs.dig.net/docs/digstore/cli/deploy-from-github-actions
|
|
4
|
+
#
|
|
5
|
+
# Everything here is LOCAL config. Scaffolding, building, and `digstore dev` cost nothing —
|
|
6
|
+
# you only spend $DIG when you run `digstore deploy` to publish a capsule.
|
|
7
|
+
|
|
8
|
+
# Next.js with `output: 'export'` emits static files to out/ — that is the content root.
|
|
9
|
+
output-dir = "__OUTPUT_DIR__"
|
|
10
|
+
|
|
11
|
+
# The command digstore runs to build before publishing (used by `digstore deploy` / CI).
|
|
12
|
+
build-command = "__BUILD_COMMAND__"
|
|
13
|
+
|
|
14
|
+
# Default remote a `digstore deploy` pushes to (resolves to your store after your first publish).
|
|
15
|
+
remote = "origin"
|
|
16
|
+
|
|
17
|
+
# network = "mainnet"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
// Static export — Next emits a folder of static files to out/, which digstore publishes as a
|
|
4
|
+
// capsule. A DIG capsule is a blind static host; there is no Next.js server at runtime.
|
|
5
|
+
output: "export",
|
|
6
|
+
// Relative-friendly asset paths so the build works under a *.on.dig.net subdomain and chia://.
|
|
7
|
+
images: { unoptimized: true },
|
|
8
|
+
trailingSlash: true,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default nextConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__APP_NAME__",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "__DISPLAY_NAME__ — a Next.js static-export site on the DIG Network.",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"next": "^14.2.15",
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# __DISPLAY_NAME__
|
|
2
|
+
|
|
3
|
+
An **NFT collection** on the **DIG Network** — your art, its CHIP-0007 metadata, and its license, all
|
|
4
|
+
in one **capsule** on Chia. Scaffolded with `npm create dig-app` (template: `nft-collection`).
|
|
5
|
+
|
|
6
|
+
This starter is a **collection workspace**: drop your art in `images/`, describe the collection once
|
|
7
|
+
in `collection.json`, and the built-in tooling generates per-item CHIP-0007 metadata + a license and
|
|
8
|
+
the `items.json` manifest that `digstore collection mint` consumes. The metadata it produces is
|
|
9
|
+
byte-for-byte the canonical DIG / Chia CHIP-0007 shape, so it mints cleanly via the `digstore` CLI
|
|
10
|
+
**and** the DIGHUb NFT studio.
|
|
11
|
+
|
|
12
|
+
New to minting NFTs on DIG? Start here:
|
|
13
|
+
<https://docs.dig.net/docs/audiences/nft-developers>.
|
|
14
|
+
|
|
15
|
+
## Free until you publish / mint — and nothing was minted
|
|
16
|
+
|
|
17
|
+
Scaffolding, generating metadata/licenses, and validating are **free** and **local** — no chain, no
|
|
18
|
+
spend. Two distinct costs come later, both explicit and wallet-signed:
|
|
19
|
+
|
|
20
|
+
- **Publishing the collection** (the art + metadata + licenses) as a DIG **capsule** is one
|
|
21
|
+
`digstore deploy` — **$DIG**.
|
|
22
|
+
- **Minting the NFTs** on-chain is `digstore collection mint` (or your own app) — a wallet-signed
|
|
23
|
+
spend. Spends are **built by the tooling / SDK**, never hand-rolled.
|
|
24
|
+
|
|
25
|
+
## What's in here
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
.
|
|
29
|
+
├── collection.json # the data common to EVERY NFT: name, description, royalty, license, did,
|
|
30
|
+
│ # shared attributes, and the icon/banner refs
|
|
31
|
+
├── images/ # your item art — ONE image per NFT (png/jpg/gif/webp/svg)
|
|
32
|
+
│ ├── sample-1.svg # placeholder — replace with your art
|
|
33
|
+
│ └── sample-2.svg
|
|
34
|
+
├── assets/ # collection-level art shown on the collection page
|
|
35
|
+
│ ├── banner.svg # the wide banner (replace)
|
|
36
|
+
│ └── icon.svg # the square icon / avatar (replace)
|
|
37
|
+
├── metadata/ # GENERATED — one canonical CHIP-0007 JSON per item (do not hand-edit)
|
|
38
|
+
├── licenses/ # GENERATED — the license file you chose in collection.json
|
|
39
|
+
├── items.json # GENERATED — the manifest `digstore collection mint` consumes
|
|
40
|
+
├── traits.csv # OPTIONAL — per-item names + traits (delete to derive names from filenames)
|
|
41
|
+
├── scripts/dig-nft.mjs # the dependency-free metadata/license/validate tool (pure Node)
|
|
42
|
+
├── src/ # OPTIONAL — wallet-connected mint wiring for your own page (ChiaProvider)
|
|
43
|
+
└── dig.toml # the digstore manifest (output dir = the whole project = one capsule)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## The flow
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npm install # installs @dignetwork/dig-sdk (only needed for the in-app mint path)
|
|
50
|
+
|
|
51
|
+
# 1. Describe your collection once in collection.json (name, royalty, license, shared attributes).
|
|
52
|
+
# 2. Drop your art in images/ (one image per NFT). Optionally list names+traits in traits.csv.
|
|
53
|
+
|
|
54
|
+
npm run generate:license # writes the license you chose (collection.json `license`) into licenses/
|
|
55
|
+
npm run generate:metadata # writes metadata/<item>.json + items.json, hashing the REAL art bytes
|
|
56
|
+
# (or just `npm run generate` to do both, in the right order)
|
|
57
|
+
|
|
58
|
+
npm run validate # re-checks the CHIP-0007 schema + every data/metadata/license hash
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### `collection.json` — the common fields
|
|
62
|
+
|
|
63
|
+
Everything shared by all items lives here:
|
|
64
|
+
|
|
65
|
+
| Field | Meaning |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `name` | The collection name. Its slug becomes the CHIP-0007 `collection.id` (stable across items). |
|
|
68
|
+
| `description` | Shown on the collection page. |
|
|
69
|
+
| `royalty_address` | The Chia address that receives royalties on secondary sales. |
|
|
70
|
+
| `royalty_basis_points` | Royalty in basis points (e.g. `300` = 3%). |
|
|
71
|
+
| `did` | Optional creator DID (`did:chia:…`) for a verified-creator collection. |
|
|
72
|
+
| `license` | One of `cc0`, `cc-by-4.0`, `all-rights-reserved`, `commercial`. |
|
|
73
|
+
| `icon` / `banner` | Paths to the collection art under `assets/`. |
|
|
74
|
+
| `attributes` | Collection-level traits (website, twitter, …) — added to every item's `collection` block. |
|
|
75
|
+
|
|
76
|
+
### Per-item names + traits
|
|
77
|
+
|
|
78
|
+
- **No `traits.csv`/`traits.json`?** Each item's name is humanized from its image filename
|
|
79
|
+
(`cool-frog-1.png` → "Cool Frog 1"), with no extra traits.
|
|
80
|
+
- **`traits.csv`** (the included sample): a header row, one row per item. The `name`/`title`,
|
|
81
|
+
`file`/`image`, and `description` columns are special; **every other column becomes a trait** whose
|
|
82
|
+
`trait_type` is the column header. Empty cells are skipped.
|
|
83
|
+
- **`traits.json`**: an array of `{ "name", "file", "attributes": [{ "trait_type", "value" }] }`
|
|
84
|
+
(or `{ "items": [ … ] }`). Either `trait_type` or `traitType` is accepted.
|
|
85
|
+
|
|
86
|
+
## Mint it
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
# Publish the art + metadata + licenses as ONE capsule (this is the only deploy that spends $DIG):
|
|
90
|
+
digstore deploy
|
|
91
|
+
|
|
92
|
+
# Mint the NFTs on-chain from collection.json + the generated items.json (wallet-signed):
|
|
93
|
+
digstore collection create --name "__DISPLAY_NAME__" # one-time: register the collection on-chain
|
|
94
|
+
digstore collection mint --collection collection.json --manifest items.json --did <your-did>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Prefer minting from your own page? `src/mint.js` wires `ChiaProvider` (injected DIG Browser wallet,
|
|
98
|
+
or Sage over WalletConnect) — copy `.env.example` to `.env` and set a free
|
|
99
|
+
`WALLETCONNECT_PROJECT_ID` from <https://cloud.reown.com> for the Sage fallback.
|
|
100
|
+
|
|
101
|
+
## Why the hashes matter
|
|
102
|
+
|
|
103
|
+
Each NFT pins three hashes on-chain: `data_hash` (your art), `metadata_hash` (the CHIP-0007 JSON),
|
|
104
|
+
and `license_hash` (the license file). The tooling computes them from the **real bytes** and the
|
|
105
|
+
**canonical** JSON, so what's served always verifies against what's anchored on Chia. `npm run
|
|
106
|
+
validate` re-proves this before you mint — if you change an image after generating, validation fails
|
|
107
|
+
until you regenerate. Never hand-edit `metadata/` or `items.json`.
|
|
108
|
+
|
|
109
|
+
## Deploy from CI
|
|
110
|
+
|
|
111
|
+
Wire push-to-deploy with the GitHub Action:
|
|
112
|
+
<https://docs.dig.net/docs/digstore/cli/deploy-from-github-actions>.
|
|
113
|
+
|
|
114
|
+
## Preview locally (free)
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
digstore dev # preview the collection on the real chia:// read path — FREE, no chain, no spend
|
|
118
|
+
digstore deploy # publish the capsule when you're ready (the only step that spends $DIG)
|
|
119
|
+
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# WalletConnect Cloud / Reown project id — used by src/mint.js to connect Sage (the main Chia wallet)
|
|
2
|
+
# over WalletConnect when you mint outside the DIG Browser. Get a free id at https://cloud.reown.com
|
|
3
|
+
# (formerly WalletConnect Cloud). Copy this file to `.env` and paste your id. Leave it blank to use
|
|
4
|
+
# only the injected DIG Browser wallet (window.chia). Minting via the `digstore` CLI does not need it.
|
|
5
|
+
WALLETCONNECT_PROJECT_ID=
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1400" height="350" viewBox="0 0 1400 350" role="img" aria-label="Collection banner placeholder">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="dig" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#5800D6"/>
|
|
5
|
+
<stop offset="1" stop-color="#FF00DE"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1400" height="350" fill="url(#dig)"/>
|
|
9
|
+
<text x="50%" y="48%" text-anchor="middle" fill="#ffffff" font-family="'Space Grotesk', system-ui, sans-serif" font-size="56" font-weight="700">Your collection banner</text>
|
|
10
|
+
<text x="50%" y="64%" text-anchor="middle" fill="#ffffff" opacity="0.85" font-family="'Space Grotesk', system-ui, sans-serif" font-size="24">Replace assets/banner.svg — shown on the collection page</text>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320" role="img" aria-label="Collection icon placeholder">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="dig" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#5800D6"/>
|
|
5
|
+
<stop offset="1" stop-color="#FF00DE"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="320" height="320" rx="64" fill="url(#dig)"/>
|
|
9
|
+
<text x="50%" y="56%" text-anchor="middle" fill="#ffffff" font-family="'Space Grotesk', system-ui, sans-serif" font-size="120" font-weight="700">D</text>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__DISPLAY_NAME__",
|
|
3
|
+
"description": "A collection minted on the DIG Network — art stored in a chia:// capsule, truly permanent on Chia.",
|
|
4
|
+
"creator": "__DISPLAY_NAME__ creator",
|
|
5
|
+
"royalty_address": "xch10000000000000000000000000000000000000000000000000000000000000000",
|
|
6
|
+
"royalty_basis_points": 300,
|
|
7
|
+
"did": null,
|
|
8
|
+
"license": "cc0",
|
|
9
|
+
"icon": "assets/icon.svg",
|
|
10
|
+
"banner": "assets/banner.svg",
|
|
11
|
+
"attributes": [
|
|
12
|
+
{ "trait_type": "Website", "value": "https://example.on.dig.net" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# dig.toml — the project manifest digstore (and the DIG SDK adapters) read.
|
|
2
|
+
# Keys are kebab-case (snake_case also accepted). See:
|
|
3
|
+
# https://docs.dig.net/docs/digstore/cli/deploy-from-github-actions
|
|
4
|
+
#
|
|
5
|
+
# Everything here is LOCAL config. Scaffolding, generating metadata/licenses, and validating cost
|
|
6
|
+
# nothing — you only spend $DIG when you publish (`digstore deploy`) or mint (`digstore collection
|
|
7
|
+
# mint`). See the README for the full flow.
|
|
8
|
+
|
|
9
|
+
# This collection's content root is the project root itself: the art (images/), the generated
|
|
10
|
+
# CHIP-0007 metadata (metadata/), the licenses (licenses/), and the collection icon/banner (assets/)
|
|
11
|
+
# all ship inside ONE capsule, so every `data_uris`/`metadata_uris`/`license_uris` resolves under it.
|
|
12
|
+
output-dir = "__OUTPUT_DIR__"
|
|
13
|
+
|
|
14
|
+
# `build` runs the validator as a pre-publish gate (schema + data/metadata/license hash agreement).
|
|
15
|
+
build-command = "__BUILD_COMMAND__"
|
|
16
|
+
|
|
17
|
+
# Default remote a `digstore deploy` pushes to (resolves to your store after your first publish).
|
|
18
|
+
remote = "origin"
|
|
19
|
+
|
|
20
|
+
# Don't publish the toolchain / local files into the capsule — only the art + metadata + licenses.
|
|
21
|
+
ignore = ["node_modules", "scripts", "package.json", "package-lock.json", ".env", ".env.local", "src"]
|
|
22
|
+
|
|
23
|
+
# network = "mainnet"
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Sample item 1">
|
|
2
|
+
<rect width="512" height="512" fill="#5800D6"/>
|
|
3
|
+
<circle cx="256" cy="220" r="120" fill="#FF00DE"/>
|
|
4
|
+
<text x="50%" y="86%" text-anchor="middle" fill="#ffffff" font-family="'Space Grotesk', system-ui, sans-serif" font-size="40" font-weight="700">Item #1</text>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Sample item 2">
|
|
2
|
+
<rect width="512" height="512" fill="#FF00DE"/>
|
|
3
|
+
<rect x="136" y="100" width="240" height="240" rx="32" fill="#5800D6"/>
|
|
4
|
+
<text x="50%" y="86%" text-anchor="middle" fill="#ffffff" font-family="'Space Grotesk', system-ui, sans-serif" font-size="40" font-weight="700">Item #2</text>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# The license you choose in collection.json (`license`) is written here by `npm run generate:license`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__APP_NAME__",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "__DISPLAY_NAME__ — an NFT collection on the DIG Network (CHIP-0007 metadata + licenses).",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"generate:license": "node scripts/dig-nft.mjs license",
|
|
9
|
+
"generate:metadata": "node scripts/dig-nft.mjs metadata",
|
|
10
|
+
"generate": "npm run generate:license && npm run generate:metadata",
|
|
11
|
+
"validate": "node scripts/dig-nft.mjs validate",
|
|
12
|
+
"build": "npm run validate"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@dignetwork/dig-sdk": "__SDK_VERSION__",
|
|
16
|
+
"@walletconnect/sign-client": "^2.11.0"
|
|
17
|
+
}
|
|
18
|
+
}
|