Quickstart
Install the SDK
import {mintSingle} from "@libreplex/sdk"
import * as anchor from "@coral-xyz/anchor";
const provider = anchor.AnchorProvider.env()
const {method, mint} = (await mintSingle({
provider,
mintData: {
assetUrl: {
type: "jsonUrl",
value: "COOL.com"
},
name: "COOL",
symbol: "COOL",
}
}))
await method.rpc()
Creating a collection/group.
import {mintSingle} from "@libreplex/sdk"
import * as anchor from "@coral-xyz/anchor";
const provider = anchor.AnchorProvider.env()
const {method, group} = await setupGroup({
connector: {
type: "provider",
provider,
},
groupAuthority: me,
input: {
description: "A very cool group",
name: "COOLIO",
symbol: "GRP",
url: "COOL.com",
royalties: {
bps: 0,
shares: [{
recipient: me,
share: 100,
}],
},
permittedSigners: [],
onChainAttributes: [],
},
})
await method.rpc()
Minting to a group.
import {mintSingle} from "@libreplex/sdk"
import * as anchor from "@coral-xyz/anchor";
const provider = anchor.AnchorProvider.env()
const group = "....Some Public Key..."
const {method, mint} = (await mintSingle({
provider,
mintData: {
assetUrl: {
type: "jsonUrl",
value: "COOL.com"
},
name: "COOL",
symbol: "COOL",
},
mintToGroup: {
group,
checkValidGroup: false,
}
}))
await method.rpc()
Programs
Name | Address |
---|---|
Metadata | LibrQsXf9V1DmTtJLkEghoaF1kjJcAzWiEGoJn8mz7p |
Creator | 78deTr7qycJ6498vSd3pNMhdCKKWxMipniitVHQcM8RM |
Creator Controls | G9whLiLT9nSkxwWzWvbiKKrTL6yWxvzh2UXqNht5VXqV |
Shop | ListjawGEdhxuAErSyYwcTEGWQswFoi6FScnGG1RKSB |
Inscriptions | inscokhJarcjaEs59QbQ7hYjrKz25LEPRfCbP8EmdUp |
NFT | 9SXDHUdtfvBGT3H2uPCNEkxmWREoqdeS1qdBudLDD6KX |
Data Model
Libreplex provides Metadata for Token-2022 mints.
Metadata structure
Field Name | Type | Extra Info |
---|---|---|
Mint | Pubkey | |
Update Authority | Pubkey | |
Creator | Pubkey | Cannot be changed |
Is Mutable | Bool | |
Group ( Collection ) | Optional Pubkey | |
Name | String | |
Symbol | String | |
Asset | ||
Extension |
Creator Machine
Work in progress...