@proton/wrap-constants 0.2.82 → 0.2.83
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.d.ts +66 -21
- package/dist/index.js +20 -7
- package/dist/index.mjs +18 -5
- package/package.json +2 -2
- package/src/parsers/dex.ts +25 -21
package/dist/index.d.ts
CHANGED
|
@@ -6463,6 +6463,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6463
6463
|
block_num: z.ZodString;
|
|
6464
6464
|
block_time: z.ZodString;
|
|
6465
6465
|
order_id: z.ZodString;
|
|
6466
|
+
ordinal_order_id: z.ZodString;
|
|
6466
6467
|
market_id: z.ZodNumber;
|
|
6467
6468
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6468
6469
|
quantity_curr: z.ZodNumber;
|
|
@@ -6485,6 +6486,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6485
6486
|
block_num: string;
|
|
6486
6487
|
block_time: string;
|
|
6487
6488
|
order_id: string;
|
|
6489
|
+
ordinal_order_id: string;
|
|
6488
6490
|
market_id: number;
|
|
6489
6491
|
quantity_curr: number;
|
|
6490
6492
|
account_name: string;
|
|
@@ -6505,6 +6507,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6505
6507
|
block_num: string;
|
|
6506
6508
|
block_time: string;
|
|
6507
6509
|
order_id: string;
|
|
6510
|
+
ordinal_order_id: string;
|
|
6508
6511
|
market_id: number;
|
|
6509
6512
|
quantity_curr: number;
|
|
6510
6513
|
account_name: string;
|
|
@@ -6545,6 +6548,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6545
6548
|
block_num: z.ZodString;
|
|
6546
6549
|
block_time: z.ZodString;
|
|
6547
6550
|
order_id: z.ZodString;
|
|
6551
|
+
ordinal_order_id: z.ZodString;
|
|
6548
6552
|
market_id: z.ZodNumber;
|
|
6549
6553
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6550
6554
|
quantity_curr: z.ZodNumber;
|
|
@@ -6567,6 +6571,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6567
6571
|
block_num: string;
|
|
6568
6572
|
block_time: string;
|
|
6569
6573
|
order_id: string;
|
|
6574
|
+
ordinal_order_id: string;
|
|
6570
6575
|
market_id: number;
|
|
6571
6576
|
quantity_curr: number;
|
|
6572
6577
|
account_name: string;
|
|
@@ -6587,6 +6592,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6587
6592
|
block_num: string;
|
|
6588
6593
|
block_time: string;
|
|
6589
6594
|
order_id: string;
|
|
6595
|
+
ordinal_order_id: string;
|
|
6590
6596
|
market_id: number;
|
|
6591
6597
|
quantity_curr: number;
|
|
6592
6598
|
account_name: string;
|
|
@@ -6609,6 +6615,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6609
6615
|
block_num: string;
|
|
6610
6616
|
block_time: string;
|
|
6611
6617
|
order_id: string;
|
|
6618
|
+
ordinal_order_id: string;
|
|
6612
6619
|
market_id: number;
|
|
6613
6620
|
quantity_curr: number;
|
|
6614
6621
|
account_name: string;
|
|
@@ -6633,6 +6640,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6633
6640
|
block_num: string;
|
|
6634
6641
|
block_time: string;
|
|
6635
6642
|
order_id: string;
|
|
6643
|
+
ordinal_order_id: string;
|
|
6636
6644
|
market_id: number;
|
|
6637
6645
|
quantity_curr: number;
|
|
6638
6646
|
account_name: string;
|
|
@@ -6682,6 +6690,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6682
6690
|
block_num: z.ZodString;
|
|
6683
6691
|
block_time: z.ZodString;
|
|
6684
6692
|
order_id: z.ZodString;
|
|
6693
|
+
ordinal_order_id: z.ZodString;
|
|
6685
6694
|
market_id: z.ZodNumber;
|
|
6686
6695
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6687
6696
|
quantity_curr: z.ZodNumber;
|
|
@@ -6704,6 +6713,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6704
6713
|
block_num: string;
|
|
6705
6714
|
block_time: string;
|
|
6706
6715
|
order_id: string;
|
|
6716
|
+
ordinal_order_id: string;
|
|
6707
6717
|
market_id: number;
|
|
6708
6718
|
quantity_curr: number;
|
|
6709
6719
|
account_name: string;
|
|
@@ -6724,6 +6734,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6724
6734
|
block_num: string;
|
|
6725
6735
|
block_time: string;
|
|
6726
6736
|
order_id: string;
|
|
6737
|
+
ordinal_order_id: string;
|
|
6727
6738
|
market_id: number;
|
|
6728
6739
|
quantity_curr: number;
|
|
6729
6740
|
account_name: string;
|
|
@@ -6746,6 +6757,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6746
6757
|
block_num: string;
|
|
6747
6758
|
block_time: string;
|
|
6748
6759
|
order_id: string;
|
|
6760
|
+
ordinal_order_id: string;
|
|
6749
6761
|
market_id: number;
|
|
6750
6762
|
quantity_curr: number;
|
|
6751
6763
|
account_name: string;
|
|
@@ -6770,6 +6782,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6770
6782
|
block_num: string;
|
|
6771
6783
|
block_time: string;
|
|
6772
6784
|
order_id: string;
|
|
6785
|
+
ordinal_order_id: string;
|
|
6773
6786
|
market_id: number;
|
|
6774
6787
|
quantity_curr: number;
|
|
6775
6788
|
account_name: string;
|
|
@@ -6789,20 +6802,30 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6789
6802
|
sync: number;
|
|
6790
6803
|
}>;
|
|
6791
6804
|
declare type GetOrderHistoryResponse = z.infer<typeof getOrderHistoryResponseParser>;
|
|
6792
|
-
declare const
|
|
6793
|
-
order_id: z.ZodString
|
|
6805
|
+
declare const getOrderLifecycleParser: z.ZodEffects<z.ZodObject<{
|
|
6806
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
6807
|
+
ordinal_order_id: z.ZodOptional<z.ZodString>;
|
|
6794
6808
|
}, "strip", z.ZodTypeAny, {
|
|
6795
|
-
order_id
|
|
6809
|
+
order_id?: string | undefined;
|
|
6810
|
+
ordinal_order_id?: string | undefined;
|
|
6796
6811
|
}, {
|
|
6797
|
-
order_id
|
|
6812
|
+
order_id?: string | undefined;
|
|
6813
|
+
ordinal_order_id?: string | undefined;
|
|
6814
|
+
}>, {
|
|
6815
|
+
order_id?: string | undefined;
|
|
6816
|
+
ordinal_order_id?: string | undefined;
|
|
6817
|
+
}, {
|
|
6818
|
+
order_id?: string | undefined;
|
|
6819
|
+
ordinal_order_id?: string | undefined;
|
|
6798
6820
|
}>;
|
|
6799
|
-
declare type
|
|
6800
|
-
declare const
|
|
6821
|
+
declare type GetOrderLifecycle = z.infer<typeof getOrderLifecycleParser>;
|
|
6822
|
+
declare const getOrderLifecycleResponseParser: z.ZodObject<{
|
|
6801
6823
|
sync: z.ZodNumber;
|
|
6802
6824
|
data: z.ZodArray<z.ZodObject<{
|
|
6803
6825
|
block_num: z.ZodString;
|
|
6804
6826
|
block_time: z.ZodString;
|
|
6805
6827
|
order_id: z.ZodString;
|
|
6828
|
+
ordinal_order_id: z.ZodString;
|
|
6806
6829
|
market_id: z.ZodNumber;
|
|
6807
6830
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6808
6831
|
quantity_curr: z.ZodNumber;
|
|
@@ -6825,6 +6848,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6825
6848
|
block_num: string;
|
|
6826
6849
|
block_time: string;
|
|
6827
6850
|
order_id: string;
|
|
6851
|
+
ordinal_order_id: string;
|
|
6828
6852
|
market_id: number;
|
|
6829
6853
|
quantity_curr: number;
|
|
6830
6854
|
account_name: string;
|
|
@@ -6845,6 +6869,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6845
6869
|
block_num: string;
|
|
6846
6870
|
block_time: string;
|
|
6847
6871
|
order_id: string;
|
|
6872
|
+
ordinal_order_id: string;
|
|
6848
6873
|
market_id: number;
|
|
6849
6874
|
quantity_curr: number;
|
|
6850
6875
|
account_name: string;
|
|
@@ -6867,6 +6892,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6867
6892
|
block_num: string;
|
|
6868
6893
|
block_time: string;
|
|
6869
6894
|
order_id: string;
|
|
6895
|
+
ordinal_order_id: string;
|
|
6870
6896
|
market_id: number;
|
|
6871
6897
|
quantity_curr: number;
|
|
6872
6898
|
account_name: string;
|
|
@@ -6890,6 +6916,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6890
6916
|
block_num: string;
|
|
6891
6917
|
block_time: string;
|
|
6892
6918
|
order_id: string;
|
|
6919
|
+
ordinal_order_id: string;
|
|
6893
6920
|
market_id: number;
|
|
6894
6921
|
quantity_curr: number;
|
|
6895
6922
|
account_name: string;
|
|
@@ -6907,7 +6934,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6907
6934
|
}[];
|
|
6908
6935
|
sync: number;
|
|
6909
6936
|
}>;
|
|
6910
|
-
declare type
|
|
6937
|
+
declare type GetOrderLifecycleResponse = z.infer<typeof getOrderLifecycleResponseParser>;
|
|
6911
6938
|
declare const submitOrderParser: z.ZodObject<{
|
|
6912
6939
|
serialized_tx_hex: z.ZodString;
|
|
6913
6940
|
signatures: z.ZodArray<z.ZodString, "many">;
|
|
@@ -6922,24 +6949,29 @@ declare type SubmitOrderParser = z.infer<typeof submitOrderParser>;
|
|
|
6922
6949
|
declare const submitOrderResponseParser: z.ZodObject<{
|
|
6923
6950
|
sync: z.ZodNumber;
|
|
6924
6951
|
data: z.ZodObject<{
|
|
6952
|
+
ordinal_order_ids: z.ZodArray<z.ZodString, "many">;
|
|
6925
6953
|
order_ids: z.ZodArray<z.ZodNumber, "many">;
|
|
6926
6954
|
trx_id: z.ZodString;
|
|
6927
6955
|
}, "strip", z.ZodTypeAny, {
|
|
6928
6956
|
trx_id: string;
|
|
6957
|
+
ordinal_order_ids: string[];
|
|
6929
6958
|
order_ids: number[];
|
|
6930
6959
|
}, {
|
|
6931
6960
|
trx_id: string;
|
|
6961
|
+
ordinal_order_ids: string[];
|
|
6932
6962
|
order_ids: number[];
|
|
6933
6963
|
}>;
|
|
6934
6964
|
}, "strip", z.ZodTypeAny, {
|
|
6935
6965
|
data: {
|
|
6936
6966
|
trx_id: string;
|
|
6967
|
+
ordinal_order_ids: string[];
|
|
6937
6968
|
order_ids: number[];
|
|
6938
6969
|
};
|
|
6939
6970
|
sync: number;
|
|
6940
6971
|
}, {
|
|
6941
6972
|
data: {
|
|
6942
6973
|
trx_id: string;
|
|
6974
|
+
ordinal_order_ids: string[];
|
|
6943
6975
|
order_ids: number[];
|
|
6944
6976
|
};
|
|
6945
6977
|
sync: number;
|
|
@@ -7398,11 +7430,13 @@ declare const tradeParser: z.ZodObject<{
|
|
|
7398
7430
|
price: z.ZodNumber;
|
|
7399
7431
|
bid_user: z.ZodString;
|
|
7400
7432
|
bid_user_order_id: z.ZodString;
|
|
7433
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7401
7434
|
bid_total: z.ZodNumber;
|
|
7402
7435
|
bid_amount: z.ZodNumber;
|
|
7403
7436
|
bid_fee: z.ZodNumber;
|
|
7404
7437
|
ask_user: z.ZodString;
|
|
7405
7438
|
ask_user_order_id: z.ZodString;
|
|
7439
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7406
7440
|
ask_total: z.ZodNumber;
|
|
7407
7441
|
ask_amount: z.ZodNumber;
|
|
7408
7442
|
ask_fee: z.ZodNumber;
|
|
@@ -7418,11 +7452,13 @@ declare const tradeParser: z.ZodObject<{
|
|
|
7418
7452
|
trade_id: string;
|
|
7419
7453
|
bid_user: string;
|
|
7420
7454
|
bid_user_order_id: string;
|
|
7455
|
+
bid_user_ordinal_order_id: string;
|
|
7421
7456
|
bid_total: number;
|
|
7422
7457
|
bid_amount: number;
|
|
7423
7458
|
bid_fee: number;
|
|
7424
7459
|
ask_user: string;
|
|
7425
7460
|
ask_user_order_id: string;
|
|
7461
|
+
ask_user_ordinal_order_id: string;
|
|
7426
7462
|
ask_total: number;
|
|
7427
7463
|
ask_amount: number;
|
|
7428
7464
|
ask_fee: number;
|
|
@@ -7436,11 +7472,13 @@ declare const tradeParser: z.ZodObject<{
|
|
|
7436
7472
|
trade_id: string;
|
|
7437
7473
|
bid_user: string;
|
|
7438
7474
|
bid_user_order_id: string;
|
|
7475
|
+
bid_user_ordinal_order_id: string;
|
|
7439
7476
|
bid_total: number;
|
|
7440
7477
|
bid_amount: number;
|
|
7441
7478
|
bid_fee: number;
|
|
7442
7479
|
ask_user: string;
|
|
7443
7480
|
ask_user_order_id: string;
|
|
7481
|
+
ask_user_ordinal_order_id: string;
|
|
7444
7482
|
ask_total: number;
|
|
7445
7483
|
ask_amount: number;
|
|
7446
7484
|
ask_fee: number;
|
|
@@ -7470,11 +7508,13 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7470
7508
|
price: z.ZodNumber;
|
|
7471
7509
|
bid_user: z.ZodString;
|
|
7472
7510
|
bid_user_order_id: z.ZodString;
|
|
7511
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7473
7512
|
bid_total: z.ZodNumber;
|
|
7474
7513
|
bid_amount: z.ZodNumber;
|
|
7475
7514
|
bid_fee: z.ZodNumber;
|
|
7476
7515
|
ask_user: z.ZodString;
|
|
7477
7516
|
ask_user_order_id: z.ZodString;
|
|
7517
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7478
7518
|
ask_total: z.ZodNumber;
|
|
7479
7519
|
ask_amount: z.ZodNumber;
|
|
7480
7520
|
ask_fee: z.ZodNumber;
|
|
@@ -7490,11 +7530,13 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7490
7530
|
trade_id: string;
|
|
7491
7531
|
bid_user: string;
|
|
7492
7532
|
bid_user_order_id: string;
|
|
7533
|
+
bid_user_ordinal_order_id: string;
|
|
7493
7534
|
bid_total: number;
|
|
7494
7535
|
bid_amount: number;
|
|
7495
7536
|
bid_fee: number;
|
|
7496
7537
|
ask_user: string;
|
|
7497
7538
|
ask_user_order_id: string;
|
|
7539
|
+
ask_user_ordinal_order_id: string;
|
|
7498
7540
|
ask_total: number;
|
|
7499
7541
|
ask_amount: number;
|
|
7500
7542
|
ask_fee: number;
|
|
@@ -7508,11 +7550,13 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7508
7550
|
trade_id: string;
|
|
7509
7551
|
bid_user: string;
|
|
7510
7552
|
bid_user_order_id: string;
|
|
7553
|
+
bid_user_ordinal_order_id: string;
|
|
7511
7554
|
bid_total: number;
|
|
7512
7555
|
bid_amount: number;
|
|
7513
7556
|
bid_fee: number;
|
|
7514
7557
|
ask_user: string;
|
|
7515
7558
|
ask_user_order_id: string;
|
|
7559
|
+
ask_user_ordinal_order_id: string;
|
|
7516
7560
|
ask_total: number;
|
|
7517
7561
|
ask_amount: number;
|
|
7518
7562
|
ask_fee: number;
|
|
@@ -7528,11 +7572,13 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7528
7572
|
trade_id: string;
|
|
7529
7573
|
bid_user: string;
|
|
7530
7574
|
bid_user_order_id: string;
|
|
7575
|
+
bid_user_ordinal_order_id: string;
|
|
7531
7576
|
bid_total: number;
|
|
7532
7577
|
bid_amount: number;
|
|
7533
7578
|
bid_fee: number;
|
|
7534
7579
|
ask_user: string;
|
|
7535
7580
|
ask_user_order_id: string;
|
|
7581
|
+
ask_user_ordinal_order_id: string;
|
|
7536
7582
|
ask_total: number;
|
|
7537
7583
|
ask_amount: number;
|
|
7538
7584
|
ask_fee: number;
|
|
@@ -7549,11 +7595,13 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7549
7595
|
trade_id: string;
|
|
7550
7596
|
bid_user: string;
|
|
7551
7597
|
bid_user_order_id: string;
|
|
7598
|
+
bid_user_ordinal_order_id: string;
|
|
7552
7599
|
bid_total: number;
|
|
7553
7600
|
bid_amount: number;
|
|
7554
7601
|
bid_fee: number;
|
|
7555
7602
|
ask_user: string;
|
|
7556
7603
|
ask_user_order_id: string;
|
|
7604
|
+
ask_user_ordinal_order_id: string;
|
|
7557
7605
|
ask_total: number;
|
|
7558
7606
|
ask_amount: number;
|
|
7559
7607
|
ask_fee: number;
|
|
@@ -7589,11 +7637,13 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7589
7637
|
price: z.ZodNumber;
|
|
7590
7638
|
bid_user: z.ZodString;
|
|
7591
7639
|
bid_user_order_id: z.ZodString;
|
|
7640
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7592
7641
|
bid_total: z.ZodNumber;
|
|
7593
7642
|
bid_amount: z.ZodNumber;
|
|
7594
7643
|
bid_fee: z.ZodNumber;
|
|
7595
7644
|
ask_user: z.ZodString;
|
|
7596
7645
|
ask_user_order_id: z.ZodString;
|
|
7646
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7597
7647
|
ask_total: z.ZodNumber;
|
|
7598
7648
|
ask_amount: z.ZodNumber;
|
|
7599
7649
|
ask_fee: z.ZodNumber;
|
|
@@ -7609,11 +7659,13 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7609
7659
|
trade_id: string;
|
|
7610
7660
|
bid_user: string;
|
|
7611
7661
|
bid_user_order_id: string;
|
|
7662
|
+
bid_user_ordinal_order_id: string;
|
|
7612
7663
|
bid_total: number;
|
|
7613
7664
|
bid_amount: number;
|
|
7614
7665
|
bid_fee: number;
|
|
7615
7666
|
ask_user: string;
|
|
7616
7667
|
ask_user_order_id: string;
|
|
7668
|
+
ask_user_ordinal_order_id: string;
|
|
7617
7669
|
ask_total: number;
|
|
7618
7670
|
ask_amount: number;
|
|
7619
7671
|
ask_fee: number;
|
|
@@ -7627,11 +7679,13 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7627
7679
|
trade_id: string;
|
|
7628
7680
|
bid_user: string;
|
|
7629
7681
|
bid_user_order_id: string;
|
|
7682
|
+
bid_user_ordinal_order_id: string;
|
|
7630
7683
|
bid_total: number;
|
|
7631
7684
|
bid_amount: number;
|
|
7632
7685
|
bid_fee: number;
|
|
7633
7686
|
ask_user: string;
|
|
7634
7687
|
ask_user_order_id: string;
|
|
7688
|
+
ask_user_ordinal_order_id: string;
|
|
7635
7689
|
ask_total: number;
|
|
7636
7690
|
ask_amount: number;
|
|
7637
7691
|
ask_fee: number;
|
|
@@ -7647,11 +7701,13 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7647
7701
|
trade_id: string;
|
|
7648
7702
|
bid_user: string;
|
|
7649
7703
|
bid_user_order_id: string;
|
|
7704
|
+
bid_user_ordinal_order_id: string;
|
|
7650
7705
|
bid_total: number;
|
|
7651
7706
|
bid_amount: number;
|
|
7652
7707
|
bid_fee: number;
|
|
7653
7708
|
ask_user: string;
|
|
7654
7709
|
ask_user_order_id: string;
|
|
7710
|
+
ask_user_ordinal_order_id: string;
|
|
7655
7711
|
ask_total: number;
|
|
7656
7712
|
ask_amount: number;
|
|
7657
7713
|
ask_fee: number;
|
|
@@ -7669,11 +7725,13 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7669
7725
|
trade_id: string;
|
|
7670
7726
|
bid_user: string;
|
|
7671
7727
|
bid_user_order_id: string;
|
|
7728
|
+
bid_user_ordinal_order_id: string;
|
|
7672
7729
|
bid_total: number;
|
|
7673
7730
|
bid_amount: number;
|
|
7674
7731
|
bid_fee: number;
|
|
7675
7732
|
ask_user: string;
|
|
7676
7733
|
ask_user_order_id: string;
|
|
7734
|
+
ask_user_ordinal_order_id: string;
|
|
7677
7735
|
ask_total: number;
|
|
7678
7736
|
ask_amount: number;
|
|
7679
7737
|
ask_fee: number;
|
|
@@ -7922,19 +7980,6 @@ declare enum logStatus {
|
|
|
7922
7980
|
CANCEL = "cancel",
|
|
7923
7981
|
DELETE = "delete"
|
|
7924
7982
|
}
|
|
7925
|
-
interface CurrentOrder {
|
|
7926
|
-
order_id: number;
|
|
7927
|
-
market_id: number;
|
|
7928
|
-
quantity_init: number;
|
|
7929
|
-
quantity_curr: number;
|
|
7930
|
-
price: number;
|
|
7931
|
-
account_name: string;
|
|
7932
|
-
order_side: number;
|
|
7933
|
-
order_type: number;
|
|
7934
|
-
status: string;
|
|
7935
|
-
created_at: string;
|
|
7936
|
-
updated_at: string;
|
|
7937
|
-
}
|
|
7938
7983
|
interface DbMarket {
|
|
7939
7984
|
market_id: number;
|
|
7940
7985
|
order_min: number;
|
|
@@ -8968,4 +9013,4 @@ declare const isInputInvalid: (data: string, value: string | number, pool: {
|
|
|
8968
9013
|
}) => boolean;
|
|
8969
9014
|
declare const applyDiscountToFee: (fee: number, staked: number) => number;
|
|
8970
9015
|
|
|
8971
|
-
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats,
|
|
9016
|
+
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats, Daily, DbMarket, DepositBody, Depth, ExchangeRate, ExchangeRates, ExtendedAsset, ExtendedAssetParser, ExtendedToken, ExtendedTokenWithRate, FEE_FACTOR, GenerateAddressBody, GenerateAddressResponse, GenerateAuth, GenerateAuthBaseAction, GetDailyResponseParser, GetDepth, GetDepthResponse, GetLeaderboard, GetLeaderboardResponseParser, GetMarketsResponse, GetOHLCV, GetOHLCVResponse, GetOpenOrders, GetOpenOrdersResponse, GetOrderHistory, GetOrderHistoryResponse, GetOrderLifecycle, GetOrderLifecycleResponse, GetReferralTotals, GetReferralTotalsResponseParser, GetReferrals, GetReferralsResponseParser, GetSyncResponse, GetTradeHistory, GetTradeHistoryResponse, GetTrades, GetTradesResponseParser, Graph, ILink, INode, ITopics, Leaderboard, LoginAccountParamsV3, Market, Networks, OHLCV, OrderHistory, OtcOrderResponse, OtcQuoteBody, OtcQuoteResponse, Pool, PoolTable, Providers, Rate, RawPool, Referral, ReferralTotal, Status, SubmitOrderParser, SubmitOrderResponse, Sync, TOPICS, Trade, Transaction, Type, WRAP_AUTH_ACTION, WRAP_CONTRACT, Wallet, WithdrawBody, WithdrawBodyBaseAction, WithdrawHistoryMetalResponse, WithdrawHistoryMetalSwap, WithdrawMetalResponse, WithdrawalFeeQuote, Wrap, WrapSetConf, WrapStart, accountParser, addressParser, applyDiscountToFee, authorizationParser, authorizationsParser, baseActionParser, baseActionSerializedParser, bloksRatesParser, compute_liquidity, compute_transfer, compute_transfer_curve, createAbstractAuthParser, dailyParser, depositBodyParser, depthParser, exchangeRateParser, exchangeRatesParser, explorerLinkByChain, fillType, generateAddressBodyParser, generateAddressResponse, generateAuthParser, getDailyResponseParser, getDepthParser, getDepthResponseParser, getLeaderboardParser, getLeaderboardResponseParser, getMarketsResponseParser, getOhlcvParser, getOhlcvResponseParser, getOpenOrdersParser, getOpenOrdersResponseParser, getOrderHistoryParser, getOrderHistoryResponseParser, getOrderLifecycleParser, getOrderLifecycleResponseParser, getReferralTotalsParser, getReferralTotalsResponseParser, getReferralsParser, getReferralsResponseParser, getSyncResponseParser, getTradeHistoryParser, getTradeHistoryResponseParser, getTradesParser, getTradesResponseParser, initializeCoins, initializeConstants, isInputInvalid, isSameToken, leaderboardParser, logStatus, loginAccountParamsV3Parser, marketParser, median, ohlcvParser, orderHistoryParser, orderSide, orderType, otcOrderResponseParser, otcQuoteBodyParser, otcQuoteResponseParser, protonExplorerTxUrl, rateParser, refferalParser, refferalTotalParser, similarChains, singleActionTransactionParser, submitOrderParser, submitOrderResponseParser, syncParser, tradeParser, transactionParser, webauthActionParser, withdrawBodyParser, withdrawHistoryMetalResponseParser, withdrawHistoryMetalSwapParser, withdrawMetalResponseParser, withdrawalFeeQuoteParser, wrapParser, wrapSetConfParser, wrapStartParser };
|
package/dist/index.js
CHANGED
|
@@ -78,8 +78,8 @@ __export(src_exports, {
|
|
|
78
78
|
getOpenOrdersResponseParser: () => getOpenOrdersResponseParser,
|
|
79
79
|
getOrderHistoryParser: () => getOrderHistoryParser,
|
|
80
80
|
getOrderHistoryResponseParser: () => getOrderHistoryResponseParser,
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
getOrderLifecycleParser: () => getOrderLifecycleParser,
|
|
82
|
+
getOrderLifecycleResponseParser: () => getOrderLifecycleResponseParser,
|
|
83
83
|
getReferralTotalsParser: () => getReferralTotalsParser,
|
|
84
84
|
getReferralTotalsResponseParser: () => getReferralTotalsResponseParser,
|
|
85
85
|
getReferralsParser: () => getReferralsParser,
|
|
@@ -1854,6 +1854,7 @@ var orderHistoryParser = z11.object({
|
|
|
1854
1854
|
block_num: z11.string(),
|
|
1855
1855
|
block_time: z11.string(),
|
|
1856
1856
|
order_id: z11.string(),
|
|
1857
|
+
ordinal_order_id: z11.string(),
|
|
1857
1858
|
market_id: z11.number(),
|
|
1858
1859
|
quantity_init: z11.number().optional(),
|
|
1859
1860
|
quantity_curr: z11.number(),
|
|
@@ -1895,10 +1896,19 @@ var getOrderHistoryResponseParser = z11.object({
|
|
|
1895
1896
|
count: z11.number(),
|
|
1896
1897
|
data: z11.array(orderHistoryParser)
|
|
1897
1898
|
});
|
|
1898
|
-
var
|
|
1899
|
-
order_id: z11.string()
|
|
1899
|
+
var getOrderLifecycleParser = z11.object({
|
|
1900
|
+
order_id: z11.string(),
|
|
1901
|
+
ordinal_order_id: z11.string()
|
|
1902
|
+
}).partial().superRefine((data, ctx) => {
|
|
1903
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
1904
|
+
ctx.addIssue({
|
|
1905
|
+
code: z11.ZodIssueCode.custom,
|
|
1906
|
+
path: ["ordinal_order_id"],
|
|
1907
|
+
message: "One of Order ID or Ordinal Order ID is required"
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1900
1910
|
});
|
|
1901
|
-
var
|
|
1911
|
+
var getOrderLifecycleResponseParser = z11.object({
|
|
1902
1912
|
sync: z11.number(),
|
|
1903
1913
|
data: z11.array(orderHistoryParser)
|
|
1904
1914
|
});
|
|
@@ -1909,6 +1919,7 @@ var submitOrderParser = z11.object({
|
|
|
1909
1919
|
var submitOrderResponseParser = z11.object({
|
|
1910
1920
|
sync: z11.number(),
|
|
1911
1921
|
data: z11.object({
|
|
1922
|
+
ordinal_order_ids: z11.array(z11.string()),
|
|
1912
1923
|
order_ids: z11.array(z11.number()),
|
|
1913
1924
|
trx_id: z11.string()
|
|
1914
1925
|
})
|
|
@@ -1979,11 +1990,13 @@ var tradeParser = z11.object({
|
|
|
1979
1990
|
price: z11.number(),
|
|
1980
1991
|
bid_user: z11.string(),
|
|
1981
1992
|
bid_user_order_id: z11.string(),
|
|
1993
|
+
bid_user_ordinal_order_id: z11.string(),
|
|
1982
1994
|
bid_total: z11.number(),
|
|
1983
1995
|
bid_amount: z11.number(),
|
|
1984
1996
|
bid_fee: z11.number(),
|
|
1985
1997
|
ask_user: z11.string(),
|
|
1986
1998
|
ask_user_order_id: z11.string(),
|
|
1999
|
+
ask_user_ordinal_order_id: z11.string(),
|
|
1987
2000
|
ask_total: z11.number(),
|
|
1988
2001
|
ask_amount: z11.number(),
|
|
1989
2002
|
ask_fee: z11.number(),
|
|
@@ -3811,8 +3824,8 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
3811
3824
|
getOpenOrdersResponseParser,
|
|
3812
3825
|
getOrderHistoryParser,
|
|
3813
3826
|
getOrderHistoryResponseParser,
|
|
3814
|
-
|
|
3815
|
-
|
|
3827
|
+
getOrderLifecycleParser,
|
|
3828
|
+
getOrderLifecycleResponseParser,
|
|
3816
3829
|
getReferralTotalsParser,
|
|
3817
3830
|
getReferralTotalsResponseParser,
|
|
3818
3831
|
getReferralsParser,
|
package/dist/index.mjs
CHANGED
|
@@ -1724,6 +1724,7 @@ var orderHistoryParser = z11.object({
|
|
|
1724
1724
|
block_num: z11.string(),
|
|
1725
1725
|
block_time: z11.string(),
|
|
1726
1726
|
order_id: z11.string(),
|
|
1727
|
+
ordinal_order_id: z11.string(),
|
|
1727
1728
|
market_id: z11.number(),
|
|
1728
1729
|
quantity_init: z11.number().optional(),
|
|
1729
1730
|
quantity_curr: z11.number(),
|
|
@@ -1765,10 +1766,19 @@ var getOrderHistoryResponseParser = z11.object({
|
|
|
1765
1766
|
count: z11.number(),
|
|
1766
1767
|
data: z11.array(orderHistoryParser)
|
|
1767
1768
|
});
|
|
1768
|
-
var
|
|
1769
|
-
order_id: z11.string()
|
|
1769
|
+
var getOrderLifecycleParser = z11.object({
|
|
1770
|
+
order_id: z11.string(),
|
|
1771
|
+
ordinal_order_id: z11.string()
|
|
1772
|
+
}).partial().superRefine((data, ctx) => {
|
|
1773
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
1774
|
+
ctx.addIssue({
|
|
1775
|
+
code: z11.ZodIssueCode.custom,
|
|
1776
|
+
path: ["ordinal_order_id"],
|
|
1777
|
+
message: "One of Order ID or Ordinal Order ID is required"
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1770
1780
|
});
|
|
1771
|
-
var
|
|
1781
|
+
var getOrderLifecycleResponseParser = z11.object({
|
|
1772
1782
|
sync: z11.number(),
|
|
1773
1783
|
data: z11.array(orderHistoryParser)
|
|
1774
1784
|
});
|
|
@@ -1779,6 +1789,7 @@ var submitOrderParser = z11.object({
|
|
|
1779
1789
|
var submitOrderResponseParser = z11.object({
|
|
1780
1790
|
sync: z11.number(),
|
|
1781
1791
|
data: z11.object({
|
|
1792
|
+
ordinal_order_ids: z11.array(z11.string()),
|
|
1782
1793
|
order_ids: z11.array(z11.number()),
|
|
1783
1794
|
trx_id: z11.string()
|
|
1784
1795
|
})
|
|
@@ -1849,11 +1860,13 @@ var tradeParser = z11.object({
|
|
|
1849
1860
|
price: z11.number(),
|
|
1850
1861
|
bid_user: z11.string(),
|
|
1851
1862
|
bid_user_order_id: z11.string(),
|
|
1863
|
+
bid_user_ordinal_order_id: z11.string(),
|
|
1852
1864
|
bid_total: z11.number(),
|
|
1853
1865
|
bid_amount: z11.number(),
|
|
1854
1866
|
bid_fee: z11.number(),
|
|
1855
1867
|
ask_user: z11.string(),
|
|
1856
1868
|
ask_user_order_id: z11.string(),
|
|
1869
|
+
ask_user_ordinal_order_id: z11.string(),
|
|
1857
1870
|
ask_total: z11.number(),
|
|
1858
1871
|
ask_amount: z11.number(),
|
|
1859
1872
|
ask_fee: z11.number(),
|
|
@@ -3680,8 +3693,8 @@ export {
|
|
|
3680
3693
|
getOpenOrdersResponseParser,
|
|
3681
3694
|
getOrderHistoryParser,
|
|
3682
3695
|
getOrderHistoryResponseParser,
|
|
3683
|
-
|
|
3684
|
-
|
|
3696
|
+
getOrderLifecycleParser,
|
|
3697
|
+
getOrderLifecycleResponseParser,
|
|
3685
3698
|
getReferralTotalsParser,
|
|
3686
3699
|
getReferralTotalsResponseParser,
|
|
3687
3700
|
getReferralsParser,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.83",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"resolutions": {
|
|
41
41
|
"typescript": "4.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "ceecdbf112269882eb995b1e6f14c2c8e46a9e2c"
|
|
44
44
|
}
|
package/src/parsers/dex.ts
CHANGED
|
@@ -40,6 +40,7 @@ export const orderHistoryParser = z.object({
|
|
|
40
40
|
block_num: z.string(),
|
|
41
41
|
block_time: z.string(),
|
|
42
42
|
order_id: z.string(),
|
|
43
|
+
ordinal_order_id: z.string(),
|
|
43
44
|
market_id: z.number(),
|
|
44
45
|
quantity_init: z.number().optional(),
|
|
45
46
|
quantity_curr: z.number(),
|
|
@@ -99,16 +100,30 @@ export type GetOrderHistoryResponse = z.infer<
|
|
|
99
100
|
typeof getOrderHistoryResponseParser
|
|
100
101
|
>;
|
|
101
102
|
|
|
102
|
-
export const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
export const getOrderLifecycleParser = z
|
|
104
|
+
.object({
|
|
105
|
+
order_id: z.string(),
|
|
106
|
+
ordinal_order_id: z.string(),
|
|
107
|
+
})
|
|
108
|
+
.partial()
|
|
109
|
+
.superRefine((data, ctx) => {
|
|
110
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
111
|
+
ctx.addIssue({
|
|
112
|
+
code: z.ZodIssueCode.custom,
|
|
113
|
+
path: ["ordinal_order_id"],
|
|
114
|
+
message: "One of Order ID or Ordinal Order ID is required",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
export type GetOrderLifecycle = z.infer<typeof getOrderLifecycleParser>;
|
|
119
|
+
|
|
120
|
+
export const getOrderLifecycleResponseParser = z.object({
|
|
108
121
|
sync: z.number(),
|
|
109
122
|
data: z.array(orderHistoryParser),
|
|
110
123
|
});
|
|
111
|
-
export type
|
|
124
|
+
export type GetOrderLifecycleResponse = z.infer<
|
|
125
|
+
typeof getOrderLifecycleResponseParser
|
|
126
|
+
>;
|
|
112
127
|
|
|
113
128
|
export const submitOrderParser = z.object({
|
|
114
129
|
serialized_tx_hex: z.string(),
|
|
@@ -119,6 +134,7 @@ export type SubmitOrderParser = z.infer<typeof submitOrderParser>;
|
|
|
119
134
|
export const submitOrderResponseParser = z.object({
|
|
120
135
|
sync: z.number(),
|
|
121
136
|
data: z.object({
|
|
137
|
+
ordinal_order_ids: z.array(z.string()),
|
|
122
138
|
order_ids: z.array(z.number()),
|
|
123
139
|
trx_id: z.string(),
|
|
124
140
|
}),
|
|
@@ -220,11 +236,13 @@ export const tradeParser = z.object({
|
|
|
220
236
|
price: z.number(),
|
|
221
237
|
bid_user: z.string(),
|
|
222
238
|
bid_user_order_id: z.string(),
|
|
239
|
+
bid_user_ordinal_order_id: z.string(),
|
|
223
240
|
bid_total: z.number(),
|
|
224
241
|
bid_amount: z.number(),
|
|
225
242
|
bid_fee: z.number(),
|
|
226
243
|
ask_user: z.string(),
|
|
227
244
|
ask_user_order_id: z.string(),
|
|
245
|
+
ask_user_ordinal_order_id: z.string(),
|
|
228
246
|
ask_total: z.number(),
|
|
229
247
|
ask_amount: z.number(),
|
|
230
248
|
ask_fee: z.number(),
|
|
@@ -391,20 +409,6 @@ export enum logStatus {
|
|
|
391
409
|
DELETE = "delete",
|
|
392
410
|
}
|
|
393
411
|
|
|
394
|
-
export interface CurrentOrder {
|
|
395
|
-
order_id: number;
|
|
396
|
-
market_id: number;
|
|
397
|
-
quantity_init: number;
|
|
398
|
-
quantity_curr: number;
|
|
399
|
-
price: number;
|
|
400
|
-
account_name: string;
|
|
401
|
-
order_side: number;
|
|
402
|
-
order_type: number;
|
|
403
|
-
status: string;
|
|
404
|
-
created_at: string;
|
|
405
|
-
updated_at: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
412
|
export interface DbMarket {
|
|
409
413
|
market_id: number;
|
|
410
414
|
order_min: number;
|