@deriverse/kit 1.0.39 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto_buffer.d.ts +0 -2
- package/dist/auto_data.d.ts +0 -2
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +28 -0
- package/dist/engine/account-helpers.d.ts +59 -0
- package/dist/engine/account-helpers.js +177 -0
- package/dist/engine/account-helpers.test.d.ts +1 -0
- package/dist/engine/account-helpers.test.js +199 -0
- package/dist/engine/client-queries.d.ts +36 -0
- package/dist/engine/client-queries.js +498 -0
- package/dist/engine/client-queries.test.d.ts +1 -0
- package/dist/engine/client-queries.test.js +341 -0
- package/dist/engine/context-builders.d.ts +16 -0
- package/dist/engine/context-builders.js +158 -0
- package/dist/engine/context-builders.test.d.ts +1 -0
- package/dist/engine/context-builders.test.js +156 -0
- package/dist/engine/index.d.ts +101 -0
- package/dist/engine/index.js +745 -0
- package/dist/engine/index.test.d.ts +1 -0
- package/dist/engine/index.test.js +685 -0
- package/dist/engine/logs-decoder.d.ts +18 -0
- package/dist/engine/logs-decoder.js +525 -0
- package/dist/engine/logs-decoder.test.d.ts +1 -0
- package/dist/engine/logs-decoder.test.js +836 -0
- package/dist/engine/perp-instructions.d.ts +68 -0
- package/dist/engine/perp-instructions.js +497 -0
- package/dist/engine/perp-instructions.test.d.ts +1 -0
- package/dist/engine/perp-instructions.test.js +292 -0
- package/dist/engine/spot-instructions.d.ts +52 -0
- package/dist/engine/spot-instructions.js +399 -0
- package/dist/engine/spot-instructions.test.d.ts +1 -0
- package/dist/engine/spot-instructions.test.js +221 -0
- package/dist/engine/utils.d.ts +23 -0
- package/dist/engine/utils.js +332 -0
- package/dist/engine/utils.test.d.ts +1 -0
- package/dist/engine/utils.test.js +120 -0
- package/dist/index.d.ts +6 -247
- package/dist/index.js +14 -2923
- package/dist/instruction_models.d.ts +10 -9
- package/dist/instruction_models.js +88 -69
- package/dist/logs_models.d.ts +147 -5
- package/dist/logs_models.js +243 -13
- package/dist/structure_models.d.ts +104 -99
- package/dist/structure_models.js +152 -129
- package/dist/types/engine-args.d.ts +32 -0
- package/dist/types/engine-args.js +2 -0
- package/dist/types/enums.d.ts +43 -0
- package/dist/{types.js → types/enums.js} +3 -5
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +38 -0
- package/dist/types/log-message.d.ts +2 -0
- package/dist/types/log-message.js +2 -0
- package/dist/types/responses.d.ts +248 -0
- package/dist/types/responses.js +2 -0
- package/dist/types/schemas.d.ts +168 -0
- package/dist/types/schemas.js +239 -0
- package/dist/types/schemas.test.d.ts +1 -0
- package/dist/types/schemas.test.js +93 -0
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +1 -0
- package/package.json +26 -6
- package/dist/types.d.ts +0 -565
package/dist/logs_models.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoveSpotAvailFundsReportModel = exports.SpotOrderRevokeReportModel = exports.PerpOrderRevokeReportModel = exports.SpotOrderCancelReportModel = exports.PerpOrderCancelReportModel = exports.SpotNewOrderReportModel = exports.PerpNewOrderReportModel = exports.PerpSocLossReportModel = exports.PerpFundingReportModel = exports.SpotFeesReportModel = exports.PerpFeesReportModel = exports.SpotMassCancelReportModel = exports.PerpMassCancelReportModel = exports.SpotPlaceMassCancelReportModel = exports.PerpPlaceMassCancelReportModel = exports.
|
|
3
|
+
exports.VmInitWithdrawFinalizeReportModel = exports.VmInitWithdrawCancelReportModel = exports.VmInitWithdrawReportModel = exports.VmChangeListReportModel = exports.VmFinalizeDeactivateReportModel = exports.VmInitDeactivateCancelReportModel = exports.VmInitDeactivateReportModel = exports.VmFinalizeActivateReportModel = exports.VmInitActivateCancelReportModel = exports.VmInitActivateReportModel = exports.SwapRefFeesReportModel = exports.ChangePointsRecordModel = exports.MoveSpotAvailFundsReportModel = exports.SpotOrderRevokeReportModel = exports.PerpOrderRevokeReportModel = exports.SpotOrderCancelReportModel = exports.PerpOrderCancelReportModel = exports.SpotNewOrderReportModel = exports.PerpNewOrderReportModel = exports.PerpSocLossReportModel = exports.PerpFundingReportModel = exports.SpotFeesReportModel = exports.PerpFeesReportModel = exports.SpotMassCancelReportModel = exports.PerpMassCancelReportModel = exports.SpotPlaceMassCancelReportModel = exports.PerpPlaceMassCancelReportModel = exports.PlaceSwapOrderReportModel = exports.SpotPlaceOrderReportModel = exports.PerpPlaceOrderReportModel = exports.SpotFillOrderReportModel = exports.PerpFillOrderReportModel = exports.SpotlpTradeReportModel = exports.PerpWithdrawReportModel = exports.WithdrawReportModel = exports.SellMarketSeatReportModel = exports.BuyMarketSeatReportModel = exports.PerpDepositReportModel = exports.FeesWithdrawReportModel = exports.FeesDepositReportModel = exports.DepositReportModel = exports.EarningsReportModel = exports.DrvsAirdropReportModel = exports.PerpChangeLeverageReportModel = exports.LogType = void 0;
|
|
4
4
|
const auto_buffer_1 = require("./auto_buffer");
|
|
5
5
|
var LogType;
|
|
6
6
|
(function (LogType) {
|
|
@@ -37,6 +37,18 @@ var LogType;
|
|
|
37
37
|
LogType[LogType["swapOrder"] = 31] = "swapOrder";
|
|
38
38
|
LogType[LogType["moveSpot"] = 32] = "moveSpot";
|
|
39
39
|
LogType[LogType["newPrivateClient"] = 33] = "newPrivateClient";
|
|
40
|
+
LogType[LogType["changedPoints"] = 34] = "changedPoints";
|
|
41
|
+
LogType[LogType["swapFees"] = 35] = "swapFees";
|
|
42
|
+
LogType[LogType["vmInitActivate"] = 36] = "vmInitActivate";
|
|
43
|
+
LogType[LogType["vmInitActivateCancel"] = 37] = "vmInitActivateCancel";
|
|
44
|
+
LogType[LogType["vmFinalizeActivate"] = 38] = "vmFinalizeActivate";
|
|
45
|
+
LogType[LogType["vmInitDeactivate"] = 39] = "vmInitDeactivate";
|
|
46
|
+
LogType[LogType["vmInitDeactivateCancel"] = 40] = "vmInitDeactivateCancel";
|
|
47
|
+
LogType[LogType["vmFinalizeDeactivate"] = 41] = "vmFinalizeDeactivate";
|
|
48
|
+
LogType[LogType["vmChangeList"] = 42] = "vmChangeList";
|
|
49
|
+
LogType[LogType["vmInitWithdraw"] = 43] = "vmInitWithdraw";
|
|
50
|
+
LogType[LogType["vmInitWithdrawCancel"] = 44] = "vmInitWithdrawCancel";
|
|
51
|
+
LogType[LogType["vmInitWithdrawFinalize"] = 45] = "vmInitWithdrawFinalize";
|
|
40
52
|
})(LogType || (exports.LogType = LogType = {}));
|
|
41
53
|
class PerpChangeLeverageReportModel {
|
|
42
54
|
static fromBuffer(buffer, offset) {
|
|
@@ -410,9 +422,9 @@ SpotPlaceOrderReportModel.OFFSET_QTY = 16;
|
|
|
410
422
|
SpotPlaceOrderReportModel.OFFSET_PRICE = 24;
|
|
411
423
|
SpotPlaceOrderReportModel.OFFSET_INSTR_ID = 32;
|
|
412
424
|
SpotPlaceOrderReportModel.OFFSET_TIME = 36;
|
|
413
|
-
class
|
|
425
|
+
class PlaceSwapOrderReportModel {
|
|
414
426
|
static fromBuffer(buffer, offset) {
|
|
415
|
-
const result = new
|
|
427
|
+
const result = new PlaceSwapOrderReportModel();
|
|
416
428
|
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
417
429
|
result.tag = autoBuffer.readU8();
|
|
418
430
|
result.side = autoBuffer.readU8();
|
|
@@ -424,19 +436,21 @@ class SwapOrderReportModel {
|
|
|
424
436
|
result.price = autoBuffer.readI64();
|
|
425
437
|
result.time = autoBuffer.readU32();
|
|
426
438
|
result.instrId = autoBuffer.readU32();
|
|
439
|
+
result.swapRefRate = autoBuffer.readF64();
|
|
427
440
|
return result;
|
|
428
441
|
}
|
|
429
442
|
}
|
|
430
|
-
exports.
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
443
|
+
exports.PlaceSwapOrderReportModel = PlaceSwapOrderReportModel;
|
|
444
|
+
PlaceSwapOrderReportModel.LENGTH = 4 * 1 + 3 * 4 + 4 * 8; // 48 bytes
|
|
445
|
+
PlaceSwapOrderReportModel.OFFSET_TAG = 0;
|
|
446
|
+
PlaceSwapOrderReportModel.OFFSET_SIDE = 1;
|
|
447
|
+
PlaceSwapOrderReportModel.OFFSET_ORDER_TYPE = 2;
|
|
448
|
+
PlaceSwapOrderReportModel.OFFSET_ORDER_ID = 8;
|
|
449
|
+
PlaceSwapOrderReportModel.OFFSET_QTY = 16;
|
|
450
|
+
PlaceSwapOrderReportModel.OFFSET_PRICE = 24;
|
|
451
|
+
PlaceSwapOrderReportModel.OFFSET_TIME = 32;
|
|
452
|
+
PlaceSwapOrderReportModel.OFFSET_INSTR_ID = 36;
|
|
453
|
+
PlaceSwapOrderReportModel.OFFSET_SWAP_REF_RATE = 40;
|
|
440
454
|
class PerpPlaceMassCancelReportModel {
|
|
441
455
|
static fromBuffer(buffer, offset) {
|
|
442
456
|
const result = new PerpPlaceMassCancelReportModel();
|
|
@@ -754,3 +768,219 @@ MoveSpotAvailFundsReportModel.OFFSET_INSTR_ID = 8;
|
|
|
754
768
|
MoveSpotAvailFundsReportModel.OFFSET_TIME = 12;
|
|
755
769
|
MoveSpotAvailFundsReportModel.OFFSET_QTY = 16;
|
|
756
770
|
MoveSpotAvailFundsReportModel.OFFSET_CRNCY = 24;
|
|
771
|
+
class ChangePointsRecordModel {
|
|
772
|
+
static fromBuffer(buffer, offset) {
|
|
773
|
+
const result = new ChangePointsRecordModel();
|
|
774
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
775
|
+
result.tag = autoBuffer.readU8();
|
|
776
|
+
autoBuffer.readU8();
|
|
777
|
+
autoBuffer.readU16();
|
|
778
|
+
result.clientId = autoBuffer.readU32();
|
|
779
|
+
result.points = autoBuffer.readU32();
|
|
780
|
+
result.time = autoBuffer.readU32();
|
|
781
|
+
return result;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
exports.ChangePointsRecordModel = ChangePointsRecordModel;
|
|
785
|
+
ChangePointsRecordModel.LENGTH = 2 * 1 + 1 * 2 + 3 * 4; // 16 bytes
|
|
786
|
+
ChangePointsRecordModel.OFFSET_TAG = 0;
|
|
787
|
+
ChangePointsRecordModel.OFFSET_CLIENT_ID = 4;
|
|
788
|
+
ChangePointsRecordModel.OFFSET_POINTS = 8;
|
|
789
|
+
ChangePointsRecordModel.OFFSET_TIME = 12;
|
|
790
|
+
class SwapRefFeesReportModel {
|
|
791
|
+
static fromBuffer(buffer, offset) {
|
|
792
|
+
const result = new SwapRefFeesReportModel();
|
|
793
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
794
|
+
result.tag = autoBuffer.readU8();
|
|
795
|
+
autoBuffer.readU8();
|
|
796
|
+
autoBuffer.readU16();
|
|
797
|
+
autoBuffer.readU32();
|
|
798
|
+
result.fees = autoBuffer.readI64();
|
|
799
|
+
return result;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
exports.SwapRefFeesReportModel = SwapRefFeesReportModel;
|
|
803
|
+
SwapRefFeesReportModel.LENGTH = 2 * 1 + 1 * 2 + 1 * 4 + 1 * 8; // 16 bytes
|
|
804
|
+
SwapRefFeesReportModel.OFFSET_TAG = 0;
|
|
805
|
+
SwapRefFeesReportModel.OFFSET_FEES = 8;
|
|
806
|
+
class VmInitActivateReportModel {
|
|
807
|
+
static fromBuffer(buffer, offset) {
|
|
808
|
+
const result = new VmInitActivateReportModel();
|
|
809
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
810
|
+
result.tag = autoBuffer.readU8();
|
|
811
|
+
autoBuffer.readU8();
|
|
812
|
+
autoBuffer.readU16();
|
|
813
|
+
result.clientId = autoBuffer.readU32();
|
|
814
|
+
result.time = autoBuffer.readU32();
|
|
815
|
+
autoBuffer.readU32();
|
|
816
|
+
return result;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
exports.VmInitActivateReportModel = VmInitActivateReportModel;
|
|
820
|
+
VmInitActivateReportModel.LENGTH = 2 * 1 + 1 * 2 + 3 * 4; // 16 bytes
|
|
821
|
+
VmInitActivateReportModel.OFFSET_TAG = 0;
|
|
822
|
+
VmInitActivateReportModel.OFFSET_CLIENT_ID = 4;
|
|
823
|
+
VmInitActivateReportModel.OFFSET_TIME = 8;
|
|
824
|
+
class VmInitActivateCancelReportModel {
|
|
825
|
+
static fromBuffer(buffer, offset) {
|
|
826
|
+
const result = new VmInitActivateCancelReportModel();
|
|
827
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
828
|
+
result.tag = autoBuffer.readU8();
|
|
829
|
+
autoBuffer.readU8();
|
|
830
|
+
autoBuffer.readU16();
|
|
831
|
+
result.clientId = autoBuffer.readU32();
|
|
832
|
+
result.time = autoBuffer.readU32();
|
|
833
|
+
return result;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
exports.VmInitActivateCancelReportModel = VmInitActivateCancelReportModel;
|
|
837
|
+
VmInitActivateCancelReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
838
|
+
VmInitActivateCancelReportModel.OFFSET_TAG = 0;
|
|
839
|
+
VmInitActivateCancelReportModel.OFFSET_CLIENT_ID = 4;
|
|
840
|
+
VmInitActivateCancelReportModel.OFFSET_TIME = 8;
|
|
841
|
+
class VmFinalizeActivateReportModel {
|
|
842
|
+
static fromBuffer(buffer, offset) {
|
|
843
|
+
const result = new VmFinalizeActivateReportModel();
|
|
844
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
845
|
+
result.tag = autoBuffer.readU8();
|
|
846
|
+
autoBuffer.readU8();
|
|
847
|
+
autoBuffer.readU16();
|
|
848
|
+
result.clientId = autoBuffer.readU32();
|
|
849
|
+
result.time = autoBuffer.readU32();
|
|
850
|
+
return result;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
exports.VmFinalizeActivateReportModel = VmFinalizeActivateReportModel;
|
|
854
|
+
VmFinalizeActivateReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
855
|
+
VmFinalizeActivateReportModel.OFFSET_TAG = 0;
|
|
856
|
+
VmFinalizeActivateReportModel.OFFSET_CLIENT_ID = 4;
|
|
857
|
+
VmFinalizeActivateReportModel.OFFSET_TIME = 8;
|
|
858
|
+
class VmInitDeactivateReportModel {
|
|
859
|
+
static fromBuffer(buffer, offset) {
|
|
860
|
+
const result = new VmInitDeactivateReportModel();
|
|
861
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
862
|
+
result.tag = autoBuffer.readU8();
|
|
863
|
+
autoBuffer.readU8();
|
|
864
|
+
autoBuffer.readU16();
|
|
865
|
+
result.clientId = autoBuffer.readU32();
|
|
866
|
+
result.time = autoBuffer.readU32();
|
|
867
|
+
return result;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
exports.VmInitDeactivateReportModel = VmInitDeactivateReportModel;
|
|
871
|
+
VmInitDeactivateReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
872
|
+
VmInitDeactivateReportModel.OFFSET_TAG = 0;
|
|
873
|
+
VmInitDeactivateReportModel.OFFSET_CLIENT_ID = 4;
|
|
874
|
+
VmInitDeactivateReportModel.OFFSET_TIME = 8;
|
|
875
|
+
class VmInitDeactivateCancelReportModel {
|
|
876
|
+
static fromBuffer(buffer, offset) {
|
|
877
|
+
const result = new VmInitDeactivateCancelReportModel();
|
|
878
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
879
|
+
result.tag = autoBuffer.readU8();
|
|
880
|
+
autoBuffer.readU8();
|
|
881
|
+
autoBuffer.readU16();
|
|
882
|
+
result.clientId = autoBuffer.readU32();
|
|
883
|
+
result.time = autoBuffer.readU32();
|
|
884
|
+
return result;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
exports.VmInitDeactivateCancelReportModel = VmInitDeactivateCancelReportModel;
|
|
888
|
+
VmInitDeactivateCancelReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
889
|
+
VmInitDeactivateCancelReportModel.OFFSET_TAG = 0;
|
|
890
|
+
VmInitDeactivateCancelReportModel.OFFSET_CLIENT_ID = 4;
|
|
891
|
+
VmInitDeactivateCancelReportModel.OFFSET_TIME = 8;
|
|
892
|
+
class VmFinalizeDeactivateReportModel {
|
|
893
|
+
static fromBuffer(buffer, offset) {
|
|
894
|
+
const result = new VmFinalizeDeactivateReportModel();
|
|
895
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
896
|
+
result.tag = autoBuffer.readU8();
|
|
897
|
+
autoBuffer.readU8();
|
|
898
|
+
autoBuffer.readU16();
|
|
899
|
+
result.clientId = autoBuffer.readU32();
|
|
900
|
+
result.time = autoBuffer.readU32();
|
|
901
|
+
return result;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
exports.VmFinalizeDeactivateReportModel = VmFinalizeDeactivateReportModel;
|
|
905
|
+
VmFinalizeDeactivateReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
906
|
+
VmFinalizeDeactivateReportModel.OFFSET_TAG = 0;
|
|
907
|
+
VmFinalizeDeactivateReportModel.OFFSET_CLIENT_ID = 4;
|
|
908
|
+
VmFinalizeDeactivateReportModel.OFFSET_TIME = 8;
|
|
909
|
+
class VmChangeListReportModel {
|
|
910
|
+
static fromBuffer(buffer, offset) {
|
|
911
|
+
const result = new VmChangeListReportModel();
|
|
912
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
913
|
+
result.tag = autoBuffer.readU8();
|
|
914
|
+
autoBuffer.readU8();
|
|
915
|
+
autoBuffer.readU16();
|
|
916
|
+
result.clientId = autoBuffer.readU32();
|
|
917
|
+
result.time = autoBuffer.readU32();
|
|
918
|
+
return result;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
exports.VmChangeListReportModel = VmChangeListReportModel;
|
|
922
|
+
VmChangeListReportModel.LENGTH = 2 * 1 + 1 * 2 + 2 * 4; // 12 bytes
|
|
923
|
+
VmChangeListReportModel.OFFSET_TAG = 0;
|
|
924
|
+
VmChangeListReportModel.OFFSET_CLIENT_ID = 4;
|
|
925
|
+
VmChangeListReportModel.OFFSET_TIME = 8;
|
|
926
|
+
class VmInitWithdrawReportModel {
|
|
927
|
+
static fromBuffer(buffer, offset) {
|
|
928
|
+
const result = new VmInitWithdrawReportModel();
|
|
929
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
930
|
+
result.tag = autoBuffer.readU8();
|
|
931
|
+
autoBuffer.readU8();
|
|
932
|
+
autoBuffer.readU16();
|
|
933
|
+
result.clientId = autoBuffer.readU32();
|
|
934
|
+
result.tokenId = autoBuffer.readU32();
|
|
935
|
+
result.time = autoBuffer.readU32();
|
|
936
|
+
result.amount = autoBuffer.readI64();
|
|
937
|
+
return result;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
exports.VmInitWithdrawReportModel = VmInitWithdrawReportModel;
|
|
941
|
+
VmInitWithdrawReportModel.LENGTH = 2 * 1 + 1 * 2 + 3 * 4 + 1 * 8; // 24 bytes
|
|
942
|
+
VmInitWithdrawReportModel.OFFSET_TAG = 0;
|
|
943
|
+
VmInitWithdrawReportModel.OFFSET_CLIENT_ID = 4;
|
|
944
|
+
VmInitWithdrawReportModel.OFFSET_TOKEN_ID = 8;
|
|
945
|
+
VmInitWithdrawReportModel.OFFSET_TIME = 12;
|
|
946
|
+
VmInitWithdrawReportModel.OFFSET_AMOUNT = 16;
|
|
947
|
+
class VmInitWithdrawCancelReportModel {
|
|
948
|
+
static fromBuffer(buffer, offset) {
|
|
949
|
+
const result = new VmInitWithdrawCancelReportModel();
|
|
950
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
951
|
+
result.tag = autoBuffer.readU8();
|
|
952
|
+
autoBuffer.readU8();
|
|
953
|
+
autoBuffer.readU16();
|
|
954
|
+
result.clientId = autoBuffer.readU32();
|
|
955
|
+
result.tokenId = autoBuffer.readU32();
|
|
956
|
+
result.time = autoBuffer.readU32();
|
|
957
|
+
return result;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
exports.VmInitWithdrawCancelReportModel = VmInitWithdrawCancelReportModel;
|
|
961
|
+
VmInitWithdrawCancelReportModel.LENGTH = 2 * 1 + 1 * 2 + 3 * 4; // 16 bytes
|
|
962
|
+
VmInitWithdrawCancelReportModel.OFFSET_TAG = 0;
|
|
963
|
+
VmInitWithdrawCancelReportModel.OFFSET_CLIENT_ID = 4;
|
|
964
|
+
VmInitWithdrawCancelReportModel.OFFSET_TOKEN_ID = 8;
|
|
965
|
+
VmInitWithdrawCancelReportModel.OFFSET_TIME = 12;
|
|
966
|
+
class VmInitWithdrawFinalizeReportModel {
|
|
967
|
+
static fromBuffer(buffer, offset) {
|
|
968
|
+
const result = new VmInitWithdrawFinalizeReportModel();
|
|
969
|
+
let autoBuffer = new auto_buffer_1.AutoBuffer(buffer, offset);
|
|
970
|
+
result.tag = autoBuffer.readU8();
|
|
971
|
+
autoBuffer.readU8();
|
|
972
|
+
autoBuffer.readU16();
|
|
973
|
+
result.clientId = autoBuffer.readU32();
|
|
974
|
+
result.tokenId = autoBuffer.readU32();
|
|
975
|
+
result.time = autoBuffer.readU32();
|
|
976
|
+
result.amount = autoBuffer.readI64();
|
|
977
|
+
return result;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
exports.VmInitWithdrawFinalizeReportModel = VmInitWithdrawFinalizeReportModel;
|
|
981
|
+
VmInitWithdrawFinalizeReportModel.LENGTH = 2 * 1 + 1 * 2 + 3 * 4 + 1 * 8; // 24 bytes
|
|
982
|
+
VmInitWithdrawFinalizeReportModel.OFFSET_TAG = 0;
|
|
983
|
+
VmInitWithdrawFinalizeReportModel.OFFSET_CLIENT_ID = 4;
|
|
984
|
+
VmInitWithdrawFinalizeReportModel.OFFSET_TOKEN_ID = 8;
|
|
985
|
+
VmInitWithdrawFinalizeReportModel.OFFSET_TIME = 12;
|
|
986
|
+
VmInitWithdrawFinalizeReportModel.OFFSET_AMOUNT = 16;
|
|
@@ -2,22 +2,29 @@ import { Address, Base64EncodedDataResponse } from '@solana/kit';
|
|
|
2
2
|
export declare enum OrderType {
|
|
3
3
|
limit = 0,
|
|
4
4
|
market = 1,
|
|
5
|
-
marginCall = 2
|
|
6
|
-
|
|
5
|
+
marginCall = 2
|
|
6
|
+
}
|
|
7
|
+
export declare enum AssetType {
|
|
8
|
+
token = 268435456,
|
|
9
|
+
spotLp = 536870912,
|
|
10
|
+
spotOrders = 805306368,
|
|
11
|
+
perp = 1073741824
|
|
12
|
+
}
|
|
13
|
+
export declare enum VmFlag {
|
|
14
|
+
active = 2147483648,
|
|
15
|
+
change = 1073741824,
|
|
16
|
+
withdraw = 536870912
|
|
17
|
+
}
|
|
18
|
+
export declare enum SlotFlag {
|
|
19
|
+
spot = 1,
|
|
20
|
+
perp = 2,
|
|
21
|
+
option = 4
|
|
7
22
|
}
|
|
8
23
|
export declare enum AccountType {
|
|
9
24
|
clientCommunity = 35,
|
|
25
|
+
clientDrv = 32,
|
|
10
26
|
clientPrimary = 31,
|
|
11
27
|
community = 34,
|
|
12
|
-
futuresAskOrders = 29,
|
|
13
|
-
futuresAsksTree = 27,
|
|
14
|
-
futuresBidOrders = 28,
|
|
15
|
-
futuresBidsTree = 26,
|
|
16
|
-
futuresClientAccounts = 23,
|
|
17
|
-
futuresClientInfos = 24,
|
|
18
|
-
futuresClientInfos2 = 25,
|
|
19
|
-
futuresLines = 30,
|
|
20
|
-
futuresMaps = 22,
|
|
21
28
|
holder = 1,
|
|
22
29
|
root = 2,
|
|
23
30
|
instr = 7,
|
|
@@ -203,24 +210,6 @@ export declare class HolderAccountHeaderModel {
|
|
|
203
210
|
operatorsCount: number;
|
|
204
211
|
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): HolderAccountHeaderModel;
|
|
205
212
|
}
|
|
206
|
-
export declare class OperatorModel {
|
|
207
|
-
static readonly LENGTH: number;
|
|
208
|
-
static readonly OFFSET_OPERATOR_ADDRESS = 0;
|
|
209
|
-
static readonly OFFSET_VERSION = 32;
|
|
210
|
-
static readonly OFFSET_RESERVED = 36;
|
|
211
|
-
operatorAddress: Address<any>;
|
|
212
|
-
version: number;
|
|
213
|
-
reserved: number;
|
|
214
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): OperatorModel;
|
|
215
|
-
}
|
|
216
|
-
export declare class LineQuotesModel {
|
|
217
|
-
static readonly LENGTH: number;
|
|
218
|
-
static readonly OFFSET_PX = 0;
|
|
219
|
-
static readonly OFFSET_QTY = 8;
|
|
220
|
-
px: number;
|
|
221
|
-
qty: number;
|
|
222
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): LineQuotesModel;
|
|
223
|
-
}
|
|
224
213
|
export declare class CandleModel {
|
|
225
214
|
static readonly LENGTH: number;
|
|
226
215
|
static readonly OFFSET_OPEN = 0;
|
|
@@ -617,60 +606,6 @@ export declare class TokenStateModel {
|
|
|
617
606
|
baseCrncyIndex: number;
|
|
618
607
|
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): TokenStateModel;
|
|
619
608
|
}
|
|
620
|
-
export declare class BaseCrncyRecordModel {
|
|
621
|
-
static readonly LENGTH: number;
|
|
622
|
-
static readonly OFFSET_CRNCY_TOKEN_ID = 0;
|
|
623
|
-
static readonly OFFSET_DECS_COUNT = 4;
|
|
624
|
-
static readonly OFFSET_FUNDS = 8;
|
|
625
|
-
static readonly OFFSET_RATE = 16;
|
|
626
|
-
static readonly OFFSET_DENOMINATOR = 24;
|
|
627
|
-
static readonly OFFSET_LOCKED_DRVS_AMOUNT = 32;
|
|
628
|
-
static readonly OFFSET_LOCKED_DRVS_DIVIDENDS_VALUE = 40;
|
|
629
|
-
static readonly OFFSET_MASK = 48;
|
|
630
|
-
crncyTokenId: number;
|
|
631
|
-
decsCount: number;
|
|
632
|
-
funds: number;
|
|
633
|
-
rate: number;
|
|
634
|
-
denominator: number;
|
|
635
|
-
lockedDrvsAmount: number;
|
|
636
|
-
lockedDrvsDividendsValue: number;
|
|
637
|
-
mask: number;
|
|
638
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): BaseCrncyRecordModel;
|
|
639
|
-
}
|
|
640
|
-
export declare class ClientSpotModel {
|
|
641
|
-
static readonly LENGTH: number;
|
|
642
|
-
static readonly OFFSET_ASSET_ID = 0;
|
|
643
|
-
static readonly OFFSET_TEMP_CLIENT_ID = 4;
|
|
644
|
-
static readonly OFFSET_SLOT = 8;
|
|
645
|
-
static readonly OFFSET_PADDING = 12;
|
|
646
|
-
assetId: number;
|
|
647
|
-
tempClientId: number;
|
|
648
|
-
slot: number;
|
|
649
|
-
padding: number;
|
|
650
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): ClientSpotModel;
|
|
651
|
-
}
|
|
652
|
-
export declare class ClientPerpModel {
|
|
653
|
-
static readonly LENGTH: number;
|
|
654
|
-
static readonly OFFSET_ASSET_ID = 0;
|
|
655
|
-
static readonly OFFSET_TEMP_CLIENT_ID = 4;
|
|
656
|
-
static readonly OFFSET_SLOT = 8;
|
|
657
|
-
static readonly OFFSET_PADDING = 12;
|
|
658
|
-
assetId: number;
|
|
659
|
-
tempClientId: number;
|
|
660
|
-
slot: number;
|
|
661
|
-
padding: number;
|
|
662
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): ClientPerpModel;
|
|
663
|
-
}
|
|
664
|
-
export declare class AssetRecordModel {
|
|
665
|
-
static readonly LENGTH: number;
|
|
666
|
-
static readonly OFFSET_ASSET_ID = 0;
|
|
667
|
-
static readonly OFFSET_TEMP_ID = 4;
|
|
668
|
-
static readonly OFFSET_VALUE = 8;
|
|
669
|
-
assetId: number;
|
|
670
|
-
tempId: number;
|
|
671
|
-
value: number;
|
|
672
|
-
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): AssetRecordModel;
|
|
673
|
-
}
|
|
674
609
|
export declare class SpotClientInfoModel {
|
|
675
610
|
static readonly LENGTH: number;
|
|
676
611
|
static readonly OFFSET_CLIENT = 0;
|
|
@@ -779,14 +714,7 @@ export declare class ClientPrimaryAccountHeaderModel {
|
|
|
779
714
|
static readonly OFFSET_LUT_ADDRESS = 40;
|
|
780
715
|
static readonly OFFSET_REF_ADDRESS = 72;
|
|
781
716
|
static readonly OFFSET_VM_WALLET_ADDRESS = 104;
|
|
782
|
-
static readonly
|
|
783
|
-
static readonly OFFSET_VM_INSTR_1 = 140;
|
|
784
|
-
static readonly OFFSET_VM_INSTR_2 = 144;
|
|
785
|
-
static readonly OFFSET_VM_INSTR_3 = 148;
|
|
786
|
-
static readonly OFFSET_VM_INSTR_4 = 152;
|
|
787
|
-
static readonly OFFSET_VM_INSTR_5 = 156;
|
|
788
|
-
static readonly OFFSET_VM_INSTR_6 = 160;
|
|
789
|
-
static readonly OFFSET_VM_INSTR_7 = 164;
|
|
717
|
+
static readonly OFFSET_VM_INSTRS = 136;
|
|
790
718
|
static readonly OFFSET_VM_WITHDRAW_TOKEN_ID = 168;
|
|
791
719
|
static readonly OFFSET_VM_MASK = 172;
|
|
792
720
|
static readonly OFFSET_VM_WITHDRAW_AMOUNT = 176;
|
|
@@ -828,14 +756,7 @@ export declare class ClientPrimaryAccountHeaderModel {
|
|
|
828
756
|
lutAddress: Address<any>;
|
|
829
757
|
refAddress: Address<any>;
|
|
830
758
|
vmWalletAddress: Address<any>;
|
|
831
|
-
|
|
832
|
-
vmInstr1: number;
|
|
833
|
-
vmInstr2: number;
|
|
834
|
-
vmInstr3: number;
|
|
835
|
-
vmInstr4: number;
|
|
836
|
-
vmInstr5: number;
|
|
837
|
-
vmInstr6: number;
|
|
838
|
-
vmInstr7: number;
|
|
759
|
+
vmInstrs: number[];
|
|
839
760
|
vmWithdrawTokenId: number;
|
|
840
761
|
vmMask: number;
|
|
841
762
|
vmWithdrawAmount: number;
|
|
@@ -873,6 +794,62 @@ export declare class ClientPrimaryAccountHeaderModel {
|
|
|
873
794
|
reservedValue8: number;
|
|
874
795
|
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): ClientPrimaryAccountHeaderModel;
|
|
875
796
|
}
|
|
797
|
+
export declare class DiscriminatorModel {
|
|
798
|
+
static readonly LENGTH: number;
|
|
799
|
+
static readonly OFFSET_TAG = 0;
|
|
800
|
+
static readonly OFFSET_VERSION = 4;
|
|
801
|
+
tag: number;
|
|
802
|
+
version: number;
|
|
803
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): DiscriminatorModel;
|
|
804
|
+
}
|
|
805
|
+
export declare class OperatorModel {
|
|
806
|
+
static readonly LENGTH: number;
|
|
807
|
+
static readonly OFFSET_OPERATOR_ADDRESS = 0;
|
|
808
|
+
static readonly OFFSET_VERSION = 32;
|
|
809
|
+
static readonly OFFSET_RESERVED = 36;
|
|
810
|
+
operatorAddress: Address<any>;
|
|
811
|
+
version: number;
|
|
812
|
+
reserved: number;
|
|
813
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): OperatorModel;
|
|
814
|
+
}
|
|
815
|
+
export declare class LineQuotesModel {
|
|
816
|
+
static readonly LENGTH: number;
|
|
817
|
+
static readonly OFFSET_PX = 0;
|
|
818
|
+
static readonly OFFSET_QTY = 8;
|
|
819
|
+
px: number;
|
|
820
|
+
qty: number;
|
|
821
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): LineQuotesModel;
|
|
822
|
+
}
|
|
823
|
+
export declare class BaseCrncyRecordModel {
|
|
824
|
+
static readonly LENGTH: number;
|
|
825
|
+
static readonly OFFSET_CRNCY_TOKEN_ID = 0;
|
|
826
|
+
static readonly OFFSET_DECS_COUNT = 4;
|
|
827
|
+
static readonly OFFSET_FUNDS = 8;
|
|
828
|
+
static readonly OFFSET_RATE = 16;
|
|
829
|
+
static readonly OFFSET_DENOMINATOR = 24;
|
|
830
|
+
static readonly OFFSET_LOCKED_DRVS_AMOUNT = 32;
|
|
831
|
+
static readonly OFFSET_LOCKED_DRVS_DIVIDENDS_VALUE = 40;
|
|
832
|
+
static readonly OFFSET_MASK = 48;
|
|
833
|
+
crncyTokenId: number;
|
|
834
|
+
decsCount: number;
|
|
835
|
+
funds: number;
|
|
836
|
+
rate: number;
|
|
837
|
+
denominator: number;
|
|
838
|
+
lockedDrvsAmount: number;
|
|
839
|
+
lockedDrvsDividendsValue: number;
|
|
840
|
+
mask: number;
|
|
841
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): BaseCrncyRecordModel;
|
|
842
|
+
}
|
|
843
|
+
export declare class AssetRecordModel {
|
|
844
|
+
static readonly LENGTH: number;
|
|
845
|
+
static readonly OFFSET_ASSET_ID = 0;
|
|
846
|
+
static readonly OFFSET_TEMP_ID = 4;
|
|
847
|
+
static readonly OFFSET_VALUE = 8;
|
|
848
|
+
assetId: number;
|
|
849
|
+
tempId: number;
|
|
850
|
+
value: number;
|
|
851
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): AssetRecordModel;
|
|
852
|
+
}
|
|
876
853
|
export declare class OrderModel {
|
|
877
854
|
static readonly LENGTH: number;
|
|
878
855
|
static readonly OFFSET_QTY = 0;
|
|
@@ -923,6 +900,34 @@ export declare class PxOrdersModel {
|
|
|
923
900
|
end: number;
|
|
924
901
|
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): PxOrdersModel;
|
|
925
902
|
}
|
|
903
|
+
export declare class VmMaskModel {
|
|
904
|
+
static readonly LENGTH: number;
|
|
905
|
+
static readonly OFFSET_VALUE = 0;
|
|
906
|
+
value: number;
|
|
907
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): VmMaskModel;
|
|
908
|
+
}
|
|
909
|
+
export declare class SlotFlagsModel {
|
|
910
|
+
static readonly LENGTH: number;
|
|
911
|
+
static readonly OFFSET_VALUE = 0;
|
|
912
|
+
value: number;
|
|
913
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): SlotFlagsModel;
|
|
914
|
+
}
|
|
915
|
+
export declare class QuoteOrderModel {
|
|
916
|
+
static readonly LENGTH: number;
|
|
917
|
+
static readonly OFFSET_NEW_PRICE = 0;
|
|
918
|
+
static readonly OFFSET_NEW_QTY = 8;
|
|
919
|
+
static readonly OFFSET_OLD_ID = 16;
|
|
920
|
+
newPrice: number;
|
|
921
|
+
newQty: number;
|
|
922
|
+
oldId: number;
|
|
923
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): QuoteOrderModel;
|
|
924
|
+
}
|
|
925
|
+
export declare class QuoteMaskModel {
|
|
926
|
+
static readonly LENGTH: number;
|
|
927
|
+
static readonly OFFSET_VALUE = 0;
|
|
928
|
+
value: number;
|
|
929
|
+
static fromBuffer(data: Base64EncodedDataResponse, offset?: number): QuoteMaskModel;
|
|
930
|
+
}
|
|
926
931
|
export declare class PrivateClientHeaderModel {
|
|
927
932
|
static readonly LENGTH: number;
|
|
928
933
|
static readonly OFFSET_TAG = 0;
|