zklighter-perps 1.0.72 → 1.0.73

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.
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ZkLighterInfo
20
+ */
21
+ export interface ZkLighterInfo {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ZkLighterInfo
26
+ */
27
+ contract_address: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ZkLighterInfo interface.
32
+ */
33
+ export function instanceOfZkLighterInfo(value: object): value is ZkLighterInfo {
34
+ if (!('contract_address' in value) || value['contract_address'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ZkLighterInfoFromJSON(json: any): ZkLighterInfo {
39
+ return ZkLighterInfoFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ZkLighterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZkLighterInfo {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'contract_address': json['contract_address'],
49
+ };
50
+ }
51
+
52
+ export function ZkLighterInfoToJSON(value?: ZkLighterInfo | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'contract_address': value['contract_address'],
59
+ };
60
+ }
61
+
package/models/index.ts CHANGED
@@ -11,11 +11,17 @@ export * from './Accounts';
11
11
  export * from './ApiKey';
12
12
  export * from './Block';
13
13
  export * from './Blocks';
14
+ export * from './BridgeSupportedNetwork';
15
+ export * from './BridgeSupportedNetworks';
14
16
  export * from './Candlestick';
15
17
  export * from './Candlesticks';
16
18
  export * from './ContractAddress';
19
+ export * from './CreateIntentAddressResp';
17
20
  export * from './CurrentHeight';
18
21
  export * from './Cursor';
22
+ export * from './Deposit';
23
+ export * from './DepositHistory';
24
+ export * from './DepositHistoryItem';
19
25
  export * from './DetailedAccount';
20
26
  export * from './DetailedAccounts';
21
27
  export * from './DetailedCandlestick';
@@ -63,9 +69,11 @@ export * from './ReqGetBlock';
63
69
  export * from './ReqGetBlockTxs';
64
70
  export * from './ReqGetByAccount';
65
71
  export * from './ReqGetCandlesticks';
72
+ export * from './ReqGetDepositHistory';
66
73
  export * from './ReqGetFeeBucket';
67
74
  export * from './ReqGetFundings';
68
75
  export * from './ReqGetL1Tx';
76
+ export * from './ReqGetLatestDeposit';
69
77
  export * from './ReqGetLeaderboard';
70
78
  export * from './ReqGetNextNonce';
71
79
  export * from './ReqGetOrderBookDetails';
@@ -78,6 +86,7 @@ export * from './ReqGetRangeWithIndexSortable';
78
86
  export * from './ReqGetRecentTrades';
79
87
  export * from './ReqGetTrades';
80
88
  export * from './ReqGetTx';
89
+ export * from './ReqGetWithdrawHistory';
81
90
  export * from './ReqIsWhitelisted';
82
91
  export * from './ResultCode';
83
92
  export * from './SimpleOrder';
@@ -91,3 +100,6 @@ export * from './TxHash';
91
100
  export * from './TxHashes';
92
101
  export * from './Txs';
93
102
  export * from './ValidatorInfo';
103
+ export * from './WithdrawHistory';
104
+ export * from './WithdrawHistoryItem';
105
+ export * from './ZkLighterInfo';
package/openapi.json CHANGED
@@ -739,6 +739,43 @@
739
739
  "description": "Get candlesticks"
740
740
  }
741
741
  },
742
+ "/api/v1/createIntentAddress": {
743
+ "post": {
744
+ "summary": "createIntentAddress",
745
+ "operationId": "createIntentAddress",
746
+ "responses": {
747
+ "200": {
748
+ "description": "A successful response.",
749
+ "schema": {
750
+ "$ref": "#/definitions/CreateIntentAddressResp"
751
+ }
752
+ },
753
+ "400": {
754
+ "description": "Bad request",
755
+ "schema": {
756
+ "$ref": "#/definitions/ResultCode"
757
+ }
758
+ }
759
+ },
760
+ "parameters": [
761
+ {
762
+ "name": "body",
763
+ "in": "body",
764
+ "required": true,
765
+ "schema": {
766
+ "$ref": "#/definitions/ReqCreateIntentAddress"
767
+ }
768
+ }
769
+ ],
770
+ "tags": [
771
+ "bridge"
772
+ ],
773
+ "consumes": [
774
+ "multipart/form-data"
775
+ ],
776
+ "description": "Create a bridge intent address for CCTP bridge"
777
+ }
778
+ },
742
779
  "/api/v1/currentHeight": {
743
780
  "get": {
744
781
  "summary": "currentHeight",
@@ -763,6 +800,106 @@
763
800
  "description": "Get current height"
764
801
  }
765
802
  },
803
+ "/api/v1/deposit/history": {
804
+ "get": {
805
+ "summary": "deposit_history",
806
+ "operationId": "deposit_history",
807
+ "responses": {
808
+ "200": {
809
+ "description": "A successful response.",
810
+ "schema": {
811
+ "$ref": "#/definitions/DepositHistory"
812
+ }
813
+ },
814
+ "400": {
815
+ "description": "Bad request",
816
+ "schema": {
817
+ "$ref": "#/definitions/ResultCode"
818
+ }
819
+ }
820
+ },
821
+ "parameters": [
822
+ {
823
+ "name": "l1_address",
824
+ "in": "query",
825
+ "required": true,
826
+ "type": "string"
827
+ },
828
+ {
829
+ "name": "cursor",
830
+ "in": "query",
831
+ "required": false,
832
+ "type": "string"
833
+ }
834
+ ],
835
+ "tags": [
836
+ "bridge"
837
+ ],
838
+ "consumes": [
839
+ "multipart/form-data"
840
+ ],
841
+ "description": "Get deposit history"
842
+ }
843
+ },
844
+ "/api/v1/deposit/latest": {
845
+ "get": {
846
+ "summary": "deposit_latest",
847
+ "operationId": "deposit_latest",
848
+ "responses": {
849
+ "200": {
850
+ "description": "A successful response.",
851
+ "schema": {
852
+ "$ref": "#/definitions/Deposit"
853
+ }
854
+ },
855
+ "400": {
856
+ "description": "Bad request",
857
+ "schema": {
858
+ "$ref": "#/definitions/ResultCode"
859
+ }
860
+ }
861
+ },
862
+ "parameters": [
863
+ {
864
+ "name": "l1_address",
865
+ "in": "query",
866
+ "required": true,
867
+ "type": "string"
868
+ }
869
+ ],
870
+ "tags": [
871
+ "bridge"
872
+ ],
873
+ "consumes": [
874
+ "multipart/form-data"
875
+ ],
876
+ "description": "Get most recent deposit for given l1 address"
877
+ }
878
+ },
879
+ "/api/v1/deposit/networks": {
880
+ "get": {
881
+ "summary": "deposit_networks",
882
+ "operationId": "deposit_networks",
883
+ "responses": {
884
+ "200": {
885
+ "description": "A successful response.",
886
+ "schema": {
887
+ "$ref": "#/definitions/BridgeSupportedNetworks"
888
+ }
889
+ },
890
+ "400": {
891
+ "description": "Bad request",
892
+ "schema": {
893
+ "$ref": "#/definitions/ResultCode"
894
+ }
895
+ }
896
+ },
897
+ "tags": [
898
+ "bridge"
899
+ ],
900
+ "description": "Get deposit supporting networks"
901
+ }
902
+ },
766
903
  "/api/v1/exchangeStats": {
767
904
  "get": {
768
905
  "summary": "exchangeStats",
@@ -1820,6 +1957,71 @@
1820
1957
  ],
1821
1958
  "description": "Get transactions which are already packed into blocks"
1822
1959
  }
1960
+ },
1961
+ "/api/v1/withdraw/history": {
1962
+ "get": {
1963
+ "summary": "withdraw_history",
1964
+ "operationId": "withdraw_history",
1965
+ "responses": {
1966
+ "200": {
1967
+ "description": "A successful response.",
1968
+ "schema": {
1969
+ "$ref": "#/definitions/WithdrawHistory"
1970
+ }
1971
+ },
1972
+ "400": {
1973
+ "description": "Bad request",
1974
+ "schema": {
1975
+ "$ref": "#/definitions/ResultCode"
1976
+ }
1977
+ }
1978
+ },
1979
+ "parameters": [
1980
+ {
1981
+ "name": "l1_address",
1982
+ "in": "query",
1983
+ "required": true,
1984
+ "type": "string"
1985
+ },
1986
+ {
1987
+ "name": "cursor",
1988
+ "in": "query",
1989
+ "required": false,
1990
+ "type": "string"
1991
+ }
1992
+ ],
1993
+ "tags": [
1994
+ "bridge"
1995
+ ],
1996
+ "consumes": [
1997
+ "multipart/form-data"
1998
+ ],
1999
+ "description": "Get withdraw history"
2000
+ }
2001
+ },
2002
+ "/info": {
2003
+ "get": {
2004
+ "summary": "info",
2005
+ "operationId": "info",
2006
+ "responses": {
2007
+ "200": {
2008
+ "description": "A successful response.",
2009
+ "schema": {
2010
+ "$ref": "#/definitions/ZkLighterInfo"
2011
+ }
2012
+ },
2013
+ "400": {
2014
+ "description": "Bad request",
2015
+ "schema": {
2016
+ "$ref": "#/definitions/ResultCode"
2017
+ }
2018
+ }
2019
+ },
2020
+ "tags": [
2021
+ "root"
2022
+ ],
2023
+ "description": "Get info of zklighter"
2024
+ }
1823
2025
  }
1824
2026
  },
1825
2027
  "definitions": {
@@ -2251,6 +2453,59 @@
2251
2453
  "blocks"
2252
2454
  ]
2253
2455
  },
2456
+ "BridgeSupportedNetwork": {
2457
+ "type": "object",
2458
+ "properties": {
2459
+ "name": {
2460
+ "type": "string",
2461
+ "example": "Arbitrum"
2462
+ },
2463
+ "chain_id": {
2464
+ "type": "string",
2465
+ "example": "4164"
2466
+ },
2467
+ "explorer": {
2468
+ "type": "string",
2469
+ "example": "https://arbiscan.io/"
2470
+ },
2471
+ "is_cex": {
2472
+ "type": "boolean",
2473
+ "format": "boolean",
2474
+ "example": "false"
2475
+ }
2476
+ },
2477
+ "title": "BridgeSupportedNetwork",
2478
+ "required": [
2479
+ "name",
2480
+ "chain_id",
2481
+ "explorer",
2482
+ "is_cex"
2483
+ ]
2484
+ },
2485
+ "BridgeSupportedNetworks": {
2486
+ "type": "object",
2487
+ "properties": {
2488
+ "code": {
2489
+ "type": "integer",
2490
+ "format": "int32",
2491
+ "example": "200"
2492
+ },
2493
+ "message": {
2494
+ "type": "string"
2495
+ },
2496
+ "networks": {
2497
+ "type": "array",
2498
+ "items": {
2499
+ "$ref": "#/definitions/BridgeSupportedNetwork"
2500
+ }
2501
+ }
2502
+ },
2503
+ "title": "BridgeSupportedNetworks",
2504
+ "required": [
2505
+ "code",
2506
+ "networks"
2507
+ ]
2508
+ },
2254
2509
  "Candlestick": {
2255
2510
  "type": "object",
2256
2511
  "properties": {
@@ -2354,6 +2609,27 @@
2354
2609
  "address"
2355
2610
  ]
2356
2611
  },
2612
+ "CreateIntentAddressResp": {
2613
+ "type": "object",
2614
+ "properties": {
2615
+ "code": {
2616
+ "type": "integer",
2617
+ "format": "int32",
2618
+ "example": "200"
2619
+ },
2620
+ "message": {
2621
+ "type": "string"
2622
+ },
2623
+ "intent_address": {
2624
+ "type": "string"
2625
+ }
2626
+ },
2627
+ "title": "CreateIntentAddressResp",
2628
+ "required": [
2629
+ "code",
2630
+ "intent_address"
2631
+ ]
2632
+ },
2357
2633
  "CurrentHeight": {
2358
2634
  "type": "object",
2359
2635
  "properties": {
@@ -2385,6 +2661,107 @@
2385
2661
  },
2386
2662
  "title": "Cursor"
2387
2663
  },
2664
+ "Deposit": {
2665
+ "type": "object",
2666
+ "properties": {
2667
+ "code": {
2668
+ "type": "integer",
2669
+ "format": "int32",
2670
+ "example": "200"
2671
+ },
2672
+ "message": {
2673
+ "type": "string"
2674
+ },
2675
+ "source": {
2676
+ "type": "string",
2677
+ "example": "Arbitrum"
2678
+ },
2679
+ "amount": {
2680
+ "type": "string"
2681
+ },
2682
+ "intent_address": {
2683
+ "type": "string"
2684
+ },
2685
+ "status": {
2686
+ "type": "string"
2687
+ },
2688
+ "step": {
2689
+ "type": "string"
2690
+ },
2691
+ "description": {
2692
+ "type": "string"
2693
+ },
2694
+ "created_at": {
2695
+ "type": "integer",
2696
+ "format": "int64"
2697
+ },
2698
+ "updated_at": {
2699
+ "type": "integer",
2700
+ "format": "int64"
2701
+ }
2702
+ },
2703
+ "title": "Deposit",
2704
+ "required": [
2705
+ "code",
2706
+ "source",
2707
+ "amount",
2708
+ "intent_address",
2709
+ "status",
2710
+ "step",
2711
+ "description",
2712
+ "created_at",
2713
+ "updated_at"
2714
+ ]
2715
+ },
2716
+ "DepositHistory": {
2717
+ "type": "object",
2718
+ "properties": {
2719
+ "code": {
2720
+ "type": "integer",
2721
+ "format": "int32",
2722
+ "example": "200"
2723
+ },
2724
+ "message": {
2725
+ "type": "string"
2726
+ },
2727
+ "deposits": {
2728
+ "type": "array",
2729
+ "items": {
2730
+ "$ref": "#/definitions/DepositHistoryItem"
2731
+ }
2732
+ },
2733
+ "cursor": {
2734
+ "type": "string"
2735
+ }
2736
+ },
2737
+ "title": "DepositHistory",
2738
+ "required": [
2739
+ "code",
2740
+ "deposits",
2741
+ "cursor"
2742
+ ]
2743
+ },
2744
+ "DepositHistoryItem": {
2745
+ "type": "object",
2746
+ "properties": {
2747
+ "id": {
2748
+ "type": "string"
2749
+ },
2750
+ "amount": {
2751
+ "type": "string"
2752
+ },
2753
+ "timestamp": {
2754
+ "type": "integer",
2755
+ "format": "int64"
2756
+ }
2757
+ },
2758
+ "title": "DepositHistoryItem",
2759
+ "required": [
2760
+ "id",
2761
+ "amount",
2762
+ "timestamp"
2763
+ ]
2764
+ },
2388
2765
  "DetailedAccount": {
2389
2766
  "type": "object",
2390
2767
  "properties": {
@@ -4028,6 +4405,27 @@
4028
4405
  "public_pools"
4029
4406
  ]
4030
4407
  },
4408
+ "ReqCreateIntentAddress": {
4409
+ "type": "object",
4410
+ "properties": {
4411
+ "chain_id": {
4412
+ "type": "integer",
4413
+ "format": "int64"
4414
+ },
4415
+ "from_addr": {
4416
+ "type": "string"
4417
+ },
4418
+ "amount": {
4419
+ "type": "string"
4420
+ }
4421
+ },
4422
+ "title": "ReqCreateIntentAddress",
4423
+ "required": [
4424
+ "chain_id",
4425
+ "from_addr",
4426
+ "amount"
4427
+ ]
4428
+ },
4031
4429
  "ReqDoFaucet": {
4032
4430
  "type": "object",
4033
4431
  "properties": {
@@ -4380,6 +4778,21 @@
4380
4778
  "count_back"
4381
4779
  ]
4382
4780
  },
4781
+ "ReqGetDepositHistory": {
4782
+ "type": "object",
4783
+ "properties": {
4784
+ "l1_address": {
4785
+ "type": "string"
4786
+ },
4787
+ "cursor": {
4788
+ "type": "string"
4789
+ }
4790
+ },
4791
+ "title": "ReqGetDepositHistory",
4792
+ "required": [
4793
+ "l1_address"
4794
+ ]
4795
+ },
4383
4796
  "ReqGetExchangeStats": {
4384
4797
  "type": "object",
4385
4798
  "title": "ReqGetExchangeStats"
@@ -4444,6 +4857,18 @@
4444
4857
  "hash"
4445
4858
  ]
4446
4859
  },
4860
+ "ReqGetLatestDeposit": {
4861
+ "type": "object",
4862
+ "properties": {
4863
+ "l1_address": {
4864
+ "type": "string"
4865
+ }
4866
+ },
4867
+ "title": "ReqGetLatestDeposit",
4868
+ "required": [
4869
+ "l1_address"
4870
+ ]
4871
+ },
4447
4872
  "ReqGetLeaderboard": {
4448
4873
  "type": "object",
4449
4874
  "properties": {
@@ -4705,6 +5130,21 @@
4705
5130
  "value"
4706
5131
  ]
4707
5132
  },
5133
+ "ReqGetWithdrawHistory": {
5134
+ "type": "object",
5135
+ "properties": {
5136
+ "l1_address": {
5137
+ "type": "string"
5138
+ },
5139
+ "cursor": {
5140
+ "type": "string"
5141
+ }
5142
+ },
5143
+ "title": "ReqGetWithdrawHistory",
5144
+ "required": [
5145
+ "l1_address"
5146
+ ]
5147
+ },
4708
5148
  "ReqIsWhitelisted": {
4709
5149
  "type": "object",
4710
5150
  "properties": {
@@ -5246,6 +5686,68 @@
5246
5686
  "address",
5247
5687
  "is_active"
5248
5688
  ]
5689
+ },
5690
+ "WithdrawHistory": {
5691
+ "type": "object",
5692
+ "properties": {
5693
+ "code": {
5694
+ "type": "integer",
5695
+ "format": "int32",
5696
+ "example": "200"
5697
+ },
5698
+ "message": {
5699
+ "type": "string"
5700
+ },
5701
+ "withdraws": {
5702
+ "type": "array",
5703
+ "items": {
5704
+ "$ref": "#/definitions/WithdrawHistoryItem"
5705
+ }
5706
+ },
5707
+ "cursor": {
5708
+ "type": "string"
5709
+ }
5710
+ },
5711
+ "title": "WithdrawHistory",
5712
+ "required": [
5713
+ "code",
5714
+ "withdraws",
5715
+ "cursor"
5716
+ ]
5717
+ },
5718
+ "WithdrawHistoryItem": {
5719
+ "type": "object",
5720
+ "properties": {
5721
+ "id": {
5722
+ "type": "string"
5723
+ },
5724
+ "amount": {
5725
+ "type": "string"
5726
+ },
5727
+ "timestamp": {
5728
+ "type": "integer",
5729
+ "format": "int64"
5730
+ }
5731
+ },
5732
+ "title": "WithdrawHistoryItem",
5733
+ "required": [
5734
+ "id",
5735
+ "amount",
5736
+ "timestamp"
5737
+ ]
5738
+ },
5739
+ "ZkLighterInfo": {
5740
+ "type": "object",
5741
+ "properties": {
5742
+ "contract_address": {
5743
+ "type": "string",
5744
+ "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
5745
+ }
5746
+ },
5747
+ "title": "ZkLighterInfo",
5748
+ "required": [
5749
+ "contract_address"
5750
+ ]
5249
5751
  }
5250
5752
  },
5251
5753
  "securityDefinitions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {