From 9d86f6f8f66bbe19d62af20b9f1297f8e37761b0 Mon Sep 17 00:00:00 2001 From: MarkSackerberg <93528482+MarkSackerberg@users.noreply.github.com> Date: Sat, 4 Jul 2026 18:43:56 +0200 Subject: [PATCH] add flag --- src/examples/core/create-asset/index.js | 2 +- .../token-metadata/fungibles/create/index.js | 2 +- src/pages/en/dev-tools/cli/bubblegum/index.md | 19 ++++++- .../en/dev-tools/cli/core/create-asset.md | 11 ++++ .../dev-tools/cli/core/create-collection.md | 11 ++++ .../en/dev-tools/cli/toolbox/token-create.md | 10 ++++ .../en/solana/grind-vanity-public-key.md | 51 ++++++++++++++----- .../ja/dev-tools/cli/core/create-asset.md | 11 ++++ .../dev-tools/cli/core/create-collection.md | 11 ++++ .../ja/dev-tools/cli/toolbox/token-create.md | 10 ++++ .../ja/solana/grind-vanity-public-key.md | 51 ++++++++++++++----- .../ko/dev-tools/cli/core/create-asset.md | 11 ++++ .../dev-tools/cli/core/create-collection.md | 11 ++++ .../ko/dev-tools/cli/toolbox/token-create.md | 10 ++++ .../ko/solana/grind-vanity-public-key.md | 51 ++++++++++++++----- .../zh/dev-tools/cli/core/create-asset.md | 11 ++++ .../dev-tools/cli/core/create-collection.md | 11 ++++ .../zh/dev-tools/cli/toolbox/token-create.md | 10 ++++ .../zh/solana/grind-vanity-public-key.md | 51 ++++++++++++++----- 19 files changed, 304 insertions(+), 51 deletions(-) diff --git a/src/examples/core/create-asset/index.js b/src/examples/core/create-asset/index.js index 2402b9244..688fe5862 100644 --- a/src/examples/core/create-asset/index.js +++ b/src/examples/core/create-asset/index.js @@ -36,7 +36,7 @@ const cliSections = { "setup": "", "main": "", "output": "", - "full": "# Create an NFT using the Metaplex CLI\n\n# Interactive wizard mode (recommended)\nmplx core asset create --wizard\n\n# Simple creation with name and URI\nmplx core asset create --name \"My NFT\" --uri \"https://example.com/metadata.json\"\n\n# Create with files (image + metadata)\nmplx core asset create --files --image \"./my-nft.png\" --json \"./metadata.json\"\n" + "full": "# Create an NFT using the Metaplex CLI\n\n# Interactive wizard mode (recommended)\nmplx core asset create --wizard\n\n# Simple creation with name and URI\nmplx core asset create --name \"My NFT\" --uri \"https://example.com/metadata.json\"\n\n# Create with files (image + metadata)\nmplx core asset create --files --image \"./my-nft.png\" --offchain \"./metadata.json\"\n\n# Create with a vanity asset address\nmplx core asset create \\\n --name \"My NFT\" \\\n --uri \"https://example.com/metadata.json\" \\\n --mint-keypair ./vanity-asset.json\n" } export const metadata = { diff --git a/src/examples/token-metadata/fungibles/create/index.js b/src/examples/token-metadata/fungibles/create/index.js index 668f98413..8599a501c 100644 --- a/src/examples/token-metadata/fungibles/create/index.js +++ b/src/examples/token-metadata/fungibles/create/index.js @@ -36,7 +36,7 @@ const cliSections = { "setup": "", "main": "", "output": "", - "full": "# Create a Fungible Token using the Metaplex CLI\n\n# Interactive wizard mode (recommended for beginners)\nmplx toolbox token create --wizard\n\n# Basic token creation (required: --name, --symbol, --mint-amount)\nmplx toolbox token create \\\n --name \"My Token\" \\\n --symbol \"MYT\" \\\n --mint-amount 1000000\n\n# Full token creation with all options\nmplx toolbox token create \\\n --name \"My Token\" \\\n --symbol \"MYT\" \\\n --description \"A fungible token on Solana\" \\\n --image ./token-image.png \\\n --decimals 9 \\\n --mint-amount 1000000000000000\n\n# Note: mint-amount is in smallest units\n# With --decimals 9, to mint 1,000,000 tokens: --mint-amount 1000000000000000\n# With --decimals 0 (default), to mint 1,000,000 tokens: --mint-amount 1000000\n" + "full": "# Create a Fungible Token using the Metaplex CLI\n\n# Interactive wizard mode (recommended for beginners)\nmplx toolbox token create --wizard\n\n# Basic token creation (required: --name, --symbol, --mint-amount)\nmplx toolbox token create \\\n --name \"My Token\" \\\n --symbol \"MYT\" \\\n --mint-amount 1000000\n\n# Full token creation with all options\nmplx toolbox token create \\\n --name \"My Token\" \\\n --symbol \"MYT\" \\\n --description \"A fungible token on Solana\" \\\n --image ./token-image.png \\\n --decimals 9 \\\n --mint-amount 1000000000000000\n\n# Create with a vanity mint address\nmplx toolbox token create \\\n --name \"Cool Token\" \\\n --symbol \"COOL\" \\\n --mint-amount 1000000 \\\n --mint-keypair ./vanity-mint.json\n\n# Note: mint-amount is in smallest units\n# With --decimals 9, to mint 1,000,000 tokens: --mint-amount 1000000000000000\n# With --decimals 0 (default), to mint 1,000,000 tokens: --mint-amount 1000000\n" } export const metadata = { diff --git a/src/pages/en/dev-tools/cli/bubblegum/index.md b/src/pages/en/dev-tools/cli/bubblegum/index.md index 5af69c074..38779600a 100644 --- a/src/pages/en/dev-tools/cli/bubblegum/index.md +++ b/src/pages/en/dev-tools/cli/bubblegum/index.md @@ -21,7 +21,24 @@ Compressed NFTs are stored in Merkle trees rather than individual on-chain accou - Proof size required for operations ### Collections -Bubblegum V2 uses [Metaplex Core collections](/smart-contracts/core/collections) (not Token Metadata collections). Create a Core collection first: +Bubblegum V2 uses [Metaplex Core collections](/smart-contracts/core/collections). Create a Core collection with the Bubblegum V2 plugin: + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" +``` + +You can also use a vanity collection address with `--mint-keypair`: + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json +``` + +Or create a Core collection manually and add plugins separately: ```bash mplx core collection create --wizard diff --git a/src/pages/en/dev-tools/cli/core/create-asset.md b/src/pages/en/dev-tools/cli/core/create-asset.md index 38af70a34..13f896ab2 100644 --- a/src/pages/en/dev-tools/cli/core/create-asset.md +++ b/src/pages/en/dev-tools/cli/core/create-asset.md @@ -47,6 +47,9 @@ mplx core asset create --wizard - `--plugins`: Use interactive plugin selection - `--pluginsFile `: Path to a JSON file with plugin data +### Vanity Addresses +- `--mint-keypair `: Path to a keypair JSON file to use as the asset address instead of generating a random one. See [Grind a vanity public key](/solana/grind-vanity-public-key). + ## Examples 1. Create an asset using the interactive wizard: @@ -74,6 +77,14 @@ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json" mplx core asset create --files --image "./my-nft.png" --offchain "./metadata.json" --collection "collection_id_here" ``` +6. Create an asset with a vanity address: +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` + ## JSON Output Pass `--json` to get structured machine-readable output instead of formatted text: diff --git a/src/pages/en/dev-tools/cli/core/create-collection.md b/src/pages/en/dev-tools/cli/core/create-collection.md index 6e7cf1d7e..62c7d0aaf 100644 --- a/src/pages/en/dev-tools/cli/core/create-collection.md +++ b/src/pages/en/dev-tools/cli/core/create-collection.md @@ -46,6 +46,9 @@ mplx core collection create --wizard - `--plugins`: Use interactive plugin selection - `--pluginsFile `: Path to a JSON file with plugin data +### Vanity Addresses +- `--mint-keypair `: Path to a keypair JSON file to use as the collection address instead of generating a random one. See [Grind a vanity public key](/solana/grind-vanity-public-key). + ## Examples 1. Create a collection using the interactive wizard: @@ -63,6 +66,14 @@ mplx core collection create --name "My Collection" --uri "https://example.com/me mplx core collection create --files --image "./my-collection.png" --offchain "./metadata.json" ``` +4. Create a collection with a vanity address: +```bash +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-collection.json +``` + ## JSON Output Pass `--json` to get structured machine-readable output instead of formatted text: diff --git a/src/pages/en/dev-tools/cli/toolbox/token-create.md b/src/pages/en/dev-tools/cli/toolbox/token-create.md index cb5121ccd..f28a106f0 100644 --- a/src/pages/en/dev-tools/cli/toolbox/token-create.md +++ b/src/pages/en/dev-tools/cli/toolbox/token-create.md @@ -30,6 +30,7 @@ mplx toolbox token create --name "My Token" --symbol "TOKEN" --mint-amount 10000 - `--description `: Description of the token and its purpose - `--image `: Path to the token image file (PNG, JPG, or GIF) - `--speed-run`: Enable speed run mode to measure execution time +- `--mint-keypair `: Path to a keypair JSON file to use as the token mint address (vanity key). See [Grind a vanity public key](/solana/grind-vanity-public-key). ## Examples @@ -49,6 +50,15 @@ mplx toolbox token create \ --mint-amount 1000000 ``` +### Create Token with a Vanity Mint Address +```bash +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-mint.json +``` + ### Create Token Using Wizard ```bash mplx toolbox token create --wizard diff --git a/src/pages/en/solana/grind-vanity-public-key.md b/src/pages/en/solana/grind-vanity-public-key.md index eecfb8ecd..ee81d116d 100644 --- a/src/pages/en/solana/grind-vanity-public-key.md +++ b/src/pages/en/solana/grind-vanity-public-key.md @@ -209,27 +209,54 @@ solana balance ## Using Vanity Addresses with Metaplex -### Token Creation +After grinding a keypair, pass it to mint and create commands with `--mint-keypair`. Your configured wallet (`--keypair` or `mplx config wallets set`) still pays transaction fees and acts as the update authority. The vanity keypair only determines the mint or asset address. + +### Fungible Token ```bash -# Create a token with a vanity mint address -# First, grind the keypair -solana-keygen grind --starts-with COOL:1 +solana-keygen grind --starts-with COOL:1 --output-directory ./vanity-keys/ -# Use with MPLX CLI (specify as mint keypair) -mplx toolbox token-create --name "Cool Token" --symbol "COOL" +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-keys/COOL....json ``` -### NFT Collection +### Core Asset + +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` -When creating collections with the MPLX CLI, you can use a vanity address for your collection: +### Core Collection ```bash -# Grind collection address -solana-keygen grind --starts-with ART:1 +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json +``` + +### Token Metadata NFT -# Use in collection creation -mplx core create-collection --keypair ./ARTxyz....json +```bash +mplx tm create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-mint.json +``` + +### Bubblegum Collection + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json ``` ## Next Steps diff --git a/src/pages/ja/dev-tools/cli/core/create-asset.md b/src/pages/ja/dev-tools/cli/core/create-asset.md index 0bfe4f3b4..3f3292d0e 100644 --- a/src/pages/ja/dev-tools/cli/core/create-asset.md +++ b/src/pages/ja/dev-tools/cli/core/create-asset.md @@ -45,6 +45,9 @@ mplx core asset create --wizard - `--plugins`: インタラクティブなプラグイン選択を使用 - `--pluginsFile `: プラグインデータを含むJSONファイルへのパス +### バニティアドレス +- `--mint-keypair `: ランダム生成の代わりにアセットアドレスとして使用するキーペアJSONファイルのパス。[バニティ公開鍵の生成](/ja/solana/grind-vanity-public-key)を参照。 + ## 例 1. インタラクティブウィザードを使用してアセットを作成: @@ -72,6 +75,14 @@ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json" mplx core asset create --files --image "./my-nft.png" --offchain "./metadata.json" --collection "collection_id_here" ``` +6. バニティアドレスでアセットを作成: +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` + ## 出力 コマンドは作成が成功すると以下の情報を出力します: diff --git a/src/pages/ja/dev-tools/cli/core/create-collection.md b/src/pages/ja/dev-tools/cli/core/create-collection.md index d3b147bdc..3eabf8584 100644 --- a/src/pages/ja/dev-tools/cli/core/create-collection.md +++ b/src/pages/ja/dev-tools/cli/core/create-collection.md @@ -44,6 +44,9 @@ mplx core collection create --wizard - `--plugins`: インタラクティブなプラグイン選択を使用 - `--pluginsFile `: プラグインデータを含むJSONファイルへのパス +### バニティアドレス +- `--mint-keypair `: ランダム生成の代わりにコレクションアドレスとして使用するキーペアJSONファイルのパス。[バニティ公開鍵の生成](/ja/solana/grind-vanity-public-key)を参照。 + ## 例 1. インタラクティブウィザードを使用してコレクションを作成: @@ -61,6 +64,14 @@ mplx core collection create --name "My Collection" --uri "https://example.com/me mplx core collection create --files --image "./my-collection.png" --offchain "./metadata.json" ``` +4. バニティアドレスでコレクションを作成: +```bash +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-collection.json +``` + ## 出力 コマンドは作成が成功すると以下の情報を出力します: diff --git a/src/pages/ja/dev-tools/cli/toolbox/token-create.md b/src/pages/ja/dev-tools/cli/toolbox/token-create.md index e31cda480..cca477126 100644 --- a/src/pages/ja/dev-tools/cli/toolbox/token-create.md +++ b/src/pages/ja/dev-tools/cli/toolbox/token-create.md @@ -30,6 +30,7 @@ mplx toolbox token create --name "My Token" --symbol "TOKEN" --mint-amount 10000 - `--description `: トークンとその目的の説明 - `--image `: トークン画像ファイルへのパス(PNG、JPG、またはGIF) - `--speed-run`: 実行時間を測定するスピードランモードを有効化 +- `--mint-keypair `: トークンミントアドレスとして使用するキーペアJSONファイルのパス(バニティキー)。[バニティ公開鍵の生成](/ja/solana/grind-vanity-public-key)を参照。 ## 例 @@ -49,6 +50,15 @@ mplx toolbox token create \ --mint-amount 1000000 ``` +### バニティミントアドレスでトークンを作成 +```bash +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-mint.json +``` + ### ウィザードを使用してトークンを作成 ```bash mplx toolbox token create --wizard diff --git a/src/pages/ja/solana/grind-vanity-public-key.md b/src/pages/ja/solana/grind-vanity-public-key.md index eecfb8ecd..ee81d116d 100644 --- a/src/pages/ja/solana/grind-vanity-public-key.md +++ b/src/pages/ja/solana/grind-vanity-public-key.md @@ -209,27 +209,54 @@ solana balance ## Using Vanity Addresses with Metaplex -### Token Creation +After grinding a keypair, pass it to mint and create commands with `--mint-keypair`. Your configured wallet (`--keypair` or `mplx config wallets set`) still pays transaction fees and acts as the update authority. The vanity keypair only determines the mint or asset address. + +### Fungible Token ```bash -# Create a token with a vanity mint address -# First, grind the keypair -solana-keygen grind --starts-with COOL:1 +solana-keygen grind --starts-with COOL:1 --output-directory ./vanity-keys/ -# Use with MPLX CLI (specify as mint keypair) -mplx toolbox token-create --name "Cool Token" --symbol "COOL" +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-keys/COOL....json ``` -### NFT Collection +### Core Asset + +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` -When creating collections with the MPLX CLI, you can use a vanity address for your collection: +### Core Collection ```bash -# Grind collection address -solana-keygen grind --starts-with ART:1 +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json +``` + +### Token Metadata NFT -# Use in collection creation -mplx core create-collection --keypair ./ARTxyz....json +```bash +mplx tm create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-mint.json +``` + +### Bubblegum Collection + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json ``` ## Next Steps diff --git a/src/pages/ko/dev-tools/cli/core/create-asset.md b/src/pages/ko/dev-tools/cli/core/create-asset.md index d82d3cda2..c4ca4cf9d 100644 --- a/src/pages/ko/dev-tools/cli/core/create-asset.md +++ b/src/pages/ko/dev-tools/cli/core/create-asset.md @@ -45,6 +45,9 @@ mplx core asset create --wizard - `--plugins`: 대화형 플러그인 선택 사용 - `--pluginsFile `: 플러그인 데이터가 포함된 JSON 파일 경로 +### 바니티 주소 +- `--mint-keypair `: 무작위 생성 대신 자산 주소로 사용할 키페어 JSON 파일 경로. [바니티 공개키 생성](/ko/solana/grind-vanity-public-key) 참조. + ## 예시 1. 대화형 마법사를 사용하여 자산 생성: @@ -72,6 +75,14 @@ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json" mplx core asset create --files --image "./my-nft.png" --offchain "./metadata.json" --collection "collection_id_here" ``` +6. 바니티 주소로 자산 생성: +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` + ## 출력 명령어는 성공적으로 생성되면 다음 정보를 출력합니다: diff --git a/src/pages/ko/dev-tools/cli/core/create-collection.md b/src/pages/ko/dev-tools/cli/core/create-collection.md index ecfa03124..480ae278e 100644 --- a/src/pages/ko/dev-tools/cli/core/create-collection.md +++ b/src/pages/ko/dev-tools/cli/core/create-collection.md @@ -44,6 +44,9 @@ mplx core collection create --wizard - `--plugins`: 대화형 플러그인 선택 사용 - `--pluginsFile `: 플러그인 데이터가 포함된 JSON 파일 경로 +### 바니티 주소 +- `--mint-keypair `: 무작위 생성 대신 컬렉션 주소로 사용할 키페어 JSON 파일 경로. [바니티 공개키 생성](/ko/solana/grind-vanity-public-key) 참조. + ## 예시 1. 대화형 마법사를 사용하여 컬렉션 생성: @@ -61,6 +64,14 @@ mplx core collection create --name "My Collection" --uri "https://example.com/me mplx core collection create --files --image "./my-collection.png" --offchain "./metadata.json" ``` +4. 바니티 주소로 컬렉션 생성: +```bash +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-collection.json +``` + ## 출력 명령어는 성공적으로 생성되면 다음 정보를 출력합니다: diff --git a/src/pages/ko/dev-tools/cli/toolbox/token-create.md b/src/pages/ko/dev-tools/cli/toolbox/token-create.md index da81db9a8..a12efde5c 100644 --- a/src/pages/ko/dev-tools/cli/toolbox/token-create.md +++ b/src/pages/ko/dev-tools/cli/toolbox/token-create.md @@ -30,6 +30,7 @@ mplx toolbox token create --name "My Token" --symbol "TOKEN" --mint-amount 10000 - `--description `: 토큰과 그 목적에 대한 설명 - `--image `: 토큰 이미지 파일 경로 (PNG, JPG 또는 GIF) - `--speed-run`: 실행 시간을 측정하기 위한 스피드런 모드 활성화 +- `--mint-keypair `: 토큰 민트 주소로 사용할 키페어 JSON 파일 경로(바니티 키). [바니티 공개키 생성](/ko/solana/grind-vanity-public-key) 참조. ## 예시 @@ -49,6 +50,15 @@ mplx toolbox token create \ --mint-amount 1000000 ``` +### 바니티 민트 주소로 토큰 생성 +```bash +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-mint.json +``` + ### 마법사를 사용하여 토큰 생성 ```bash mplx toolbox token create --wizard diff --git a/src/pages/ko/solana/grind-vanity-public-key.md b/src/pages/ko/solana/grind-vanity-public-key.md index eecfb8ecd..ee81d116d 100644 --- a/src/pages/ko/solana/grind-vanity-public-key.md +++ b/src/pages/ko/solana/grind-vanity-public-key.md @@ -209,27 +209,54 @@ solana balance ## Using Vanity Addresses with Metaplex -### Token Creation +After grinding a keypair, pass it to mint and create commands with `--mint-keypair`. Your configured wallet (`--keypair` or `mplx config wallets set`) still pays transaction fees and acts as the update authority. The vanity keypair only determines the mint or asset address. + +### Fungible Token ```bash -# Create a token with a vanity mint address -# First, grind the keypair -solana-keygen grind --starts-with COOL:1 +solana-keygen grind --starts-with COOL:1 --output-directory ./vanity-keys/ -# Use with MPLX CLI (specify as mint keypair) -mplx toolbox token-create --name "Cool Token" --symbol "COOL" +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-keys/COOL....json ``` -### NFT Collection +### Core Asset + +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` -When creating collections with the MPLX CLI, you can use a vanity address for your collection: +### Core Collection ```bash -# Grind collection address -solana-keygen grind --starts-with ART:1 +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json +``` + +### Token Metadata NFT -# Use in collection creation -mplx core create-collection --keypair ./ARTxyz....json +```bash +mplx tm create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-mint.json +``` + +### Bubblegum Collection + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json ``` ## Next Steps diff --git a/src/pages/zh/dev-tools/cli/core/create-asset.md b/src/pages/zh/dev-tools/cli/core/create-asset.md index 2a6b63140..59a9eb555 100644 --- a/src/pages/zh/dev-tools/cli/core/create-asset.md +++ b/src/pages/zh/dev-tools/cli/core/create-asset.md @@ -45,6 +45,9 @@ mplx core asset create --wizard - `--plugins`: 使用交互式插件选择 - `--pluginsFile `: 包含插件数据的 JSON 文件路径 +### 虚荣地址 +- `--mint-keypair `: 用于资产地址的密钥对 JSON 文件路径,而不是随机生成。参见[生成虚荣公钥](/zh/solana/grind-vanity-public-key)。 + ## 示例 1. 使用交互式向导创建资产: @@ -72,6 +75,14 @@ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json" mplx core asset create --files --image "./my-nft.png" --offchain "./metadata.json" --collection "collection_id_here" ``` +6. 使用虚荣地址创建资产: +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` + ## 输出 成功创建后,命令将输出以下信息: diff --git a/src/pages/zh/dev-tools/cli/core/create-collection.md b/src/pages/zh/dev-tools/cli/core/create-collection.md index 32fa27e00..effc98a12 100644 --- a/src/pages/zh/dev-tools/cli/core/create-collection.md +++ b/src/pages/zh/dev-tools/cli/core/create-collection.md @@ -44,6 +44,9 @@ mplx core collection create --wizard - `--plugins`: 使用交互式插件选择 - `--pluginsFile `: 包含插件数据的 JSON 文件路径 +### 虚荣地址 +- `--mint-keypair `: 用于集合地址的密钥对 JSON 文件路径,而不是随机生成。参见[生成虚荣公钥](/zh/solana/grind-vanity-public-key)。 + ## 示例 1. 使用交互式向导创建集合: @@ -61,6 +64,14 @@ mplx core collection create --name "My Collection" --uri "https://example.com/me mplx core collection create --files --image "./my-collection.png" --offchain "./metadata.json" ``` +4. 使用虚荣地址创建集合: +```bash +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-collection.json +``` + ## 输出 成功创建后,命令将输出以下信息: diff --git a/src/pages/zh/dev-tools/cli/toolbox/token-create.md b/src/pages/zh/dev-tools/cli/toolbox/token-create.md index 97159902e..07ca11312 100644 --- a/src/pages/zh/dev-tools/cli/toolbox/token-create.md +++ b/src/pages/zh/dev-tools/cli/toolbox/token-create.md @@ -30,6 +30,7 @@ mplx toolbox token create --name "My Token" --symbol "TOKEN" --mint-amount 10000 - `--description `: 代币及其用途的描述 - `--image `: 代币图片文件路径(PNG、JPG 或 GIF) - `--speed-run`: 启用极速模式以测量执行时间 +- `--mint-keypair `: 用于代币铸造地址的密钥对 JSON 文件路径(虚荣地址)。参见[生成虚荣公钥](/zh/solana/grind-vanity-public-key)。 ## 示例 @@ -49,6 +50,15 @@ mplx toolbox token create \ --mint-amount 1000000 ``` +### 使用虚荣铸造地址创建代币 +```bash +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-mint.json +``` + ### 使用向导创建代币 ```bash mplx toolbox token create --wizard diff --git a/src/pages/zh/solana/grind-vanity-public-key.md b/src/pages/zh/solana/grind-vanity-public-key.md index eecfb8ecd..ee81d116d 100644 --- a/src/pages/zh/solana/grind-vanity-public-key.md +++ b/src/pages/zh/solana/grind-vanity-public-key.md @@ -209,27 +209,54 @@ solana balance ## Using Vanity Addresses with Metaplex -### Token Creation +After grinding a keypair, pass it to mint and create commands with `--mint-keypair`. Your configured wallet (`--keypair` or `mplx config wallets set`) still pays transaction fees and acts as the update authority. The vanity keypair only determines the mint or asset address. + +### Fungible Token ```bash -# Create a token with a vanity mint address -# First, grind the keypair -solana-keygen grind --starts-with COOL:1 +solana-keygen grind --starts-with COOL:1 --output-directory ./vanity-keys/ -# Use with MPLX CLI (specify as mint keypair) -mplx toolbox token-create --name "Cool Token" --symbol "COOL" +mplx toolbox token create \ + --name "Cool Token" \ + --symbol "COOL" \ + --mint-amount 1000000 \ + --mint-keypair ./vanity-keys/COOL....json ``` -### NFT Collection +### Core Asset + +```bash +mplx core asset create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-asset.json +``` -When creating collections with the MPLX CLI, you can use a vanity address for your collection: +### Core Collection ```bash -# Grind collection address -solana-keygen grind --starts-with ART:1 +mplx core collection create \ + --name "My Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json +``` + +### Token Metadata NFT -# Use in collection creation -mplx core create-collection --keypair ./ARTxyz....json +```bash +mplx tm create \ + --name "My NFT" \ + --uri "https://example.com/metadata.json" \ + --mint-keypair ./vanity-mint.json +``` + +### Bubblegum Collection + +```bash +mplx bg collection create \ + --name "My Compressed Collection" \ + --uri "https://example.com/collection.json" \ + --mint-keypair ./vanity-collection.json ``` ## Next Steps