aftermath-ts-sdk 1.1.69 → 1.1.71
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/general/providers/aftermathApi.d.ts +11 -1
- package/dist/general/providers/aftermathApi.d.ts.map +1 -1
- package/dist/general/providers/aftermathApi.js +34 -0
- package/dist/general/types/generalTypes.d.ts +1 -0
- package/dist/general/types/generalTypes.d.ts.map +1 -1
- package/dist/general/types/moveErrorsInterface.d.ts +6 -0
- package/dist/general/types/moveErrorsInterface.d.ts.map +1 -0
- package/dist/general/types/moveErrorsInterface.js +2 -0
- package/dist/general/utils/helpers.d.ts +17 -3
- package/dist/general/utils/helpers.d.ts.map +1 -1
- package/dist/general/utils/helpers.js +86 -13
- package/dist/packages/coin/coin.d.ts +1 -0
- package/dist/packages/coin/coin.d.ts.map +1 -1
- package/dist/packages/coin/coin.js +5 -0
- package/dist/packages/farms/api/farmsApi.d.ts +3 -1
- package/dist/packages/farms/api/farmsApi.d.ts.map +1 -1
- package/dist/packages/farms/api/farmsApi.js +58 -1
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts +3 -1
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +1 -1
- package/dist/packages/perpetuals/api/perpetualsApi.js +84 -32
- package/dist/packages/perpetuals/perpetuals.d.ts +0 -2
- package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetuals.js +0 -90
- package/dist/packages/pools/api/poolsApi.d.ts +3 -1
- package/dist/packages/pools/api/poolsApi.d.ts.map +1 -1
- package/dist/packages/pools/api/poolsApi.js +127 -0
- package/dist/packages/router/api/routerApi.d.ts +7 -2
- package/dist/packages/router/api/routerApi.d.ts.map +1 -1
- package/dist/packages/router/api/routerApi.js +37 -2
- package/dist/packages/router/router.d.ts.map +1 -1
- package/dist/packages/staking/api/stakingApi.d.ts +3 -1
- package/dist/packages/staking/api/stakingApi.d.ts.map +1 -1
- package/dist/packages/staking/api/stakingApi.js +64 -0
- package/package.json +2 -2
|
@@ -35,38 +35,6 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
35
35
|
const duration_1 = __importDefault(require("dayjs/plugin/duration"));
|
|
36
36
|
const transactionsApiHelpers_1 = require("../../../general/apiHelpers/transactionsApiHelpers");
|
|
37
37
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
38
|
-
// curl --location --request POST --header "Content-type: application/json" --header "Accept: application/json" --data-raw '{
|
|
39
|
-
// "ch_id": "0x8cf75b38f573c6349ac7ca5d1893db076b20b7aa4983773907b6a7b20268bf8a",
|
|
40
|
-
// "account_id": 0,
|
|
41
|
-
// "side": true,
|
|
42
|
-
// "size": 1,
|
|
43
|
-
// "price": 100000000000,
|
|
44
|
-
// "order_type": 0,
|
|
45
|
-
// "collateral_to_allocate": 10000000000,
|
|
46
|
-
// "cancel_all": false
|
|
47
|
-
// }' 'http://0.0.0.0:8080/af-fe/perpetuals/previews/limit-order'
|
|
48
|
-
// curl --location --request POST --header "Content-type: application/json" --header "Accept: application/json" --data-raw '{
|
|
49
|
-
// "ch_id": "0x8cf75b38f573c6349ac7ca5d1893db076b20b7aa4983773907b6a7b20268bf8a",
|
|
50
|
-
// "account_id": 0,
|
|
51
|
-
// "side": false,
|
|
52
|
-
// "size": 1,
|
|
53
|
-
// "order_type": 0,
|
|
54
|
-
// "collateral_to_allocate": 10000000000,
|
|
55
|
-
// "cancel_all": false
|
|
56
|
-
// }' 'http://0.0.0.0:8080/af-fe/perpetuals/previews/market-order'
|
|
57
|
-
// curl --location --request POST --header "Content-type: application/json" --header "Accept: application/json" --data-raw '{
|
|
58
|
-
// "ch_id": "0x8cf75b38f573c6349ac7ca5d1893db076b20b7aa4983773907b6a7b20268bf8a",
|
|
59
|
-
// "account_id": 0,
|
|
60
|
-
// "side": true,
|
|
61
|
-
// "price": 100000000000,
|
|
62
|
-
// "collateral_to_allocate": 10000000000
|
|
63
|
-
// }' 'http://0.0.0.0:8080/af-fe/perpetuals/calculations/limit-order-max-size'
|
|
64
|
-
// curl --location --request POST --header "Content-type: application/json" --header "Accept: application/json" --data-raw '{
|
|
65
|
-
// "ch_id": "0x8cf75b38f573c6349ac7ca5d1893db076b20b7aa4983773907b6a7b20268bf8a",
|
|
66
|
-
// "account_id": 0,
|
|
67
|
-
// "side": false,
|
|
68
|
-
// "collateral_to_allocate": 10000000000
|
|
69
|
-
// }' 'http://0.0.0.0:8080/af-fe/perpetuals/calculations/market-order-max-size'
|
|
70
38
|
class PerpetualsApi {
|
|
71
39
|
// =========================================================================
|
|
72
40
|
// Constructor
|
|
@@ -1140,6 +1108,90 @@ class PerpetualsApi {
|
|
|
1140
1108
|
updatedPremiumTwap: this.eventType("UpdatedPremiumTwap"),
|
|
1141
1109
|
updatedSpreadTwap: this.eventType("UpdatedSpreadTwap"),
|
|
1142
1110
|
};
|
|
1111
|
+
this.moveErrors = {
|
|
1112
|
+
[this.addresses.perpetuals.packages.perpetuals]: {
|
|
1113
|
+
// Clearing House
|
|
1114
|
+
// Cannot deposit/withdraw zero coins to/from the account's collateral.
|
|
1115
|
+
0: "Deposit Or Withdraw Amount Zero",
|
|
1116
|
+
// Orderbook size or price are invalid values
|
|
1117
|
+
1: "Invalid Size Or Price",
|
|
1118
|
+
// When trying to access a particular insurance fund, but it does not exist.
|
|
1119
|
+
2: "Invalid Insurance Fund Id",
|
|
1120
|
+
// Index price returned from oracle is 0 or invalid value
|
|
1121
|
+
3: "Bad Index Price",
|
|
1122
|
+
// Registry already contains the specified collateral type
|
|
1123
|
+
4: "Invalid Collateral Type",
|
|
1124
|
+
// Order value in USD is too low
|
|
1125
|
+
5: "Order Usd Value Too Low",
|
|
1126
|
+
// Wrong number of sizes passed to liquidation.
|
|
1127
|
+
// It must match the number of liqee's positions.
|
|
1128
|
+
6: "Invalid Number Of Sizes",
|
|
1129
|
+
// MarketManager
|
|
1130
|
+
// Tried to create a new market with invalid parameters.
|
|
1131
|
+
1000: "Invalid Market Parameters",
|
|
1132
|
+
// Tried to call `update_funding` before enough time has passed since the
|
|
1133
|
+
// last update.
|
|
1134
|
+
1001: "Updating Funding Too Early",
|
|
1135
|
+
// Margin ratio update proposal already exists for market
|
|
1136
|
+
1002: "Proposal Already Exists",
|
|
1137
|
+
// Margin ratio update proposal cannot be commited too early
|
|
1138
|
+
1003: "Premature Proposal",
|
|
1139
|
+
// Margin ratio update proposal delay is outside the valid range
|
|
1140
|
+
1004: "Invalid Proposal Delay",
|
|
1141
|
+
// Market does not exist
|
|
1142
|
+
1005: "Market Does Not Exist",
|
|
1143
|
+
// Tried to update a config with a value outside of the allowed range
|
|
1144
|
+
1006: "Value Out Of Range",
|
|
1145
|
+
// Margin ratio update proposal does not exist for market
|
|
1146
|
+
1007: "Proposal Does Not Exist",
|
|
1147
|
+
// Exchange has no available fees to withdraw
|
|
1148
|
+
1008: "No Fees Accrued",
|
|
1149
|
+
// Tried to withdraw more insurance funds than the allowed amount
|
|
1150
|
+
1009: "Insufficient Insurance Surplus",
|
|
1151
|
+
// Cannot create a market for which a price feed does not exist
|
|
1152
|
+
1010: "No Price Feed For Market",
|
|
1153
|
+
// Account Manager
|
|
1154
|
+
// Tried accessing a nonexistent account.
|
|
1155
|
+
2000: "Account Not Found",
|
|
1156
|
+
// Tried accessing a nonexistent account position.
|
|
1157
|
+
2001: "Position Not Found",
|
|
1158
|
+
// Tried creating a new position when the account already has the maximum
|
|
1159
|
+
// allowed number of open positions.
|
|
1160
|
+
2002: "Max Positions Exceeded",
|
|
1161
|
+
// An operation brought an account below initial margin requirements.
|
|
1162
|
+
// 2003: "Initial Margin Requirement Violated",
|
|
1163
|
+
2003: "Margin Requirements Violated, Try Lowering Size",
|
|
1164
|
+
// Account is above MMR, so can't be liquidated.
|
|
1165
|
+
2004: "Account Above MMR",
|
|
1166
|
+
// Cannot realize bad debt via means other than calling 'liquidate'.
|
|
1167
|
+
2005: "Account Bad Debt",
|
|
1168
|
+
// Cannot withdraw more than the account's free collateral.
|
|
1169
|
+
2006: "Insufficient Free Collateral",
|
|
1170
|
+
// Cannot delete a position that is not worthless
|
|
1171
|
+
2007: "Position Not Null",
|
|
1172
|
+
// Tried placing a new pending order when the position already has the maximum
|
|
1173
|
+
// allowed number of pending orders.
|
|
1174
|
+
2008: "Max Pending Orders Exceeded",
|
|
1175
|
+
// Used for checking both liqee and liqor positions during liquidation
|
|
1176
|
+
2009: "Account Below IMR",
|
|
1177
|
+
// When leaving liqee's account with a margin ratio above tolerance,
|
|
1178
|
+
// meaning that liqor has overbought position
|
|
1179
|
+
2010: "Account Above Tolerance",
|
|
1180
|
+
// Orderbook & OrderedMap
|
|
1181
|
+
// While searching for a key, but it doesn't exist.
|
|
1182
|
+
3000: "Key Does Not Exist",
|
|
1183
|
+
// While inserting already existing key.
|
|
1184
|
+
3001: "Key Already Exists",
|
|
1185
|
+
// When attempting to destroy a non-empty map
|
|
1186
|
+
3002: "Destroying Not Empty Map",
|
|
1187
|
+
// Invalid user tries to modify an order
|
|
1188
|
+
3003: "Invalid User For Order",
|
|
1189
|
+
// Orderbook flag requirements violated
|
|
1190
|
+
3004: "Flag Requirements Violated",
|
|
1191
|
+
// Minimum size matched not reached
|
|
1192
|
+
3005: "Not Enough Liquidity",
|
|
1193
|
+
},
|
|
1194
|
+
};
|
|
1143
1195
|
}
|
|
1144
1196
|
// public fetchMarket = async (inputs: {
|
|
1145
1197
|
// marketId: PerpetualsMarketId;
|
|
@@ -6,7 +6,6 @@ import { PerpetualsOrderUtils } from "./utils";
|
|
|
6
6
|
export declare class Perpetuals extends Caller {
|
|
7
7
|
readonly network?: SuiNetwork | undefined;
|
|
8
8
|
static readonly OrderUtils: typeof PerpetualsOrderUtils;
|
|
9
|
-
private static readonly moveErrors;
|
|
10
9
|
constructor(network?: SuiNetwork | undefined);
|
|
11
10
|
getAllMarkets(inputs: {
|
|
12
11
|
collateralCoinType: CoinType;
|
|
@@ -56,6 +55,5 @@ export declare class Perpetuals extends Caller {
|
|
|
56
55
|
baseAssetAmount: IFixed;
|
|
57
56
|
quoteAssetNotionalAmount: IFixed;
|
|
58
57
|
}): number;
|
|
59
|
-
static translateMoveErrorCode(errorCode: number): string | undefined;
|
|
60
58
|
}
|
|
61
59
|
//# sourceMappingURL=perpetuals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perpetuals.d.ts","sourceRoot":"","sources":["../../../src/packages/perpetuals/perpetuals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EACN,8BAA8B,EAC9B,UAAU,EAKV,kBAAkB,EAClB,yBAAyB,EAEzB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EAGT,yCAAyC,EACzC,oBAAoB,EAGpB,MAAM,
|
|
1
|
+
{"version":3,"file":"perpetuals.d.ts","sourceRoot":"","sources":["../../../src/packages/perpetuals/perpetuals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EACN,8BAA8B,EAC9B,UAAU,EAKV,kBAAkB,EAClB,yBAAyB,EAEzB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EAGT,yCAAyC,EACzC,oBAAoB,EAGpB,MAAM,EAEN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,qBAAa,UAAW,SAAQ,MAAM;aAWT,OAAO,CAAC;IANpC,gBAAuB,UAAU,8BAAwB;gBAM7B,OAAO,CAAC,wBAAY;IAQnC,aAAa,CAAC,MAAM,EAAE;QAClC,kBAAkB,EAAE,QAAQ,CAAC;KAC7B,GAAG,OAAO,C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AAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B,KAAG,MAAM,CAgBR;WAEY,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;WAIpD,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAIlE,OAAc,aAAa,YACjB,iBAAiB,KACxB,mBAAmB,CAIpB;WAMY,cAAc,CAAC,MAAM,EAAE;QACpC,eAAe,EAAE,MAAM,CAAC;QACxB,wBAAwB,EAAE,MAAM,CAAC;KACjC,GAAG,MAAM;CAWV"}
|
|
@@ -116,14 +116,6 @@ class Perpetuals extends caller_1.Caller {
|
|
|
116
116
|
return Math.abs(utils_1.Casting.IFixed.numberFromIFixed(quoteAssetNotionalAmount) /
|
|
117
117
|
denominator);
|
|
118
118
|
}
|
|
119
|
-
// =========================================================================
|
|
120
|
-
// Helpers
|
|
121
|
-
// =========================================================================
|
|
122
|
-
static translateMoveErrorCode(errorCode) {
|
|
123
|
-
return errorCode in this.moveErrors
|
|
124
|
-
? this.moveErrors[errorCode]
|
|
125
|
-
: undefined;
|
|
126
|
-
}
|
|
127
119
|
}
|
|
128
120
|
exports.Perpetuals = Perpetuals;
|
|
129
121
|
_a = Perpetuals;
|
|
@@ -131,88 +123,6 @@ _a = Perpetuals;
|
|
|
131
123
|
// Constants
|
|
132
124
|
// =========================================================================
|
|
133
125
|
Perpetuals.OrderUtils = utils_2.PerpetualsOrderUtils;
|
|
134
|
-
Perpetuals.moveErrors = {
|
|
135
|
-
// Clearing House
|
|
136
|
-
// Cannot deposit/withdraw zero coins to/from the account's collateral.
|
|
137
|
-
0: "Deposit Or Withdraw Amount Zero",
|
|
138
|
-
// Orderbook size or price are invalid values
|
|
139
|
-
1: "Invalid Size Or Price",
|
|
140
|
-
// When trying to access a particular insurance fund, but it does not exist.
|
|
141
|
-
2: "Invalid Insurance Fund Id",
|
|
142
|
-
// Index price returned from oracle is 0 or invalid value
|
|
143
|
-
3: "Bad Index Price",
|
|
144
|
-
// Registry already contains the specified collateral type
|
|
145
|
-
4: "Invalid Collateral Type",
|
|
146
|
-
// Order value in USD is too low
|
|
147
|
-
5: "Order Usd Value Too Low",
|
|
148
|
-
// Wrong number of sizes passed to liquidation.
|
|
149
|
-
// It must match the number of liqee's positions.
|
|
150
|
-
6: "Invalid Number Of Sizes",
|
|
151
|
-
// MarketManager
|
|
152
|
-
// Tried to create a new market with invalid parameters.
|
|
153
|
-
1000: "Invalid Market Parameters",
|
|
154
|
-
// Tried to call `update_funding` before enough time has passed since the
|
|
155
|
-
// last update.
|
|
156
|
-
1001: "Updating Funding Too Early",
|
|
157
|
-
// Margin ratio update proposal already exists for market
|
|
158
|
-
1002: "Proposal Already Exists",
|
|
159
|
-
// Margin ratio update proposal cannot be commited too early
|
|
160
|
-
1003: "Premature Proposal",
|
|
161
|
-
// Margin ratio update proposal delay is outside the valid range
|
|
162
|
-
1004: "Invalid Proposal Delay",
|
|
163
|
-
// Market does not exist
|
|
164
|
-
1005: "Market Does Not Exist",
|
|
165
|
-
// Tried to update a config with a value outside of the allowed range
|
|
166
|
-
1006: "Value Out Of Range",
|
|
167
|
-
// Margin ratio update proposal does not exist for market
|
|
168
|
-
1007: "Proposal Does Not Exist",
|
|
169
|
-
// Exchange has no available fees to withdraw
|
|
170
|
-
1008: "No Fees Accrued",
|
|
171
|
-
// Tried to withdraw more insurance funds than the allowed amount
|
|
172
|
-
1009: "Insufficient Insurance Surplus",
|
|
173
|
-
// Cannot create a market for which a price feed does not exist
|
|
174
|
-
1010: "No Price Feed For Market",
|
|
175
|
-
// Account Manager
|
|
176
|
-
// Tried accessing a nonexistent account.
|
|
177
|
-
2000: "Account Not Found",
|
|
178
|
-
// Tried accessing a nonexistent account position.
|
|
179
|
-
2001: "Position Not Found",
|
|
180
|
-
// Tried creating a new position when the account already has the maximum
|
|
181
|
-
// allowed number of open positions.
|
|
182
|
-
2002: "Max Positions Exceeded",
|
|
183
|
-
// An operation brought an account below initial margin requirements.
|
|
184
|
-
// 2003: "Initial Margin Requirement Violated",
|
|
185
|
-
2003: "Margin Requirements Violated, Try Lowering Size",
|
|
186
|
-
// Account is above MMR, so can't be liquidated.
|
|
187
|
-
2004: "Account Above MMR",
|
|
188
|
-
// Cannot realize bad debt via means other than calling 'liquidate'.
|
|
189
|
-
2005: "Account Bad Debt",
|
|
190
|
-
// Cannot withdraw more than the account's free collateral.
|
|
191
|
-
2006: "Insufficient Free Collateral",
|
|
192
|
-
// Cannot delete a position that is not worthless
|
|
193
|
-
2007: "Position Not Null",
|
|
194
|
-
// Tried placing a new pending order when the position already has the maximum
|
|
195
|
-
// allowed number of pending orders.
|
|
196
|
-
2008: "Max Pending Orders Exceeded",
|
|
197
|
-
// Used for checking both liqee and liqor positions during liquidation
|
|
198
|
-
2009: "Account Below IMR",
|
|
199
|
-
// When leaving liqee's account with a margin ratio above tolerance,
|
|
200
|
-
// meaning that liqor has overbought position
|
|
201
|
-
2010: "Account Above Tolerance",
|
|
202
|
-
// Orderbook & OrderedMap
|
|
203
|
-
// While searching for a key, but it doesn't exist.
|
|
204
|
-
3000: "Key Does Not Exist",
|
|
205
|
-
// While inserting already existing key.
|
|
206
|
-
3001: "Key Already Exists",
|
|
207
|
-
// When attempting to destroy a non-empty map
|
|
208
|
-
3002: "Destroying Not Empty Map",
|
|
209
|
-
// Invalid user tries to modify an order
|
|
210
|
-
3003: "Invalid User For Order",
|
|
211
|
-
// Orderbook flag requirements violated
|
|
212
|
-
3004: "Flag Requirements Violated",
|
|
213
|
-
// Minimum size matched not reached
|
|
214
|
-
3005: "Not Enough Liquidity",
|
|
215
|
-
};
|
|
216
126
|
Perpetuals.priceToOrderPrice = (inputs) => {
|
|
217
127
|
const { price, lotSize, tickSize } = inputs;
|
|
218
128
|
const priceFixed = fixedUtils_1.FixedUtils.directUncast(price);
|
|
@@ -5,6 +5,7 @@ import { Balance, PoolDepositEvent, PoolStats, PoolTradeEvent, PoolWithdrawEvent
|
|
|
5
5
|
import { Pool } from "../pool";
|
|
6
6
|
import { DurationUnitType } from "dayjs/plugin/duration";
|
|
7
7
|
import { IndexerSwapVolumeResponse } from "../../../general/types/castingTypes";
|
|
8
|
+
import { MoveErrors, MoveErrorsInterface } from "../../../general/types/moveErrorsInterface";
|
|
8
9
|
/**
|
|
9
10
|
* This file contains the implementation of the PoolsApi class, which provides methods for interacting with the Aftermath protocol's pools.
|
|
10
11
|
* @packageDocumentation
|
|
@@ -12,7 +13,7 @@ import { IndexerSwapVolumeResponse } from "../../../general/types/castingTypes";
|
|
|
12
13
|
/**
|
|
13
14
|
* Provides methods to interact with the Pools API.
|
|
14
15
|
*/
|
|
15
|
-
export declare class PoolsApi {
|
|
16
|
+
export declare class PoolsApi implements MoveErrorsInterface {
|
|
16
17
|
private readonly Provider;
|
|
17
18
|
/**
|
|
18
19
|
* Constants used in the pools API.
|
|
@@ -36,6 +37,7 @@ export declare class PoolsApi {
|
|
|
36
37
|
depositV2: AnyObjectType;
|
|
37
38
|
withdrawV2: AnyObjectType;
|
|
38
39
|
};
|
|
40
|
+
readonly moveErrors: MoveErrors;
|
|
39
41
|
static readonly poolVolumeDataTimeframes: Record<PoolGraphDataTimeframeKey, PoolGraphDataTimeframe>;
|
|
40
42
|
/**
|
|
41
43
|
* Creates an instance of PoolsApi.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poolsApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/pools/api/poolsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,yBAAyB,EACzB,WAAW,EACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,eAAe,EACf,YAAY,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EAEtB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,EAET,GAAG,EAEH,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EAInB,UAAU,EACV,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,OAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAEN,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"poolsApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/pools/api/poolsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,yBAAyB,EACzB,WAAW,EACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,eAAe,EACf,YAAY,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EAEtB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,EAET,GAAG,EAEH,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EAInB,UAAU,EACV,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,OAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,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uB,WAAkB;QAC/C,MAAM,EAAE,QAAQ,CAAC;QACjB,SAAS,EAAE,yBAAyB,CAAC;KACrC,8BAmEC;IAMF;;;;OAIG;IACI,+BAA+B,WAAkB;QACvD,QAAQ,EAAE,QAAQ,CAAC;QACnB,SAAS,EAAE,QAAQ,EAAE,CAAC;KACtB,qBAiBC;IAMK,wBAAwB,WAAkB;QAChD,KAAK,EAAE,IAAI,EAAE,CAAC;QACd,eAAe,EAAE,eAAe,CAAC;KACjC,KAAG,QAAQ,mBAAmB,EAAE,CAAC,CAuHhC;IAgFF,OAAO,CAAC,cAAc,CAKnB;IAEH,OAAO,CAAC,gBAAgB,CAKrB;IAEH,OAAO,CAAC,iBAAiB,CAKtB;IAEH,OAAO,CAAC,gBAAgB,CAKrB;IAEH,OAAO,CAAC,kBAAkB,CAKvB;IAEH,OAAO,CAAC,mBAAmB,CAKxB;CACH"}
|
|
@@ -1108,6 +1108,129 @@ class PoolsApi {
|
|
|
1108
1108
|
depositV2: this.depositV2EventType(),
|
|
1109
1109
|
withdrawV2: this.withdrawV2EventType(),
|
|
1110
1110
|
};
|
|
1111
|
+
this.moveErrors = {
|
|
1112
|
+
[this.addresses.pools.packages.amm]: {
|
|
1113
|
+
[PoolsApi.constants.moduleNames.pool]: {
|
|
1114
|
+
/// A user provides a input that should be between 0 and `FIXED_ONE` but isn't.
|
|
1115
|
+
0: "Flatness Not Normalized",
|
|
1116
|
+
/// A user attempts to create a Pool with a `flatness` parameter we do not support yet.
|
|
1117
|
+
1: "Flatness Not Supported",
|
|
1118
|
+
/// A user attempts to create a pool with weights that don't sum to `FIXED_ONE`.
|
|
1119
|
+
2: "Weights Not Normalized",
|
|
1120
|
+
/// A user attempts to create a Pool with an individual weight outside of the
|
|
1121
|
+
/// range [MIN_WEIGHT, MAX_WEIGHT].
|
|
1122
|
+
3: "Invalid Weight",
|
|
1123
|
+
/// A user attempts to create a Pool with an individual fee outside of the
|
|
1124
|
+
/// range [MIN_FEE, MAX_FEE].
|
|
1125
|
+
4: "Invalid Fee",
|
|
1126
|
+
/// A user provides an input vector (with length m != n) for a pool of size n.
|
|
1127
|
+
5: "Bad Vector Length",
|
|
1128
|
+
/// A user tries to create a Pool but provides an initial deposit that equates to less than
|
|
1129
|
+
/// `MIN_LP_SUPPLY` worth of LP Coins.
|
|
1130
|
+
6: "Not Enough Initial Liquidity",
|
|
1131
|
+
/// A user attempts to create a Pool with an LP `TreasuryCap` that has already minted Coins.
|
|
1132
|
+
7: "Non Zero Total Supply",
|
|
1133
|
+
/// A user attempts to interact with the Pool and specifies a type that isn't in the Pool.
|
|
1134
|
+
8: "Bad Type",
|
|
1135
|
+
/// A user attempts to create a pool with invalid decimal scalars
|
|
1136
|
+
9: "Bad Decimals",
|
|
1137
|
+
/// A user attempts to create a pool with type names which are not sorted
|
|
1138
|
+
10: "Not Sorted",
|
|
1139
|
+
},
|
|
1140
|
+
[PoolsApi.constants.moduleNames.poolRegistry]: {
|
|
1141
|
+
/// A user tries to create a Pool and the generic parameters of `create_pool_n_coins` were
|
|
1142
|
+
/// provided in nonlexicographical order.
|
|
1143
|
+
60: "NotSorted",
|
|
1144
|
+
/// A user tries to create a Pool with exact parameters as an already active Pool.
|
|
1145
|
+
61: "DuplicatePool",
|
|
1146
|
+
/// A user tries to upgrade the `PoolRegistry` to a value
|
|
1147
|
+
62: "InvalidUpgrade",
|
|
1148
|
+
},
|
|
1149
|
+
[PoolsApi.constants.moduleNames.deposit]: {
|
|
1150
|
+
/// A user attempts to perform a `deposit` with an older contract.
|
|
1151
|
+
20: "InvalidProtocolVersion",
|
|
1152
|
+
/// A user attempts to perform `deposit-n-coins` on a Pool with a size `m` < `n`.
|
|
1153
|
+
21: "InvalidPoolSize",
|
|
1154
|
+
/// A user attempts to perform a deposit and provides a coin with a value of zero.
|
|
1155
|
+
22: "ZeroValue",
|
|
1156
|
+
// A user calls `deposit_n_coins` or `all_coin_deposit_n_coins` and provides the same generic
|
|
1157
|
+
// at least twice.
|
|
1158
|
+
23: "DuplicateTypes",
|
|
1159
|
+
},
|
|
1160
|
+
[PoolsApi.constants.moduleNames.poolFactory]: {
|
|
1161
|
+
/// A user attempts to create a pool on an older contract.
|
|
1162
|
+
10: "InvalidProtocolVersion",
|
|
1163
|
+
/// A user attempts to create a Pool and provides a coin with a value of zero.
|
|
1164
|
+
11: "ZeroValue",
|
|
1165
|
+
},
|
|
1166
|
+
[PoolsApi.constants.moduleNames.price]: {
|
|
1167
|
+
/// A user attempts to query spot/oracle price using an old contract.
|
|
1168
|
+
10: "InvalidProtocolVersion",
|
|
1169
|
+
},
|
|
1170
|
+
[PoolsApi.constants.moduleNames.swap]: {
|
|
1171
|
+
/// A user attempts to perform a `swap` with an older contract.
|
|
1172
|
+
40: "InvalidProtocolVersion",
|
|
1173
|
+
/// A user attempts to perform `multi-swap-exact-in/out-n-to-m` on a Pool with a size
|
|
1174
|
+
/// `s` < `n` + `m`.
|
|
1175
|
+
41: "InvalidPoolSize",
|
|
1176
|
+
/// A user attempts to perform swap and providing provides a coin with a
|
|
1177
|
+
/// value of zero.
|
|
1178
|
+
42: "ZeroValue",
|
|
1179
|
+
/// A user attempts to perform a multi-coin withdraw and provides an `amounts_out`
|
|
1180
|
+
/// vector whose length does
|
|
1181
|
+
43: "BadVectorLength",
|
|
1182
|
+
/// A user attempts to swap attempts to swap `Coin<CI>` for `amount_out` of `Coin<CO>`
|
|
1183
|
+
/// but its value is insufficient.
|
|
1184
|
+
44: "InsufficientCoinIn",
|
|
1185
|
+
// A user calls `multi_swap_exact_in_1_to_n` or `multi_swap_exact_out_1_to_n` and provides the same
|
|
1186
|
+
// generic at least twice.
|
|
1187
|
+
45: "DuplicateTypes",
|
|
1188
|
+
/// Something went wrong with the internal calculations
|
|
1189
|
+
46: "InternalError",
|
|
1190
|
+
/// An external app is trying to call authorized functions without permission.
|
|
1191
|
+
47: "NotAuthorized",
|
|
1192
|
+
},
|
|
1193
|
+
[PoolsApi.constants.moduleNames.withdraw]: {
|
|
1194
|
+
/// A user attempts to perform a `withdraw` with an older contract.
|
|
1195
|
+
30: "InvalidProtocolVersion",
|
|
1196
|
+
/// A user attempts to perform `withdraw-n-coins` on a Pool with a size `m` < `n`.
|
|
1197
|
+
31: "InvalidPoolSize",
|
|
1198
|
+
/// A user attempts to perform a withdraw and provides an LP coin with a value of zero.
|
|
1199
|
+
32: "ZeroValue",
|
|
1200
|
+
/// A user attempts to perform a multi-coin withdraw and provides an `amounts_out`
|
|
1201
|
+
/// vector whose length does
|
|
1202
|
+
33: "BadVectorLength",
|
|
1203
|
+
// A user calls `withdraw_n_coins` or `all_coin_withdraw_n_coins` and provides the same generic
|
|
1204
|
+
// at least twice.
|
|
1205
|
+
34: "DuplicateTypes",
|
|
1206
|
+
},
|
|
1207
|
+
[PoolsApi.constants.moduleNames.math]: {
|
|
1208
|
+
// TODO: change error code in move
|
|
1209
|
+
/// A user tries to create a Pool that would result in the Pool's invariant equalling zero.
|
|
1210
|
+
// 51: "ZeroInvariant",
|
|
1211
|
+
/// A user tries to perform an action with the Pool that results in too much slippage.
|
|
1212
|
+
51: "Slippage",
|
|
1213
|
+
/// A user tries to perform a swap that would result in more than `MAX_SWAP_AMOUNT_IN` worth of
|
|
1214
|
+
/// one of the Pool's coins entering the Pool.
|
|
1215
|
+
52: "InvalidSwapAmountIn",
|
|
1216
|
+
/// A user tries to perform a swap that would result in more than `MAX_SWAP_AMOUNT_OUT` worth of
|
|
1217
|
+
/// one of the Pool's coins exiting the Pool.
|
|
1218
|
+
53: "InvalidSwapAmountOut",
|
|
1219
|
+
/// A user tries to perform a `swap_exact_out` with a value for `amount_out` that equates to
|
|
1220
|
+
/// zero amount of `Coin<CI>`.
|
|
1221
|
+
54: "ZeroAmountIn",
|
|
1222
|
+
/// A user tries to perform a `swap_exact_in` with an amount of `Coin<CI>` that equates to
|
|
1223
|
+
/// zero amount of `Coin<CO>`.
|
|
1224
|
+
55: "ZeroAmountOut",
|
|
1225
|
+
/// A user tries to deposit into a Pool with a deposit that is worth zero LP coins.
|
|
1226
|
+
56: "ZeroLpOut",
|
|
1227
|
+
/// A user tries to invest with an lp ratio of 0
|
|
1228
|
+
57: "ZeroLpRatio",
|
|
1229
|
+
},
|
|
1230
|
+
[PoolsApi.constants.moduleNames.geometricMeanCalculations]: {},
|
|
1231
|
+
[PoolsApi.constants.moduleNames.stableCalculations]: {},
|
|
1232
|
+
},
|
|
1233
|
+
};
|
|
1111
1234
|
}
|
|
1112
1235
|
// =========================================================================
|
|
1113
1236
|
// Events
|
|
@@ -1201,6 +1324,10 @@ PoolsApi.constants = {
|
|
|
1201
1324
|
poolRegistry: "pool_registry",
|
|
1202
1325
|
routerWrapper: "router",
|
|
1203
1326
|
poolFactory: "pool_factory",
|
|
1327
|
+
math: "math",
|
|
1328
|
+
geometricMeanCalculations: "geometric_mean_calculations",
|
|
1329
|
+
stableCalculations: "stable_calculations",
|
|
1330
|
+
price: "price",
|
|
1204
1331
|
},
|
|
1205
1332
|
eventNames: {
|
|
1206
1333
|
swap: "SwapEvent",
|
|
@@ -4,15 +4,19 @@ import { TransactionObjectArgument, Transaction } from "@mysten/sui/transactions
|
|
|
4
4
|
import { IndexerSwapVolumeResponse } from "../../../general/types/castingTypes";
|
|
5
5
|
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
6
6
|
import { TransactionObjectArgument as TransactionObjectArgumentV0 } from "@mysten/sui.js/transactions";
|
|
7
|
+
import { MoveErrors, MoveErrorsInterface } from "../../../general/types/moveErrorsInterface";
|
|
7
8
|
/**
|
|
8
9
|
* RouterApi class provides methods for interacting with the Aftermath Router API.
|
|
9
10
|
* @class
|
|
10
11
|
*/
|
|
11
|
-
export declare class RouterApi {
|
|
12
|
+
export declare class RouterApi implements MoveErrorsInterface {
|
|
12
13
|
private readonly Provider;
|
|
13
14
|
static readonly constants: {
|
|
14
15
|
moduleNames: {
|
|
15
|
-
|
|
16
|
+
router: string;
|
|
17
|
+
protocolFee: string;
|
|
18
|
+
version: string;
|
|
19
|
+
admin: string;
|
|
16
20
|
};
|
|
17
21
|
eventNames: {
|
|
18
22
|
routerTrade: string;
|
|
@@ -22,6 +26,7 @@ export declare class RouterApi {
|
|
|
22
26
|
readonly eventTypes: {
|
|
23
27
|
routerTrade: AnyObjectType;
|
|
24
28
|
};
|
|
29
|
+
readonly moveErrors: MoveErrors;
|
|
25
30
|
/**
|
|
26
31
|
* Creates an instance of RouterApi.
|
|
27
32
|
* @constructor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/router/api/routerApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,OAAO,EACP,QAAQ,EACR,WAAW,EACX,wBAAwB,EACxB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EAIV,gBAAgB,EAChB,aAAa,EACb,eAAe,
|
|
1
|
+
{"version":3,"file":"routerApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/router/api/routerApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,OAAO,EACP,QAAQ,EACR,WAAW,EACX,wBAAwB,EACxB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EAIV,gBAAgB,EAChB,aAAa,EACb,eAAe,EAMf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,yBAAyB,EACzB,WAAW,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAKhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,IAAI,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EACN,UAAU,EACV,mBAAmB,EACnB,MAAM,4CAA4C,CAAC;AAEpD;;;GAGG;AACH,qBAAa,SAAU,YAAW,mBAAmB;IAoCxC,OAAO,CAA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E,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC1B;YACI,gBAAgB;iBACX,2BAA2B;OAmGnC;IAMF;;;;OAIG;IACU,gBAAgB,CAAC,MAAM,EAAE,gBAAgB;YAwBxC,iDAAiD;IA4E/D,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAuB/B;IAEF,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAkCjC;IAMF,OAAO,CAAC,oBAAoB,CAKzB;CACH"}
|
|
@@ -325,13 +325,45 @@ class RouterApi {
|
|
|
325
325
|
// =========================================================================
|
|
326
326
|
// Event Types
|
|
327
327
|
// =========================================================================
|
|
328
|
-
this.routerTradeEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.utils, RouterApi.constants.moduleNames.
|
|
328
|
+
this.routerTradeEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.utils, RouterApi.constants.moduleNames.router, RouterApi.constants.eventNames.routerTrade);
|
|
329
329
|
if (!this.Provider.addresses.router)
|
|
330
330
|
throw new Error("not all required addresses have been set in provider");
|
|
331
331
|
this.addresses = this.Provider.addresses.router;
|
|
332
332
|
this.eventTypes = {
|
|
333
333
|
routerTrade: this.routerTradeEventType(),
|
|
334
334
|
};
|
|
335
|
+
this.moveErrors = {
|
|
336
|
+
[this.addresses.packages.utils]: {
|
|
337
|
+
[RouterApi.constants.moduleNames.protocolFee]: {
|
|
338
|
+
/// A non-one-time-witness type has been provided to the `ProtocolFeeConfig`'s `create` function.
|
|
339
|
+
1: "Protocol Fee Config Already Created",
|
|
340
|
+
/// Occurs when `change_fee` is called more than once during the same Epoch.
|
|
341
|
+
2: "Bad Epoch",
|
|
342
|
+
/// A user provided a new protocol fees that do not sum to one.
|
|
343
|
+
3: "Not Normalized",
|
|
344
|
+
},
|
|
345
|
+
[RouterApi.constants.moduleNames.router]: {
|
|
346
|
+
0: "Not Authorized",
|
|
347
|
+
1: "Invalid Coin In",
|
|
348
|
+
2: "Invalid Coin Out",
|
|
349
|
+
4: "Invalid Previous Swap",
|
|
350
|
+
5: "Invalid Slippage",
|
|
351
|
+
/// A route is constructed that bypasses one of `begin_router_tx_and_pay_fees` or
|
|
352
|
+
/// `end_router_tx_and_pay_fees`.
|
|
353
|
+
6: "No Fees Paid",
|
|
354
|
+
},
|
|
355
|
+
[RouterApi.constants.moduleNames.version]: {
|
|
356
|
+
/// A user tries to interact with an old contract.
|
|
357
|
+
0: "Invalid Version",
|
|
358
|
+
},
|
|
359
|
+
[RouterApi.constants.moduleNames.admin]: {
|
|
360
|
+
/// Admin has not authorized the calling shared object to acess a permissioned function.
|
|
361
|
+
0: "Not Authorized",
|
|
362
|
+
/// Admin has already authorized the calling shared object to acess a permissioned function.
|
|
363
|
+
1: "Already Authorized",
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
};
|
|
335
367
|
}
|
|
336
368
|
// =========================================================================
|
|
337
369
|
// Events
|
|
@@ -407,7 +439,10 @@ exports.RouterApi = RouterApi;
|
|
|
407
439
|
// =========================================================================
|
|
408
440
|
RouterApi.constants = {
|
|
409
441
|
moduleNames: {
|
|
410
|
-
|
|
442
|
+
router: "router",
|
|
443
|
+
protocolFee: "protocol_fee",
|
|
444
|
+
version: "version",
|
|
445
|
+
admin: "admin",
|
|
411
446
|
},
|
|
412
447
|
eventNames: {
|
|
413
448
|
routerTrade: "SwapCompletedEvent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/packages/router/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6CAA6C,EAE7C,wBAAwB,EACxB,UAAU,EACV,wBAAwB,EACxB,gBAAgB,EAChB,OAAO,EACP,sCAAsC,EACtC,gDAAgD,EAEhD,kDAAkD,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/packages/router/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6CAA6C,EAE7C,wB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c,CAAC,MAAM,EAAE,wBAAwB;CAG5D"}
|
|
@@ -3,7 +3,8 @@ import { ValidatorsApy } from "@mysten/sui/client";
|
|
|
3
3
|
import { AftermathApi } from "../../../general/providers/aftermathApi";
|
|
4
4
|
import { StakeEvent, StakePosition, StakedEvent, StakingPosition, UnstakePosition, UnstakedEvent, ValidatorConfigObject, ApiStakeStakedSuiBody, ApiUnstakeBody, ApiStakeBody, ApiDelegatedStakesBody, SuiDelegatedStake, ValidatorOperationCapObject, ApiUpdateValidatorFeeBody, UnstakeEvent, UnstakeRequestedEvent, StakedSuiVaultStateObject } from "../stakingTypes";
|
|
5
5
|
import { AnyObjectType, ApiIndexerEventsBody, ApiIndexerUserEventsBody, Balance, CoinType, ObjectId, StakingAddresses, SuiAddress } from "../../../types";
|
|
6
|
-
|
|
6
|
+
import { MoveErrors, MoveErrorsInterface } from "../../../general/types/moveErrorsInterface";
|
|
7
|
+
export declare class StakingApi implements MoveErrorsInterface {
|
|
7
8
|
private readonly Provider;
|
|
8
9
|
private static readonly constants;
|
|
9
10
|
readonly addresses: StakingAddresses;
|
|
@@ -19,6 +20,7 @@ export declare class StakingApi {
|
|
|
19
20
|
readonly objectTypes: {
|
|
20
21
|
unverifiedValidatorOperationCap: AnyObjectType;
|
|
21
22
|
};
|
|
23
|
+
readonly moveErrors: MoveErrors;
|
|
22
24
|
constructor(Provider: AftermathApi);
|
|
23
25
|
fetchDelegatedStakes: (inputs: ApiDelegatedStakesBody) => Promise<SuiDelegatedStake[]>;
|
|
24
26
|
fetchValidatorApys: () => Promise<ValidatorsApy>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakingApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/staking/api/stakingApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,WAAW,EAEX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAkB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EACf,aAAa,EAKb,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EAEzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,OAAO,EACP,QAAQ,EAER,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"stakingApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/staking/api/stakingApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,WAAW,EAEX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAkB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACN,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EACf,aAAa,EAKb,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EAEzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,OAAO,EACP,QAAQ,EAER,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EACN,UAAU,EACV,mBAAmB,EACnB,MAAM,4CAA4C,CAAC;AAEpD,qBAAa,UAAW,YAAW,mBAAmB;IA+CzC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IA1CrC,OAAO,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