-
Notifications
You must be signed in to change notification settings - Fork 56
docs: update and fix broken example #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@Bijoy99roy is attempting to deploy a commit to the Metaplex Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Summary by CodeRabbit
WalkthroughReplaced the generated-signer workflow with a keypair-based identity in the JavaScript Core NFT guide, updated logging and explorer links to use Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Guide as Doc Example
participant Umi as Umi Client
participant Wallet as Wallet File
rect rgb(220,235,255)
Note over Dev,Guide: Previous flow (signer-based)
Dev->>Guide: call generateSigner()
Guide->>Umi: umi.use(signerIdentity(generatedSigner))
Umi->>Umi: signer attached
Umi->>Umi: create asset (logs nftSigner.publicKey)
end
rect rgb(235,255,220)
Note over Dev,Guide: New flow (keypair-based)
Dev->>Wallet: read wallet JSON
Wallet->>Guide: create Keypair.fromSecretKey(...)
Guide->>Umi: umi.use(keypairIdentity(keypair))
Umi->>Umi: keypair identity attached
Umi->>Umi: create asset (logs asset.publicKey)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)src/pages/**/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-07-17T14:26:47.063ZApplied to files:
📚 Learning: 2025-07-17T14:20:54.727ZApplied to files:
🪛 LanguageToolsrc/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md[grammar] ~10-~10: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @Bijoy99roy, What was the purpose of changing from keypair identity to signer identity? With |
|
Hi @tonyboylehub , The original intention wasn't to change it from For the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md (1)
70-79: Missing import:keypairIdentityis used but not imported.Line 149 references
keypairIdentity(keypair)in the "With an Existing Wallet" section, but this function is not imported from@metaplex-foundation/umi. This will cause a runtime error.Add
keypairIdentityto the import statement:import { createGenericFile, generateSigner, + keypairIdentity, signerIdentity, sol, } from '@metaplex-foundation/umi'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md(10 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/pages/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Markdoc processes
.mdfiles in pages directory
Files:
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md
🧠 Learnings (2)
📚 Learning: 2025-07-17T14:26:47.063Z
Learnt from: MarkSackerberg
Repo: metaplex-foundation/developer-hub PR: 378
File: src/pages/core/plugins/freeze-execute.md:453-458
Timestamp: 2025-07-17T14:26:47.063Z
Learning: For MPL Core plugins, the create function (for assets) uses plugin structure without data wrapper (e.g., { type: 'FreezeExecute', frozen: false }), similar to createCollection, while addPlugin uses plugin structure with data wrapper (e.g., { type: 'FreezeExecute', data: { frozen: false } }).
Applied to files:
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md
📚 Learning: 2025-07-17T14:20:54.727Z
Learnt from: MarkSackerberg
Repo: metaplex-foundation/developer-hub PR: 378
File: src/pages/core/plugins/freeze-execute.md:169-178
Timestamp: 2025-07-17T14:20:54.727Z
Learning: For MPL Core plugins, createCollection uses plugin structure without data wrapper (e.g., { type: 'FreezeExecute', frozen: false }), while addPlugin uses plugin structure with data wrapper (e.g., { type: 'FreezeExecute', data: { frozen: false } }).
Applied to files:
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md
🪛 LanguageTool
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md
[grammar] ~10-~10: Ensure spelling is correct
Context: ...ore NFT Asset** using the Metaplex Core onchain program. {% callout title="What is Cor...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (1)
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md (1)
104-125: Verify: "With a New Wallet" section may not reflect stated changes.Per the PR review comments, the author (Bijoy99roy) acknowledged mistakenly introducing
signerIdentity()and stated they would revert those changes. However, the "With a New Wallet" section (lines 117–119) still uses thegenerateSigner()+signerIdentity()pattern. Please confirm whether this section was intentionally left unchanged or if additional fixes are needed.
| --- | ||
|
|
||
| This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core onchain program. | ||
| This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core onchain program. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Fix spelling: "onchain" should be "on-chain".
The standard convention uses a hyphen for the adjective form.
-This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core onchain program.
+This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core on-chain program.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core onchain program. | |
| This guide will demonstrate the use of the `@metaplex-foundation/mpl-core` Javascript SDK package to create a **Core NFT Asset** using the Metaplex Core on-chain program. |
🧰 Tools
🪛 LanguageTool
[grammar] ~10-~10: Ensure spelling is correct
Context: ...ore NFT Asset** using the Metaplex Core onchain program. {% callout title="What is Cor...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In
src/pages/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript.md
around line 10, the phrase "onchain" should be corrected to the hyphenated
adjective form "on‑chain"; update the sentence to use "on-chain program" to
follow standard convention and consistency across the docs.
Fixed sections:
Setting up umi With an Existing Wallet
The loaded keypair wasn't being used as a signer
Full Code Example
Variable
nftSignerwas being used in console log but wasn't used as asset signer