@typus/typus-perp-sdk 1.0.2 → 1.0.4
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/src/fetch.d.ts +2 -0
- package/dist/src/fetch.js +28 -13
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.js +12 -2
- package/dist/src/typus_perp/admin/structs.d.ts +66 -4
- package/dist/src/typus_perp/admin/structs.js +155 -1
- package/dist/src/typus_perp/error/functions.d.ts +1 -0
- package/dist/src/typus_perp/error/functions.js +4 -0
- package/dist/src/typus_perp/escrow/structs.d.ts +1 -1
- package/dist/src/typus_perp/index.js +3 -3
- package/dist/src/typus_perp/init.js +2 -1
- package/dist/src/typus_perp/lp-pool/structs.d.ts +26 -26
- package/dist/src/typus_perp/oracle/structs.d.ts +2 -2
- package/dist/src/typus_perp/position/functions.d.ts +3 -0
- package/dist/src/typus_perp/position/functions.js +7 -1
- package/dist/src/typus_perp/position/structs.d.ts +24 -164
- package/dist/src/typus_perp/position/structs.js +19 -209
- package/dist/src/typus_perp/symbol/structs.d.ts +1 -1
- package/dist/src/typus_perp/tlp/structs.d.ts +2 -2
- package/dist/src/typus_perp/trading/structs.d.ts +173 -29
- package/dist/src/typus_perp/trading/structs.js +221 -1
- package/dist/src/typus_perp/treasury-caps/structs.d.ts +1 -1
- package/dist/src/typus_stake_pool/admin/structs.d.ts +4 -4
- package/dist/src/typus_stake_pool/index.js +3 -3
- package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +22 -22
- package/dist/src/user/history.js +94 -14
- package/dist/src/user/order.js +17 -11
- package/dist/src/user/orderWithBidReceipt.d.ts +2 -4
- package/dist/src/user/orderWithBidReceipt.js +9 -20
- package/dist/src/user/tlp.js +18 -18
- package/package.json +2 -1
|
@@ -37,7 +37,7 @@ export declare class AddTradingSymbolEvent implements StructClass {
|
|
|
37
37
|
static reified(): AddTradingSymbolEventReified;
|
|
38
38
|
static get r(): reified.StructClassReified<AddTradingSymbolEvent, AddTradingSymbolEventFields>;
|
|
39
39
|
static phantom(): PhantomReified<ToTypeStr<AddTradingSymbolEvent>>;
|
|
40
|
-
static get p(): reified.PhantomReified<"::trading::AddTradingSymbolEvent" | "
|
|
40
|
+
static get p(): reified.PhantomReified<"::trading::AddTradingSymbolEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::AddTradingSymbolEvent">;
|
|
41
41
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
42
42
|
index: string;
|
|
43
43
|
base_token_type: {
|
|
@@ -235,7 +235,7 @@ export declare class CancelTradingOrderEvent implements StructClass {
|
|
|
235
235
|
static reified(): CancelTradingOrderEventReified;
|
|
236
236
|
static get r(): reified.StructClassReified<CancelTradingOrderEvent, CancelTradingOrderEventFields>;
|
|
237
237
|
static phantom(): PhantomReified<ToTypeStr<CancelTradingOrderEvent>>;
|
|
238
|
-
static get p(): reified.PhantomReified<"::trading::CancelTradingOrderEvent" | "
|
|
238
|
+
static get p(): reified.PhantomReified<"::trading::CancelTradingOrderEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::CancelTradingOrderEvent">;
|
|
239
239
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
240
240
|
user: string;
|
|
241
241
|
market_index: string;
|
|
@@ -367,7 +367,7 @@ export declare class CreateTradingOrderEvent implements StructClass {
|
|
|
367
367
|
static reified(): CreateTradingOrderEventReified;
|
|
368
368
|
static get r(): reified.StructClassReified<CreateTradingOrderEvent, CreateTradingOrderEventFields>;
|
|
369
369
|
static phantom(): PhantomReified<ToTypeStr<CreateTradingOrderEvent>>;
|
|
370
|
-
static get p(): reified.PhantomReified<"::trading::CreateTradingOrderEvent" | "
|
|
370
|
+
static get p(): reified.PhantomReified<"::trading::CreateTradingOrderEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::CreateTradingOrderEvent">;
|
|
371
371
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
372
372
|
user: string;
|
|
373
373
|
market_index: string;
|
|
@@ -503,6 +503,7 @@ export interface CreateTradingOrderWithBidReceiptsEventFields {
|
|
|
503
503
|
poolIndex: ToField<"u64">;
|
|
504
504
|
collateralToken: ToField<TypeName>;
|
|
505
505
|
baseToken: ToField<TypeName>;
|
|
506
|
+
orderId: ToField<"u64">;
|
|
506
507
|
collateralInDepositToken: ToField<"u64">;
|
|
507
508
|
isLong: ToField<"bool">;
|
|
508
509
|
size: ToField<"u64">;
|
|
@@ -526,6 +527,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
526
527
|
readonly poolIndex: ToField<"u64">;
|
|
527
528
|
readonly collateralToken: ToField<TypeName>;
|
|
528
529
|
readonly baseToken: ToField<TypeName>;
|
|
530
|
+
readonly orderId: ToField<"u64">;
|
|
529
531
|
readonly collateralInDepositToken: ToField<"u64">;
|
|
530
532
|
readonly isLong: ToField<"bool">;
|
|
531
533
|
readonly size: ToField<"u64">;
|
|
@@ -537,7 +539,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
537
539
|
static reified(): CreateTradingOrderWithBidReceiptsEventReified;
|
|
538
540
|
static get r(): reified.StructClassReified<CreateTradingOrderWithBidReceiptsEvent, CreateTradingOrderWithBidReceiptsEventFields>;
|
|
539
541
|
static phantom(): PhantomReified<ToTypeStr<CreateTradingOrderWithBidReceiptsEvent>>;
|
|
540
|
-
static get p(): reified.PhantomReified<"::trading::CreateTradingOrderWithBidReceiptsEvent" | "
|
|
542
|
+
static get p(): reified.PhantomReified<"::trading::CreateTradingOrderWithBidReceiptsEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::CreateTradingOrderWithBidReceiptsEvent">;
|
|
541
543
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
542
544
|
user: string;
|
|
543
545
|
market_index: string;
|
|
@@ -552,6 +554,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
552
554
|
bytes: number[];
|
|
553
555
|
};
|
|
554
556
|
};
|
|
557
|
+
order_id: string;
|
|
555
558
|
collateral_in_deposit_token: string;
|
|
556
559
|
is_long: boolean;
|
|
557
560
|
size: string;
|
|
@@ -579,6 +582,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
579
582
|
};
|
|
580
583
|
};
|
|
581
584
|
};
|
|
585
|
+
order_id: string | number | bigint;
|
|
582
586
|
collateral_in_deposit_token: string | number | bigint;
|
|
583
587
|
is_long: boolean;
|
|
584
588
|
size: string | number | bigint;
|
|
@@ -606,6 +610,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
606
610
|
baseToken: {
|
|
607
611
|
name: string;
|
|
608
612
|
};
|
|
613
|
+
orderId: string;
|
|
609
614
|
collateralInDepositToken: string;
|
|
610
615
|
isLong: boolean;
|
|
611
616
|
size: string;
|
|
@@ -624,6 +629,7 @@ export declare class CreateTradingOrderWithBidReceiptsEvent implements StructCla
|
|
|
624
629
|
baseToken: {
|
|
625
630
|
name: string;
|
|
626
631
|
};
|
|
632
|
+
orderId: string;
|
|
627
633
|
collateralInDepositToken: string;
|
|
628
634
|
isLong: boolean;
|
|
629
635
|
size: string;
|
|
@@ -667,7 +673,7 @@ export declare class ExpiredPositionInfo implements StructClass {
|
|
|
667
673
|
static reified(): ExpiredPositionInfoReified;
|
|
668
674
|
static get r(): reified.StructClassReified<ExpiredPositionInfo, ExpiredPositionInfoFields>;
|
|
669
675
|
static phantom(): PhantomReified<ToTypeStr<ExpiredPositionInfo>>;
|
|
670
|
-
static get p(): reified.PhantomReified<"::trading::ExpiredPositionInfo" | "
|
|
676
|
+
static get p(): reified.PhantomReified<"::trading::ExpiredPositionInfo" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ExpiredPositionInfo">;
|
|
671
677
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
672
678
|
position_id: string;
|
|
673
679
|
dov_index: string;
|
|
@@ -783,7 +789,7 @@ export declare class IncreaseCollateralEvent implements StructClass {
|
|
|
783
789
|
static reified(): IncreaseCollateralEventReified;
|
|
784
790
|
static get r(): reified.StructClassReified<IncreaseCollateralEvent, IncreaseCollateralEventFields>;
|
|
785
791
|
static phantom(): PhantomReified<ToTypeStr<IncreaseCollateralEvent>>;
|
|
786
|
-
static get p(): reified.PhantomReified<"::trading::IncreaseCollateralEvent" | "
|
|
792
|
+
static get p(): reified.PhantomReified<"::trading::IncreaseCollateralEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::IncreaseCollateralEvent">;
|
|
787
793
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
788
794
|
user: string;
|
|
789
795
|
market_index: string;
|
|
@@ -903,7 +909,7 @@ export declare class LiquidateEvent implements StructClass {
|
|
|
903
909
|
static reified(): LiquidateEventReified;
|
|
904
910
|
static get r(): reified.StructClassReified<LiquidateEvent, LiquidateEventFields>;
|
|
905
911
|
static phantom(): PhantomReified<ToTypeStr<LiquidateEvent>>;
|
|
906
|
-
static get p(): reified.PhantomReified<"::trading::LiquidateEvent" | "
|
|
912
|
+
static get p(): reified.PhantomReified<"::trading::LiquidateEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::LiquidateEvent">;
|
|
907
913
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
908
914
|
user: string;
|
|
909
915
|
collateral_token: {
|
|
@@ -1011,7 +1017,7 @@ export declare class LiquidationInfo implements StructClass {
|
|
|
1011
1017
|
static reified(): LiquidationInfoReified;
|
|
1012
1018
|
static get r(): reified.StructClassReified<LiquidationInfo, LiquidationInfoFields>;
|
|
1013
1019
|
static phantom(): PhantomReified<ToTypeStr<LiquidationInfo>>;
|
|
1014
|
-
static get p(): reified.PhantomReified<"::trading::LiquidationInfo" | "
|
|
1020
|
+
static get p(): reified.PhantomReified<"::trading::LiquidationInfo" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::LiquidationInfo">;
|
|
1015
1021
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1016
1022
|
position_id: string;
|
|
1017
1023
|
dov_index: {
|
|
@@ -1093,7 +1099,7 @@ export declare class ManagerCloseOptionPositionEvent implements StructClass {
|
|
|
1093
1099
|
static reified(): ManagerCloseOptionPositionEventReified;
|
|
1094
1100
|
static get r(): reified.StructClassReified<ManagerCloseOptionPositionEvent, ManagerCloseOptionPositionEventFields>;
|
|
1095
1101
|
static phantom(): PhantomReified<ToTypeStr<ManagerCloseOptionPositionEvent>>;
|
|
1096
|
-
static get p(): reified.PhantomReified<"::trading::ManagerCloseOptionPositionEvent" | "
|
|
1102
|
+
static get p(): reified.PhantomReified<"::trading::ManagerCloseOptionPositionEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ManagerCloseOptionPositionEvent">;
|
|
1097
1103
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1098
1104
|
user: string;
|
|
1099
1105
|
collateral_token: {
|
|
@@ -1215,7 +1221,7 @@ export declare class ManagerReducePositionEvent implements StructClass {
|
|
|
1215
1221
|
static reified(): ManagerReducePositionEventReified;
|
|
1216
1222
|
static get r(): reified.StructClassReified<ManagerReducePositionEvent, ManagerReducePositionEventFields>;
|
|
1217
1223
|
static phantom(): PhantomReified<ToTypeStr<ManagerReducePositionEvent>>;
|
|
1218
|
-
static get p(): reified.PhantomReified<"::trading::ManagerReducePositionEvent" | "
|
|
1224
|
+
static get p(): reified.PhantomReified<"::trading::ManagerReducePositionEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ManagerReducePositionEvent">;
|
|
1219
1225
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1220
1226
|
user: string;
|
|
1221
1227
|
collateral_token: {
|
|
@@ -1327,7 +1333,7 @@ export declare class ManagerUpdateProcessStatusAfterOrderEvent implements Struct
|
|
|
1327
1333
|
static reified(): ManagerUpdateProcessStatusAfterOrderEventReified;
|
|
1328
1334
|
static get r(): reified.StructClassReified<ManagerUpdateProcessStatusAfterOrderEvent, ManagerUpdateProcessStatusAfterOrderEventFields>;
|
|
1329
1335
|
static phantom(): PhantomReified<ToTypeStr<ManagerUpdateProcessStatusAfterOrderEvent>>;
|
|
1330
|
-
static get p(): reified.PhantomReified<"::trading::ManagerUpdateProcessStatusAfterOrderEvent" | "
|
|
1336
|
+
static get p(): reified.PhantomReified<"::trading::ManagerUpdateProcessStatusAfterOrderEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ManagerUpdateProcessStatusAfterOrderEvent">;
|
|
1331
1337
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1332
1338
|
market_index: string;
|
|
1333
1339
|
pool_index: string;
|
|
@@ -1415,7 +1421,7 @@ export declare class ManagerUpdateProcessStatusAfterPositionEvent implements Str
|
|
|
1415
1421
|
static reified(): ManagerUpdateProcessStatusAfterPositionEventReified;
|
|
1416
1422
|
static get r(): reified.StructClassReified<ManagerUpdateProcessStatusAfterPositionEvent, ManagerUpdateProcessStatusAfterPositionEventFields>;
|
|
1417
1423
|
static phantom(): PhantomReified<ToTypeStr<ManagerUpdateProcessStatusAfterPositionEvent>>;
|
|
1418
|
-
static get p(): reified.PhantomReified<"::trading::ManagerUpdateProcessStatusAfterPositionEvent" | "
|
|
1424
|
+
static get p(): reified.PhantomReified<"::trading::ManagerUpdateProcessStatusAfterPositionEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ManagerUpdateProcessStatusAfterPositionEvent">;
|
|
1419
1425
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1420
1426
|
market_index: string;
|
|
1421
1427
|
pool_index: string;
|
|
@@ -1513,7 +1519,7 @@ export declare class MarketConfig implements StructClass {
|
|
|
1513
1519
|
static reified(): MarketConfigReified;
|
|
1514
1520
|
static get r(): reified.StructClassReified<MarketConfig, MarketConfigFields>;
|
|
1515
1521
|
static phantom(): PhantomReified<ToTypeStr<MarketConfig>>;
|
|
1516
|
-
static get p(): reified.PhantomReified<"::trading::MarketConfig" | "
|
|
1522
|
+
static get p(): reified.PhantomReified<"::trading::MarketConfig" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::MarketConfig">;
|
|
1517
1523
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1518
1524
|
oracle_id: string;
|
|
1519
1525
|
max_leverage_mbp: string;
|
|
@@ -1619,7 +1625,7 @@ export declare class MarketInfo implements StructClass {
|
|
|
1619
1625
|
static reified(): MarketInfoReified;
|
|
1620
1626
|
static get r(): reified.StructClassReified<MarketInfo, MarketInfoFields>;
|
|
1621
1627
|
static phantom(): PhantomReified<ToTypeStr<MarketInfo>>;
|
|
1622
|
-
static get p(): reified.PhantomReified<"::trading::MarketInfo" | "
|
|
1628
|
+
static get p(): reified.PhantomReified<"::trading::MarketInfo" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::MarketInfo">;
|
|
1623
1629
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1624
1630
|
is_active: boolean;
|
|
1625
1631
|
size_decimal: string;
|
|
@@ -1727,7 +1733,7 @@ export declare class MarketRegistry implements StructClass {
|
|
|
1727
1733
|
static reified(): MarketRegistryReified;
|
|
1728
1734
|
static get r(): reified.StructClassReified<MarketRegistry, MarketRegistryFields>;
|
|
1729
1735
|
static phantom(): PhantomReified<ToTypeStr<MarketRegistry>>;
|
|
1730
|
-
static get p(): reified.PhantomReified<"::trading::MarketRegistry" | "
|
|
1736
|
+
static get p(): reified.PhantomReified<"::trading::MarketRegistry" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::MarketRegistry">;
|
|
1731
1737
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1732
1738
|
id: {
|
|
1733
1739
|
id: {
|
|
@@ -1871,7 +1877,7 @@ export declare class Markets implements StructClass {
|
|
|
1871
1877
|
static reified(): MarketsReified;
|
|
1872
1878
|
static get r(): reified.StructClassReified<Markets, MarketsFields>;
|
|
1873
1879
|
static phantom(): PhantomReified<ToTypeStr<Markets>>;
|
|
1874
|
-
static get p(): reified.PhantomReified<"::trading::Markets" | "
|
|
1880
|
+
static get p(): reified.PhantomReified<"::trading::Markets" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::Markets">;
|
|
1875
1881
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1876
1882
|
id: {
|
|
1877
1883
|
id: {
|
|
@@ -2025,7 +2031,7 @@ export declare class MatchTradingOrderEvent implements StructClass {
|
|
|
2025
2031
|
static reified(): MatchTradingOrderEventReified;
|
|
2026
2032
|
static get r(): reified.StructClassReified<MatchTradingOrderEvent, MatchTradingOrderEventFields>;
|
|
2027
2033
|
static phantom(): PhantomReified<ToTypeStr<MatchTradingOrderEvent>>;
|
|
2028
|
-
static get p(): reified.PhantomReified<"::trading::MatchTradingOrderEvent" | "
|
|
2034
|
+
static get p(): reified.PhantomReified<"::trading::MatchTradingOrderEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::MatchTradingOrderEvent">;
|
|
2029
2035
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2030
2036
|
collateral_token: {
|
|
2031
2037
|
name: {
|
|
@@ -2119,7 +2125,7 @@ export declare class NewMarketsEvent implements StructClass {
|
|
|
2119
2125
|
static reified(): NewMarketsEventReified;
|
|
2120
2126
|
static get r(): reified.StructClassReified<NewMarketsEvent, NewMarketsEventFields>;
|
|
2121
2127
|
static phantom(): PhantomReified<ToTypeStr<NewMarketsEvent>>;
|
|
2122
|
-
static get p(): reified.PhantomReified<"::trading::NewMarketsEvent" | "
|
|
2128
|
+
static get p(): reified.PhantomReified<"::trading::NewMarketsEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::NewMarketsEvent">;
|
|
2123
2129
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2124
2130
|
index: string;
|
|
2125
2131
|
lp_token_type: {
|
|
@@ -2188,6 +2194,144 @@ export declare class NewMarketsEvent implements StructClass {
|
|
|
2188
2194
|
static fromSuiObjectData(data: SuiObjectData): NewMarketsEvent;
|
|
2189
2195
|
static fetch(client: SuiClient, id: string): Promise<NewMarketsEvent>;
|
|
2190
2196
|
}
|
|
2197
|
+
export declare function isRealizeOptionPositionEvent(type: string): boolean;
|
|
2198
|
+
export interface RealizeOptionPositionEventFields {
|
|
2199
|
+
positionUser: ToField<"address">;
|
|
2200
|
+
positionId: ToField<"u64">;
|
|
2201
|
+
tradingSymbol: ToField<TypeName>;
|
|
2202
|
+
realizeBalanceTokenType: ToField<TypeName>;
|
|
2203
|
+
exerciseBalanceValue: ToField<"u64">;
|
|
2204
|
+
userRemainingValue: ToField<"u64">;
|
|
2205
|
+
userRemainingInUsd: ToField<"u64">;
|
|
2206
|
+
realizedLossValue: ToField<"u64">;
|
|
2207
|
+
feeValue: ToField<"u64">;
|
|
2208
|
+
realizedTradingFee: ToField<"u64">;
|
|
2209
|
+
realizedBorrowFee: ToField<"u64">;
|
|
2210
|
+
u64Padding: ToField<Vector<"u64">>;
|
|
2211
|
+
}
|
|
2212
|
+
export type RealizeOptionPositionEventReified = Reified<RealizeOptionPositionEvent, RealizeOptionPositionEventFields>;
|
|
2213
|
+
export declare class RealizeOptionPositionEvent implements StructClass {
|
|
2214
|
+
__StructClass: true;
|
|
2215
|
+
static readonly $typeName: string;
|
|
2216
|
+
static readonly $numTypeParams = 0;
|
|
2217
|
+
static readonly $isPhantom: readonly [];
|
|
2218
|
+
readonly $typeName: string;
|
|
2219
|
+
readonly $fullTypeName: `${typeof PKG_V1}::trading::RealizeOptionPositionEvent`;
|
|
2220
|
+
readonly $typeArgs: [];
|
|
2221
|
+
readonly $isPhantom: readonly [];
|
|
2222
|
+
readonly positionUser: ToField<"address">;
|
|
2223
|
+
readonly positionId: ToField<"u64">;
|
|
2224
|
+
readonly tradingSymbol: ToField<TypeName>;
|
|
2225
|
+
readonly realizeBalanceTokenType: ToField<TypeName>;
|
|
2226
|
+
readonly exerciseBalanceValue: ToField<"u64">;
|
|
2227
|
+
readonly userRemainingValue: ToField<"u64">;
|
|
2228
|
+
readonly userRemainingInUsd: ToField<"u64">;
|
|
2229
|
+
readonly realizedLossValue: ToField<"u64">;
|
|
2230
|
+
readonly feeValue: ToField<"u64">;
|
|
2231
|
+
readonly realizedTradingFee: ToField<"u64">;
|
|
2232
|
+
readonly realizedBorrowFee: ToField<"u64">;
|
|
2233
|
+
readonly u64Padding: ToField<Vector<"u64">>;
|
|
2234
|
+
private constructor();
|
|
2235
|
+
static reified(): RealizeOptionPositionEventReified;
|
|
2236
|
+
static get r(): reified.StructClassReified<RealizeOptionPositionEvent, RealizeOptionPositionEventFields>;
|
|
2237
|
+
static phantom(): PhantomReified<ToTypeStr<RealizeOptionPositionEvent>>;
|
|
2238
|
+
static get p(): reified.PhantomReified<"::trading::RealizeOptionPositionEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::RealizeOptionPositionEvent">;
|
|
2239
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2240
|
+
position_user: string;
|
|
2241
|
+
position_id: string;
|
|
2242
|
+
trading_symbol: {
|
|
2243
|
+
name: {
|
|
2244
|
+
bytes: number[];
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
realize_balance_token_type: {
|
|
2248
|
+
name: {
|
|
2249
|
+
bytes: number[];
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
exercise_balance_value: string;
|
|
2253
|
+
user_remaining_value: string;
|
|
2254
|
+
user_remaining_in_usd: string;
|
|
2255
|
+
realized_loss_value: string;
|
|
2256
|
+
fee_value: string;
|
|
2257
|
+
realized_trading_fee: string;
|
|
2258
|
+
realized_borrow_fee: string;
|
|
2259
|
+
u64_padding: string[];
|
|
2260
|
+
}, {
|
|
2261
|
+
position_user: string;
|
|
2262
|
+
position_id: string | number | bigint;
|
|
2263
|
+
trading_symbol: {
|
|
2264
|
+
name: {
|
|
2265
|
+
bytes: Iterable<number> & {
|
|
2266
|
+
length: number;
|
|
2267
|
+
};
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
realize_balance_token_type: {
|
|
2271
|
+
name: {
|
|
2272
|
+
bytes: Iterable<number> & {
|
|
2273
|
+
length: number;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
exercise_balance_value: string | number | bigint;
|
|
2278
|
+
user_remaining_value: string | number | bigint;
|
|
2279
|
+
user_remaining_in_usd: string | number | bigint;
|
|
2280
|
+
realized_loss_value: string | number | bigint;
|
|
2281
|
+
fee_value: string | number | bigint;
|
|
2282
|
+
realized_trading_fee: string | number | bigint;
|
|
2283
|
+
realized_borrow_fee: string | number | bigint;
|
|
2284
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
2285
|
+
length: number;
|
|
2286
|
+
};
|
|
2287
|
+
}>;
|
|
2288
|
+
static fromFields(fields: Record<string, any>): RealizeOptionPositionEvent;
|
|
2289
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): RealizeOptionPositionEvent;
|
|
2290
|
+
static fromBcs(data: Uint8Array): RealizeOptionPositionEvent;
|
|
2291
|
+
toJSONField(): {
|
|
2292
|
+
positionUser: string;
|
|
2293
|
+
positionId: string;
|
|
2294
|
+
tradingSymbol: {
|
|
2295
|
+
name: string;
|
|
2296
|
+
};
|
|
2297
|
+
realizeBalanceTokenType: {
|
|
2298
|
+
name: string;
|
|
2299
|
+
};
|
|
2300
|
+
exerciseBalanceValue: string;
|
|
2301
|
+
userRemainingValue: string;
|
|
2302
|
+
userRemainingInUsd: string;
|
|
2303
|
+
realizedLossValue: string;
|
|
2304
|
+
feeValue: string;
|
|
2305
|
+
realizedTradingFee: string;
|
|
2306
|
+
realizedBorrowFee: string;
|
|
2307
|
+
u64Padding: string[];
|
|
2308
|
+
};
|
|
2309
|
+
toJSON(): {
|
|
2310
|
+
positionUser: string;
|
|
2311
|
+
positionId: string;
|
|
2312
|
+
tradingSymbol: {
|
|
2313
|
+
name: string;
|
|
2314
|
+
};
|
|
2315
|
+
realizeBalanceTokenType: {
|
|
2316
|
+
name: string;
|
|
2317
|
+
};
|
|
2318
|
+
exerciseBalanceValue: string;
|
|
2319
|
+
userRemainingValue: string;
|
|
2320
|
+
userRemainingInUsd: string;
|
|
2321
|
+
realizedLossValue: string;
|
|
2322
|
+
feeValue: string;
|
|
2323
|
+
realizedTradingFee: string;
|
|
2324
|
+
realizedBorrowFee: string;
|
|
2325
|
+
u64Padding: string[];
|
|
2326
|
+
$typeName: string;
|
|
2327
|
+
$typeArgs: [];
|
|
2328
|
+
};
|
|
2329
|
+
static fromJSONField(field: any): RealizeOptionPositionEvent;
|
|
2330
|
+
static fromJSON(json: Record<string, any>): RealizeOptionPositionEvent;
|
|
2331
|
+
static fromSuiParsedData(content: SuiParsedData): RealizeOptionPositionEvent;
|
|
2332
|
+
static fromSuiObjectData(data: SuiObjectData): RealizeOptionPositionEvent;
|
|
2333
|
+
static fetch(client: SuiClient, id: string): Promise<RealizeOptionPositionEvent>;
|
|
2334
|
+
}
|
|
2191
2335
|
export declare function isReleaseCollateralEvent(type: string): boolean;
|
|
2192
2336
|
export interface ReleaseCollateralEventFields {
|
|
2193
2337
|
user: ToField<"address">;
|
|
@@ -2223,7 +2367,7 @@ export declare class ReleaseCollateralEvent implements StructClass {
|
|
|
2223
2367
|
static reified(): ReleaseCollateralEventReified;
|
|
2224
2368
|
static get r(): reified.StructClassReified<ReleaseCollateralEvent, ReleaseCollateralEventFields>;
|
|
2225
2369
|
static phantom(): PhantomReified<ToTypeStr<ReleaseCollateralEvent>>;
|
|
2226
|
-
static get p(): reified.PhantomReified<"::trading::ReleaseCollateralEvent" | "
|
|
2370
|
+
static get p(): reified.PhantomReified<"::trading::ReleaseCollateralEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ReleaseCollateralEvent">;
|
|
2227
2371
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2228
2372
|
user: string;
|
|
2229
2373
|
market_index: string;
|
|
@@ -2329,7 +2473,7 @@ export declare class ResumeMarketEvent implements StructClass {
|
|
|
2329
2473
|
static reified(): ResumeMarketEventReified;
|
|
2330
2474
|
static get r(): reified.StructClassReified<ResumeMarketEvent, ResumeMarketEventFields>;
|
|
2331
2475
|
static phantom(): PhantomReified<ToTypeStr<ResumeMarketEvent>>;
|
|
2332
|
-
static get p(): reified.PhantomReified<"::trading::ResumeMarketEvent" | "
|
|
2476
|
+
static get p(): reified.PhantomReified<"::trading::ResumeMarketEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ResumeMarketEvent">;
|
|
2333
2477
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2334
2478
|
index: string;
|
|
2335
2479
|
u64_padding: string[];
|
|
@@ -2381,7 +2525,7 @@ export declare class ResumeTradingSymbolEvent implements StructClass {
|
|
|
2381
2525
|
static reified(): ResumeTradingSymbolEventReified;
|
|
2382
2526
|
static get r(): reified.StructClassReified<ResumeTradingSymbolEvent, ResumeTradingSymbolEventFields>;
|
|
2383
2527
|
static phantom(): PhantomReified<ToTypeStr<ResumeTradingSymbolEvent>>;
|
|
2384
|
-
static get p(): reified.PhantomReified<"::trading::ResumeTradingSymbolEvent" | "
|
|
2528
|
+
static get p(): reified.PhantomReified<"::trading::ResumeTradingSymbolEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::ResumeTradingSymbolEvent">;
|
|
2385
2529
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2386
2530
|
index: string;
|
|
2387
2531
|
resumed_base_token: {
|
|
@@ -2463,7 +2607,7 @@ export declare class SettleReceiptCollateralEvent implements StructClass {
|
|
|
2463
2607
|
static reified(): SettleReceiptCollateralEventReified;
|
|
2464
2608
|
static get r(): reified.StructClassReified<SettleReceiptCollateralEvent, SettleReceiptCollateralEventFields>;
|
|
2465
2609
|
static phantom(): PhantomReified<ToTypeStr<SettleReceiptCollateralEvent>>;
|
|
2466
|
-
static get p(): reified.PhantomReified<"::trading::SettleReceiptCollateralEvent" | "
|
|
2610
|
+
static get p(): reified.PhantomReified<"::trading::SettleReceiptCollateralEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::SettleReceiptCollateralEvent">;
|
|
2467
2611
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2468
2612
|
user: string;
|
|
2469
2613
|
collateral_token: {
|
|
@@ -2569,7 +2713,7 @@ export declare class SuspendMarketEvent implements StructClass {
|
|
|
2569
2713
|
static reified(): SuspendMarketEventReified;
|
|
2570
2714
|
static get r(): reified.StructClassReified<SuspendMarketEvent, SuspendMarketEventFields>;
|
|
2571
2715
|
static phantom(): PhantomReified<ToTypeStr<SuspendMarketEvent>>;
|
|
2572
|
-
static get p(): reified.PhantomReified<"::trading::SuspendMarketEvent" | "
|
|
2716
|
+
static get p(): reified.PhantomReified<"::trading::SuspendMarketEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::SuspendMarketEvent">;
|
|
2573
2717
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2574
2718
|
index: string;
|
|
2575
2719
|
u64_padding: string[];
|
|
@@ -2621,7 +2765,7 @@ export declare class SuspendTradingSymbolEvent implements StructClass {
|
|
|
2621
2765
|
static reified(): SuspendTradingSymbolEventReified;
|
|
2622
2766
|
static get r(): reified.StructClassReified<SuspendTradingSymbolEvent, SuspendTradingSymbolEventFields>;
|
|
2623
2767
|
static phantom(): PhantomReified<ToTypeStr<SuspendTradingSymbolEvent>>;
|
|
2624
|
-
static get p(): reified.PhantomReified<"::trading::SuspendTradingSymbolEvent" | "
|
|
2768
|
+
static get p(): reified.PhantomReified<"::trading::SuspendTradingSymbolEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::SuspendTradingSymbolEvent">;
|
|
2625
2769
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2626
2770
|
index: string;
|
|
2627
2771
|
suspended_base_token: {
|
|
@@ -2697,7 +2841,7 @@ export declare class SymbolMarket implements StructClass {
|
|
|
2697
2841
|
static reified(): SymbolMarketReified;
|
|
2698
2842
|
static get r(): reified.StructClassReified<SymbolMarket, SymbolMarketFields>;
|
|
2699
2843
|
static phantom(): PhantomReified<ToTypeStr<SymbolMarket>>;
|
|
2700
|
-
static get p(): reified.PhantomReified<"::trading::SymbolMarket" | "
|
|
2844
|
+
static get p(): reified.PhantomReified<"::trading::SymbolMarket" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::SymbolMarket">;
|
|
2701
2845
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2702
2846
|
id: {
|
|
2703
2847
|
id: {
|
|
@@ -2957,7 +3101,7 @@ export declare class USD implements StructClass {
|
|
|
2957
3101
|
static reified(): USDReified;
|
|
2958
3102
|
static get r(): reified.StructClassReified<USD, USDFields>;
|
|
2959
3103
|
static phantom(): PhantomReified<ToTypeStr<USD>>;
|
|
2960
|
-
static get p(): reified.PhantomReified<"::trading::USD" | "
|
|
3104
|
+
static get p(): reified.PhantomReified<"::trading::USD" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::USD">;
|
|
2961
3105
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2962
3106
|
dummy_field: boolean;
|
|
2963
3107
|
}, {
|
|
@@ -3013,7 +3157,7 @@ export declare class UpdateFundingRateEvent implements StructClass {
|
|
|
3013
3157
|
static reified(): UpdateFundingRateEventReified;
|
|
3014
3158
|
static get r(): reified.StructClassReified<UpdateFundingRateEvent, UpdateFundingRateEventFields>;
|
|
3015
3159
|
static phantom(): PhantomReified<ToTypeStr<UpdateFundingRateEvent>>;
|
|
3016
|
-
static get p(): reified.PhantomReified<"::trading::UpdateFundingRateEvent" | "
|
|
3160
|
+
static get p(): reified.PhantomReified<"::trading::UpdateFundingRateEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::UpdateFundingRateEvent">;
|
|
3017
3161
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
3018
3162
|
base_token: {
|
|
3019
3163
|
name: {
|
|
@@ -3107,7 +3251,7 @@ export declare class UpdateMarketConfigEvent implements StructClass {
|
|
|
3107
3251
|
static reified(): UpdateMarketConfigEventReified;
|
|
3108
3252
|
static get r(): reified.StructClassReified<UpdateMarketConfigEvent, UpdateMarketConfigEventFields>;
|
|
3109
3253
|
static phantom(): PhantomReified<ToTypeStr<UpdateMarketConfigEvent>>;
|
|
3110
|
-
static get p(): reified.PhantomReified<"::trading::UpdateMarketConfigEvent" | "
|
|
3254
|
+
static get p(): reified.PhantomReified<"::trading::UpdateMarketConfigEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::UpdateMarketConfigEvent">;
|
|
3111
3255
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
3112
3256
|
index: string;
|
|
3113
3257
|
base_token_type: {
|
|
@@ -3275,7 +3419,7 @@ export declare class UpdateProtocolFeeShareBpEvent implements StructClass {
|
|
|
3275
3419
|
static reified(): UpdateProtocolFeeShareBpEventReified;
|
|
3276
3420
|
static get r(): reified.StructClassReified<UpdateProtocolFeeShareBpEvent, UpdateProtocolFeeShareBpEventFields>;
|
|
3277
3421
|
static phantom(): PhantomReified<ToTypeStr<UpdateProtocolFeeShareBpEvent>>;
|
|
3278
|
-
static get p(): reified.PhantomReified<"::trading::UpdateProtocolFeeShareBpEvent" | "
|
|
3422
|
+
static get p(): reified.PhantomReified<"::trading::UpdateProtocolFeeShareBpEvent" | "0x7c19f81d9d411e78305d7af8dad25317c56bb449fede8a78b6021232478f0509::trading::UpdateProtocolFeeShareBpEvent">;
|
|
3279
3423
|
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
3280
3424
|
index: string;
|
|
3281
3425
|
previous_protocol_fee_share_bp: string;
|