-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from holaplex/import-collection
guide for how to import a collection
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |