import { mkt } from './config'
// Create collection with default config:
await mkt.createCollection()
// Provide collection configuration:
await mkt.createCollection(
{
name: `app.EVAV.org Collection ${Date.now()}`,
description: 'A collection built on top of the EVAV marketplace protocol',
image:
'https://meta.evav.org/ipfs/QmdaswaUoZoFAzbyuaQEJtKQdZvytsaQzoLsvUcQigPSCg/evav-collection-image.png',
banner_image:
'https://meta.evav.org/ipfs/QmdaswaUoZoFAzbyuaQEJtKQdZvytsaQzoLsvUcQigPSCg/evav-collection-banner.svg',
featured_image:
'https://meta.evav.org/ipfs/QmdaswaUoZoFAzbyuaQEJtKQdZvytsaQzoLsvUcQigPSCg/evav-collection-image.png',
external_link: 'https://app.evav.org',
collaborators: [],
}
)
import type { Address } from 'viem'
createCollection(metadata: CollectionInput): Promise<Address>
export interface CollectionInput {
name: string
description: string
external_link: string
collaborators: Address[]
image: string | File
banner_image: string | File
featured_image: string | File
}
import { Marketplace } from '@evav/marketplace'
import { useDynamicContext, getAuthToken } from '@dynamic-labs/sdk-react-core'
const { primaryWallet } = useDynamicContext()
const walletClient = await primaryWallet?.connector?.getWalletClient()
const publicClient = await primaryWallet?.connector?.getPublicClient()
const [account] = await walletConnector.getConnectedAccounts()
// viem is required for the evav sdk
export const mkt = new Marketplace({
walletClient,
publicClient,
account: account as Address,
// Optional. If not provided, SIWE will be used instead, and you will be asked to sign a message with your wallet
accessToken: getAuthToken(),
})
import { Marketplace } from '@evav/marketplace'
import { useWallets, usePrivy } from 'privy'
import { createWalletClient, createPublicClient, custom } from 'viem'
import { base } from 'viem/chains'
const { wallets } = useWallets();
const { user } = usePrivy();
const wallet = wallets[0]; // Replace this with your desired wallet
const provider = await wallet.getEthereumProvider()
const walletClient = createWalletClient({
chain: base,
transport: custom(provider),
})
const publicClient = createPublicClient({
chain: base,
transport: custom(provider),
})
// viem is required for the evav sdk
export const mkt = new Marketplace({
walletClient,
publicClient,
account: user.linked_accounts[0].address // Replace with your desired account
})