zklighter-perps 1.0.32 → 1.0.34

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/openapi.json CHANGED
@@ -871,43 +871,6 @@
871
871
  "description": "Get fundings"
872
872
  }
873
873
  },
874
- "/api/v1/l2Signature": {
875
- "post": {
876
- "summary": "l2Signature",
877
- "operationId": "l2Signature",
878
- "responses": {
879
- "200": {
880
- "description": "A successful response.",
881
- "schema": {
882
- "$ref": "#/definitions/SignBody"
883
- }
884
- },
885
- "400": {
886
- "description": "Bad request",
887
- "schema": {
888
- "$ref": "#/definitions/ResultCode"
889
- }
890
- }
891
- },
892
- "parameters": [
893
- {
894
- "name": "body",
895
- "in": "body",
896
- "required": true,
897
- "schema": {
898
- "$ref": "#/definitions/ReqSendTx"
899
- }
900
- }
901
- ],
902
- "tags": [
903
- "transaction"
904
- ],
905
- "consumes": [
906
- "multipart/form-data"
907
- ],
908
- "description": "Get transaction signature body"
909
- }
910
- },
911
874
  "/api/v1/layer1BasicInfo": {
912
875
  "get": {
913
876
  "summary": "layer1BasicInfo",
@@ -1321,6 +1284,51 @@
1321
1284
  "description": "Get account PnL chart"
1322
1285
  }
1323
1286
  },
1287
+ "/api/v1/publicPools": {
1288
+ "get": {
1289
+ "summary": "publicPools",
1290
+ "operationId": "publicPools",
1291
+ "responses": {
1292
+ "200": {
1293
+ "description": "A successful response.",
1294
+ "schema": {
1295
+ "$ref": "#/definitions/PublicPools"
1296
+ }
1297
+ },
1298
+ "400": {
1299
+ "description": "Bad request",
1300
+ "schema": {
1301
+ "$ref": "#/definitions/ResultCode"
1302
+ }
1303
+ }
1304
+ },
1305
+ "parameters": [
1306
+ {
1307
+ "name": "index",
1308
+ "in": "query",
1309
+ "required": true,
1310
+ "type": "integer",
1311
+ "format": "int64"
1312
+ },
1313
+ {
1314
+ "name": "limit",
1315
+ "in": "query",
1316
+ "required": true,
1317
+ "type": "integer",
1318
+ "format": "int64",
1319
+ "minimum": 1,
1320
+ "maximum": 100
1321
+ }
1322
+ ],
1323
+ "tags": [
1324
+ "account"
1325
+ ],
1326
+ "consumes": [
1327
+ "multipart/form-data"
1328
+ ],
1329
+ "description": "Get public pools"
1330
+ }
1331
+ },
1324
1332
  "/api/v1/recentTrades": {
1325
1333
  "get": {
1326
1334
  "summary": "recentTrades",
@@ -1420,15 +1428,15 @@
1420
1428
  "description": "Get rollbacks"
1421
1429
  }
1422
1430
  },
1423
- "/api/v1/search": {
1424
- "get": {
1425
- "summary": "search",
1426
- "operationId": "search",
1431
+ "/api/v1/sendTx": {
1432
+ "post": {
1433
+ "summary": "sendTx",
1434
+ "operationId": "sendTx",
1427
1435
  "responses": {
1428
1436
  "200": {
1429
1437
  "description": "A successful response.",
1430
1438
  "schema": {
1431
- "$ref": "#/definitions/Search"
1439
+ "$ref": "#/definitions/TxHash"
1432
1440
  }
1433
1441
  },
1434
1442
  "400": {
@@ -1440,30 +1448,32 @@
1440
1448
  },
1441
1449
  "parameters": [
1442
1450
  {
1443
- "name": "keyword",
1444
- "in": "query",
1451
+ "name": "body",
1452
+ "in": "body",
1445
1453
  "required": true,
1446
- "type": "string"
1454
+ "schema": {
1455
+ "$ref": "#/definitions/ReqSendTx"
1456
+ }
1447
1457
  }
1448
1458
  ],
1449
1459
  "tags": [
1450
- "info"
1460
+ "transaction"
1451
1461
  ],
1452
1462
  "consumes": [
1453
1463
  "multipart/form-data"
1454
1464
  ],
1455
- "description": "Search with a specific keyword"
1465
+ "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
1456
1466
  }
1457
1467
  },
1458
- "/api/v1/sendTx": {
1468
+ "/api/v1/sendTxBatch": {
1459
1469
  "post": {
1460
- "summary": "sendTx",
1461
- "operationId": "sendTx",
1470
+ "summary": "sendTxBatch",
1471
+ "operationId": "sendTxBatch",
1462
1472
  "responses": {
1463
1473
  "200": {
1464
1474
  "description": "A successful response.",
1465
1475
  "schema": {
1466
- "$ref": "#/definitions/TxHash"
1476
+ "$ref": "#/definitions/TxHashes"
1467
1477
  }
1468
1478
  },
1469
1479
  "400": {
@@ -1479,7 +1489,7 @@
1479
1489
  "in": "body",
1480
1490
  "required": true,
1481
1491
  "schema": {
1482
- "$ref": "#/definitions/ReqSendTx"
1492
+ "$ref": "#/definitions/ReqSendTxBatch"
1483
1493
  }
1484
1494
  }
1485
1495
  ],
@@ -1492,15 +1502,15 @@
1492
1502
  "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
1493
1503
  }
1494
1504
  },
1495
- "/api/v1/sendTxBatch": {
1505
+ "/api/v1/setAccountMetadata": {
1496
1506
  "post": {
1497
- "summary": "sendTxBatch",
1498
- "operationId": "sendTxBatch",
1507
+ "summary": "setAccountMetadata",
1508
+ "operationId": "setAccountMetadata",
1499
1509
  "responses": {
1500
1510
  "200": {
1501
1511
  "description": "A successful response.",
1502
1512
  "schema": {
1503
- "$ref": "#/definitions/TxHashes"
1513
+ "$ref": "#/definitions/ResultCode"
1504
1514
  }
1505
1515
  },
1506
1516
  "400": {
@@ -1516,7 +1526,7 @@
1516
1526
  "in": "body",
1517
1527
  "required": true,
1518
1528
  "schema": {
1519
- "$ref": "#/definitions/ReqSendTxBatch"
1529
+ "$ref": "#/definitions/ReqSetAccountMetadata"
1520
1530
  }
1521
1531
  }
1522
1532
  ],
@@ -1526,7 +1536,7 @@
1526
1536
  "consumes": [
1527
1537
  "multipart/form-data"
1528
1538
  ],
1529
- "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
1539
+ "description": "Set account metadata"
1530
1540
  }
1531
1541
  },
1532
1542
  "/api/v1/trades": {
@@ -1851,6 +1861,22 @@
1851
1861
  "open_position_quote"
1852
1862
  ]
1853
1863
  },
1864
+ "AccountMetadata": {
1865
+ "type": "object",
1866
+ "properties": {
1867
+ "name": {
1868
+ "type": "string"
1869
+ },
1870
+ "description": {
1871
+ "type": "string"
1872
+ }
1873
+ },
1874
+ "title": "AccountMetadata",
1875
+ "required": [
1876
+ "name",
1877
+ "description"
1878
+ ]
1879
+ },
1854
1880
  "AccountPnL": {
1855
1881
  "type": "object",
1856
1882
  "properties": {
@@ -2300,6 +2326,12 @@
2300
2326
  "type": "string",
2301
2327
  "example": "46342"
2302
2328
  },
2329
+ "name": {
2330
+ "type": "string"
2331
+ },
2332
+ "description": {
2333
+ "type": "string"
2334
+ },
2303
2335
  "positions": {
2304
2336
  "type": "array",
2305
2337
  "items": {
@@ -2316,6 +2348,9 @@
2316
2348
  "$ref": "#/definitions/AccountMarketStats"
2317
2349
  }
2318
2350
  },
2351
+ "pool_info": {
2352
+ "$ref": "#/definitions/PublicPoolInfo"
2353
+ },
2319
2354
  "shares": {
2320
2355
  "type": "array",
2321
2356
  "items": {
@@ -2333,9 +2368,12 @@
2333
2368
  "open_order_count",
2334
2369
  "status",
2335
2370
  "collateral",
2371
+ "name",
2372
+ "description",
2336
2373
  "positions",
2337
2374
  "total_asset_value",
2338
2375
  "market_stats",
2376
+ "pool_info",
2339
2377
  "shares"
2340
2378
  ]
2341
2379
  },
@@ -3468,6 +3506,113 @@
3468
3506
  "size"
3469
3507
  ]
3470
3508
  },
3509
+ "PublicPool": {
3510
+ "type": "object",
3511
+ "properties": {
3512
+ "code": {
3513
+ "type": "integer",
3514
+ "format": "int32",
3515
+ "example": "100"
3516
+ },
3517
+ "message": {
3518
+ "type": "string"
3519
+ },
3520
+ "account_type": {
3521
+ "type": "integer",
3522
+ "format": "uint8",
3523
+ "example": "1"
3524
+ },
3525
+ "index": {
3526
+ "type": "integer",
3527
+ "format": "int64",
3528
+ "example": "1"
3529
+ },
3530
+ "l1_address": {
3531
+ "type": "string",
3532
+ "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
3533
+ },
3534
+ "cancel_all_time": {
3535
+ "type": "integer",
3536
+ "format": "int64",
3537
+ "example": "1640995200"
3538
+ },
3539
+ "open_order_count": {
3540
+ "type": "integer",
3541
+ "format": "int64",
3542
+ "example": "100"
3543
+ },
3544
+ "status": {
3545
+ "type": "integer",
3546
+ "format": "int32",
3547
+ "example": "1"
3548
+ },
3549
+ "collateral": {
3550
+ "type": "string",
3551
+ "example": "46342"
3552
+ },
3553
+ "name": {
3554
+ "type": "string"
3555
+ },
3556
+ "description": {
3557
+ "type": "string"
3558
+ },
3559
+ "pool_info": {
3560
+ "$ref": "#/definitions/PublicPoolInfo"
3561
+ }
3562
+ },
3563
+ "title": "PublicPool",
3564
+ "required": [
3565
+ "code",
3566
+ "account_type",
3567
+ "index",
3568
+ "l1_address",
3569
+ "cancel_all_time",
3570
+ "open_order_count",
3571
+ "status",
3572
+ "collateral",
3573
+ "name",
3574
+ "description",
3575
+ "pool_info"
3576
+ ]
3577
+ },
3578
+ "PublicPoolInfo": {
3579
+ "type": "object",
3580
+ "properties": {
3581
+ "ppi_s": {
3582
+ "type": "integer",
3583
+ "format": "uint8",
3584
+ "example": "0"
3585
+ },
3586
+ "ppi_of": {
3587
+ "type": "integer",
3588
+ "format": "int64",
3589
+ "example": "100"
3590
+ },
3591
+ "ppi_mosr": {
3592
+ "type": "integer",
3593
+ "format": "int64",
3594
+ "example": "200"
3595
+ },
3596
+ "ppi_tsa": {
3597
+ "type": "integer",
3598
+ "format": "int64",
3599
+ "example": "100000"
3600
+ },
3601
+ "ppi_os": {
3602
+ "type": "integer",
3603
+ "format": "int64",
3604
+ "example": "20000"
3605
+ }
3606
+ },
3607
+ "title": "PublicPoolInfo",
3608
+ "required": [
3609
+ "ppi_s",
3610
+ "ppi_of",
3611
+ "ppi_mosr",
3612
+ "ppi_tsa",
3613
+ "ppi_os"
3614
+ ]
3615
+ },
3471
3616
  "PublicPoolShare": {
3472
3617
  "type": "object",
3473
3618
  "properties": {
@@ -3493,6 +3638,30 @@
3493
3638
  "entry_usdc"
3494
3639
  ]
3495
3640
  },
3641
+ "PublicPools": {
3642
+ "type": "object",
3643
+ "properties": {
3644
+ "code": {
3645
+ "type": "integer",
3646
+ "format": "int32",
3647
+ "example": "100"
3648
+ },
3649
+ "message": {
3650
+ "type": "string"
3651
+ },
3652
+ "public_pools": {
3653
+ "type": "array",
3654
+ "items": {
3655
+ "$ref": "#/definitions/PublicPool"
3656
+ }
3657
+ }
3658
+ },
3659
+ "title": "PublicPools",
3660
+ "required": [
3661
+ "code",
3662
+ "public_pools"
3663
+ ]
3664
+ },
3496
3665
  "ReqDoFaucet": {
3497
3666
  "type": "object",
3498
3667
  "properties": {
@@ -3989,6 +4158,26 @@
3989
4158
  "tx_type"
3990
4159
  ]
3991
4160
  },
4161
+ "ReqGetPublicPools": {
4162
+ "type": "object",
4163
+ "properties": {
4164
+ "index": {
4165
+ "type": "integer",
4166
+ "format": "int64"
4167
+ },
4168
+ "limit": {
4169
+ "type": "integer",
4170
+ "format": "int64",
4171
+ "maximum": 100,
4172
+ "minimum": 1
4173
+ }
4174
+ },
4175
+ "title": "ReqGetPublicPools",
4176
+ "required": [
4177
+ "index",
4178
+ "limit"
4179
+ ]
4180
+ },
3992
4181
  "ReqGetRangeWithCursor": {
3993
4182
  "type": "object",
3994
4183
  "properties": {
@@ -4184,18 +4373,6 @@
4184
4373
  "signature"
4185
4374
  ]
4186
4375
  },
4187
- "ReqSearch": {
4188
- "type": "object",
4189
- "properties": {
4190
- "keyword": {
4191
- "type": "string"
4192
- }
4193
- },
4194
- "title": "ReqSearch",
4195
- "required": [
4196
- "keyword"
4197
- ]
4198
- },
4199
4376
  "ReqSendTx": {
4200
4377
  "type": "object",
4201
4378
  "properties": {
@@ -4229,6 +4406,32 @@
4229
4406
  "tx_infos"
4230
4407
  ]
4231
4408
  },
4409
+ "ReqSetAccountMetadata": {
4410
+ "type": "object",
4411
+ "properties": {
4412
+ "account_index": {
4413
+ "type": "integer",
4414
+ "format": "int64"
4415
+ },
4416
+ "api_key_index": {
4417
+ "type": "integer",
4418
+ "format": "uint8"
4419
+ },
4420
+ "metadata": {
4421
+ "type": "string"
4422
+ },
4423
+ "signature": {
4424
+ "type": "string"
4425
+ }
4426
+ },
4427
+ "title": "ReqSetAccountMetadata",
4428
+ "required": [
4429
+ "account_index",
4430
+ "api_key_index",
4431
+ "metadata",
4432
+ "signature"
4433
+ ]
4434
+ },
4232
4435
  "ResultCode": {
4233
4436
  "type": "object",
4234
4437
  "properties": {
@@ -4308,51 +4511,6 @@
4308
4511
  "rollbacks"
4309
4512
  ]
4310
4513
  },
4311
- "Search": {
4312
- "type": "object",
4313
- "properties": {
4314
- "code": {
4315
- "type": "integer",
4316
- "format": "int32",
4317
- "example": "100"
4318
- },
4319
- "message": {
4320
- "type": "string"
4321
- },
4322
- "data_type": {
4323
- "type": "integer",
4324
- "format": "int32",
4325
- "example": "1"
4326
- }
4327
- },
4328
- "title": "Search",
4329
- "required": [
4330
- "code",
4331
- "data_type"
4332
- ]
4333
- },
4334
- "SignBody": {
4335
- "type": "object",
4336
- "properties": {
4337
- "code": {
4338
- "type": "integer",
4339
- "format": "int32",
4340
- "example": "100"
4341
- },
4342
- "message": {
4343
- "type": "string"
4344
- },
4345
- "sign_body": {
4346
- "type": "string",
4347
- "example": "success"
4348
- }
4349
- },
4350
- "title": "SignBody",
4351
- "required": [
4352
- "code",
4353
- "sign_body"
4354
- ]
4355
- },
4356
4514
  "SimpleOrder": {
4357
4515
  "type": "object",
4358
4516
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {