@deriverse/kit 1.0.12 → 1.0.13

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.
package/dist/index.js CHANGED
@@ -1454,6 +1454,7 @@ class Engine {
1454
1454
  mask: clientInfo2Model.mask,
1455
1455
  socLossFunds: clientInfo4Model.socLossFunds,
1456
1456
  fundingFunds: clientInfo5Model.fundingFunds,
1457
+ lossCoverage: clientInfo4Model.lossCoverage
1457
1458
  };
1458
1459
  });
1459
1460
  }
@@ -17,7 +17,7 @@ export declare function perpDepositData(tag: number, instrId: number, amount: nu
17
17
  export declare function moveSpotAvailFundsData(tag: number, instrId: number): Buffer;
18
18
  export declare function perpWithdrawData(tag: number, instrId: number, amount: number): Buffer;
19
19
  export declare function withdrawData(tag: number, tokenId: number, amount: number): Buffer;
20
- export declare function swapData(tag: number, instrId: number, price: number, amount: number): Buffer;
20
+ export declare function swapData(tag: number, side: number, instrId: number, price: number, amount: number): Buffer;
21
21
  export declare function spotQuotesReplaceData(tag: number, instrId: number, newBidPrice: number, newBidQty: number, oldBidOrderId: number, newAskPrice: number, newAskQty: number, oldAskOrderId: number): Buffer;
22
22
  export declare function perpQuotesReplaceData(tag: number, instrId: number, newBidPrice: number, newBidQty: number, oldBidOrderId: number, newAskPrice: number, newAskQty: number, oldAskOrderId: number): Buffer;
23
23
  export declare function votingData(tag: number, choice: number, votingCounter: number): Buffer;
@@ -177,10 +177,10 @@ function withdrawData(tag, tokenId, amount) {
177
177
  return buf;
178
178
  }
179
179
  exports.withdrawData = withdrawData;
180
- function swapData(tag, instrId, price, amount) {
180
+ function swapData(tag, side, instrId, price, amount) {
181
181
  let buf = Buffer.alloc(24);
182
182
  buf.writeUint8(tag, 0);
183
- buf.writeUint8(0, 1);
183
+ buf.writeUint8(side, 1);
184
184
  buf.writeUint16LE(0, 2);
185
185
  buf.writeUint32LE(instrId, 4);
186
186
  buf.writeBigInt64LE(BigInt(price), 8);
@@ -386,7 +386,7 @@ export declare class InstrAccountHeaderModel {
386
386
  static readonly OFFSET_PERP_SOC_LOSS_LONG_RATE = 712;
387
387
  static readonly OFFSET_PERP_SOC_LOSS_SHORT_RATE = 720;
388
388
  static readonly OFFSET_PERP_OPEN_INT = 728;
389
- static readonly OFFSET_RESERVED2 = 736;
389
+ static readonly OFFSET_PERP_PRICE_DELTA = 736;
390
390
  static readonly OFFSET_PERP_FUNDING_RATE = 744;
391
391
  static readonly OFFSET_PERP_FUNDING_FUNDS = 752;
392
392
  static readonly OFFSET_PERP_SOC_LOSS_FUNDS = 760;
@@ -519,7 +519,7 @@ export declare class InstrAccountHeaderModel {
519
519
  perpSocLossLongRate: number;
520
520
  perpSocLossShortRate: number;
521
521
  perpOpenInt: number;
522
- reserved2: number;
522
+ perpPriceDelta: number;
523
523
  perpFundingRate: number;
524
524
  perpFundingFunds: number;
525
525
  perpSocLossFunds: number;
@@ -721,11 +721,11 @@ export declare class PerpClientInfo4Model {
721
721
  static readonly OFFSET_LAST_SOC_LOSS_RATE = 0;
722
722
  static readonly OFFSET_LAST_SOC_LOSS_PERPS = 8;
723
723
  static readonly OFFSET_SOC_LOSS_FUNDS = 16;
724
- static readonly OFFSET_RESERVED = 24;
724
+ static readonly OFFSET_LOSS_COVERAGE = 24;
725
725
  lastSocLossRate: number;
726
726
  lastSocLossPerps: number;
727
727
  socLossFunds: number;
728
- reserved: number;
728
+ lossCoverage: number;
729
729
  static fromBuffer(data: Base64EncodedDataResponse, offset?: number): PerpClientInfo4Model;
730
730
  }
731
731
  export declare class PerpClientInfo5Model {
@@ -453,7 +453,7 @@ class InstrAccountHeaderModel {
453
453
  result.perpSocLossLongRate = autoData.readF64();
454
454
  result.perpSocLossShortRate = autoData.readF64();
455
455
  result.perpOpenInt = autoData.readI64();
456
- result.reserved2 = autoData.readI64();
456
+ result.perpPriceDelta = autoData.readF64();
457
457
  result.perpFundingRate = autoData.readF64();
458
458
  result.perpFundingFunds = autoData.readI64();
459
459
  result.perpSocLossFunds = autoData.readI64();
@@ -591,7 +591,7 @@ InstrAccountHeaderModel.OFFSET_PERP_SPOT_PRICE_FOR_WITHDROWAL = 704;
591
591
  InstrAccountHeaderModel.OFFSET_PERP_SOC_LOSS_LONG_RATE = 712;
592
592
  InstrAccountHeaderModel.OFFSET_PERP_SOC_LOSS_SHORT_RATE = 720;
593
593
  InstrAccountHeaderModel.OFFSET_PERP_OPEN_INT = 728;
594
- InstrAccountHeaderModel.OFFSET_RESERVED2 = 736;
594
+ InstrAccountHeaderModel.OFFSET_PERP_PRICE_DELTA = 736;
595
595
  InstrAccountHeaderModel.OFFSET_PERP_FUNDING_RATE = 744;
596
596
  InstrAccountHeaderModel.OFFSET_PERP_FUNDING_FUNDS = 752;
597
597
  InstrAccountHeaderModel.OFFSET_PERP_SOC_LOSS_FUNDS = 760;
@@ -848,7 +848,7 @@ class PerpClientInfo4Model {
848
848
  result.lastSocLossRate = autoData.readF64();
849
849
  result.lastSocLossPerps = autoData.readI64();
850
850
  result.socLossFunds = autoData.readI64();
851
- result.reserved = autoData.readI64();
851
+ result.lossCoverage = autoData.readI64();
852
852
  return result;
853
853
  }
854
854
  }
@@ -857,7 +857,7 @@ PerpClientInfo4Model.LENGTH = 4 * 8; // 32 bytes
857
857
  PerpClientInfo4Model.OFFSET_LAST_SOC_LOSS_RATE = 0;
858
858
  PerpClientInfo4Model.OFFSET_LAST_SOC_LOSS_PERPS = 8;
859
859
  PerpClientInfo4Model.OFFSET_SOC_LOSS_FUNDS = 16;
860
- PerpClientInfo4Model.OFFSET_RESERVED = 24;
860
+ PerpClientInfo4Model.OFFSET_LOSS_COVERAGE = 24;
861
861
  class PerpClientInfo5Model {
862
862
  static fromBuffer(data, offset) {
863
863
  const result = new PerpClientInfo5Model();
package/dist/types.d.ts CHANGED
@@ -269,6 +269,7 @@ export interface GetClientPerpOrdersInfoResponse {
269
269
  rebates: number;
270
270
  socLossFunds: number;
271
271
  fundingFunds: number;
272
+ lossCoverage: number;
272
273
  result: number;
273
274
  cost: number;
274
275
  mask: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deriverse/kit",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",