JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 88
  • Score
    100M100P100Q58461F
  • License GPL-3.0-or-later

A node SDK designed to simplify interaction with the Mimicry Protocol smart contracts.

Package Exports

  • @mimicry/sdk
  • @mimicry/sdk/dist/index.js
  • @mimicry/sdk/dist/sdk.esm.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mimicry/sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mimicry - Node SDK

   

This NPM library provides convenient access to smart contracts used by the Mimicry Protocol.

The intended audience is professional traders and market makers who wish to programmatically manage positions, and application developers who wish to integrate Mimicry Markets into their apps.

Setup

The SDK allows developers to instantiate an instance in a few lines of code. For example:

import { Mimicry, ChainId } from "@mimicry/mimicry-sdk";
import { ethers } from "ethers";
import 'dotenv/config';

const privateKey = process.env.PRIVATE_KEY;
const providerUrl = process.env.PROVIDER_URL;
const provider = new ethers.JsonRpcProvider(providerUrl);
const signer = new ethers.Wallet(privateKey, provider);
const mimicry = new Mimicry(signer, ChainId.MUMBAI);

Usage

The SDK provides a number of methods to interact with the Mimicry Protocol. See ./example/index.js for a full example.

For Contributors

To run TSDX, use:

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

  • Use yarn build to do a one-off build.
  • Use yarn analyize to fix linting issues, run tests, and check distribution size.
  • Use yarn publish to publish to NPM.