Getting Started

Installing the SWAYE SDK package

Setup

  1. Install the Swaye SDK packge using a package manager

npm install @swaye.me/swaye-sdk --save
  1. Follow OAuth steps to retrieve bearer token

  2. Setup the client

const client = new SwayeClient("https://api.swaye.me", "your-bearer-token");
  1. Retrieve all token Ids owned by the user for a contract

client.erc721.getAllTokensOfOwner({ address: '0x...', contractAddress: '0x...' })
      .then(tokenIds => console.log(tokenIds))
      .catch(error => console.error(error));

Last updated