Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nftperp/sdk

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nftperp/sdk - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

1

config/index.js

@@ -37,4 +37,5 @@ "use strict";

MAYC: "0x6BcCA37F6DEAcB3cfCA095f08F6d72C65D01992B",
PPG: "0xaD7d8b1BEAF28225bBDD7F76D2604decFD0B6013",
},
},
};

2

package.json
{
"name": "@nftperp/sdk",
"version": "3.7.1",
"version": "3.7.2",
"description": "SDK for nftperp protocol",

@@ -5,0 +5,0 @@ "main": "sdk.js",

@@ -29,8 +29,11 @@ # nftperp sdk ✨

Also requires `ethers` library
Also requires `ethers` library
**NOTE:** If `npm i ethers` is used, it will default to installing `ethers v6`, which will create errors when initialising the SDK
```sh
npm i ethers
npm i ethers@5
```
### Usage

@@ -52,4 +55,19 @@

const nftperp = new SDK({ wallet, instance: Instance.TRADING_COMP });
```
If an error of the following occurs: `SyntaxError: Cannot use import statement outside a module`, add in the following to your `package.json` file
```json
"type": "module"
```
If an error of the following occurs: `Directory import '..\@nftperp\sdk\types' is not supported resolving ES modules`, do the following:
```ts
// REPLACE
import { Instance } from "@nftperp/sdk/types";
// WITH
import { Instance } from "@nftperp/sdk/types/index.js";
```
#### Open a position

@@ -56,0 +74,0 @@

@@ -18,2 +18,3 @@ import { AmmInfoResponse, FundingInfoResponse, PositionResponse, ReserveResponse, Stats24hResponse, TransactionSummaryResponse, Side, ClosePosTxSummaryResponse, MarginChangeSummaryResponse, TotalPositionSizeResponse, BalancesResponse, Amm, CalcFeeResponse, Instance } from "../types";

GOBBLERS: PositionResponse;
PPG: PositionResponse;
}>;

@@ -20,0 +21,0 @@ readonly reserves: (amm: Amm) => Promise<ReserveResponse>;

@@ -12,3 +12,4 @@ import { BigNumber } from "ethers";

BGAN = "BGAN",
GOBBLERS = "GOBBLERS"
GOBBLERS = "GOBBLERS",
PPG = "PPG"
}

@@ -15,0 +16,0 @@ export declare enum Side {

@@ -31,2 +31,3 @@ "use strict";

Amm["GOBBLERS"] = "GOBBLERS";
Amm["PPG"] = "PPG";
})(Amm = exports.Amm || (exports.Amm = {}));

@@ -33,0 +34,0 @@ var Side;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc