Skip to content

Commit

Permalink
guide for how to import a collection
Browse files Browse the repository at this point in the history
  • Loading branch information
mackenziewildman committed Jul 28, 2023
1 parent cc83080 commit 084162e
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions docs/hub/Guides/import-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
sidebar_position: 8
---

# Importing a Collection

Any existing Solana collection can be imported into Hub for management and analysis.

## Prerequisites

- A project created within [Holaplex Hub](https://hub.holaplex.com/)
- Access to the Holaplex Hub GraphQL API (an access token can be generated on Hub's "Credentials" page)
- Hub API Playground: [https://api.holaplex.com](https://api.holaplex.com/). You could also use a GraphQL client such as [Apollo Client](https://www.apollographql.com/client/) or a tool like [GraphQL Playground](https://github.com/graphql/graphql-playground)
- Your collection's current update authority keys must be accessible via cli

For all API requests to Hub, you'll need to include an authentication header of the form
```json
{
"Authorization": "<access-token>"
}
```

## Step 1: Import collection mutation

The first step is to call the `importSolanaCollection` mutation to make Hub aware of the collection and viewable in the Hub console. Select the project where the collection should belong and the existing collection's token address.

#### Mutation
```graphql
mutation ImportSolanaCollection($input:ImportCollectionInput!) {
importSolanaCollection(input:$input) {
status
}
}
```

#### Variables
```json
{
"input": {
"project":"<PROJECT_ID>",
"collection":"<COLLECTION_TOKEN_ADDRESS>"
}
}
```

The `project-id` can be found in Hub, by clicking the menu button next to the project name.

### Example response

```json
{
"data": {
"importSolanaCollection": {
"status": "PENDING"
}
}
}
```

Once the collection is imported, it will be visible on Hub, under the "Collections" tab of the corresponding project.

## Step 2: Transfer update authority

In order to mint tokens to the collection, transfer the collection's update authority to the Hub project treasury wallet. Transfer the update authority using the Metaboss `set-update-authority-all` command: https://metaboss.rs/set.html#set-update-authority.

0 comments on commit 084162e

Please sign in to comment.