@evedex/exchange-crypto 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,6 +52,7 @@ export declare function signPositionCloseOrder(signer: WalletClient, order: Posi
52
52
  export interface NormalizeReplaceLimitOrder extends ReplaceBaseOrder {
53
53
  quantity: string;
54
54
  limitPrice: string;
55
+ postOnly?: "yes";
55
56
  }
56
57
  export interface SignedReplaceLimitOrder extends NormalizeReplaceLimitOrder, SignedPayload {
57
58
  }
package/dist/cjs/index.js CHANGED
@@ -182,7 +182,7 @@ function signReplaceLimitOrder(signer, order) {
182
182
  limitPrice: (0, numeric_1.toMatcherNumber)(order.limitPrice),
183
183
  };
184
184
  const signature = yield signer.signTypedData((0, crypto_1.getDomainData)(yield signer.getChainId()), crypto_1.EIP721Schemas.replaceLimitOrder, Object.assign(Object.assign({}, normalize), { quantity: (0, crypto_1.toEthNumber)(normalize.quantity), limitPrice: (0, crypto_1.toEthNumber)(normalize.limitPrice) }));
185
- return Object.assign(Object.assign({}, normalize), { signature: signer.serializeSignature(signature) });
185
+ return Object.assign(Object.assign(Object.assign({}, normalize), (order.postOnly && { postOnly: "yes" })), { signature: signer.serializeSignature(signature) });
186
186
  });
187
187
  }
188
188
  function signReplaceStopLimitOrder(signer, order) {
@@ -53,6 +53,7 @@ export interface ReplaceBaseOrder {
53
53
  export interface ReplaceLimitOrder extends ReplaceBaseOrder {
54
54
  quantity: Big.BigSource;
55
55
  limitPrice: Big.BigSource;
56
+ postOnly: boolean;
56
57
  }
57
58
  export interface ReplaceStopLimitOrder extends ReplaceLimitOrder {
58
59
  stopPrice: Big.BigSource;
@@ -52,6 +52,7 @@ export declare function signPositionCloseOrder(signer: WalletClient, order: Posi
52
52
  export interface NormalizeReplaceLimitOrder extends ReplaceBaseOrder {
53
53
  quantity: string;
54
54
  limitPrice: string;
55
+ postOnly?: "yes";
55
56
  }
56
57
  export interface SignedReplaceLimitOrder extends NormalizeReplaceLimitOrder, SignedPayload {
57
58
  }
package/dist/mjs/index.js CHANGED
@@ -144,6 +144,7 @@ export async function signReplaceLimitOrder(signer, order) {
144
144
  });
145
145
  return {
146
146
  ...normalize,
147
+ ...(order.postOnly && { postOnly: "yes" }),
147
148
  signature: signer.serializeSignature(signature),
148
149
  };
149
150
  }
@@ -53,6 +53,7 @@ export interface ReplaceBaseOrder {
53
53
  export interface ReplaceLimitOrder extends ReplaceBaseOrder {
54
54
  quantity: Big.BigSource;
55
55
  limitPrice: Big.BigSource;
56
+ postOnly: boolean;
56
57
  }
57
58
  export interface ReplaceStopLimitOrder extends ReplaceLimitOrder {
58
59
  stopPrice: Big.BigSource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evedex/exchange-crypto",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",