@silvana-one/orderbook 1.1.8 → 1.1.9

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.
Files changed (41) hide show
  1. package/dist/node/index.cjs +262 -5
  2. package/dist/node/index.d.ts +2 -1
  3. package/dist/node/index.js +2 -1
  4. package/dist/node/index.js.map +1 -1
  5. package/dist/node/{grpc.d.ts → orderbook.d.ts} +48 -1
  6. package/dist/{web/grpc.js → node/orderbook.js} +50 -2
  7. package/dist/node/orderbook.js.map +1 -0
  8. package/dist/node/pricing.d.ts +81 -0
  9. package/dist/node/pricing.js +115 -0
  10. package/dist/node/pricing.js.map +1 -0
  11. package/dist/node/proto/silvana/orderbook/v1/orderbook_pb.d.ts +398 -0
  12. package/dist/node/proto/silvana/orderbook/v1/orderbook_pb.js +47 -2
  13. package/dist/node/proto/silvana/orderbook/v1/orderbook_pb.js.map +1 -1
  14. package/dist/node/proto/silvana/pricing/v1/pricing_pb.d.ts +794 -0
  15. package/dist/node/proto/silvana/pricing/v1/pricing_pb.js +119 -0
  16. package/dist/node/proto/silvana/pricing/v1/pricing_pb.js.map +1 -0
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/dist/tsconfig.web.tsbuildinfo +1 -1
  19. package/dist/web/index.d.ts +2 -1
  20. package/dist/web/index.js +2 -1
  21. package/dist/web/index.js.map +1 -1
  22. package/dist/web/{grpc.d.ts → orderbook.d.ts} +48 -1
  23. package/dist/{node/grpc.js → web/orderbook.js} +50 -2
  24. package/dist/web/orderbook.js.map +1 -0
  25. package/dist/web/pricing.d.ts +81 -0
  26. package/dist/web/pricing.js +115 -0
  27. package/dist/web/pricing.js.map +1 -0
  28. package/dist/web/proto/silvana/orderbook/v1/orderbook_pb.d.ts +398 -0
  29. package/dist/web/proto/silvana/orderbook/v1/orderbook_pb.js +47 -2
  30. package/dist/web/proto/silvana/orderbook/v1/orderbook_pb.js.map +1 -1
  31. package/dist/web/proto/silvana/pricing/v1/pricing_pb.d.ts +794 -0
  32. package/dist/web/proto/silvana/pricing/v1/pricing_pb.js +119 -0
  33. package/dist/web/proto/silvana/pricing/v1/pricing_pb.js.map +1 -0
  34. package/package.json +4 -2
  35. package/src/index.ts +2 -1
  36. package/src/{grpc.ts → orderbook.ts} +91 -0
  37. package/src/pricing.ts +187 -0
  38. package/src/proto/silvana/orderbook/v1/orderbook_pb.ts +475 -2
  39. package/src/proto/silvana/pricing/v1/pricing_pb.ts +950 -0
  40. package/dist/node/grpc.js.map +0 -1
  41. package/dist/web/grpc.js.map +0 -1
@@ -0,0 +1,81 @@
1
+ export * from "./proto/silvana/pricing/v1/pricing_pb.js";
2
+ import { type GetPriceResponse, type GetPricesResponse, type GetKlinesResponse, type GetOrderBookResponse, type GetPivotPointsResponse } from "./proto/silvana/pricing/v1/pricing_pb.js";
3
+ /**
4
+ * Custom error class for Pricing client errors
5
+ */
6
+ export declare class PricingError extends Error {
7
+ code?: string | undefined;
8
+ details?: any | undefined;
9
+ constructor(message: string, code?: string | undefined, details?: any | undefined);
10
+ }
11
+ /**
12
+ * Pricing client configuration
13
+ */
14
+ export interface PricingClientConfig {
15
+ /** Base URL of the pricing service (e.g., "http://localhost:50053") */
16
+ baseUrl: string;
17
+ }
18
+ /**
19
+ * Pricing client for interacting with the Silvana Pricing Service
20
+ */
21
+ export declare class PricingClient {
22
+ private client;
23
+ /**
24
+ * Creates a new PricingClient instance
25
+ * @param config Client configuration
26
+ */
27
+ constructor(config: PricingClientConfig);
28
+ /**
29
+ * Wraps async calls with error handling
30
+ */
31
+ private wrapCall;
32
+ /**
33
+ * Get current price for a market
34
+ */
35
+ getPrice(params: {
36
+ marketId: string;
37
+ source?: string;
38
+ }): Promise<GetPriceResponse>;
39
+ /**
40
+ * Get multiple market prices
41
+ */
42
+ getPrices(params: {
43
+ marketIds: string[];
44
+ source?: string;
45
+ }): Promise<GetPricesResponse>;
46
+ /**
47
+ * Get kline/candle data
48
+ */
49
+ getKlines(params: {
50
+ marketId: string;
51
+ interval: string;
52
+ limit?: number;
53
+ startTime?: Date;
54
+ endTime?: Date;
55
+ source?: string;
56
+ }): Promise<GetKlinesResponse>;
57
+ /**
58
+ * Get order book snapshot
59
+ */
60
+ getOrderBook(params: {
61
+ marketId: string;
62
+ depth?: number;
63
+ source?: string;
64
+ }): Promise<GetOrderBookResponse>;
65
+ /**
66
+ * Stream real-time price updates
67
+ */
68
+ streamPrices(params: {
69
+ marketIds: string[];
70
+ includeOrderbook?: boolean;
71
+ includeTrades?: boolean;
72
+ }): AsyncIterable<import("./proto/silvana/pricing/v1/pricing_pb.js").PriceUpdate>;
73
+ /**
74
+ * Get calculated pivot points
75
+ */
76
+ getPivotPoints(params: {
77
+ marketId: string;
78
+ timeframe: string;
79
+ source?: string;
80
+ }): Promise<GetPivotPointsResponse>;
81
+ }
@@ -0,0 +1,115 @@
1
+ import { createGrpcTransport } from "@connectrpc/connect-node";
2
+ import { createClient, ConnectError } from "@connectrpc/connect";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { TimestampSchema } from "@bufbuild/protobuf/wkt";
5
+ // Export all types and schemas from the generated protobuf file
6
+ export * from "./proto/silvana/pricing/v1/pricing_pb.js";
7
+ import { PricingService, GetPriceRequestSchema, GetPricesRequestSchema, GetKlinesRequestSchema, GetOrderBookRequestSchema, StreamPricesRequestSchema, GetPivotPointsRequestSchema, } from "./proto/silvana/pricing/v1/pricing_pb.js";
8
+ /**
9
+ * Converts a Date to a Timestamp message
10
+ */
11
+ function dateToTimestamp(date) {
12
+ const seconds = BigInt(Math.floor(date.getTime() / 1000));
13
+ const nanos = (date.getTime() % 1000) * 1000000;
14
+ return create(TimestampSchema, { seconds, nanos });
15
+ }
16
+ /**
17
+ * Custom error class for Pricing client errors
18
+ */
19
+ export class PricingError extends Error {
20
+ constructor(message, code, details) {
21
+ super(message);
22
+ this.code = code;
23
+ this.details = details;
24
+ this.name = 'PricingError';
25
+ }
26
+ }
27
+ /**
28
+ * Pricing client for interacting with the Silvana Pricing Service
29
+ */
30
+ export class PricingClient {
31
+ /**
32
+ * Creates a new PricingClient instance
33
+ * @param config Client configuration
34
+ */
35
+ constructor(config) {
36
+ const transport = createGrpcTransport({
37
+ baseUrl: config.baseUrl,
38
+ });
39
+ this.client = createClient(PricingService, transport);
40
+ }
41
+ /**
42
+ * Wraps async calls with error handling
43
+ */
44
+ async wrapCall(operation, operationName) {
45
+ try {
46
+ return await operation();
47
+ }
48
+ catch (error) {
49
+ if (error instanceof ConnectError) {
50
+ throw new PricingError(`${operationName} failed: ${error.message}`, String(error.code), error.metadata);
51
+ }
52
+ throw new PricingError(`${operationName} failed: ${error instanceof Error ? error.message : 'Unknown error'}`, 'UNKNOWN', error);
53
+ }
54
+ }
55
+ /**
56
+ * Get current price for a market
57
+ */
58
+ async getPrice(params) {
59
+ return await this.wrapCall(async () => {
60
+ const request = create(GetPriceRequestSchema, params);
61
+ return await this.client.getPrice(request);
62
+ }, 'getPrice');
63
+ }
64
+ /**
65
+ * Get multiple market prices
66
+ */
67
+ async getPrices(params) {
68
+ return await this.wrapCall(async () => {
69
+ const request = create(GetPricesRequestSchema, params);
70
+ return await this.client.getPrices(request);
71
+ }, 'getPrices');
72
+ }
73
+ /**
74
+ * Get kline/candle data
75
+ */
76
+ async getKlines(params) {
77
+ return await this.wrapCall(async () => {
78
+ const request = create(GetKlinesRequestSchema, {
79
+ marketId: params.marketId,
80
+ interval: params.interval,
81
+ limit: params.limit,
82
+ startTime: params.startTime ? dateToTimestamp(params.startTime) : undefined,
83
+ endTime: params.endTime ? dateToTimestamp(params.endTime) : undefined,
84
+ source: params.source,
85
+ });
86
+ return await this.client.getKlines(request);
87
+ }, 'getKlines');
88
+ }
89
+ /**
90
+ * Get order book snapshot
91
+ */
92
+ async getOrderBook(params) {
93
+ return await this.wrapCall(async () => {
94
+ const request = create(GetOrderBookRequestSchema, params);
95
+ return await this.client.getOrderBook(request);
96
+ }, 'getOrderBook');
97
+ }
98
+ /**
99
+ * Stream real-time price updates
100
+ */
101
+ streamPrices(params) {
102
+ const request = create(StreamPricesRequestSchema, params);
103
+ return this.client.streamPrices(request);
104
+ }
105
+ /**
106
+ * Get calculated pivot points
107
+ */
108
+ async getPivotPoints(params) {
109
+ return await this.wrapCall(async () => {
110
+ const request = create(GetPivotPointsRequestSchema, params);
111
+ return await this.client.getPivotPoints(request);
112
+ }, 'getPivotPoints');
113
+ }
114
+ }
115
+ //# sourceMappingURL=pricing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,gEAAgE;AAChE,cAAc,0CAA0C,CAAC;AAEzD,OAAO,EACL,cAAc,EAMd,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAElD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAU;IACjC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC;IAChD,OAAO,MAAM,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe,EACR,IAAa,EACb,OAAa;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAA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c,CAAC,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,MAIZ;QACC,MAAM,OAAO,GAAG,MAAM,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAAC,MAIpB;QACC,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YACpC,MAAM,OAAO,GAAG,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;YAC5D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACvB,CAAC;CACF"}
@@ -149,6 +149,30 @@ export type Market = Message<"silvana.orderbook.v1.Market"> & {
149
149
  * @generated from field: google.protobuf.Timestamp updated_at = 14;
150
150
  */
151
151
  updatedAt?: Timestamp;
152
+ /**
153
+ * Price feed configurations
154
+ *
155
+ * @generated from field: optional google.protobuf.Struct price_feeds = 15;
156
+ */
157
+ priceFeeds?: JsonObject;
158
+ /**
159
+ * Optional price information (populated if available)
160
+ *
161
+ * @generated from field: optional double current_price = 16;
162
+ */
163
+ currentPrice?: number;
164
+ /**
165
+ * @generated from field: optional double change_24h = 17;
166
+ */
167
+ change24h?: number;
168
+ /**
169
+ * @generated from field: optional double volume_24h = 18;
170
+ */
171
+ volume24h?: number;
172
+ /**
173
+ * @generated from field: optional google.protobuf.Timestamp price_updated_at = 19;
174
+ */
175
+ priceUpdatedAt?: Timestamp;
152
176
  };
153
177
  /**
154
178
  * Describes the message silvana.orderbook.v1.Market.
@@ -1534,6 +1558,346 @@ export type CancelOrderResponse = Message<"silvana.orderbook.v1.CancelOrderRespo
1534
1558
  * Use `create(CancelOrderResponseSchema)` to create a new message.
1535
1559
  */
1536
1560
  export declare const CancelOrderResponseSchema: GenMessage<CancelOrderResponse>;
1561
+ /**
1562
+ * Create a new party (operator, registry, or trader)
1563
+ *
1564
+ * @generated from message silvana.orderbook.v1.CreatePartyRequest
1565
+ */
1566
+ export type CreatePartyRequest = Message<"silvana.orderbook.v1.CreatePartyRequest"> & {
1567
+ /**
1568
+ * @generated from field: silvana.orderbook.v1.JWTAuth auth = 1;
1569
+ */
1570
+ auth?: JWTAuth;
1571
+ /**
1572
+ * @generated from field: string party_id = 2;
1573
+ */
1574
+ partyId: string;
1575
+ /**
1576
+ * @generated from field: string party_name = 3;
1577
+ */
1578
+ partyName: string;
1579
+ /**
1580
+ * trader, operator, registry, issuer
1581
+ *
1582
+ * @generated from field: string party_type = 4;
1583
+ */
1584
+ partyType: string;
1585
+ /**
1586
+ * UserService contract ID for traders
1587
+ *
1588
+ * @generated from field: optional string user_service_cid = 5;
1589
+ */
1590
+ userServiceCid?: string;
1591
+ /**
1592
+ * OperatorConfiguration contract ID for operators
1593
+ *
1594
+ * @generated from field: optional string operator_config_cid = 6;
1595
+ */
1596
+ operatorConfigCid?: string;
1597
+ /**
1598
+ * @generated from field: optional google.protobuf.Struct metadata = 7;
1599
+ */
1600
+ metadata?: JsonObject;
1601
+ };
1602
+ /**
1603
+ * Describes the message silvana.orderbook.v1.CreatePartyRequest.
1604
+ * Use `create(CreatePartyRequestSchema)` to create a new message.
1605
+ */
1606
+ export declare const CreatePartyRequestSchema: GenMessage<CreatePartyRequest>;
1607
+ /**
1608
+ * @generated from message silvana.orderbook.v1.CreatePartyResponse
1609
+ */
1610
+ export type CreatePartyResponse = Message<"silvana.orderbook.v1.CreatePartyResponse"> & {
1611
+ /**
1612
+ * @generated from field: bool success = 1;
1613
+ */
1614
+ success: boolean;
1615
+ /**
1616
+ * @generated from field: string message = 2;
1617
+ */
1618
+ message: string;
1619
+ /**
1620
+ * @generated from field: silvana.orderbook.v1.Party party = 3;
1621
+ */
1622
+ party?: Party;
1623
+ };
1624
+ /**
1625
+ * Describes the message silvana.orderbook.v1.CreatePartyResponse.
1626
+ * Use `create(CreatePartyResponseSchema)` to create a new message.
1627
+ */
1628
+ export declare const CreatePartyResponseSchema: GenMessage<CreatePartyResponse>;
1629
+ /**
1630
+ * Party information
1631
+ *
1632
+ * @generated from message silvana.orderbook.v1.Party
1633
+ */
1634
+ export type Party = Message<"silvana.orderbook.v1.Party"> & {
1635
+ /**
1636
+ * @generated from field: string party_id = 1;
1637
+ */
1638
+ partyId: string;
1639
+ /**
1640
+ * @generated from field: string party_name = 2;
1641
+ */
1642
+ partyName: string;
1643
+ /**
1644
+ * @generated from field: string party_type = 3;
1645
+ */
1646
+ partyType: string;
1647
+ /**
1648
+ * @generated from field: optional string user_service_cid = 4;
1649
+ */
1650
+ userServiceCid?: string;
1651
+ /**
1652
+ * @generated from field: optional string operator_config_cid = 5;
1653
+ */
1654
+ operatorConfigCid?: string;
1655
+ /**
1656
+ * @generated from field: bool is_active = 6;
1657
+ */
1658
+ isActive: boolean;
1659
+ /**
1660
+ * @generated from field: optional google.protobuf.Struct metadata = 7;
1661
+ */
1662
+ metadata?: JsonObject;
1663
+ /**
1664
+ * @generated from field: google.protobuf.Timestamp created_at = 8;
1665
+ */
1666
+ createdAt?: Timestamp;
1667
+ /**
1668
+ * @generated from field: google.protobuf.Timestamp updated_at = 9;
1669
+ */
1670
+ updatedAt?: Timestamp;
1671
+ };
1672
+ /**
1673
+ * Describes the message silvana.orderbook.v1.Party.
1674
+ * Use `create(PartySchema)` to create a new message.
1675
+ */
1676
+ export declare const PartySchema: GenMessage<Party>;
1677
+ /**
1678
+ * Create a new instrument
1679
+ *
1680
+ * @generated from message silvana.orderbook.v1.CreateInstrumentRequest
1681
+ */
1682
+ export type CreateInstrumentRequest = Message<"silvana.orderbook.v1.CreateInstrumentRequest"> & {
1683
+ /**
1684
+ * @generated from field: silvana.orderbook.v1.JWTAuth auth = 1;
1685
+ */
1686
+ auth?: JWTAuth;
1687
+ /**
1688
+ * @generated from field: string instrument_id = 2;
1689
+ */
1690
+ instrumentId: string;
1691
+ /**
1692
+ * token, asset, commodity, native
1693
+ *
1694
+ * @generated from field: string instrument_type = 3;
1695
+ */
1696
+ instrumentType: string;
1697
+ /**
1698
+ * @generated from field: string name = 4;
1699
+ */
1700
+ name: string;
1701
+ /**
1702
+ * @generated from field: string symbol = 5;
1703
+ */
1704
+ symbol: string;
1705
+ /**
1706
+ * @generated from field: optional string description = 6;
1707
+ */
1708
+ description?: string;
1709
+ /**
1710
+ * Canton party ID
1711
+ *
1712
+ * @generated from field: optional string issuer = 7;
1713
+ */
1714
+ issuer?: string;
1715
+ /**
1716
+ * Canton registry party ID
1717
+ *
1718
+ * @generated from field: optional string registry = 8;
1719
+ */
1720
+ registry?: string;
1721
+ /**
1722
+ * @generated from field: optional google.protobuf.Struct metadata = 9;
1723
+ */
1724
+ metadata?: JsonObject;
1725
+ };
1726
+ /**
1727
+ * Describes the message silvana.orderbook.v1.CreateInstrumentRequest.
1728
+ * Use `create(CreateInstrumentRequestSchema)` to create a new message.
1729
+ */
1730
+ export declare const CreateInstrumentRequestSchema: GenMessage<CreateInstrumentRequest>;
1731
+ /**
1732
+ * @generated from message silvana.orderbook.v1.CreateInstrumentResponse
1733
+ */
1734
+ export type CreateInstrumentResponse = Message<"silvana.orderbook.v1.CreateInstrumentResponse"> & {
1735
+ /**
1736
+ * @generated from field: bool success = 1;
1737
+ */
1738
+ success: boolean;
1739
+ /**
1740
+ * @generated from field: string message = 2;
1741
+ */
1742
+ message: string;
1743
+ /**
1744
+ * @generated from field: silvana.orderbook.v1.Instrument instrument = 3;
1745
+ */
1746
+ instrument?: Instrument;
1747
+ };
1748
+ /**
1749
+ * Describes the message silvana.orderbook.v1.CreateInstrumentResponse.
1750
+ * Use `create(CreateInstrumentResponseSchema)` to create a new message.
1751
+ */
1752
+ export declare const CreateInstrumentResponseSchema: GenMessage<CreateInstrumentResponse>;
1753
+ /**
1754
+ * Create a new market
1755
+ *
1756
+ * @generated from message silvana.orderbook.v1.CreateMarketRequest
1757
+ */
1758
+ export type CreateMarketRequest = Message<"silvana.orderbook.v1.CreateMarketRequest"> & {
1759
+ /**
1760
+ * @generated from field: silvana.orderbook.v1.JWTAuth auth = 1;
1761
+ */
1762
+ auth?: JWTAuth;
1763
+ /**
1764
+ * @generated from field: string market_id = 2;
1765
+ */
1766
+ marketId: string;
1767
+ /**
1768
+ * @generated from field: silvana.orderbook.v1.MarketType market_type = 3;
1769
+ */
1770
+ marketType: MarketType;
1771
+ /**
1772
+ * Optional for general markets
1773
+ *
1774
+ * @generated from field: optional string base_instrument = 4;
1775
+ */
1776
+ baseInstrument?: string;
1777
+ /**
1778
+ * Optional for general markets
1779
+ *
1780
+ * @generated from field: optional string quote_instrument = 5;
1781
+ */
1782
+ quoteInstrument?: string;
1783
+ /**
1784
+ * DECIMAL as string
1785
+ *
1786
+ * @generated from field: string min_order_size = 6;
1787
+ */
1788
+ minOrderSize: string;
1789
+ /**
1790
+ * DECIMAL as string
1791
+ *
1792
+ * @generated from field: optional string max_order_size = 7;
1793
+ */
1794
+ maxOrderSize?: string;
1795
+ /**
1796
+ * Minimum price increment
1797
+ *
1798
+ * @generated from field: string tick_size = 8;
1799
+ */
1800
+ tickSize: string;
1801
+ /**
1802
+ * DECIMAL as string (e.g., "0.001" for 0.1%)
1803
+ *
1804
+ * @generated from field: string maker_fee = 9;
1805
+ */
1806
+ makerFee: string;
1807
+ /**
1808
+ * DECIMAL as string (e.g., "0.002" for 0.2%)
1809
+ *
1810
+ * @generated from field: string taker_fee = 10;
1811
+ */
1812
+ takerFee: string;
1813
+ /**
1814
+ * @generated from field: optional google.protobuf.Struct metadata = 11;
1815
+ */
1816
+ metadata?: JsonObject;
1817
+ /**
1818
+ * Price feed configurations
1819
+ *
1820
+ * @generated from field: optional google.protobuf.Struct price_feeds = 12;
1821
+ */
1822
+ priceFeeds?: JsonObject;
1823
+ };
1824
+ /**
1825
+ * Describes the message silvana.orderbook.v1.CreateMarketRequest.
1826
+ * Use `create(CreateMarketRequestSchema)` to create a new message.
1827
+ */
1828
+ export declare const CreateMarketRequestSchema: GenMessage<CreateMarketRequest>;
1829
+ /**
1830
+ * @generated from message silvana.orderbook.v1.CreateMarketResponse
1831
+ */
1832
+ export type CreateMarketResponse = Message<"silvana.orderbook.v1.CreateMarketResponse"> & {
1833
+ /**
1834
+ * @generated from field: bool success = 1;
1835
+ */
1836
+ success: boolean;
1837
+ /**
1838
+ * @generated from field: string message = 2;
1839
+ */
1840
+ message: string;
1841
+ /**
1842
+ * @generated from field: silvana.orderbook.v1.Market market = 3;
1843
+ */
1844
+ market?: Market;
1845
+ };
1846
+ /**
1847
+ * Describes the message silvana.orderbook.v1.CreateMarketResponse.
1848
+ * Use `create(CreateMarketResponseSchema)` to create a new message.
1849
+ */
1850
+ export declare const CreateMarketResponseSchema: GenMessage<CreateMarketResponse>;
1851
+ /**
1852
+ * Update price feeds for an existing market
1853
+ *
1854
+ * @generated from message silvana.orderbook.v1.UpdateMarketPriceFeedsRequest
1855
+ */
1856
+ export type UpdateMarketPriceFeedsRequest = Message<"silvana.orderbook.v1.UpdateMarketPriceFeedsRequest"> & {
1857
+ /**
1858
+ * @generated from field: silvana.orderbook.v1.JWTAuth auth = 1;
1859
+ */
1860
+ auth?: JWTAuth;
1861
+ /**
1862
+ * @generated from field: string market_id = 2;
1863
+ */
1864
+ marketId: string;
1865
+ /**
1866
+ * New price feed configuration
1867
+ *
1868
+ * @generated from field: google.protobuf.Struct price_feeds = 3;
1869
+ */
1870
+ priceFeeds?: JsonObject;
1871
+ };
1872
+ /**
1873
+ * Describes the message silvana.orderbook.v1.UpdateMarketPriceFeedsRequest.
1874
+ * Use `create(UpdateMarketPriceFeedsRequestSchema)` to create a new message.
1875
+ */
1876
+ export declare const UpdateMarketPriceFeedsRequestSchema: GenMessage<UpdateMarketPriceFeedsRequest>;
1877
+ /**
1878
+ * @generated from message silvana.orderbook.v1.UpdateMarketPriceFeedsResponse
1879
+ */
1880
+ export type UpdateMarketPriceFeedsResponse = Message<"silvana.orderbook.v1.UpdateMarketPriceFeedsResponse"> & {
1881
+ /**
1882
+ * @generated from field: bool success = 1;
1883
+ */
1884
+ success: boolean;
1885
+ /**
1886
+ * @generated from field: string message = 2;
1887
+ */
1888
+ message: string;
1889
+ /**
1890
+ * Updated market info
1891
+ *
1892
+ * @generated from field: silvana.orderbook.v1.Market market = 3;
1893
+ */
1894
+ market?: Market;
1895
+ };
1896
+ /**
1897
+ * Describes the message silvana.orderbook.v1.UpdateMarketPriceFeedsResponse.
1898
+ * Use `create(UpdateMarketPriceFeedsResponseSchema)` to create a new message.
1899
+ */
1900
+ export declare const UpdateMarketPriceFeedsResponseSchema: GenMessage<UpdateMarketPriceFeedsResponse>;
1537
1901
  /**
1538
1902
  * Order type enumeration
1539
1903
  *
@@ -1797,6 +2161,40 @@ export declare const OrderbookService: GenService<{
1797
2161
  input: typeof CancelOrderRequestSchema;
1798
2162
  output: typeof CancelOrderResponseSchema;
1799
2163
  };
2164
+ /**
2165
+ * Admin operations (require operator authentication)
2166
+ *
2167
+ * @generated from rpc silvana.orderbook.v1.OrderbookService.CreateParty
2168
+ */
2169
+ createParty: {
2170
+ methodKind: "unary";
2171
+ input: typeof CreatePartyRequestSchema;
2172
+ output: typeof CreatePartyResponseSchema;
2173
+ };
2174
+ /**
2175
+ * @generated from rpc silvana.orderbook.v1.OrderbookService.CreateInstrument
2176
+ */
2177
+ createInstrument: {
2178
+ methodKind: "unary";
2179
+ input: typeof CreateInstrumentRequestSchema;
2180
+ output: typeof CreateInstrumentResponseSchema;
2181
+ };
2182
+ /**
2183
+ * @generated from rpc silvana.orderbook.v1.OrderbookService.CreateMarket
2184
+ */
2185
+ createMarket: {
2186
+ methodKind: "unary";
2187
+ input: typeof CreateMarketRequestSchema;
2188
+ output: typeof CreateMarketResponseSchema;
2189
+ };
2190
+ /**
2191
+ * @generated from rpc silvana.orderbook.v1.OrderbookService.UpdateMarketPriceFeeds
2192
+ */
2193
+ updateMarketPriceFeeds: {
2194
+ methodKind: "unary";
2195
+ input: typeof UpdateMarketPriceFeedsRequestSchema;
2196
+ output: typeof UpdateMarketPriceFeedsResponseSchema;
2197
+ };
1800
2198
  /**
1801
2199
  * Streaming subscriptions
1802
2200
  *