@n1xyz/nord-ts 0.0.1 → 0.0.5
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/README.md +148 -65
- package/dist/bridge/client.d.ts +150 -0
- package/dist/bridge/client.js +394 -0
- package/dist/bridge/const.d.ts +23 -0
- package/dist/bridge/const.js +47 -0
- package/dist/bridge/index.d.ts +5 -0
- package/dist/bridge/index.js +23 -0
- package/dist/bridge/types.d.ts +118 -0
- package/dist/bridge/types.js +16 -0
- package/dist/bridge/utils.d.ts +64 -0
- package/dist/bridge/utils.js +131 -0
- package/dist/const.d.ts +2 -5
- package/dist/const.js +2 -6
- package/dist/gen/common.d.ts +6 -1
- package/dist/gen/common.js +19 -9
- package/dist/gen/nord.d.ts +76 -21
- package/dist/gen/nord.js +987 -423
- package/dist/idl/bridge.d.ts +2 -0
- package/dist/idl/bridge.js +703 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +18 -2
- package/dist/nord/{actions.d.ts → api/actions.d.ts} +6 -6
- package/dist/nord/{actions.js → api/actions.js} +6 -10
- package/dist/nord/api/core.d.ts +49 -0
- package/dist/nord/api/core.js +121 -0
- package/dist/nord/api/market.d.ts +36 -0
- package/dist/nord/api/market.js +98 -0
- package/dist/nord/api/metrics.d.ts +67 -0
- package/dist/nord/api/metrics.js +132 -0
- package/dist/nord/api/queries.d.ts +81 -0
- package/dist/nord/api/queries.js +187 -0
- package/dist/nord/client/Nord.d.ts +335 -0
- package/dist/nord/client/Nord.js +532 -0
- package/dist/nord/client/NordUser.d.ts +320 -0
- package/dist/nord/client/NordUser.js +697 -0
- package/dist/nord/index.d.ts +9 -2
- package/dist/nord/index.js +30 -6
- package/dist/nord/models/Subscriber.d.ts +37 -0
- package/dist/nord/models/Subscriber.js +25 -0
- package/dist/nord/utils/NordError.d.ts +35 -0
- package/dist/nord/utils/NordError.js +46 -0
- package/dist/types.d.ts +143 -86
- package/dist/types.js +12 -1
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +20 -1
- package/dist/websocket/NordWebSocketClient.d.ts +71 -0
- package/dist/websocket/NordWebSocketClient.js +343 -0
- package/dist/websocket/events.d.ts +19 -0
- package/dist/websocket/events.js +2 -0
- package/dist/websocket/index.d.ts +2 -0
- package/dist/websocket/index.js +5 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +16 -16
- package/docs/assets/icons.js +17 -14
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +5 -4
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1423 -1227
- package/docs/classes/Nord.html +189 -43
- package/docs/classes/NordError.html +24 -0
- package/docs/classes/NordUser.html +120 -35
- package/docs/classes/NordWebSocketClient.html +335 -0
- package/docs/classes/SolanaBridgeClient.html +86 -0
- package/docs/classes/Subscriber.html +10 -6
- package/docs/enums/FillMode.html +5 -5
- package/docs/enums/KeyType.html +4 -4
- package/docs/enums/MetricPeriod.html +9 -0
- package/docs/enums/PdaSeedType.html +9 -0
- package/docs/enums/PeakTpsPeriodUnit.html +7 -7
- package/docs/enums/Side.html +3 -3
- package/docs/enums/WebSocketMessageType.html +7 -0
- package/docs/functions/actionQueryRollman.html +6 -0
- package/docs/functions/actionsQueryRollman.html +6 -0
- package/docs/functions/aggregateMetrics-1.html +7 -0
- package/docs/functions/assert.html +1 -1
- package/docs/functions/bigIntToProtoU128.html +3 -3
- package/docs/functions/blockQueryRollman.html +6 -0
- package/docs/functions/blockSummaryQueryRollman.html +6 -0
- package/docs/functions/bridgeToBN.html +5 -0
- package/docs/functions/bufferToHex.html +4 -0
- package/docs/functions/cancelOrder.html +1 -0
- package/docs/functions/checkPubKeyLength.html +1 -1
- package/docs/functions/checkedFetch.html +4 -4
- package/docs/functions/createSession.html +1 -0
- package/docs/functions/decodeLengthDelimited.html +7 -6
- package/docs/functions/encodeLengthDelimited.html +4 -4
- package/docs/functions/fillModeToProtoFillMode.html +4 -4
- package/docs/functions/findMarket.html +1 -1
- package/docs/functions/findPda.html +6 -0
- package/docs/functions/findToken.html +1 -1
- package/docs/functions/fromBN.html +5 -0
- package/docs/functions/getAccount.html +6 -0
- package/docs/functions/getActionNonce.html +5 -0
- package/docs/functions/getCurrentTps.html +6 -0
- package/docs/functions/getInfo.html +5 -0
- package/docs/functions/getMedianLatency.html +6 -0
- package/docs/functions/getOrderbook.html +6 -0
- package/docs/functions/getPeakTps.html +6 -0
- package/docs/functions/getTimestamp.html +5 -0
- package/docs/functions/getTotalTransactions.html +5 -0
- package/docs/functions/getTrades.html +6 -0
- package/docs/functions/getUserAccountIds.html +6 -0
- package/docs/functions/hexToBuffer.html +4 -0
- package/docs/functions/initWebSocketClient.html +12 -0
- package/docs/functions/keypairFromPrivateKey.html +4 -0
- package/docs/functions/makeSigningFunction.html +4 -0
- package/docs/functions/makeWalletSignFn.html +5 -5
- package/docs/functions/marketsStats.html +5 -0
- package/docs/functions/optExpect.html +4 -4
- package/docs/functions/optMap.html +5 -5
- package/docs/functions/optUnwrap.html +2 -2
- package/docs/functions/panic.html +1 -1
- package/docs/functions/placeOrder.html +1 -0
- package/docs/functions/queryAction.html +6 -0
- package/docs/functions/queryBlock.html +6 -0
- package/docs/functions/queryLastNBlocks.html +5 -0
- package/docs/functions/queryPrometheus.html +6 -0
- package/docs/functions/queryRecentActions.html +6 -0
- package/docs/functions/queryRecentBlocks.html +6 -0
- package/docs/functions/revokeSession.html +1 -0
- package/docs/functions/shortenPublicKey.html +5 -0
- package/docs/functions/signAction.html +2 -2
- package/docs/functions/toBN.html +5 -0
- package/docs/functions/toScaledU128.html +5 -5
- package/docs/functions/toScaledU64.html +5 -5
- package/docs/functions/transfer.html +1 -0
- package/docs/functions/withdraw.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +39 -20
- package/docs/interfaces/Account.html +8 -8
- package/docs/interfaces/ActionInfo.html +8 -8
- package/docs/interfaces/ActionNonceResponse.html +3 -0
- package/docs/interfaces/ActionQuery.html +4 -4
- package/docs/interfaces/ActionResponse.html +8 -8
- package/docs/interfaces/ActionsExtendedInfo.html +10 -10
- package/docs/interfaces/ActionsQuery.html +5 -5
- package/docs/interfaces/ActionsResponse.html +6 -6
- package/docs/interfaces/AggregateMetrics.html +12 -12
- package/docs/interfaces/BlockFacts.html +10 -0
- package/docs/interfaces/BlockQuery.html +6 -6
- package/docs/interfaces/BlockResponse.html +6 -6
- package/docs/interfaces/BlockSummary.html +8 -8
- package/docs/interfaces/BlockSummaryResponse.html +6 -6
- package/docs/interfaces/DeltaEvent.html +6 -6
- package/docs/interfaces/DepositSplParams.html +10 -0
- package/docs/interfaces/Info.html +3 -3
- package/docs/interfaces/Market.html +8 -6
- package/docs/interfaces/MarketStats.html +7 -7
- package/docs/interfaces/MarketsStatsResponse.html +2 -2
- package/docs/interfaces/NordConfig.html +14 -5
- package/docs/interfaces/NordWebSocketClientEvents.html +4 -0
- package/docs/interfaces/NordWebSocketEvents.html +8 -0
- package/docs/interfaces/Order.html +6 -6
- package/docs/interfaces/OrderInfo.html +6 -6
- package/docs/interfaces/OrderbookEntry.html +4 -0
- package/docs/interfaces/OrderbookQuery.html +6 -0
- package/docs/interfaces/OrderbookResponse.html +6 -10
- package/docs/interfaces/OrderbookSubscription.html +159 -0
- package/docs/interfaces/PerpMarketStats.html +5 -5
- package/docs/interfaces/RollmanActionExtendedInfo.html +4 -4
- package/docs/interfaces/RollmanActionInfo.html +4 -4
- package/docs/interfaces/RollmanActionResponse.html +4 -4
- package/docs/interfaces/RollmanActionsResponse.html +2 -2
- package/docs/interfaces/RollmanBlockResponse.html +3 -3
- package/docs/interfaces/SPLTokenInfo.html +10 -0
- package/docs/interfaces/SolanaBridgeConfig.html +10 -0
- package/docs/interfaces/StateFacts.html +10 -0
- package/docs/interfaces/SubscriberConfig.html +3 -3
- package/docs/interfaces/TimestampResponse.html +3 -0
- package/docs/interfaces/Token.html +5 -5
- package/docs/interfaces/TokenInfo.html +5 -0
- package/docs/interfaces/Trade.html +5 -5
- package/docs/interfaces/TradeSubscription.html +159 -0
- package/docs/interfaces/Trades.html +5 -5
- package/docs/interfaces/TradesQuery.html +6 -0
- package/docs/interfaces/TradesResponse.html +7 -12
- package/docs/interfaces/TransferParams.html +8 -0
- package/docs/interfaces/UserAccountIdsQuery.html +3 -0
- package/docs/interfaces/UserAccountIdsResponse.html +3 -0
- package/docs/interfaces/WebSocketDeltaUpdate.html +9 -0
- package/docs/interfaces/WebSocketSubscription.html +4 -0
- package/docs/interfaces/WebSocketTradeUpdate.html +6 -0
- package/docs/interfaces/WebSocketUserUpdate.html +6 -0
- package/docs/interfaces/WithdrawalClaim.html +14 -0
- package/docs/interfaces/WithdrawalParams.html +8 -0
- package/docs/modules.html +1 -77
- package/docs/types/BigIntValue.html +2 -2
- package/docs/types/WebSocketMessage.html +1 -0
- package/docs/variables/DEBUG_KEYS.html +1 -1
- package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +1 -1
- package/docs/variables/DEV_TOKEN_INFOS.html +1 -1
- package/docs/variables/DEV_URL.html +1 -1
- package/docs/variables/MAX_BUFFER_LEN.html +1 -1
- package/docs/variables/SESSION_TTL.html +1 -1
- package/docs/variables/WEBSERVER_DEV_URL.html +1 -1
- package/docs/variables/ZERO_DECIMAL.html +1 -1
- package/docs/variables/_private.html +2 -0
- package/eslint.config.mjs +66 -0
- package/package.json +20 -23
- package/src/bridge/client.ts +487 -0
- package/src/bridge/const.ts +53 -0
- package/src/bridge/index.ts +7 -0
- package/src/bridge/types.ts +127 -0
- package/src/bridge/utils.ts +140 -0
- package/src/const.ts +4 -9
- package/src/gen/common.ts +27 -10
- package/src/gen/nord.ts +1045 -487
- package/src/idl/bridge.ts +702 -0
- package/src/index.ts +21 -2
- package/src/nord/{actions.ts → api/actions.ts} +12 -16
- package/src/nord/api/core.ts +130 -0
- package/src/nord/api/market.ts +125 -0
- package/src/nord/api/metrics.ts +154 -0
- package/src/nord/api/queries.ts +236 -0
- package/src/nord/client/Nord.ts +652 -0
- package/src/nord/client/NordUser.ts +1101 -0
- package/src/nord/index.ts +16 -2
- package/src/nord/models/Subscriber.ts +56 -0
- package/src/nord/utils/NordError.ts +72 -0
- package/src/types.ts +163 -92
- package/src/utils.ts +22 -1
- package/src/websocket/NordWebSocketClient.ts +432 -0
- package/src/websocket/events.ts +31 -0
- package/src/websocket/index.ts +2 -0
- package/tsconfig.eslint.json +12 -0
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -20
- package/dist/abis/ERC20_ABI.d.ts +0 -39
- package/dist/abis/ERC20_ABI.js +0 -313
- package/dist/abis/NORD_GETTERS_FACET_ABI.d.ts +0 -34
- package/dist/abis/NORD_GETTERS_FACET_ABI.js +0 -195
- package/dist/abis/NORD_RAMP_FACET_ABI.d.ts +0 -35
- package/dist/abis/NORD_RAMP_FACET_ABI.js +0 -144
- package/dist/abis/index.d.ts +0 -3
- package/dist/abis/index.js +0 -9
- package/dist/nord/Nord.d.ts +0 -76
- package/dist/nord/Nord.js +0 -376
- package/dist/nord/NordImpl.d.ts +0 -7
- package/dist/nord/NordImpl.js +0 -6
- package/dist/nord/NordUser.d.ts +0 -77
- package/dist/nord/NordUser.js +0 -249
- package/docs/functions/createWebSocketSubscription.html +0 -12
- package/docs/interfaces/ERC20TokenInfo.html +0 -5
- package/docs/interfaces/OrderbookOrder.html +0 -6
- package/docs/interfaces/TradeInfo.html +0 -20
- package/docs/interfaces/TradesQueryParams.html +0 -10
- package/docs/variables/DEV_CONTRACT_ADDRESS.html +0 -1
- package/docs/variables/ERC20_ABI.html +0 -1
- package/docs/variables/EVM_DEV_URL.html +0 -1
- package/docs/variables/FAUCET_PRIVATE_ADDRESS.html +0 -1
- package/docs/variables/NORD_GETTERS_FACET_ABI.html +0 -1
- package/docs/variables/NORD_RAMP_FACET_ABI.html +0 -1
- package/src/abis/ERC20_ABI.ts +0 -310
- package/src/abis/NORD_GETTERS_FACET_ABI.ts +0 -192
- package/src/abis/NORD_RAMP_FACET_ABI.ts +0 -141
- package/src/abis/index.ts +0 -3
- package/src/nord/Nord.ts +0 -504
- package/src/nord/NordImpl.ts +0 -8
- package/src/nord/NordUser.ts +0 -469
package/dist/gen/nord.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
5
|
-
// protoc
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
|
+
// protoc v3.21.12
|
|
6
6
|
// source: nord.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Receipt_TriggerRemoved = exports.Receipt_TriggerAdded = exports.Receipt_Transferred = exports.Receipt_Unpaused = exports.Receipt_Paused = exports.Receipt_SessionRevoked = exports.
|
|
8
|
+
exports.Receipt_TriggerRemoved = exports.Receipt_TriggerAdded = exports.Receipt_Transferred = exports.Receipt_Unpaused = exports.Receipt_Paused = exports.Receipt_SessionRevoked = exports.Receipt_AccountLiquidated = exports.Receipt_PerpPosition = exports.Receipt_UpdateGuardianSetResult = exports.Receipt_OracleUpdateResult = exports.Receipt_OracleSymbolFeedResult = exports.Receipt_WithdrawResult = exports.Receipt_InsertMarketResult = exports.Receipt_InsertTokenResult = exports.Receipt_DepositResult = exports.Receipt_CancelOrderResult = exports.Receipt_PlaceOrderResult = exports.Receipt_CreateSessionResult = exports.Receipt_Trade = exports.Receipt_Posted = exports.Receipt = exports.Action_RemoveTrigger = exports.Action_AddTrigger = exports.Action_Transfer = exports.Action_Unpause = exports.Action_Pause = exports.Action_RevokeSession = exports.Action_Liquidate = exports.Action_PythPriceFeedUpdate = exports.Action_PythSetSymbolFeed = exports.Action_PythSetWormholeGuardians = exports.Action_Withdraw = exports.Action_Deposit = exports.Action_CancelOrderById = exports.Action_PlaceOrder = exports.Action_CreateMarket = exports.Action_CreateToken = exports.Action_CreateSession = exports.Action = exports.Token = exports.Market = exports.U128 = exports.SpecialAccount = exports.Error = exports.MarketType = exports.FillMode = exports.TriggerKind = exports.Side = exports.protobufPackage = void 0;
|
|
9
9
|
exports.sideFromJSON = sideFromJSON;
|
|
10
10
|
exports.sideToJSON = sideToJSON;
|
|
11
11
|
exports.triggerKindFromJSON = triggerKindFromJSON;
|
|
@@ -16,6 +16,8 @@ exports.marketTypeFromJSON = marketTypeFromJSON;
|
|
|
16
16
|
exports.marketTypeToJSON = marketTypeToJSON;
|
|
17
17
|
exports.errorFromJSON = errorFromJSON;
|
|
18
18
|
exports.errorToJSON = errorToJSON;
|
|
19
|
+
exports.specialAccountFromJSON = specialAccountFromJSON;
|
|
20
|
+
exports.specialAccountToJSON = specialAccountToJSON;
|
|
19
21
|
/* eslint-disable */
|
|
20
22
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
21
23
|
const common_1 = require("./common");
|
|
@@ -151,7 +153,6 @@ function marketTypeToJSON(object) {
|
|
|
151
153
|
var Error;
|
|
152
154
|
(function (Error) {
|
|
153
155
|
Error[Error["DUPLICATE"] = 0] = "DUPLICATE";
|
|
154
|
-
Error[Error["TIMESTAMP_STALE"] = 1] = "TIMESTAMP_STALE";
|
|
155
156
|
Error[Error["DECODE_FAILURE"] = 2] = "DECODE_FAILURE";
|
|
156
157
|
Error[Error["INVALID_SIGNATURE"] = 3] = "INVALID_SIGNATURE";
|
|
157
158
|
Error[Error["MARKET_NOT_FOUND"] = 4] = "MARKET_NOT_FOUND";
|
|
@@ -181,7 +182,6 @@ var Error;
|
|
|
181
182
|
Error[Error["INDEX_PRICE_OUT_OF_RANGE"] = 103] = "INDEX_PRICE_OUT_OF_RANGE";
|
|
182
183
|
Error[Error["INDEX_DECIMALS_OUT_OF_RANGE"] = 104] = "INDEX_DECIMALS_OUT_OF_RANGE";
|
|
183
184
|
Error[Error["INVALID_STATE_VERSION"] = 105] = "INVALID_STATE_VERSION";
|
|
184
|
-
Error[Error["POSITION_STATE_IS_WRONG_FOR_ORDER"] = 106] = "POSITION_STATE_IS_WRONG_FOR_ORDER";
|
|
185
185
|
Error[Error["INVALID_MARGINS"] = 107] = "INVALID_MARGINS";
|
|
186
186
|
/** ACTION_CANNOT_BE_DELEGATED - means that user cannot execute proposed action on behalf of different user */
|
|
187
187
|
Error[Error["ACTION_CANNOT_BE_DELEGATED"] = 108] = "ACTION_CANNOT_BE_DELEGATED";
|
|
@@ -198,9 +198,6 @@ var Error;
|
|
|
198
198
|
*/
|
|
199
199
|
Error[Error["MARKET_DECIMALS_EXCEED_LIMITS"] = 109] = "MARKET_DECIMALS_EXCEED_LIMITS";
|
|
200
200
|
Error[Error["TOO_MANY_TOKENS"] = 110] = "TOO_MANY_TOKENS";
|
|
201
|
-
Error[Error["BANKRUPTCY"] = 111] = "BANKRUPTCY";
|
|
202
|
-
/** TOKEN_ALREADY_REGISTERED - Token with specified blockchain address already registered */
|
|
203
|
-
Error[Error["TOKEN_ALREADY_REGISTERED"] = 112] = "TOKEN_ALREADY_REGISTERED";
|
|
204
201
|
Error[Error["FUNDING_OVERFLOW"] = 123] = "FUNDING_OVERFLOW";
|
|
205
202
|
/**
|
|
206
203
|
* CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED - If there is order to cancel for position, it should be canceled first
|
|
@@ -211,13 +208,13 @@ var Error;
|
|
|
211
208
|
/** UNEXPECTED_TOKEN_ID - Token was found, but not expected to be used in action context */
|
|
212
209
|
Error[Error["UNEXPECTED_TOKEN_ID"] = 127] = "UNEXPECTED_TOKEN_ID";
|
|
213
210
|
Error[Error["SIGNATURE_VERIFICATION"] = 128] = "SIGNATURE_VERIFICATION";
|
|
214
|
-
/** MARKET_NOT_READY - Happens when market is not read to handle orders */
|
|
215
|
-
Error[Error["MARKET_NOT_READY"] = 129] = "MARKET_NOT_READY";
|
|
216
211
|
/**
|
|
217
212
|
* TOKEN_NOT_READY - happens in some situation when token misses some relevant information
|
|
218
|
-
* needed for operation
|
|
213
|
+
* needed for operation, for example index price
|
|
219
214
|
*/
|
|
220
215
|
Error[Error["TOKEN_NOT_READY"] = 130] = "TOKEN_NOT_READY";
|
|
216
|
+
/** TOKEN_ALREADY_REGISTERED - Token with specified blockchain address already registered */
|
|
217
|
+
Error[Error["TOKEN_ALREADY_REGISTERED"] = 112] = "TOKEN_ALREADY_REGISTERED";
|
|
221
218
|
Error[Error["OMF_LESS_THAN_OR_EQUAL_IMF"] = 131] = "OMF_LESS_THAN_OR_EQUAL_IMF";
|
|
222
219
|
Error[Error["ORDER_ON_UNHEALTHY_ACCOUNT_CAN_ONLY_IMPROVE"] = 132] = "ORDER_ON_UNHEALTHY_ACCOUNT_CAN_ONLY_IMPROVE";
|
|
223
220
|
Error[Error["IMMEDIATE_ORDER_GOT_NO_FILLS"] = 133] = "IMMEDIATE_ORDER_GOT_NO_FILLS";
|
|
@@ -254,6 +251,11 @@ var Error;
|
|
|
254
251
|
Error[Error["ORDER_EXECUTION_MISSING_PRICE"] = 156] = "ORDER_EXECUTION_MISSING_PRICE";
|
|
255
252
|
/** ORDER_EXECUTION_SIZE_LIMIT - 10011_101; */
|
|
256
253
|
Error[Error["ORDER_EXECUTION_SIZE_LIMIT"] = 157] = "ORDER_EXECUTION_SIZE_LIMIT";
|
|
254
|
+
/**
|
|
255
|
+
* ORDER_REDUCE_IS_POST_ONLY - 10011_110;
|
|
256
|
+
* Reduce orders can only be post only.
|
|
257
|
+
*/
|
|
258
|
+
Error[Error["ORDER_REDUCE_IS_POST_ONLY"] = 158] = "ORDER_REDUCE_IS_POST_ONLY";
|
|
257
259
|
/** BALANCE - 10100_000 */
|
|
258
260
|
Error[Error["BALANCE"] = 160] = "BALANCE";
|
|
259
261
|
/** BALANCE_DEPOSIT_OVERFLOW - 10100_001 */
|
|
@@ -288,6 +290,33 @@ var Error;
|
|
|
288
290
|
* Binary pattern: 10101_001
|
|
289
291
|
*/
|
|
290
292
|
Error[Error["TRIGGER_INVALID_PRICE"] = 169] = "TRIGGER_INVALID_PRICE";
|
|
293
|
+
/** TIMESTAMP - 10110_000 */
|
|
294
|
+
Error[Error["TIMESTAMP"] = 176] = "TIMESTAMP";
|
|
295
|
+
/** TIMESTAMP_OUT_OF_THRESHOLD - 10110_001 */
|
|
296
|
+
Error[Error["TIMESTAMP_OUT_OF_THRESHOLD"] = 177] = "TIMESTAMP_OUT_OF_THRESHOLD";
|
|
297
|
+
Error[Error["TIMESTAMP_STALE"] = 178] = "TIMESTAMP_STALE";
|
|
298
|
+
/** BANKRUPTCY - 10111_000 */
|
|
299
|
+
Error[Error["BANKRUPTCY"] = 184] = "BANKRUPTCY";
|
|
300
|
+
/** BANKRUPTCY_INSUFFICIENT_COVERAGE - 10111_001 */
|
|
301
|
+
Error[Error["BANKRUPTCY_INSUFFICIENT_COVERAGE"] = 185] = "BANKRUPTCY_INSUFFICIENT_COVERAGE";
|
|
302
|
+
/**
|
|
303
|
+
* BANKRUPTCY_NOT_FOUND - 10111_010
|
|
304
|
+
* Account is not in bankruptcy state.
|
|
305
|
+
*/
|
|
306
|
+
Error[Error["BANKRUPTCY_NOT_FOUND"] = 186] = "BANKRUPTCY_NOT_FOUND";
|
|
307
|
+
/**
|
|
308
|
+
* MARKET_NOT_READY - 11000_000
|
|
309
|
+
* Happens when market is not read to handle orders
|
|
310
|
+
*/
|
|
311
|
+
Error[Error["MARKET_NOT_READY"] = 192] = "MARKET_NOT_READY";
|
|
312
|
+
Error[Error["MARKET_FROZEN"] = 193] = "MARKET_FROZEN";
|
|
313
|
+
/** POSITION - 11001_000 */
|
|
314
|
+
Error[Error["POSITION"] = 200] = "POSITION";
|
|
315
|
+
Error[Error["POSITION_STATE_ORDER"] = 202] = "POSITION_STATE_ORDER";
|
|
316
|
+
Error[Error["POSITION_STATE_ORDER_PRICE"] = 203] = "POSITION_STATE_ORDER_PRICE";
|
|
317
|
+
Error[Error["POSITION_STATE_ORDER_SIZE"] = 204] = "POSITION_STATE_ORDER_SIZE";
|
|
318
|
+
Error[Error["POSITION_STATE_ORDER_SIDE"] = 205] = "POSITION_STATE_ORDER_SIDE";
|
|
319
|
+
Error[Error["POSITION_SIZE_LIMIT"] = 206] = "POSITION_SIZE_LIMIT";
|
|
291
320
|
Error[Error["Dropped"] = 999] = "Dropped";
|
|
292
321
|
})(Error || (exports.Error = Error = {}));
|
|
293
322
|
function errorFromJSON(object) {
|
|
@@ -295,9 +324,6 @@ function errorFromJSON(object) {
|
|
|
295
324
|
case 0:
|
|
296
325
|
case "DUPLICATE":
|
|
297
326
|
return Error.DUPLICATE;
|
|
298
|
-
case 1:
|
|
299
|
-
case "TIMESTAMP_STALE":
|
|
300
|
-
return Error.TIMESTAMP_STALE;
|
|
301
327
|
case 2:
|
|
302
328
|
case "DECODE_FAILURE":
|
|
303
329
|
return Error.DECODE_FAILURE;
|
|
@@ -382,9 +408,6 @@ function errorFromJSON(object) {
|
|
|
382
408
|
case 105:
|
|
383
409
|
case "INVALID_STATE_VERSION":
|
|
384
410
|
return Error.INVALID_STATE_VERSION;
|
|
385
|
-
case 106:
|
|
386
|
-
case "POSITION_STATE_IS_WRONG_FOR_ORDER":
|
|
387
|
-
return Error.POSITION_STATE_IS_WRONG_FOR_ORDER;
|
|
388
411
|
case 107:
|
|
389
412
|
case "INVALID_MARGINS":
|
|
390
413
|
return Error.INVALID_MARGINS;
|
|
@@ -397,12 +420,6 @@ function errorFromJSON(object) {
|
|
|
397
420
|
case 110:
|
|
398
421
|
case "TOO_MANY_TOKENS":
|
|
399
422
|
return Error.TOO_MANY_TOKENS;
|
|
400
|
-
case 111:
|
|
401
|
-
case "BANKRUPTCY":
|
|
402
|
-
return Error.BANKRUPTCY;
|
|
403
|
-
case 112:
|
|
404
|
-
case "TOKEN_ALREADY_REGISTERED":
|
|
405
|
-
return Error.TOKEN_ALREADY_REGISTERED;
|
|
406
423
|
case 123:
|
|
407
424
|
case "FUNDING_OVERFLOW":
|
|
408
425
|
return Error.FUNDING_OVERFLOW;
|
|
@@ -418,12 +435,12 @@ function errorFromJSON(object) {
|
|
|
418
435
|
case 128:
|
|
419
436
|
case "SIGNATURE_VERIFICATION":
|
|
420
437
|
return Error.SIGNATURE_VERIFICATION;
|
|
421
|
-
case 129:
|
|
422
|
-
case "MARKET_NOT_READY":
|
|
423
|
-
return Error.MARKET_NOT_READY;
|
|
424
438
|
case 130:
|
|
425
439
|
case "TOKEN_NOT_READY":
|
|
426
440
|
return Error.TOKEN_NOT_READY;
|
|
441
|
+
case 112:
|
|
442
|
+
case "TOKEN_ALREADY_REGISTERED":
|
|
443
|
+
return Error.TOKEN_ALREADY_REGISTERED;
|
|
427
444
|
case 131:
|
|
428
445
|
case "OMF_LESS_THAN_OR_EQUAL_IMF":
|
|
429
446
|
return Error.OMF_LESS_THAN_OR_EQUAL_IMF;
|
|
@@ -484,6 +501,9 @@ function errorFromJSON(object) {
|
|
|
484
501
|
case 157:
|
|
485
502
|
case "ORDER_EXECUTION_SIZE_LIMIT":
|
|
486
503
|
return Error.ORDER_EXECUTION_SIZE_LIMIT;
|
|
504
|
+
case 158:
|
|
505
|
+
case "ORDER_REDUCE_IS_POST_ONLY":
|
|
506
|
+
return Error.ORDER_REDUCE_IS_POST_ONLY;
|
|
487
507
|
case 160:
|
|
488
508
|
case "BALANCE":
|
|
489
509
|
return Error.BALANCE;
|
|
@@ -511,6 +531,48 @@ function errorFromJSON(object) {
|
|
|
511
531
|
case 169:
|
|
512
532
|
case "TRIGGER_INVALID_PRICE":
|
|
513
533
|
return Error.TRIGGER_INVALID_PRICE;
|
|
534
|
+
case 176:
|
|
535
|
+
case "TIMESTAMP":
|
|
536
|
+
return Error.TIMESTAMP;
|
|
537
|
+
case 177:
|
|
538
|
+
case "TIMESTAMP_OUT_OF_THRESHOLD":
|
|
539
|
+
return Error.TIMESTAMP_OUT_OF_THRESHOLD;
|
|
540
|
+
case 178:
|
|
541
|
+
case "TIMESTAMP_STALE":
|
|
542
|
+
return Error.TIMESTAMP_STALE;
|
|
543
|
+
case 184:
|
|
544
|
+
case "BANKRUPTCY":
|
|
545
|
+
return Error.BANKRUPTCY;
|
|
546
|
+
case 185:
|
|
547
|
+
case "BANKRUPTCY_INSUFFICIENT_COVERAGE":
|
|
548
|
+
return Error.BANKRUPTCY_INSUFFICIENT_COVERAGE;
|
|
549
|
+
case 186:
|
|
550
|
+
case "BANKRUPTCY_NOT_FOUND":
|
|
551
|
+
return Error.BANKRUPTCY_NOT_FOUND;
|
|
552
|
+
case 192:
|
|
553
|
+
case "MARKET_NOT_READY":
|
|
554
|
+
return Error.MARKET_NOT_READY;
|
|
555
|
+
case 193:
|
|
556
|
+
case "MARKET_FROZEN":
|
|
557
|
+
return Error.MARKET_FROZEN;
|
|
558
|
+
case 200:
|
|
559
|
+
case "POSITION":
|
|
560
|
+
return Error.POSITION;
|
|
561
|
+
case 202:
|
|
562
|
+
case "POSITION_STATE_ORDER":
|
|
563
|
+
return Error.POSITION_STATE_ORDER;
|
|
564
|
+
case 203:
|
|
565
|
+
case "POSITION_STATE_ORDER_PRICE":
|
|
566
|
+
return Error.POSITION_STATE_ORDER_PRICE;
|
|
567
|
+
case 204:
|
|
568
|
+
case "POSITION_STATE_ORDER_SIZE":
|
|
569
|
+
return Error.POSITION_STATE_ORDER_SIZE;
|
|
570
|
+
case 205:
|
|
571
|
+
case "POSITION_STATE_ORDER_SIDE":
|
|
572
|
+
return Error.POSITION_STATE_ORDER_SIDE;
|
|
573
|
+
case 206:
|
|
574
|
+
case "POSITION_SIZE_LIMIT":
|
|
575
|
+
return Error.POSITION_SIZE_LIMIT;
|
|
514
576
|
case 999:
|
|
515
577
|
case "Dropped":
|
|
516
578
|
return Error.Dropped;
|
|
@@ -522,8 +584,6 @@ function errorToJSON(object) {
|
|
|
522
584
|
switch (object) {
|
|
523
585
|
case Error.DUPLICATE:
|
|
524
586
|
return "DUPLICATE";
|
|
525
|
-
case Error.TIMESTAMP_STALE:
|
|
526
|
-
return "TIMESTAMP_STALE";
|
|
527
587
|
case Error.DECODE_FAILURE:
|
|
528
588
|
return "DECODE_FAILURE";
|
|
529
589
|
case Error.INVALID_SIGNATURE:
|
|
@@ -580,8 +640,6 @@ function errorToJSON(object) {
|
|
|
580
640
|
return "INDEX_DECIMALS_OUT_OF_RANGE";
|
|
581
641
|
case Error.INVALID_STATE_VERSION:
|
|
582
642
|
return "INVALID_STATE_VERSION";
|
|
583
|
-
case Error.POSITION_STATE_IS_WRONG_FOR_ORDER:
|
|
584
|
-
return "POSITION_STATE_IS_WRONG_FOR_ORDER";
|
|
585
643
|
case Error.INVALID_MARGINS:
|
|
586
644
|
return "INVALID_MARGINS";
|
|
587
645
|
case Error.ACTION_CANNOT_BE_DELEGATED:
|
|
@@ -590,10 +648,6 @@ function errorToJSON(object) {
|
|
|
590
648
|
return "MARKET_DECIMALS_EXCEED_LIMITS";
|
|
591
649
|
case Error.TOO_MANY_TOKENS:
|
|
592
650
|
return "TOO_MANY_TOKENS";
|
|
593
|
-
case Error.BANKRUPTCY:
|
|
594
|
-
return "BANKRUPTCY";
|
|
595
|
-
case Error.TOKEN_ALREADY_REGISTERED:
|
|
596
|
-
return "TOKEN_ALREADY_REGISTERED";
|
|
597
651
|
case Error.FUNDING_OVERFLOW:
|
|
598
652
|
return "FUNDING_OVERFLOW";
|
|
599
653
|
case Error.CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED:
|
|
@@ -604,10 +658,10 @@ function errorToJSON(object) {
|
|
|
604
658
|
return "UNEXPECTED_TOKEN_ID";
|
|
605
659
|
case Error.SIGNATURE_VERIFICATION:
|
|
606
660
|
return "SIGNATURE_VERIFICATION";
|
|
607
|
-
case Error.MARKET_NOT_READY:
|
|
608
|
-
return "MARKET_NOT_READY";
|
|
609
661
|
case Error.TOKEN_NOT_READY:
|
|
610
662
|
return "TOKEN_NOT_READY";
|
|
663
|
+
case Error.TOKEN_ALREADY_REGISTERED:
|
|
664
|
+
return "TOKEN_ALREADY_REGISTERED";
|
|
611
665
|
case Error.OMF_LESS_THAN_OR_EQUAL_IMF:
|
|
612
666
|
return "OMF_LESS_THAN_OR_EQUAL_IMF";
|
|
613
667
|
case Error.ORDER_ON_UNHEALTHY_ACCOUNT_CAN_ONLY_IMPROVE:
|
|
@@ -648,6 +702,8 @@ function errorToJSON(object) {
|
|
|
648
702
|
return "ORDER_EXECUTION_MISSING_PRICE";
|
|
649
703
|
case Error.ORDER_EXECUTION_SIZE_LIMIT:
|
|
650
704
|
return "ORDER_EXECUTION_SIZE_LIMIT";
|
|
705
|
+
case Error.ORDER_REDUCE_IS_POST_ONLY:
|
|
706
|
+
return "ORDER_REDUCE_IS_POST_ONLY";
|
|
651
707
|
case Error.BALANCE:
|
|
652
708
|
return "BALANCE";
|
|
653
709
|
case Error.BALANCE_DEPOSIT_OVERFLOW:
|
|
@@ -666,12 +722,61 @@ function errorToJSON(object) {
|
|
|
666
722
|
return "TRIGGER";
|
|
667
723
|
case Error.TRIGGER_INVALID_PRICE:
|
|
668
724
|
return "TRIGGER_INVALID_PRICE";
|
|
725
|
+
case Error.TIMESTAMP:
|
|
726
|
+
return "TIMESTAMP";
|
|
727
|
+
case Error.TIMESTAMP_OUT_OF_THRESHOLD:
|
|
728
|
+
return "TIMESTAMP_OUT_OF_THRESHOLD";
|
|
729
|
+
case Error.TIMESTAMP_STALE:
|
|
730
|
+
return "TIMESTAMP_STALE";
|
|
731
|
+
case Error.BANKRUPTCY:
|
|
732
|
+
return "BANKRUPTCY";
|
|
733
|
+
case Error.BANKRUPTCY_INSUFFICIENT_COVERAGE:
|
|
734
|
+
return "BANKRUPTCY_INSUFFICIENT_COVERAGE";
|
|
735
|
+
case Error.BANKRUPTCY_NOT_FOUND:
|
|
736
|
+
return "BANKRUPTCY_NOT_FOUND";
|
|
737
|
+
case Error.MARKET_NOT_READY:
|
|
738
|
+
return "MARKET_NOT_READY";
|
|
739
|
+
case Error.MARKET_FROZEN:
|
|
740
|
+
return "MARKET_FROZEN";
|
|
741
|
+
case Error.POSITION:
|
|
742
|
+
return "POSITION";
|
|
743
|
+
case Error.POSITION_STATE_ORDER:
|
|
744
|
+
return "POSITION_STATE_ORDER";
|
|
745
|
+
case Error.POSITION_STATE_ORDER_PRICE:
|
|
746
|
+
return "POSITION_STATE_ORDER_PRICE";
|
|
747
|
+
case Error.POSITION_STATE_ORDER_SIZE:
|
|
748
|
+
return "POSITION_STATE_ORDER_SIZE";
|
|
749
|
+
case Error.POSITION_STATE_ORDER_SIDE:
|
|
750
|
+
return "POSITION_STATE_ORDER_SIDE";
|
|
751
|
+
case Error.POSITION_SIZE_LIMIT:
|
|
752
|
+
return "POSITION_SIZE_LIMIT";
|
|
669
753
|
case Error.Dropped:
|
|
670
754
|
return "Dropped";
|
|
671
755
|
default:
|
|
672
756
|
throw new globalThis.Error("Unrecognized enum value " + object + " for enum Error");
|
|
673
757
|
}
|
|
674
758
|
}
|
|
759
|
+
var SpecialAccount;
|
|
760
|
+
(function (SpecialAccount) {
|
|
761
|
+
SpecialAccount[SpecialAccount["FeeVault"] = 0] = "FeeVault";
|
|
762
|
+
})(SpecialAccount || (exports.SpecialAccount = SpecialAccount = {}));
|
|
763
|
+
function specialAccountFromJSON(object) {
|
|
764
|
+
switch (object) {
|
|
765
|
+
case 0:
|
|
766
|
+
case "FeeVault":
|
|
767
|
+
return SpecialAccount.FeeVault;
|
|
768
|
+
default:
|
|
769
|
+
throw new globalThis.Error("Unrecognized enum value " + object + " for enum SpecialAccount");
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
function specialAccountToJSON(object) {
|
|
773
|
+
switch (object) {
|
|
774
|
+
case SpecialAccount.FeeVault:
|
|
775
|
+
return "FeeVault";
|
|
776
|
+
default:
|
|
777
|
+
throw new globalThis.Error("Unrecognized enum value " + object + " for enum SpecialAccount");
|
|
778
|
+
}
|
|
779
|
+
}
|
|
675
780
|
function createBaseU128() {
|
|
676
781
|
return { lo: 0n, hi: 0n };
|
|
677
782
|
}
|
|
@@ -698,18 +803,20 @@ exports.U128 = {
|
|
|
698
803
|
while (reader.pos < end) {
|
|
699
804
|
const tag = reader.uint32();
|
|
700
805
|
switch (tag >>> 3) {
|
|
701
|
-
case 1:
|
|
806
|
+
case 1: {
|
|
702
807
|
if (tag !== 8) {
|
|
703
808
|
break;
|
|
704
809
|
}
|
|
705
810
|
message.lo = reader.uint64();
|
|
706
811
|
continue;
|
|
707
|
-
|
|
812
|
+
}
|
|
813
|
+
case 2: {
|
|
708
814
|
if (tag !== 16) {
|
|
709
815
|
break;
|
|
710
816
|
}
|
|
711
817
|
message.hi = reader.uint64();
|
|
712
818
|
continue;
|
|
819
|
+
}
|
|
713
820
|
}
|
|
714
821
|
if ((tag & 7) === 4 || tag === 0) {
|
|
715
822
|
break;
|
|
@@ -792,60 +899,69 @@ exports.Market = {
|
|
|
792
899
|
while (reader.pos < end) {
|
|
793
900
|
const tag = reader.uint32();
|
|
794
901
|
switch (tag >>> 3) {
|
|
795
|
-
case 1:
|
|
902
|
+
case 1: {
|
|
796
903
|
if (tag !== 8) {
|
|
797
904
|
break;
|
|
798
905
|
}
|
|
799
906
|
message.marketId = reader.uint32();
|
|
800
907
|
continue;
|
|
801
|
-
|
|
908
|
+
}
|
|
909
|
+
case 2: {
|
|
802
910
|
if (tag !== 16) {
|
|
803
911
|
break;
|
|
804
912
|
}
|
|
805
913
|
message.priceDecimals = reader.uint32();
|
|
806
914
|
continue;
|
|
807
|
-
|
|
915
|
+
}
|
|
916
|
+
case 3: {
|
|
808
917
|
if (tag !== 24) {
|
|
809
918
|
break;
|
|
810
919
|
}
|
|
811
920
|
message.sizeDecimals = reader.uint32();
|
|
812
921
|
continue;
|
|
813
|
-
|
|
922
|
+
}
|
|
923
|
+
case 4: {
|
|
814
924
|
if (tag !== 32) {
|
|
815
925
|
break;
|
|
816
926
|
}
|
|
817
927
|
message.baseTokenId = reader.uint32();
|
|
818
928
|
continue;
|
|
819
|
-
|
|
929
|
+
}
|
|
930
|
+
case 5: {
|
|
820
931
|
if (tag !== 40) {
|
|
821
932
|
break;
|
|
822
933
|
}
|
|
823
934
|
message.marketType = reader.int32();
|
|
824
935
|
continue;
|
|
825
|
-
|
|
936
|
+
}
|
|
937
|
+
case 6: {
|
|
826
938
|
if (tag !== 48) {
|
|
827
939
|
break;
|
|
828
940
|
}
|
|
829
941
|
message.imfBps = reader.uint32();
|
|
830
942
|
continue;
|
|
831
|
-
|
|
943
|
+
}
|
|
944
|
+
case 7: {
|
|
832
945
|
if (tag !== 56) {
|
|
833
946
|
break;
|
|
834
947
|
}
|
|
835
948
|
message.cmfBps = reader.uint32();
|
|
836
949
|
continue;
|
|
837
|
-
|
|
950
|
+
}
|
|
951
|
+
case 8: {
|
|
838
952
|
if (tag !== 64) {
|
|
839
953
|
break;
|
|
840
954
|
}
|
|
841
955
|
message.mmfBps = reader.uint32();
|
|
842
956
|
continue;
|
|
843
|
-
|
|
957
|
+
}
|
|
958
|
+
case 10: {
|
|
844
959
|
if (tag !== 82) {
|
|
845
960
|
break;
|
|
846
961
|
}
|
|
847
962
|
message.viewSymbol = reader.string();
|
|
848
963
|
continue;
|
|
964
|
+
}
|
|
849
965
|
}
|
|
850
966
|
if ((tag & 7) === 4 || tag === 0) {
|
|
851
967
|
break;
|
|
@@ -941,30 +1057,34 @@ exports.Token = {
|
|
|
941
1057
|
while (reader.pos < end) {
|
|
942
1058
|
const tag = reader.uint32();
|
|
943
1059
|
switch (tag >>> 3) {
|
|
944
|
-
case 1:
|
|
1060
|
+
case 1: {
|
|
945
1061
|
if (tag !== 8) {
|
|
946
1062
|
break;
|
|
947
1063
|
}
|
|
948
1064
|
message.tokenId = reader.uint32();
|
|
949
1065
|
continue;
|
|
950
|
-
|
|
1066
|
+
}
|
|
1067
|
+
case 2: {
|
|
951
1068
|
if (tag !== 16) {
|
|
952
1069
|
break;
|
|
953
1070
|
}
|
|
954
1071
|
message.tokenDecimals = reader.uint32();
|
|
955
1072
|
continue;
|
|
956
|
-
|
|
1073
|
+
}
|
|
1074
|
+
case 4: {
|
|
957
1075
|
if (tag !== 32) {
|
|
958
1076
|
break;
|
|
959
1077
|
}
|
|
960
1078
|
message.weightBps = reader.uint32();
|
|
961
1079
|
continue;
|
|
962
|
-
|
|
1080
|
+
}
|
|
1081
|
+
case 5: {
|
|
963
1082
|
if (tag !== 42) {
|
|
964
1083
|
break;
|
|
965
1084
|
}
|
|
966
1085
|
message.viewSymbol = reader.string();
|
|
967
1086
|
continue;
|
|
1087
|
+
}
|
|
968
1088
|
}
|
|
969
1089
|
if ((tag & 7) === 4 || tag === 0) {
|
|
970
1090
|
break;
|
|
@@ -1088,61 +1208,70 @@ exports.Action = {
|
|
|
1088
1208
|
while (reader.pos < end) {
|
|
1089
1209
|
const tag = reader.uint32();
|
|
1090
1210
|
switch (tag >>> 3) {
|
|
1091
|
-
case 1:
|
|
1211
|
+
case 1: {
|
|
1092
1212
|
if (tag !== 8) {
|
|
1093
1213
|
break;
|
|
1094
1214
|
}
|
|
1095
1215
|
message.currentTimestamp = reader.int64();
|
|
1096
1216
|
continue;
|
|
1097
|
-
|
|
1217
|
+
}
|
|
1218
|
+
case 2: {
|
|
1098
1219
|
if (tag !== 16) {
|
|
1099
1220
|
break;
|
|
1100
1221
|
}
|
|
1101
1222
|
message.nonce = reader.uint32();
|
|
1102
1223
|
continue;
|
|
1103
|
-
|
|
1224
|
+
}
|
|
1225
|
+
case 4: {
|
|
1104
1226
|
if (tag !== 34) {
|
|
1105
1227
|
break;
|
|
1106
1228
|
}
|
|
1107
1229
|
message.kind = { $case: "createSession", value: exports.Action_CreateSession.decode(reader, reader.uint32()) };
|
|
1108
1230
|
continue;
|
|
1109
|
-
|
|
1231
|
+
}
|
|
1232
|
+
case 5: {
|
|
1110
1233
|
if (tag !== 42) {
|
|
1111
1234
|
break;
|
|
1112
1235
|
}
|
|
1113
1236
|
message.kind = { $case: "createToken", value: exports.Action_CreateToken.decode(reader, reader.uint32()) };
|
|
1114
1237
|
continue;
|
|
1115
|
-
|
|
1238
|
+
}
|
|
1239
|
+
case 6: {
|
|
1116
1240
|
if (tag !== 50) {
|
|
1117
1241
|
break;
|
|
1118
1242
|
}
|
|
1119
1243
|
message.kind = { $case: "createMarket", value: exports.Action_CreateMarket.decode(reader, reader.uint32()) };
|
|
1120
1244
|
continue;
|
|
1121
|
-
|
|
1245
|
+
}
|
|
1246
|
+
case 7: {
|
|
1122
1247
|
if (tag !== 58) {
|
|
1123
1248
|
break;
|
|
1124
1249
|
}
|
|
1125
1250
|
message.kind = { $case: "placeOrder", value: exports.Action_PlaceOrder.decode(reader, reader.uint32()) };
|
|
1126
1251
|
continue;
|
|
1127
|
-
|
|
1252
|
+
}
|
|
1253
|
+
case 8: {
|
|
1128
1254
|
if (tag !== 66) {
|
|
1129
1255
|
break;
|
|
1130
1256
|
}
|
|
1131
1257
|
message.kind = { $case: "cancelOrderById", value: exports.Action_CancelOrderById.decode(reader, reader.uint32()) };
|
|
1132
1258
|
continue;
|
|
1133
|
-
|
|
1259
|
+
}
|
|
1260
|
+
case 9: {
|
|
1134
1261
|
if (tag !== 74) {
|
|
1135
1262
|
break;
|
|
1136
1263
|
}
|
|
1137
1264
|
message.kind = { $case: "deposit", value: exports.Action_Deposit.decode(reader, reader.uint32()) };
|
|
1138
1265
|
continue;
|
|
1139
|
-
|
|
1266
|
+
}
|
|
1267
|
+
case 10: {
|
|
1140
1268
|
if (tag !== 82) {
|
|
1141
1269
|
break;
|
|
1142
1270
|
}
|
|
1143
1271
|
message.kind = { $case: "withdraw", value: exports.Action_Withdraw.decode(reader, reader.uint32()) };
|
|
1144
1272
|
continue;
|
|
1145
|
-
|
|
1273
|
+
}
|
|
1274
|
+
case 11: {
|
|
1146
1275
|
if (tag !== 90) {
|
|
1147
1276
|
break;
|
|
1148
1277
|
}
|
|
@@ -1151,7 +1280,8 @@ exports.Action = {
|
|
|
1151
1280
|
value: exports.Action_PythSetWormholeGuardians.decode(reader, reader.uint32()),
|
|
1152
1281
|
};
|
|
1153
1282
|
continue;
|
|
1154
|
-
|
|
1283
|
+
}
|
|
1284
|
+
case 12: {
|
|
1155
1285
|
if (tag !== 98) {
|
|
1156
1286
|
break;
|
|
1157
1287
|
}
|
|
@@ -1160,7 +1290,8 @@ exports.Action = {
|
|
|
1160
1290
|
value: exports.Action_PythSetSymbolFeed.decode(reader, reader.uint32()),
|
|
1161
1291
|
};
|
|
1162
1292
|
continue;
|
|
1163
|
-
|
|
1293
|
+
}
|
|
1294
|
+
case 13: {
|
|
1164
1295
|
if (tag !== 106) {
|
|
1165
1296
|
break;
|
|
1166
1297
|
}
|
|
@@ -1169,54 +1300,63 @@ exports.Action = {
|
|
|
1169
1300
|
value: exports.Action_PythPriceFeedUpdate.decode(reader, reader.uint32()),
|
|
1170
1301
|
};
|
|
1171
1302
|
continue;
|
|
1172
|
-
|
|
1303
|
+
}
|
|
1304
|
+
case 14: {
|
|
1173
1305
|
if (tag !== 114) {
|
|
1174
1306
|
break;
|
|
1175
1307
|
}
|
|
1176
1308
|
message.kind = { $case: "liquidate", value: exports.Action_Liquidate.decode(reader, reader.uint32()) };
|
|
1177
1309
|
continue;
|
|
1178
|
-
|
|
1310
|
+
}
|
|
1311
|
+
case 15: {
|
|
1179
1312
|
if (tag !== 122) {
|
|
1180
1313
|
break;
|
|
1181
1314
|
}
|
|
1182
1315
|
message.kind = { $case: "revokeSession", value: exports.Action_RevokeSession.decode(reader, reader.uint32()) };
|
|
1183
1316
|
continue;
|
|
1184
|
-
|
|
1317
|
+
}
|
|
1318
|
+
case 16: {
|
|
1185
1319
|
if (tag !== 130) {
|
|
1186
1320
|
break;
|
|
1187
1321
|
}
|
|
1188
1322
|
message.kind = { $case: "pause", value: exports.Action_Pause.decode(reader, reader.uint32()) };
|
|
1189
1323
|
continue;
|
|
1190
|
-
|
|
1324
|
+
}
|
|
1325
|
+
case 17: {
|
|
1191
1326
|
if (tag !== 138) {
|
|
1192
1327
|
break;
|
|
1193
1328
|
}
|
|
1194
1329
|
message.kind = { $case: "unpause", value: exports.Action_Unpause.decode(reader, reader.uint32()) };
|
|
1195
1330
|
continue;
|
|
1196
|
-
|
|
1331
|
+
}
|
|
1332
|
+
case 18: {
|
|
1197
1333
|
if (tag !== 146) {
|
|
1198
1334
|
break;
|
|
1199
1335
|
}
|
|
1200
1336
|
message.kind = { $case: "transfer", value: exports.Action_Transfer.decode(reader, reader.uint32()) };
|
|
1201
1337
|
continue;
|
|
1202
|
-
|
|
1338
|
+
}
|
|
1339
|
+
case 19: {
|
|
1203
1340
|
if (tag !== 154) {
|
|
1204
1341
|
break;
|
|
1205
1342
|
}
|
|
1206
1343
|
message.kind = { $case: "message", value: common_1.Message.decode(reader, reader.uint32()) };
|
|
1207
1344
|
continue;
|
|
1208
|
-
|
|
1345
|
+
}
|
|
1346
|
+
case 32: {
|
|
1209
1347
|
if (tag !== 258) {
|
|
1210
1348
|
break;
|
|
1211
1349
|
}
|
|
1212
1350
|
message.kind = { $case: "addTrigger", value: exports.Action_AddTrigger.decode(reader, reader.uint32()) };
|
|
1213
1351
|
continue;
|
|
1214
|
-
|
|
1352
|
+
}
|
|
1353
|
+
case 33: {
|
|
1215
1354
|
if (tag !== 266) {
|
|
1216
1355
|
break;
|
|
1217
1356
|
}
|
|
1218
1357
|
message.kind = { $case: "removeTrigger", value: exports.Action_RemoveTrigger.decode(reader, reader.uint32()) };
|
|
1219
1358
|
continue;
|
|
1359
|
+
}
|
|
1220
1360
|
}
|
|
1221
1361
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1222
1362
|
break;
|
|
@@ -1282,55 +1422,55 @@ exports.Action = {
|
|
|
1282
1422
|
if (message.kind?.$case === "createSession") {
|
|
1283
1423
|
obj.createSession = exports.Action_CreateSession.toJSON(message.kind.value);
|
|
1284
1424
|
}
|
|
1285
|
-
if (message.kind?.$case === "createToken") {
|
|
1425
|
+
else if (message.kind?.$case === "createToken") {
|
|
1286
1426
|
obj.createToken = exports.Action_CreateToken.toJSON(message.kind.value);
|
|
1287
1427
|
}
|
|
1288
|
-
if (message.kind?.$case === "createMarket") {
|
|
1428
|
+
else if (message.kind?.$case === "createMarket") {
|
|
1289
1429
|
obj.createMarket = exports.Action_CreateMarket.toJSON(message.kind.value);
|
|
1290
1430
|
}
|
|
1291
|
-
if (message.kind?.$case === "placeOrder") {
|
|
1431
|
+
else if (message.kind?.$case === "placeOrder") {
|
|
1292
1432
|
obj.placeOrder = exports.Action_PlaceOrder.toJSON(message.kind.value);
|
|
1293
1433
|
}
|
|
1294
|
-
if (message.kind?.$case === "cancelOrderById") {
|
|
1434
|
+
else if (message.kind?.$case === "cancelOrderById") {
|
|
1295
1435
|
obj.cancelOrderById = exports.Action_CancelOrderById.toJSON(message.kind.value);
|
|
1296
1436
|
}
|
|
1297
|
-
if (message.kind?.$case === "deposit") {
|
|
1437
|
+
else if (message.kind?.$case === "deposit") {
|
|
1298
1438
|
obj.deposit = exports.Action_Deposit.toJSON(message.kind.value);
|
|
1299
1439
|
}
|
|
1300
|
-
if (message.kind?.$case === "withdraw") {
|
|
1440
|
+
else if (message.kind?.$case === "withdraw") {
|
|
1301
1441
|
obj.withdraw = exports.Action_Withdraw.toJSON(message.kind.value);
|
|
1302
1442
|
}
|
|
1303
|
-
if (message.kind?.$case === "pythSetWormholeGuardians") {
|
|
1443
|
+
else if (message.kind?.$case === "pythSetWormholeGuardians") {
|
|
1304
1444
|
obj.pythSetWormholeGuardians = exports.Action_PythSetWormholeGuardians.toJSON(message.kind.value);
|
|
1305
1445
|
}
|
|
1306
|
-
if (message.kind?.$case === "pythSetSymbolFeed") {
|
|
1446
|
+
else if (message.kind?.$case === "pythSetSymbolFeed") {
|
|
1307
1447
|
obj.pythSetSymbolFeed = exports.Action_PythSetSymbolFeed.toJSON(message.kind.value);
|
|
1308
1448
|
}
|
|
1309
|
-
if (message.kind?.$case === "pythPriceFeedUpdate") {
|
|
1449
|
+
else if (message.kind?.$case === "pythPriceFeedUpdate") {
|
|
1310
1450
|
obj.pythPriceFeedUpdate = exports.Action_PythPriceFeedUpdate.toJSON(message.kind.value);
|
|
1311
1451
|
}
|
|
1312
|
-
if (message.kind?.$case === "liquidate") {
|
|
1452
|
+
else if (message.kind?.$case === "liquidate") {
|
|
1313
1453
|
obj.liquidate = exports.Action_Liquidate.toJSON(message.kind.value);
|
|
1314
1454
|
}
|
|
1315
|
-
if (message.kind?.$case === "revokeSession") {
|
|
1455
|
+
else if (message.kind?.$case === "revokeSession") {
|
|
1316
1456
|
obj.revokeSession = exports.Action_RevokeSession.toJSON(message.kind.value);
|
|
1317
1457
|
}
|
|
1318
|
-
if (message.kind?.$case === "pause") {
|
|
1458
|
+
else if (message.kind?.$case === "pause") {
|
|
1319
1459
|
obj.pause = exports.Action_Pause.toJSON(message.kind.value);
|
|
1320
1460
|
}
|
|
1321
|
-
if (message.kind?.$case === "unpause") {
|
|
1461
|
+
else if (message.kind?.$case === "unpause") {
|
|
1322
1462
|
obj.unpause = exports.Action_Unpause.toJSON(message.kind.value);
|
|
1323
1463
|
}
|
|
1324
|
-
if (message.kind?.$case === "transfer") {
|
|
1464
|
+
else if (message.kind?.$case === "transfer") {
|
|
1325
1465
|
obj.transfer = exports.Action_Transfer.toJSON(message.kind.value);
|
|
1326
1466
|
}
|
|
1327
|
-
if (message.kind?.$case === "message") {
|
|
1467
|
+
else if (message.kind?.$case === "message") {
|
|
1328
1468
|
obj.message = common_1.Message.toJSON(message.kind.value);
|
|
1329
1469
|
}
|
|
1330
|
-
if (message.kind?.$case === "addTrigger") {
|
|
1470
|
+
else if (message.kind?.$case === "addTrigger") {
|
|
1331
1471
|
obj.addTrigger = exports.Action_AddTrigger.toJSON(message.kind.value);
|
|
1332
1472
|
}
|
|
1333
|
-
if (message.kind?.$case === "removeTrigger") {
|
|
1473
|
+
else if (message.kind?.$case === "removeTrigger") {
|
|
1334
1474
|
obj.removeTrigger = exports.Action_RemoveTrigger.toJSON(message.kind.value);
|
|
1335
1475
|
}
|
|
1336
1476
|
return obj;
|
|
@@ -1342,64 +1482,121 @@ exports.Action = {
|
|
|
1342
1482
|
const message = createBaseAction();
|
|
1343
1483
|
message.currentTimestamp = object.currentTimestamp ?? 0n;
|
|
1344
1484
|
message.nonce = object.nonce ?? 0;
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1485
|
+
switch (object.kind?.$case) {
|
|
1486
|
+
case "createSession": {
|
|
1487
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1488
|
+
message.kind = { $case: "createSession", value: exports.Action_CreateSession.fromPartial(object.kind.value) };
|
|
1489
|
+
}
|
|
1490
|
+
break;
|
|
1491
|
+
}
|
|
1492
|
+
case "createToken": {
|
|
1493
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1494
|
+
message.kind = { $case: "createToken", value: exports.Action_CreateToken.fromPartial(object.kind.value) };
|
|
1495
|
+
}
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
case "createMarket": {
|
|
1499
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1500
|
+
message.kind = { $case: "createMarket", value: exports.Action_CreateMarket.fromPartial(object.kind.value) };
|
|
1501
|
+
}
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
case "placeOrder": {
|
|
1505
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1506
|
+
message.kind = { $case: "placeOrder", value: exports.Action_PlaceOrder.fromPartial(object.kind.value) };
|
|
1507
|
+
}
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
case "cancelOrderById": {
|
|
1511
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1512
|
+
message.kind = { $case: "cancelOrderById", value: exports.Action_CancelOrderById.fromPartial(object.kind.value) };
|
|
1513
|
+
}
|
|
1514
|
+
break;
|
|
1515
|
+
}
|
|
1516
|
+
case "deposit": {
|
|
1517
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1518
|
+
message.kind = { $case: "deposit", value: exports.Action_Deposit.fromPartial(object.kind.value) };
|
|
1519
|
+
}
|
|
1520
|
+
break;
|
|
1521
|
+
}
|
|
1522
|
+
case "withdraw": {
|
|
1523
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1524
|
+
message.kind = { $case: "withdraw", value: exports.Action_Withdraw.fromPartial(object.kind.value) };
|
|
1525
|
+
}
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1528
|
+
case "pythSetWormholeGuardians": {
|
|
1529
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1530
|
+
message.kind = {
|
|
1531
|
+
$case: "pythSetWormholeGuardians",
|
|
1532
|
+
value: exports.Action_PythSetWormholeGuardians.fromPartial(object.kind.value),
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
break;
|
|
1536
|
+
}
|
|
1537
|
+
case "pythSetSymbolFeed": {
|
|
1538
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1539
|
+
message.kind = { $case: "pythSetSymbolFeed", value: exports.Action_PythSetSymbolFeed.fromPartial(object.kind.value) };
|
|
1540
|
+
}
|
|
1541
|
+
break;
|
|
1542
|
+
}
|
|
1543
|
+
case "pythPriceFeedUpdate": {
|
|
1544
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1545
|
+
message.kind = {
|
|
1546
|
+
$case: "pythPriceFeedUpdate",
|
|
1547
|
+
value: exports.Action_PythPriceFeedUpdate.fromPartial(object.kind.value),
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
break;
|
|
1551
|
+
}
|
|
1552
|
+
case "liquidate": {
|
|
1553
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1554
|
+
message.kind = { $case: "liquidate", value: exports.Action_Liquidate.fromPartial(object.kind.value) };
|
|
1555
|
+
}
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
case "revokeSession": {
|
|
1559
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1560
|
+
message.kind = { $case: "revokeSession", value: exports.Action_RevokeSession.fromPartial(object.kind.value) };
|
|
1561
|
+
}
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
case "pause": {
|
|
1565
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1566
|
+
message.kind = { $case: "pause", value: exports.Action_Pause.fromPartial(object.kind.value) };
|
|
1567
|
+
}
|
|
1568
|
+
break;
|
|
1569
|
+
}
|
|
1570
|
+
case "unpause": {
|
|
1571
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1572
|
+
message.kind = { $case: "unpause", value: exports.Action_Unpause.fromPartial(object.kind.value) };
|
|
1573
|
+
}
|
|
1574
|
+
break;
|
|
1575
|
+
}
|
|
1576
|
+
case "transfer": {
|
|
1577
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1578
|
+
message.kind = { $case: "transfer", value: exports.Action_Transfer.fromPartial(object.kind.value) };
|
|
1579
|
+
}
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
case "message": {
|
|
1583
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1584
|
+
message.kind = { $case: "message", value: common_1.Message.fromPartial(object.kind.value) };
|
|
1585
|
+
}
|
|
1586
|
+
break;
|
|
1587
|
+
}
|
|
1588
|
+
case "addTrigger": {
|
|
1589
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1590
|
+
message.kind = { $case: "addTrigger", value: exports.Action_AddTrigger.fromPartial(object.kind.value) };
|
|
1591
|
+
}
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
case "removeTrigger": {
|
|
1595
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
1596
|
+
message.kind = { $case: "removeTrigger", value: exports.Action_RemoveTrigger.fromPartial(object.kind.value) };
|
|
1597
|
+
}
|
|
1598
|
+
break;
|
|
1599
|
+
}
|
|
1403
1600
|
}
|
|
1404
1601
|
return message;
|
|
1405
1602
|
},
|
|
@@ -1430,24 +1627,27 @@ exports.Action_CreateSession = {
|
|
|
1430
1627
|
while (reader.pos < end) {
|
|
1431
1628
|
const tag = reader.uint32();
|
|
1432
1629
|
switch (tag >>> 3) {
|
|
1433
|
-
case 1:
|
|
1630
|
+
case 1: {
|
|
1434
1631
|
if (tag !== 10) {
|
|
1435
1632
|
break;
|
|
1436
1633
|
}
|
|
1437
1634
|
message.userPubkey = reader.bytes();
|
|
1438
1635
|
continue;
|
|
1439
|
-
|
|
1636
|
+
}
|
|
1637
|
+
case 2: {
|
|
1440
1638
|
if (tag !== 18) {
|
|
1441
1639
|
break;
|
|
1442
1640
|
}
|
|
1443
1641
|
message.blstPubkey = reader.bytes();
|
|
1444
1642
|
continue;
|
|
1445
|
-
|
|
1643
|
+
}
|
|
1644
|
+
case 3: {
|
|
1446
1645
|
if (tag !== 24) {
|
|
1447
1646
|
break;
|
|
1448
1647
|
}
|
|
1449
1648
|
message.expiryTimestamp = reader.int64();
|
|
1450
1649
|
continue;
|
|
1650
|
+
}
|
|
1451
1651
|
}
|
|
1452
1652
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1453
1653
|
break;
|
|
@@ -1488,14 +1688,7 @@ exports.Action_CreateSession = {
|
|
|
1488
1688
|
},
|
|
1489
1689
|
};
|
|
1490
1690
|
function createBaseAction_CreateToken() {
|
|
1491
|
-
return {
|
|
1492
|
-
tokenDecimals: 0,
|
|
1493
|
-
weightBps: 0,
|
|
1494
|
-
viewSymbol: "",
|
|
1495
|
-
oracleSymbol: "",
|
|
1496
|
-
ethAddr: new Uint8Array(0),
|
|
1497
|
-
minWithdrawAmount: 0n,
|
|
1498
|
-
};
|
|
1691
|
+
return { tokenDecimals: 0, weightBps: 0, viewSymbol: "", oracleSymbol: "", solAddr: new Uint8Array(0) };
|
|
1499
1692
|
}
|
|
1500
1693
|
exports.Action_CreateToken = {
|
|
1501
1694
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -1511,14 +1704,8 @@ exports.Action_CreateToken = {
|
|
|
1511
1704
|
if (message.oracleSymbol !== "") {
|
|
1512
1705
|
writer.uint32(42).string(message.oracleSymbol);
|
|
1513
1706
|
}
|
|
1514
|
-
if (message.
|
|
1515
|
-
writer.uint32(50).bytes(message.
|
|
1516
|
-
}
|
|
1517
|
-
if (message.minWithdrawAmount !== 0n) {
|
|
1518
|
-
if (BigInt.asUintN(64, message.minWithdrawAmount) !== message.minWithdrawAmount) {
|
|
1519
|
-
throw new globalThis.Error("value provided for field message.minWithdrawAmount of type uint64 too large");
|
|
1520
|
-
}
|
|
1521
|
-
writer.uint32(56).uint64(message.minWithdrawAmount);
|
|
1707
|
+
if (message.solAddr.length !== 0) {
|
|
1708
|
+
writer.uint32(50).bytes(message.solAddr);
|
|
1522
1709
|
}
|
|
1523
1710
|
return writer;
|
|
1524
1711
|
},
|
|
@@ -1529,42 +1716,41 @@ exports.Action_CreateToken = {
|
|
|
1529
1716
|
while (reader.pos < end) {
|
|
1530
1717
|
const tag = reader.uint32();
|
|
1531
1718
|
switch (tag >>> 3) {
|
|
1532
|
-
case 1:
|
|
1719
|
+
case 1: {
|
|
1533
1720
|
if (tag !== 8) {
|
|
1534
1721
|
break;
|
|
1535
1722
|
}
|
|
1536
1723
|
message.tokenDecimals = reader.uint32();
|
|
1537
1724
|
continue;
|
|
1538
|
-
|
|
1725
|
+
}
|
|
1726
|
+
case 3: {
|
|
1539
1727
|
if (tag !== 24) {
|
|
1540
1728
|
break;
|
|
1541
1729
|
}
|
|
1542
1730
|
message.weightBps = reader.uint32();
|
|
1543
1731
|
continue;
|
|
1544
|
-
|
|
1732
|
+
}
|
|
1733
|
+
case 4: {
|
|
1545
1734
|
if (tag !== 34) {
|
|
1546
1735
|
break;
|
|
1547
1736
|
}
|
|
1548
1737
|
message.viewSymbol = reader.string();
|
|
1549
1738
|
continue;
|
|
1550
|
-
|
|
1739
|
+
}
|
|
1740
|
+
case 5: {
|
|
1551
1741
|
if (tag !== 42) {
|
|
1552
1742
|
break;
|
|
1553
1743
|
}
|
|
1554
1744
|
message.oracleSymbol = reader.string();
|
|
1555
1745
|
continue;
|
|
1556
|
-
|
|
1746
|
+
}
|
|
1747
|
+
case 6: {
|
|
1557
1748
|
if (tag !== 50) {
|
|
1558
1749
|
break;
|
|
1559
1750
|
}
|
|
1560
|
-
message.
|
|
1561
|
-
continue;
|
|
1562
|
-
case 7:
|
|
1563
|
-
if (tag !== 56) {
|
|
1564
|
-
break;
|
|
1565
|
-
}
|
|
1566
|
-
message.minWithdrawAmount = reader.uint64();
|
|
1751
|
+
message.solAddr = reader.bytes();
|
|
1567
1752
|
continue;
|
|
1753
|
+
}
|
|
1568
1754
|
}
|
|
1569
1755
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1570
1756
|
break;
|
|
@@ -1579,8 +1765,7 @@ exports.Action_CreateToken = {
|
|
|
1579
1765
|
weightBps: isSet(object.weightBps) ? globalThis.Number(object.weightBps) : 0,
|
|
1580
1766
|
viewSymbol: isSet(object.viewSymbol) ? globalThis.String(object.viewSymbol) : "",
|
|
1581
1767
|
oracleSymbol: isSet(object.oracleSymbol) ? globalThis.String(object.oracleSymbol) : "",
|
|
1582
|
-
|
|
1583
|
-
minWithdrawAmount: isSet(object.minWithdrawAmount) ? BigInt(object.minWithdrawAmount) : 0n,
|
|
1768
|
+
solAddr: isSet(object.solAddr) ? bytesFromBase64(object.solAddr) : new Uint8Array(0),
|
|
1584
1769
|
};
|
|
1585
1770
|
},
|
|
1586
1771
|
toJSON(message) {
|
|
@@ -1597,11 +1782,8 @@ exports.Action_CreateToken = {
|
|
|
1597
1782
|
if (message.oracleSymbol !== "") {
|
|
1598
1783
|
obj.oracleSymbol = message.oracleSymbol;
|
|
1599
1784
|
}
|
|
1600
|
-
if (message.
|
|
1601
|
-
obj.
|
|
1602
|
-
}
|
|
1603
|
-
if (message.minWithdrawAmount !== 0n) {
|
|
1604
|
-
obj.minWithdrawAmount = message.minWithdrawAmount.toString();
|
|
1785
|
+
if (message.solAddr.length !== 0) {
|
|
1786
|
+
obj.solAddr = base64FromBytes(message.solAddr);
|
|
1605
1787
|
}
|
|
1606
1788
|
return obj;
|
|
1607
1789
|
},
|
|
@@ -1614,8 +1796,7 @@ exports.Action_CreateToken = {
|
|
|
1614
1796
|
message.weightBps = object.weightBps ?? 0;
|
|
1615
1797
|
message.viewSymbol = object.viewSymbol ?? "";
|
|
1616
1798
|
message.oracleSymbol = object.oracleSymbol ?? "";
|
|
1617
|
-
message.
|
|
1618
|
-
message.minWithdrawAmount = object.minWithdrawAmount ?? 0n;
|
|
1799
|
+
message.solAddr = object.solAddr ?? new Uint8Array(0);
|
|
1619
1800
|
return message;
|
|
1620
1801
|
},
|
|
1621
1802
|
};
|
|
@@ -1670,60 +1851,69 @@ exports.Action_CreateMarket = {
|
|
|
1670
1851
|
while (reader.pos < end) {
|
|
1671
1852
|
const tag = reader.uint32();
|
|
1672
1853
|
switch (tag >>> 3) {
|
|
1673
|
-
case 1:
|
|
1854
|
+
case 1: {
|
|
1674
1855
|
if (tag !== 8) {
|
|
1675
1856
|
break;
|
|
1676
1857
|
}
|
|
1677
1858
|
message.sizeDecimals = reader.uint32();
|
|
1678
1859
|
continue;
|
|
1679
|
-
|
|
1860
|
+
}
|
|
1861
|
+
case 2: {
|
|
1680
1862
|
if (tag !== 16) {
|
|
1681
1863
|
break;
|
|
1682
1864
|
}
|
|
1683
1865
|
message.priceDecimals = reader.uint32();
|
|
1684
1866
|
continue;
|
|
1685
|
-
|
|
1867
|
+
}
|
|
1868
|
+
case 3: {
|
|
1686
1869
|
if (tag !== 24) {
|
|
1687
1870
|
break;
|
|
1688
1871
|
}
|
|
1689
1872
|
message.imfBps = reader.uint32();
|
|
1690
1873
|
continue;
|
|
1691
|
-
|
|
1874
|
+
}
|
|
1875
|
+
case 4: {
|
|
1692
1876
|
if (tag !== 32) {
|
|
1693
1877
|
break;
|
|
1694
1878
|
}
|
|
1695
1879
|
message.cmfBps = reader.uint32();
|
|
1696
1880
|
continue;
|
|
1697
|
-
|
|
1881
|
+
}
|
|
1882
|
+
case 5: {
|
|
1698
1883
|
if (tag !== 40) {
|
|
1699
1884
|
break;
|
|
1700
1885
|
}
|
|
1701
1886
|
message.mmfBps = reader.uint32();
|
|
1702
1887
|
continue;
|
|
1703
|
-
|
|
1888
|
+
}
|
|
1889
|
+
case 6: {
|
|
1704
1890
|
if (tag !== 48) {
|
|
1705
1891
|
break;
|
|
1706
1892
|
}
|
|
1707
1893
|
message.marketType = reader.int32();
|
|
1708
1894
|
continue;
|
|
1709
|
-
|
|
1895
|
+
}
|
|
1896
|
+
case 7: {
|
|
1710
1897
|
if (tag !== 58) {
|
|
1711
1898
|
break;
|
|
1712
1899
|
}
|
|
1713
1900
|
message.viewSymbol = reader.string();
|
|
1714
1901
|
continue;
|
|
1715
|
-
|
|
1902
|
+
}
|
|
1903
|
+
case 8: {
|
|
1716
1904
|
if (tag !== 66) {
|
|
1717
1905
|
break;
|
|
1718
1906
|
}
|
|
1719
1907
|
message.oracleSymbol = reader.string();
|
|
1720
1908
|
continue;
|
|
1721
|
-
|
|
1909
|
+
}
|
|
1910
|
+
case 9: {
|
|
1722
1911
|
if (tag !== 72) {
|
|
1723
1912
|
break;
|
|
1724
1913
|
}
|
|
1725
1914
|
message.baseTokenId = reader.uint32();
|
|
1726
1915
|
continue;
|
|
1916
|
+
}
|
|
1727
1917
|
}
|
|
1728
1918
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1729
1919
|
break;
|
|
@@ -1864,72 +2054,83 @@ exports.Action_PlaceOrder = {
|
|
|
1864
2054
|
while (reader.pos < end) {
|
|
1865
2055
|
const tag = reader.uint32();
|
|
1866
2056
|
switch (tag >>> 3) {
|
|
1867
|
-
case 1:
|
|
2057
|
+
case 1: {
|
|
1868
2058
|
if (tag !== 8) {
|
|
1869
2059
|
break;
|
|
1870
2060
|
}
|
|
1871
2061
|
message.sessionId = reader.uint64();
|
|
1872
2062
|
continue;
|
|
1873
|
-
|
|
2063
|
+
}
|
|
2064
|
+
case 2: {
|
|
1874
2065
|
if (tag !== 16) {
|
|
1875
2066
|
break;
|
|
1876
2067
|
}
|
|
1877
2068
|
message.marketId = reader.uint32();
|
|
1878
2069
|
continue;
|
|
1879
|
-
|
|
2070
|
+
}
|
|
2071
|
+
case 3: {
|
|
1880
2072
|
if (tag !== 24) {
|
|
1881
2073
|
break;
|
|
1882
2074
|
}
|
|
1883
2075
|
message.side = reader.int32();
|
|
1884
2076
|
continue;
|
|
1885
|
-
|
|
2077
|
+
}
|
|
2078
|
+
case 4: {
|
|
1886
2079
|
if (tag !== 32) {
|
|
1887
2080
|
break;
|
|
1888
2081
|
}
|
|
1889
2082
|
message.fillMode = reader.int32();
|
|
1890
2083
|
continue;
|
|
1891
|
-
|
|
2084
|
+
}
|
|
2085
|
+
case 5: {
|
|
1892
2086
|
if (tag !== 40) {
|
|
1893
2087
|
break;
|
|
1894
2088
|
}
|
|
1895
2089
|
message.isReduceOnly = reader.bool();
|
|
1896
2090
|
continue;
|
|
1897
|
-
|
|
2091
|
+
}
|
|
2092
|
+
case 6: {
|
|
1898
2093
|
if (tag !== 48) {
|
|
1899
2094
|
break;
|
|
1900
2095
|
}
|
|
1901
2096
|
message.price = reader.uint64();
|
|
1902
2097
|
continue;
|
|
1903
|
-
|
|
2098
|
+
}
|
|
2099
|
+
case 7: {
|
|
1904
2100
|
if (tag !== 56) {
|
|
1905
2101
|
break;
|
|
1906
2102
|
}
|
|
1907
2103
|
message.size = reader.uint64();
|
|
1908
2104
|
continue;
|
|
1909
|
-
|
|
2105
|
+
}
|
|
2106
|
+
case 8: {
|
|
1910
2107
|
if (tag !== 66) {
|
|
1911
2108
|
break;
|
|
1912
2109
|
}
|
|
1913
2110
|
message.quoteSize = exports.U128.decode(reader, reader.uint32());
|
|
1914
2111
|
continue;
|
|
1915
|
-
|
|
2112
|
+
}
|
|
2113
|
+
case 32: {
|
|
1916
2114
|
if (tag !== 256) {
|
|
1917
2115
|
break;
|
|
1918
2116
|
}
|
|
1919
2117
|
message.delegatorAccountId = reader.uint32();
|
|
1920
2118
|
continue;
|
|
1921
|
-
|
|
2119
|
+
}
|
|
2120
|
+
case 33: {
|
|
1922
2121
|
if (tag !== 264) {
|
|
1923
2122
|
break;
|
|
1924
2123
|
}
|
|
1925
2124
|
message.clientOrderId = reader.uint64();
|
|
1926
2125
|
continue;
|
|
1927
|
-
|
|
2126
|
+
}
|
|
2127
|
+
case 34: {
|
|
1928
2128
|
if (tag !== 272) {
|
|
1929
2129
|
break;
|
|
1930
2130
|
}
|
|
1931
2131
|
message.senderAccountId = reader.uint32();
|
|
1932
2132
|
continue;
|
|
2133
|
+
}
|
|
1933
2134
|
}
|
|
1934
2135
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1935
2136
|
break;
|
|
@@ -2043,30 +2244,34 @@ exports.Action_CancelOrderById = {
|
|
|
2043
2244
|
while (reader.pos < end) {
|
|
2044
2245
|
const tag = reader.uint32();
|
|
2045
2246
|
switch (tag >>> 3) {
|
|
2046
|
-
case 1:
|
|
2247
|
+
case 1: {
|
|
2047
2248
|
if (tag !== 8) {
|
|
2048
2249
|
break;
|
|
2049
2250
|
}
|
|
2050
2251
|
message.sessionId = reader.uint64();
|
|
2051
2252
|
continue;
|
|
2052
|
-
|
|
2253
|
+
}
|
|
2254
|
+
case 2: {
|
|
2053
2255
|
if (tag !== 16) {
|
|
2054
2256
|
break;
|
|
2055
2257
|
}
|
|
2056
2258
|
message.orderId = reader.uint64();
|
|
2057
2259
|
continue;
|
|
2058
|
-
|
|
2260
|
+
}
|
|
2261
|
+
case 32: {
|
|
2059
2262
|
if (tag !== 256) {
|
|
2060
2263
|
break;
|
|
2061
2264
|
}
|
|
2062
2265
|
message.delegatorAccountId = reader.uint32();
|
|
2063
2266
|
continue;
|
|
2064
|
-
|
|
2267
|
+
}
|
|
2268
|
+
case 33: {
|
|
2065
2269
|
if (tag !== 264) {
|
|
2066
2270
|
break;
|
|
2067
2271
|
}
|
|
2068
2272
|
message.senderAccountId = reader.uint32();
|
|
2069
2273
|
continue;
|
|
2274
|
+
}
|
|
2070
2275
|
}
|
|
2071
2276
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2072
2277
|
break;
|
|
@@ -2143,30 +2348,34 @@ exports.Action_Deposit = {
|
|
|
2143
2348
|
while (reader.pos < end) {
|
|
2144
2349
|
const tag = reader.uint32();
|
|
2145
2350
|
switch (tag >>> 3) {
|
|
2146
|
-
case 1:
|
|
2351
|
+
case 1: {
|
|
2147
2352
|
if (tag !== 8) {
|
|
2148
2353
|
break;
|
|
2149
2354
|
}
|
|
2150
2355
|
message.actionNonce = reader.uint64();
|
|
2151
2356
|
continue;
|
|
2152
|
-
|
|
2357
|
+
}
|
|
2358
|
+
case 2: {
|
|
2153
2359
|
if (tag !== 18) {
|
|
2154
2360
|
break;
|
|
2155
2361
|
}
|
|
2156
2362
|
message.tokenAddr = reader.bytes();
|
|
2157
2363
|
continue;
|
|
2158
|
-
|
|
2364
|
+
}
|
|
2365
|
+
case 3: {
|
|
2159
2366
|
if (tag !== 24) {
|
|
2160
2367
|
break;
|
|
2161
2368
|
}
|
|
2162
2369
|
message.amount = reader.uint64();
|
|
2163
2370
|
continue;
|
|
2164
|
-
|
|
2371
|
+
}
|
|
2372
|
+
case 4: {
|
|
2165
2373
|
if (tag !== 34) {
|
|
2166
2374
|
break;
|
|
2167
2375
|
}
|
|
2168
2376
|
message.userPubkey = reader.bytes();
|
|
2169
2377
|
continue;
|
|
2378
|
+
}
|
|
2170
2379
|
}
|
|
2171
2380
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2172
2381
|
break;
|
|
@@ -2240,24 +2449,27 @@ exports.Action_Withdraw = {
|
|
|
2240
2449
|
while (reader.pos < end) {
|
|
2241
2450
|
const tag = reader.uint32();
|
|
2242
2451
|
switch (tag >>> 3) {
|
|
2243
|
-
case 1:
|
|
2452
|
+
case 1: {
|
|
2244
2453
|
if (tag !== 8) {
|
|
2245
2454
|
break;
|
|
2246
2455
|
}
|
|
2247
2456
|
message.tokenId = reader.uint32();
|
|
2248
2457
|
continue;
|
|
2249
|
-
|
|
2458
|
+
}
|
|
2459
|
+
case 2: {
|
|
2250
2460
|
if (tag !== 16) {
|
|
2251
2461
|
break;
|
|
2252
2462
|
}
|
|
2253
2463
|
message.sessionId = reader.uint64();
|
|
2254
2464
|
continue;
|
|
2255
|
-
|
|
2465
|
+
}
|
|
2466
|
+
case 3: {
|
|
2256
2467
|
if (tag !== 24) {
|
|
2257
2468
|
break;
|
|
2258
2469
|
}
|
|
2259
2470
|
message.amount = reader.uint64();
|
|
2260
2471
|
continue;
|
|
2472
|
+
}
|
|
2261
2473
|
}
|
|
2262
2474
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2263
2475
|
break;
|
|
@@ -2317,18 +2529,20 @@ exports.Action_PythSetWormholeGuardians = {
|
|
|
2317
2529
|
while (reader.pos < end) {
|
|
2318
2530
|
const tag = reader.uint32();
|
|
2319
2531
|
switch (tag >>> 3) {
|
|
2320
|
-
case 1:
|
|
2532
|
+
case 1: {
|
|
2321
2533
|
if (tag !== 8) {
|
|
2322
2534
|
break;
|
|
2323
2535
|
}
|
|
2324
2536
|
message.guardianSetIndex = reader.uint32();
|
|
2325
2537
|
continue;
|
|
2326
|
-
|
|
2538
|
+
}
|
|
2539
|
+
case 2: {
|
|
2327
2540
|
if (tag !== 18) {
|
|
2328
2541
|
break;
|
|
2329
2542
|
}
|
|
2330
2543
|
message.addresses.push(reader.bytes());
|
|
2331
2544
|
continue;
|
|
2545
|
+
}
|
|
2332
2546
|
}
|
|
2333
2547
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2334
2548
|
break;
|
|
@@ -2385,18 +2599,20 @@ exports.Action_PythSetSymbolFeed = {
|
|
|
2385
2599
|
while (reader.pos < end) {
|
|
2386
2600
|
const tag = reader.uint32();
|
|
2387
2601
|
switch (tag >>> 3) {
|
|
2388
|
-
case 1:
|
|
2602
|
+
case 1: {
|
|
2389
2603
|
if (tag !== 10) {
|
|
2390
2604
|
break;
|
|
2391
2605
|
}
|
|
2392
2606
|
message.oracleSymbol = reader.string();
|
|
2393
2607
|
continue;
|
|
2394
|
-
|
|
2608
|
+
}
|
|
2609
|
+
case 2: {
|
|
2395
2610
|
if (tag !== 18) {
|
|
2396
2611
|
break;
|
|
2397
2612
|
}
|
|
2398
2613
|
message.priceFeedId = reader.bytes();
|
|
2399
2614
|
continue;
|
|
2615
|
+
}
|
|
2400
2616
|
}
|
|
2401
2617
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2402
2618
|
break;
|
|
@@ -2448,12 +2664,13 @@ exports.Action_PythPriceFeedUpdate = {
|
|
|
2448
2664
|
while (reader.pos < end) {
|
|
2449
2665
|
const tag = reader.uint32();
|
|
2450
2666
|
switch (tag >>> 3) {
|
|
2451
|
-
case 1:
|
|
2667
|
+
case 1: {
|
|
2452
2668
|
if (tag !== 10) {
|
|
2453
2669
|
break;
|
|
2454
2670
|
}
|
|
2455
2671
|
message.rawPythnetData = reader.bytes();
|
|
2456
2672
|
continue;
|
|
2673
|
+
}
|
|
2457
2674
|
}
|
|
2458
2675
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2459
2676
|
break;
|
|
@@ -2509,24 +2726,27 @@ exports.Action_Liquidate = {
|
|
|
2509
2726
|
while (reader.pos < end) {
|
|
2510
2727
|
const tag = reader.uint32();
|
|
2511
2728
|
switch (tag >>> 3) {
|
|
2512
|
-
case 1:
|
|
2729
|
+
case 1: {
|
|
2513
2730
|
if (tag !== 8) {
|
|
2514
2731
|
break;
|
|
2515
2732
|
}
|
|
2516
2733
|
message.liquidatorSessionId = reader.uint64();
|
|
2517
2734
|
continue;
|
|
2518
|
-
|
|
2735
|
+
}
|
|
2736
|
+
case 2: {
|
|
2519
2737
|
if (tag !== 16) {
|
|
2520
2738
|
break;
|
|
2521
2739
|
}
|
|
2522
2740
|
message.liquidateeAccountId = reader.uint32();
|
|
2523
2741
|
continue;
|
|
2524
|
-
|
|
2742
|
+
}
|
|
2743
|
+
case 3: {
|
|
2525
2744
|
if (tag !== 24) {
|
|
2526
2745
|
break;
|
|
2527
2746
|
}
|
|
2528
2747
|
message.liquidatorAccountId = reader.uint32();
|
|
2529
2748
|
continue;
|
|
2749
|
+
}
|
|
2530
2750
|
}
|
|
2531
2751
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2532
2752
|
break;
|
|
@@ -2588,12 +2808,13 @@ exports.Action_RevokeSession = {
|
|
|
2588
2808
|
while (reader.pos < end) {
|
|
2589
2809
|
const tag = reader.uint32();
|
|
2590
2810
|
switch (tag >>> 3) {
|
|
2591
|
-
case 1:
|
|
2811
|
+
case 1: {
|
|
2592
2812
|
if (tag !== 8) {
|
|
2593
2813
|
break;
|
|
2594
2814
|
}
|
|
2595
2815
|
message.sessionId = reader.uint64();
|
|
2596
2816
|
continue;
|
|
2817
|
+
}
|
|
2597
2818
|
}
|
|
2598
2819
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2599
2820
|
break;
|
|
@@ -2696,7 +2917,7 @@ exports.Action_Unpause = {
|
|
|
2696
2917
|
},
|
|
2697
2918
|
};
|
|
2698
2919
|
function createBaseAction_Transfer() {
|
|
2699
|
-
return { sessionId: 0n, fromAccountId: 0, tokenId: 0, amount: 0n, toAccountId: undefined };
|
|
2920
|
+
return { sessionId: 0n, fromAccountId: 0, tokenId: 0, amount: 0n, toAccountId: undefined, specialAccount: undefined };
|
|
2700
2921
|
}
|
|
2701
2922
|
exports.Action_Transfer = {
|
|
2702
2923
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -2721,6 +2942,9 @@ exports.Action_Transfer = {
|
|
|
2721
2942
|
if (message.toAccountId !== undefined) {
|
|
2722
2943
|
writer.uint32(64).uint32(message.toAccountId);
|
|
2723
2944
|
}
|
|
2945
|
+
if (message.specialAccount !== undefined) {
|
|
2946
|
+
writer.uint32(72).int32(message.specialAccount);
|
|
2947
|
+
}
|
|
2724
2948
|
return writer;
|
|
2725
2949
|
},
|
|
2726
2950
|
decode(input, length) {
|
|
@@ -2730,36 +2954,48 @@ exports.Action_Transfer = {
|
|
|
2730
2954
|
while (reader.pos < end) {
|
|
2731
2955
|
const tag = reader.uint32();
|
|
2732
2956
|
switch (tag >>> 3) {
|
|
2733
|
-
case 1:
|
|
2957
|
+
case 1: {
|
|
2734
2958
|
if (tag !== 8) {
|
|
2735
2959
|
break;
|
|
2736
2960
|
}
|
|
2737
2961
|
message.sessionId = reader.uint64();
|
|
2738
2962
|
continue;
|
|
2739
|
-
|
|
2963
|
+
}
|
|
2964
|
+
case 2: {
|
|
2740
2965
|
if (tag !== 16) {
|
|
2741
2966
|
break;
|
|
2742
2967
|
}
|
|
2743
2968
|
message.fromAccountId = reader.uint32();
|
|
2744
2969
|
continue;
|
|
2745
|
-
|
|
2970
|
+
}
|
|
2971
|
+
case 3: {
|
|
2746
2972
|
if (tag !== 24) {
|
|
2747
2973
|
break;
|
|
2748
2974
|
}
|
|
2749
2975
|
message.tokenId = reader.uint32();
|
|
2750
2976
|
continue;
|
|
2751
|
-
|
|
2977
|
+
}
|
|
2978
|
+
case 4: {
|
|
2752
2979
|
if (tag !== 32) {
|
|
2753
2980
|
break;
|
|
2754
2981
|
}
|
|
2755
2982
|
message.amount = reader.uint64();
|
|
2756
2983
|
continue;
|
|
2757
|
-
|
|
2984
|
+
}
|
|
2985
|
+
case 8: {
|
|
2758
2986
|
if (tag !== 64) {
|
|
2759
2987
|
break;
|
|
2760
2988
|
}
|
|
2761
2989
|
message.toAccountId = reader.uint32();
|
|
2762
2990
|
continue;
|
|
2991
|
+
}
|
|
2992
|
+
case 9: {
|
|
2993
|
+
if (tag !== 72) {
|
|
2994
|
+
break;
|
|
2995
|
+
}
|
|
2996
|
+
message.specialAccount = reader.int32();
|
|
2997
|
+
continue;
|
|
2998
|
+
}
|
|
2763
2999
|
}
|
|
2764
3000
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2765
3001
|
break;
|
|
@@ -2775,6 +3011,7 @@ exports.Action_Transfer = {
|
|
|
2775
3011
|
tokenId: isSet(object.tokenId) ? globalThis.Number(object.tokenId) : 0,
|
|
2776
3012
|
amount: isSet(object.amount) ? BigInt(object.amount) : 0n,
|
|
2777
3013
|
toAccountId: isSet(object.toAccountId) ? globalThis.Number(object.toAccountId) : undefined,
|
|
3014
|
+
specialAccount: isSet(object.specialAccount) ? specialAccountFromJSON(object.specialAccount) : undefined,
|
|
2778
3015
|
};
|
|
2779
3016
|
},
|
|
2780
3017
|
toJSON(message) {
|
|
@@ -2794,6 +3031,9 @@ exports.Action_Transfer = {
|
|
|
2794
3031
|
if (message.toAccountId !== undefined) {
|
|
2795
3032
|
obj.toAccountId = Math.round(message.toAccountId);
|
|
2796
3033
|
}
|
|
3034
|
+
if (message.specialAccount !== undefined) {
|
|
3035
|
+
obj.specialAccount = specialAccountToJSON(message.specialAccount);
|
|
3036
|
+
}
|
|
2797
3037
|
return obj;
|
|
2798
3038
|
},
|
|
2799
3039
|
create(base) {
|
|
@@ -2806,6 +3046,7 @@ exports.Action_Transfer = {
|
|
|
2806
3046
|
message.tokenId = object.tokenId ?? 0;
|
|
2807
3047
|
message.amount = object.amount ?? 0n;
|
|
2808
3048
|
message.toAccountId = object.toAccountId ?? undefined;
|
|
3049
|
+
message.specialAccount = object.specialAccount ?? undefined;
|
|
2809
3050
|
return message;
|
|
2810
3051
|
},
|
|
2811
3052
|
};
|
|
@@ -2847,42 +3088,48 @@ exports.Action_AddTrigger = {
|
|
|
2847
3088
|
while (reader.pos < end) {
|
|
2848
3089
|
const tag = reader.uint32();
|
|
2849
3090
|
switch (tag >>> 3) {
|
|
2850
|
-
case 1:
|
|
3091
|
+
case 1: {
|
|
2851
3092
|
if (tag !== 8) {
|
|
2852
3093
|
break;
|
|
2853
3094
|
}
|
|
2854
3095
|
message.sessionId = reader.uint64();
|
|
2855
3096
|
continue;
|
|
2856
|
-
|
|
3097
|
+
}
|
|
3098
|
+
case 2: {
|
|
2857
3099
|
if (tag !== 16) {
|
|
2858
3100
|
break;
|
|
2859
3101
|
}
|
|
2860
3102
|
message.marketId = reader.uint32();
|
|
2861
3103
|
continue;
|
|
2862
|
-
|
|
3104
|
+
}
|
|
3105
|
+
case 3: {
|
|
2863
3106
|
if (tag !== 24) {
|
|
2864
3107
|
break;
|
|
2865
3108
|
}
|
|
2866
3109
|
message.kind = reader.int32();
|
|
2867
3110
|
continue;
|
|
2868
|
-
|
|
3111
|
+
}
|
|
3112
|
+
case 4: {
|
|
2869
3113
|
if (tag !== 32) {
|
|
2870
3114
|
break;
|
|
2871
3115
|
}
|
|
2872
3116
|
message.side = reader.int32();
|
|
2873
3117
|
continue;
|
|
2874
|
-
|
|
3118
|
+
}
|
|
3119
|
+
case 5: {
|
|
2875
3120
|
if (tag !== 40) {
|
|
2876
3121
|
break;
|
|
2877
3122
|
}
|
|
2878
3123
|
message.price = reader.uint64();
|
|
2879
3124
|
continue;
|
|
2880
|
-
|
|
3125
|
+
}
|
|
3126
|
+
case 10: {
|
|
2881
3127
|
if (tag !== 80) {
|
|
2882
3128
|
break;
|
|
2883
3129
|
}
|
|
2884
3130
|
message.accountId = reader.uint32();
|
|
2885
3131
|
continue;
|
|
3132
|
+
}
|
|
2886
3133
|
}
|
|
2887
3134
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2888
3135
|
break;
|
|
@@ -2969,36 +3216,41 @@ exports.Action_RemoveTrigger = {
|
|
|
2969
3216
|
while (reader.pos < end) {
|
|
2970
3217
|
const tag = reader.uint32();
|
|
2971
3218
|
switch (tag >>> 3) {
|
|
2972
|
-
case 1:
|
|
3219
|
+
case 1: {
|
|
2973
3220
|
if (tag !== 8) {
|
|
2974
3221
|
break;
|
|
2975
3222
|
}
|
|
2976
3223
|
message.sessionId = reader.uint64();
|
|
2977
3224
|
continue;
|
|
2978
|
-
|
|
3225
|
+
}
|
|
3226
|
+
case 2: {
|
|
2979
3227
|
if (tag !== 16) {
|
|
2980
3228
|
break;
|
|
2981
3229
|
}
|
|
2982
3230
|
message.marketId = reader.uint32();
|
|
2983
3231
|
continue;
|
|
2984
|
-
|
|
3232
|
+
}
|
|
3233
|
+
case 3: {
|
|
2985
3234
|
if (tag !== 24) {
|
|
2986
3235
|
break;
|
|
2987
3236
|
}
|
|
2988
3237
|
message.kind = reader.int32();
|
|
2989
3238
|
continue;
|
|
2990
|
-
|
|
3239
|
+
}
|
|
3240
|
+
case 4: {
|
|
2991
3241
|
if (tag !== 32) {
|
|
2992
3242
|
break;
|
|
2993
3243
|
}
|
|
2994
3244
|
message.side = reader.int32();
|
|
2995
3245
|
continue;
|
|
2996
|
-
|
|
3246
|
+
}
|
|
3247
|
+
case 10: {
|
|
2997
3248
|
if (tag !== 80) {
|
|
2998
3249
|
break;
|
|
2999
3250
|
}
|
|
3000
3251
|
message.accountId = reader.uint32();
|
|
3001
3252
|
continue;
|
|
3253
|
+
}
|
|
3002
3254
|
}
|
|
3003
3255
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3004
3256
|
break;
|
|
@@ -3094,7 +3346,7 @@ exports.Receipt = {
|
|
|
3094
3346
|
exports.Receipt_UpdateGuardianSetResult.encode(message.kind.value, writer.uint32(338).fork()).join();
|
|
3095
3347
|
break;
|
|
3096
3348
|
case "liquidated":
|
|
3097
|
-
exports.
|
|
3349
|
+
exports.Receipt_AccountLiquidated.encode(message.kind.value, writer.uint32(346).fork()).join();
|
|
3098
3350
|
break;
|
|
3099
3351
|
case "sessionRevoked":
|
|
3100
3352
|
exports.Receipt_SessionRevoked.encode(message.kind.value, writer.uint32(354).fork()).join();
|
|
@@ -3124,19 +3376,21 @@ exports.Receipt = {
|
|
|
3124
3376
|
while (reader.pos < end) {
|
|
3125
3377
|
const tag = reader.uint32();
|
|
3126
3378
|
switch (tag >>> 3) {
|
|
3127
|
-
case 1:
|
|
3379
|
+
case 1: {
|
|
3128
3380
|
if (tag !== 8) {
|
|
3129
3381
|
break;
|
|
3130
3382
|
}
|
|
3131
3383
|
message.actionId = reader.uint64();
|
|
3132
3384
|
continue;
|
|
3133
|
-
|
|
3385
|
+
}
|
|
3386
|
+
case 32: {
|
|
3134
3387
|
if (tag !== 256) {
|
|
3135
3388
|
break;
|
|
3136
3389
|
}
|
|
3137
3390
|
message.kind = { $case: "err", value: reader.int32() };
|
|
3138
3391
|
continue;
|
|
3139
|
-
|
|
3392
|
+
}
|
|
3393
|
+
case 33: {
|
|
3140
3394
|
if (tag !== 266) {
|
|
3141
3395
|
break;
|
|
3142
3396
|
}
|
|
@@ -3145,13 +3399,15 @@ exports.Receipt = {
|
|
|
3145
3399
|
value: exports.Receipt_CreateSessionResult.decode(reader, reader.uint32()),
|
|
3146
3400
|
};
|
|
3147
3401
|
continue;
|
|
3148
|
-
|
|
3402
|
+
}
|
|
3403
|
+
case 34: {
|
|
3149
3404
|
if (tag !== 274) {
|
|
3150
3405
|
break;
|
|
3151
3406
|
}
|
|
3152
3407
|
message.kind = { $case: "placeOrderResult", value: exports.Receipt_PlaceOrderResult.decode(reader, reader.uint32()) };
|
|
3153
3408
|
continue;
|
|
3154
|
-
|
|
3409
|
+
}
|
|
3410
|
+
case 35: {
|
|
3155
3411
|
if (tag !== 282) {
|
|
3156
3412
|
break;
|
|
3157
3413
|
}
|
|
@@ -3160,13 +3416,15 @@ exports.Receipt = {
|
|
|
3160
3416
|
value: exports.Receipt_CancelOrderResult.decode(reader, reader.uint32()),
|
|
3161
3417
|
};
|
|
3162
3418
|
continue;
|
|
3163
|
-
|
|
3419
|
+
}
|
|
3420
|
+
case 36: {
|
|
3164
3421
|
if (tag !== 290) {
|
|
3165
3422
|
break;
|
|
3166
3423
|
}
|
|
3167
3424
|
message.kind = { $case: "depositResult", value: exports.Receipt_DepositResult.decode(reader, reader.uint32()) };
|
|
3168
3425
|
continue;
|
|
3169
|
-
|
|
3426
|
+
}
|
|
3427
|
+
case 37: {
|
|
3170
3428
|
if (tag !== 298) {
|
|
3171
3429
|
break;
|
|
3172
3430
|
}
|
|
@@ -3175,7 +3433,8 @@ exports.Receipt = {
|
|
|
3175
3433
|
value: exports.Receipt_InsertTokenResult.decode(reader, reader.uint32()),
|
|
3176
3434
|
};
|
|
3177
3435
|
continue;
|
|
3178
|
-
|
|
3436
|
+
}
|
|
3437
|
+
case 38: {
|
|
3179
3438
|
if (tag !== 306) {
|
|
3180
3439
|
break;
|
|
3181
3440
|
}
|
|
@@ -3184,13 +3443,15 @@ exports.Receipt = {
|
|
|
3184
3443
|
value: exports.Receipt_InsertMarketResult.decode(reader, reader.uint32()),
|
|
3185
3444
|
};
|
|
3186
3445
|
continue;
|
|
3187
|
-
|
|
3446
|
+
}
|
|
3447
|
+
case 39: {
|
|
3188
3448
|
if (tag !== 314) {
|
|
3189
3449
|
break;
|
|
3190
3450
|
}
|
|
3191
3451
|
message.kind = { $case: "withdrawResult", value: exports.Receipt_WithdrawResult.decode(reader, reader.uint32()) };
|
|
3192
3452
|
continue;
|
|
3193
|
-
|
|
3453
|
+
}
|
|
3454
|
+
case 40: {
|
|
3194
3455
|
if (tag !== 322) {
|
|
3195
3456
|
break;
|
|
3196
3457
|
}
|
|
@@ -3199,7 +3460,8 @@ exports.Receipt = {
|
|
|
3199
3460
|
value: exports.Receipt_OracleSymbolFeedResult.decode(reader, reader.uint32()),
|
|
3200
3461
|
};
|
|
3201
3462
|
continue;
|
|
3202
|
-
|
|
3463
|
+
}
|
|
3464
|
+
case 41: {
|
|
3203
3465
|
if (tag !== 330) {
|
|
3204
3466
|
break;
|
|
3205
3467
|
}
|
|
@@ -3208,7 +3470,8 @@ exports.Receipt = {
|
|
|
3208
3470
|
value: exports.Receipt_OracleUpdateResult.decode(reader, reader.uint32()),
|
|
3209
3471
|
};
|
|
3210
3472
|
continue;
|
|
3211
|
-
|
|
3473
|
+
}
|
|
3474
|
+
case 42: {
|
|
3212
3475
|
if (tag !== 338) {
|
|
3213
3476
|
break;
|
|
3214
3477
|
}
|
|
@@ -3217,48 +3480,56 @@ exports.Receipt = {
|
|
|
3217
3480
|
value: exports.Receipt_UpdateGuardianSetResult.decode(reader, reader.uint32()),
|
|
3218
3481
|
};
|
|
3219
3482
|
continue;
|
|
3220
|
-
|
|
3483
|
+
}
|
|
3484
|
+
case 43: {
|
|
3221
3485
|
if (tag !== 346) {
|
|
3222
3486
|
break;
|
|
3223
3487
|
}
|
|
3224
|
-
message.kind = { $case: "liquidated", value: exports.
|
|
3488
|
+
message.kind = { $case: "liquidated", value: exports.Receipt_AccountLiquidated.decode(reader, reader.uint32()) };
|
|
3225
3489
|
continue;
|
|
3226
|
-
|
|
3490
|
+
}
|
|
3491
|
+
case 44: {
|
|
3227
3492
|
if (tag !== 354) {
|
|
3228
3493
|
break;
|
|
3229
3494
|
}
|
|
3230
3495
|
message.kind = { $case: "sessionRevoked", value: exports.Receipt_SessionRevoked.decode(reader, reader.uint32()) };
|
|
3231
3496
|
continue;
|
|
3232
|
-
|
|
3497
|
+
}
|
|
3498
|
+
case 45: {
|
|
3233
3499
|
if (tag !== 362) {
|
|
3234
3500
|
break;
|
|
3235
3501
|
}
|
|
3236
3502
|
message.kind = { $case: "paused", value: exports.Receipt_Paused.decode(reader, reader.uint32()) };
|
|
3237
3503
|
continue;
|
|
3238
|
-
|
|
3504
|
+
}
|
|
3505
|
+
case 46: {
|
|
3239
3506
|
if (tag !== 370) {
|
|
3240
3507
|
break;
|
|
3241
3508
|
}
|
|
3242
3509
|
message.kind = { $case: "unpaused", value: exports.Receipt_Unpaused.decode(reader, reader.uint32()) };
|
|
3243
3510
|
continue;
|
|
3244
|
-
|
|
3511
|
+
}
|
|
3512
|
+
case 47: {
|
|
3245
3513
|
if (tag !== 378) {
|
|
3246
3514
|
break;
|
|
3247
3515
|
}
|
|
3248
3516
|
message.kind = { $case: "transferred", value: exports.Receipt_Transferred.decode(reader, reader.uint32()) };
|
|
3249
3517
|
continue;
|
|
3250
|
-
|
|
3518
|
+
}
|
|
3519
|
+
case 64: {
|
|
3251
3520
|
if (tag !== 514) {
|
|
3252
3521
|
break;
|
|
3253
3522
|
}
|
|
3254
3523
|
message.kind = { $case: "triggerAdded", value: exports.Receipt_TriggerAdded.decode(reader, reader.uint32()) };
|
|
3255
3524
|
continue;
|
|
3256
|
-
|
|
3525
|
+
}
|
|
3526
|
+
case 65: {
|
|
3257
3527
|
if (tag !== 522) {
|
|
3258
3528
|
break;
|
|
3259
3529
|
}
|
|
3260
3530
|
message.kind = { $case: "triggerRemoved", value: exports.Receipt_TriggerRemoved.decode(reader, reader.uint32()) };
|
|
3261
3531
|
continue;
|
|
3532
|
+
}
|
|
3262
3533
|
}
|
|
3263
3534
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3264
3535
|
break;
|
|
@@ -3299,7 +3570,7 @@ exports.Receipt = {
|
|
|
3299
3570
|
value: exports.Receipt_UpdateGuardianSetResult.fromJSON(object.updateGuardianSetResult),
|
|
3300
3571
|
}
|
|
3301
3572
|
: isSet(object.liquidated)
|
|
3302
|
-
? { $case: "liquidated", value: exports.
|
|
3573
|
+
? { $case: "liquidated", value: exports.Receipt_AccountLiquidated.fromJSON(object.liquidated) }
|
|
3303
3574
|
: isSet(object.sessionRevoked)
|
|
3304
3575
|
? { $case: "sessionRevoked", value: exports.Receipt_SessionRevoked.fromJSON(object.sessionRevoked) }
|
|
3305
3576
|
: isSet(object.paused)
|
|
@@ -3323,55 +3594,55 @@ exports.Receipt = {
|
|
|
3323
3594
|
if (message.kind?.$case === "err") {
|
|
3324
3595
|
obj.err = errorToJSON(message.kind.value);
|
|
3325
3596
|
}
|
|
3326
|
-
if (message.kind?.$case === "createSessionResult") {
|
|
3597
|
+
else if (message.kind?.$case === "createSessionResult") {
|
|
3327
3598
|
obj.createSessionResult = exports.Receipt_CreateSessionResult.toJSON(message.kind.value);
|
|
3328
3599
|
}
|
|
3329
|
-
if (message.kind?.$case === "placeOrderResult") {
|
|
3600
|
+
else if (message.kind?.$case === "placeOrderResult") {
|
|
3330
3601
|
obj.placeOrderResult = exports.Receipt_PlaceOrderResult.toJSON(message.kind.value);
|
|
3331
3602
|
}
|
|
3332
|
-
if (message.kind?.$case === "cancelOrderResult") {
|
|
3603
|
+
else if (message.kind?.$case === "cancelOrderResult") {
|
|
3333
3604
|
obj.cancelOrderResult = exports.Receipt_CancelOrderResult.toJSON(message.kind.value);
|
|
3334
3605
|
}
|
|
3335
|
-
if (message.kind?.$case === "depositResult") {
|
|
3606
|
+
else if (message.kind?.$case === "depositResult") {
|
|
3336
3607
|
obj.depositResult = exports.Receipt_DepositResult.toJSON(message.kind.value);
|
|
3337
3608
|
}
|
|
3338
|
-
if (message.kind?.$case === "insertTokenResult") {
|
|
3609
|
+
else if (message.kind?.$case === "insertTokenResult") {
|
|
3339
3610
|
obj.insertTokenResult = exports.Receipt_InsertTokenResult.toJSON(message.kind.value);
|
|
3340
3611
|
}
|
|
3341
|
-
if (message.kind?.$case === "insertMarketResult") {
|
|
3612
|
+
else if (message.kind?.$case === "insertMarketResult") {
|
|
3342
3613
|
obj.insertMarketResult = exports.Receipt_InsertMarketResult.toJSON(message.kind.value);
|
|
3343
3614
|
}
|
|
3344
|
-
if (message.kind?.$case === "withdrawResult") {
|
|
3615
|
+
else if (message.kind?.$case === "withdrawResult") {
|
|
3345
3616
|
obj.withdrawResult = exports.Receipt_WithdrawResult.toJSON(message.kind.value);
|
|
3346
3617
|
}
|
|
3347
|
-
if (message.kind?.$case === "oracleSymbolFeedResult") {
|
|
3618
|
+
else if (message.kind?.$case === "oracleSymbolFeedResult") {
|
|
3348
3619
|
obj.oracleSymbolFeedResult = exports.Receipt_OracleSymbolFeedResult.toJSON(message.kind.value);
|
|
3349
3620
|
}
|
|
3350
|
-
if (message.kind?.$case === "oracleUpdateResult") {
|
|
3621
|
+
else if (message.kind?.$case === "oracleUpdateResult") {
|
|
3351
3622
|
obj.oracleUpdateResult = exports.Receipt_OracleUpdateResult.toJSON(message.kind.value);
|
|
3352
3623
|
}
|
|
3353
|
-
if (message.kind?.$case === "updateGuardianSetResult") {
|
|
3624
|
+
else if (message.kind?.$case === "updateGuardianSetResult") {
|
|
3354
3625
|
obj.updateGuardianSetResult = exports.Receipt_UpdateGuardianSetResult.toJSON(message.kind.value);
|
|
3355
3626
|
}
|
|
3356
|
-
if (message.kind?.$case === "liquidated") {
|
|
3357
|
-
obj.liquidated = exports.
|
|
3627
|
+
else if (message.kind?.$case === "liquidated") {
|
|
3628
|
+
obj.liquidated = exports.Receipt_AccountLiquidated.toJSON(message.kind.value);
|
|
3358
3629
|
}
|
|
3359
|
-
if (message.kind?.$case === "sessionRevoked") {
|
|
3630
|
+
else if (message.kind?.$case === "sessionRevoked") {
|
|
3360
3631
|
obj.sessionRevoked = exports.Receipt_SessionRevoked.toJSON(message.kind.value);
|
|
3361
3632
|
}
|
|
3362
|
-
if (message.kind?.$case === "paused") {
|
|
3633
|
+
else if (message.kind?.$case === "paused") {
|
|
3363
3634
|
obj.paused = exports.Receipt_Paused.toJSON(message.kind.value);
|
|
3364
3635
|
}
|
|
3365
|
-
if (message.kind?.$case === "unpaused") {
|
|
3636
|
+
else if (message.kind?.$case === "unpaused") {
|
|
3366
3637
|
obj.unpaused = exports.Receipt_Unpaused.toJSON(message.kind.value);
|
|
3367
3638
|
}
|
|
3368
|
-
if (message.kind?.$case === "transferred") {
|
|
3639
|
+
else if (message.kind?.$case === "transferred") {
|
|
3369
3640
|
obj.transferred = exports.Receipt_Transferred.toJSON(message.kind.value);
|
|
3370
3641
|
}
|
|
3371
|
-
if (message.kind?.$case === "triggerAdded") {
|
|
3642
|
+
else if (message.kind?.$case === "triggerAdded") {
|
|
3372
3643
|
obj.triggerAdded = exports.Receipt_TriggerAdded.toJSON(message.kind.value);
|
|
3373
3644
|
}
|
|
3374
|
-
if (message.kind?.$case === "triggerRemoved") {
|
|
3645
|
+
else if (message.kind?.$case === "triggerRemoved") {
|
|
3375
3646
|
obj.triggerRemoved = exports.Receipt_TriggerRemoved.toJSON(message.kind.value);
|
|
3376
3647
|
}
|
|
3377
3648
|
return obj;
|
|
@@ -3382,76 +3653,142 @@ exports.Receipt = {
|
|
|
3382
3653
|
fromPartial(object) {
|
|
3383
3654
|
const message = createBaseReceipt();
|
|
3384
3655
|
message.actionId = object.actionId ?? 0n;
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3656
|
+
switch (object.kind?.$case) {
|
|
3657
|
+
case "err": {
|
|
3658
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3659
|
+
message.kind = { $case: "err", value: object.kind.value };
|
|
3660
|
+
}
|
|
3661
|
+
break;
|
|
3662
|
+
}
|
|
3663
|
+
case "createSessionResult": {
|
|
3664
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3665
|
+
message.kind = {
|
|
3666
|
+
$case: "createSessionResult",
|
|
3667
|
+
value: exports.Receipt_CreateSessionResult.fromPartial(object.kind.value),
|
|
3668
|
+
};
|
|
3669
|
+
}
|
|
3670
|
+
break;
|
|
3671
|
+
}
|
|
3672
|
+
case "placeOrderResult": {
|
|
3673
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3674
|
+
message.kind = { $case: "placeOrderResult", value: exports.Receipt_PlaceOrderResult.fromPartial(object.kind.value) };
|
|
3675
|
+
}
|
|
3676
|
+
break;
|
|
3677
|
+
}
|
|
3678
|
+
case "cancelOrderResult": {
|
|
3679
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3680
|
+
message.kind = {
|
|
3681
|
+
$case: "cancelOrderResult",
|
|
3682
|
+
value: exports.Receipt_CancelOrderResult.fromPartial(object.kind.value),
|
|
3683
|
+
};
|
|
3684
|
+
}
|
|
3685
|
+
break;
|
|
3686
|
+
}
|
|
3687
|
+
case "depositResult": {
|
|
3688
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3689
|
+
message.kind = { $case: "depositResult", value: exports.Receipt_DepositResult.fromPartial(object.kind.value) };
|
|
3690
|
+
}
|
|
3691
|
+
break;
|
|
3692
|
+
}
|
|
3693
|
+
case "insertTokenResult": {
|
|
3694
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3695
|
+
message.kind = {
|
|
3696
|
+
$case: "insertTokenResult",
|
|
3697
|
+
value: exports.Receipt_InsertTokenResult.fromPartial(object.kind.value),
|
|
3698
|
+
};
|
|
3699
|
+
}
|
|
3700
|
+
break;
|
|
3701
|
+
}
|
|
3702
|
+
case "insertMarketResult": {
|
|
3703
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3704
|
+
message.kind = {
|
|
3705
|
+
$case: "insertMarketResult",
|
|
3706
|
+
value: exports.Receipt_InsertMarketResult.fromPartial(object.kind.value),
|
|
3707
|
+
};
|
|
3708
|
+
}
|
|
3709
|
+
break;
|
|
3710
|
+
}
|
|
3711
|
+
case "withdrawResult": {
|
|
3712
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3713
|
+
message.kind = { $case: "withdrawResult", value: exports.Receipt_WithdrawResult.fromPartial(object.kind.value) };
|
|
3714
|
+
}
|
|
3715
|
+
break;
|
|
3716
|
+
}
|
|
3717
|
+
case "oracleSymbolFeedResult": {
|
|
3718
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3719
|
+
message.kind = {
|
|
3720
|
+
$case: "oracleSymbolFeedResult",
|
|
3721
|
+
value: exports.Receipt_OracleSymbolFeedResult.fromPartial(object.kind.value),
|
|
3722
|
+
};
|
|
3723
|
+
}
|
|
3724
|
+
break;
|
|
3725
|
+
}
|
|
3726
|
+
case "oracleUpdateResult": {
|
|
3727
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3728
|
+
message.kind = {
|
|
3729
|
+
$case: "oracleUpdateResult",
|
|
3730
|
+
value: exports.Receipt_OracleUpdateResult.fromPartial(object.kind.value),
|
|
3731
|
+
};
|
|
3732
|
+
}
|
|
3733
|
+
break;
|
|
3734
|
+
}
|
|
3735
|
+
case "updateGuardianSetResult": {
|
|
3736
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3737
|
+
message.kind = {
|
|
3738
|
+
$case: "updateGuardianSetResult",
|
|
3739
|
+
value: exports.Receipt_UpdateGuardianSetResult.fromPartial(object.kind.value),
|
|
3740
|
+
};
|
|
3741
|
+
}
|
|
3742
|
+
break;
|
|
3743
|
+
}
|
|
3744
|
+
case "liquidated": {
|
|
3745
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3746
|
+
message.kind = { $case: "liquidated", value: exports.Receipt_AccountLiquidated.fromPartial(object.kind.value) };
|
|
3747
|
+
}
|
|
3748
|
+
break;
|
|
3749
|
+
}
|
|
3750
|
+
case "sessionRevoked": {
|
|
3751
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3752
|
+
message.kind = { $case: "sessionRevoked", value: exports.Receipt_SessionRevoked.fromPartial(object.kind.value) };
|
|
3753
|
+
}
|
|
3754
|
+
break;
|
|
3755
|
+
}
|
|
3756
|
+
case "paused": {
|
|
3757
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3758
|
+
message.kind = { $case: "paused", value: exports.Receipt_Paused.fromPartial(object.kind.value) };
|
|
3759
|
+
}
|
|
3760
|
+
break;
|
|
3761
|
+
}
|
|
3762
|
+
case "unpaused": {
|
|
3763
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3764
|
+
message.kind = { $case: "unpaused", value: exports.Receipt_Unpaused.fromPartial(object.kind.value) };
|
|
3765
|
+
}
|
|
3766
|
+
break;
|
|
3767
|
+
}
|
|
3768
|
+
case "transferred": {
|
|
3769
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3770
|
+
message.kind = { $case: "transferred", value: exports.Receipt_Transferred.fromPartial(object.kind.value) };
|
|
3771
|
+
}
|
|
3772
|
+
break;
|
|
3773
|
+
}
|
|
3774
|
+
case "triggerAdded": {
|
|
3775
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3776
|
+
message.kind = { $case: "triggerAdded", value: exports.Receipt_TriggerAdded.fromPartial(object.kind.value) };
|
|
3777
|
+
}
|
|
3778
|
+
break;
|
|
3779
|
+
}
|
|
3780
|
+
case "triggerRemoved": {
|
|
3781
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
3782
|
+
message.kind = { $case: "triggerRemoved", value: exports.Receipt_TriggerRemoved.fromPartial(object.kind.value) };
|
|
3783
|
+
}
|
|
3784
|
+
break;
|
|
3785
|
+
}
|
|
3449
3786
|
}
|
|
3450
3787
|
return message;
|
|
3451
3788
|
},
|
|
3452
3789
|
};
|
|
3453
3790
|
function createBaseReceipt_Posted() {
|
|
3454
|
-
return { side: 0, marketId: 0, price: 0n, size: 0n, orderId: 0n, accountId: 0
|
|
3791
|
+
return { side: 0, marketId: 0, price: 0n, size: 0n, orderId: 0n, accountId: 0 };
|
|
3455
3792
|
}
|
|
3456
3793
|
exports.Receipt_Posted = {
|
|
3457
3794
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -3482,12 +3819,6 @@ exports.Receipt_Posted = {
|
|
|
3482
3819
|
if (message.accountId !== 0) {
|
|
3483
3820
|
writer.uint32(48).uint32(message.accountId);
|
|
3484
3821
|
}
|
|
3485
|
-
if (message.clientOrderId !== undefined) {
|
|
3486
|
-
if (BigInt.asUintN(64, message.clientOrderId) !== message.clientOrderId) {
|
|
3487
|
-
throw new globalThis.Error("value provided for field message.clientOrderId of type uint64 too large");
|
|
3488
|
-
}
|
|
3489
|
-
writer.uint32(56).uint64(message.clientOrderId);
|
|
3490
|
-
}
|
|
3491
3822
|
return writer;
|
|
3492
3823
|
},
|
|
3493
3824
|
decode(input, length) {
|
|
@@ -3497,48 +3828,48 @@ exports.Receipt_Posted = {
|
|
|
3497
3828
|
while (reader.pos < end) {
|
|
3498
3829
|
const tag = reader.uint32();
|
|
3499
3830
|
switch (tag >>> 3) {
|
|
3500
|
-
case 1:
|
|
3831
|
+
case 1: {
|
|
3501
3832
|
if (tag !== 8) {
|
|
3502
3833
|
break;
|
|
3503
3834
|
}
|
|
3504
3835
|
message.side = reader.int32();
|
|
3505
3836
|
continue;
|
|
3506
|
-
|
|
3837
|
+
}
|
|
3838
|
+
case 2: {
|
|
3507
3839
|
if (tag !== 16) {
|
|
3508
3840
|
break;
|
|
3509
3841
|
}
|
|
3510
3842
|
message.marketId = reader.uint32();
|
|
3511
3843
|
continue;
|
|
3512
|
-
|
|
3844
|
+
}
|
|
3845
|
+
case 3: {
|
|
3513
3846
|
if (tag !== 24) {
|
|
3514
3847
|
break;
|
|
3515
3848
|
}
|
|
3516
3849
|
message.price = reader.uint64();
|
|
3517
3850
|
continue;
|
|
3518
|
-
|
|
3851
|
+
}
|
|
3852
|
+
case 4: {
|
|
3519
3853
|
if (tag !== 32) {
|
|
3520
3854
|
break;
|
|
3521
3855
|
}
|
|
3522
3856
|
message.size = reader.uint64();
|
|
3523
3857
|
continue;
|
|
3524
|
-
|
|
3858
|
+
}
|
|
3859
|
+
case 5: {
|
|
3525
3860
|
if (tag !== 40) {
|
|
3526
3861
|
break;
|
|
3527
3862
|
}
|
|
3528
3863
|
message.orderId = reader.uint64();
|
|
3529
3864
|
continue;
|
|
3530
|
-
|
|
3865
|
+
}
|
|
3866
|
+
case 6: {
|
|
3531
3867
|
if (tag !== 48) {
|
|
3532
3868
|
break;
|
|
3533
3869
|
}
|
|
3534
3870
|
message.accountId = reader.uint32();
|
|
3535
3871
|
continue;
|
|
3536
|
-
|
|
3537
|
-
if (tag !== 56) {
|
|
3538
|
-
break;
|
|
3539
|
-
}
|
|
3540
|
-
message.clientOrderId = reader.uint64();
|
|
3541
|
-
continue;
|
|
3872
|
+
}
|
|
3542
3873
|
}
|
|
3543
3874
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3544
3875
|
break;
|
|
@@ -3555,7 +3886,6 @@ exports.Receipt_Posted = {
|
|
|
3555
3886
|
size: isSet(object.size) ? BigInt(object.size) : 0n,
|
|
3556
3887
|
orderId: isSet(object.orderId) ? BigInt(object.orderId) : 0n,
|
|
3557
3888
|
accountId: isSet(object.accountId) ? globalThis.Number(object.accountId) : 0,
|
|
3558
|
-
clientOrderId: isSet(object.clientOrderId) ? BigInt(object.clientOrderId) : undefined,
|
|
3559
3889
|
};
|
|
3560
3890
|
},
|
|
3561
3891
|
toJSON(message) {
|
|
@@ -3578,9 +3908,6 @@ exports.Receipt_Posted = {
|
|
|
3578
3908
|
if (message.accountId !== 0) {
|
|
3579
3909
|
obj.accountId = Math.round(message.accountId);
|
|
3580
3910
|
}
|
|
3581
|
-
if (message.clientOrderId !== undefined) {
|
|
3582
|
-
obj.clientOrderId = message.clientOrderId.toString();
|
|
3583
|
-
}
|
|
3584
3911
|
return obj;
|
|
3585
3912
|
},
|
|
3586
3913
|
create(base) {
|
|
@@ -3594,7 +3921,6 @@ exports.Receipt_Posted = {
|
|
|
3594
3921
|
message.size = object.size ?? 0n;
|
|
3595
3922
|
message.orderId = object.orderId ?? 0n;
|
|
3596
3923
|
message.accountId = object.accountId ?? 0;
|
|
3597
|
-
message.clientOrderId = object.clientOrderId ?? undefined;
|
|
3598
3924
|
return message;
|
|
3599
3925
|
},
|
|
3600
3926
|
};
|
|
@@ -3633,30 +3959,34 @@ exports.Receipt_Trade = {
|
|
|
3633
3959
|
while (reader.pos < end) {
|
|
3634
3960
|
const tag = reader.uint32();
|
|
3635
3961
|
switch (tag >>> 3) {
|
|
3636
|
-
case 2:
|
|
3962
|
+
case 2: {
|
|
3637
3963
|
if (tag !== 16) {
|
|
3638
3964
|
break;
|
|
3639
3965
|
}
|
|
3640
3966
|
message.orderId = reader.uint64();
|
|
3641
3967
|
continue;
|
|
3642
|
-
|
|
3968
|
+
}
|
|
3969
|
+
case 4: {
|
|
3643
3970
|
if (tag !== 32) {
|
|
3644
3971
|
break;
|
|
3645
3972
|
}
|
|
3646
3973
|
message.price = reader.uint64();
|
|
3647
3974
|
continue;
|
|
3648
|
-
|
|
3975
|
+
}
|
|
3976
|
+
case 5: {
|
|
3649
3977
|
if (tag !== 40) {
|
|
3650
3978
|
break;
|
|
3651
3979
|
}
|
|
3652
3980
|
message.size = reader.uint64();
|
|
3653
3981
|
continue;
|
|
3654
|
-
|
|
3982
|
+
}
|
|
3983
|
+
case 6: {
|
|
3655
3984
|
if (tag !== 48) {
|
|
3656
3985
|
break;
|
|
3657
3986
|
}
|
|
3658
3987
|
message.accountId = reader.uint32();
|
|
3659
3988
|
continue;
|
|
3989
|
+
}
|
|
3660
3990
|
}
|
|
3661
3991
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3662
3992
|
break;
|
|
@@ -3721,12 +4051,13 @@ exports.Receipt_CreateSessionResult = {
|
|
|
3721
4051
|
while (reader.pos < end) {
|
|
3722
4052
|
const tag = reader.uint32();
|
|
3723
4053
|
switch (tag >>> 3) {
|
|
3724
|
-
case 1:
|
|
4054
|
+
case 1: {
|
|
3725
4055
|
if (tag !== 8) {
|
|
3726
4056
|
break;
|
|
3727
4057
|
}
|
|
3728
4058
|
message.sessionId = reader.uint64();
|
|
3729
4059
|
continue;
|
|
4060
|
+
}
|
|
3730
4061
|
}
|
|
3731
4062
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3732
4063
|
break;
|
|
@@ -3755,7 +4086,7 @@ exports.Receipt_CreateSessionResult = {
|
|
|
3755
4086
|
},
|
|
3756
4087
|
};
|
|
3757
4088
|
function createBaseReceipt_PlaceOrderResult() {
|
|
3758
|
-
return { posted: undefined, fills: [] };
|
|
4089
|
+
return { posted: undefined, fills: [], clientOrderId: undefined };
|
|
3759
4090
|
}
|
|
3760
4091
|
exports.Receipt_PlaceOrderResult = {
|
|
3761
4092
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -3765,6 +4096,12 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
3765
4096
|
for (const v of message.fills) {
|
|
3766
4097
|
exports.Receipt_Trade.encode(v, writer.uint32(18).fork()).join();
|
|
3767
4098
|
}
|
|
4099
|
+
if (message.clientOrderId !== undefined) {
|
|
4100
|
+
if (BigInt.asUintN(64, message.clientOrderId) !== message.clientOrderId) {
|
|
4101
|
+
throw new globalThis.Error("value provided for field message.clientOrderId of type uint64 too large");
|
|
4102
|
+
}
|
|
4103
|
+
writer.uint32(24).uint64(message.clientOrderId);
|
|
4104
|
+
}
|
|
3768
4105
|
return writer;
|
|
3769
4106
|
},
|
|
3770
4107
|
decode(input, length) {
|
|
@@ -3774,18 +4111,27 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
3774
4111
|
while (reader.pos < end) {
|
|
3775
4112
|
const tag = reader.uint32();
|
|
3776
4113
|
switch (tag >>> 3) {
|
|
3777
|
-
case 1:
|
|
4114
|
+
case 1: {
|
|
3778
4115
|
if (tag !== 10) {
|
|
3779
4116
|
break;
|
|
3780
4117
|
}
|
|
3781
4118
|
message.posted = exports.Receipt_Posted.decode(reader, reader.uint32());
|
|
3782
4119
|
continue;
|
|
3783
|
-
|
|
4120
|
+
}
|
|
4121
|
+
case 2: {
|
|
3784
4122
|
if (tag !== 18) {
|
|
3785
4123
|
break;
|
|
3786
4124
|
}
|
|
3787
4125
|
message.fills.push(exports.Receipt_Trade.decode(reader, reader.uint32()));
|
|
3788
4126
|
continue;
|
|
4127
|
+
}
|
|
4128
|
+
case 3: {
|
|
4129
|
+
if (tag !== 24) {
|
|
4130
|
+
break;
|
|
4131
|
+
}
|
|
4132
|
+
message.clientOrderId = reader.uint64();
|
|
4133
|
+
continue;
|
|
4134
|
+
}
|
|
3789
4135
|
}
|
|
3790
4136
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3791
4137
|
break;
|
|
@@ -3798,6 +4144,7 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
3798
4144
|
return {
|
|
3799
4145
|
posted: isSet(object.posted) ? exports.Receipt_Posted.fromJSON(object.posted) : undefined,
|
|
3800
4146
|
fills: globalThis.Array.isArray(object?.fills) ? object.fills.map((e) => exports.Receipt_Trade.fromJSON(e)) : [],
|
|
4147
|
+
clientOrderId: isSet(object.clientOrderId) ? BigInt(object.clientOrderId) : undefined,
|
|
3801
4148
|
};
|
|
3802
4149
|
},
|
|
3803
4150
|
toJSON(message) {
|
|
@@ -3808,6 +4155,9 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
3808
4155
|
if (message.fills?.length) {
|
|
3809
4156
|
obj.fills = message.fills.map((e) => exports.Receipt_Trade.toJSON(e));
|
|
3810
4157
|
}
|
|
4158
|
+
if (message.clientOrderId !== undefined) {
|
|
4159
|
+
obj.clientOrderId = message.clientOrderId.toString();
|
|
4160
|
+
}
|
|
3811
4161
|
return obj;
|
|
3812
4162
|
},
|
|
3813
4163
|
create(base) {
|
|
@@ -3819,6 +4169,7 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
3819
4169
|
? exports.Receipt_Posted.fromPartial(object.posted)
|
|
3820
4170
|
: undefined;
|
|
3821
4171
|
message.fills = object.fills?.map((e) => exports.Receipt_Trade.fromPartial(e)) || [];
|
|
4172
|
+
message.clientOrderId = object.clientOrderId ?? undefined;
|
|
3822
4173
|
return message;
|
|
3823
4174
|
},
|
|
3824
4175
|
};
|
|
@@ -3845,18 +4196,20 @@ exports.Receipt_CancelOrderResult = {
|
|
|
3845
4196
|
while (reader.pos < end) {
|
|
3846
4197
|
const tag = reader.uint32();
|
|
3847
4198
|
switch (tag >>> 3) {
|
|
3848
|
-
case 1:
|
|
4199
|
+
case 1: {
|
|
3849
4200
|
if (tag !== 8) {
|
|
3850
4201
|
break;
|
|
3851
4202
|
}
|
|
3852
4203
|
message.orderId = reader.uint64();
|
|
3853
4204
|
continue;
|
|
3854
|
-
|
|
4205
|
+
}
|
|
4206
|
+
case 2: {
|
|
3855
4207
|
if (tag !== 16) {
|
|
3856
4208
|
break;
|
|
3857
4209
|
}
|
|
3858
4210
|
message.accountId = reader.uint32();
|
|
3859
4211
|
continue;
|
|
4212
|
+
}
|
|
3860
4213
|
}
|
|
3861
4214
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3862
4215
|
break;
|
|
@@ -3923,36 +4276,41 @@ exports.Receipt_DepositResult = {
|
|
|
3923
4276
|
while (reader.pos < end) {
|
|
3924
4277
|
const tag = reader.uint32();
|
|
3925
4278
|
switch (tag >>> 3) {
|
|
3926
|
-
case 1:
|
|
4279
|
+
case 1: {
|
|
3927
4280
|
if (tag !== 8) {
|
|
3928
4281
|
break;
|
|
3929
4282
|
}
|
|
3930
4283
|
message.tokenId = reader.uint32();
|
|
3931
4284
|
continue;
|
|
3932
|
-
|
|
4285
|
+
}
|
|
4286
|
+
case 2: {
|
|
3933
4287
|
if (tag !== 16) {
|
|
3934
4288
|
break;
|
|
3935
4289
|
}
|
|
3936
4290
|
message.amount = reader.uint64();
|
|
3937
4291
|
continue;
|
|
3938
|
-
|
|
4292
|
+
}
|
|
4293
|
+
case 3: {
|
|
3939
4294
|
if (tag !== 24) {
|
|
3940
4295
|
break;
|
|
3941
4296
|
}
|
|
3942
4297
|
message.accountId = reader.uint32();
|
|
3943
4298
|
continue;
|
|
3944
|
-
|
|
4299
|
+
}
|
|
4300
|
+
case 4: {
|
|
3945
4301
|
if (tag !== 32) {
|
|
3946
4302
|
break;
|
|
3947
4303
|
}
|
|
3948
4304
|
message.userCreated = reader.bool();
|
|
3949
4305
|
continue;
|
|
3950
|
-
|
|
4306
|
+
}
|
|
4307
|
+
case 5: {
|
|
3951
4308
|
if (tag !== 42) {
|
|
3952
4309
|
break;
|
|
3953
4310
|
}
|
|
3954
4311
|
message.userPubkey = reader.bytes();
|
|
3955
4312
|
continue;
|
|
4313
|
+
}
|
|
3956
4314
|
}
|
|
3957
4315
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3958
4316
|
break;
|
|
@@ -4022,18 +4380,20 @@ exports.Receipt_InsertTokenResult = {
|
|
|
4022
4380
|
while (reader.pos < end) {
|
|
4023
4381
|
const tag = reader.uint32();
|
|
4024
4382
|
switch (tag >>> 3) {
|
|
4025
|
-
case 1:
|
|
4383
|
+
case 1: {
|
|
4026
4384
|
if (tag !== 10) {
|
|
4027
4385
|
break;
|
|
4028
4386
|
}
|
|
4029
4387
|
message.chainAddr = reader.bytes();
|
|
4030
4388
|
continue;
|
|
4031
|
-
|
|
4389
|
+
}
|
|
4390
|
+
case 2: {
|
|
4032
4391
|
if (tag !== 18) {
|
|
4033
4392
|
break;
|
|
4034
4393
|
}
|
|
4035
4394
|
message.token = exports.Token.decode(reader, reader.uint32());
|
|
4036
4395
|
continue;
|
|
4396
|
+
}
|
|
4037
4397
|
}
|
|
4038
4398
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4039
4399
|
break;
|
|
@@ -4085,12 +4445,13 @@ exports.Receipt_InsertMarketResult = {
|
|
|
4085
4445
|
while (reader.pos < end) {
|
|
4086
4446
|
const tag = reader.uint32();
|
|
4087
4447
|
switch (tag >>> 3) {
|
|
4088
|
-
case 1:
|
|
4448
|
+
case 1: {
|
|
4089
4449
|
if (tag !== 10) {
|
|
4090
4450
|
break;
|
|
4091
4451
|
}
|
|
4092
4452
|
message.market = exports.Market.decode(reader, reader.uint32());
|
|
4093
4453
|
continue;
|
|
4454
|
+
}
|
|
4094
4455
|
}
|
|
4095
4456
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4096
4457
|
break;
|
|
@@ -4155,36 +4516,41 @@ exports.Receipt_WithdrawResult = {
|
|
|
4155
4516
|
while (reader.pos < end) {
|
|
4156
4517
|
const tag = reader.uint32();
|
|
4157
4518
|
switch (tag >>> 3) {
|
|
4158
|
-
case 1:
|
|
4519
|
+
case 1: {
|
|
4159
4520
|
if (tag !== 8) {
|
|
4160
4521
|
break;
|
|
4161
4522
|
}
|
|
4162
4523
|
message.tokenId = reader.uint32();
|
|
4163
4524
|
continue;
|
|
4164
|
-
|
|
4525
|
+
}
|
|
4526
|
+
case 2: {
|
|
4165
4527
|
if (tag !== 16) {
|
|
4166
4528
|
break;
|
|
4167
4529
|
}
|
|
4168
4530
|
message.amount = reader.uint64();
|
|
4169
4531
|
continue;
|
|
4170
|
-
|
|
4532
|
+
}
|
|
4533
|
+
case 3: {
|
|
4171
4534
|
if (tag !== 24) {
|
|
4172
4535
|
break;
|
|
4173
4536
|
}
|
|
4174
4537
|
message.balance = reader.uint64();
|
|
4175
4538
|
continue;
|
|
4176
|
-
|
|
4539
|
+
}
|
|
4540
|
+
case 4: {
|
|
4177
4541
|
if (tag !== 32) {
|
|
4178
4542
|
break;
|
|
4179
4543
|
}
|
|
4180
4544
|
message.accountId = reader.uint32();
|
|
4181
4545
|
continue;
|
|
4182
|
-
|
|
4546
|
+
}
|
|
4547
|
+
case 5: {
|
|
4183
4548
|
if (tag !== 42) {
|
|
4184
4549
|
break;
|
|
4185
4550
|
}
|
|
4186
4551
|
message.userPubkey = reader.bytes();
|
|
4187
4552
|
continue;
|
|
4553
|
+
}
|
|
4188
4554
|
}
|
|
4189
4555
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4190
4556
|
break;
|
|
@@ -4254,18 +4620,20 @@ exports.Receipt_OracleSymbolFeedResult = {
|
|
|
4254
4620
|
while (reader.pos < end) {
|
|
4255
4621
|
const tag = reader.uint32();
|
|
4256
4622
|
switch (tag >>> 3) {
|
|
4257
|
-
case 1:
|
|
4623
|
+
case 1: {
|
|
4258
4624
|
if (tag !== 10) {
|
|
4259
4625
|
break;
|
|
4260
4626
|
}
|
|
4261
4627
|
message.oracleSymbol = reader.string();
|
|
4262
4628
|
continue;
|
|
4263
|
-
|
|
4629
|
+
}
|
|
4630
|
+
case 2: {
|
|
4264
4631
|
if (tag !== 18) {
|
|
4265
4632
|
break;
|
|
4266
4633
|
}
|
|
4267
4634
|
message.feedId = reader.bytes();
|
|
4268
4635
|
continue;
|
|
4636
|
+
}
|
|
4269
4637
|
}
|
|
4270
4638
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4271
4639
|
break;
|
|
@@ -4320,12 +4688,13 @@ exports.Receipt_OracleUpdateResult = {
|
|
|
4320
4688
|
while (reader.pos < end) {
|
|
4321
4689
|
const tag = reader.uint32();
|
|
4322
4690
|
switch (tag >>> 3) {
|
|
4323
|
-
case 1:
|
|
4691
|
+
case 1: {
|
|
4324
4692
|
if (tag !== 8) {
|
|
4325
4693
|
break;
|
|
4326
4694
|
}
|
|
4327
4695
|
message.timestamp = reader.int64();
|
|
4328
4696
|
continue;
|
|
4697
|
+
}
|
|
4329
4698
|
}
|
|
4330
4699
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4331
4700
|
break;
|
|
@@ -4373,18 +4742,20 @@ exports.Receipt_UpdateGuardianSetResult = {
|
|
|
4373
4742
|
while (reader.pos < end) {
|
|
4374
4743
|
const tag = reader.uint32();
|
|
4375
4744
|
switch (tag >>> 3) {
|
|
4376
|
-
case 1:
|
|
4745
|
+
case 1: {
|
|
4377
4746
|
if (tag !== 8) {
|
|
4378
4747
|
break;
|
|
4379
4748
|
}
|
|
4380
4749
|
message.guardianSetIndex = reader.uint32();
|
|
4381
4750
|
continue;
|
|
4382
|
-
|
|
4751
|
+
}
|
|
4752
|
+
case 2: {
|
|
4383
4753
|
if (tag !== 18) {
|
|
4384
4754
|
break;
|
|
4385
4755
|
}
|
|
4386
4756
|
message.addresses.push(reader.bytes());
|
|
4387
4757
|
continue;
|
|
4758
|
+
}
|
|
4388
4759
|
}
|
|
4389
4760
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4390
4761
|
break;
|
|
@@ -4421,20 +4792,56 @@ exports.Receipt_UpdateGuardianSetResult = {
|
|
|
4421
4792
|
return message;
|
|
4422
4793
|
},
|
|
4423
4794
|
};
|
|
4424
|
-
function
|
|
4425
|
-
return {};
|
|
4795
|
+
function createBaseReceipt_PerpPosition() {
|
|
4796
|
+
return { marketId: 0, baseSize: 0n, price: 0n };
|
|
4426
4797
|
}
|
|
4427
|
-
exports.
|
|
4428
|
-
encode(
|
|
4798
|
+
exports.Receipt_PerpPosition = {
|
|
4799
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
4800
|
+
if (message.marketId !== 0) {
|
|
4801
|
+
writer.uint32(8).uint32(message.marketId);
|
|
4802
|
+
}
|
|
4803
|
+
if (message.baseSize !== 0n) {
|
|
4804
|
+
if (BigInt.asIntN(64, message.baseSize) !== message.baseSize) {
|
|
4805
|
+
throw new globalThis.Error("value provided for field message.baseSize of type int64 too large");
|
|
4806
|
+
}
|
|
4807
|
+
writer.uint32(16).int64(message.baseSize);
|
|
4808
|
+
}
|
|
4809
|
+
if (message.price !== 0n) {
|
|
4810
|
+
if (BigInt.asUintN(64, message.price) !== message.price) {
|
|
4811
|
+
throw new globalThis.Error("value provided for field message.price of type uint64 too large");
|
|
4812
|
+
}
|
|
4813
|
+
writer.uint32(24).uint64(message.price);
|
|
4814
|
+
}
|
|
4429
4815
|
return writer;
|
|
4430
4816
|
},
|
|
4431
4817
|
decode(input, length) {
|
|
4432
4818
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4433
4819
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4434
|
-
const message =
|
|
4820
|
+
const message = createBaseReceipt_PerpPosition();
|
|
4435
4821
|
while (reader.pos < end) {
|
|
4436
4822
|
const tag = reader.uint32();
|
|
4437
4823
|
switch (tag >>> 3) {
|
|
4824
|
+
case 1: {
|
|
4825
|
+
if (tag !== 8) {
|
|
4826
|
+
break;
|
|
4827
|
+
}
|
|
4828
|
+
message.marketId = reader.uint32();
|
|
4829
|
+
continue;
|
|
4830
|
+
}
|
|
4831
|
+
case 2: {
|
|
4832
|
+
if (tag !== 16) {
|
|
4833
|
+
break;
|
|
4834
|
+
}
|
|
4835
|
+
message.baseSize = reader.int64();
|
|
4836
|
+
continue;
|
|
4837
|
+
}
|
|
4838
|
+
case 3: {
|
|
4839
|
+
if (tag !== 24) {
|
|
4840
|
+
break;
|
|
4841
|
+
}
|
|
4842
|
+
message.price = reader.uint64();
|
|
4843
|
+
continue;
|
|
4844
|
+
}
|
|
4438
4845
|
}
|
|
4439
4846
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4440
4847
|
break;
|
|
@@ -4443,18 +4850,148 @@ exports.Receipt_Liquidated = {
|
|
|
4443
4850
|
}
|
|
4444
4851
|
return message;
|
|
4445
4852
|
},
|
|
4446
|
-
fromJSON(
|
|
4447
|
-
return {
|
|
4853
|
+
fromJSON(object) {
|
|
4854
|
+
return {
|
|
4855
|
+
marketId: isSet(object.marketId) ? globalThis.Number(object.marketId) : 0,
|
|
4856
|
+
baseSize: isSet(object.baseSize) ? BigInt(object.baseSize) : 0n,
|
|
4857
|
+
price: isSet(object.price) ? BigInt(object.price) : 0n,
|
|
4858
|
+
};
|
|
4448
4859
|
},
|
|
4449
|
-
toJSON(
|
|
4860
|
+
toJSON(message) {
|
|
4450
4861
|
const obj = {};
|
|
4862
|
+
if (message.marketId !== 0) {
|
|
4863
|
+
obj.marketId = Math.round(message.marketId);
|
|
4864
|
+
}
|
|
4865
|
+
if (message.baseSize !== 0n) {
|
|
4866
|
+
obj.baseSize = message.baseSize.toString();
|
|
4867
|
+
}
|
|
4868
|
+
if (message.price !== 0n) {
|
|
4869
|
+
obj.price = message.price.toString();
|
|
4870
|
+
}
|
|
4451
4871
|
return obj;
|
|
4452
4872
|
},
|
|
4453
4873
|
create(base) {
|
|
4454
|
-
return exports.
|
|
4874
|
+
return exports.Receipt_PerpPosition.fromPartial(base ?? {});
|
|
4455
4875
|
},
|
|
4456
|
-
fromPartial(
|
|
4457
|
-
const message =
|
|
4876
|
+
fromPartial(object) {
|
|
4877
|
+
const message = createBaseReceipt_PerpPosition();
|
|
4878
|
+
message.marketId = object.marketId ?? 0;
|
|
4879
|
+
message.baseSize = object.baseSize ?? 0n;
|
|
4880
|
+
message.price = object.price ?? 0n;
|
|
4881
|
+
return message;
|
|
4882
|
+
},
|
|
4883
|
+
};
|
|
4884
|
+
function createBaseReceipt_AccountLiquidated() {
|
|
4885
|
+
return { liquidatorAccountId: 0, liquidateeAccountId: 0, cancelledOrders: [], removedPerps: [] };
|
|
4886
|
+
}
|
|
4887
|
+
exports.Receipt_AccountLiquidated = {
|
|
4888
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
4889
|
+
if (message.liquidatorAccountId !== 0) {
|
|
4890
|
+
writer.uint32(8).uint32(message.liquidatorAccountId);
|
|
4891
|
+
}
|
|
4892
|
+
if (message.liquidateeAccountId !== 0) {
|
|
4893
|
+
writer.uint32(16).uint32(message.liquidateeAccountId);
|
|
4894
|
+
}
|
|
4895
|
+
writer.uint32(26).fork();
|
|
4896
|
+
for (const v of message.cancelledOrders) {
|
|
4897
|
+
if (BigInt.asUintN(64, v) !== v) {
|
|
4898
|
+
throw new globalThis.Error("a value provided in array field cancelledOrders of type uint64 is too large");
|
|
4899
|
+
}
|
|
4900
|
+
writer.uint64(v);
|
|
4901
|
+
}
|
|
4902
|
+
writer.join();
|
|
4903
|
+
for (const v of message.removedPerps) {
|
|
4904
|
+
exports.Receipt_PerpPosition.encode(v, writer.uint32(34).fork()).join();
|
|
4905
|
+
}
|
|
4906
|
+
return writer;
|
|
4907
|
+
},
|
|
4908
|
+
decode(input, length) {
|
|
4909
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4910
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4911
|
+
const message = createBaseReceipt_AccountLiquidated();
|
|
4912
|
+
while (reader.pos < end) {
|
|
4913
|
+
const tag = reader.uint32();
|
|
4914
|
+
switch (tag >>> 3) {
|
|
4915
|
+
case 1: {
|
|
4916
|
+
if (tag !== 8) {
|
|
4917
|
+
break;
|
|
4918
|
+
}
|
|
4919
|
+
message.liquidatorAccountId = reader.uint32();
|
|
4920
|
+
continue;
|
|
4921
|
+
}
|
|
4922
|
+
case 2: {
|
|
4923
|
+
if (tag !== 16) {
|
|
4924
|
+
break;
|
|
4925
|
+
}
|
|
4926
|
+
message.liquidateeAccountId = reader.uint32();
|
|
4927
|
+
continue;
|
|
4928
|
+
}
|
|
4929
|
+
case 3: {
|
|
4930
|
+
if (tag === 24) {
|
|
4931
|
+
message.cancelledOrders.push(reader.uint64());
|
|
4932
|
+
continue;
|
|
4933
|
+
}
|
|
4934
|
+
if (tag === 26) {
|
|
4935
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4936
|
+
while (reader.pos < end2) {
|
|
4937
|
+
message.cancelledOrders.push(reader.uint64());
|
|
4938
|
+
}
|
|
4939
|
+
continue;
|
|
4940
|
+
}
|
|
4941
|
+
break;
|
|
4942
|
+
}
|
|
4943
|
+
case 4: {
|
|
4944
|
+
if (tag !== 34) {
|
|
4945
|
+
break;
|
|
4946
|
+
}
|
|
4947
|
+
message.removedPerps.push(exports.Receipt_PerpPosition.decode(reader, reader.uint32()));
|
|
4948
|
+
continue;
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4952
|
+
break;
|
|
4953
|
+
}
|
|
4954
|
+
reader.skip(tag & 7);
|
|
4955
|
+
}
|
|
4956
|
+
return message;
|
|
4957
|
+
},
|
|
4958
|
+
fromJSON(object) {
|
|
4959
|
+
return {
|
|
4960
|
+
liquidatorAccountId: isSet(object.liquidatorAccountId) ? globalThis.Number(object.liquidatorAccountId) : 0,
|
|
4961
|
+
liquidateeAccountId: isSet(object.liquidateeAccountId) ? globalThis.Number(object.liquidateeAccountId) : 0,
|
|
4962
|
+
cancelledOrders: globalThis.Array.isArray(object?.cancelledOrders)
|
|
4963
|
+
? object.cancelledOrders.map((e) => BigInt(e))
|
|
4964
|
+
: [],
|
|
4965
|
+
removedPerps: globalThis.Array.isArray(object?.removedPerps)
|
|
4966
|
+
? object.removedPerps.map((e) => exports.Receipt_PerpPosition.fromJSON(e))
|
|
4967
|
+
: [],
|
|
4968
|
+
};
|
|
4969
|
+
},
|
|
4970
|
+
toJSON(message) {
|
|
4971
|
+
const obj = {};
|
|
4972
|
+
if (message.liquidatorAccountId !== 0) {
|
|
4973
|
+
obj.liquidatorAccountId = Math.round(message.liquidatorAccountId);
|
|
4974
|
+
}
|
|
4975
|
+
if (message.liquidateeAccountId !== 0) {
|
|
4976
|
+
obj.liquidateeAccountId = Math.round(message.liquidateeAccountId);
|
|
4977
|
+
}
|
|
4978
|
+
if (message.cancelledOrders?.length) {
|
|
4979
|
+
obj.cancelledOrders = message.cancelledOrders.map((e) => e.toString());
|
|
4980
|
+
}
|
|
4981
|
+
if (message.removedPerps?.length) {
|
|
4982
|
+
obj.removedPerps = message.removedPerps.map((e) => exports.Receipt_PerpPosition.toJSON(e));
|
|
4983
|
+
}
|
|
4984
|
+
return obj;
|
|
4985
|
+
},
|
|
4986
|
+
create(base) {
|
|
4987
|
+
return exports.Receipt_AccountLiquidated.fromPartial(base ?? {});
|
|
4988
|
+
},
|
|
4989
|
+
fromPartial(object) {
|
|
4990
|
+
const message = createBaseReceipt_AccountLiquidated();
|
|
4991
|
+
message.liquidatorAccountId = object.liquidatorAccountId ?? 0;
|
|
4992
|
+
message.liquidateeAccountId = object.liquidateeAccountId ?? 0;
|
|
4993
|
+
message.cancelledOrders = object.cancelledOrders?.map((e) => e) || [];
|
|
4994
|
+
message.removedPerps = object.removedPerps?.map((e) => exports.Receipt_PerpPosition.fromPartial(e)) || [];
|
|
4458
4995
|
return message;
|
|
4459
4996
|
},
|
|
4460
4997
|
};
|
|
@@ -4570,15 +5107,22 @@ exports.Receipt_Unpaused = {
|
|
|
4570
5107
|
},
|
|
4571
5108
|
};
|
|
4572
5109
|
function createBaseReceipt_Transferred() {
|
|
4573
|
-
return {
|
|
5110
|
+
return {
|
|
5111
|
+
fromAccountId: 0,
|
|
5112
|
+
toUserAccount: undefined,
|
|
5113
|
+
tokenId: 0,
|
|
5114
|
+
amount: 0n,
|
|
5115
|
+
accountCreated: false,
|
|
5116
|
+
toSpecialAccount: undefined,
|
|
5117
|
+
};
|
|
4574
5118
|
}
|
|
4575
5119
|
exports.Receipt_Transferred = {
|
|
4576
5120
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
4577
5121
|
if (message.fromAccountId !== 0) {
|
|
4578
5122
|
writer.uint32(8).uint32(message.fromAccountId);
|
|
4579
5123
|
}
|
|
4580
|
-
if (message.
|
|
4581
|
-
writer.uint32(16).uint32(message.
|
|
5124
|
+
if (message.toUserAccount !== undefined) {
|
|
5125
|
+
writer.uint32(16).uint32(message.toUserAccount);
|
|
4582
5126
|
}
|
|
4583
5127
|
if (message.tokenId !== 0) {
|
|
4584
5128
|
writer.uint32(24).uint32(message.tokenId);
|
|
@@ -4592,6 +5136,9 @@ exports.Receipt_Transferred = {
|
|
|
4592
5136
|
if (message.accountCreated !== false) {
|
|
4593
5137
|
writer.uint32(40).bool(message.accountCreated);
|
|
4594
5138
|
}
|
|
5139
|
+
if (message.toSpecialAccount !== undefined) {
|
|
5140
|
+
writer.uint32(48).int32(message.toSpecialAccount);
|
|
5141
|
+
}
|
|
4595
5142
|
return writer;
|
|
4596
5143
|
},
|
|
4597
5144
|
decode(input, length) {
|
|
@@ -4601,36 +5148,48 @@ exports.Receipt_Transferred = {
|
|
|
4601
5148
|
while (reader.pos < end) {
|
|
4602
5149
|
const tag = reader.uint32();
|
|
4603
5150
|
switch (tag >>> 3) {
|
|
4604
|
-
case 1:
|
|
5151
|
+
case 1: {
|
|
4605
5152
|
if (tag !== 8) {
|
|
4606
5153
|
break;
|
|
4607
5154
|
}
|
|
4608
5155
|
message.fromAccountId = reader.uint32();
|
|
4609
5156
|
continue;
|
|
4610
|
-
|
|
5157
|
+
}
|
|
5158
|
+
case 2: {
|
|
4611
5159
|
if (tag !== 16) {
|
|
4612
5160
|
break;
|
|
4613
5161
|
}
|
|
4614
|
-
message.
|
|
5162
|
+
message.toUserAccount = reader.uint32();
|
|
4615
5163
|
continue;
|
|
4616
|
-
|
|
5164
|
+
}
|
|
5165
|
+
case 3: {
|
|
4617
5166
|
if (tag !== 24) {
|
|
4618
5167
|
break;
|
|
4619
5168
|
}
|
|
4620
5169
|
message.tokenId = reader.uint32();
|
|
4621
5170
|
continue;
|
|
4622
|
-
|
|
5171
|
+
}
|
|
5172
|
+
case 4: {
|
|
4623
5173
|
if (tag !== 32) {
|
|
4624
5174
|
break;
|
|
4625
5175
|
}
|
|
4626
5176
|
message.amount = reader.uint64();
|
|
4627
5177
|
continue;
|
|
4628
|
-
|
|
5178
|
+
}
|
|
5179
|
+
case 5: {
|
|
4629
5180
|
if (tag !== 40) {
|
|
4630
5181
|
break;
|
|
4631
5182
|
}
|
|
4632
5183
|
message.accountCreated = reader.bool();
|
|
4633
5184
|
continue;
|
|
5185
|
+
}
|
|
5186
|
+
case 6: {
|
|
5187
|
+
if (tag !== 48) {
|
|
5188
|
+
break;
|
|
5189
|
+
}
|
|
5190
|
+
message.toSpecialAccount = reader.int32();
|
|
5191
|
+
continue;
|
|
5192
|
+
}
|
|
4634
5193
|
}
|
|
4635
5194
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4636
5195
|
break;
|
|
@@ -4642,10 +5201,11 @@ exports.Receipt_Transferred = {
|
|
|
4642
5201
|
fromJSON(object) {
|
|
4643
5202
|
return {
|
|
4644
5203
|
fromAccountId: isSet(object.fromAccountId) ? globalThis.Number(object.fromAccountId) : 0,
|
|
4645
|
-
|
|
5204
|
+
toUserAccount: isSet(object.toUserAccount) ? globalThis.Number(object.toUserAccount) : undefined,
|
|
4646
5205
|
tokenId: isSet(object.tokenId) ? globalThis.Number(object.tokenId) : 0,
|
|
4647
5206
|
amount: isSet(object.amount) ? BigInt(object.amount) : 0n,
|
|
4648
5207
|
accountCreated: isSet(object.accountCreated) ? globalThis.Boolean(object.accountCreated) : false,
|
|
5208
|
+
toSpecialAccount: isSet(object.toSpecialAccount) ? specialAccountFromJSON(object.toSpecialAccount) : undefined,
|
|
4649
5209
|
};
|
|
4650
5210
|
},
|
|
4651
5211
|
toJSON(message) {
|
|
@@ -4653,8 +5213,8 @@ exports.Receipt_Transferred = {
|
|
|
4653
5213
|
if (message.fromAccountId !== 0) {
|
|
4654
5214
|
obj.fromAccountId = Math.round(message.fromAccountId);
|
|
4655
5215
|
}
|
|
4656
|
-
if (message.
|
|
4657
|
-
obj.
|
|
5216
|
+
if (message.toUserAccount !== undefined) {
|
|
5217
|
+
obj.toUserAccount = Math.round(message.toUserAccount);
|
|
4658
5218
|
}
|
|
4659
5219
|
if (message.tokenId !== 0) {
|
|
4660
5220
|
obj.tokenId = Math.round(message.tokenId);
|
|
@@ -4665,6 +5225,9 @@ exports.Receipt_Transferred = {
|
|
|
4665
5225
|
if (message.accountCreated !== false) {
|
|
4666
5226
|
obj.accountCreated = message.accountCreated;
|
|
4667
5227
|
}
|
|
5228
|
+
if (message.toSpecialAccount !== undefined) {
|
|
5229
|
+
obj.toSpecialAccount = specialAccountToJSON(message.toSpecialAccount);
|
|
5230
|
+
}
|
|
4668
5231
|
return obj;
|
|
4669
5232
|
},
|
|
4670
5233
|
create(base) {
|
|
@@ -4673,10 +5236,11 @@ exports.Receipt_Transferred = {
|
|
|
4673
5236
|
fromPartial(object) {
|
|
4674
5237
|
const message = createBaseReceipt_Transferred();
|
|
4675
5238
|
message.fromAccountId = object.fromAccountId ?? 0;
|
|
4676
|
-
message.
|
|
5239
|
+
message.toUserAccount = object.toUserAccount ?? undefined;
|
|
4677
5240
|
message.tokenId = object.tokenId ?? 0;
|
|
4678
5241
|
message.amount = object.amount ?? 0n;
|
|
4679
5242
|
message.accountCreated = object.accountCreated ?? false;
|
|
5243
|
+
message.toSpecialAccount = object.toSpecialAccount ?? undefined;
|
|
4680
5244
|
return message;
|
|
4681
5245
|
},
|
|
4682
5246
|
};
|