فهرست منبع

move playground

tonyboylehub 7 ماه پیش
والد
کامیت
338f05125a
31فایلهای تغییر یافته به همراه103 افزوده شده و 409 حذف شده
  1. 7 1
      src/components/Layout.jsx
  2. 5 5
      src/components/apiComponents/endPointSelector.jsx
  3. 0 50
      src/components/products/aura/index.js
  4. 5 5
      src/components/products/das-api/index.js
  5. 3 3
      src/lib/api/aura/das/getAssetProofs.js
  6. 3 3
      src/lib/api/aura/das/getAssets.js
  7. 4 4
      src/lib/api/aura/methods.js
  8. 14 0
      src/middleware.js
  9. 0 10
      src/pages/aura/api/v1/das/get-asset-batch.md
  10. 0 9
      src/pages/aura/api/v1/das/get-asset-proof-batch.md
  11. 0 10
      src/pages/aura/api/v1/das/get-asset-proof.md
  12. 0 9
      src/pages/aura/api/v1/das/get-asset.md
  13. 0 10
      src/pages/aura/api/v1/das/get-assets-by-authority.md
  14. 0 10
      src/pages/aura/api/v1/das/get-assets-by-creator.md
  15. 0 9
      src/pages/aura/api/v1/das/get-assets-by-group.md
  16. 0 9
      src/pages/aura/api/v1/das/get-assets-by-owner.md
  17. 0 9
      src/pages/aura/api/v1/das/get-signatures-for-asset.md
  18. 0 9
      src/pages/aura/api/v1/das/get-token-accounts.md
  19. 0 9
      src/pages/aura/api/v1/das/search-assets.md
  20. 0 8
      src/pages/aura/api/v1/testApiMethod.md
  21. 5 19
      src/pages/das-api/methods/get-asset-proof.md
  22. 5 22
      src/pages/das-api/methods/get-asset-proofs.md
  23. 4 19
      src/pages/das-api/methods/get-asset-signatures.md
  24. 4 19
      src/pages/das-api/methods/get-asset.md
  25. 6 22
      src/pages/das-api/methods/get-assets-by-authority.md
  26. 6 24
      src/pages/das-api/methods/get-assets-by-creator.md
  27. 6 23
      src/pages/das-api/methods/get-assets-by-group.md
  28. 6 23
      src/pages/das-api/methods/get-assets-by-owner.md
  29. 15 33
      src/pages/das-api/methods/get-assets.md
  30. 4 22
      src/pages/das-api/methods/search-assets.md
  31. 1 1
      src/shared/usePage.js

+ 7 - 1
src/components/Layout.jsx

@@ -112,6 +112,10 @@ export function Layout({ children, page }) {
         </div>
 
         {/* Table of contents. */}
+        {/* <pre>
+          {JSON.stringify(page.tableOfContents, null, 2)}
+        </pre> */}
+        {page.tableOfContents.length === 0 ? "" :
         <div
           className={clsx(
             'hidden',
@@ -120,10 +124,12 @@ export function Layout({ children, page }) {
               : 'lg:sticky lg:top-[7rem] lg:-mr-6 lg:block lg:h-[calc(100vh-7rem)] lg:flex-none lg:overflow-y-auto lg:py-16 lg:pr-6'
           )}
         >
-          <TableOfContent
+           <TableOfContent
             tableOfContents={page.tableOfContents}
           ></TableOfContent>
+          
         </div>
+}
       </div>
     </>
   )

+ 5 - 5
src/components/apiComponents/endPointSelector.jsx

@@ -6,19 +6,19 @@ import { useState } from 'react'
 export const endpoints = {
   solanaMainnet: {
     name: 'Solana Mainnet',
-    uri: 'https://aura-mainnet.metaplex.com',
+    uri: 'https://api.mainnet-beta.solana.com',
     value: 'solanaMainnet',
   },
   solanaDevnet: {
     name: 'Solana Devnet',
-    uri: 'https://aura-devnet.metaplex.com',
+    uri: 'https://api.devnet.solana.com',
     value: 'solanaDevnet',
   },
   eclipseAuraMainnet: {
     name: 'Eclipse Mainnet',
-    uri: 'https://aura-eclipse-mainnet.metaplex.com',
-    value: 'eclipseAuraMainnet',
-    value: 'eclipseAuraMainnet',
+    uri: 'https://mainnetbeta-rpc.eclipse.xyz',
+    value: 'eclipseMainnet',
+    value: 'eclipseMainnet',
   },
   custom: {
     name: 'Custom',

+ 0 - 50
src/components/products/aura/index.js

@@ -49,56 +49,6 @@ export const aura = {
               href: '/aura/batch-minting',
             },
           ],
-        },
-        {
-          title: 'DAS Methods',
-          collapsed: true,
-          links: [
-            {
-              title: 'Get Asset',
-              href: '/aura/api/v1/das/get-asset',
-            },
-            {
-              title: 'Get Asset Batch',
-              href: '/aura/api/v1/das/get-asset-batch',
-            },
-            {
-              title: 'Get Asset Proof',
-              href: '/aura/api/v1/das/get-asset-proof',
-            },
-            {
-              title: 'Get Asset Proof Batch',
-              href: '/aura/api/v1/das/get-asset-proof-batch',
-            },
-            {
-              title: 'Get Assets by Owner',
-              href: '/aura/api/v1/das/get-assets-by-owner',
-            },
-            {
-              title: 'Get Assets by Authority',
-              href: '/aura/api/v1/das/get-assets-by-authority',
-            },
-            {
-              title: 'Get Assets By Creator',
-              href: '/aura/api/v1/das/get-assets-by-creator',
-            },
-            {
-              title: 'Get Assets By Group',
-              href: '/aura/api/v1/das/get-assets-by-group',
-            },
-            {
-              title: 'Get Signatures For Asset',
-              href: '/aura/api/v1/das/get-signatures-for-asset',
-            },
-            {
-              title: 'Get Token Accounts',
-              href: '/aura/api/v1/das/get-token-accounts',
-            },
-            {
-              title: 'Search Assets',
-              href: '/aura/api/v1/das/search-assets',
-            },
-          ],
         }
       ],
     },

+ 5 - 5
src/components/products/das-api/index.js

@@ -1,8 +1,8 @@
 import {
-    changelogSection,
-    documentationSection,
-    recipesSection,
-    referencesSection,
+  changelogSection,
+  documentationSection,
+  recipesSection,
+  referencesSection,
 } from '@/shared/sections'
 import { TableCellsIcon } from '@heroicons/react/24/solid'
 import { Hero } from './Hero'
@@ -47,7 +47,7 @@ export const das = {
           ],
         },
         {
-          title: 'Core Extension',
+          title: 'Core Extension SDK',
           links: [
             { title: 'Extension Overview', href: '/das-api/core-extension' },
             { title: 'Get Core Asset', href: '/das-api/core-extension/methods/get-asset' },

+ 3 - 3
src/lib/api/aura/das/getAssetProofBatch.js → src/lib/api/aura/das/getAssetProofs.js

@@ -1,7 +1,7 @@
-const getAssetProofBatch = {
+const getAssetProofs = {
   description:
     'Get the proof of a compressed Digital Asset NFT (cNFT) by its ID',
-  method: 'getAssetProofBatch',
+  method: 'getAssetProofs',
   params: [
     {
       type: 'array',
@@ -14,4 +14,4 @@ const getAssetProofBatch = {
   ],
 }
 
-export default getAssetProofBatch
+export default getAssetProofs

+ 3 - 3
src/lib/api/aura/das/getAssetBatch.js → src/lib/api/aura/das/getAssets.js

@@ -1,6 +1,6 @@
-const getAssetBatch = {
+const getAssets = {
   description: 'Get an asset by its ID',
-  method: 'getAssetBatch',
+  method: 'getAssets',
   params: [
     {
       type: 'array',
@@ -386,4 +386,4 @@ const getAssetBatch = {
   }
 }
 
-export default getAssetBatch
+export default getAssets

+ 4 - 4
src/lib/api/aura/methods.js

@@ -1,8 +1,8 @@
 import getAssetsByAuthority from './das/getAssestByAuthority'
 import getAsset from './das/getAsset'
-import getAssetBatch from './das/getAssetBatch'
 import getAssetProof from './das/getAssetProof'
-import getAssetProofBatch from './das/getAssetProofBatch'
+import getAssetProofs from './das/getAssetProofs'
+import getAssets from './das/getAssets'
 import getAssetsByCreator from './das/getAssetsByCreator'
 import getAssetsByGroup from './das/getAssetsByGroup'
 import getAssetsByOwner from './das/getAssetsByOwner'
@@ -21,8 +21,8 @@ const apiMethods = {
   getAssetsByCreator: getAssetsByCreator,
   getAssetsByGroup: getAssetsByGroup,
   getAssetsByOwner: getAssetsByOwner,
-  getAssetBatch: getAssetBatch,
-  getAssetProofBatch: getAssetProofBatch,
+  getAssets: getAssets,
+  getAssetProofs: getAssetProofs,
   searchAssets: searchAssets,
   getSignaturesForAsset: getSignaturesForAsset,
   getTokenAccounts: getTokenAccounts,

+ 14 - 0
src/middleware.js

@@ -33,6 +33,19 @@ const redirectRules = {
     'guides/mpl-404-hyrbid-ui-template':
       '/mpl-hybrid/guides/mpl-404-hybrid-ui-template',
   },
+  '/aura': {
+    '/api/v1/das/get-asset': '/das-api/methods/get-asset',
+    '/api/v1/das/get-asset-batch': '/das-api/methods/get-assets',
+    '/api/v1/das/get-asset-proof': '/das-api/methods/get-asset-proof',
+    '/api/v1/das/get-asset-proof-batch': '/das-api/methods/get-asset-proofs',
+    '/api/v1/das/get-assets-by-owner': '/das-api/methods/get-assets-by-owner',
+    '/api/v1/das/get-assets-by-authority': '/das-api/methods/get-assets-by-authority',
+    '/api/v1/das/get-assets-by-creator': '/das-api/methods/get-assets-by-creator',
+    '/api/v1/das/get-assets-by-group': '/das-api/methods/get-assets-by-group',
+    '/api/v1/das/get-signatures-for-asset': '/das-api/methods/get-asset-signatures',
+    '/api/v1/das/get-token-accounts': '/das-api/methods/get-token-accounts',
+    '/api/v1/das/search-assets': '/das-api/methods/search-assets',
+  },
 }
 
 export function middleware(request) {
@@ -66,5 +79,6 @@ export const config = {
     '/guides/javascript/how-to-create-an-spl-token-on-solana',
     '/core-candy-machine/:path*',
     '/bubblegum/:path*',
+    '/aura/:path*',
   ],
 }

+ 0 - 10
src/pages/aura/api/v1/das/get-asset-batch.md

@@ -1,10 +0,0 @@
----
-title: Get Asset Batch
-metaTitle: Get Asset Batch Method | Aura API
-description: Learn about the Get Asset Batch Aura API Method.
----
-
-Fetch a batch of NFT Digital Assets from the Solana blockchain including NFTs, pNFTs, cNFTs.
-
-{% apiRenderer method="getAssetBatch" /%}
-

+ 0 - 9
src/pages/aura/api/v1/das/get-asset-proof-batch.md

@@ -1,9 +0,0 @@
----
-title: Get Asset Proof Batch
-metaTitle: Get Asset Proof Batch Method | Aura API
-description: Learn about the Get Asset Proof Batch Aura API Method.
----
-
-Fetch a batch of Compressed NFT Digital Asset (cNFT) Proofs Metaplex Aura DAS API.
-
-{% apiRenderer method="getAssetProofBatch" /%}

+ 0 - 10
src/pages/aura/api/v1/das/get-asset-proof.md

@@ -1,10 +0,0 @@
----
-title: Get Asset Proof
-metaTitle: Get Asset Proof Method | Aura API
-description: Learn about the GetAsset Aura API Method.
----
-
-Fetch the proof of a Compressed NFT Digital Asset (cNFT) with Aura DAS API.
-
-{% apiRenderer method="getAssetProof" /%}
-

+ 0 - 9
src/pages/aura/api/v1/das/get-asset.md

@@ -1,9 +0,0 @@
----
-title: Get Asset
-metaTitle: Get Asset Method | Aura API
-description: Learn about the Get Asset Aura API Method.
----
-
-Fetch an NFT Digital Asset from the Solana blockchain including NFTs, pNFTs, cNFTs.
-
-{% apiRenderer method="getAsset" /%}

+ 0 - 10
src/pages/aura/api/v1/das/get-assets-by-authority.md

@@ -1,10 +0,0 @@
----
-title: Get Assets by Authority
-metaTitle: Get Assets by Authority Method | Aura API
-description: Learn about the Get Assets by Authority Aura API Method.
----
-
-Returns the list of assets given an authority address.
-
-{% apiRenderer method="getAssetsByAuthority" /%}
-

+ 0 - 10
src/pages/aura/api/v1/das/get-assets-by-creator.md

@@ -1,10 +0,0 @@
----
-title: Get Assets by Creator
-metaTitle: Get Assets by Creator Method | Aura API
-description: Learn about the Get Assets by Creator Aura API Method.
----
-
-Returns a list of assets based on a given creator address.
-
-{% apiRenderer method="getAssetsByCreator" /%}
-

+ 0 - 9
src/pages/aura/api/v1/das/get-assets-by-group.md

@@ -1,9 +0,0 @@
----
-title: Get Assets by Group
-metaTitle: Get Assets by Group Method | Aura API
-description: Learn about the Get Assets by Group Aura API Method.
----
-
-Return the list of assets given a group (key, value) pair. For example this can be used to get all assets in a collection.
-
-{% apiRenderer method="getAssetsByGroup" /%}

+ 0 - 9
src/pages/aura/api/v1/das/get-assets-by-owner.md

@@ -1,9 +0,0 @@
----
-title: Get Assets by Owner
-metaTitle: Get Assets by Owner Method | Aura API
-description: Learn about the Get Assets by Owner Aura API Method.
----
-
-Return a list of assets owned by a particular public key.
-
-{% apiRenderer method="getAssetsByOwner" /%}

+ 0 - 9
src/pages/aura/api/v1/das/get-signatures-for-asset.md

@@ -1,9 +0,0 @@
----
-title: Get Signatures For Asset
-metaTitle: Get Signatures For Asset | Aura API
-description: Learn about the Get Signatures For Asset Aura API Method.
----
-
-Search and return a list of signatures associated with a Compressed NFT Digital Asset (cNFT).
-
-{% apiRenderer method="getSignaturesForAsset" /%}

+ 0 - 9
src/pages/aura/api/v1/das/get-token-accounts.md

@@ -1,9 +0,0 @@
----
-title: Get Token Accounts
-metaTitle: Get Token Accounts | Aura API
-description: Learn about the Get Token Accounts Aura API Method.
----
-
-Search and return a list of token accounts based on criteria.
-
-{% apiRenderer method="getTokenAccounts" /%}

+ 0 - 9
src/pages/aura/api/v1/das/search-assets.md

@@ -1,9 +0,0 @@
----
-title: Search Asset
-metaTitle: Search Asset Method | Aura API
-description: Learn about the Search Asset Aura API Method.
----
-
-Return the list of assets given a search criteria.
-
-{% apiRenderer method="searchAssets" /%}

+ 0 - 8
src/pages/aura/api/v1/testApiMethod.md

@@ -1,8 +0,0 @@
----
-title: Test Api Method
-metaTitle: Test Api Method | Aura Api
-description: Learn how Batch Minting works.
----
-
-
-{% apiRenderer method="testApiMethod" /%}

+ 5 - 19
src/pages/das-api/methods/get-asset-proof.md

@@ -2,6 +2,7 @@
 title: Get Asset Proof
 metaTitle: Get Asset Proof | DAS API
 description: Returns the merkle tree proof information for a compressed asset
+tableOfContents: false
 ---
 
 Returns the merkle tree proof information for a compressed asset.
@@ -12,10 +13,8 @@ Returns the merkle tree proof information for a compressed asset.
 | --------------- | :------: | ------------------------------------------ |
 | `id`            |    ✅    | The id of the asset.                       |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetProof Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -31,21 +30,8 @@ console.log(proof);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetProof",
-    "params": [
-      "Ez6ezCMkRaUkWS5v6WVcP7uuCWiKadr3W2dHFkoZmteW"
-    ],
-    "id": 0
-}'
-```
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+## Playground
+
+{% apiRenderer method="getAssetProof" /%}

+ 5 - 22
src/pages/das-api/methods/get-asset-proofs.md

@@ -2,6 +2,7 @@
 title: Get Asset Proofs
 metaTitle: Get Asset Proofs | DAS API
 description: Returns the merkle tree proof information for multiple compressed assets
+tableOfContents: false
 ---
 
 Returns the merkle tree proof information for multiple compressed assets. This method is used to verify the authenticity of compressed NFTs by retrieving their merkle proofs.
@@ -12,10 +13,8 @@ Returns the merkle tree proof information for multiple compressed assets. This m
 | --------------- | :------: | ------------------------------------------ |
 | `ids`           |    ✅    | An array of asset ids to get proofs for.   |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetProofs Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -34,24 +33,8 @@ console.log(assets);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetProofs",
-    "params": [
-      [
-        "GGRbPQhwmo3dXBkJSAjMFc1QYTKGBt8qc11tTp3LkEKA",
-        "ELDjRRs5Wb478K4h3B5bMPEhqFD8FvoET5ctHku5uiYi"
-      ]
-    ],
-    "id": 0
-}'
-```
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %} 
+## Playground
+
+{% apiRenderer method="getAssetProofs" /%}

+ 4 - 19
src/pages/das-api/methods/get-asset-signatures.md

@@ -2,6 +2,7 @@
 title: Get Asset Signatures
 metaTitle: Get Asset Signatures | DAS API
 description: Returns the transaction signatures for compressed assets
+tableOfContents: false
 ---
 
 Returns the transaction signatures associated with a compressed asset. You can identify the asset either by its ID or by its tree and leaf index.
@@ -20,10 +21,8 @@ Returns the transaction signatures associated with a compressed asset. You can i
 | `cursor`        |          | The cursor of the signatures.               |
 | `sortDirection` |          | Sort direction. Can be either "asc" or "desc". |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetSignatures Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -44,21 +43,7 @@ console.log(assets);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetSignaturesV2",
-    "params": {
-        "id": "GGRbPQhwmo3dXBkJSAjMFc1QYTKGBt8qc11tTp3LkEKA"
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %} 
+{% apiRenderer method="getSignaturesForAsset" /%}

+ 4 - 19
src/pages/das-api/methods/get-asset.md

@@ -2,6 +2,7 @@
 title: Get Asset
 metaTitle: Get Asset | DAS API
 description: Returns the information of a compressed/standard asset
+tableOfContents: false
 ---
 
 Returns the information of a compressed/standard asset including metadata and owner.
@@ -12,10 +13,8 @@ Returns the information of a compressed/standard asset including metadata and ow
 | --------------- | :------: | ------------------------------------------ |
 | `id`            |    ✅    | The id of the asset.                       |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAsset Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -31,21 +30,7 @@ console.log(asset);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAsset",
-    "params": [
-      "8vw7tdLGE3FBjaetsJrZAarwsbc8UESsegiLyvWXxs5A"
-    ],
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="getAsset" /%}

+ 6 - 22
src/pages/das-api/methods/get-asset-by-authority.md → src/pages/das-api/methods/get-assets-by-authority.md

@@ -1,7 +1,8 @@
 ---
-title: Get Asset By Authority
-metaTitle: Get Asset By Authority | DAS API
+title: Get Assets By Authority
+metaTitle: Get Assets By Authority | DAS API
 description: Returns the list of assets given an authority address
+tableOfContents: false
 ---
 
 Returns the list of assets given an authority address.
@@ -18,10 +19,8 @@ Returns the list of assets given an authority address.
 | `after`            |          | Retrieve assets after the specified ID.    |
 
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetByAuthority Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -46,22 +45,7 @@ console.log(assets.items.length > 0);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetsByAuthority",
-    "params": {
-        "authorityAddress": "mRdta4rc2RtsxEUDYuvKLamMZAdW6qHcwuq866Skxxv",
-        "page": 1
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="getAssetsByAuthority" /%}

+ 6 - 24
src/pages/das-api/methods/get-asset-by-creator.md → src/pages/das-api/methods/get-assets-by-creator.md

@@ -1,7 +1,8 @@
 ---
-title: Get Asset By Creator
-metaTitle: Get Asset By Creator | DAS API
+title: Get Assets By Creator
+metaTitle: Get Assets By Creator | DAS API
 description: Returns the list of assets given a creator address
+tableOfContents: false
 ---
 
 Return the list of assets given a creator address.
@@ -23,10 +24,8 @@ We recommend to fetch data with `onlyVerified: true` to make sure the asset actu
 | `after`            |          | Retrieve assets after the specified ID.    |
 
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetByCreator Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -46,24 +45,7 @@ console.log(assets.items.length > 0);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetsByCreator",
-    "params": {
-        "creatorAddress": "D3XrkNZz6wx6cofot7Zohsf2KSsu2ArngNk8VqU9cTY3",
-        "onlyVerified": false,
-        "limit": 10,
-        "page": 1
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="getAssetsByCreator" /%}

+ 6 - 23
src/pages/das-api/methods/get-asset-by-group.md → src/pages/das-api/methods/get-assets-by-group.md

@@ -1,7 +1,8 @@
 ---
-title: Get Asset By Group
-metaTitle: Get Asset By Group | DAS API
+title: Get Assets By Group
+metaTitle: Get Assets By Group | DAS API
 description: Return the list of assets given a group (key, value) pair
+tableOfContents: false
 ---
 
 Return the list of assets given a group (key, value) pair. For example this can be used to get all assets in a collection.
@@ -18,10 +19,8 @@ Return the list of assets given a group (key, value) pair. For example this can
 | `before`           |          | Retrieve assets before the specified ID.   |
 | `after`            |          | Retrieve assets after the specified ID.    |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetByGroup Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -39,23 +38,7 @@ console.log(assets.items.length > 0);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetsByGroup",
-    "params": {
-        "groupKey": "collection",
-        "groupValue": "J2ZfLdQsaZ3GCmbucJef3cPnPwGcgjDW1SSYtMdq3L9p",
-        "page": 1
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="getAssetsByGroup" /%}

+ 6 - 23
src/pages/das-api/methods/get-asset-by-owner.md → src/pages/das-api/methods/get-assets-by-owner.md

@@ -1,7 +1,8 @@
 ---
-title: Get Asset By Owner
-metaTitle: Get Asset By Owner | DAS API
+title: Get Assets By Owner
+metaTitle: Get Assets By Owner | DAS API
 description: Return the list of assets given an owner address
+tableOfContents: false
 ---
 
 Return the list of assets given an owner address.
@@ -17,10 +18,8 @@ Return the list of assets given an owner address.
 | `before`           |          | Retrieve assets before the specified ID.   |
 | `after`            |          | Retrieve assets after the specified ID.    |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssetByOwner Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -39,23 +38,7 @@ console.log(assets.items.length > 0);
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssetsByOwner",
-    "params": {
-        "ownerAddress": "N4f6zftYsuu4yT7icsjLwh4i6pB1zvvKbseHj2NmSQw",
-        "limit": 10,
-        "page": 1
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="getAssetsByOwner" /%}

+ 15 - 33
src/pages/das-api/methods/get-assets.md

@@ -2,56 +2,38 @@
 title: Get Assets
 metaTitle: Get Assets | DAS API
 description: Returns the information of multiple compressed/standard assets
+tableOfContents: false
 ---
 
 Returns the information of multiple compressed/standard assets including their metadata and owners.
 
 ## Parameters
 
-| Name            | Required | Description                                |
-| --------------- | :------: | ------------------------------------------ |
-| `ids`           |    ✅    | An array of asset ids.                     |
+| Name  | Required | Description            |
+| ----- | :------: | ---------------------- |
+| `ids` |    ✅    | An array of asset ids. |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="getAssets Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
-import { publicKey } from '@metaplex-foundation/umi';
-import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
-import { dasApi } from '@metaplex-foundation/digital-asset-standard-api';
+import { publicKey } from '@metaplex-foundation/umi'
+import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
+import { dasApi } from '@metaplex-foundation/digital-asset-standard-api'
 
-const umi = createUmi('<ENDPOINT>').use(dasApi());
+const umi = createUmi('<ENDPOINT>').use(dasApi())
 const assetIds = [
   publicKey('GGRbPQhwmo3dXBkJSAjMFc1QYTKGBt8qc11tTp3LkEKA'),
-  publicKey('8bFQbnBrzeiYQabEJ1ghy5T7uFpqFzPjUGsVi3SzSMHB')
-];
+  publicKey('8bFQbnBrzeiYQabEJ1ghy5T7uFpqFzPjUGsVi3SzSMHB'),
+]
 
-const assets = await umi.rpc.getAssets(assetIds);
-console.log(assets);
+const assets = await umi.rpc.getAssets(assetIds)
+console.log(assets)
 ```
 
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "getAssets",
-    "params": [
-      [
-        "GGRbPQhwmo3dXBkJSAjMFc1QYTKGBt8qc11tTp3LkEKA",
-        "8bFQbnBrzeiYQabEJ1ghy5T7uFpqFzPjUGsVi3SzSMHB"
-      ]
-    ],
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %} 
+{% apiRenderer method="getAssets" /%}

+ 4 - 22
src/pages/das-api/methods/search-assets.md

@@ -2,6 +2,7 @@
 title: Search Assets
 metaTitle: Search Assets | DAS API
 description: Return the list of assets given a search criteria
+tableOfContents: false
 ---
 
 Return the list of assets given a search criteria.
@@ -36,10 +37,8 @@ Return the list of assets given a search criteria.
 | `after`             |          | Retrieve assets after the specified ID.    |
 | `jsonUri`           |          | The value for the JSON URI.  |
 
-## Example
+## UMI w/ DAS SDK
 
-{% dialect-switcher title="searchAssets Example" %}
-{% dialect title="JavaScript" id="js" %}
 {% totem %}
 
 ```js
@@ -55,25 +54,8 @@ const assets = await umi.rpc.searchAssets({
 });
 console.log(assets.items.length == 1);
 ```
-
 {% /totem %}
-{% /dialect %}
-{% dialect title="cURL" id="curl" %}
-{% totem %}
 
-```sh
-curl --request POST --url "<ENDPOINT>" --header 'Content-Type: application/json' --data '{
-    "jsonrpc": "2.0",
-    "method": "searchAssets",
-    "params": {
-        "ownerAddress": "N4f6zftYsuu4yT7icsjLwh4i6pB1zvvKbseHj2NmSQw",
-        "jsonUri": "https://arweave.net/c9aGs5fOk7gD4wWnSvmzeqgtfxAGRgtI1jYzvl8-IVs/chiaki-violet-azure-common.json",
-        "page": 1
-    },
-    "id": 0
-}'
-```
+## Playground
 
-{% /totem %}
-{% /dialect %}
-{% /dialect-switcher %}
+{% apiRenderer method="searchAssets" /%}

+ 1 - 1
src/shared/usePage.js

@@ -21,7 +21,7 @@ export function usePage(pageProps) {
     activeHero,
     activeSection,
     isIndexPage: product?.path ? pathname === `/${product.path}` : false,
-    tableOfContents: pageProps.markdoc?.content
+    tableOfContents: pageProps.markdoc?.frontmatter.tableOfContents != false && pageProps.markdoc?.content
       ? parseTableOfContents(pageProps.markdoc.content)
       : [],
   }