From 251fb84c93d6f1a61088ed37dd6ff297bdf7d1ad Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Sun, 10 Dec 2023 23:10:11 +0100 Subject: [PATCH 1/8] Add Project how-to --- .../docs/products/project/how-to/create-project.md | 14 ++++++++++++++ docs/docusaurus.config.js | 1 + docs/package.json | 1 + docs/sidebars.js | 9 ++++++++- docs/yarn.lock | 8 ++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 docs/docs/products/project/how-to/create-project.md diff --git a/docs/docs/products/project/how-to/create-project.md b/docs/docs/products/project/how-to/create-project.md new file mode 100644 index 0000000000..d7148ef74b --- /dev/null +++ b/docs/docs/products/project/how-to/create-project.md @@ -0,0 +1,14 @@ +--- +title: Create Project +description: How to create a project +keywords: + - project + - client +--- + +The first thing to do, before creating NFT collections, token and more, should be creating a project with the `createProject` function. + +```js reference +https://github.com/build-5/portal-angular-example/blob/master/demos/demoCreateProjectAndTradeToken.ts#L31 +``` + diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 3e2db41e8d..6c2aa60286 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -102,6 +102,7 @@ const config = { }), ], ], + themes: ['@saucelabs/theme-github-codeblock'], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ diff --git a/docs/package.json b/docs/package.json index a97f4fe433..3e3c3f20ea 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,6 +21,7 @@ "@docusaurus/plugin-content-pages": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22", + "@saucelabs/theme-github-codeblock": "^0.2.3", "clsx": "^1.2.1", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", diff --git a/docs/sidebars.js b/docs/sidebars.js index 453f3d95f7..ec166c65c2 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -48,7 +48,14 @@ const sidebars = { 'Member API': ['products/member/overview'], }, { - 'Project API': ['products/project/overview'], + 'Project API': [ + 'products/project/overview', + { + 'How To': [ + 'products/project/how-to/create-project', + ], + } + ], }, { 'Proposal API': ['products/proposal/overview'], diff --git a/docs/yarn.lock b/docs/yarn.lock index b67324b89a..0ad42c2563 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2767,6 +2767,13 @@ __metadata: languageName: node linkType: hard +"@saucelabs/theme-github-codeblock@npm:^0.2.3": + version: 0.2.3 + resolution: "@saucelabs/theme-github-codeblock@npm:0.2.3" + checksum: d09580bba2049e021558c0487ee0555ec48746248a058ea754c086462e9111852fc76a3fe54bce1f78d391674d7aa777e217c36eec2b5d144c626e9179212164 + languageName: node + linkType: hard + "@sideway/address@npm:^4.1.3": version: 4.1.4 resolution: "@sideway/address@npm:4.1.4" @@ -5169,6 +5176,7 @@ __metadata: "@docusaurus/plugin-content-pages": "npm:^2.4.1" "@docusaurus/preset-classic": "npm:2.4.1" "@mdx-js/react": "npm:^1.6.22" + "@saucelabs/theme-github-codeblock": "npm:^0.2.3" "@tsconfig/docusaurus": "npm:^1.0.5" clsx: "npm:^1.2.1" docusaurus-plugin-typedoc: "npm:^0.19.2" From 79733b9325ceda487aecbfe6ac3ec1073657360c Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Sun, 10 Dec 2023 23:40:34 +0100 Subject: [PATCH 2/8] Rename getting_started --- docs/docs/{getting_started.md => getting_started.mdx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/docs/{getting_started.md => getting_started.mdx} (100%) diff --git a/docs/docs/getting_started.md b/docs/docs/getting_started.mdx similarity index 100% rename from docs/docs/getting_started.md rename to docs/docs/getting_started.mdx From 0c636371cc6b382685826e33c640dfa518f535c5 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Sun, 10 Dec 2023 23:45:27 +0100 Subject: [PATCH 3/8] Add client lib to getting started --- docs/docs/getting_started.mdx | 13 ++++++++++++- docs/docusaurus.config.js | 7 ++++++- docs/package.json | 1 + docs/yarn.lock | 21 ++++++++++++++++++++- 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/docs/getting_started.mdx b/docs/docs/getting_started.mdx index d73efe0c04..bc53a36d80 100644 --- a/docs/docs/getting_started.mdx +++ b/docs/docs/getting_started.mdx @@ -10,7 +10,18 @@ keywords: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Build.5 API provides various ways to interact with our platform. Of course, you can read IOTA/Shimmer directly or use our friendly APIs to simplify access. +Build.5 API provides various ways to interact with our platform. Of course, you can read IOTA/Shimmer directly or use our friendly APIs or the Build.5 library directly to simplify access. + +## library + +The recommend way to interact with Build.5 is to use our library. Just add it to your project and get startet: + +```bash npm2yarn +npm i @build-5/client +npm i @build-5/interfaces +``` + +## API There are REST APIs to simplify read and write operations. See following: - [GET](search-get) - Use this APIs to get any data from Build.5 diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 6c2aa60286..191afaa936 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -91,7 +91,12 @@ const config = { 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ ({ - docs: { sidebarPath: require.resolve('./sidebars.js') }, + docs: { + sidebarPath: require.resolve('./sidebars.js'), + remarkPlugins: [ + [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}], + ], + }, blog: false, pages: { path: 'src/pages', diff --git a/docs/package.json b/docs/package.json index 3e3c3f20ea..abcf1cffc9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,6 +20,7 @@ "@docusaurus/plugin-content-docs": "^2.4.1", "@docusaurus/plugin-content-pages": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", + "@docusaurus/remark-plugin-npm2yarn": "^2.4.1", "@mdx-js/react": "^1.6.22", "@saucelabs/theme-github-codeblock": "^0.2.3", "clsx": "^1.2.1", diff --git a/docs/yarn.lock b/docs/yarn.lock index 0ad42c2563..1749171114 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2299,6 +2299,17 @@ __metadata: languageName: node linkType: hard +"@docusaurus/remark-plugin-npm2yarn@npm:^2.4.1": + version: 2.4.3 + resolution: "@docusaurus/remark-plugin-npm2yarn@npm:2.4.3" + dependencies: + npm-to-yarn: "npm:^2.0.0" + tslib: "npm:^2.4.1" + unist-util-visit: "npm:^2.0.3" + checksum: e80fe27f9d366154686c3db6328d37871d192ef6dbc0762f75852b9705cb1d193832aa74ba73cff375c175845f84c05a202165d17f2f2a2f9c525ecf4aa51f8b + languageName: node + linkType: hard + "@docusaurus/theme-classic@npm:2.4.1": version: 2.4.1 resolution: "@docusaurus/theme-classic@npm:2.4.1" @@ -5175,6 +5186,7 @@ __metadata: "@docusaurus/plugin-content-docs": "npm:^2.4.1" "@docusaurus/plugin-content-pages": "npm:^2.4.1" "@docusaurus/preset-classic": "npm:2.4.1" + "@docusaurus/remark-plugin-npm2yarn": "npm:^2.4.1" "@mdx-js/react": "npm:^1.6.22" "@saucelabs/theme-github-codeblock": "npm:^0.2.3" "@tsconfig/docusaurus": "npm:^1.0.5" @@ -8001,6 +8013,13 @@ __metadata: languageName: node linkType: hard +"npm-to-yarn@npm:^2.0.0": + version: 2.1.0 + resolution: "npm-to-yarn@npm:2.1.0" + checksum: c2a406b74d12cf5b09a2eb3c51973f1232bc023bce383d0f8442be0dc17b4618ad4fcb2f0a2beca7bef046d778eb61bfefe6b24f4ac92fd17ebaa8bd5a6a7606 + languageName: node + linkType: hard + "nprogress@npm:^0.2.0": version: 0.2.0 resolution: "nprogress@npm:0.2.0" @@ -10549,7 +10568,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0": +"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.4.1": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: e03a8a4271152c8b26604ed45535954c0a45296e32445b4b87f8a5abdb2421f40b59b4ca437c4346af0f28179780d604094eb64546bee2019d903d01c6c19bdb From f0e0726bfaa1f189f5317c59d8ed51b1b411c111 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 19 Dec 2023 00:38:51 +0100 Subject: [PATCH 4/8] Use local code imports --- .../{create-project.md => create-project.mdx} | 4 +- docs/docusaurus.config.js | 2 + docs/package.json | 4 +- docs/yarn.lock | 45 ++++++++++++++++++- 4 files changed, 50 insertions(+), 5 deletions(-) rename docs/docs/products/project/how-to/{create-project.md => create-project.mdx} (66%) diff --git a/docs/docs/products/project/how-to/create-project.md b/docs/docs/products/project/how-to/create-project.mdx similarity index 66% rename from docs/docs/products/project/how-to/create-project.md rename to docs/docs/products/project/how-to/create-project.mdx index d7148ef74b..574031b6a5 100644 --- a/docs/docs/products/project/how-to/create-project.md +++ b/docs/docs/products/project/how-to/create-project.mdx @@ -8,7 +8,5 @@ keywords: The first thing to do, before creating NFT collections, token and more, should be creating a project with the `createProject` function. -```js reference -https://github.com/build-5/portal-angular-example/blob/master/demos/demoCreateProjectAndTradeToken.ts#L31 + ```tsx file=../../../../../packages/sdk/examples/create_project.ts#L11-L24 ``` - diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 191afaa936..902bdcfc5c 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -95,6 +95,7 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), remarkPlugins: [ [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}], + [require('remark-code-import'), {removeRedundantIndentations: true}], ], }, blog: false, @@ -179,6 +180,7 @@ const config = { prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, + dditionalLanguages: ['ts'], }, }), }; diff --git a/docs/package.json b/docs/package.json index abcf1cffc9..a824e7b7ba 100644 --- a/docs/package.json +++ b/docs/package.json @@ -25,9 +25,11 @@ "@saucelabs/theme-github-codeblock": "^0.2.3", "clsx": "^1.2.1", "prism-react-renderer": "^1.3.5", + "raw-loader": "^4.0.2", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-router-dom": "5.3.4" + "react-router-dom": "5.3.4", + "remark-code-import": "0.4.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.4.1", diff --git a/docs/yarn.lock b/docs/yarn.lock index 1749171114..4ba1ebc632 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -5193,9 +5193,11 @@ __metadata: clsx: "npm:^1.2.1" docusaurus-plugin-typedoc: "npm:^0.19.2" prism-react-renderer: "npm:^1.3.5" + raw-loader: "npm:^4.0.2" react: "npm:^17.0.2" react-dom: "npm:^17.0.2" react-router-dom: "npm:5.3.4" + remark-code-import: "npm:0.4.0" typedoc: "npm:^0.24.8" typedoc-plugin-markdown: "npm:^3.17.1" typescript: "npm:4.9.5" @@ -9087,6 +9089,18 @@ __metadata: languageName: node linkType: hard +"raw-loader@npm:^4.0.2": + version: 4.0.2 + resolution: "raw-loader@npm:4.0.2" + dependencies: + loader-utils: "npm:^2.0.0" + schema-utils: "npm:^3.0.0" + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + checksum: 981ebe65e1cee7230300d21ba6dcd8bd23ea81ef4ad2b167c0f62d93deba347f27921d330be848634baab3831cf9f38900af6082d6416c2e937fe612fa6a74ff + languageName: node + linkType: hard + "rc@npm:1.2.8, rc@npm:^1.2.8": version: 1.2.8 resolution: "rc@npm:1.2.8" @@ -9456,6 +9470,16 @@ __metadata: languageName: node linkType: hard +"remark-code-import@npm:0.4.0": + version: 0.4.0 + resolution: "remark-code-import@npm:0.4.0" + dependencies: + to-gatsby-remark-plugin: "npm:^0.1.0" + unist-util-visit: "npm:^2.0.1" + checksum: a284c20cc96ed64b594376bdc1a0b40fd01bbc10b806e8378b164f066a699fb6337eceacf85404d02905a4b890c5e027c5d2aaa0a77a556ddc4d70224c5f8025 + languageName: node + linkType: hard + "remark-emoji@npm:^2.2.0": version: 2.2.0 resolution: "remark-emoji@npm:2.2.0" @@ -10510,6 +10534,15 @@ __metadata: languageName: node linkType: hard +"to-gatsby-remark-plugin@npm:^0.1.0": + version: 0.1.0 + resolution: "to-gatsby-remark-plugin@npm:0.1.0" + dependencies: + to-vfile: "npm:^6.1.0" + checksum: ae6893b59c69b3942c152484ed2f793ccffd1645669aa6fdddeafdcd38f95f15b3304abe012443b3456e4e0da70687c9c01c54a81fcc18212e13767f56616f7a + languageName: node + linkType: hard + "to-readable-stream@npm:^1.0.0": version: 1.0.0 resolution: "to-readable-stream@npm:1.0.0" @@ -10526,6 +10559,16 @@ __metadata: languageName: node linkType: hard +"to-vfile@npm:^6.1.0": + version: 6.1.0 + resolution: "to-vfile@npm:6.1.0" + dependencies: + is-buffer: "npm:^2.0.0" + vfile: "npm:^4.0.0" + checksum: 769591736463332c8c99c418fd94ef0810cf53ae24bdcb7e78b7ce7b0daff5ddf8425e02045e47a722afef538b8986307cf32aee4e36b2568a727b5b6514f81e + languageName: node + linkType: hard + "toidentifier@npm:1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1" @@ -10839,7 +10882,7 @@ __metadata: languageName: node linkType: hard -"unist-util-visit@npm:2.0.3, unist-util-visit@npm:^2.0.0, unist-util-visit@npm:^2.0.3": +"unist-util-visit@npm:2.0.3, unist-util-visit@npm:^2.0.0, unist-util-visit@npm:^2.0.1, unist-util-visit@npm:^2.0.3": version: 2.0.3 resolution: "unist-util-visit@npm:2.0.3" dependencies: From 5934feb2a657b155cb39e8ae464a09b8206e6a7c Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 19 Dec 2023 21:23:06 +0100 Subject: [PATCH 5/8] Rename library to SDK --- docs/docs/getting_started.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/getting_started.mdx b/docs/docs/getting_started.mdx index bc53a36d80..2b4510f6c3 100644 --- a/docs/docs/getting_started.mdx +++ b/docs/docs/getting_started.mdx @@ -10,14 +10,14 @@ keywords: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Build.5 API provides various ways to interact with our platform. Of course, you can read IOTA/Shimmer directly or use our friendly APIs or the Build.5 library directly to simplify access. +Build.5 API provides various ways to interact with our platform. Of course, you can read IOTA/Shimmer directly or use our friendly APIs or the Build.5 SDK directly to simplify access. -## library +## SDK The recommend way to interact with Build.5 is to use our library. Just add it to your project and get startet: ```bash npm2yarn -npm i @build-5/client +npm i @build-5/sdk npm i @build-5/interfaces ``` From 9f3a743245e73031f7fcbb602f4bcdedd7727a19 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 19 Dec 2023 22:57:10 +0100 Subject: [PATCH 6/8] Add more how-tos --- .../member/how-to/create-member.md | 8 +++ .../member/how-to/update-member.md | 13 ++++ .../dao_management/member/overview.md | 6 ++ docs/docs/products/dao_management/overview.md | 4 +- .../space/how-to/create-space.md | 8 +++ .../products/dao_management/space/overview.md | 7 ++ .../nft/how-to/create-nft-collection.md | 18 +++++ .../project/how-to/create-project.mdx | 8 ++- docs/docs/products/project/overview.md | 4 +- .../products/stamp/how-to/create-stamp.md | 8 +++ docs/docusaurus.config.js | 2 +- docs/sidebars.js | 69 +++++++++++++++---- 12 files changed, 133 insertions(+), 22 deletions(-) create mode 100644 docs/docs/products/dao_management/member/how-to/create-member.md create mode 100644 docs/docs/products/dao_management/member/how-to/update-member.md create mode 100644 docs/docs/products/dao_management/member/overview.md create mode 100644 docs/docs/products/dao_management/space/how-to/create-space.md create mode 100644 docs/docs/products/dao_management/space/overview.md create mode 100644 docs/docs/products/nft/how-to/create-nft-collection.md create mode 100644 docs/docs/products/stamp/how-to/create-stamp.md diff --git a/docs/docs/products/dao_management/member/how-to/create-member.md b/docs/docs/products/dao_management/member/how-to/create-member.md new file mode 100644 index 0000000000..94b3d0bc32 --- /dev/null +++ b/docs/docs/products/dao_management/member/how-to/create-member.md @@ -0,0 +1,8 @@ +--- +title: Create Member +--- + +To create a member, you need to call `createMember`. + +```tsx file=../../../../../../packages/sdk/examples/member/create.ts#L6-L12 +``` diff --git a/docs/docs/products/dao_management/member/how-to/update-member.md b/docs/docs/products/dao_management/member/how-to/update-member.md new file mode 100644 index 0000000000..bd8a44afab --- /dev/null +++ b/docs/docs/products/dao_management/member/how-to/update-member.md @@ -0,0 +1,13 @@ +--- +title: Update Member +--- + +To update a member we first get the member with it's id which in this case is the address of the member. + +```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L8-L12 +``` + +With the member we can create a signature and update for example the name by calling `update` on `dataset(Dataset.MEMBER)` and passing the new name in the body. + +```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L16-L29 +``` diff --git a/docs/docs/products/dao_management/member/overview.md b/docs/docs/products/dao_management/member/overview.md new file mode 100644 index 0000000000..be8f746560 --- /dev/null +++ b/docs/docs/products/dao_management/member/overview.md @@ -0,0 +1,6 @@ +--- +title: Member Management +--- + +Spaces can have multiplpe members. Members can be added and removed from a space. Members can be assigned different roles. +The following How-To's will help you manage your members. diff --git a/docs/docs/products/dao_management/overview.md b/docs/docs/products/dao_management/overview.md index 2739d1e14a..56a1bd0d48 100644 --- a/docs/docs/products/dao_management/overview.md +++ b/docs/docs/products/dao_management/overview.md @@ -2,9 +2,7 @@ title: Overview --- -import NotStarted from '../../_admonitions/_not-started-yet.md'; - - +Build.5 provides a set of tools to manage DAOs. Part of that is creating spaces, members, changing roles, etc. __Features__: - Space Management diff --git a/docs/docs/products/dao_management/space/how-to/create-space.md b/docs/docs/products/dao_management/space/how-to/create-space.md new file mode 100644 index 0000000000..0f7443776f --- /dev/null +++ b/docs/docs/products/dao_management/space/how-to/create-space.md @@ -0,0 +1,8 @@ +--- +title: Create Space +--- + +To create a space, you need to call `create` on `dataset(Dataset.SPACE)`. In the body you can specify the name of the space. + +```tsx file=../../../../../../packages/sdk/examples/create_space.ts#L11-L26 +``` diff --git a/docs/docs/products/dao_management/space/overview.md b/docs/docs/products/dao_management/space/overview.md new file mode 100644 index 0000000000..a3e8bb2926 --- /dev/null +++ b/docs/docs/products/dao_management/space/overview.md @@ -0,0 +1,7 @@ +--- +title: Space Management +--- + +Spaces can have multiplpe members. Members can be added and removed from a space. Members can be assigned different roles. +The following How-To's will help you manage your members. + diff --git a/docs/docs/products/nft/how-to/create-nft-collection.md b/docs/docs/products/nft/how-to/create-nft-collection.md new file mode 100644 index 0000000000..b2acd453d7 --- /dev/null +++ b/docs/docs/products/nft/how-to/create-nft-collection.md @@ -0,0 +1,18 @@ +--- +title: Create NFT Collection +--- + +To create a NFT collection, you need to call `create` on `dataset(Dataset.NFT_COLLECTION)`. In the body you can specify the name of the collection, the symbol, the base URI and more. + +```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L19-L44 +``` + +After that you should create a list of objects which describe the single NFTs, their name, description and image, price and so on. + +```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L49-L65 +``` + +And as a last step you can mint the batch of NFTs by calling `createBatch` on `dataset(Dataset.NFT)` and passing the list of NFTs in the body. + +```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L67-L78 +``` diff --git a/docs/docs/products/project/how-to/create-project.mdx b/docs/docs/products/project/how-to/create-project.mdx index 574031b6a5..06a70b9fe6 100644 --- a/docs/docs/products/project/how-to/create-project.mdx +++ b/docs/docs/products/project/how-to/create-project.mdx @@ -7,6 +7,12 @@ keywords: --- The first thing to do, before creating NFT collections, token and more, should be creating a project with the `createProject` function. + +:::info + +In the following examples we will use the the soonaverse project, which API keys are part of the SDK. You can also create your own project which will give you your own API key + +::: - ```tsx file=../../../../../packages/sdk/examples/create_project.ts#L11-L24 +```tsx file=../../../../../packages/sdk/examples/create_project.ts#L11-L24 ``` diff --git a/docs/docs/products/project/overview.md b/docs/docs/products/project/overview.md index f3c5ed88d5..cb12c12504 100644 --- a/docs/docs/products/project/overview.md +++ b/docs/docs/products/project/overview.md @@ -2,9 +2,7 @@ title: Overview --- -import NotStarted from '../../_admonitions/_not-started-yet.md'; - - +Projects are your starting point for the Build.5 platform. You need a project to create spaces, modify your billing information and more. __Features__: - Create Project diff --git a/docs/docs/products/stamp/how-to/create-stamp.md b/docs/docs/products/stamp/how-to/create-stamp.md new file mode 100644 index 0000000000..9c25a457f3 --- /dev/null +++ b/docs/docs/products/stamp/how-to/create-stamp.md @@ -0,0 +1,8 @@ +--- +title: Create a Stamp +--- + +To create a stamp, you need to call `create` on `dataset(Dataset.STAMP)`. In the body you can specify the file you would like to stamp. + +```tsx file=../../../../../packages/sdk/examples/create_stamp.ts#L13-L27 +``` diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 902bdcfc5c..94340498c5 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -95,7 +95,7 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), remarkPlugins: [ [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}], - [require('remark-code-import'), {removeRedundantIndentations: true}], + require('remark-code-import'), ], }, blog: false, diff --git a/docs/sidebars.js b/docs/sidebars.js index ec166c65c2..f3359d4258 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -30,32 +30,73 @@ const sidebars = { collapsed: false, items: [ { - 'DAO Management API': ['products/dao_management/overview'], + 'Project API': [ + 'products/project/overview', + { + 'How To': [ + 'products/project/how-to/create-project', + ], + } + ], }, { - 'Digital Twin NFT': ['products/digital_twin_nft/overview'], + 'DAO Management API': [ + 'products/dao_management/overview', + { + type: 'category', + label: 'Space', + link: {type: 'doc', id: 'products/dao_management/space/overview'}, + items: [ + { + 'How To': [ + 'products/dao_management/space/how-to/create-space', + ], + } + ], + }, + { + type: 'category', + label: 'Member', + link: {type: 'doc', id: 'products/dao_management/member/overview'}, + items: [ + { + 'How To': [ + 'products/dao_management/member/how-to/create-member', + 'products/dao_management/member/how-to/update-member', + ], + } + ], + }, + ], }, { - 'NFT API': ['products/nft/overview'], + 'NFT API': [ + 'products/nft/overview', + { + 'How To': [ + 'products/nft/how-to/create-nft-collection', + ], + } + ], }, { - 'NFT Trading API': ['products/nft_trading/overview'], + 'Stamp API': [ + 'products/stamp/overview', + { + 'How To': [ + 'products/stamp/how-to/create-stamp', + ], + } + ], }, { - 'NFT Staking API': ['products/nft_staking/overview'], + 'Digital Twin NFT': ['products/digital_twin_nft/overview'], }, { - 'Member API': ['products/member/overview'], + 'NFT Trading API': ['products/nft_trading/overview'], }, { - 'Project API': [ - 'products/project/overview', - { - 'How To': [ - 'products/project/how-to/create-project', - ], - } - ], + 'NFT Staking API': ['products/nft_staking/overview'], }, { 'Proposal API': ['products/proposal/overview'], From 5b1e1d9cd37c86c0199de0b839dadef2e9226584 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 19 Dec 2023 23:15:06 +0100 Subject: [PATCH 7/8] Add stamp description --- docs/docs/products/stamp/overview.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/docs/products/stamp/overview.md b/docs/docs/products/stamp/overview.md index 40f3e53bb0..70782494bf 100644 --- a/docs/docs/products/stamp/overview.md +++ b/docs/docs/products/stamp/overview.md @@ -2,9 +2,7 @@ title: Stamp API --- -import NotStarted from '../../_admonitions/_not-started-yet.md'; - - +The Stamp API allows you to easily upload a file to IPFS and stamp it on the IOTA tangle by creating an NFT. __Features__: - File Stamp From fd721ed2b85fcb401ae80036fd1fcdaffb89435f Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 19 Dec 2023 23:38:38 +0100 Subject: [PATCH 8/8] Fix and cleanup docs --- .../dao_management/member/how-to/update-member.md | 4 ++-- docs/docs/products/dao_management/member/overview.md | 2 +- .../dao_management/space/how-to/create-space.md | 2 +- docs/docs/products/dao_management/space/overview.md | 4 +--- docs/docs/products/member/overview.md | 11 ----------- .../docs/products/nft/how-to/create-nft-collection.md | 6 +++--- docs/docs/products/nft/overview.md | 4 ---- docs/docs/products/project/how-to/create-project.mdx | 4 ++-- docs/docs/products/stamp/how-to/create-stamp.md | 2 +- 9 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 docs/docs/products/member/overview.md diff --git a/docs/docs/products/dao_management/member/how-to/update-member.md b/docs/docs/products/dao_management/member/how-to/update-member.md index bd8a44afab..df9ff84796 100644 --- a/docs/docs/products/dao_management/member/how-to/update-member.md +++ b/docs/docs/products/dao_management/member/how-to/update-member.md @@ -2,12 +2,12 @@ title: Update Member --- -To update a member we first get the member with it's id which in this case is the address of the member. +To update a member, we first get the member with their ID, which, in this case, is the member's address. ```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L8-L12 ``` -With the member we can create a signature and update for example the name by calling `update` on `dataset(Dataset.MEMBER)` and passing the new name in the body. +With the member, we can create a signature and update, for example, the name by calling `update` on `dataset(Dataset.MEMBER)` and passing the new name in the body. ```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L16-L29 ``` diff --git a/docs/docs/products/dao_management/member/overview.md b/docs/docs/products/dao_management/member/overview.md index be8f746560..b96f7d9d00 100644 --- a/docs/docs/products/dao_management/member/overview.md +++ b/docs/docs/products/dao_management/member/overview.md @@ -2,5 +2,5 @@ title: Member Management --- -Spaces can have multiplpe members. Members can be added and removed from a space. Members can be assigned different roles. +Spaces can have multiple members. Members can be added and removed from a space. Members can be assigned different roles. The following How-To's will help you manage your members. diff --git a/docs/docs/products/dao_management/space/how-to/create-space.md b/docs/docs/products/dao_management/space/how-to/create-space.md index 0f7443776f..a7eadb377f 100644 --- a/docs/docs/products/dao_management/space/how-to/create-space.md +++ b/docs/docs/products/dao_management/space/how-to/create-space.md @@ -2,7 +2,7 @@ title: Create Space --- -To create a space, you need to call `create` on `dataset(Dataset.SPACE)`. In the body you can specify the name of the space. +To create a space, you must call `create` on `dataset(Dataset.SPACE)`. In the body, you can specify the name of the space. ```tsx file=../../../../../../packages/sdk/examples/create_space.ts#L11-L26 ``` diff --git a/docs/docs/products/dao_management/space/overview.md b/docs/docs/products/dao_management/space/overview.md index a3e8bb2926..9f1c7b46cb 100644 --- a/docs/docs/products/dao_management/space/overview.md +++ b/docs/docs/products/dao_management/space/overview.md @@ -2,6 +2,4 @@ title: Space Management --- -Spaces can have multiplpe members. Members can be added and removed from a space. Members can be assigned different roles. -The following How-To's will help you manage your members. - +Spaces are a way to organize members, tokens, and more around a specific topic/project. Spaces can create their tokens, NFT collections, staking events, and many other things. Spaces can have different types of members, each with additional permissions. diff --git a/docs/docs/products/member/overview.md b/docs/docs/products/member/overview.md deleted file mode 100644 index 2c0a35d093..0000000000 --- a/docs/docs/products/member/overview.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Overview ---- - -import NotStarted from '../../_admonitions/_not-started-yet.md'; - - - -__Features__: -- Member management -- Member's address management diff --git a/docs/docs/products/nft/how-to/create-nft-collection.md b/docs/docs/products/nft/how-to/create-nft-collection.md index b2acd453d7..c205310e49 100644 --- a/docs/docs/products/nft/how-to/create-nft-collection.md +++ b/docs/docs/products/nft/how-to/create-nft-collection.md @@ -2,17 +2,17 @@ title: Create NFT Collection --- -To create a NFT collection, you need to call `create` on `dataset(Dataset.NFT_COLLECTION)`. In the body you can specify the name of the collection, the symbol, the base URI and more. +To create a NFT collection, you must call `create` on `dataset(Dataset.NFT_COLLECTION)`. In the body, you can specify the collection's name, the symbol, the base URI, and more. ```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L19-L44 ``` -After that you should create a list of objects which describe the single NFTs, their name, description and image, price and so on. +After that, you should create a list of objects that describe the single NFTs, their name, description and image, price, and so on. ```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L49-L65 ``` -And as a last step you can mint the batch of NFTs by calling `createBatch` on `dataset(Dataset.NFT)` and passing the list of NFTs in the body. +As a last step, you can mint the batch of NFTs by calling `createBatch` on `dataset(Dataset.NFT)` and passing the list of NFTs in the body. ```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L67-L78 ``` diff --git a/docs/docs/products/nft/overview.md b/docs/docs/products/nft/overview.md index 241303dbf0..6c788fb963 100644 --- a/docs/docs/products/nft/overview.md +++ b/docs/docs/products/nft/overview.md @@ -2,10 +2,6 @@ title: Overview --- -import NotStarted from '../../_admonitions/_not-started-yet.md'; - - - NFT & NFT collections based on [IRC27](https://github.com/iotaledger/tips/blob/main/tips/TIP-0027/tip-0027.md). __Features__: diff --git a/docs/docs/products/project/how-to/create-project.mdx b/docs/docs/products/project/how-to/create-project.mdx index 06a70b9fe6..0399ab4df4 100644 --- a/docs/docs/products/project/how-to/create-project.mdx +++ b/docs/docs/products/project/how-to/create-project.mdx @@ -6,11 +6,11 @@ keywords: - client --- -The first thing to do, before creating NFT collections, token and more, should be creating a project with the `createProject` function. +Before creating NFT collections, tokens, and more, the first thing to do should be to create a project with the `createProject` function. :::info -In the following examples we will use the the soonaverse project, which API keys are part of the SDK. You can also create your own project which will give you your own API key +In the following examples, we will connect to the soonaverse project (its API keys are part of the SDK for ease of use). You can also create your own project to give you your API key. ::: diff --git a/docs/docs/products/stamp/how-to/create-stamp.md b/docs/docs/products/stamp/how-to/create-stamp.md index 9c25a457f3..503cb69f15 100644 --- a/docs/docs/products/stamp/how-to/create-stamp.md +++ b/docs/docs/products/stamp/how-to/create-stamp.md @@ -2,7 +2,7 @@ title: Create a Stamp --- -To create a stamp, you need to call `create` on `dataset(Dataset.STAMP)`. In the body you can specify the file you would like to stamp. +To create a stamp, you must call `create` on `dataset(Dataset.STAMP)`. In the body, you can specify the file you want to stamp. ```tsx file=../../../../../packages/sdk/examples/create_stamp.ts#L13-L27 ```