@n1xyz/nord-ts 0.0.18-8121ed05.0 → 0.0.18
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/.local/qa.ts +77 -0
- package/.local/test-atomic.ts +112 -0
- package/check.sh +4 -0
- package/default.nix +47 -0
- package/dist/api/client.d.ts +14 -0
- package/dist/api/client.js +45 -0
- package/dist/gen/nord.d.ts +52 -23
- package/dist/gen/nord.js +322 -170
- package/dist/gen/openapi.d.ts +2244 -0
- package/dist/gen/openapi.js +6 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -9
- package/dist/nord/api/actions.d.ts +30 -1
- package/dist/nord/api/actions.js +60 -3
- package/dist/nord/api/core.d.ts +1 -34
- package/dist/nord/api/core.js +0 -71
- package/dist/nord/client/Nord.d.ts +31 -33
- package/dist/nord/client/Nord.js +100 -60
- package/dist/nord/client/NordUser.d.ts +64 -11
- package/dist/nord/client/NordUser.js +90 -33
- package/dist/nord/index.d.ts +0 -2
- package/dist/nord/index.js +0 -2
- package/dist/nord/models/Subscriber.d.ts +2 -2
- package/dist/types.d.ts +43 -190
- package/dist/utils.d.ts +1 -19
- package/dist/utils.js +5 -39
- package/dist/websocket/NordWebSocketClient.js +18 -13
- package/dist/websocket/index.d.ts +1 -1
- package/package.json +20 -27
- package/src/index.ts +0 -16
- package/src/nord/api/actions.ts +131 -9
- package/src/nord/api/core.ts +0 -71
- package/src/nord/client/Nord.ts +142 -76
- package/src/nord/client/NordUser.ts +171 -50
- package/src/nord/index.ts +0 -2
- package/src/nord/models/Subscriber.ts +2 -2
- package/src/types.ts +55 -216
- package/src/utils.ts +6 -42
- package/src/websocket/NordWebSocketClient.ts +23 -15
- package/src/websocket/index.ts +1 -1
- package/tests/utils.spec.ts +1 -34
- package/dist/idl/bridge.json +0 -1506
- package/jest.config.ts +0 -9
- package/nodemon.json +0 -4
- package/protoc-generate.sh +0 -23
- package/src/idl/bridge.json +0 -1506
- package/src/nord/api/market.ts +0 -122
- package/src/nord/api/queries.ts +0 -135
package/dist/gen/nord.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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.7.
|
|
5
|
-
// protoc
|
|
4
|
+
// protoc-gen-ts_proto v2.7.5
|
|
5
|
+
// protoc v6.30.2
|
|
6
6
|
// source: nord.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Receipt_OracleUpdateResult = exports.Receipt_OracleSymbolFeedResult = exports.Receipt_WithdrawResult = exports.Receipt_InsertMarketResult = exports.Receipt_InsertTokenResult = exports.Receipt_DepositResult = exports.Receipt_CancelOrderResult = exports.Receipt_PositionTakenOrTradedResult = exports.Receipt_TakenResult = exports.Receipt_PlaceOrderResult = exports.Receipt_CreateSessionResult = exports.Receipt_Trade = exports.Receipt_Posted = exports.Receipt = exports.
|
|
9
|
-
exports.Receipt_TriggerRemoved = exports.Receipt_TriggerAdded = exports.Receipt_Transferred = exports.Receipt_Unpaused = exports.Receipt_Paused = exports.Receipt_SessionRevoked = exports.Receipt_AccountLiquidated = exports.Receipt_PerpPosition =
|
|
8
|
+
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_PositionTakenOrTradedResult = exports.Receipt_TakenResult = exports.Receipt_PlaceOrderResult = exports.Receipt_CreateSessionResult = exports.Receipt_Trade = exports.Receipt_Posted = exports.Receipt = exports.Atomic = exports.AtomicSubactionKind = exports.Action_TakePosition = 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.CancelOrder = exports.TradeOrPlace = exports.OrderType = exports.OrderLimit = exports.QuoteSize = exports.Token = exports.Market = exports.SpecialAccount = exports.Error = exports.MarketType = exports.FillMode = exports.TriggerKind = exports.Side = exports.protobufPackage = void 0;
|
|
9
|
+
exports.Receipt_AtomicResult = exports.Receipt_AtomicSubactionResultKind = exports.Receipt_TriggerRemoved = exports.Receipt_TriggerAdded = exports.Receipt_Transferred = exports.Receipt_Unpaused = exports.Receipt_Paused = exports.Receipt_SessionRevoked = exports.Receipt_AccountLiquidated = exports.Receipt_PerpPosition = void 0;
|
|
10
10
|
exports.sideFromJSON = sideFromJSON;
|
|
11
11
|
exports.sideToJSON = sideToJSON;
|
|
12
12
|
exports.triggerKindFromJSON = triggerKindFromJSON;
|
|
@@ -298,6 +298,7 @@ var Error;
|
|
|
298
298
|
Error[Error["POSITION_STATE_ORDER_PRICE"] = 203] = "POSITION_STATE_ORDER_PRICE";
|
|
299
299
|
Error[Error["POSITION_STATE_ORDER_SIZE"] = 204] = "POSITION_STATE_ORDER_SIZE";
|
|
300
300
|
Error[Error["POSITION_STATE_ORDER_SIDE"] = 205] = "POSITION_STATE_ORDER_SIDE";
|
|
301
|
+
/** POSITION_SIZE_LIMIT - 1100_1110 */
|
|
301
302
|
Error[Error["POSITION_SIZE_LIMIT"] = 206] = "POSITION_SIZE_LIMIT";
|
|
302
303
|
Error[Error["PRICE"] = 209] = "PRICE";
|
|
303
304
|
Error[Error["SIGNATURE_VERIFICATION"] = 217] = "SIGNATURE_VERIFICATION";
|
|
@@ -311,11 +312,22 @@ var Error;
|
|
|
311
312
|
Error[Error["ORDER_EXECUTION_MISSING_LIMITS"] = 243] = "ORDER_EXECUTION_MISSING_LIMITS";
|
|
312
313
|
Error[Error["ORDER_EXECUTION_MISSING_PRICE"] = 244] = "ORDER_EXECUTION_MISSING_PRICE";
|
|
313
314
|
Error[Error["ORDER_EXECUTION_SIZE_LIMIT"] = 245] = "ORDER_EXECUTION_SIZE_LIMIT";
|
|
315
|
+
/** ORDER_EXECUTION_LIMIT_PRICE - 111_0110 */
|
|
314
316
|
Error[Error["ORDER_EXECUTION_LIMIT_PRICE"] = 246] = "ORDER_EXECUTION_LIMIT_PRICE";
|
|
315
|
-
/**
|
|
317
|
+
/**
|
|
318
|
+
* ORDER_REDUCE_IS_POST_ONLY - Reduce orders can only be post only.
|
|
319
|
+
* 01111_0111 = 247
|
|
320
|
+
*/
|
|
316
321
|
Error[Error["ORDER_REDUCE_IS_POST_ONLY"] = 247] = "ORDER_REDUCE_IS_POST_ONLY";
|
|
317
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* ORDER_EXECUTION_SELL_PRICE - Order was rejected, because it planned under proposed price
|
|
324
|
+
* 01111_1000 = 248
|
|
325
|
+
*/
|
|
318
326
|
Error[Error["ORDER_EXECUTION_SELL_PRICE"] = 248] = "ORDER_EXECUTION_SELL_PRICE";
|
|
327
|
+
/** ATOMICS_TRADES_CANNOT_FOLLOW_PLACES - 10000_0000 */
|
|
328
|
+
Error[Error["ATOMICS_TRADES_CANNOT_FOLLOW_PLACES"] = 256] = "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES";
|
|
329
|
+
/** ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES - 10000_0001 */
|
|
330
|
+
Error[Error["ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES"] = 257] = "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES";
|
|
319
331
|
Error[Error["NOT_IMPLEMENTED"] = 500] = "NOT_IMPLEMENTED";
|
|
320
332
|
Error[Error["Dropped"] = 999] = "Dropped";
|
|
321
333
|
})(Error || (exports.Error = Error = {}));
|
|
@@ -597,6 +609,12 @@ function errorFromJSON(object) {
|
|
|
597
609
|
case 248:
|
|
598
610
|
case "ORDER_EXECUTION_SELL_PRICE":
|
|
599
611
|
return Error.ORDER_EXECUTION_SELL_PRICE;
|
|
612
|
+
case 256:
|
|
613
|
+
case "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES":
|
|
614
|
+
return Error.ATOMICS_TRADES_CANNOT_FOLLOW_PLACES;
|
|
615
|
+
case 257:
|
|
616
|
+
case "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES":
|
|
617
|
+
return Error.ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES;
|
|
600
618
|
case 500:
|
|
601
619
|
case "NOT_IMPLEMENTED":
|
|
602
620
|
return Error.NOT_IMPLEMENTED;
|
|
@@ -793,6 +811,10 @@ function errorToJSON(object) {
|
|
|
793
811
|
return "ORDER_REDUCE_IS_POST_ONLY";
|
|
794
812
|
case Error.ORDER_EXECUTION_SELL_PRICE:
|
|
795
813
|
return "ORDER_EXECUTION_SELL_PRICE";
|
|
814
|
+
case Error.ATOMICS_TRADES_CANNOT_FOLLOW_PLACES:
|
|
815
|
+
return "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES";
|
|
816
|
+
case Error.ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES:
|
|
817
|
+
return "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES";
|
|
796
818
|
case Error.NOT_IMPLEMENTED:
|
|
797
819
|
return "NOT_IMPLEMENTED";
|
|
798
820
|
case Error.Dropped:
|
|
@@ -822,77 +844,6 @@ function specialAccountToJSON(object) {
|
|
|
822
844
|
throw new globalThis.Error("Unrecognized enum value " + object + " for enum SpecialAccount");
|
|
823
845
|
}
|
|
824
846
|
}
|
|
825
|
-
function createBaseU128() {
|
|
826
|
-
return { lo: 0n, hi: 0n };
|
|
827
|
-
}
|
|
828
|
-
exports.U128 = {
|
|
829
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
830
|
-
if (message.lo !== 0n) {
|
|
831
|
-
if (BigInt.asUintN(64, message.lo) !== message.lo) {
|
|
832
|
-
throw new globalThis.Error("value provided for field message.lo of type uint64 too large");
|
|
833
|
-
}
|
|
834
|
-
writer.uint32(8).uint64(message.lo);
|
|
835
|
-
}
|
|
836
|
-
if (message.hi !== 0n) {
|
|
837
|
-
if (BigInt.asUintN(64, message.hi) !== message.hi) {
|
|
838
|
-
throw new globalThis.Error("value provided for field message.hi of type uint64 too large");
|
|
839
|
-
}
|
|
840
|
-
writer.uint32(16).uint64(message.hi);
|
|
841
|
-
}
|
|
842
|
-
return writer;
|
|
843
|
-
},
|
|
844
|
-
decode(input, length) {
|
|
845
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
846
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
847
|
-
const message = createBaseU128();
|
|
848
|
-
while (reader.pos < end) {
|
|
849
|
-
const tag = reader.uint32();
|
|
850
|
-
switch (tag >>> 3) {
|
|
851
|
-
case 1: {
|
|
852
|
-
if (tag !== 8) {
|
|
853
|
-
break;
|
|
854
|
-
}
|
|
855
|
-
message.lo = reader.uint64();
|
|
856
|
-
continue;
|
|
857
|
-
}
|
|
858
|
-
case 2: {
|
|
859
|
-
if (tag !== 16) {
|
|
860
|
-
break;
|
|
861
|
-
}
|
|
862
|
-
message.hi = reader.uint64();
|
|
863
|
-
continue;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
867
|
-
break;
|
|
868
|
-
}
|
|
869
|
-
reader.skip(tag & 7);
|
|
870
|
-
}
|
|
871
|
-
return message;
|
|
872
|
-
},
|
|
873
|
-
fromJSON(object) {
|
|
874
|
-
return { lo: isSet(object.lo) ? BigInt(object.lo) : 0n, hi: isSet(object.hi) ? BigInt(object.hi) : 0n };
|
|
875
|
-
},
|
|
876
|
-
toJSON(message) {
|
|
877
|
-
const obj = {};
|
|
878
|
-
if (message.lo !== 0n) {
|
|
879
|
-
obj.lo = message.lo.toString();
|
|
880
|
-
}
|
|
881
|
-
if (message.hi !== 0n) {
|
|
882
|
-
obj.hi = message.hi.toString();
|
|
883
|
-
}
|
|
884
|
-
return obj;
|
|
885
|
-
},
|
|
886
|
-
create(base) {
|
|
887
|
-
return exports.U128.fromPartial(base ?? {});
|
|
888
|
-
},
|
|
889
|
-
fromPartial(object) {
|
|
890
|
-
const message = createBaseU128();
|
|
891
|
-
message.lo = object.lo ?? 0n;
|
|
892
|
-
message.hi = object.hi ?? 0n;
|
|
893
|
-
return message;
|
|
894
|
-
},
|
|
895
|
-
};
|
|
896
847
|
function createBaseMarket() {
|
|
897
848
|
return {
|
|
898
849
|
marketId: 0,
|
|
@@ -939,7 +890,7 @@ exports.Market = {
|
|
|
939
890
|
},
|
|
940
891
|
decode(input, length) {
|
|
941
892
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
942
|
-
|
|
893
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
943
894
|
const message = createBaseMarket();
|
|
944
895
|
while (reader.pos < end) {
|
|
945
896
|
const tag = reader.uint32();
|
|
@@ -1097,7 +1048,7 @@ exports.Token = {
|
|
|
1097
1048
|
},
|
|
1098
1049
|
decode(input, length) {
|
|
1099
1050
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1100
|
-
|
|
1051
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1101
1052
|
const message = createBaseToken();
|
|
1102
1053
|
while (reader.pos < end) {
|
|
1103
1054
|
const tag = reader.uint32();
|
|
@@ -1195,7 +1146,7 @@ exports.QuoteSize = {
|
|
|
1195
1146
|
},
|
|
1196
1147
|
decode(input, length) {
|
|
1197
1148
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1198
|
-
|
|
1149
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1199
1150
|
const message = createBaseQuoteSize();
|
|
1200
1151
|
while (reader.pos < end) {
|
|
1201
1152
|
const tag = reader.uint32();
|
|
@@ -1272,7 +1223,7 @@ exports.OrderLimit = {
|
|
|
1272
1223
|
},
|
|
1273
1224
|
decode(input, length) {
|
|
1274
1225
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1275
|
-
|
|
1226
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1276
1227
|
const message = createBaseOrderLimit();
|
|
1277
1228
|
while (reader.pos < end) {
|
|
1278
1229
|
const tag = reader.uint32();
|
|
@@ -1357,7 +1308,7 @@ exports.OrderType = {
|
|
|
1357
1308
|
},
|
|
1358
1309
|
decode(input, length) {
|
|
1359
1310
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1360
|
-
|
|
1311
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1361
1312
|
const message = createBaseOrderType();
|
|
1362
1313
|
while (reader.pos < end) {
|
|
1363
1314
|
const tag = reader.uint32();
|
|
@@ -1446,7 +1397,7 @@ exports.TradeOrPlace = {
|
|
|
1446
1397
|
},
|
|
1447
1398
|
decode(input, length) {
|
|
1448
1399
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1449
|
-
|
|
1400
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1450
1401
|
const message = createBaseTradeOrPlace();
|
|
1451
1402
|
while (reader.pos < end) {
|
|
1452
1403
|
const tag = reader.uint32();
|
|
@@ -1542,7 +1493,7 @@ exports.CancelOrder = {
|
|
|
1542
1493
|
},
|
|
1543
1494
|
decode(input, length) {
|
|
1544
1495
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1545
|
-
|
|
1496
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1546
1497
|
const message = createBaseCancelOrder();
|
|
1547
1498
|
while (reader.pos < end) {
|
|
1548
1499
|
const tag = reader.uint32();
|
|
@@ -1650,15 +1601,15 @@ exports.Action = {
|
|
|
1650
1601
|
case "takePosition":
|
|
1651
1602
|
exports.Action_TakePosition.encode(message.kind.value, writer.uint32(274).fork()).join();
|
|
1652
1603
|
break;
|
|
1653
|
-
case "
|
|
1654
|
-
exports.
|
|
1604
|
+
case "atomic":
|
|
1605
|
+
exports.Atomic.encode(message.kind.value, writer.uint32(282).fork()).join();
|
|
1655
1606
|
break;
|
|
1656
1607
|
}
|
|
1657
1608
|
return writer;
|
|
1658
1609
|
},
|
|
1659
1610
|
decode(input, length) {
|
|
1660
1611
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1661
|
-
|
|
1612
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1662
1613
|
const message = createBaseAction();
|
|
1663
1614
|
while (reader.pos < end) {
|
|
1664
1615
|
const tag = reader.uint32();
|
|
@@ -1816,7 +1767,7 @@ exports.Action = {
|
|
|
1816
1767
|
if (tag !== 282) {
|
|
1817
1768
|
break;
|
|
1818
1769
|
}
|
|
1819
|
-
message.kind = { $case: "
|
|
1770
|
+
message.kind = { $case: "atomic", value: exports.Atomic.decode(reader, reader.uint32()) };
|
|
1820
1771
|
continue;
|
|
1821
1772
|
}
|
|
1822
1773
|
}
|
|
@@ -1870,8 +1821,8 @@ exports.Action = {
|
|
|
1870
1821
|
? { $case: "removeTrigger", value: exports.Action_RemoveTrigger.fromJSON(object.removeTrigger) }
|
|
1871
1822
|
: isSet(object.takePosition)
|
|
1872
1823
|
? { $case: "takePosition", value: exports.Action_TakePosition.fromJSON(object.takePosition) }
|
|
1873
|
-
: isSet(object.
|
|
1874
|
-
? { $case: "
|
|
1824
|
+
: isSet(object.atomic)
|
|
1825
|
+
? { $case: "atomic", value: exports.Atomic.fromJSON(object.atomic) }
|
|
1875
1826
|
: undefined,
|
|
1876
1827
|
};
|
|
1877
1828
|
},
|
|
@@ -1937,8 +1888,8 @@ exports.Action = {
|
|
|
1937
1888
|
else if (message.kind?.$case === "takePosition") {
|
|
1938
1889
|
obj.takePosition = exports.Action_TakePosition.toJSON(message.kind.value);
|
|
1939
1890
|
}
|
|
1940
|
-
else if (message.kind?.$case === "
|
|
1941
|
-
obj.
|
|
1891
|
+
else if (message.kind?.$case === "atomic") {
|
|
1892
|
+
obj.atomic = exports.Atomic.toJSON(message.kind.value);
|
|
1942
1893
|
}
|
|
1943
1894
|
return obj;
|
|
1944
1895
|
},
|
|
@@ -2064,9 +2015,9 @@ exports.Action = {
|
|
|
2064
2015
|
}
|
|
2065
2016
|
break;
|
|
2066
2017
|
}
|
|
2067
|
-
case "
|
|
2018
|
+
case "atomic": {
|
|
2068
2019
|
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
2069
|
-
message.kind = { $case: "
|
|
2020
|
+
message.kind = { $case: "atomic", value: exports.Atomic.fromPartial(object.kind.value) };
|
|
2070
2021
|
}
|
|
2071
2022
|
break;
|
|
2072
2023
|
}
|
|
@@ -2095,7 +2046,7 @@ exports.Action_CreateSession = {
|
|
|
2095
2046
|
},
|
|
2096
2047
|
decode(input, length) {
|
|
2097
2048
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2098
|
-
|
|
2049
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2099
2050
|
const message = createBaseAction_CreateSession();
|
|
2100
2051
|
while (reader.pos < end) {
|
|
2101
2052
|
const tag = reader.uint32();
|
|
@@ -2184,7 +2135,7 @@ exports.Action_CreateToken = {
|
|
|
2184
2135
|
},
|
|
2185
2136
|
decode(input, length) {
|
|
2186
2137
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2187
|
-
|
|
2138
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2188
2139
|
const message = createBaseAction_CreateToken();
|
|
2189
2140
|
while (reader.pos < end) {
|
|
2190
2141
|
const tag = reader.uint32();
|
|
@@ -2319,7 +2270,7 @@ exports.Action_CreateMarket = {
|
|
|
2319
2270
|
},
|
|
2320
2271
|
decode(input, length) {
|
|
2321
2272
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2322
|
-
|
|
2273
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2323
2274
|
const message = createBaseAction_CreateMarket();
|
|
2324
2275
|
while (reader.pos < end) {
|
|
2325
2276
|
const tag = reader.uint32();
|
|
@@ -2469,6 +2420,7 @@ function createBaseAction_PlaceOrder() {
|
|
|
2469
2420
|
delegatorAccountId: undefined,
|
|
2470
2421
|
clientOrderId: undefined,
|
|
2471
2422
|
senderAccountId: undefined,
|
|
2423
|
+
senderTrackingId: undefined,
|
|
2472
2424
|
};
|
|
2473
2425
|
}
|
|
2474
2426
|
exports.Action_PlaceOrder = {
|
|
@@ -2504,7 +2456,7 @@ exports.Action_PlaceOrder = {
|
|
|
2504
2456
|
writer.uint32(56).uint64(message.size);
|
|
2505
2457
|
}
|
|
2506
2458
|
if (message.quoteSize !== undefined) {
|
|
2507
|
-
exports.
|
|
2459
|
+
exports.QuoteSize.encode(message.quoteSize, writer.uint32(66).fork()).join();
|
|
2508
2460
|
}
|
|
2509
2461
|
if (message.delegatorAccountId !== undefined) {
|
|
2510
2462
|
writer.uint32(256).uint32(message.delegatorAccountId);
|
|
@@ -2518,11 +2470,17 @@ exports.Action_PlaceOrder = {
|
|
|
2518
2470
|
if (message.senderAccountId !== undefined) {
|
|
2519
2471
|
writer.uint32(272).uint32(message.senderAccountId);
|
|
2520
2472
|
}
|
|
2473
|
+
if (message.senderTrackingId !== undefined) {
|
|
2474
|
+
if (BigInt.asUintN(64, message.senderTrackingId) !== message.senderTrackingId) {
|
|
2475
|
+
throw new globalThis.Error("value provided for field message.senderTrackingId of type uint64 too large");
|
|
2476
|
+
}
|
|
2477
|
+
writer.uint32(280).uint64(message.senderTrackingId);
|
|
2478
|
+
}
|
|
2521
2479
|
return writer;
|
|
2522
2480
|
},
|
|
2523
2481
|
decode(input, length) {
|
|
2524
2482
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2525
|
-
|
|
2483
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2526
2484
|
const message = createBaseAction_PlaceOrder();
|
|
2527
2485
|
while (reader.pos < end) {
|
|
2528
2486
|
const tag = reader.uint32();
|
|
@@ -2580,7 +2538,7 @@ exports.Action_PlaceOrder = {
|
|
|
2580
2538
|
if (tag !== 66) {
|
|
2581
2539
|
break;
|
|
2582
2540
|
}
|
|
2583
|
-
message.quoteSize = exports.
|
|
2541
|
+
message.quoteSize = exports.QuoteSize.decode(reader, reader.uint32());
|
|
2584
2542
|
continue;
|
|
2585
2543
|
}
|
|
2586
2544
|
case 32: {
|
|
@@ -2604,6 +2562,13 @@ exports.Action_PlaceOrder = {
|
|
|
2604
2562
|
message.senderAccountId = reader.uint32();
|
|
2605
2563
|
continue;
|
|
2606
2564
|
}
|
|
2565
|
+
case 35: {
|
|
2566
|
+
if (tag !== 280) {
|
|
2567
|
+
break;
|
|
2568
|
+
}
|
|
2569
|
+
message.senderTrackingId = reader.uint64();
|
|
2570
|
+
continue;
|
|
2571
|
+
}
|
|
2607
2572
|
}
|
|
2608
2573
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2609
2574
|
break;
|
|
@@ -2621,10 +2586,11 @@ exports.Action_PlaceOrder = {
|
|
|
2621
2586
|
isReduceOnly: isSet(object.isReduceOnly) ? globalThis.Boolean(object.isReduceOnly) : false,
|
|
2622
2587
|
price: isSet(object.price) ? BigInt(object.price) : 0n,
|
|
2623
2588
|
size: isSet(object.size) ? BigInt(object.size) : 0n,
|
|
2624
|
-
quoteSize: isSet(object.quoteSize) ? exports.
|
|
2589
|
+
quoteSize: isSet(object.quoteSize) ? exports.QuoteSize.fromJSON(object.quoteSize) : undefined,
|
|
2625
2590
|
delegatorAccountId: isSet(object.delegatorAccountId) ? globalThis.Number(object.delegatorAccountId) : undefined,
|
|
2626
2591
|
clientOrderId: isSet(object.clientOrderId) ? BigInt(object.clientOrderId) : undefined,
|
|
2627
2592
|
senderAccountId: isSet(object.senderAccountId) ? globalThis.Number(object.senderAccountId) : undefined,
|
|
2593
|
+
senderTrackingId: isSet(object.senderTrackingId) ? BigInt(object.senderTrackingId) : undefined,
|
|
2628
2594
|
};
|
|
2629
2595
|
},
|
|
2630
2596
|
toJSON(message) {
|
|
@@ -2651,7 +2617,7 @@ exports.Action_PlaceOrder = {
|
|
|
2651
2617
|
obj.size = message.size.toString();
|
|
2652
2618
|
}
|
|
2653
2619
|
if (message.quoteSize !== undefined) {
|
|
2654
|
-
obj.quoteSize = exports.
|
|
2620
|
+
obj.quoteSize = exports.QuoteSize.toJSON(message.quoteSize);
|
|
2655
2621
|
}
|
|
2656
2622
|
if (message.delegatorAccountId !== undefined) {
|
|
2657
2623
|
obj.delegatorAccountId = Math.round(message.delegatorAccountId);
|
|
@@ -2662,6 +2628,9 @@ exports.Action_PlaceOrder = {
|
|
|
2662
2628
|
if (message.senderAccountId !== undefined) {
|
|
2663
2629
|
obj.senderAccountId = Math.round(message.senderAccountId);
|
|
2664
2630
|
}
|
|
2631
|
+
if (message.senderTrackingId !== undefined) {
|
|
2632
|
+
obj.senderTrackingId = message.senderTrackingId.toString();
|
|
2633
|
+
}
|
|
2665
2634
|
return obj;
|
|
2666
2635
|
},
|
|
2667
2636
|
create(base) {
|
|
@@ -2677,11 +2646,12 @@ exports.Action_PlaceOrder = {
|
|
|
2677
2646
|
message.price = object.price ?? 0n;
|
|
2678
2647
|
message.size = object.size ?? 0n;
|
|
2679
2648
|
message.quoteSize = (object.quoteSize !== undefined && object.quoteSize !== null)
|
|
2680
|
-
? exports.
|
|
2649
|
+
? exports.QuoteSize.fromPartial(object.quoteSize)
|
|
2681
2650
|
: undefined;
|
|
2682
2651
|
message.delegatorAccountId = object.delegatorAccountId ?? undefined;
|
|
2683
2652
|
message.clientOrderId = object.clientOrderId ?? undefined;
|
|
2684
2653
|
message.senderAccountId = object.senderAccountId ?? undefined;
|
|
2654
|
+
message.senderTrackingId = object.senderTrackingId ?? undefined;
|
|
2685
2655
|
return message;
|
|
2686
2656
|
},
|
|
2687
2657
|
};
|
|
@@ -2712,7 +2682,7 @@ exports.Action_CancelOrderById = {
|
|
|
2712
2682
|
},
|
|
2713
2683
|
decode(input, length) {
|
|
2714
2684
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2715
|
-
|
|
2685
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2716
2686
|
const message = createBaseAction_CancelOrderById();
|
|
2717
2687
|
while (reader.pos < end) {
|
|
2718
2688
|
const tag = reader.uint32();
|
|
@@ -2816,7 +2786,7 @@ exports.Action_Deposit = {
|
|
|
2816
2786
|
},
|
|
2817
2787
|
decode(input, length) {
|
|
2818
2788
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2819
|
-
|
|
2789
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2820
2790
|
const message = createBaseAction_Deposit();
|
|
2821
2791
|
while (reader.pos < end) {
|
|
2822
2792
|
const tag = reader.uint32();
|
|
@@ -2917,7 +2887,7 @@ exports.Action_Withdraw = {
|
|
|
2917
2887
|
},
|
|
2918
2888
|
decode(input, length) {
|
|
2919
2889
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2920
|
-
|
|
2890
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2921
2891
|
const message = createBaseAction_Withdraw();
|
|
2922
2892
|
while (reader.pos < end) {
|
|
2923
2893
|
const tag = reader.uint32();
|
|
@@ -2997,7 +2967,7 @@ exports.Action_PythSetWormholeGuardians = {
|
|
|
2997
2967
|
},
|
|
2998
2968
|
decode(input, length) {
|
|
2999
2969
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3000
|
-
|
|
2970
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3001
2971
|
const message = createBaseAction_PythSetWormholeGuardians();
|
|
3002
2972
|
while (reader.pos < end) {
|
|
3003
2973
|
const tag = reader.uint32();
|
|
@@ -3067,7 +3037,7 @@ exports.Action_PythSetSymbolFeed = {
|
|
|
3067
3037
|
},
|
|
3068
3038
|
decode(input, length) {
|
|
3069
3039
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3070
|
-
|
|
3040
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3071
3041
|
const message = createBaseAction_PythSetSymbolFeed();
|
|
3072
3042
|
while (reader.pos < end) {
|
|
3073
3043
|
const tag = reader.uint32();
|
|
@@ -3132,7 +3102,7 @@ exports.Action_PythPriceFeedUpdate = {
|
|
|
3132
3102
|
},
|
|
3133
3103
|
decode(input, length) {
|
|
3134
3104
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3135
|
-
|
|
3105
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3136
3106
|
const message = createBaseAction_PythPriceFeedUpdate();
|
|
3137
3107
|
while (reader.pos < end) {
|
|
3138
3108
|
const tag = reader.uint32();
|
|
@@ -3194,7 +3164,7 @@ exports.Action_Liquidate = {
|
|
|
3194
3164
|
},
|
|
3195
3165
|
decode(input, length) {
|
|
3196
3166
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3197
|
-
|
|
3167
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3198
3168
|
const message = createBaseAction_Liquidate();
|
|
3199
3169
|
while (reader.pos < end) {
|
|
3200
3170
|
const tag = reader.uint32();
|
|
@@ -3276,7 +3246,7 @@ exports.Action_RevokeSession = {
|
|
|
3276
3246
|
},
|
|
3277
3247
|
decode(input, length) {
|
|
3278
3248
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3279
|
-
|
|
3249
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3280
3250
|
const message = createBaseAction_RevokeSession();
|
|
3281
3251
|
while (reader.pos < end) {
|
|
3282
3252
|
const tag = reader.uint32();
|
|
@@ -3324,7 +3294,7 @@ exports.Action_Pause = {
|
|
|
3324
3294
|
},
|
|
3325
3295
|
decode(input, length) {
|
|
3326
3296
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3327
|
-
|
|
3297
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3328
3298
|
const message = createBaseAction_Pause();
|
|
3329
3299
|
while (reader.pos < end) {
|
|
3330
3300
|
const tag = reader.uint32();
|
|
@@ -3361,7 +3331,7 @@ exports.Action_Unpause = {
|
|
|
3361
3331
|
},
|
|
3362
3332
|
decode(input, length) {
|
|
3363
3333
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3364
|
-
|
|
3334
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3365
3335
|
const message = createBaseAction_Unpause();
|
|
3366
3336
|
while (reader.pos < end) {
|
|
3367
3337
|
const tag = reader.uint32();
|
|
@@ -3422,7 +3392,7 @@ exports.Action_Transfer = {
|
|
|
3422
3392
|
},
|
|
3423
3393
|
decode(input, length) {
|
|
3424
3394
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3425
|
-
|
|
3395
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3426
3396
|
const message = createBaseAction_Transfer();
|
|
3427
3397
|
while (reader.pos < end) {
|
|
3428
3398
|
const tag = reader.uint32();
|
|
@@ -3556,7 +3526,7 @@ exports.Action_AddTrigger = {
|
|
|
3556
3526
|
},
|
|
3557
3527
|
decode(input, length) {
|
|
3558
3528
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3559
|
-
|
|
3529
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3560
3530
|
const message = createBaseAction_AddTrigger();
|
|
3561
3531
|
while (reader.pos < end) {
|
|
3562
3532
|
const tag = reader.uint32();
|
|
@@ -3684,7 +3654,7 @@ exports.Action_RemoveTrigger = {
|
|
|
3684
3654
|
},
|
|
3685
3655
|
decode(input, length) {
|
|
3686
3656
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3687
|
-
|
|
3657
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3688
3658
|
const message = createBaseAction_RemoveTrigger();
|
|
3689
3659
|
while (reader.pos < end) {
|
|
3690
3660
|
const tag = reader.uint32();
|
|
@@ -3806,7 +3776,7 @@ exports.Action_TakePosition = {
|
|
|
3806
3776
|
},
|
|
3807
3777
|
decode(input, length) {
|
|
3808
3778
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3809
|
-
|
|
3779
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3810
3780
|
const message = createBaseAction_TakePosition();
|
|
3811
3781
|
while (reader.pos < end) {
|
|
3812
3782
|
const tag = reader.uint32();
|
|
@@ -3895,10 +3865,10 @@ exports.Action_TakePosition = {
|
|
|
3895
3865
|
return message;
|
|
3896
3866
|
},
|
|
3897
3867
|
};
|
|
3898
|
-
function
|
|
3868
|
+
function createBaseAtomicSubactionKind() {
|
|
3899
3869
|
return { inner: undefined };
|
|
3900
3870
|
}
|
|
3901
|
-
exports.
|
|
3871
|
+
exports.AtomicSubactionKind = {
|
|
3902
3872
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3903
3873
|
switch (message.inner?.$case) {
|
|
3904
3874
|
case "tradeOrPlace":
|
|
@@ -3912,8 +3882,8 @@ exports.TransactionKind = {
|
|
|
3912
3882
|
},
|
|
3913
3883
|
decode(input, length) {
|
|
3914
3884
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3915
|
-
|
|
3916
|
-
const message =
|
|
3885
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3886
|
+
const message = createBaseAtomicSubactionKind();
|
|
3917
3887
|
while (reader.pos < end) {
|
|
3918
3888
|
const tag = reader.uint32();
|
|
3919
3889
|
switch (tag >>> 3) {
|
|
@@ -3959,10 +3929,10 @@ exports.TransactionKind = {
|
|
|
3959
3929
|
return obj;
|
|
3960
3930
|
},
|
|
3961
3931
|
create(base) {
|
|
3962
|
-
return exports.
|
|
3932
|
+
return exports.AtomicSubactionKind.fromPartial(base ?? {});
|
|
3963
3933
|
},
|
|
3964
3934
|
fromPartial(object) {
|
|
3965
|
-
const message =
|
|
3935
|
+
const message = createBaseAtomicSubactionKind();
|
|
3966
3936
|
switch (object.inner?.$case) {
|
|
3967
3937
|
case "tradeOrPlace": {
|
|
3968
3938
|
if (object.inner?.value !== undefined && object.inner?.value !== null) {
|
|
@@ -3980,32 +3950,29 @@ exports.TransactionKind = {
|
|
|
3980
3950
|
return message;
|
|
3981
3951
|
},
|
|
3982
3952
|
};
|
|
3983
|
-
function
|
|
3953
|
+
function createBaseAtomic() {
|
|
3984
3954
|
return { sessionId: 0n, accountId: undefined, actions: [] };
|
|
3985
3955
|
}
|
|
3986
|
-
exports.
|
|
3956
|
+
exports.Atomic = {
|
|
3987
3957
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3988
3958
|
if (message.sessionId !== 0n) {
|
|
3989
|
-
if (BigInt.
|
|
3990
|
-
throw new globalThis.Error("value provided for field message.sessionId of type
|
|
3959
|
+
if (BigInt.asUintN(64, message.sessionId) !== message.sessionId) {
|
|
3960
|
+
throw new globalThis.Error("value provided for field message.sessionId of type uint64 too large");
|
|
3991
3961
|
}
|
|
3992
|
-
writer.uint32(8).
|
|
3962
|
+
writer.uint32(8).uint64(message.sessionId);
|
|
3993
3963
|
}
|
|
3994
3964
|
if (message.accountId !== undefined) {
|
|
3995
|
-
|
|
3996
|
-
throw new globalThis.Error("value provided for field message.accountId of type int64 too large");
|
|
3997
|
-
}
|
|
3998
|
-
writer.uint32(16).int64(message.accountId);
|
|
3965
|
+
writer.uint32(16).uint32(message.accountId);
|
|
3999
3966
|
}
|
|
4000
3967
|
for (const v of message.actions) {
|
|
4001
|
-
exports.
|
|
3968
|
+
exports.AtomicSubactionKind.encode(v, writer.uint32(50).fork()).join();
|
|
4002
3969
|
}
|
|
4003
3970
|
return writer;
|
|
4004
3971
|
},
|
|
4005
3972
|
decode(input, length) {
|
|
4006
3973
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4007
|
-
|
|
4008
|
-
const message =
|
|
3974
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3975
|
+
const message = createBaseAtomic();
|
|
4009
3976
|
while (reader.pos < end) {
|
|
4010
3977
|
const tag = reader.uint32();
|
|
4011
3978
|
switch (tag >>> 3) {
|
|
@@ -4013,21 +3980,21 @@ exports.Transaction = {
|
|
|
4013
3980
|
if (tag !== 8) {
|
|
4014
3981
|
break;
|
|
4015
3982
|
}
|
|
4016
|
-
message.sessionId = reader.
|
|
3983
|
+
message.sessionId = reader.uint64();
|
|
4017
3984
|
continue;
|
|
4018
3985
|
}
|
|
4019
3986
|
case 2: {
|
|
4020
3987
|
if (tag !== 16) {
|
|
4021
3988
|
break;
|
|
4022
3989
|
}
|
|
4023
|
-
message.accountId = reader.
|
|
3990
|
+
message.accountId = reader.uint32();
|
|
4024
3991
|
continue;
|
|
4025
3992
|
}
|
|
4026
3993
|
case 6: {
|
|
4027
3994
|
if (tag !== 50) {
|
|
4028
3995
|
break;
|
|
4029
3996
|
}
|
|
4030
|
-
message.actions.push(exports.
|
|
3997
|
+
message.actions.push(exports.AtomicSubactionKind.decode(reader, reader.uint32()));
|
|
4031
3998
|
continue;
|
|
4032
3999
|
}
|
|
4033
4000
|
}
|
|
@@ -4041,9 +4008,9 @@ exports.Transaction = {
|
|
|
4041
4008
|
fromJSON(object) {
|
|
4042
4009
|
return {
|
|
4043
4010
|
sessionId: isSet(object.sessionId) ? BigInt(object.sessionId) : 0n,
|
|
4044
|
-
accountId: isSet(object.accountId) ?
|
|
4011
|
+
accountId: isSet(object.accountId) ? globalThis.Number(object.accountId) : undefined,
|
|
4045
4012
|
actions: globalThis.Array.isArray(object?.actions)
|
|
4046
|
-
? object.actions.map((e) => exports.
|
|
4013
|
+
? object.actions.map((e) => exports.AtomicSubactionKind.fromJSON(e))
|
|
4047
4014
|
: [],
|
|
4048
4015
|
};
|
|
4049
4016
|
},
|
|
@@ -4053,21 +4020,21 @@ exports.Transaction = {
|
|
|
4053
4020
|
obj.sessionId = message.sessionId.toString();
|
|
4054
4021
|
}
|
|
4055
4022
|
if (message.accountId !== undefined) {
|
|
4056
|
-
obj.accountId = message.accountId
|
|
4023
|
+
obj.accountId = Math.round(message.accountId);
|
|
4057
4024
|
}
|
|
4058
4025
|
if (message.actions?.length) {
|
|
4059
|
-
obj.actions = message.actions.map((e) => exports.
|
|
4026
|
+
obj.actions = message.actions.map((e) => exports.AtomicSubactionKind.toJSON(e));
|
|
4060
4027
|
}
|
|
4061
4028
|
return obj;
|
|
4062
4029
|
},
|
|
4063
4030
|
create(base) {
|
|
4064
|
-
return exports.
|
|
4031
|
+
return exports.Atomic.fromPartial(base ?? {});
|
|
4065
4032
|
},
|
|
4066
4033
|
fromPartial(object) {
|
|
4067
|
-
const message =
|
|
4034
|
+
const message = createBaseAtomic();
|
|
4068
4035
|
message.sessionId = object.sessionId ?? 0n;
|
|
4069
4036
|
message.accountId = object.accountId ?? undefined;
|
|
4070
|
-
message.actions = object.actions?.map((e) => exports.
|
|
4037
|
+
message.actions = object.actions?.map((e) => exports.AtomicSubactionKind.fromPartial(e)) || [];
|
|
4071
4038
|
return message;
|
|
4072
4039
|
},
|
|
4073
4040
|
};
|
|
@@ -4140,12 +4107,15 @@ exports.Receipt = {
|
|
|
4140
4107
|
case "positionTakenOrTraded":
|
|
4141
4108
|
exports.Receipt_PositionTakenOrTradedResult.encode(message.kind.value, writer.uint32(530).fork()).join();
|
|
4142
4109
|
break;
|
|
4110
|
+
case "atomic":
|
|
4111
|
+
exports.Receipt_AtomicResult.encode(message.kind.value, writer.uint32(538).fork()).join();
|
|
4112
|
+
break;
|
|
4143
4113
|
}
|
|
4144
4114
|
return writer;
|
|
4145
4115
|
},
|
|
4146
4116
|
decode(input, length) {
|
|
4147
4117
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4148
|
-
|
|
4118
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4149
4119
|
const message = createBaseReceipt();
|
|
4150
4120
|
while (reader.pos < end) {
|
|
4151
4121
|
const tag = reader.uint32();
|
|
@@ -4314,6 +4284,13 @@ exports.Receipt = {
|
|
|
4314
4284
|
};
|
|
4315
4285
|
continue;
|
|
4316
4286
|
}
|
|
4287
|
+
case 67: {
|
|
4288
|
+
if (tag !== 538) {
|
|
4289
|
+
break;
|
|
4290
|
+
}
|
|
4291
|
+
message.kind = { $case: "atomic", value: exports.Receipt_AtomicResult.decode(reader, reader.uint32()) };
|
|
4292
|
+
continue;
|
|
4293
|
+
}
|
|
4317
4294
|
}
|
|
4318
4295
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4319
4296
|
break;
|
|
@@ -4372,7 +4349,9 @@ exports.Receipt = {
|
|
|
4372
4349
|
$case: "positionTakenOrTraded",
|
|
4373
4350
|
value: exports.Receipt_PositionTakenOrTradedResult.fromJSON(object.positionTakenOrTraded),
|
|
4374
4351
|
}
|
|
4375
|
-
:
|
|
4352
|
+
: isSet(object.atomic)
|
|
4353
|
+
? { $case: "atomic", value: exports.Receipt_AtomicResult.fromJSON(object.atomic) }
|
|
4354
|
+
: undefined,
|
|
4376
4355
|
};
|
|
4377
4356
|
},
|
|
4378
4357
|
toJSON(message) {
|
|
@@ -4437,6 +4416,9 @@ exports.Receipt = {
|
|
|
4437
4416
|
else if (message.kind?.$case === "positionTakenOrTraded") {
|
|
4438
4417
|
obj.positionTakenOrTraded = exports.Receipt_PositionTakenOrTradedResult.toJSON(message.kind.value);
|
|
4439
4418
|
}
|
|
4419
|
+
else if (message.kind?.$case === "atomic") {
|
|
4420
|
+
obj.atomic = exports.Receipt_AtomicResult.toJSON(message.kind.value);
|
|
4421
|
+
}
|
|
4440
4422
|
return obj;
|
|
4441
4423
|
},
|
|
4442
4424
|
create(base) {
|
|
@@ -4584,6 +4566,12 @@ exports.Receipt = {
|
|
|
4584
4566
|
}
|
|
4585
4567
|
break;
|
|
4586
4568
|
}
|
|
4569
|
+
case "atomic": {
|
|
4570
|
+
if (object.kind?.value !== undefined && object.kind?.value !== null) {
|
|
4571
|
+
message.kind = { $case: "atomic", value: exports.Receipt_AtomicResult.fromPartial(object.kind.value) };
|
|
4572
|
+
}
|
|
4573
|
+
break;
|
|
4574
|
+
}
|
|
4587
4575
|
}
|
|
4588
4576
|
return message;
|
|
4589
4577
|
},
|
|
@@ -4624,7 +4612,7 @@ exports.Receipt_Posted = {
|
|
|
4624
4612
|
},
|
|
4625
4613
|
decode(input, length) {
|
|
4626
4614
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4627
|
-
|
|
4615
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4628
4616
|
const message = createBaseReceipt_Posted();
|
|
4629
4617
|
while (reader.pos < end) {
|
|
4630
4618
|
const tag = reader.uint32();
|
|
@@ -4755,7 +4743,7 @@ exports.Receipt_Trade = {
|
|
|
4755
4743
|
},
|
|
4756
4744
|
decode(input, length) {
|
|
4757
4745
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4758
|
-
|
|
4746
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4759
4747
|
const message = createBaseReceipt_Trade();
|
|
4760
4748
|
while (reader.pos < end) {
|
|
4761
4749
|
const tag = reader.uint32();
|
|
@@ -4847,7 +4835,7 @@ exports.Receipt_CreateSessionResult = {
|
|
|
4847
4835
|
},
|
|
4848
4836
|
decode(input, length) {
|
|
4849
4837
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4850
|
-
|
|
4838
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4851
4839
|
const message = createBaseReceipt_CreateSessionResult();
|
|
4852
4840
|
while (reader.pos < end) {
|
|
4853
4841
|
const tag = reader.uint32();
|
|
@@ -4887,7 +4875,7 @@ exports.Receipt_CreateSessionResult = {
|
|
|
4887
4875
|
},
|
|
4888
4876
|
};
|
|
4889
4877
|
function createBaseReceipt_PlaceOrderResult() {
|
|
4890
|
-
return { posted: undefined, fills: [], clientOrderId: undefined };
|
|
4878
|
+
return { posted: undefined, fills: [], clientOrderId: undefined, senderTrackingId: undefined };
|
|
4891
4879
|
}
|
|
4892
4880
|
exports.Receipt_PlaceOrderResult = {
|
|
4893
4881
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -4903,11 +4891,17 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
4903
4891
|
}
|
|
4904
4892
|
writer.uint32(24).uint64(message.clientOrderId);
|
|
4905
4893
|
}
|
|
4894
|
+
if (message.senderTrackingId !== undefined) {
|
|
4895
|
+
if (BigInt.asUintN(64, message.senderTrackingId) !== message.senderTrackingId) {
|
|
4896
|
+
throw new globalThis.Error("value provided for field message.senderTrackingId of type uint64 too large");
|
|
4897
|
+
}
|
|
4898
|
+
writer.uint32(32).uint64(message.senderTrackingId);
|
|
4899
|
+
}
|
|
4906
4900
|
return writer;
|
|
4907
4901
|
},
|
|
4908
4902
|
decode(input, length) {
|
|
4909
4903
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4910
|
-
|
|
4904
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4911
4905
|
const message = createBaseReceipt_PlaceOrderResult();
|
|
4912
4906
|
while (reader.pos < end) {
|
|
4913
4907
|
const tag = reader.uint32();
|
|
@@ -4933,6 +4927,13 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
4933
4927
|
message.clientOrderId = reader.uint64();
|
|
4934
4928
|
continue;
|
|
4935
4929
|
}
|
|
4930
|
+
case 4: {
|
|
4931
|
+
if (tag !== 32) {
|
|
4932
|
+
break;
|
|
4933
|
+
}
|
|
4934
|
+
message.senderTrackingId = reader.uint64();
|
|
4935
|
+
continue;
|
|
4936
|
+
}
|
|
4936
4937
|
}
|
|
4937
4938
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4938
4939
|
break;
|
|
@@ -4946,6 +4947,7 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
4946
4947
|
posted: isSet(object.posted) ? exports.Receipt_Posted.fromJSON(object.posted) : undefined,
|
|
4947
4948
|
fills: globalThis.Array.isArray(object?.fills) ? object.fills.map((e) => exports.Receipt_Trade.fromJSON(e)) : [],
|
|
4948
4949
|
clientOrderId: isSet(object.clientOrderId) ? BigInt(object.clientOrderId) : undefined,
|
|
4950
|
+
senderTrackingId: isSet(object.senderTrackingId) ? BigInt(object.senderTrackingId) : undefined,
|
|
4949
4951
|
};
|
|
4950
4952
|
},
|
|
4951
4953
|
toJSON(message) {
|
|
@@ -4959,6 +4961,9 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
4959
4961
|
if (message.clientOrderId !== undefined) {
|
|
4960
4962
|
obj.clientOrderId = message.clientOrderId.toString();
|
|
4961
4963
|
}
|
|
4964
|
+
if (message.senderTrackingId !== undefined) {
|
|
4965
|
+
obj.senderTrackingId = message.senderTrackingId.toString();
|
|
4966
|
+
}
|
|
4962
4967
|
return obj;
|
|
4963
4968
|
},
|
|
4964
4969
|
create(base) {
|
|
@@ -4971,6 +4976,7 @@ exports.Receipt_PlaceOrderResult = {
|
|
|
4971
4976
|
: undefined;
|
|
4972
4977
|
message.fills = object.fills?.map((e) => exports.Receipt_Trade.fromPartial(e)) || [];
|
|
4973
4978
|
message.clientOrderId = object.clientOrderId ?? undefined;
|
|
4979
|
+
message.senderTrackingId = object.senderTrackingId ?? undefined;
|
|
4974
4980
|
return message;
|
|
4975
4981
|
},
|
|
4976
4982
|
};
|
|
@@ -4998,7 +5004,7 @@ exports.Receipt_TakenResult = {
|
|
|
4998
5004
|
},
|
|
4999
5005
|
decode(input, length) {
|
|
5000
5006
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5001
|
-
|
|
5007
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5002
5008
|
const message = createBaseReceipt_TakenResult();
|
|
5003
5009
|
while (reader.pos < end) {
|
|
5004
5010
|
const tag = reader.uint32();
|
|
@@ -5083,7 +5089,7 @@ exports.Receipt_PositionTakenOrTradedResult = {
|
|
|
5083
5089
|
},
|
|
5084
5090
|
decode(input, length) {
|
|
5085
5091
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5086
|
-
|
|
5092
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5087
5093
|
const message = createBaseReceipt_PositionTakenOrTradedResult();
|
|
5088
5094
|
while (reader.pos < end) {
|
|
5089
5095
|
const tag = reader.uint32();
|
|
@@ -5193,7 +5199,7 @@ exports.Receipt_CancelOrderResult = {
|
|
|
5193
5199
|
},
|
|
5194
5200
|
decode(input, length) {
|
|
5195
5201
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5196
|
-
|
|
5202
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5197
5203
|
const message = createBaseReceipt_CancelOrderResult();
|
|
5198
5204
|
while (reader.pos < end) {
|
|
5199
5205
|
const tag = reader.uint32();
|
|
@@ -5273,7 +5279,7 @@ exports.Receipt_DepositResult = {
|
|
|
5273
5279
|
},
|
|
5274
5280
|
decode(input, length) {
|
|
5275
5281
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5276
|
-
|
|
5282
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5277
5283
|
const message = createBaseReceipt_DepositResult();
|
|
5278
5284
|
while (reader.pos < end) {
|
|
5279
5285
|
const tag = reader.uint32();
|
|
@@ -5377,7 +5383,7 @@ exports.Receipt_InsertTokenResult = {
|
|
|
5377
5383
|
},
|
|
5378
5384
|
decode(input, length) {
|
|
5379
5385
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5380
|
-
|
|
5386
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5381
5387
|
const message = createBaseReceipt_InsertTokenResult();
|
|
5382
5388
|
while (reader.pos < end) {
|
|
5383
5389
|
const tag = reader.uint32();
|
|
@@ -5442,7 +5448,7 @@ exports.Receipt_InsertMarketResult = {
|
|
|
5442
5448
|
},
|
|
5443
5449
|
decode(input, length) {
|
|
5444
5450
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5445
|
-
|
|
5451
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5446
5452
|
const message = createBaseReceipt_InsertMarketResult();
|
|
5447
5453
|
while (reader.pos < end) {
|
|
5448
5454
|
const tag = reader.uint32();
|
|
@@ -5519,7 +5525,7 @@ exports.Receipt_WithdrawResult = {
|
|
|
5519
5525
|
},
|
|
5520
5526
|
decode(input, length) {
|
|
5521
5527
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5522
|
-
|
|
5528
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5523
5529
|
const message = createBaseReceipt_WithdrawResult();
|
|
5524
5530
|
while (reader.pos < end) {
|
|
5525
5531
|
const tag = reader.uint32();
|
|
@@ -5635,7 +5641,7 @@ exports.Receipt_OracleSymbolFeedResult = {
|
|
|
5635
5641
|
},
|
|
5636
5642
|
decode(input, length) {
|
|
5637
5643
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5638
|
-
|
|
5644
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5639
5645
|
const message = createBaseReceipt_OracleSymbolFeedResult();
|
|
5640
5646
|
while (reader.pos < end) {
|
|
5641
5647
|
const tag = reader.uint32();
|
|
@@ -5703,7 +5709,7 @@ exports.Receipt_OracleUpdateResult = {
|
|
|
5703
5709
|
},
|
|
5704
5710
|
decode(input, length) {
|
|
5705
5711
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5706
|
-
|
|
5712
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5707
5713
|
const message = createBaseReceipt_OracleUpdateResult();
|
|
5708
5714
|
while (reader.pos < end) {
|
|
5709
5715
|
const tag = reader.uint32();
|
|
@@ -5757,7 +5763,7 @@ exports.Receipt_UpdateGuardianSetResult = {
|
|
|
5757
5763
|
},
|
|
5758
5764
|
decode(input, length) {
|
|
5759
5765
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5760
|
-
|
|
5766
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5761
5767
|
const message = createBaseReceipt_UpdateGuardianSetResult();
|
|
5762
5768
|
while (reader.pos < end) {
|
|
5763
5769
|
const tag = reader.uint32();
|
|
@@ -5836,7 +5842,7 @@ exports.Receipt_PerpPosition = {
|
|
|
5836
5842
|
},
|
|
5837
5843
|
decode(input, length) {
|
|
5838
5844
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5839
|
-
|
|
5845
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5840
5846
|
const message = createBaseReceipt_PerpPosition();
|
|
5841
5847
|
while (reader.pos < end) {
|
|
5842
5848
|
const tag = reader.uint32();
|
|
@@ -5927,7 +5933,7 @@ exports.Receipt_AccountLiquidated = {
|
|
|
5927
5933
|
},
|
|
5928
5934
|
decode(input, length) {
|
|
5929
5935
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
5930
|
-
|
|
5936
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5931
5937
|
const message = createBaseReceipt_AccountLiquidated();
|
|
5932
5938
|
while (reader.pos < end) {
|
|
5933
5939
|
const tag = reader.uint32();
|
|
@@ -6024,7 +6030,7 @@ exports.Receipt_SessionRevoked = {
|
|
|
6024
6030
|
},
|
|
6025
6031
|
decode(input, length) {
|
|
6026
6032
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6027
|
-
|
|
6033
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6028
6034
|
const message = createBaseReceipt_SessionRevoked();
|
|
6029
6035
|
while (reader.pos < end) {
|
|
6030
6036
|
const tag = reader.uint32();
|
|
@@ -6061,7 +6067,7 @@ exports.Receipt_Paused = {
|
|
|
6061
6067
|
},
|
|
6062
6068
|
decode(input, length) {
|
|
6063
6069
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6064
|
-
|
|
6070
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6065
6071
|
const message = createBaseReceipt_Paused();
|
|
6066
6072
|
while (reader.pos < end) {
|
|
6067
6073
|
const tag = reader.uint32();
|
|
@@ -6098,7 +6104,7 @@ exports.Receipt_Unpaused = {
|
|
|
6098
6104
|
},
|
|
6099
6105
|
decode(input, length) {
|
|
6100
6106
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6101
|
-
|
|
6107
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6102
6108
|
const message = createBaseReceipt_Unpaused();
|
|
6103
6109
|
while (reader.pos < end) {
|
|
6104
6110
|
const tag = reader.uint32();
|
|
@@ -6163,7 +6169,7 @@ exports.Receipt_Transferred = {
|
|
|
6163
6169
|
},
|
|
6164
6170
|
decode(input, length) {
|
|
6165
6171
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6166
|
-
|
|
6172
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6167
6173
|
const message = createBaseReceipt_Transferred();
|
|
6168
6174
|
while (reader.pos < end) {
|
|
6169
6175
|
const tag = reader.uint32();
|
|
@@ -6273,7 +6279,7 @@ exports.Receipt_TriggerAdded = {
|
|
|
6273
6279
|
},
|
|
6274
6280
|
decode(input, length) {
|
|
6275
6281
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6276
|
-
|
|
6282
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6277
6283
|
const message = createBaseReceipt_TriggerAdded();
|
|
6278
6284
|
while (reader.pos < end) {
|
|
6279
6285
|
const tag = reader.uint32();
|
|
@@ -6310,7 +6316,7 @@ exports.Receipt_TriggerRemoved = {
|
|
|
6310
6316
|
},
|
|
6311
6317
|
decode(input, length) {
|
|
6312
6318
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6313
|
-
|
|
6319
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6314
6320
|
const message = createBaseReceipt_TriggerRemoved();
|
|
6315
6321
|
while (reader.pos < end) {
|
|
6316
6322
|
const tag = reader.uint32();
|
|
@@ -6338,6 +6344,152 @@ exports.Receipt_TriggerRemoved = {
|
|
|
6338
6344
|
return message;
|
|
6339
6345
|
},
|
|
6340
6346
|
};
|
|
6347
|
+
function createBaseReceipt_AtomicSubactionResultKind() {
|
|
6348
|
+
return { inner: undefined };
|
|
6349
|
+
}
|
|
6350
|
+
exports.Receipt_AtomicSubactionResultKind = {
|
|
6351
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
6352
|
+
switch (message.inner?.$case) {
|
|
6353
|
+
case "placeOrderResult":
|
|
6354
|
+
exports.Receipt_PlaceOrderResult.encode(message.inner.value, writer.uint32(10).fork()).join();
|
|
6355
|
+
break;
|
|
6356
|
+
case "cancelOrder":
|
|
6357
|
+
exports.Receipt_CancelOrderResult.encode(message.inner.value, writer.uint32(18).fork()).join();
|
|
6358
|
+
break;
|
|
6359
|
+
}
|
|
6360
|
+
return writer;
|
|
6361
|
+
},
|
|
6362
|
+
decode(input, length) {
|
|
6363
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6364
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6365
|
+
const message = createBaseReceipt_AtomicSubactionResultKind();
|
|
6366
|
+
while (reader.pos < end) {
|
|
6367
|
+
const tag = reader.uint32();
|
|
6368
|
+
switch (tag >>> 3) {
|
|
6369
|
+
case 1: {
|
|
6370
|
+
if (tag !== 10) {
|
|
6371
|
+
break;
|
|
6372
|
+
}
|
|
6373
|
+
message.inner = {
|
|
6374
|
+
$case: "placeOrderResult",
|
|
6375
|
+
value: exports.Receipt_PlaceOrderResult.decode(reader, reader.uint32()),
|
|
6376
|
+
};
|
|
6377
|
+
continue;
|
|
6378
|
+
}
|
|
6379
|
+
case 2: {
|
|
6380
|
+
if (tag !== 18) {
|
|
6381
|
+
break;
|
|
6382
|
+
}
|
|
6383
|
+
message.inner = { $case: "cancelOrder", value: exports.Receipt_CancelOrderResult.decode(reader, reader.uint32()) };
|
|
6384
|
+
continue;
|
|
6385
|
+
}
|
|
6386
|
+
}
|
|
6387
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6388
|
+
break;
|
|
6389
|
+
}
|
|
6390
|
+
reader.skip(tag & 7);
|
|
6391
|
+
}
|
|
6392
|
+
return message;
|
|
6393
|
+
},
|
|
6394
|
+
fromJSON(object) {
|
|
6395
|
+
return {
|
|
6396
|
+
inner: isSet(object.placeOrderResult)
|
|
6397
|
+
? { $case: "placeOrderResult", value: exports.Receipt_PlaceOrderResult.fromJSON(object.placeOrderResult) }
|
|
6398
|
+
: isSet(object.cancelOrder)
|
|
6399
|
+
? { $case: "cancelOrder", value: exports.Receipt_CancelOrderResult.fromJSON(object.cancelOrder) }
|
|
6400
|
+
: undefined,
|
|
6401
|
+
};
|
|
6402
|
+
},
|
|
6403
|
+
toJSON(message) {
|
|
6404
|
+
const obj = {};
|
|
6405
|
+
if (message.inner?.$case === "placeOrderResult") {
|
|
6406
|
+
obj.placeOrderResult = exports.Receipt_PlaceOrderResult.toJSON(message.inner.value);
|
|
6407
|
+
}
|
|
6408
|
+
else if (message.inner?.$case === "cancelOrder") {
|
|
6409
|
+
obj.cancelOrder = exports.Receipt_CancelOrderResult.toJSON(message.inner.value);
|
|
6410
|
+
}
|
|
6411
|
+
return obj;
|
|
6412
|
+
},
|
|
6413
|
+
create(base) {
|
|
6414
|
+
return exports.Receipt_AtomicSubactionResultKind.fromPartial(base ?? {});
|
|
6415
|
+
},
|
|
6416
|
+
fromPartial(object) {
|
|
6417
|
+
const message = createBaseReceipt_AtomicSubactionResultKind();
|
|
6418
|
+
switch (object.inner?.$case) {
|
|
6419
|
+
case "placeOrderResult": {
|
|
6420
|
+
if (object.inner?.value !== undefined && object.inner?.value !== null) {
|
|
6421
|
+
message.inner = {
|
|
6422
|
+
$case: "placeOrderResult",
|
|
6423
|
+
value: exports.Receipt_PlaceOrderResult.fromPartial(object.inner.value),
|
|
6424
|
+
};
|
|
6425
|
+
}
|
|
6426
|
+
break;
|
|
6427
|
+
}
|
|
6428
|
+
case "cancelOrder": {
|
|
6429
|
+
if (object.inner?.value !== undefined && object.inner?.value !== null) {
|
|
6430
|
+
message.inner = { $case: "cancelOrder", value: exports.Receipt_CancelOrderResult.fromPartial(object.inner.value) };
|
|
6431
|
+
}
|
|
6432
|
+
break;
|
|
6433
|
+
}
|
|
6434
|
+
}
|
|
6435
|
+
return message;
|
|
6436
|
+
},
|
|
6437
|
+
};
|
|
6438
|
+
function createBaseReceipt_AtomicResult() {
|
|
6439
|
+
return { results: [] };
|
|
6440
|
+
}
|
|
6441
|
+
exports.Receipt_AtomicResult = {
|
|
6442
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
6443
|
+
for (const v of message.results) {
|
|
6444
|
+
exports.Receipt_AtomicSubactionResultKind.encode(v, writer.uint32(10).fork()).join();
|
|
6445
|
+
}
|
|
6446
|
+
return writer;
|
|
6447
|
+
},
|
|
6448
|
+
decode(input, length) {
|
|
6449
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
6450
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6451
|
+
const message = createBaseReceipt_AtomicResult();
|
|
6452
|
+
while (reader.pos < end) {
|
|
6453
|
+
const tag = reader.uint32();
|
|
6454
|
+
switch (tag >>> 3) {
|
|
6455
|
+
case 1: {
|
|
6456
|
+
if (tag !== 10) {
|
|
6457
|
+
break;
|
|
6458
|
+
}
|
|
6459
|
+
message.results.push(exports.Receipt_AtomicSubactionResultKind.decode(reader, reader.uint32()));
|
|
6460
|
+
continue;
|
|
6461
|
+
}
|
|
6462
|
+
}
|
|
6463
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6464
|
+
break;
|
|
6465
|
+
}
|
|
6466
|
+
reader.skip(tag & 7);
|
|
6467
|
+
}
|
|
6468
|
+
return message;
|
|
6469
|
+
},
|
|
6470
|
+
fromJSON(object) {
|
|
6471
|
+
return {
|
|
6472
|
+
results: globalThis.Array.isArray(object?.results)
|
|
6473
|
+
? object.results.map((e) => exports.Receipt_AtomicSubactionResultKind.fromJSON(e))
|
|
6474
|
+
: [],
|
|
6475
|
+
};
|
|
6476
|
+
},
|
|
6477
|
+
toJSON(message) {
|
|
6478
|
+
const obj = {};
|
|
6479
|
+
if (message.results?.length) {
|
|
6480
|
+
obj.results = message.results.map((e) => exports.Receipt_AtomicSubactionResultKind.toJSON(e));
|
|
6481
|
+
}
|
|
6482
|
+
return obj;
|
|
6483
|
+
},
|
|
6484
|
+
create(base) {
|
|
6485
|
+
return exports.Receipt_AtomicResult.fromPartial(base ?? {});
|
|
6486
|
+
},
|
|
6487
|
+
fromPartial(object) {
|
|
6488
|
+
const message = createBaseReceipt_AtomicResult();
|
|
6489
|
+
message.results = object.results?.map((e) => exports.Receipt_AtomicSubactionResultKind.fromPartial(e)) || [];
|
|
6490
|
+
return message;
|
|
6491
|
+
},
|
|
6492
|
+
};
|
|
6341
6493
|
function bytesFromBase64(b64) {
|
|
6342
6494
|
if (globalThis.Buffer) {
|
|
6343
6495
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|