@yacooba/sdk
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

Commitizen friendly

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 network
  • chainName: Ethereum network name, options: matic, goerli, mainnet

Connect to event

const event = yacooba.connectEvent(eventAddress) // Optionally we can pass the Signer as second param

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

Package Sidebar

Install

npm i @yacooba/sdk

Weekly Downloads

3

Version

4.1.0

License

MIT

Unpacked Size

842 kB

Total Files

90

Last publish

Collaborators

  • carlosfaria94