Skip to main content

Get Marketplace ID by item attributes

import { Marketplace } from '@evav/marketplace'

const itemId = Marketplace.getId({
  chainType,
  chainId,
  collectionAddress,
  tokenId,
})
import { GetIdInput } from './getIdInput'

static getId(itemAttributes: GetIdInput): string
export interface GetIdInput {
  chainType?: 'Eth' // defaults to ethereum
  chainId?: 'base' // defaults base
  collectionAddress: Address
  tokenId: bigint
}

Parse Marketplace ID to get item attributes

import { Marketplace } from '@evav/marketplace'

const itemId = Marketplace.parseId(itemId)
import { GetIdInput } from './getIdInput'

static parseId(itemId: string): GetIdInput
export interface GetIdInput {
  chainType?: 'Eth' // defaults to ethereum
  chainId?: 'base' // defaults base
  collectionAddress: Address
  tokenId: bigint
}