@uniswap/client-trading 0.6.0 → 0.7.0
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/trading/v1/api-tradingService_connectquery.d.ts +15 -1
- package/dist/trading/v1/api-tradingService_connectquery.js +15 -1
- package/dist/trading/v1/api_connect.d.ts +11 -1
- package/dist/trading/v1/api_connect.js +11 -1
- package/dist/trading/v1/api_pb.d.ts +736 -1
- package/dist/trading/v1/api_pb.js +702 -0
- package/package.json +1 -1
|
@@ -622,6 +622,13 @@ export var PlanStepType;
|
|
|
622
622
|
* @generated from enum value: PLAN_STEP_TYPE_MARGIN_EXECUTE = 16;
|
|
623
623
|
*/
|
|
624
624
|
PlanStepType[PlanStepType["MARGIN_EXECUTE"] = 16] = "MARGIN_EXECUTE";
|
|
625
|
+
/**
|
|
626
|
+
* Fused Swap→Bridge: one Universal Router transaction that swaps on the
|
|
627
|
+
* source chain and deposits the output into the Across SpokePool.
|
|
628
|
+
*
|
|
629
|
+
* @generated from enum value: PLAN_STEP_TYPE_SWAP_BRIDGE = 17;
|
|
630
|
+
*/
|
|
631
|
+
PlanStepType[PlanStepType["SWAP_BRIDGE"] = 17] = "SWAP_BRIDGE";
|
|
625
632
|
})(PlanStepType || (PlanStepType = {}));
|
|
626
633
|
// Retrieve enum metadata with: proto3.getEnumType(PlanStepType)
|
|
627
634
|
proto3.util.setEnumType(PlanStepType, "trading.v1.PlanStepType", [
|
|
@@ -642,6 +649,7 @@ proto3.util.setEnumType(PlanStepType, "trading.v1.PlanStepType", [
|
|
|
642
649
|
{ no: 14, name: "PLAN_STEP_TYPE_VAULT_DEPOSIT" },
|
|
643
650
|
{ no: 15, name: "PLAN_STEP_TYPE_VAULT_WITHDRAW" },
|
|
644
651
|
{ no: 16, name: "PLAN_STEP_TYPE_MARGIN_EXECUTE" },
|
|
652
|
+
{ no: 17, name: "PLAN_STEP_TYPE_SWAP_BRIDGE" },
|
|
645
653
|
]);
|
|
646
654
|
/**
|
|
647
655
|
* Set when the output is a fee taken from the swap; unset for the swapper's
|
|
@@ -959,6 +967,107 @@ proto3.util.setEnumType(MarginVenue, "trading.v1.MarginVenue", [
|
|
|
959
967
|
{ no: 1, name: "AAVE_V3" },
|
|
960
968
|
{ no: 2, name: "AAVE_V4" },
|
|
961
969
|
]);
|
|
970
|
+
/**
|
|
971
|
+
* Echoed on the response so a client can tell which action was priced without
|
|
972
|
+
* re-deriving it from the request. Mirrors the request's oneof exactly.
|
|
973
|
+
* Named intent to match the error codes (INTENT_MISMATCH) and the plan step
|
|
974
|
+
* vocabulary, so one word is used end to end.
|
|
975
|
+
*
|
|
976
|
+
* @generated from enum trading.v1.MarginIntent
|
|
977
|
+
*/
|
|
978
|
+
export var MarginIntent;
|
|
979
|
+
(function (MarginIntent) {
|
|
980
|
+
/**
|
|
981
|
+
* @generated from enum value: MARGIN_INTENT_OPEN = 0;
|
|
982
|
+
*/
|
|
983
|
+
MarginIntent[MarginIntent["OPEN"] = 0] = "OPEN";
|
|
984
|
+
/**
|
|
985
|
+
* @generated from enum value: MARGIN_INTENT_CLOSE = 1;
|
|
986
|
+
*/
|
|
987
|
+
MarginIntent[MarginIntent["CLOSE"] = 1] = "CLOSE";
|
|
988
|
+
/**
|
|
989
|
+
* @generated from enum value: MARGIN_INTENT_INCREASE_LEVERAGE = 2;
|
|
990
|
+
*/
|
|
991
|
+
MarginIntent[MarginIntent["INCREASE_LEVERAGE"] = 2] = "INCREASE_LEVERAGE";
|
|
992
|
+
/**
|
|
993
|
+
* @generated from enum value: MARGIN_INTENT_DECREASE_LEVERAGE = 3;
|
|
994
|
+
*/
|
|
995
|
+
MarginIntent[MarginIntent["DECREASE_LEVERAGE"] = 3] = "DECREASE_LEVERAGE";
|
|
996
|
+
/**
|
|
997
|
+
* @generated from enum value: MARGIN_INTENT_ADD_EQUITY = 4;
|
|
998
|
+
*/
|
|
999
|
+
MarginIntent[MarginIntent["ADD_EQUITY"] = 4] = "ADD_EQUITY";
|
|
1000
|
+
/**
|
|
1001
|
+
* @generated from enum value: MARGIN_INTENT_WITHDRAW_EQUITY = 5;
|
|
1002
|
+
*/
|
|
1003
|
+
MarginIntent[MarginIntent["WITHDRAW_EQUITY"] = 5] = "WITHDRAW_EQUITY";
|
|
1004
|
+
/**
|
|
1005
|
+
* @generated from enum value: MARGIN_INTENT_ADD_EQUITY_AND_INCREASE_LEVERAGE = 6;
|
|
1006
|
+
*/
|
|
1007
|
+
MarginIntent[MarginIntent["ADD_EQUITY_AND_INCREASE_LEVERAGE"] = 6] = "ADD_EQUITY_AND_INCREASE_LEVERAGE";
|
|
1008
|
+
/**
|
|
1009
|
+
* @generated from enum value: MARGIN_INTENT_ADD_EQUITY_AND_DECREASE_LEVERAGE = 7;
|
|
1010
|
+
*/
|
|
1011
|
+
MarginIntent[MarginIntent["ADD_EQUITY_AND_DECREASE_LEVERAGE"] = 7] = "ADD_EQUITY_AND_DECREASE_LEVERAGE";
|
|
1012
|
+
/**
|
|
1013
|
+
* @generated from enum value: MARGIN_INTENT_WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE = 8;
|
|
1014
|
+
*/
|
|
1015
|
+
MarginIntent[MarginIntent["WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE"] = 8] = "WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE";
|
|
1016
|
+
/**
|
|
1017
|
+
* @generated from enum value: MARGIN_INTENT_WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE = 9;
|
|
1018
|
+
*/
|
|
1019
|
+
MarginIntent[MarginIntent["WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE"] = 9] = "WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE";
|
|
1020
|
+
})(MarginIntent || (MarginIntent = {}));
|
|
1021
|
+
// Retrieve enum metadata with: proto3.getEnumType(MarginIntent)
|
|
1022
|
+
proto3.util.setEnumType(MarginIntent, "trading.v1.MarginIntent", [
|
|
1023
|
+
{ no: 0, name: "MARGIN_INTENT_OPEN" },
|
|
1024
|
+
{ no: 1, name: "MARGIN_INTENT_CLOSE" },
|
|
1025
|
+
{ no: 2, name: "MARGIN_INTENT_INCREASE_LEVERAGE" },
|
|
1026
|
+
{ no: 3, name: "MARGIN_INTENT_DECREASE_LEVERAGE" },
|
|
1027
|
+
{ no: 4, name: "MARGIN_INTENT_ADD_EQUITY" },
|
|
1028
|
+
{ no: 5, name: "MARGIN_INTENT_WITHDRAW_EQUITY" },
|
|
1029
|
+
{ no: 6, name: "MARGIN_INTENT_ADD_EQUITY_AND_INCREASE_LEVERAGE" },
|
|
1030
|
+
{ no: 7, name: "MARGIN_INTENT_ADD_EQUITY_AND_DECREASE_LEVERAGE" },
|
|
1031
|
+
{ no: 8, name: "MARGIN_INTENT_WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE" },
|
|
1032
|
+
{ no: 9, name: "MARGIN_INTENT_WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE" },
|
|
1033
|
+
]);
|
|
1034
|
+
/**
|
|
1035
|
+
* One on-chain call inside the router's execute([...actions]) stream. The
|
|
1036
|
+
* quote decomposes an action into these; the plan stamps them into calldata.
|
|
1037
|
+
*
|
|
1038
|
+
* @generated from enum trading.v1.MarginOperationType
|
|
1039
|
+
*/
|
|
1040
|
+
export var MarginOperationType;
|
|
1041
|
+
(function (MarginOperationType) {
|
|
1042
|
+
/**
|
|
1043
|
+
* @generated from enum value: INCREASE_POSITION = 0;
|
|
1044
|
+
*/
|
|
1045
|
+
MarginOperationType[MarginOperationType["INCREASE_POSITION"] = 0] = "INCREASE_POSITION";
|
|
1046
|
+
/**
|
|
1047
|
+
* @generated from enum value: DECREASE_POSITION = 1;
|
|
1048
|
+
*/
|
|
1049
|
+
MarginOperationType[MarginOperationType["DECREASE_POSITION"] = 1] = "DECREASE_POSITION";
|
|
1050
|
+
/**
|
|
1051
|
+
* @generated from enum value: ADD_COLLATERAL = 2;
|
|
1052
|
+
*/
|
|
1053
|
+
MarginOperationType[MarginOperationType["ADD_COLLATERAL"] = 2] = "ADD_COLLATERAL";
|
|
1054
|
+
/**
|
|
1055
|
+
* @generated from enum value: WITHDRAW = 3;
|
|
1056
|
+
*/
|
|
1057
|
+
MarginOperationType[MarginOperationType["WITHDRAW"] = 3] = "WITHDRAW";
|
|
1058
|
+
/**
|
|
1059
|
+
* @generated from enum value: SWEEP = 4;
|
|
1060
|
+
*/
|
|
1061
|
+
MarginOperationType[MarginOperationType["SWEEP"] = 4] = "SWEEP";
|
|
1062
|
+
})(MarginOperationType || (MarginOperationType = {}));
|
|
1063
|
+
// Retrieve enum metadata with: proto3.getEnumType(MarginOperationType)
|
|
1064
|
+
proto3.util.setEnumType(MarginOperationType, "trading.v1.MarginOperationType", [
|
|
1065
|
+
{ no: 0, name: "INCREASE_POSITION" },
|
|
1066
|
+
{ no: 1, name: "DECREASE_POSITION" },
|
|
1067
|
+
{ no: 2, name: "ADD_COLLATERAL" },
|
|
1068
|
+
{ no: 3, name: "WITHDRAW" },
|
|
1069
|
+
{ no: 4, name: "SWEEP" },
|
|
1070
|
+
]);
|
|
962
1071
|
/**
|
|
963
1072
|
* @generated from message trading.v1.Encode7702Request
|
|
964
1073
|
*/
|
|
@@ -9317,3 +9426,596 @@ MarginMarketsResponse.fields = proto3.util.newFieldList(() => [
|
|
|
9317
9426
|
{ no: 2, name: "markets", kind: "message", T: MarginMarketRow, repeated: true },
|
|
9318
9427
|
{ no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9319
9428
|
]);
|
|
9429
|
+
/**
|
|
9430
|
+
* increaseLeverage, decreaseLeverage. Equity is held, so no amount.
|
|
9431
|
+
*
|
|
9432
|
+
* @generated from message trading.v1.MarginLeverageAction
|
|
9433
|
+
*/
|
|
9434
|
+
export class MarginLeverageAction extends Message {
|
|
9435
|
+
constructor(data) {
|
|
9436
|
+
super();
|
|
9437
|
+
/**
|
|
9438
|
+
* @generated from field: string position_id = 1;
|
|
9439
|
+
*/
|
|
9440
|
+
this.positionId = "";
|
|
9441
|
+
/**
|
|
9442
|
+
* Decimal string ("3", "2.55"), never a float.
|
|
9443
|
+
*
|
|
9444
|
+
* @generated from field: string leverage_target = 2;
|
|
9445
|
+
*/
|
|
9446
|
+
this.leverageTarget = "";
|
|
9447
|
+
proto3.util.initPartial(data, this);
|
|
9448
|
+
}
|
|
9449
|
+
static fromBinary(bytes, options) {
|
|
9450
|
+
return new MarginLeverageAction().fromBinary(bytes, options);
|
|
9451
|
+
}
|
|
9452
|
+
static fromJson(jsonValue, options) {
|
|
9453
|
+
return new MarginLeverageAction().fromJson(jsonValue, options);
|
|
9454
|
+
}
|
|
9455
|
+
static fromJsonString(jsonString, options) {
|
|
9456
|
+
return new MarginLeverageAction().fromJsonString(jsonString, options);
|
|
9457
|
+
}
|
|
9458
|
+
static equals(a, b) {
|
|
9459
|
+
return proto3.util.equals(MarginLeverageAction, a, b);
|
|
9460
|
+
}
|
|
9461
|
+
}
|
|
9462
|
+
MarginLeverageAction.runtime = proto3;
|
|
9463
|
+
MarginLeverageAction.typeName = "trading.v1.MarginLeverageAction";
|
|
9464
|
+
MarginLeverageAction.fields = proto3.util.newFieldList(() => [
|
|
9465
|
+
{ no: 1, name: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9466
|
+
{ no: 2, name: "leverage_target", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9467
|
+
]);
|
|
9468
|
+
/**
|
|
9469
|
+
* The four composites. Both axes move, so both magnitudes are carried.
|
|
9470
|
+
*
|
|
9471
|
+
* @generated from message trading.v1.MarginEquityLeverageAction
|
|
9472
|
+
*/
|
|
9473
|
+
export class MarginEquityLeverageAction extends Message {
|
|
9474
|
+
constructor(data) {
|
|
9475
|
+
super();
|
|
9476
|
+
/**
|
|
9477
|
+
* @generated from field: string position_id = 1;
|
|
9478
|
+
*/
|
|
9479
|
+
this.positionId = "";
|
|
9480
|
+
/**
|
|
9481
|
+
* @generated from field: string leverage_target = 2;
|
|
9482
|
+
*/
|
|
9483
|
+
this.leverageTarget = "";
|
|
9484
|
+
/**
|
|
9485
|
+
* @generated from field: string amount = 3;
|
|
9486
|
+
*/
|
|
9487
|
+
this.amount = "";
|
|
9488
|
+
proto3.util.initPartial(data, this);
|
|
9489
|
+
}
|
|
9490
|
+
static fromBinary(bytes, options) {
|
|
9491
|
+
return new MarginEquityLeverageAction().fromBinary(bytes, options);
|
|
9492
|
+
}
|
|
9493
|
+
static fromJson(jsonValue, options) {
|
|
9494
|
+
return new MarginEquityLeverageAction().fromJson(jsonValue, options);
|
|
9495
|
+
}
|
|
9496
|
+
static fromJsonString(jsonString, options) {
|
|
9497
|
+
return new MarginEquityLeverageAction().fromJsonString(jsonString, options);
|
|
9498
|
+
}
|
|
9499
|
+
static equals(a, b) {
|
|
9500
|
+
return proto3.util.equals(MarginEquityLeverageAction, a, b);
|
|
9501
|
+
}
|
|
9502
|
+
}
|
|
9503
|
+
MarginEquityLeverageAction.runtime = proto3;
|
|
9504
|
+
MarginEquityLeverageAction.typeName = "trading.v1.MarginEquityLeverageAction";
|
|
9505
|
+
MarginEquityLeverageAction.fields = proto3.util.newFieldList(() => [
|
|
9506
|
+
{ no: 1, name: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9507
|
+
{ no: 2, name: "leverage_target", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9508
|
+
{ no: 3, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9509
|
+
]);
|
|
9510
|
+
/**
|
|
9511
|
+
* addEquity, withdrawEquity. Size is held and leverage follows, so no target.
|
|
9512
|
+
*
|
|
9513
|
+
* `amount` is denominated in wallet_token on addEquity, and in the COLLATERAL
|
|
9514
|
+
* token on withdrawEquity. That asymmetry is deliberate, and it is the one
|
|
9515
|
+
* place the "amount is always wallet_token" rule breaks.
|
|
9516
|
+
*
|
|
9517
|
+
* A withdrawal's safety is a property of the position, not of the price its
|
|
9518
|
+
* proceeds fetch: how much collateral can leave before health hits the floor
|
|
9519
|
+
* is answerable from the position alone. Denominating in wallet_token would
|
|
9520
|
+
* make that check depend on a swap quote, so whether a withdrawal is allowed
|
|
9521
|
+
* would move with the funding route. It also matches the on-chain primitive,
|
|
9522
|
+
* which takes a collateral amount, and the max-withdrawable guard, which is
|
|
9523
|
+
* computed in collateral terms.
|
|
9524
|
+
*
|
|
9525
|
+
* @generated from message trading.v1.MarginEquityAction
|
|
9526
|
+
*/
|
|
9527
|
+
export class MarginEquityAction extends Message {
|
|
9528
|
+
constructor(data) {
|
|
9529
|
+
super();
|
|
9530
|
+
/**
|
|
9531
|
+
* @generated from field: string position_id = 1;
|
|
9532
|
+
*/
|
|
9533
|
+
this.positionId = "";
|
|
9534
|
+
/**
|
|
9535
|
+
* @generated from field: string amount = 2;
|
|
9536
|
+
*/
|
|
9537
|
+
this.amount = "";
|
|
9538
|
+
proto3.util.initPartial(data, this);
|
|
9539
|
+
}
|
|
9540
|
+
static fromBinary(bytes, options) {
|
|
9541
|
+
return new MarginEquityAction().fromBinary(bytes, options);
|
|
9542
|
+
}
|
|
9543
|
+
static fromJson(jsonValue, options) {
|
|
9544
|
+
return new MarginEquityAction().fromJson(jsonValue, options);
|
|
9545
|
+
}
|
|
9546
|
+
static fromJsonString(jsonString, options) {
|
|
9547
|
+
return new MarginEquityAction().fromJsonString(jsonString, options);
|
|
9548
|
+
}
|
|
9549
|
+
static equals(a, b) {
|
|
9550
|
+
return proto3.util.equals(MarginEquityAction, a, b);
|
|
9551
|
+
}
|
|
9552
|
+
}
|
|
9553
|
+
MarginEquityAction.runtime = proto3;
|
|
9554
|
+
MarginEquityAction.typeName = "trading.v1.MarginEquityAction";
|
|
9555
|
+
MarginEquityAction.fields = proto3.util.newFieldList(() => [
|
|
9556
|
+
{ no: 1, name: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9557
|
+
{ no: 2, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9558
|
+
]);
|
|
9559
|
+
/**
|
|
9560
|
+
* close. The whole position, so structurally neither a target nor an amount.
|
|
9561
|
+
*
|
|
9562
|
+
* @generated from message trading.v1.MarginPositionAction
|
|
9563
|
+
*/
|
|
9564
|
+
export class MarginPositionAction extends Message {
|
|
9565
|
+
constructor(data) {
|
|
9566
|
+
super();
|
|
9567
|
+
/**
|
|
9568
|
+
* @generated from field: string position_id = 1;
|
|
9569
|
+
*/
|
|
9570
|
+
this.positionId = "";
|
|
9571
|
+
proto3.util.initPartial(data, this);
|
|
9572
|
+
}
|
|
9573
|
+
static fromBinary(bytes, options) {
|
|
9574
|
+
return new MarginPositionAction().fromBinary(bytes, options);
|
|
9575
|
+
}
|
|
9576
|
+
static fromJson(jsonValue, options) {
|
|
9577
|
+
return new MarginPositionAction().fromJson(jsonValue, options);
|
|
9578
|
+
}
|
|
9579
|
+
static fromJsonString(jsonString, options) {
|
|
9580
|
+
return new MarginPositionAction().fromJsonString(jsonString, options);
|
|
9581
|
+
}
|
|
9582
|
+
static equals(a, b) {
|
|
9583
|
+
return proto3.util.equals(MarginPositionAction, a, b);
|
|
9584
|
+
}
|
|
9585
|
+
}
|
|
9586
|
+
MarginPositionAction.runtime = proto3;
|
|
9587
|
+
MarginPositionAction.typeName = "trading.v1.MarginPositionAction";
|
|
9588
|
+
MarginPositionAction.fields = proto3.util.newFieldList(() => [
|
|
9589
|
+
{ no: 1, name: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9590
|
+
]);
|
|
9591
|
+
/**
|
|
9592
|
+
* open. No position_id: the server allocates one at plan create.
|
|
9593
|
+
*
|
|
9594
|
+
* @generated from message trading.v1.MarginOpenAction
|
|
9595
|
+
*/
|
|
9596
|
+
export class MarginOpenAction extends Message {
|
|
9597
|
+
constructor(data) {
|
|
9598
|
+
super();
|
|
9599
|
+
/**
|
|
9600
|
+
* @generated from field: string leverage_target = 1;
|
|
9601
|
+
*/
|
|
9602
|
+
this.leverageTarget = "";
|
|
9603
|
+
/**
|
|
9604
|
+
* The LENDING allowlist, distinct from `swap_config.protocols` (the AMM
|
|
9605
|
+
* allowlist for the wallet-side swap).
|
|
9606
|
+
*
|
|
9607
|
+
* @generated from field: repeated trading.v1.MarginVenue venues = 2;
|
|
9608
|
+
*/
|
|
9609
|
+
this.venues = [];
|
|
9610
|
+
/**
|
|
9611
|
+
* @generated from field: string amount = 3;
|
|
9612
|
+
*/
|
|
9613
|
+
this.amount = "";
|
|
9614
|
+
proto3.util.initPartial(data, this);
|
|
9615
|
+
}
|
|
9616
|
+
static fromBinary(bytes, options) {
|
|
9617
|
+
return new MarginOpenAction().fromBinary(bytes, options);
|
|
9618
|
+
}
|
|
9619
|
+
static fromJson(jsonValue, options) {
|
|
9620
|
+
return new MarginOpenAction().fromJson(jsonValue, options);
|
|
9621
|
+
}
|
|
9622
|
+
static fromJsonString(jsonString, options) {
|
|
9623
|
+
return new MarginOpenAction().fromJsonString(jsonString, options);
|
|
9624
|
+
}
|
|
9625
|
+
static equals(a, b) {
|
|
9626
|
+
return proto3.util.equals(MarginOpenAction, a, b);
|
|
9627
|
+
}
|
|
9628
|
+
}
|
|
9629
|
+
MarginOpenAction.runtime = proto3;
|
|
9630
|
+
MarginOpenAction.typeName = "trading.v1.MarginOpenAction";
|
|
9631
|
+
MarginOpenAction.fields = proto3.util.newFieldList(() => [
|
|
9632
|
+
{ no: 1, name: "leverage_target", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9633
|
+
{ no: 2, name: "venues", kind: "enum", T: proto3.getEnumType(MarginVenue), repeated: true },
|
|
9634
|
+
{ no: 3, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9635
|
+
]);
|
|
9636
|
+
/**
|
|
9637
|
+
* EXECUTION POLICY for the wallet-side swap, and nothing else. It names no
|
|
9638
|
+
* token, no chain, no amount and no trade type: identity lives at the top level
|
|
9639
|
+
* in wallet_token / wallet_chain_id, the magnitude lives in the action key, and
|
|
9640
|
+
* exact-in vs exact-out follows from whether that key pays in or pays out.
|
|
9641
|
+
*
|
|
9642
|
+
* Kept separate from wallet_token because the two have different lifetimes.
|
|
9643
|
+
* wallet_token is always meaningful; this block can be moot, since paying in
|
|
9644
|
+
* the collateral token needs no funding swap at all, and whether one is needed
|
|
9645
|
+
* is a routing outcome not knowable at request time.
|
|
9646
|
+
*
|
|
9647
|
+
* @generated from message trading.v1.MarginSwapConfig
|
|
9648
|
+
*/
|
|
9649
|
+
export class MarginSwapConfig extends Message {
|
|
9650
|
+
constructor(data) {
|
|
9651
|
+
super();
|
|
9652
|
+
/**
|
|
9653
|
+
* @generated from field: repeated trading.v1.Protocols protocols = 3;
|
|
9654
|
+
*/
|
|
9655
|
+
this.protocols = [];
|
|
9656
|
+
proto3.util.initPartial(data, this);
|
|
9657
|
+
}
|
|
9658
|
+
static fromBinary(bytes, options) {
|
|
9659
|
+
return new MarginSwapConfig().fromBinary(bytes, options);
|
|
9660
|
+
}
|
|
9661
|
+
static fromJson(jsonValue, options) {
|
|
9662
|
+
return new MarginSwapConfig().fromJson(jsonValue, options);
|
|
9663
|
+
}
|
|
9664
|
+
static fromJsonString(jsonString, options) {
|
|
9665
|
+
return new MarginSwapConfig().fromJsonString(jsonString, options);
|
|
9666
|
+
}
|
|
9667
|
+
static equals(a, b) {
|
|
9668
|
+
return proto3.util.equals(MarginSwapConfig, a, b);
|
|
9669
|
+
}
|
|
9670
|
+
}
|
|
9671
|
+
MarginSwapConfig.runtime = proto3;
|
|
9672
|
+
MarginSwapConfig.typeName = "trading.v1.MarginSwapConfig";
|
|
9673
|
+
MarginSwapConfig.fields = proto3.util.newFieldList(() => [
|
|
9674
|
+
{ no: 1, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
9675
|
+
{ no: 2, name: "auto_slippage", kind: "enum", T: proto3.getEnumType(AutoSlippage), opt: true },
|
|
9676
|
+
{ no: 3, name: "protocols", kind: "enum", T: proto3.getEnumType(Protocols), repeated: true },
|
|
9677
|
+
]);
|
|
9678
|
+
/**
|
|
9679
|
+
* @generated from message trading.v1.MarginQuoteRequest
|
|
9680
|
+
*/
|
|
9681
|
+
export class MarginQuoteRequest extends Message {
|
|
9682
|
+
constructor(data) {
|
|
9683
|
+
super();
|
|
9684
|
+
/**
|
|
9685
|
+
* The chain the POSITION lives on. Named rather than left as a bare chain_id
|
|
9686
|
+
* because two chains are in play: with one of them unqualified, a client
|
|
9687
|
+
* reasonably reads it as "the" chain, sets it to the chain it is paying from,
|
|
9688
|
+
* and silently gets a cross-chain funding flow it never asked for. Both are
|
|
9689
|
+
* named so both have to be stated.
|
|
9690
|
+
*
|
|
9691
|
+
* @generated from field: int32 position_chain_id = 1;
|
|
9692
|
+
*/
|
|
9693
|
+
this.positionChainId = 0;
|
|
9694
|
+
/**
|
|
9695
|
+
* @generated from field: string exposure_token = 2;
|
|
9696
|
+
*/
|
|
9697
|
+
this.exposureToken = "";
|
|
9698
|
+
/**
|
|
9699
|
+
* @generated from field: string counter_token = 3;
|
|
9700
|
+
*/
|
|
9701
|
+
this.counterToken = "";
|
|
9702
|
+
/**
|
|
9703
|
+
* @generated from field: trading.v1.MarginDirection direction = 4;
|
|
9704
|
+
*/
|
|
9705
|
+
this.direction = MarginDirection.LONG;
|
|
9706
|
+
/**
|
|
9707
|
+
* @generated from field: string swapper = 5;
|
|
9708
|
+
*/
|
|
9709
|
+
this.swapper = "";
|
|
9710
|
+
/**
|
|
9711
|
+
* @generated from oneof trading.v1.MarginQuoteRequest.action
|
|
9712
|
+
*/
|
|
9713
|
+
this.action = { case: undefined };
|
|
9714
|
+
proto3.util.initPartial(data, this);
|
|
9715
|
+
}
|
|
9716
|
+
static fromBinary(bytes, options) {
|
|
9717
|
+
return new MarginQuoteRequest().fromBinary(bytes, options);
|
|
9718
|
+
}
|
|
9719
|
+
static fromJson(jsonValue, options) {
|
|
9720
|
+
return new MarginQuoteRequest().fromJson(jsonValue, options);
|
|
9721
|
+
}
|
|
9722
|
+
static fromJsonString(jsonString, options) {
|
|
9723
|
+
return new MarginQuoteRequest().fromJsonString(jsonString, options);
|
|
9724
|
+
}
|
|
9725
|
+
static equals(a, b) {
|
|
9726
|
+
return proto3.util.equals(MarginQuoteRequest, a, b);
|
|
9727
|
+
}
|
|
9728
|
+
}
|
|
9729
|
+
MarginQuoteRequest.runtime = proto3;
|
|
9730
|
+
MarginQuoteRequest.typeName = "trading.v1.MarginQuoteRequest";
|
|
9731
|
+
MarginQuoteRequest.fields = proto3.util.newFieldList(() => [
|
|
9732
|
+
{ no: 1, name: "position_chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9733
|
+
{ no: 2, name: "exposure_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9734
|
+
{ no: 3, name: "counter_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9735
|
+
{ no: 4, name: "direction", kind: "enum", T: proto3.getEnumType(MarginDirection) },
|
|
9736
|
+
{ no: 5, name: "swapper", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9737
|
+
{ no: 6, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
9738
|
+
{ no: 8, name: "swap_config", kind: "message", T: MarginSwapConfig, opt: true },
|
|
9739
|
+
{ no: 9, name: "wallet_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9740
|
+
{ no: 10, name: "wallet_chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
9741
|
+
{ no: 20, name: "open", kind: "message", T: MarginOpenAction, oneof: "action" },
|
|
9742
|
+
{ no: 21, name: "close", kind: "message", T: MarginPositionAction, oneof: "action" },
|
|
9743
|
+
{ no: 22, name: "increase_leverage", kind: "message", T: MarginLeverageAction, oneof: "action" },
|
|
9744
|
+
{ no: 23, name: "decrease_leverage", kind: "message", T: MarginLeverageAction, oneof: "action" },
|
|
9745
|
+
{ no: 24, name: "add_equity", kind: "message", T: MarginEquityAction, oneof: "action" },
|
|
9746
|
+
{ no: 25, name: "withdraw_equity", kind: "message", T: MarginEquityAction, oneof: "action" },
|
|
9747
|
+
{ no: 26, name: "add_equity_and_increase_leverage", kind: "message", T: MarginEquityLeverageAction, oneof: "action" },
|
|
9748
|
+
{ no: 27, name: "add_equity_and_decrease_leverage", kind: "message", T: MarginEquityLeverageAction, oneof: "action" },
|
|
9749
|
+
{ no: 28, name: "withdraw_equity_and_increase_leverage", kind: "message", T: MarginEquityLeverageAction, oneof: "action" },
|
|
9750
|
+
{ no: 29, name: "withdraw_equity_and_decrease_leverage", kind: "message", T: MarginEquityLeverageAction, oneof: "action" },
|
|
9751
|
+
]);
|
|
9752
|
+
/**
|
|
9753
|
+
* The confirmed bounds for one operation. Which fields are set follows from
|
|
9754
|
+
* `type`; they are the numbers that stamp into calldata, so they are in native
|
|
9755
|
+
* token decimals (LTV and leverage are WAD).
|
|
9756
|
+
*
|
|
9757
|
+
* @generated from message trading.v1.MarginOperation
|
|
9758
|
+
*/
|
|
9759
|
+
export class MarginOperation extends Message {
|
|
9760
|
+
constructor(data) {
|
|
9761
|
+
super();
|
|
9762
|
+
/**
|
|
9763
|
+
* @generated from field: trading.v1.MarginOperationType type = 1;
|
|
9764
|
+
*/
|
|
9765
|
+
this.type = MarginOperationType.INCREASE_POSITION;
|
|
9766
|
+
proto3.util.initPartial(data, this);
|
|
9767
|
+
}
|
|
9768
|
+
static fromBinary(bytes, options) {
|
|
9769
|
+
return new MarginOperation().fromBinary(bytes, options);
|
|
9770
|
+
}
|
|
9771
|
+
static fromJson(jsonValue, options) {
|
|
9772
|
+
return new MarginOperation().fromJson(jsonValue, options);
|
|
9773
|
+
}
|
|
9774
|
+
static fromJsonString(jsonString, options) {
|
|
9775
|
+
return new MarginOperation().fromJsonString(jsonString, options);
|
|
9776
|
+
}
|
|
9777
|
+
static equals(a, b) {
|
|
9778
|
+
return proto3.util.equals(MarginOperation, a, b);
|
|
9779
|
+
}
|
|
9780
|
+
}
|
|
9781
|
+
MarginOperation.runtime = proto3;
|
|
9782
|
+
MarginOperation.typeName = "trading.v1.MarginOperation";
|
|
9783
|
+
MarginOperation.fields = proto3.util.newFieldList(() => [
|
|
9784
|
+
{ no: 1, name: "type", kind: "enum", T: proto3.getEnumType(MarginOperationType) },
|
|
9785
|
+
{ no: 2, name: "collateral_to_buy", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9786
|
+
{ no: 3, name: "max_debt_in", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9787
|
+
{ no: 4, name: "debt_to_repay", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9788
|
+
{ no: 5, name: "max_collateral_in", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9789
|
+
{ no: 6, name: "max_ltv_after", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9790
|
+
{ no: 7, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9791
|
+
{ no: 8, name: "min_hop_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9792
|
+
{ no: 9, name: "effective_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9793
|
+
]);
|
|
9794
|
+
/**
|
|
9795
|
+
* @generated from message trading.v1.MarginExecutionLeg
|
|
9796
|
+
*/
|
|
9797
|
+
export class MarginExecutionLeg extends Message {
|
|
9798
|
+
constructor(data) {
|
|
9799
|
+
super();
|
|
9800
|
+
/**
|
|
9801
|
+
* @generated from field: trading.v1.MarginVenue venue = 1;
|
|
9802
|
+
*/
|
|
9803
|
+
this.venue = MarginVenue.MORPHO;
|
|
9804
|
+
/**
|
|
9805
|
+
* Ordered. A composite action populates more than one.
|
|
9806
|
+
*
|
|
9807
|
+
* @generated from field: repeated trading.v1.MarginOperation operations = 3;
|
|
9808
|
+
*/
|
|
9809
|
+
this.operations = [];
|
|
9810
|
+
proto3.util.initPartial(data, this);
|
|
9811
|
+
}
|
|
9812
|
+
static fromBinary(bytes, options) {
|
|
9813
|
+
return new MarginExecutionLeg().fromBinary(bytes, options);
|
|
9814
|
+
}
|
|
9815
|
+
static fromJson(jsonValue, options) {
|
|
9816
|
+
return new MarginExecutionLeg().fromJson(jsonValue, options);
|
|
9817
|
+
}
|
|
9818
|
+
static fromJsonString(jsonString, options) {
|
|
9819
|
+
return new MarginExecutionLeg().fromJsonString(jsonString, options);
|
|
9820
|
+
}
|
|
9821
|
+
static equals(a, b) {
|
|
9822
|
+
return proto3.util.equals(MarginExecutionLeg, a, b);
|
|
9823
|
+
}
|
|
9824
|
+
}
|
|
9825
|
+
MarginExecutionLeg.runtime = proto3;
|
|
9826
|
+
MarginExecutionLeg.typeName = "trading.v1.MarginExecutionLeg";
|
|
9827
|
+
MarginExecutionLeg.fields = proto3.util.newFieldList(() => [
|
|
9828
|
+
{ no: 1, name: "venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
|
|
9829
|
+
{ no: 2, name: "sub_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9830
|
+
{ no: 3, name: "operations", kind: "message", T: MarginOperation, repeated: true },
|
|
9831
|
+
]);
|
|
9832
|
+
/**
|
|
9833
|
+
* The wallet-side swap as priced, in the same shape /quote uses for an ordinary
|
|
9834
|
+
* swap, so the funding leg reads natively rather than inventing a fourth
|
|
9835
|
+
* swap-quote vocabulary.
|
|
9836
|
+
*
|
|
9837
|
+
* Present IFF a swap was actually priced, so its presence is the signal that
|
|
9838
|
+
* one happened. Absent when the action moves no equity, and absent when the
|
|
9839
|
+
* caller already holds the collateral: paying in the collateral itself needs no
|
|
9840
|
+
* funding swap, and a block whose input and output name the same token and the
|
|
9841
|
+
* same amount describes no trade.
|
|
9842
|
+
*
|
|
9843
|
+
* 7 was auto_slippage: a request-side mode, never an answer. What a caller
|
|
9844
|
+
* needs back is the percent it RESOLVED to, which slippage_tolerance already
|
|
9845
|
+
* carries.
|
|
9846
|
+
* 8 was protocols: an echo of the request that no consumer read, and as a
|
|
9847
|
+
* repeated field it serializes as [] whether the caller named none or the
|
|
9848
|
+
* route used none, so it could not carry its own meaning.
|
|
9849
|
+
*
|
|
9850
|
+
* @generated from message trading.v1.MarginFunding
|
|
9851
|
+
*/
|
|
9852
|
+
export class MarginFunding extends Message {
|
|
9853
|
+
constructor(data) {
|
|
9854
|
+
super();
|
|
9855
|
+
/**
|
|
9856
|
+
* @generated from field: int32 token_in_chain_id = 1;
|
|
9857
|
+
*/
|
|
9858
|
+
this.tokenInChainId = 0;
|
|
9859
|
+
proto3.util.initPartial(data, this);
|
|
9860
|
+
}
|
|
9861
|
+
static fromBinary(bytes, options) {
|
|
9862
|
+
return new MarginFunding().fromBinary(bytes, options);
|
|
9863
|
+
}
|
|
9864
|
+
static fromJson(jsonValue, options) {
|
|
9865
|
+
return new MarginFunding().fromJson(jsonValue, options);
|
|
9866
|
+
}
|
|
9867
|
+
static fromJsonString(jsonString, options) {
|
|
9868
|
+
return new MarginFunding().fromJsonString(jsonString, options);
|
|
9869
|
+
}
|
|
9870
|
+
static equals(a, b) {
|
|
9871
|
+
return proto3.util.equals(MarginFunding, a, b);
|
|
9872
|
+
}
|
|
9873
|
+
}
|
|
9874
|
+
MarginFunding.runtime = proto3;
|
|
9875
|
+
MarginFunding.typeName = "trading.v1.MarginFunding";
|
|
9876
|
+
MarginFunding.fields = proto3.util.newFieldList(() => [
|
|
9877
|
+
{ no: 1, name: "token_in_chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9878
|
+
{ no: 3, name: "input", kind: "message", T: QuoteInput },
|
|
9879
|
+
{ no: 4, name: "output", kind: "message", T: QuoteOutput },
|
|
9880
|
+
{ no: 6, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
9881
|
+
{ no: 9, name: "min_bridge_out", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9882
|
+
{ no: 10, name: "price_impact", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
9883
|
+
]);
|
|
9884
|
+
/**
|
|
9885
|
+
* Everything POST /plan needs, and nothing it does not. This subtree is what a
|
|
9886
|
+
* client echoes back to create a plan; `display` never is.
|
|
9887
|
+
*
|
|
9888
|
+
* @generated from message trading.v1.MarginExecution
|
|
9889
|
+
*/
|
|
9890
|
+
export class MarginExecution extends Message {
|
|
9891
|
+
constructor(data) {
|
|
9892
|
+
super();
|
|
9893
|
+
/**
|
|
9894
|
+
* @generated from field: int32 position_chain_id = 1;
|
|
9895
|
+
*/
|
|
9896
|
+
this.positionChainId = 0;
|
|
9897
|
+
/**
|
|
9898
|
+
* @generated from field: string swapper = 2;
|
|
9899
|
+
*/
|
|
9900
|
+
this.swapper = "";
|
|
9901
|
+
/**
|
|
9902
|
+
* @generated from field: string exposure_token = 3;
|
|
9903
|
+
*/
|
|
9904
|
+
this.exposureToken = "";
|
|
9905
|
+
/**
|
|
9906
|
+
* @generated from field: string counter_token = 4;
|
|
9907
|
+
*/
|
|
9908
|
+
this.counterToken = "";
|
|
9909
|
+
/**
|
|
9910
|
+
* @generated from field: trading.v1.MarginDirection direction = 5;
|
|
9911
|
+
*/
|
|
9912
|
+
this.direction = MarginDirection.LONG;
|
|
9913
|
+
/**
|
|
9914
|
+
* @generated from field: trading.v1.MarginIntent intent = 6;
|
|
9915
|
+
*/
|
|
9916
|
+
this.intent = MarginIntent.OPEN;
|
|
9917
|
+
/**
|
|
9918
|
+
* @generated from field: repeated trading.v1.MarginExecutionLeg legs = 12;
|
|
9919
|
+
*/
|
|
9920
|
+
this.legs = [];
|
|
9921
|
+
proto3.util.initPartial(data, this);
|
|
9922
|
+
}
|
|
9923
|
+
static fromBinary(bytes, options) {
|
|
9924
|
+
return new MarginExecution().fromBinary(bytes, options);
|
|
9925
|
+
}
|
|
9926
|
+
static fromJson(jsonValue, options) {
|
|
9927
|
+
return new MarginExecution().fromJson(jsonValue, options);
|
|
9928
|
+
}
|
|
9929
|
+
static fromJsonString(jsonString, options) {
|
|
9930
|
+
return new MarginExecution().fromJsonString(jsonString, options);
|
|
9931
|
+
}
|
|
9932
|
+
static equals(a, b) {
|
|
9933
|
+
return proto3.util.equals(MarginExecution, a, b);
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9936
|
+
MarginExecution.runtime = proto3;
|
|
9937
|
+
MarginExecution.typeName = "trading.v1.MarginExecution";
|
|
9938
|
+
MarginExecution.fields = proto3.util.newFieldList(() => [
|
|
9939
|
+
{ no: 1, name: "position_chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9940
|
+
{ no: 2, name: "swapper", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9941
|
+
{ no: 3, name: "exposure_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9942
|
+
{ no: 4, name: "counter_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9943
|
+
{ no: 5, name: "direction", kind: "enum", T: proto3.getEnumType(MarginDirection) },
|
|
9944
|
+
{ no: 6, name: "intent", kind: "enum", T: proto3.getEnumType(MarginIntent) },
|
|
9945
|
+
{ no: 7, name: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9946
|
+
{ no: 8, name: "leverage_target", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9947
|
+
{ no: 9, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
9948
|
+
{ no: 11, name: "funding", kind: "message", T: MarginFunding, opt: true },
|
|
9949
|
+
{ no: 12, name: "legs", kind: "message", T: MarginExecutionLeg, repeated: true },
|
|
9950
|
+
]);
|
|
9951
|
+
/**
|
|
9952
|
+
* What the confirmation modal renders. Projections of the position IF this
|
|
9953
|
+
* action executes; present state lives on GET /margin/positions. Ignored by
|
|
9954
|
+
* POST /plan: projections are not execution inputs.
|
|
9955
|
+
*
|
|
9956
|
+
* @generated from message trading.v1.MarginDisplay
|
|
9957
|
+
*/
|
|
9958
|
+
export class MarginDisplay extends Message {
|
|
9959
|
+
constructor(data) {
|
|
9960
|
+
super();
|
|
9961
|
+
proto3.util.initPartial(data, this);
|
|
9962
|
+
}
|
|
9963
|
+
static fromBinary(bytes, options) {
|
|
9964
|
+
return new MarginDisplay().fromBinary(bytes, options);
|
|
9965
|
+
}
|
|
9966
|
+
static fromJson(jsonValue, options) {
|
|
9967
|
+
return new MarginDisplay().fromJson(jsonValue, options);
|
|
9968
|
+
}
|
|
9969
|
+
static fromJsonString(jsonString, options) {
|
|
9970
|
+
return new MarginDisplay().fromJsonString(jsonString, options);
|
|
9971
|
+
}
|
|
9972
|
+
static equals(a, b) {
|
|
9973
|
+
return proto3.util.equals(MarginDisplay, a, b);
|
|
9974
|
+
}
|
|
9975
|
+
}
|
|
9976
|
+
MarginDisplay.runtime = proto3;
|
|
9977
|
+
MarginDisplay.typeName = "trading.v1.MarginDisplay";
|
|
9978
|
+
MarginDisplay.fields = proto3.util.newFieldList(() => [
|
|
9979
|
+
{ no: 1, name: "size", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9980
|
+
{ no: 2, name: "leverage", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9981
|
+
{ no: 3, name: "effective_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9982
|
+
{ no: 4, name: "liquidation_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9983
|
+
{ no: 6, name: "health_factor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9984
|
+
{ no: 7, name: "borrow_rate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9985
|
+
{ no: 8, name: "oracle_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9986
|
+
{ no: 9, name: "collateral_returned", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9987
|
+
{ no: 10, name: "debt_repaid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9988
|
+
]);
|
|
9989
|
+
/**
|
|
9990
|
+
* @generated from message trading.v1.MarginQuoteResponse
|
|
9991
|
+
*/
|
|
9992
|
+
export class MarginQuoteResponse extends Message {
|
|
9993
|
+
constructor(data) {
|
|
9994
|
+
super();
|
|
9995
|
+
/**
|
|
9996
|
+
* @generated from field: string request_id = 1;
|
|
9997
|
+
*/
|
|
9998
|
+
this.requestId = "";
|
|
9999
|
+
proto3.util.initPartial(data, this);
|
|
10000
|
+
}
|
|
10001
|
+
static fromBinary(bytes, options) {
|
|
10002
|
+
return new MarginQuoteResponse().fromBinary(bytes, options);
|
|
10003
|
+
}
|
|
10004
|
+
static fromJson(jsonValue, options) {
|
|
10005
|
+
return new MarginQuoteResponse().fromJson(jsonValue, options);
|
|
10006
|
+
}
|
|
10007
|
+
static fromJsonString(jsonString, options) {
|
|
10008
|
+
return new MarginQuoteResponse().fromJsonString(jsonString, options);
|
|
10009
|
+
}
|
|
10010
|
+
static equals(a, b) {
|
|
10011
|
+
return proto3.util.equals(MarginQuoteResponse, a, b);
|
|
10012
|
+
}
|
|
10013
|
+
}
|
|
10014
|
+
MarginQuoteResponse.runtime = proto3;
|
|
10015
|
+
MarginQuoteResponse.typeName = "trading.v1.MarginQuoteResponse";
|
|
10016
|
+
MarginQuoteResponse.fields = proto3.util.newFieldList(() => [
|
|
10017
|
+
{ no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
10018
|
+
{ no: 2, name: "execution", kind: "message", T: MarginExecution },
|
|
10019
|
+
{ no: 3, name: "display", kind: "message", T: MarginDisplay },
|
|
10020
|
+
{ no: 4, name: "gas_estimate", kind: "message", T: GasEstimate, opt: true },
|
|
10021
|
+
]);
|