aftermath-ts-sdk 1.2.52-perps.92 → 1.2.52-perps.95
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/packages/perpetuals/api/perpetualsApi.d.ts +1 -160
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +1 -1
- package/dist/packages/perpetuals/api/perpetualsApi.js +457 -254
- package/dist/packages/perpetuals/perpetualsAccount.js +18 -18
- package/dist/packages/perpetuals/perpetualsMarket.d.ts +2 -3
- package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetualsMarket.js +3 -4
- package/dist/packages/perpetuals/perpetualsTypes.d.ts +0 -1
- package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { TransactionArgument, Transaction } from "@mysten/sui/transactions";
|
|
2
1
|
import { AftermathApi } from "../../../general/providers/aftermathApi";
|
|
3
|
-
import { CoinType, PerpetualsAddresses,
|
|
4
|
-
import { PerpetualsMarketId, PerpetualsAccountId, PerpetualsOrderId, PerpetualsOrderSide, PerpetualsOrderType } from "../perpetualsTypes";
|
|
2
|
+
import { CoinType, PerpetualsAddresses, AnyObjectType } from "../../../types";
|
|
5
3
|
import { MoveErrors, MoveErrorsInterface } from "../../../general/types/moveErrorsInterface";
|
|
6
4
|
export declare class PerpetualsApi implements MoveErrorsInterface {
|
|
7
5
|
private readonly Provider;
|
|
@@ -36,163 +34,6 @@ export declare class PerpetualsApi implements MoveErrorsInterface {
|
|
|
36
34
|
};
|
|
37
35
|
readonly moveErrors: MoveErrors;
|
|
38
36
|
constructor(Provider: AftermathApi);
|
|
39
|
-
allocateCollateralTx: (inputs: {
|
|
40
|
-
tx: Transaction;
|
|
41
|
-
packageId: PackageId;
|
|
42
|
-
collateralCoinType: CoinType;
|
|
43
|
-
accountCapId: ObjectId | TransactionArgument;
|
|
44
|
-
marketId: PerpetualsMarketId;
|
|
45
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
46
|
-
amount: Balance;
|
|
47
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
48
|
-
deallocateCollateralTx: (inputs: {
|
|
49
|
-
tx: Transaction;
|
|
50
|
-
packageId: PackageId;
|
|
51
|
-
collateralCoinType: CoinType;
|
|
52
|
-
accountCapId: ObjectId;
|
|
53
|
-
basePriceFeedId: ObjectId;
|
|
54
|
-
collateralPriceFeedId: ObjectId;
|
|
55
|
-
marketId: PerpetualsMarketId;
|
|
56
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
57
|
-
amount: Balance;
|
|
58
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
59
|
-
createMarketPositionTx: (inputs: {
|
|
60
|
-
tx: Transaction;
|
|
61
|
-
packageId: PackageId;
|
|
62
|
-
collateralCoinType: CoinType;
|
|
63
|
-
accountCapId: ObjectId | TransactionArgument;
|
|
64
|
-
marketId: PerpetualsMarketId;
|
|
65
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
66
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
67
|
-
shareClearingHouseTx: (inputs: {
|
|
68
|
-
tx: Transaction;
|
|
69
|
-
packageId: PackageId;
|
|
70
|
-
collateralCoinType: CoinType;
|
|
71
|
-
marketId: PerpetualsMarketId | TransactionArgument;
|
|
72
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
73
|
-
startSessionTx: (inputs: {
|
|
74
|
-
tx: Transaction;
|
|
75
|
-
packageId: PackageId;
|
|
76
|
-
collateralCoinType: CoinType;
|
|
77
|
-
accountCapId: ObjectId | TransactionArgument;
|
|
78
|
-
basePriceFeedId: ObjectId;
|
|
79
|
-
collateralPriceFeedId: ObjectId;
|
|
80
|
-
marketId: PerpetualsMarketId;
|
|
81
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
82
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
83
|
-
endSessionTx: (inputs: {
|
|
84
|
-
tx: Transaction;
|
|
85
|
-
packageId: PackageId;
|
|
86
|
-
collateralCoinType: CoinType;
|
|
87
|
-
sessionPotatoId: ObjectId | TransactionArgument;
|
|
88
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
89
|
-
placeMarketOrderTx: (inputs: {
|
|
90
|
-
tx: Transaction;
|
|
91
|
-
packageId: PackageId;
|
|
92
|
-
collateralCoinType: CoinType;
|
|
93
|
-
sessionPotatoId: ObjectId | TransactionArgument;
|
|
94
|
-
side: PerpetualsOrderSide;
|
|
95
|
-
size: bigint;
|
|
96
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
97
|
-
placeLimitOrderTx: (inputs: {
|
|
98
|
-
tx: Transaction;
|
|
99
|
-
packageId: PackageId;
|
|
100
|
-
collateralCoinType: CoinType;
|
|
101
|
-
sessionPotatoId: ObjectId | TransactionArgument;
|
|
102
|
-
side: PerpetualsOrderSide;
|
|
103
|
-
size: bigint;
|
|
104
|
-
price: bigint;
|
|
105
|
-
orderType: PerpetualsOrderType;
|
|
106
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
107
|
-
cancelOrdersTx: (inputs: {
|
|
108
|
-
tx: Transaction;
|
|
109
|
-
packageId: PackageId;
|
|
110
|
-
collateralCoinType: CoinType;
|
|
111
|
-
accountCapId: ObjectId;
|
|
112
|
-
marketId: PerpetualsMarketId;
|
|
113
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
114
|
-
orderIds: PerpetualsOrderId[];
|
|
115
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
116
|
-
reduceOrdersTx: (inputs: {
|
|
117
|
-
tx: Transaction;
|
|
118
|
-
packageId: PackageId;
|
|
119
|
-
collateralCoinType: CoinType;
|
|
120
|
-
accountCapId: ObjectId;
|
|
121
|
-
marketId: PerpetualsMarketId;
|
|
122
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
123
|
-
orderIds: PerpetualsOrderId[];
|
|
124
|
-
sizesToSubtract: bigint[];
|
|
125
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
126
|
-
createAccountTx: (inputs: {
|
|
127
|
-
tx: Transaction;
|
|
128
|
-
collateralCoinType: CoinType;
|
|
129
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
130
|
-
getPositionTx: (inputs: {
|
|
131
|
-
tx: Transaction;
|
|
132
|
-
packageId: PackageId;
|
|
133
|
-
collateralCoinType: CoinType;
|
|
134
|
-
accountId: PerpetualsAccountId;
|
|
135
|
-
marketId: PerpetualsMarketId;
|
|
136
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
137
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
138
|
-
getOrderbookTx: (inputs: {
|
|
139
|
-
tx: Transaction;
|
|
140
|
-
packageId: PackageId;
|
|
141
|
-
collateralCoinType: CoinType;
|
|
142
|
-
marketId: PerpetualsMarketId;
|
|
143
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
144
|
-
getBookPriceTx: (inputs: {
|
|
145
|
-
tx: Transaction;
|
|
146
|
-
packageId: PackageId;
|
|
147
|
-
marketId: PerpetualsMarketId;
|
|
148
|
-
collateralCoinType: CoinType;
|
|
149
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
150
|
-
getBestPriceTx: (inputs: {
|
|
151
|
-
tx: Transaction;
|
|
152
|
-
packageId: PackageId;
|
|
153
|
-
marketId: PerpetualsMarketId;
|
|
154
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
155
|
-
side: PerpetualsOrderSide;
|
|
156
|
-
collateralCoinType: CoinType;
|
|
157
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
158
|
-
inspectOrdersTx: (inputs: {
|
|
159
|
-
tx: Transaction;
|
|
160
|
-
packageId: PackageId;
|
|
161
|
-
orderbookId: ObjectId | TransactionArgument;
|
|
162
|
-
side: PerpetualsOrderSide;
|
|
163
|
-
fromPrice: IFixed;
|
|
164
|
-
toPrice: IFixed;
|
|
165
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
166
|
-
getOrderSizeTx: (inputs: {
|
|
167
|
-
tx: Transaction;
|
|
168
|
-
packageId: PackageId;
|
|
169
|
-
orderbookId: ObjectId | TransactionArgument;
|
|
170
|
-
orderId: PerpetualsOrderId;
|
|
171
|
-
}) => import("@mysten/sui/transactions").TransactionResult;
|
|
172
|
-
buildAllocateCollateralTx: (inputs: {
|
|
173
|
-
walletAddress: string;
|
|
174
|
-
} & Omit<{
|
|
175
|
-
tx: Transaction;
|
|
176
|
-
packageId: PackageId;
|
|
177
|
-
collateralCoinType: CoinType;
|
|
178
|
-
accountCapId: ObjectId | TransactionArgument;
|
|
179
|
-
marketId: PerpetualsMarketId;
|
|
180
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
181
|
-
amount: Balance;
|
|
182
|
-
}, "tx">) => Transaction;
|
|
183
|
-
buildDeallocateCollateralTx: (inputs: {
|
|
184
|
-
walletAddress: string;
|
|
185
|
-
} & Omit<{
|
|
186
|
-
tx: Transaction;
|
|
187
|
-
packageId: PackageId;
|
|
188
|
-
collateralCoinType: CoinType;
|
|
189
|
-
accountCapId: ObjectId;
|
|
190
|
-
basePriceFeedId: ObjectId;
|
|
191
|
-
collateralPriceFeedId: ObjectId;
|
|
192
|
-
marketId: PerpetualsMarketId;
|
|
193
|
-
marketInitialSharedVersion: ObjectVersion;
|
|
194
|
-
amount: Balance;
|
|
195
|
-
}, "tx">) => Transaction;
|
|
196
37
|
getAccountCapType: (inputs: {
|
|
197
38
|
collateralCoinType: CoinType;
|
|
198
39
|
}) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perpetualsApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/perpetuals/api/perpetualsApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"perpetualsApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/perpetuals/api/perpetualsApi.ts"],"names":[],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