@ebisusbay/core

1.0.4 • Public • Published

Documentation

This documentation offers an array of functionalities for engaging with the EbisusBay Marketplace.

For a more in-depth documentation, refer to the following link: https://docs.ebisusbay.com



Dependency

To interact with the SDK, access to the available listings in the marketplace is required. The method for accessing is as follows:

  --request GET \
  --url https://api.ebisusbay.com/listings \
  --header 'accept: application/json'

If you're seeking clarification on the response, the official documentation listed under the get_listings section can always be consulted.



Installation

  npm i --save @ebisusbay/core    

Usage


Import

import { EbisusBaySdk }  from '@ebisusbay/core/lib';

Create Instance

  const sdk = new EbisusBaySdk(); // Mainnet

  // OR

  const sdk = new EbisusBaySdk({ environment: 'testnet' });

Authentication

  const walletAddress: string; // Current wallet address
  const userProvider: Web3Provider; // Web3Provider of wallet connected

  sdk.setProvider(walletAddress, userProvider);

Create Listings

  const listings = [
    {
      tokenId: '1234',
      collectionAddress: '0x0...',
      price: "1", // CRO
      expirationDate: 12345678 // Seconds
    }
  ]

  await sdk.createListings(listings);

Update Listings

  const listings = [
    {
      tokenId: '1234',
      collectionAddress: '0x0...',
      price: "1", // CRO
      expirationDate: 12345678 // Seconds
    }
  ]

  await sdk.updateListings(listings);

Cancel Listings

  const listingIds: string[] = [
    '1234'
  ];

  await sdk.cancelListing(listingIds);

Purchase Listings

  const listingIds: string[] = ['1233', '2233']
  const receipt =  await sdk.purchaseListings(listingIds);

Readme

Keywords

none

Package Sidebar

Install

npm i @ebisusbay/core

Weekly Downloads

19

Version

1.0.4

License

ISC

Unpacked Size

186 kB

Total Files

66

Last publish

Collaborators

  • a_soto_eb
  • schwiz