zklighter-perps 1.0.38 → 1.0.40

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.
@@ -77,7 +77,8 @@ export interface SendTxBatchRequest {
77
77
  }
78
78
 
79
79
  export interface SetAccountMetadataRequest {
80
- account_index: number;
80
+ master_account_index: number;
81
+ target_account_index: number;
81
82
  api_key_index: number;
82
83
  metadata: string;
83
84
  signature: string;
@@ -503,10 +504,17 @@ export class TransactionApi extends runtime.BaseAPI {
503
504
  * setAccountMetadata
504
505
  */
505
506
  async setAccountMetadataRaw(requestParameters: SetAccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
506
- if (requestParameters['account_index'] == null) {
507
+ if (requestParameters['master_account_index'] == null) {
507
508
  throw new runtime.RequiredError(
508
- 'account_index',
509
- 'Required parameter "account_index" was null or undefined when calling setAccountMetadata().'
509
+ 'master_account_index',
510
+ 'Required parameter "master_account_index" was null or undefined when calling setAccountMetadata().'
511
+ );
512
+ }
513
+
514
+ if (requestParameters['target_account_index'] == null) {
515
+ throw new runtime.RequiredError(
516
+ 'target_account_index',
517
+ 'Required parameter "target_account_index" was null or undefined when calling setAccountMetadata().'
510
518
  );
511
519
  }
512
520
 
@@ -549,8 +557,12 @@ export class TransactionApi extends runtime.BaseAPI {
549
557
  formParams = new URLSearchParams();
550
558
  }
551
559
 
552
- if (requestParameters['account_index'] != null) {
553
- formParams.append('account_index', requestParameters['account_index'] as any);
560
+ if (requestParameters['master_account_index'] != null) {
561
+ formParams.append('master_account_index', requestParameters['master_account_index'] as any);
562
+ }
563
+
564
+ if (requestParameters['target_account_index'] != null) {
565
+ formParams.append('target_account_index', requestParameters['target_account_index'] as any);
554
566
  }
555
567
 
556
568
  if (requestParameters['api_key_index'] != null) {
package/models/Trade.ts CHANGED
@@ -72,13 +72,13 @@ export interface Trade {
72
72
  * @type {number}
73
73
  * @memberof Trade
74
74
  */
75
- maker_account_id: number;
75
+ ask_account_id: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof Trade
80
80
  */
81
- taker_account_id: number;
81
+ bid_account_id: number;
82
82
  /**
83
83
  *
84
84
  * @type {boolean}
@@ -123,8 +123,8 @@ export function instanceOfTrade(value: object): value is Trade {
123
123
  if (!('price' in value) || value['price'] === undefined) return false;
124
124
  if (!('ask_id' in value) || value['ask_id'] === undefined) return false;
125
125
  if (!('bid_id' in value) || value['bid_id'] === undefined) return false;
126
- if (!('maker_account_id' in value) || value['maker_account_id'] === undefined) return false;
127
- if (!('taker_account_id' in value) || value['taker_account_id'] === undefined) return false;
126
+ if (!('ask_account_id' in value) || value['ask_account_id'] === undefined) return false;
127
+ if (!('bid_account_id' in value) || value['bid_account_id'] === undefined) return false;
128
128
  if (!('is_maker_ask' in value) || value['is_maker_ask'] === undefined) return false;
129
129
  if (!('block_height' in value) || value['block_height'] === undefined) return false;
130
130
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
@@ -149,8 +149,8 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
149
149
  'price': json['price'],
150
150
  'ask_id': json['ask_id'],
151
151
  'bid_id': json['bid_id'],
152
- 'maker_account_id': json['maker_account_id'],
153
- 'taker_account_id': json['taker_account_id'],
152
+ 'ask_account_id': json['ask_account_id'],
153
+ 'bid_account_id': json['bid_account_id'],
154
154
  'is_maker_ask': json['is_maker_ask'],
155
155
  'block_height': json['block_height'],
156
156
  'timestamp': json['timestamp'],
@@ -171,8 +171,8 @@ export function TradeToJSON(value?: Trade | null): any {
171
171
  'price': value['price'],
172
172
  'ask_id': value['ask_id'],
173
173
  'bid_id': value['bid_id'],
174
- 'maker_account_id': value['maker_account_id'],
175
- 'taker_account_id': value['taker_account_id'],
174
+ 'ask_account_id': value['ask_account_id'],
175
+ 'bid_account_id': value['bid_account_id'],
176
176
  'is_maker_ask': value['is_maker_ask'],
177
177
  'block_height': value['block_height'],
178
178
  'timestamp': value['timestamp'],
package/openapi.json CHANGED
@@ -4417,7 +4417,11 @@
4417
4417
  "ReqSetAccountMetadata": {
4418
4418
  "type": "object",
4419
4419
  "properties": {
4420
- "account_index": {
4420
+ "master_account_index": {
4421
+ "type": "integer",
4422
+ "format": "int64"
4423
+ },
4424
+ "target_account_index": {
4421
4425
  "type": "integer",
4422
4426
  "format": "int64"
4423
4427
  },
@@ -4434,7 +4438,8 @@
4434
4438
  },
4435
4439
  "title": "ReqSetAccountMetadata",
4436
4440
  "required": [
4437
- "account_index",
4441
+ "master_account_index",
4442
+ "target_account_index",
4438
4443
  "api_key_index",
4439
4444
  "metadata",
4440
4445
  "signature"
@@ -4654,12 +4659,12 @@
4654
4659
  "format": "int64",
4655
4660
  "example": "245"
4656
4661
  },
4657
- "maker_account_id": {
4662
+ "ask_account_id": {
4658
4663
  "type": "integer",
4659
4664
  "format": "int64",
4660
4665
  "example": "1"
4661
4666
  },
4662
- "taker_account_id": {
4667
+ "bid_account_id": {
4663
4668
  "type": "integer",
4664
4669
  "format": "int64",
4665
4670
  "example": "3"
@@ -4690,8 +4695,8 @@
4690
4695
  "price",
4691
4696
  "ask_id",
4692
4697
  "bid_id",
4693
- "maker_account_id",
4694
- "taker_account_id",
4698
+ "ask_account_id",
4699
+ "bid_account_id",
4695
4700
  "is_maker_ask",
4696
4701
  "block_height",
4697
4702
  "timestamp"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {