@nftperp/sdk
Advanced tools
Comparing version 3.7.1 to 3.7.2
@@ -37,4 +37,5 @@ "use strict"; | ||
MAYC: "0x6BcCA37F6DEAcB3cfCA095f08F6d72C65D01992B", | ||
PPG: "0xaD7d8b1BEAF28225bBDD7F76D2604decFD0B6013", | ||
}, | ||
}, | ||
}; |
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1084342
17494
156