@uniswap/client-trading 0.5.17 → 0.6.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 +269 -4
- package/dist/trading/v1/api_pb.js +303 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
|
|
2
|
-
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
2
|
+
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
3
3
|
/**
|
|
4
4
|
* @generated from rpc trading.v1.tradingService.Quote
|
|
5
5
|
*/
|
|
@@ -308,3 +308,17 @@ export declare const getPlans: {
|
|
|
308
308
|
readonly typeName: "trading.v1.tradingService";
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
|
+
/**
|
|
312
|
+
* @generated from rpc trading.v1.tradingService.MarginMarkets
|
|
313
|
+
*/
|
|
314
|
+
export declare const marginMarkets: {
|
|
315
|
+
readonly localName: "marginMarkets";
|
|
316
|
+
readonly name: "MarginMarkets";
|
|
317
|
+
readonly kind: MethodKind.Unary;
|
|
318
|
+
readonly I: typeof MarginMarketsRequest;
|
|
319
|
+
readonly O: typeof MarginMarketsResponse;
|
|
320
|
+
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
321
|
+
readonly service: {
|
|
322
|
+
readonly typeName: "trading.v1.tradingService";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
|
|
6
|
-
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
6
|
+
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
7
7
|
/**
|
|
8
8
|
* @generated from rpc trading.v1.tradingService.Quote
|
|
9
9
|
*/
|
|
@@ -312,3 +312,17 @@ export const getPlans = {
|
|
|
312
312
|
typeName: "trading.v1.tradingService"
|
|
313
313
|
}
|
|
314
314
|
};
|
|
315
|
+
/**
|
|
316
|
+
* @generated from rpc trading.v1.tradingService.MarginMarkets
|
|
317
|
+
*/
|
|
318
|
+
export const marginMarkets = {
|
|
319
|
+
localName: "marginMarkets",
|
|
320
|
+
name: "MarginMarkets",
|
|
321
|
+
kind: MethodKind.Unary,
|
|
322
|
+
I: MarginMarketsRequest,
|
|
323
|
+
O: MarginMarketsResponse,
|
|
324
|
+
idempotency: MethodIdempotency.NoSideEffects,
|
|
325
|
+
service: {
|
|
326
|
+
typeName: "trading.v1.tradingService"
|
|
327
|
+
}
|
|
328
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
1
|
+
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
2
2
|
import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
|
|
3
3
|
/**
|
|
4
4
|
* @generated from service trading.v1.tradingService
|
|
@@ -226,5 +226,15 @@ export declare const tradingService: {
|
|
|
226
226
|
readonly kind: MethodKind.Unary;
|
|
227
227
|
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
228
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* @generated from rpc trading.v1.tradingService.MarginMarkets
|
|
231
|
+
*/
|
|
232
|
+
readonly marginMarkets: {
|
|
233
|
+
readonly name: "MarginMarkets";
|
|
234
|
+
readonly I: typeof MarginMarketsRequest;
|
|
235
|
+
readonly O: typeof MarginMarketsResponse;
|
|
236
|
+
readonly kind: MethodKind.Unary;
|
|
237
|
+
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
238
|
+
};
|
|
229
239
|
};
|
|
230
240
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @generated from file trading/v1/api.proto (package trading.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
|
-
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
5
|
+
import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
|
|
6
6
|
import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
|
|
7
7
|
/**
|
|
8
8
|
* @generated from service trading.v1.tradingService
|
|
@@ -230,5 +230,15 @@ export const tradingService = {
|
|
|
230
230
|
kind: MethodKind.Unary,
|
|
231
231
|
idempotency: MethodIdempotency.NoSideEffects,
|
|
232
232
|
},
|
|
233
|
+
/**
|
|
234
|
+
* @generated from rpc trading.v1.tradingService.MarginMarkets
|
|
235
|
+
*/
|
|
236
|
+
marginMarkets: {
|
|
237
|
+
name: "MarginMarkets",
|
|
238
|
+
I: MarginMarketsRequest,
|
|
239
|
+
O: MarginMarketsResponse,
|
|
240
|
+
kind: MethodKind.Unary,
|
|
241
|
+
idempotency: MethodIdempotency.NoSideEffects,
|
|
242
|
+
},
|
|
233
243
|
}
|
|
234
244
|
};
|
|
@@ -466,7 +466,17 @@ export declare enum PlanStepType {
|
|
|
466
466
|
/**
|
|
467
467
|
* @generated from enum value: PLAN_STEP_TYPE_VAULT_WITHDRAW = 15;
|
|
468
468
|
*/
|
|
469
|
-
VAULT_WITHDRAW = 15
|
|
469
|
+
VAULT_WITHDRAW = 15,
|
|
470
|
+
/**
|
|
471
|
+
* One MarginRouter execute([...actions]) transaction. Every margin action key
|
|
472
|
+
* compiles to this one step type: what the action does mechanically lives in the
|
|
473
|
+
* ordered operations inside marginExecutionMetadata, and which action the user
|
|
474
|
+
* chose lives on the echoed quote. Keeping the action grid out of this enum is
|
|
475
|
+
* what lets a new action key ship without a partner-visible wire change.
|
|
476
|
+
*
|
|
477
|
+
* @generated from enum value: PLAN_STEP_TYPE_MARGIN_EXECUTE = 16;
|
|
478
|
+
*/
|
|
479
|
+
MARGIN_EXECUTE = 16
|
|
470
480
|
}
|
|
471
481
|
/**
|
|
472
482
|
* Set when the output is a fee taken from the swap; unset for the swapper's
|
|
@@ -663,6 +673,39 @@ export declare enum AllowanceUnit {
|
|
|
663
673
|
*/
|
|
664
674
|
USD_CENT = 2
|
|
665
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* @generated from enum trading.v1.MarginDirection
|
|
678
|
+
*/
|
|
679
|
+
export declare enum MarginDirection {
|
|
680
|
+
/**
|
|
681
|
+
* LONG = borrow counter, buy exposure => collateral = exposure, debt = counter
|
|
682
|
+
* SHORT = borrow exposure, sell for counter => collateral = counter, debt = exposure
|
|
683
|
+
*
|
|
684
|
+
* @generated from enum value: LONG = 0;
|
|
685
|
+
*/
|
|
686
|
+
LONG = 0,
|
|
687
|
+
/**
|
|
688
|
+
* @generated from enum value: SHORT = 1;
|
|
689
|
+
*/
|
|
690
|
+
SHORT = 1
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* @generated from enum trading.v1.MarginVenue
|
|
694
|
+
*/
|
|
695
|
+
export declare enum MarginVenue {
|
|
696
|
+
/**
|
|
697
|
+
* @generated from enum value: MORPHO = 0;
|
|
698
|
+
*/
|
|
699
|
+
MORPHO = 0,
|
|
700
|
+
/**
|
|
701
|
+
* @generated from enum value: AAVE_V3 = 1;
|
|
702
|
+
*/
|
|
703
|
+
AAVE_V3 = 1,
|
|
704
|
+
/**
|
|
705
|
+
* @generated from enum value: AAVE_V4 = 2;
|
|
706
|
+
*/
|
|
707
|
+
AAVE_V4 = 2
|
|
708
|
+
}
|
|
666
709
|
/**
|
|
667
710
|
* @generated from message trading.v1.Encode7702Request
|
|
668
711
|
*/
|
|
@@ -1572,7 +1615,7 @@ export declare class TokenListSafetyInfo extends Message<TokenListSafetyInfo> {
|
|
|
1572
1615
|
*/
|
|
1573
1616
|
export declare class TokenListExtensions extends Message<TokenListExtensions> {
|
|
1574
1617
|
/**
|
|
1575
|
-
* chainId ->
|
|
1618
|
+
* chainId -> token address
|
|
1576
1619
|
*
|
|
1577
1620
|
* @generated from field: map<string, trading.v1.TokenListBridgeInfo> bridge_info = 1;
|
|
1578
1621
|
*/
|
|
@@ -1605,8 +1648,7 @@ export declare class TokenListEntry extends Message<TokenListEntry> {
|
|
|
1605
1648
|
*/
|
|
1606
1649
|
address: string;
|
|
1607
1650
|
/**
|
|
1608
|
-
* Raw chain id
|
|
1609
|
-
* service does not swap on (e.g. Solana entries in the hosted lists).
|
|
1651
|
+
* Raw chain id to support solana entries
|
|
1610
1652
|
*
|
|
1611
1653
|
* @generated from field: uint32 chain_id = 3;
|
|
1612
1654
|
*/
|
|
@@ -7667,3 +7709,226 @@ export declare class SponsorshipInfo extends Message<SponsorshipInfo> {
|
|
|
7667
7709
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SponsorshipInfo;
|
|
7668
7710
|
static equals(a: SponsorshipInfo | PlainMessage<SponsorshipInfo> | undefined, b: SponsorshipInfo | PlainMessage<SponsorshipInfo> | undefined): boolean;
|
|
7669
7711
|
}
|
|
7712
|
+
/**
|
|
7713
|
+
* A token as a RESPONSE carries it. No symbol or name: this endpoint resolves
|
|
7714
|
+
* markets, not token metadata, and the client merges display fields from its own
|
|
7715
|
+
* token lists by address.
|
|
7716
|
+
*
|
|
7717
|
+
* @generated from message trading.v1.MarginTokenMetadata
|
|
7718
|
+
*/
|
|
7719
|
+
export declare class MarginTokenMetadata extends Message<MarginTokenMetadata> {
|
|
7720
|
+
/**
|
|
7721
|
+
* @generated from field: string address = 1;
|
|
7722
|
+
*/
|
|
7723
|
+
address: string;
|
|
7724
|
+
/**
|
|
7725
|
+
* @generated from field: int32 chain_id = 2;
|
|
7726
|
+
*/
|
|
7727
|
+
chainId: number;
|
|
7728
|
+
/**
|
|
7729
|
+
* @generated from field: int32 decimals = 3;
|
|
7730
|
+
*/
|
|
7731
|
+
decimals: number;
|
|
7732
|
+
constructor(data?: PartialMessage<MarginTokenMetadata>);
|
|
7733
|
+
static readonly runtime: typeof proto3;
|
|
7734
|
+
static readonly typeName = "trading.v1.MarginTokenMetadata";
|
|
7735
|
+
static readonly fields: FieldList;
|
|
7736
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginTokenMetadata;
|
|
7737
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginTokenMetadata;
|
|
7738
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginTokenMetadata;
|
|
7739
|
+
static equals(a: MarginTokenMetadata | PlainMessage<MarginTokenMetadata> | undefined, b: MarginTokenMetadata | PlainMessage<MarginTokenMetadata> | undefined): boolean;
|
|
7740
|
+
}
|
|
7741
|
+
/**
|
|
7742
|
+
* What one venue offers for a pair, for the advanced breakdown. The scalars
|
|
7743
|
+
* beside `venues` on the row are the HEADLINE venue's; read `headline_venue`
|
|
7744
|
+
* rather than matching them back.
|
|
7745
|
+
*
|
|
7746
|
+
* @generated from message trading.v1.MarginMarketVenue
|
|
7747
|
+
*/
|
|
7748
|
+
export declare class MarginMarketVenue extends Message<MarginMarketVenue> {
|
|
7749
|
+
/**
|
|
7750
|
+
* @generated from field: trading.v1.MarginVenue venue = 1;
|
|
7751
|
+
*/
|
|
7752
|
+
venue: MarginVenue;
|
|
7753
|
+
/**
|
|
7754
|
+
* @generated from field: string adapter = 2;
|
|
7755
|
+
*/
|
|
7756
|
+
adapter: string;
|
|
7757
|
+
/**
|
|
7758
|
+
* Morpho's market id. Absent where the (adapter, pair) IS the market.
|
|
7759
|
+
*
|
|
7760
|
+
* @generated from field: optional string venue_market_id = 3;
|
|
7761
|
+
*/
|
|
7762
|
+
venueMarketId?: string;
|
|
7763
|
+
/**
|
|
7764
|
+
* Decimal string, derived from the venue's BORROW-side LTV with the cliff
|
|
7765
|
+
* buffer already applied. Server-authored: a client must not compute this
|
|
7766
|
+
* from lltv, or its ceiling and the quote's refusal disagree.
|
|
7767
|
+
*
|
|
7768
|
+
* @generated from field: string max_leverage = 4;
|
|
7769
|
+
*/
|
|
7770
|
+
maxLeverage: string;
|
|
7771
|
+
/**
|
|
7772
|
+
* The liquidation boundary itself, 18-dec. Shown, never used for the ceiling.
|
|
7773
|
+
*
|
|
7774
|
+
* @generated from field: string lltv = 5;
|
|
7775
|
+
*/
|
|
7776
|
+
lltv: string;
|
|
7777
|
+
/**
|
|
7778
|
+
* Annual, 18-dec. Absent when the venue's rate read failed, which is not the
|
|
7779
|
+
* same as a rate of zero.
|
|
7780
|
+
*
|
|
7781
|
+
* @generated from field: optional string borrow_rate = 6;
|
|
7782
|
+
*/
|
|
7783
|
+
borrowRate?: string;
|
|
7784
|
+
/**
|
|
7785
|
+
* Absent until the venue's liquidity is read, which is NOT the same as a
|
|
7786
|
+
* market with nothing left to lend.
|
|
7787
|
+
*
|
|
7788
|
+
* @generated from field: optional string available_borrow_liquidity = 7;
|
|
7789
|
+
*/
|
|
7790
|
+
availableBorrowLiquidity?: string;
|
|
7791
|
+
constructor(data?: PartialMessage<MarginMarketVenue>);
|
|
7792
|
+
static readonly runtime: typeof proto3;
|
|
7793
|
+
static readonly typeName = "trading.v1.MarginMarketVenue";
|
|
7794
|
+
static readonly fields: FieldList;
|
|
7795
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginMarketVenue;
|
|
7796
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginMarketVenue;
|
|
7797
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginMarketVenue;
|
|
7798
|
+
static equals(a: MarginMarketVenue | PlainMessage<MarginMarketVenue> | undefined, b: MarginMarketVenue | PlainMessage<MarginMarketVenue> | undefined): boolean;
|
|
7799
|
+
}
|
|
7800
|
+
/**
|
|
7801
|
+
* One row per (exposure_token, counter_token, direction).
|
|
7802
|
+
*
|
|
7803
|
+
* @generated from message trading.v1.MarginMarketRow
|
|
7804
|
+
*/
|
|
7805
|
+
export declare class MarginMarketRow extends Message<MarginMarketRow> {
|
|
7806
|
+
/**
|
|
7807
|
+
* @generated from field: trading.v1.MarginTokenMetadata exposure_token = 1;
|
|
7808
|
+
*/
|
|
7809
|
+
exposureToken?: MarginTokenMetadata;
|
|
7810
|
+
/**
|
|
7811
|
+
* @generated from field: trading.v1.MarginTokenMetadata counter_token = 2;
|
|
7812
|
+
*/
|
|
7813
|
+
counterToken?: MarginTokenMetadata;
|
|
7814
|
+
/**
|
|
7815
|
+
* @generated from field: trading.v1.MarginDirection direction = 3;
|
|
7816
|
+
*/
|
|
7817
|
+
direction: MarginDirection;
|
|
7818
|
+
/**
|
|
7819
|
+
* The venue behind max_leverage, decided by the same code path the quote
|
|
7820
|
+
* uses so the picker and the quote cannot disagree.
|
|
7821
|
+
*
|
|
7822
|
+
* @generated from field: trading.v1.MarginVenue headline_venue = 4;
|
|
7823
|
+
*/
|
|
7824
|
+
headlineVenue: MarginVenue;
|
|
7825
|
+
/**
|
|
7826
|
+
* The furthest this market goes, across every venue carrying it. The only
|
|
7827
|
+
* scalar here, because it is the only one whose best is also achievable:
|
|
7828
|
+
* rates and LTVs differ per venue and the cheapest rate is not necessarily
|
|
7829
|
+
* available at this leverage, so both live on `venues` beside the ceiling
|
|
7830
|
+
* they come with.
|
|
7831
|
+
*
|
|
7832
|
+
* @generated from field: string max_leverage = 5;
|
|
7833
|
+
*/
|
|
7834
|
+
maxLeverage: string;
|
|
7835
|
+
/**
|
|
7836
|
+
* @generated from field: repeated trading.v1.MarginMarketVenue venues = 6;
|
|
7837
|
+
*/
|
|
7838
|
+
venues: MarginMarketVenue[];
|
|
7839
|
+
constructor(data?: PartialMessage<MarginMarketRow>);
|
|
7840
|
+
static readonly runtime: typeof proto3;
|
|
7841
|
+
static readonly typeName = "trading.v1.MarginMarketRow";
|
|
7842
|
+
static readonly fields: FieldList;
|
|
7843
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginMarketRow;
|
|
7844
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginMarketRow;
|
|
7845
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginMarketRow;
|
|
7846
|
+
static equals(a: MarginMarketRow | PlainMessage<MarginMarketRow> | undefined, b: MarginMarketRow | PlainMessage<MarginMarketRow> | undefined): boolean;
|
|
7847
|
+
}
|
|
7848
|
+
/**
|
|
7849
|
+
* Discovery for the market picker. Indicative by construction: rates move every
|
|
7850
|
+
* block, so no response agrees with a quote taken seconds later. The quote
|
|
7851
|
+
* re-reads on chain and its bounds are enforced in calldata, so a stale row
|
|
7852
|
+
* costs a re-quote and never a bad execution.
|
|
7853
|
+
*
|
|
7854
|
+
* @generated from message trading.v1.MarginMarketsRequest
|
|
7855
|
+
*/
|
|
7856
|
+
export declare class MarginMarketsRequest extends Message<MarginMarketsRequest> {
|
|
7857
|
+
/**
|
|
7858
|
+
* @generated from field: int32 chain_id = 1;
|
|
7859
|
+
*/
|
|
7860
|
+
chainId: number;
|
|
7861
|
+
/**
|
|
7862
|
+
* All optional, and each one narrows the rows returned.
|
|
7863
|
+
*
|
|
7864
|
+
* @generated from field: optional string exposure_token = 2;
|
|
7865
|
+
*/
|
|
7866
|
+
exposureToken?: string;
|
|
7867
|
+
/**
|
|
7868
|
+
* @generated from field: optional string counter_token = 3;
|
|
7869
|
+
*/
|
|
7870
|
+
counterToken?: string;
|
|
7871
|
+
/**
|
|
7872
|
+
* @generated from field: optional trading.v1.MarginDirection direction = 4;
|
|
7873
|
+
*/
|
|
7874
|
+
direction?: MarginDirection;
|
|
7875
|
+
/**
|
|
7876
|
+
* The LENDING allowlist. A named subset also re-decides `headline_venue` over
|
|
7877
|
+
* that subset, so it is a filter on the answer and not only on the search.
|
|
7878
|
+
*
|
|
7879
|
+
* @generated from field: repeated trading.v1.MarginVenue venues = 5;
|
|
7880
|
+
*/
|
|
7881
|
+
venues: MarginVenue[];
|
|
7882
|
+
/**
|
|
7883
|
+
* Opaque; echo `next_cursor` back verbatim. A KEYSET cursor over the row
|
|
7884
|
+
* order, not an offset: the catalogue is rebuilt on a timer, and an offset
|
|
7885
|
+
* taken against one build silently skips or repeats rows against the next.
|
|
7886
|
+
*
|
|
7887
|
+
* @generated from field: optional string cursor = 6;
|
|
7888
|
+
*/
|
|
7889
|
+
cursor?: string;
|
|
7890
|
+
/**
|
|
7891
|
+
* Rows per page. Defaulted and hard-capped, so no caller receives an
|
|
7892
|
+
* unbounded set: nothing about this endpoint bounds its own size, and the
|
|
7893
|
+
* row count grows whenever governance allows a market.
|
|
7894
|
+
*
|
|
7895
|
+
* @generated from field: optional int32 limit = 7;
|
|
7896
|
+
*/
|
|
7897
|
+
limit?: number;
|
|
7898
|
+
constructor(data?: PartialMessage<MarginMarketsRequest>);
|
|
7899
|
+
static readonly runtime: typeof proto3;
|
|
7900
|
+
static readonly typeName = "trading.v1.MarginMarketsRequest";
|
|
7901
|
+
static readonly fields: FieldList;
|
|
7902
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginMarketsRequest;
|
|
7903
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginMarketsRequest;
|
|
7904
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginMarketsRequest;
|
|
7905
|
+
static equals(a: MarginMarketsRequest | PlainMessage<MarginMarketsRequest> | undefined, b: MarginMarketsRequest | PlainMessage<MarginMarketsRequest> | undefined): boolean;
|
|
7906
|
+
}
|
|
7907
|
+
/**
|
|
7908
|
+
* @generated from message trading.v1.MarginMarketsResponse
|
|
7909
|
+
*/
|
|
7910
|
+
export declare class MarginMarketsResponse extends Message<MarginMarketsResponse> {
|
|
7911
|
+
/**
|
|
7912
|
+
* @generated from field: string request_id = 1;
|
|
7913
|
+
*/
|
|
7914
|
+
requestId: string;
|
|
7915
|
+
/**
|
|
7916
|
+
* @generated from field: repeated trading.v1.MarginMarketRow markets = 2;
|
|
7917
|
+
*/
|
|
7918
|
+
markets: MarginMarketRow[];
|
|
7919
|
+
/**
|
|
7920
|
+
* Absent on the last page, which is how a client knows to stop. Present means
|
|
7921
|
+
* more rows exist, never that the next page is non-empty.
|
|
7922
|
+
*
|
|
7923
|
+
* @generated from field: optional string next_cursor = 3;
|
|
7924
|
+
*/
|
|
7925
|
+
nextCursor?: string;
|
|
7926
|
+
constructor(data?: PartialMessage<MarginMarketsResponse>);
|
|
7927
|
+
static readonly runtime: typeof proto3;
|
|
7928
|
+
static readonly typeName = "trading.v1.MarginMarketsResponse";
|
|
7929
|
+
static readonly fields: FieldList;
|
|
7930
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginMarketsResponse;
|
|
7931
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginMarketsResponse;
|
|
7932
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginMarketsResponse;
|
|
7933
|
+
static equals(a: MarginMarketsResponse | PlainMessage<MarginMarketsResponse> | undefined, b: MarginMarketsResponse | PlainMessage<MarginMarketsResponse> | undefined): boolean;
|
|
7934
|
+
}
|
|
@@ -612,6 +612,16 @@ export var PlanStepType;
|
|
|
612
612
|
* @generated from enum value: PLAN_STEP_TYPE_VAULT_WITHDRAW = 15;
|
|
613
613
|
*/
|
|
614
614
|
PlanStepType[PlanStepType["VAULT_WITHDRAW"] = 15] = "VAULT_WITHDRAW";
|
|
615
|
+
/**
|
|
616
|
+
* One MarginRouter execute([...actions]) transaction. Every margin action key
|
|
617
|
+
* compiles to this one step type: what the action does mechanically lives in the
|
|
618
|
+
* ordered operations inside marginExecutionMetadata, and which action the user
|
|
619
|
+
* chose lives on the echoed quote. Keeping the action grid out of this enum is
|
|
620
|
+
* what lets a new action key ship without a partner-visible wire change.
|
|
621
|
+
*
|
|
622
|
+
* @generated from enum value: PLAN_STEP_TYPE_MARGIN_EXECUTE = 16;
|
|
623
|
+
*/
|
|
624
|
+
PlanStepType[PlanStepType["MARGIN_EXECUTE"] = 16] = "MARGIN_EXECUTE";
|
|
615
625
|
})(PlanStepType || (PlanStepType = {}));
|
|
616
626
|
// Retrieve enum metadata with: proto3.getEnumType(PlanStepType)
|
|
617
627
|
proto3.util.setEnumType(PlanStepType, "trading.v1.PlanStepType", [
|
|
@@ -631,6 +641,7 @@ proto3.util.setEnumType(PlanStepType, "trading.v1.PlanStepType", [
|
|
|
631
641
|
{ no: 13, name: "PLAN_STEP_TYPE_RESET_APPROVAL_TXN" },
|
|
632
642
|
{ no: 14, name: "PLAN_STEP_TYPE_VAULT_DEPOSIT" },
|
|
633
643
|
{ no: 15, name: "PLAN_STEP_TYPE_VAULT_WITHDRAW" },
|
|
644
|
+
{ no: 16, name: "PLAN_STEP_TYPE_MARGIN_EXECUTE" },
|
|
634
645
|
]);
|
|
635
646
|
/**
|
|
636
647
|
* Set when the output is a fee taken from the swap; unset for the swapper's
|
|
@@ -902,6 +913,52 @@ proto3.util.setEnumType(AllowanceUnit, "trading.v1.AllowanceUnit", [
|
|
|
902
913
|
{ no: 1, name: "ALLOWANCE_UNIT_FREE_SWAPS" },
|
|
903
914
|
{ no: 2, name: "ALLOWANCE_UNIT_USD_CENT" },
|
|
904
915
|
]);
|
|
916
|
+
/**
|
|
917
|
+
* @generated from enum trading.v1.MarginDirection
|
|
918
|
+
*/
|
|
919
|
+
export var MarginDirection;
|
|
920
|
+
(function (MarginDirection) {
|
|
921
|
+
/**
|
|
922
|
+
* LONG = borrow counter, buy exposure => collateral = exposure, debt = counter
|
|
923
|
+
* SHORT = borrow exposure, sell for counter => collateral = counter, debt = exposure
|
|
924
|
+
*
|
|
925
|
+
* @generated from enum value: LONG = 0;
|
|
926
|
+
*/
|
|
927
|
+
MarginDirection[MarginDirection["LONG"] = 0] = "LONG";
|
|
928
|
+
/**
|
|
929
|
+
* @generated from enum value: SHORT = 1;
|
|
930
|
+
*/
|
|
931
|
+
MarginDirection[MarginDirection["SHORT"] = 1] = "SHORT";
|
|
932
|
+
})(MarginDirection || (MarginDirection = {}));
|
|
933
|
+
// Retrieve enum metadata with: proto3.getEnumType(MarginDirection)
|
|
934
|
+
proto3.util.setEnumType(MarginDirection, "trading.v1.MarginDirection", [
|
|
935
|
+
{ no: 0, name: "LONG" },
|
|
936
|
+
{ no: 1, name: "SHORT" },
|
|
937
|
+
]);
|
|
938
|
+
/**
|
|
939
|
+
* @generated from enum trading.v1.MarginVenue
|
|
940
|
+
*/
|
|
941
|
+
export var MarginVenue;
|
|
942
|
+
(function (MarginVenue) {
|
|
943
|
+
/**
|
|
944
|
+
* @generated from enum value: MORPHO = 0;
|
|
945
|
+
*/
|
|
946
|
+
MarginVenue[MarginVenue["MORPHO"] = 0] = "MORPHO";
|
|
947
|
+
/**
|
|
948
|
+
* @generated from enum value: AAVE_V3 = 1;
|
|
949
|
+
*/
|
|
950
|
+
MarginVenue[MarginVenue["AAVE_V3"] = 1] = "AAVE_V3";
|
|
951
|
+
/**
|
|
952
|
+
* @generated from enum value: AAVE_V4 = 2;
|
|
953
|
+
*/
|
|
954
|
+
MarginVenue[MarginVenue["AAVE_V4"] = 2] = "AAVE_V4";
|
|
955
|
+
})(MarginVenue || (MarginVenue = {}));
|
|
956
|
+
// Retrieve enum metadata with: proto3.getEnumType(MarginVenue)
|
|
957
|
+
proto3.util.setEnumType(MarginVenue, "trading.v1.MarginVenue", [
|
|
958
|
+
{ no: 0, name: "MORPHO" },
|
|
959
|
+
{ no: 1, name: "AAVE_V3" },
|
|
960
|
+
{ no: 2, name: "AAVE_V4" },
|
|
961
|
+
]);
|
|
905
962
|
/**
|
|
906
963
|
* @generated from message trading.v1.Encode7702Request
|
|
907
964
|
*/
|
|
@@ -1962,7 +2019,7 @@ export class TokenListExtensions extends Message {
|
|
|
1962
2019
|
constructor(data) {
|
|
1963
2020
|
super();
|
|
1964
2021
|
/**
|
|
1965
|
-
* chainId ->
|
|
2022
|
+
* chainId -> token address
|
|
1966
2023
|
*
|
|
1967
2024
|
* @generated from field: map<string, trading.v1.TokenListBridgeInfo> bridge_info = 1;
|
|
1968
2025
|
*/
|
|
@@ -2003,8 +2060,7 @@ export class TokenListEntry extends Message {
|
|
|
2003
2060
|
*/
|
|
2004
2061
|
this.address = "";
|
|
2005
2062
|
/**
|
|
2006
|
-
* Raw chain id
|
|
2007
|
-
* service does not swap on (e.g. Solana entries in the hosted lists).
|
|
2063
|
+
* Raw chain id to support solana entries
|
|
2008
2064
|
*
|
|
2009
2065
|
* @generated from field: uint32 chain_id = 3;
|
|
2010
2066
|
*/
|
|
@@ -9017,3 +9073,247 @@ SponsorshipInfo.fields = proto3.util.newFieldList(() => [
|
|
|
9017
9073
|
{ no: 3, name: "sponsor_metadata", kind: "message", T: SponsorMetadata, opt: true },
|
|
9018
9074
|
{ no: 4, name: "campaign", kind: "message", T: CampaignDetails, opt: true },
|
|
9019
9075
|
]);
|
|
9076
|
+
/**
|
|
9077
|
+
* A token as a RESPONSE carries it. No symbol or name: this endpoint resolves
|
|
9078
|
+
* markets, not token metadata, and the client merges display fields from its own
|
|
9079
|
+
* token lists by address.
|
|
9080
|
+
*
|
|
9081
|
+
* @generated from message trading.v1.MarginTokenMetadata
|
|
9082
|
+
*/
|
|
9083
|
+
export class MarginTokenMetadata extends Message {
|
|
9084
|
+
constructor(data) {
|
|
9085
|
+
super();
|
|
9086
|
+
/**
|
|
9087
|
+
* @generated from field: string address = 1;
|
|
9088
|
+
*/
|
|
9089
|
+
this.address = "";
|
|
9090
|
+
/**
|
|
9091
|
+
* @generated from field: int32 chain_id = 2;
|
|
9092
|
+
*/
|
|
9093
|
+
this.chainId = 0;
|
|
9094
|
+
/**
|
|
9095
|
+
* @generated from field: int32 decimals = 3;
|
|
9096
|
+
*/
|
|
9097
|
+
this.decimals = 0;
|
|
9098
|
+
proto3.util.initPartial(data, this);
|
|
9099
|
+
}
|
|
9100
|
+
static fromBinary(bytes, options) {
|
|
9101
|
+
return new MarginTokenMetadata().fromBinary(bytes, options);
|
|
9102
|
+
}
|
|
9103
|
+
static fromJson(jsonValue, options) {
|
|
9104
|
+
return new MarginTokenMetadata().fromJson(jsonValue, options);
|
|
9105
|
+
}
|
|
9106
|
+
static fromJsonString(jsonString, options) {
|
|
9107
|
+
return new MarginTokenMetadata().fromJsonString(jsonString, options);
|
|
9108
|
+
}
|
|
9109
|
+
static equals(a, b) {
|
|
9110
|
+
return proto3.util.equals(MarginTokenMetadata, a, b);
|
|
9111
|
+
}
|
|
9112
|
+
}
|
|
9113
|
+
MarginTokenMetadata.runtime = proto3;
|
|
9114
|
+
MarginTokenMetadata.typeName = "trading.v1.MarginTokenMetadata";
|
|
9115
|
+
MarginTokenMetadata.fields = proto3.util.newFieldList(() => [
|
|
9116
|
+
{ no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9117
|
+
{ no: 2, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9118
|
+
{ no: 3, name: "decimals", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9119
|
+
]);
|
|
9120
|
+
/**
|
|
9121
|
+
* What one venue offers for a pair, for the advanced breakdown. The scalars
|
|
9122
|
+
* beside `venues` on the row are the HEADLINE venue's; read `headline_venue`
|
|
9123
|
+
* rather than matching them back.
|
|
9124
|
+
*
|
|
9125
|
+
* @generated from message trading.v1.MarginMarketVenue
|
|
9126
|
+
*/
|
|
9127
|
+
export class MarginMarketVenue extends Message {
|
|
9128
|
+
constructor(data) {
|
|
9129
|
+
super();
|
|
9130
|
+
/**
|
|
9131
|
+
* @generated from field: trading.v1.MarginVenue venue = 1;
|
|
9132
|
+
*/
|
|
9133
|
+
this.venue = MarginVenue.MORPHO;
|
|
9134
|
+
/**
|
|
9135
|
+
* @generated from field: string adapter = 2;
|
|
9136
|
+
*/
|
|
9137
|
+
this.adapter = "";
|
|
9138
|
+
/**
|
|
9139
|
+
* Decimal string, derived from the venue's BORROW-side LTV with the cliff
|
|
9140
|
+
* buffer already applied. Server-authored: a client must not compute this
|
|
9141
|
+
* from lltv, or its ceiling and the quote's refusal disagree.
|
|
9142
|
+
*
|
|
9143
|
+
* @generated from field: string max_leverage = 4;
|
|
9144
|
+
*/
|
|
9145
|
+
this.maxLeverage = "";
|
|
9146
|
+
/**
|
|
9147
|
+
* The liquidation boundary itself, 18-dec. Shown, never used for the ceiling.
|
|
9148
|
+
*
|
|
9149
|
+
* @generated from field: string lltv = 5;
|
|
9150
|
+
*/
|
|
9151
|
+
this.lltv = "";
|
|
9152
|
+
proto3.util.initPartial(data, this);
|
|
9153
|
+
}
|
|
9154
|
+
static fromBinary(bytes, options) {
|
|
9155
|
+
return new MarginMarketVenue().fromBinary(bytes, options);
|
|
9156
|
+
}
|
|
9157
|
+
static fromJson(jsonValue, options) {
|
|
9158
|
+
return new MarginMarketVenue().fromJson(jsonValue, options);
|
|
9159
|
+
}
|
|
9160
|
+
static fromJsonString(jsonString, options) {
|
|
9161
|
+
return new MarginMarketVenue().fromJsonString(jsonString, options);
|
|
9162
|
+
}
|
|
9163
|
+
static equals(a, b) {
|
|
9164
|
+
return proto3.util.equals(MarginMarketVenue, a, b);
|
|
9165
|
+
}
|
|
9166
|
+
}
|
|
9167
|
+
MarginMarketVenue.runtime = proto3;
|
|
9168
|
+
MarginMarketVenue.typeName = "trading.v1.MarginMarketVenue";
|
|
9169
|
+
MarginMarketVenue.fields = proto3.util.newFieldList(() => [
|
|
9170
|
+
{ no: 1, name: "venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
|
|
9171
|
+
{ no: 2, name: "adapter", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9172
|
+
{ no: 3, name: "venue_market_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9173
|
+
{ no: 4, name: "max_leverage", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9174
|
+
{ no: 5, name: "lltv", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9175
|
+
{ no: 6, name: "borrow_rate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9176
|
+
{ no: 7, name: "available_borrow_liquidity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9177
|
+
]);
|
|
9178
|
+
/**
|
|
9179
|
+
* One row per (exposure_token, counter_token, direction).
|
|
9180
|
+
*
|
|
9181
|
+
* @generated from message trading.v1.MarginMarketRow
|
|
9182
|
+
*/
|
|
9183
|
+
export class MarginMarketRow extends Message {
|
|
9184
|
+
constructor(data) {
|
|
9185
|
+
super();
|
|
9186
|
+
/**
|
|
9187
|
+
* @generated from field: trading.v1.MarginDirection direction = 3;
|
|
9188
|
+
*/
|
|
9189
|
+
this.direction = MarginDirection.LONG;
|
|
9190
|
+
/**
|
|
9191
|
+
* The venue behind max_leverage, decided by the same code path the quote
|
|
9192
|
+
* uses so the picker and the quote cannot disagree.
|
|
9193
|
+
*
|
|
9194
|
+
* @generated from field: trading.v1.MarginVenue headline_venue = 4;
|
|
9195
|
+
*/
|
|
9196
|
+
this.headlineVenue = MarginVenue.MORPHO;
|
|
9197
|
+
/**
|
|
9198
|
+
* The furthest this market goes, across every venue carrying it. The only
|
|
9199
|
+
* scalar here, because it is the only one whose best is also achievable:
|
|
9200
|
+
* rates and LTVs differ per venue and the cheapest rate is not necessarily
|
|
9201
|
+
* available at this leverage, so both live on `venues` beside the ceiling
|
|
9202
|
+
* they come with.
|
|
9203
|
+
*
|
|
9204
|
+
* @generated from field: string max_leverage = 5;
|
|
9205
|
+
*/
|
|
9206
|
+
this.maxLeverage = "";
|
|
9207
|
+
/**
|
|
9208
|
+
* @generated from field: repeated trading.v1.MarginMarketVenue venues = 6;
|
|
9209
|
+
*/
|
|
9210
|
+
this.venues = [];
|
|
9211
|
+
proto3.util.initPartial(data, this);
|
|
9212
|
+
}
|
|
9213
|
+
static fromBinary(bytes, options) {
|
|
9214
|
+
return new MarginMarketRow().fromBinary(bytes, options);
|
|
9215
|
+
}
|
|
9216
|
+
static fromJson(jsonValue, options) {
|
|
9217
|
+
return new MarginMarketRow().fromJson(jsonValue, options);
|
|
9218
|
+
}
|
|
9219
|
+
static fromJsonString(jsonString, options) {
|
|
9220
|
+
return new MarginMarketRow().fromJsonString(jsonString, options);
|
|
9221
|
+
}
|
|
9222
|
+
static equals(a, b) {
|
|
9223
|
+
return proto3.util.equals(MarginMarketRow, a, b);
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
MarginMarketRow.runtime = proto3;
|
|
9227
|
+
MarginMarketRow.typeName = "trading.v1.MarginMarketRow";
|
|
9228
|
+
MarginMarketRow.fields = proto3.util.newFieldList(() => [
|
|
9229
|
+
{ no: 1, name: "exposure_token", kind: "message", T: MarginTokenMetadata },
|
|
9230
|
+
{ no: 2, name: "counter_token", kind: "message", T: MarginTokenMetadata },
|
|
9231
|
+
{ no: 3, name: "direction", kind: "enum", T: proto3.getEnumType(MarginDirection) },
|
|
9232
|
+
{ no: 4, name: "headline_venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
|
|
9233
|
+
{ no: 5, name: "max_leverage", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9234
|
+
{ no: 6, name: "venues", kind: "message", T: MarginMarketVenue, repeated: true },
|
|
9235
|
+
]);
|
|
9236
|
+
/**
|
|
9237
|
+
* Discovery for the market picker. Indicative by construction: rates move every
|
|
9238
|
+
* block, so no response agrees with a quote taken seconds later. The quote
|
|
9239
|
+
* re-reads on chain and its bounds are enforced in calldata, so a stale row
|
|
9240
|
+
* costs a re-quote and never a bad execution.
|
|
9241
|
+
*
|
|
9242
|
+
* @generated from message trading.v1.MarginMarketsRequest
|
|
9243
|
+
*/
|
|
9244
|
+
export class MarginMarketsRequest extends Message {
|
|
9245
|
+
constructor(data) {
|
|
9246
|
+
super();
|
|
9247
|
+
/**
|
|
9248
|
+
* @generated from field: int32 chain_id = 1;
|
|
9249
|
+
*/
|
|
9250
|
+
this.chainId = 0;
|
|
9251
|
+
/**
|
|
9252
|
+
* The LENDING allowlist. A named subset also re-decides `headline_venue` over
|
|
9253
|
+
* that subset, so it is a filter on the answer and not only on the search.
|
|
9254
|
+
*
|
|
9255
|
+
* @generated from field: repeated trading.v1.MarginVenue venues = 5;
|
|
9256
|
+
*/
|
|
9257
|
+
this.venues = [];
|
|
9258
|
+
proto3.util.initPartial(data, this);
|
|
9259
|
+
}
|
|
9260
|
+
static fromBinary(bytes, options) {
|
|
9261
|
+
return new MarginMarketsRequest().fromBinary(bytes, options);
|
|
9262
|
+
}
|
|
9263
|
+
static fromJson(jsonValue, options) {
|
|
9264
|
+
return new MarginMarketsRequest().fromJson(jsonValue, options);
|
|
9265
|
+
}
|
|
9266
|
+
static fromJsonString(jsonString, options) {
|
|
9267
|
+
return new MarginMarketsRequest().fromJsonString(jsonString, options);
|
|
9268
|
+
}
|
|
9269
|
+
static equals(a, b) {
|
|
9270
|
+
return proto3.util.equals(MarginMarketsRequest, a, b);
|
|
9271
|
+
}
|
|
9272
|
+
}
|
|
9273
|
+
MarginMarketsRequest.runtime = proto3;
|
|
9274
|
+
MarginMarketsRequest.typeName = "trading.v1.MarginMarketsRequest";
|
|
9275
|
+
MarginMarketsRequest.fields = proto3.util.newFieldList(() => [
|
|
9276
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9277
|
+
{ no: 2, name: "exposure_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9278
|
+
{ no: 3, name: "counter_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9279
|
+
{ no: 4, name: "direction", kind: "enum", T: proto3.getEnumType(MarginDirection), opt: true },
|
|
9280
|
+
{ no: 5, name: "venues", kind: "enum", T: proto3.getEnumType(MarginVenue), repeated: true },
|
|
9281
|
+
{ no: 6, name: "cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9282
|
+
{ no: 7, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
9283
|
+
]);
|
|
9284
|
+
/**
|
|
9285
|
+
* @generated from message trading.v1.MarginMarketsResponse
|
|
9286
|
+
*/
|
|
9287
|
+
export class MarginMarketsResponse extends Message {
|
|
9288
|
+
constructor(data) {
|
|
9289
|
+
super();
|
|
9290
|
+
/**
|
|
9291
|
+
* @generated from field: string request_id = 1;
|
|
9292
|
+
*/
|
|
9293
|
+
this.requestId = "";
|
|
9294
|
+
/**
|
|
9295
|
+
* @generated from field: repeated trading.v1.MarginMarketRow markets = 2;
|
|
9296
|
+
*/
|
|
9297
|
+
this.markets = [];
|
|
9298
|
+
proto3.util.initPartial(data, this);
|
|
9299
|
+
}
|
|
9300
|
+
static fromBinary(bytes, options) {
|
|
9301
|
+
return new MarginMarketsResponse().fromBinary(bytes, options);
|
|
9302
|
+
}
|
|
9303
|
+
static fromJson(jsonValue, options) {
|
|
9304
|
+
return new MarginMarketsResponse().fromJson(jsonValue, options);
|
|
9305
|
+
}
|
|
9306
|
+
static fromJsonString(jsonString, options) {
|
|
9307
|
+
return new MarginMarketsResponse().fromJsonString(jsonString, options);
|
|
9308
|
+
}
|
|
9309
|
+
static equals(a, b) {
|
|
9310
|
+
return proto3.util.equals(MarginMarketsResponse, a, b);
|
|
9311
|
+
}
|
|
9312
|
+
}
|
|
9313
|
+
MarginMarketsResponse.runtime = proto3;
|
|
9314
|
+
MarginMarketsResponse.typeName = "trading.v1.MarginMarketsResponse";
|
|
9315
|
+
MarginMarketsResponse.fields = proto3.util.newFieldList(() => [
|
|
9316
|
+
{ no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9317
|
+
{ no: 2, name: "markets", kind: "message", T: MarginMarketRow, repeated: true },
|
|
9318
|
+
{ no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9319
|
+
]);
|