1.1.7 • Published 9 months ago

ph-typescript-lib-uniswap v1.1.7

Weekly downloads
-
License
-
Repository
-
Last release
9 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

9 months ago

1.1.6

10 months ago

1.1.5

11 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago