Skip to content

Commit

Permalink
fix asset hub docs (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksandre authored Jan 15, 2025
1 parent 04cf437 commit 61070a8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/build/sdk/v2/asset-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,21 @@ const item = await assetHub.nftsPallet.item.mint({
collectionId,
itemId: 10,
mintTo: bob.address,
witnessData: {},
});
```

This code mints an NFT with itemId 10 and assigns it to `bob.address`.
This code mints an NFT with `itemId` 10 and assigns it to `bob.address`.

#### Setting metadata and attributes

Enhance your NFTs by adding metadata and attributes.

```ts:no-line-numbers
await assetHub.nftsPallet.metadata.setForItem({ collectionId, itemId: 10, data: "QmRKs2ZfuwvmZA3QAWmCqrGUjV9pxtBUDP3wuc6iVGnjA2" });
await unq.nftsPallet.item.setMetadata({
collectionId,
itemId,
data: "metadata",
});
await assetHub.nftsPallet.attributes.set({
collectionId,
Expand Down Expand Up @@ -156,7 +159,7 @@ const metadataTx = await assetHub.uniquesPallet.attributes.setAssetMetadata({
Note that the asset's metadata is mutable until the asset is frozen.

```ts:no-line-numbers
const attributeTx = await assetHub.uniquesPallet.attributes.setAssetAttribute(
const attributeTx = await assetHub.uniquesPallet.asset.setAttribute(
{
collectionId,
assetId,
Expand Down

0 comments on commit 61070a8

Please sign in to comment.