@uniswap/client-trading 0.11.16 → 0.11.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +89 -0
- package/dist/trading/v1/api_pb.js +116 -0
- 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, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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, MarginAssetsRequest, MarginAssetsResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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
|
*/
|
|
@@ -336,6 +336,20 @@ export declare const marginMarkets: {
|
|
|
336
336
|
readonly typeName: "trading.v1.tradingService";
|
|
337
337
|
};
|
|
338
338
|
};
|
|
339
|
+
/**
|
|
340
|
+
* @generated from rpc trading.v1.tradingService.MarginAssets
|
|
341
|
+
*/
|
|
342
|
+
export declare const marginAssets: {
|
|
343
|
+
readonly localName: "marginAssets";
|
|
344
|
+
readonly name: "MarginAssets";
|
|
345
|
+
readonly kind: MethodKind.Unary;
|
|
346
|
+
readonly I: typeof MarginAssetsRequest;
|
|
347
|
+
readonly O: typeof MarginAssetsResponse;
|
|
348
|
+
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
349
|
+
readonly service: {
|
|
350
|
+
readonly typeName: "trading.v1.tradingService";
|
|
351
|
+
};
|
|
352
|
+
};
|
|
339
353
|
/**
|
|
340
354
|
* @generated from rpc trading.v1.tradingService.MarginPositions
|
|
341
355
|
*/
|
|
@@ -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, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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, MarginAssetsRequest, MarginAssetsResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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
|
*/
|
|
@@ -340,6 +340,20 @@ export const marginMarkets = {
|
|
|
340
340
|
typeName: "trading.v1.tradingService"
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* @generated from rpc trading.v1.tradingService.MarginAssets
|
|
345
|
+
*/
|
|
346
|
+
export const marginAssets = {
|
|
347
|
+
localName: "marginAssets",
|
|
348
|
+
name: "MarginAssets",
|
|
349
|
+
kind: MethodKind.Unary,
|
|
350
|
+
I: MarginAssetsRequest,
|
|
351
|
+
O: MarginAssetsResponse,
|
|
352
|
+
idempotency: MethodIdempotency.NoSideEffects,
|
|
353
|
+
service: {
|
|
354
|
+
typeName: "trading.v1.tradingService"
|
|
355
|
+
}
|
|
356
|
+
};
|
|
343
357
|
/**
|
|
344
358
|
* @generated from rpc trading.v1.tradingService.MarginPositions
|
|
345
359
|
*/
|
|
@@ -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, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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, MarginAssetsRequest, MarginAssetsResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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
|
|
@@ -246,6 +246,16 @@ export declare const tradingService: {
|
|
|
246
246
|
readonly kind: MethodKind.Unary;
|
|
247
247
|
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
248
248
|
};
|
|
249
|
+
/**
|
|
250
|
+
* @generated from rpc trading.v1.tradingService.MarginAssets
|
|
251
|
+
*/
|
|
252
|
+
readonly marginAssets: {
|
|
253
|
+
readonly name: "MarginAssets";
|
|
254
|
+
readonly I: typeof MarginAssetsRequest;
|
|
255
|
+
readonly O: typeof MarginAssetsResponse;
|
|
256
|
+
readonly kind: MethodKind.Unary;
|
|
257
|
+
readonly idempotency: MethodIdempotency.NoSideEffects;
|
|
258
|
+
};
|
|
249
259
|
/**
|
|
250
260
|
* @generated from rpc trading.v1.tradingService.MarginPositions
|
|
251
261
|
*/
|
|
@@ -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, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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, MarginAssetsRequest, MarginAssetsResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, 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
|
|
@@ -250,6 +250,16 @@ export const tradingService = {
|
|
|
250
250
|
kind: MethodKind.Unary,
|
|
251
251
|
idempotency: MethodIdempotency.NoSideEffects,
|
|
252
252
|
},
|
|
253
|
+
/**
|
|
254
|
+
* @generated from rpc trading.v1.tradingService.MarginAssets
|
|
255
|
+
*/
|
|
256
|
+
marginAssets: {
|
|
257
|
+
name: "MarginAssets",
|
|
258
|
+
I: MarginAssetsRequest,
|
|
259
|
+
O: MarginAssetsResponse,
|
|
260
|
+
kind: MethodKind.Unary,
|
|
261
|
+
idempotency: MethodIdempotency.NoSideEffects,
|
|
262
|
+
},
|
|
253
263
|
/**
|
|
254
264
|
* @generated from rpc trading.v1.tradingService.MarginPositions
|
|
255
265
|
*/
|
|
@@ -4683,6 +4683,16 @@ export declare class SwapResult extends Message<SwapResult> {
|
|
|
4683
4683
|
* @generated from field: optional trading.v1.SponsorMetadata sponsorship = 8;
|
|
4684
4684
|
*/
|
|
4685
4685
|
sponsorship?: SponsorMetadata;
|
|
4686
|
+
/**
|
|
4687
|
+
* Destination-chain fill of a bridge, once the bridge provider reports it.
|
|
4688
|
+
*
|
|
4689
|
+
* @generated from field: optional string fill_tx_hash = 9;
|
|
4690
|
+
*/
|
|
4691
|
+
fillTxHash?: string;
|
|
4692
|
+
/**
|
|
4693
|
+
* @generated from field: optional trading.v1.ChainId fill_chain_id = 10;
|
|
4694
|
+
*/
|
|
4695
|
+
fillChainId?: ChainId;
|
|
4686
4696
|
constructor(data?: PartialMessage<SwapResult>);
|
|
4687
4697
|
static readonly runtime: typeof proto3;
|
|
4688
4698
|
static readonly typeName = "trading.v1.SwapResult";
|
|
@@ -8418,6 +8428,85 @@ export declare class MarginMarketsResponse extends Message<MarginMarketsResponse
|
|
|
8418
8428
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginMarketsResponse;
|
|
8419
8429
|
static equals(a: MarginMarketsResponse | PlainMessage<MarginMarketsResponse> | undefined, b: MarginMarketsResponse | PlainMessage<MarginMarketsResponse> | undefined): boolean;
|
|
8420
8430
|
}
|
|
8431
|
+
/**
|
|
8432
|
+
* @generated from message trading.v1.MarginAssetsRequest
|
|
8433
|
+
*/
|
|
8434
|
+
export declare class MarginAssetsRequest extends Message<MarginAssetsRequest> {
|
|
8435
|
+
/**
|
|
8436
|
+
* @generated from field: int32 chain_id = 1;
|
|
8437
|
+
*/
|
|
8438
|
+
chainId: number;
|
|
8439
|
+
constructor(data?: PartialMessage<MarginAssetsRequest>);
|
|
8440
|
+
static readonly runtime: typeof proto3;
|
|
8441
|
+
static readonly typeName = "trading.v1.MarginAssetsRequest";
|
|
8442
|
+
static readonly fields: FieldList;
|
|
8443
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginAssetsRequest;
|
|
8444
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginAssetsRequest;
|
|
8445
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginAssetsRequest;
|
|
8446
|
+
static equals(a: MarginAssetsRequest | PlainMessage<MarginAssetsRequest> | undefined, b: MarginAssetsRequest | PlainMessage<MarginAssetsRequest> | undefined): boolean;
|
|
8447
|
+
}
|
|
8448
|
+
/**
|
|
8449
|
+
* One per (exposure_token, counter_token) within a direction.
|
|
8450
|
+
*
|
|
8451
|
+
* @generated from message trading.v1.MarginAssetPair
|
|
8452
|
+
*/
|
|
8453
|
+
export declare class MarginAssetPair extends Message<MarginAssetPair> {
|
|
8454
|
+
/**
|
|
8455
|
+
* @generated from field: trading.v1.MarginTokenMetadata exposure_token = 1;
|
|
8456
|
+
*/
|
|
8457
|
+
exposureToken?: MarginTokenMetadata;
|
|
8458
|
+
/**
|
|
8459
|
+
* @generated from field: trading.v1.MarginTokenMetadata counter_token = 2;
|
|
8460
|
+
*/
|
|
8461
|
+
counterToken?: MarginTokenMetadata;
|
|
8462
|
+
/**
|
|
8463
|
+
* The venues whose adapter supports the pair in the catalogue, never empty.
|
|
8464
|
+
* A listed venue can still be refused on live reserve or router state, so
|
|
8465
|
+
* /margin/markets and the quote are authoritative for what opens.
|
|
8466
|
+
*
|
|
8467
|
+
* @generated from field: repeated trading.v1.MarginVenue venues = 3;
|
|
8468
|
+
*/
|
|
8469
|
+
venues: MarginVenue[];
|
|
8470
|
+
constructor(data?: PartialMessage<MarginAssetPair>);
|
|
8471
|
+
static readonly runtime: typeof proto3;
|
|
8472
|
+
static readonly typeName = "trading.v1.MarginAssetPair";
|
|
8473
|
+
static readonly fields: FieldList;
|
|
8474
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginAssetPair;
|
|
8475
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginAssetPair;
|
|
8476
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginAssetPair;
|
|
8477
|
+
static equals(a: MarginAssetPair | PlainMessage<MarginAssetPair> | undefined, b: MarginAssetPair | PlainMessage<MarginAssetPair> | undefined): boolean;
|
|
8478
|
+
}
|
|
8479
|
+
/**
|
|
8480
|
+
* Both lists are ordered by exposure_token, then counter_token, address.
|
|
8481
|
+
*
|
|
8482
|
+
* @generated from message trading.v1.MarginAssetsResponse
|
|
8483
|
+
*/
|
|
8484
|
+
export declare class MarginAssetsResponse extends Message<MarginAssetsResponse> {
|
|
8485
|
+
/**
|
|
8486
|
+
* @generated from field: string request_id = 1;
|
|
8487
|
+
*/
|
|
8488
|
+
requestId: string;
|
|
8489
|
+
/**
|
|
8490
|
+
* Exposure is the collateral, counter the debt.
|
|
8491
|
+
*
|
|
8492
|
+
* @generated from field: repeated trading.v1.MarginAssetPair longs = 2;
|
|
8493
|
+
*/
|
|
8494
|
+
longs: MarginAssetPair[];
|
|
8495
|
+
/**
|
|
8496
|
+
* Exposure is the debt, counter the collateral.
|
|
8497
|
+
*
|
|
8498
|
+
* @generated from field: repeated trading.v1.MarginAssetPair shorts = 3;
|
|
8499
|
+
*/
|
|
8500
|
+
shorts: MarginAssetPair[];
|
|
8501
|
+
constructor(data?: PartialMessage<MarginAssetsResponse>);
|
|
8502
|
+
static readonly runtime: typeof proto3;
|
|
8503
|
+
static readonly typeName = "trading.v1.MarginAssetsResponse";
|
|
8504
|
+
static readonly fields: FieldList;
|
|
8505
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginAssetsResponse;
|
|
8506
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginAssetsResponse;
|
|
8507
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginAssetsResponse;
|
|
8508
|
+
static equals(a: MarginAssetsResponse | PlainMessage<MarginAssetsResponse> | undefined, b: MarginAssetsResponse | PlainMessage<MarginAssetsResponse> | undefined): boolean;
|
|
8509
|
+
}
|
|
8421
8510
|
/**
|
|
8422
8511
|
* increaseLeverage, decreaseLeverage. Equity is held, so no amount.
|
|
8423
8512
|
*
|
|
@@ -5506,6 +5506,8 @@ SwapResult.fields = proto3.util.newFieldList(() => [
|
|
|
5506
5506
|
{ no: 6, name: "hash_type", kind: "enum", T: proto3.getEnumType(SwapResult_HashType) },
|
|
5507
5507
|
{ no: 7, name: "paymaster", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
5508
5508
|
{ no: 8, name: "sponsorship", kind: "message", T: SponsorMetadata, opt: true },
|
|
5509
|
+
{ no: 9, name: "fill_tx_hash", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
5510
|
+
{ no: 10, name: "fill_chain_id", kind: "enum", T: proto3.getEnumType(ChainId), opt: true },
|
|
5509
5511
|
]);
|
|
5510
5512
|
/**
|
|
5511
5513
|
* @generated from enum trading.v1.SwapResult.SwapStatus
|
|
@@ -9774,6 +9776,120 @@ MarginMarketsResponse.fields = proto3.util.newFieldList(() => [
|
|
|
9774
9776
|
{ no: 2, name: "markets", kind: "message", T: MarginMarketRow, repeated: true },
|
|
9775
9777
|
{ no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
9776
9778
|
]);
|
|
9779
|
+
/**
|
|
9780
|
+
* @generated from message trading.v1.MarginAssetsRequest
|
|
9781
|
+
*/
|
|
9782
|
+
export class MarginAssetsRequest extends Message {
|
|
9783
|
+
constructor(data) {
|
|
9784
|
+
super();
|
|
9785
|
+
/**
|
|
9786
|
+
* @generated from field: int32 chain_id = 1;
|
|
9787
|
+
*/
|
|
9788
|
+
this.chainId = 0;
|
|
9789
|
+
proto3.util.initPartial(data, this);
|
|
9790
|
+
}
|
|
9791
|
+
static fromBinary(bytes, options) {
|
|
9792
|
+
return new MarginAssetsRequest().fromBinary(bytes, options);
|
|
9793
|
+
}
|
|
9794
|
+
static fromJson(jsonValue, options) {
|
|
9795
|
+
return new MarginAssetsRequest().fromJson(jsonValue, options);
|
|
9796
|
+
}
|
|
9797
|
+
static fromJsonString(jsonString, options) {
|
|
9798
|
+
return new MarginAssetsRequest().fromJsonString(jsonString, options);
|
|
9799
|
+
}
|
|
9800
|
+
static equals(a, b) {
|
|
9801
|
+
return proto3.util.equals(MarginAssetsRequest, a, b);
|
|
9802
|
+
}
|
|
9803
|
+
}
|
|
9804
|
+
MarginAssetsRequest.runtime = proto3;
|
|
9805
|
+
MarginAssetsRequest.typeName = "trading.v1.MarginAssetsRequest";
|
|
9806
|
+
MarginAssetsRequest.fields = proto3.util.newFieldList(() => [
|
|
9807
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
9808
|
+
]);
|
|
9809
|
+
/**
|
|
9810
|
+
* One per (exposure_token, counter_token) within a direction.
|
|
9811
|
+
*
|
|
9812
|
+
* @generated from message trading.v1.MarginAssetPair
|
|
9813
|
+
*/
|
|
9814
|
+
export class MarginAssetPair extends Message {
|
|
9815
|
+
constructor(data) {
|
|
9816
|
+
super();
|
|
9817
|
+
/**
|
|
9818
|
+
* The venues whose adapter supports the pair in the catalogue, never empty.
|
|
9819
|
+
* A listed venue can still be refused on live reserve or router state, so
|
|
9820
|
+
* /margin/markets and the quote are authoritative for what opens.
|
|
9821
|
+
*
|
|
9822
|
+
* @generated from field: repeated trading.v1.MarginVenue venues = 3;
|
|
9823
|
+
*/
|
|
9824
|
+
this.venues = [];
|
|
9825
|
+
proto3.util.initPartial(data, this);
|
|
9826
|
+
}
|
|
9827
|
+
static fromBinary(bytes, options) {
|
|
9828
|
+
return new MarginAssetPair().fromBinary(bytes, options);
|
|
9829
|
+
}
|
|
9830
|
+
static fromJson(jsonValue, options) {
|
|
9831
|
+
return new MarginAssetPair().fromJson(jsonValue, options);
|
|
9832
|
+
}
|
|
9833
|
+
static fromJsonString(jsonString, options) {
|
|
9834
|
+
return new MarginAssetPair().fromJsonString(jsonString, options);
|
|
9835
|
+
}
|
|
9836
|
+
static equals(a, b) {
|
|
9837
|
+
return proto3.util.equals(MarginAssetPair, a, b);
|
|
9838
|
+
}
|
|
9839
|
+
}
|
|
9840
|
+
MarginAssetPair.runtime = proto3;
|
|
9841
|
+
MarginAssetPair.typeName = "trading.v1.MarginAssetPair";
|
|
9842
|
+
MarginAssetPair.fields = proto3.util.newFieldList(() => [
|
|
9843
|
+
{ no: 1, name: "exposure_token", kind: "message", T: MarginTokenMetadata },
|
|
9844
|
+
{ no: 2, name: "counter_token", kind: "message", T: MarginTokenMetadata },
|
|
9845
|
+
{ no: 3, name: "venues", kind: "enum", T: proto3.getEnumType(MarginVenue), repeated: true },
|
|
9846
|
+
]);
|
|
9847
|
+
/**
|
|
9848
|
+
* Both lists are ordered by exposure_token, then counter_token, address.
|
|
9849
|
+
*
|
|
9850
|
+
* @generated from message trading.v1.MarginAssetsResponse
|
|
9851
|
+
*/
|
|
9852
|
+
export class MarginAssetsResponse extends Message {
|
|
9853
|
+
constructor(data) {
|
|
9854
|
+
super();
|
|
9855
|
+
/**
|
|
9856
|
+
* @generated from field: string request_id = 1;
|
|
9857
|
+
*/
|
|
9858
|
+
this.requestId = "";
|
|
9859
|
+
/**
|
|
9860
|
+
* Exposure is the collateral, counter the debt.
|
|
9861
|
+
*
|
|
9862
|
+
* @generated from field: repeated trading.v1.MarginAssetPair longs = 2;
|
|
9863
|
+
*/
|
|
9864
|
+
this.longs = [];
|
|
9865
|
+
/**
|
|
9866
|
+
* Exposure is the debt, counter the collateral.
|
|
9867
|
+
*
|
|
9868
|
+
* @generated from field: repeated trading.v1.MarginAssetPair shorts = 3;
|
|
9869
|
+
*/
|
|
9870
|
+
this.shorts = [];
|
|
9871
|
+
proto3.util.initPartial(data, this);
|
|
9872
|
+
}
|
|
9873
|
+
static fromBinary(bytes, options) {
|
|
9874
|
+
return new MarginAssetsResponse().fromBinary(bytes, options);
|
|
9875
|
+
}
|
|
9876
|
+
static fromJson(jsonValue, options) {
|
|
9877
|
+
return new MarginAssetsResponse().fromJson(jsonValue, options);
|
|
9878
|
+
}
|
|
9879
|
+
static fromJsonString(jsonString, options) {
|
|
9880
|
+
return new MarginAssetsResponse().fromJsonString(jsonString, options);
|
|
9881
|
+
}
|
|
9882
|
+
static equals(a, b) {
|
|
9883
|
+
return proto3.util.equals(MarginAssetsResponse, a, b);
|
|
9884
|
+
}
|
|
9885
|
+
}
|
|
9886
|
+
MarginAssetsResponse.runtime = proto3;
|
|
9887
|
+
MarginAssetsResponse.typeName = "trading.v1.MarginAssetsResponse";
|
|
9888
|
+
MarginAssetsResponse.fields = proto3.util.newFieldList(() => [
|
|
9889
|
+
{ no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
9890
|
+
{ no: 2, name: "longs", kind: "message", T: MarginAssetPair, repeated: true },
|
|
9891
|
+
{ no: 3, name: "shorts", kind: "message", T: MarginAssetPair, repeated: true },
|
|
9892
|
+
]);
|
|
9777
9893
|
/**
|
|
9778
9894
|
* increaseLeverage, decreaseLeverage. Equity is held, so no amount.
|
|
9779
9895
|
*
|