mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Updated CFD contracts schema and signSFDOrder
Version 0.18.13
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.18.12",
|
||||
"version": "0.18.13",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -26,6 +26,7 @@ export const signCFDOrder = async (
|
||||
signer: ethers.Signer,
|
||||
chainId: SupportedChainId,
|
||||
stopPrice: BigNumber.Value | undefined,
|
||||
isFromDelegate: boolean | undefined,
|
||||
) => {
|
||||
const nonce = Date.now();
|
||||
const expiration = nonce + DEFAULT_EXPIRATION;
|
||||
@@ -56,6 +57,7 @@ export const signCFDOrder = async (
|
||||
? new BigNumber(stopPrice).toNumber()
|
||||
: undefined,
|
||||
isPersonalSign: usePersonalSign,
|
||||
isFromDelegate,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
|
||||
@@ -85,6 +85,7 @@ export type CFDOrder = {
|
||||
buySide: 0 | 1 // uint8, 1=buy, 0=sell
|
||||
stopPrice?: number | undefined // uint64
|
||||
isPersonalSign: boolean // bool
|
||||
isFromDelegate?: boolean | undefined // bool
|
||||
}
|
||||
|
||||
export type SignedCFDOrder = {
|
||||
|
||||
Reference in New Issue
Block a user