1.1.7 • Published 4 months ago

ph-typescript-lib-uniswap v1.1.7

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

Introduction

Uniswap wrapper - original source code taken from here. Adapted for the NPM package publishing and downstream usages purposes.

Installations

Setup

  1. Prerequisites:
  • must have installed tools from the "Installations" section
  • must have checked out / cloned source code from this repository
  1. Open up the cloned repository/project/folder and run following commands in the given order, one by one:

    npm install
    npm run build
  2. Both of the above commands should have completed successfully, and should have not caused any "package.json" or "package-lock.json" changes.

Example balance fetch

import { generatePrivateKeyAndContractAddress, UniswapClient } from '.';

(async function () {
  const { key, address, contract } = await generatePrivateKeyAndContractAddress(
    'mnemonic',
    'USDC'
  );
  const client = new UniswapClient({
    privKey: key,
  });
  try {
    console.log(await client.getBalance(contract ?? address));
  } catch (e) {
    console.error(e);
  }
})();
1.1.7

4 months ago

1.1.6

5 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago