diff --git a/docs/hub/Guides/2fa.md b/docs/hub/Guides/2fa.md new file mode 100644 index 0000000..2b59ae9 --- /dev/null +++ b/docs/hub/Guides/2fa.md @@ -0,0 +1,21 @@ +--- +sidebar_position: 11 +--- + +# Two-Factor Authentication + +Setting up two-factor authentication (2FA) is an effective way to enhance the security of your account. Follow the steps below to set it up: + +1. Log in to your Hub account and click on your name in the lower left corner of the screen. +2. Select “edit profile” then click “Setup 2fa” + ![Edit profile](./assets/edit-profile.png) +3. If you have an authenticator app installed on your mobile device move on to the next step, otherwise install one, we suggest Google Authenticator which you can get from the links below: + 1. Android: [https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en) + 2. Apple iOS: [https://apps.apple.com/us/app/google-authenticator/id388497605](https://apps.apple.com/us/app/google-authenticator/id388497605) + ![Google Authenticator](./assets/google-authenticator.png) +4. Open Google authenticator and press the plus button in lower right corner and scan the displayed QR code + ![Authenticator app QR code](./assets/authenticator-qr-code.png) +5. Input the current code displayed in the Authenticator app +6. 2fa has now been set up! +7. Next time you log in you will be prompted for the current auth code from the authenticator app. Enter it and you’re in! + ![2FA at login](./assets/2fa-at-login.png) \ No newline at end of file diff --git a/docs/hub/Guides/assets/2fa-at-login.png b/docs/hub/Guides/assets/2fa-at-login.png new file mode 100644 index 0000000..1217134 Binary files /dev/null and b/docs/hub/Guides/assets/2fa-at-login.png differ diff --git a/docs/hub/Guides/assets/authenticator-qr-code.png b/docs/hub/Guides/assets/authenticator-qr-code.png new file mode 100644 index 0000000..87eff35 Binary files /dev/null and b/docs/hub/Guides/assets/authenticator-qr-code.png differ diff --git a/docs/hub/Guides/assets/edit-profile.png b/docs/hub/Guides/assets/edit-profile.png new file mode 100644 index 0000000..1d0d80a Binary files /dev/null and b/docs/hub/Guides/assets/edit-profile.png differ diff --git a/docs/hub/Guides/assets/google-authenticator.png b/docs/hub/Guides/assets/google-authenticator.png new file mode 100644 index 0000000..c13f3b4 Binary files /dev/null and b/docs/hub/Guides/assets/google-authenticator.png differ diff --git a/docs/hub/Guides/open-drop.md b/docs/hub/Guides/open-drop.md new file mode 100644 index 0000000..8a2d216 --- /dev/null +++ b/docs/hub/Guides/open-drop.md @@ -0,0 +1,255 @@ +--- +sidebar_position: 11 +--- + +# Open Drops + +An Open Drop offers a highly versatile method for distributing a collection of NFTs. It allows you to conveniently include images and metadata for a customizable number of NFTs, which can be minted through our API according to your specific requirements. For instance, an Open Drop is ideal for creating a generative collection, and you can leverage the Hub API to construct any distribution mechanism that suits your needs. Open Drops are currently only supported on Solana. + +Follow the steps below to create, queue, and mint an Open Drop using the Hub API. + +## Create an Open Drop + +First, create an Open Drop using the `createDrop` mutation. The collection (MCC on Solana) will be created using the `metadataJson` and `creators` specified in drop creation. + +### Example + +```graphql +mutation CreateDrop($input: CreateDropInput!) { + createDrop(input: $input) { + drop { + id + creationStatus + } + } +} +``` +Variables: +```json +{ + "input": { + "project": "", + "blockchain": "SOLANA", + "creators": [ + { + "address": "", + "verified": true, + "share": 100 + } + ], + "metadataJson": { + "name": "COLLECTION NAME", + "symbol": "COLLECTION SYMBOL", + "description": "COLLECTION DESCRIPTION", + "image": "", + "attributes": [] + }, + "type": "OPEN" + } +} +``` + +Replace `` with the id of the project where the Open Drop should reside (on the ["Projects" tab](https://hub.holaplex.dev/projects) in Hub console, click the menu button next to the desired project to copy the project ID). + +Replace `` with the address of the creator wallet. The creator must have `"verified": false` if the wallet is not the Hub project treasury wallet. The address of the Hub project treasury wallet can be found on the "Treasury" tab on the Hub console. + +Note that Open Drops are currently only supported on Solana. + +As with all Hub API calls, you'll need an access token that can be generated on your organization's Credentials tab: [https://hub.holaplex.com/credentials](https://hub.holaplex.com/credentials) +This token should be included in the call's header: +```json +{ + "Authorization": "" +} +``` + +Sample response: +```json +{ + "data": { + "createDrop": { + "drop": { + "id": "", + "creationStatus": "PENDING" + } + } + } +} +``` + +Upon successful request, you can view the new drop in Hub console, on your Project's "Drops" tab. + +## Queue Mint to Drop + +Use the `queueMintToDrop` mutation to "load up" your drop with tokens to be minted. + +A queued mint does not yet live on chain as an NFT. However, its asset and metadata are uploaded to decentralized storage in preparation for the later mint. + +### Example + +```graphql +mutation QueueMintToDrop($input: QueueMintToDropInput!) { + queueMintToDrop(input: $input) { + collectionMint { + id + address + owner + signature + creationStatus + } + } +} +``` +Variables: +```json +{ + "input": { + "drop": "", + "metadataJson": { + "name": "NFT Name", + "symbol": "SYMBOL", + "description": "NFT description", + "image": "https://nftstorage.link/ipfs/image-link", + "attributes": [] + } + } +} +``` + +Sample response: +```json +{ + "data": { + "queueMintToDrop": { + "collectionMint": { + "id": "", + "address": null, + "owner": null, + "signature": null, + "creationStatus": "QUEUED" + } + } + } +} +``` + +The `collectionMint: id` in the response can be used to mint that queued token at a future time. + +To view your queued NFT on Hub console, navigate to the Collection page that's associated with your Open Drop. + +## Mint a Queued NFT + +After queuing an NFT to an Open Drop, there are two ways to distribute that mint into a wallet. You can mint a specific queued NFT into a wallet using the `mintQueued` mutation or you can mint a randonly selected queued NFT from the drop using the `mintRandomQueuedToDrop` mutation. + +The NFT can be minted as either an NFT or cNFT and this choice is made at the time of mint. + +### Example: `mintQueued` + +```graphql +mutation QueueMintToDrop($input: QueueMintToDropInput!) { + queueMintToDrop(input: $input) { + collectionMint { + id + address + owner + signature + creationStatus + } + } +} +``` +Variables: +```json +{ + "input": { + "mint": "", + "recipient": "", + "compressed": true + } +} +``` + +### Example: `mintRandomQueuedToDrop` + +```graphql +mutation MintRandomQueuedToDrop($input: MintRandomQueuedInput!) { + mintRandomQueuedToDrop(input: $input) { + collectionMint { + id + address + owner + signature + creationStatus + } + } +} +``` +Variables: +```json +{ + "input": { + "drop": "", + "recipient": "", + "compressed": true + } +} +``` + +The mint can be either compressed or uncompressed. + +## Get All Queued Mints + +To query queued mints, use the `queuedMints` field under a `drop`: + +### Example + +```graphql +query GetQueuedMints($drop: UUID!) { + drop(id: $drop) { + queuedMints { + id + creationStatus + createdAt + metadataJson { + name + } + creators { + address + } + } + } +} +``` +Variables: +```json +{ + "input": { + "drop": "", + } +} +``` + +Sample response: +```json +{ + "data": { + "drop": { + "queuedMints": [ + { + "id": "", + "creationStatus": "QUEUED", + "createdAt": "2023-09-15T21:20:04.871010+00:00", + "metadataJson": { + "name": "Queued token name" + }, + "creators": [ + { + "address": "" + } + ] + } + ] + } + } +} +``` \ No newline at end of file diff --git a/docs/hub/Guides/switch-collection.md b/docs/hub/Guides/switch-collection.md index caebc1e..57e32ad 100644 --- a/docs/hub/Guides/switch-collection.md +++ b/docs/hub/Guides/switch-collection.md @@ -38,7 +38,7 @@ Variables: Replace `` with the id of the mint to be moved and `` with the on-chain address of the destination collection. As with all Hub API calls, you'll need an access token that can be generated on your organization's Credentials tab: [https://hub.holaplex.com/credentials](https://hub.holaplex.com/credentials) -For all API requests to Hub, you'll need to include an authentication header of the form. This token should be included in the call's header: +This token should be included in the call's header: ```json { "Authorization": "" diff --git a/docs/hub/release-notes.md b/docs/hub/release-notes.md index e243bfa..24b3445 100644 --- a/docs/hub/release-notes.md +++ b/docs/hub/release-notes.md @@ -4,6 +4,20 @@ sidebar_position: 7 # Release Notes +## September 26, 2023 + +Features: + +- Open Drop UI on Hub Console +- [2FA](./Guides/2fa.md) for Hub Console login + +## September 20, 2023 + +Features: + +- [Open Drops](./Guides/open-drop.md) +- Minting metrics - for internally tracking mint speed + ## September 7, 2023 Features: