Yacooba SDK
Installation
npm install @yacooba/sdk
Usage
Yacooba
Import Yacooba and instantiate it
import { Yacooba } from '@yacooba/sdk'
const yacooba = Yacooba(env, provider, chainName)
env
: Environment to be used, options: dev
, stage
, prod
provider
: Ethereum provider needed to communicate with the networkchainName
: Ethereum network name, options: maticmum
, rinkeby
, mainnet
Connect to event
const event = yacooba.connectEvent(eventAddress)
Populate transactions
const buyTicketTx = await event.populateTransaction.buyTicket(tierId, attendeeAddress)
Get each typed contract
const forwarder = yacooba.forwarder
const fixedPriceMarket = yacooba.fixedPriceMarket
const auctionMarket = yacooba.auctionMarket
const factory = yacooba.factory
const royaltyRegistry = yacooba.royaltyRegistry
const yac = yacooba.yac
const yooba = yacooba.yooba
const preSale = yacooba.preSale
Utils
Import utils
import { utils } from '@yacooba/sdk'
Example: Sign typed data
const sig = await utils.signTypedData(wallet.privateKey, typedData)
Development
Commit messages: follow conventional commit format (see commitlint)
License
Released under MIT