Skip to content

Commit

Permalink
Merge pull request #62 from holaplex/sep-26-release
Browse files Browse the repository at this point in the history
Sep 26 release
  • Loading branch information
kespinola authored Sep 28, 2023
2 parents d9c53b9 + 87f29e9 commit e01e5bc
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docs/hub/Guides/2fa.md
Original file line number Diff line number Diff line change
@@ -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)
Binary file added docs/hub/Guides/assets/2fa-at-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hub/Guides/assets/authenticator-qr-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hub/Guides/assets/edit-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hub/Guides/assets/google-authenticator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
255 changes: 255 additions & 0 deletions docs/hub/Guides/open-drop.md
Original file line number Diff line number Diff line change
@@ -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": "<PROJECT-ID>",
"blockchain": "SOLANA",
"creators": [
{
"address": "<COLLECTION-CREATOR-ADDRESS>",
"verified": true,
"share": 100
}
],
"metadataJson": {
"name": "COLLECTION NAME",
"symbol": "COLLECTION SYMBOL",
"description": "COLLECTION DESCRIPTION",
"image": "<LINK-TO-COLLECTION-IMAGE>",
"attributes": []
},
"type": "OPEN"
}
}
```

Replace `<PROJECT-ID>` 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 `<COLLECTION-CREATOR-ADDRESS>` 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": "<access-token>"
}
```

Sample response:
```json
{
"data": {
"createDrop": {
"drop": {
"id": "<NEW-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": "<DROP-ID>",
"metadataJson": {
"name": "NFT Name",
"symbol": "SYMBOL",
"description": "NFT description",
"image": "https://nftstorage.link/ipfs/image-link",
"attributes": []
}
}
}
```

Sample response:
```json
{
"data": {
"queueMintToDrop": {
"collectionMint": {
"id": "<MINT-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": "<MINT-ID>",
"recipient": "<DESTINATION-WALLET-ADDRESS>",
"compressed": true
}
}
```

### Example: `mintRandomQueuedToDrop`

```graphql
mutation MintRandomQueuedToDrop($input: MintRandomQueuedInput!) {
mintRandomQueuedToDrop(input: $input) {
collectionMint {
id
address
owner
signature
creationStatus
}
}
}
```
Variables:
```json
{
"input": {
"drop": "<DROP-ID>",
"recipient": "<DESTINATION-WALLET-ADDRESS>",
"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": "<DROP-ID>",
}
}
```

Sample response:
```json
{
"data": {
"drop": {
"queuedMints": [
{
"id": "<MINT-ID>",
"creationStatus": "QUEUED",
"createdAt": "2023-09-15T21:20:04.871010+00:00",
"metadataJson": {
"name": "Queued token name"
},
"creators": [
{
"address": "<CREATOR-WALLET-ADDRESS>"
}
]
}
]
}
}
}
```
2 changes: 1 addition & 1 deletion docs/hub/Guides/switch-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Variables:
Replace `<MINT-ID>` with the id of the mint to be moved and `<COLLECTION-ADDRESS>` 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": "<access-token>"
Expand Down
14 changes: 14 additions & 0 deletions docs/hub/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e01e5bc

Please sign in to comment.