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

NameAddress
MetadataLibrQsXf9V1DmTtJLkEghoaF1kjJcAzWiEGoJn8mz7p
Creator78deTr7qycJ6498vSd3pNMhdCKKWxMipniitVHQcM8RM
Creator ControlsG9whLiLT9nSkxwWzWvbiKKrTL6yWxvzh2UXqNht5VXqV
ShopListjawGEdhxuAErSyYwcTEGWQswFoi6FScnGG1RKSB
InscriptionsinscokhJarcjaEs59QbQ7hYjrKz25LEPRfCbP8EmdUp
NFT9SXDHUdtfvBGT3H2uPCNEkxmWREoqdeS1qdBudLDD6KX

Data Model

Libreplex provides Metadata for Token-2022 mints.

Metadata structure

Field NameTypeExtra Info
MintPubkey
Update AuthorityPubkey
CreatorPubkeyCannot be changed
Is MutableBool
Group ( Collection )Optional Pubkey
NameString
SymbolString
Asset
Extension

Creator Machine

Work in progress...