@edel-finance/sdk 0.0.0-stage → 0.0.1
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/generated/asyncapi.d.ts +52 -0
- package/dist/generated/asyncapi.js +172 -0
- package/dist/generated/operations.d.ts +2820 -0
- package/dist/generated/operations.js +1627 -0
- package/dist/generated/proto/realtime-streams_pb.d.ts +3578 -0
- package/dist/generated/proto/realtime-streams_pb.js +496 -0
- package/dist/generated/rest/client/client.gen.d.ts +2 -0
- package/dist/generated/rest/client/client.gen.js +216 -0
- package/dist/generated/rest/client/index.d.ts +10 -0
- package/dist/generated/rest/client/index.js +6 -0
- package/dist/generated/rest/client/types.gen.d.ts +120 -0
- package/dist/generated/rest/client/types.gen.js +2 -0
- package/dist/generated/rest/client/utils.gen.d.ts +37 -0
- package/dist/generated/rest/client/utils.gen.js +228 -0
- package/dist/generated/rest/client.gen.d.ts +12 -0
- package/dist/generated/rest/client.gen.js +3 -0
- package/dist/generated/rest/core/auth.gen.d.ts +25 -0
- package/dist/generated/rest/core/auth.gen.js +14 -0
- package/dist/generated/rest/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/rest/core/bodySerializer.gen.js +57 -0
- package/dist/generated/rest/core/params.gen.d.ts +43 -0
- package/dist/generated/rest/core/params.gen.js +109 -0
- package/dist/generated/rest/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/rest/core/pathSerializer.gen.js +106 -0
- package/dist/generated/rest/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/rest/core/queryKeySerializer.gen.js +92 -0
- package/dist/generated/rest/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/rest/core/serverSentEvents.gen.js +132 -0
- package/dist/generated/rest/core/types.gen.d.ts +83 -0
- package/dist/generated/rest/core/types.gen.js +2 -0
- package/dist/generated/rest/core/utils.gen.d.ts +19 -0
- package/dist/generated/rest/core/utils.gen.js +87 -0
- package/dist/generated/rest/index.d.ts +2 -0
- package/dist/generated/rest/index.js +2 -0
- package/dist/generated/rest/sdk.gen.d.ts +2977 -0
- package/dist/generated/rest/sdk.gen.js +6126 -0
- package/dist/generated/rest/types.gen.d.ts +30058 -0
- package/dist/generated/rest/types.gen.js +2 -0
- package/dist/index.d.ts +169 -0
- package/dist/index.js +478 -0
- package/dist/swap.d.ts +130 -0
- package/dist/swap.js +16 -0
- package/package.json +33 -3
- package/README.md +0 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const ASYNCAPI_CHANNELS: readonly ["market.trades", "market.book", "market.ticker", "market.price", "market.funding", "market.status", "market.candles", "account.orders", "account.fills", "account.durability", "account.positions", "account.pnl", "account.margin", "account.balance", "account.withdrawals", "account.reconciliation", "account.alerts", "account.earnings", "admin.markets", "admin.bots", "admin.contracts", "admin.commands", "account.agents", "account.deposits", "markets.prices", "system.status", "account.performance", "account.fee-share-offers", "account.squid-transfers", "account.xreserve-bridge", "account.settlement", "market.orderbook"];
|
|
2
|
+
export type AsyncApiChannel = (typeof ASYNCAPI_CHANNELS)[number];
|
|
3
|
+
export interface AsyncApiChannelSpec {
|
|
4
|
+
readonly address: string;
|
|
5
|
+
readonly messages: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const ASYNCAPI_CHANNEL_SPECS: Record<AsyncApiChannel, AsyncApiChannelSpec>;
|
|
8
|
+
export interface RealtimeChannelSubscribeOptions {
|
|
9
|
+
marketId?: string;
|
|
10
|
+
accountId?: string;
|
|
11
|
+
orderId?: string;
|
|
12
|
+
onMessage?: (frame: unknown) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ChannelSubscriber {
|
|
15
|
+
subscribeChannel(channel: AsyncApiChannel, options?: RealtimeChannelSubscribeOptions): () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare class EdelRealtimeChannels {
|
|
18
|
+
private readonly subscriber;
|
|
19
|
+
constructor(subscriber: ChannelSubscriber);
|
|
20
|
+
marketTrades(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
21
|
+
marketBook(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
22
|
+
marketTicker(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
23
|
+
marketPrice(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
24
|
+
marketFunding(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
25
|
+
marketStatus(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
26
|
+
marketCandles(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
27
|
+
accountOrders(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
28
|
+
accountFills(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
29
|
+
accountDurability(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
30
|
+
accountPositions(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
31
|
+
accountPnl(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
32
|
+
accountMargin(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
33
|
+
accountBalance(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
34
|
+
accountWithdrawals(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
35
|
+
accountReconciliation(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
36
|
+
accountAlerts(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
37
|
+
accountEarnings(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
38
|
+
adminMarkets(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
39
|
+
adminBots(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
40
|
+
adminContracts(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
41
|
+
adminCommands(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
42
|
+
accountAgents(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
43
|
+
accountDeposits(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
44
|
+
marketsPrices(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
45
|
+
systemStatus(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
46
|
+
accountPerformance(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
47
|
+
accountFeeShareOffers(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
48
|
+
accountSquidTransfers(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
49
|
+
accountXreserveBridge(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
50
|
+
accountSettlement(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
51
|
+
marketOrderbook(options?: RealtimeChannelSubscribeOptions): () => void;
|
|
52
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Auto-generated from contracts/asyncapi.json.
|
|
2
|
+
// Do not edit by hand. Regenerate with `node scripts/generate-ts-contracts.mjs`.
|
|
3
|
+
export const ASYNCAPI_CHANNELS = [
|
|
4
|
+
"market.trades",
|
|
5
|
+
"market.book",
|
|
6
|
+
"market.ticker",
|
|
7
|
+
"market.price",
|
|
8
|
+
"market.funding",
|
|
9
|
+
"market.status",
|
|
10
|
+
"market.candles",
|
|
11
|
+
"account.orders",
|
|
12
|
+
"account.fills",
|
|
13
|
+
"account.durability",
|
|
14
|
+
"account.positions",
|
|
15
|
+
"account.pnl",
|
|
16
|
+
"account.margin",
|
|
17
|
+
"account.balance",
|
|
18
|
+
"account.withdrawals",
|
|
19
|
+
"account.reconciliation",
|
|
20
|
+
"account.alerts",
|
|
21
|
+
"account.earnings",
|
|
22
|
+
"admin.markets",
|
|
23
|
+
"admin.bots",
|
|
24
|
+
"admin.contracts",
|
|
25
|
+
"admin.commands",
|
|
26
|
+
"account.agents",
|
|
27
|
+
"account.deposits",
|
|
28
|
+
"markets.prices",
|
|
29
|
+
"system.status",
|
|
30
|
+
"account.performance",
|
|
31
|
+
"account.fee-share-offers",
|
|
32
|
+
"account.squid-transfers",
|
|
33
|
+
"account.xreserve-bridge",
|
|
34
|
+
"account.settlement",
|
|
35
|
+
"market.orderbook",
|
|
36
|
+
];
|
|
37
|
+
export const ASYNCAPI_CHANNEL_SPECS = {
|
|
38
|
+
"market.trades": { address: "market.trades", messages: ["RealtimeMarketTradePayload"] },
|
|
39
|
+
"market.book": { address: "market.book", messages: ["RealtimeMarketBookPayload"] },
|
|
40
|
+
"market.ticker": { address: "market.ticker", messages: ["RealtimeMarketTickerPayload"] },
|
|
41
|
+
"market.price": { address: "market.price", messages: ["RealtimeMarketPricePayload"] },
|
|
42
|
+
"market.funding": { address: "market.funding", messages: ["RealtimeMarketFundingPayload"] },
|
|
43
|
+
"market.status": { address: "market.status", messages: ["RealtimeMarketStatusPayload"] },
|
|
44
|
+
"market.candles": { address: "market.candles", messages: ["RealtimeMarketCandlePayload"] },
|
|
45
|
+
"account.orders": { address: "account.orders", messages: ["RealtimeAccountOrderPayload"] },
|
|
46
|
+
"account.fills": { address: "account.fills", messages: ["RealtimeAccountFillPayload"] },
|
|
47
|
+
"account.durability": { address: "account.durability", messages: ["RealtimeAccountDurabilityPayload"] },
|
|
48
|
+
"account.positions": { address: "account.positions", messages: ["RealtimeAccountPositionPayload"] },
|
|
49
|
+
"account.pnl": { address: "account.pnl", messages: ["RealtimeAccountPnlPayload"] },
|
|
50
|
+
"account.margin": { address: "account.margin", messages: ["RealtimeAccountMarginPayload"] },
|
|
51
|
+
"account.balance": { address: "account.balance", messages: ["RealtimeAccountBalancePayload"] },
|
|
52
|
+
"account.withdrawals": { address: "account.withdrawals", messages: ["RealtimeAccountWithdrawalPayload"] },
|
|
53
|
+
"account.reconciliation": { address: "account.reconciliation", messages: ["RealtimeAccountReconciliationPayload"] },
|
|
54
|
+
"account.alerts": { address: "account.alerts", messages: ["RealtimeAccountAlertPayload"] },
|
|
55
|
+
"account.earnings": { address: "account.earnings", messages: ["RealtimeAccountEarningsPayload"] },
|
|
56
|
+
"admin.markets": { address: "admin.markets", messages: ["RealtimeAdminMarketsPayload"] },
|
|
57
|
+
"admin.bots": { address: "admin.bots", messages: ["RealtimeAdminBotsPayload"] },
|
|
58
|
+
"admin.contracts": { address: "admin.contracts", messages: ["RealtimeAdminContractsPayload"] },
|
|
59
|
+
"admin.commands": { address: "admin.commands", messages: ["RealtimeAdminCommandsPayload"] },
|
|
60
|
+
"account.agents": { address: "account.agents", messages: ["RealtimeAccountAgentPayload"] },
|
|
61
|
+
"account.deposits": { address: "account.deposits", messages: ["RealtimeAccountDepositPayload"] },
|
|
62
|
+
"markets.prices": { address: "markets.prices", messages: ["RealtimeMarketsPricesPayload"] },
|
|
63
|
+
"system.status": { address: "system.status", messages: ["RealtimeSystemStatusPayload"] },
|
|
64
|
+
"account.performance": { address: "account.performance", messages: ["AccountPerformanceSnapshot"] },
|
|
65
|
+
"account.fee-share-offers": { address: "account.fee-share-offers", messages: ["FeeShareOfferEvent"] },
|
|
66
|
+
"account.squid-transfers": { address: "account.squid-transfers", messages: ["SquidTransferObservation"] },
|
|
67
|
+
"account.xreserve-bridge": { address: "account.xreserve-bridge", messages: ["RealtimeXreserveBridgeStatePayload"] },
|
|
68
|
+
"account.settlement": { address: "account.settlement", messages: ["RealtimeAccountSettlementPayload"] },
|
|
69
|
+
"market.orderbook": { address: "market.orderbook", messages: ["RealtimeMarketOrderbookPayload"] },
|
|
70
|
+
};
|
|
71
|
+
export class EdelRealtimeChannels {
|
|
72
|
+
subscriber;
|
|
73
|
+
constructor(subscriber) {
|
|
74
|
+
this.subscriber = subscriber;
|
|
75
|
+
}
|
|
76
|
+
marketTrades(options = {}) {
|
|
77
|
+
return this.subscriber.subscribeChannel("market.trades", options);
|
|
78
|
+
}
|
|
79
|
+
marketBook(options = {}) {
|
|
80
|
+
return this.subscriber.subscribeChannel("market.book", options);
|
|
81
|
+
}
|
|
82
|
+
marketTicker(options = {}) {
|
|
83
|
+
return this.subscriber.subscribeChannel("market.ticker", options);
|
|
84
|
+
}
|
|
85
|
+
marketPrice(options = {}) {
|
|
86
|
+
return this.subscriber.subscribeChannel("market.price", options);
|
|
87
|
+
}
|
|
88
|
+
marketFunding(options = {}) {
|
|
89
|
+
return this.subscriber.subscribeChannel("market.funding", options);
|
|
90
|
+
}
|
|
91
|
+
marketStatus(options = {}) {
|
|
92
|
+
return this.subscriber.subscribeChannel("market.status", options);
|
|
93
|
+
}
|
|
94
|
+
marketCandles(options = {}) {
|
|
95
|
+
return this.subscriber.subscribeChannel("market.candles", options);
|
|
96
|
+
}
|
|
97
|
+
accountOrders(options = {}) {
|
|
98
|
+
return this.subscriber.subscribeChannel("account.orders", options);
|
|
99
|
+
}
|
|
100
|
+
accountFills(options = {}) {
|
|
101
|
+
return this.subscriber.subscribeChannel("account.fills", options);
|
|
102
|
+
}
|
|
103
|
+
accountDurability(options = {}) {
|
|
104
|
+
return this.subscriber.subscribeChannel("account.durability", options);
|
|
105
|
+
}
|
|
106
|
+
accountPositions(options = {}) {
|
|
107
|
+
return this.subscriber.subscribeChannel("account.positions", options);
|
|
108
|
+
}
|
|
109
|
+
accountPnl(options = {}) {
|
|
110
|
+
return this.subscriber.subscribeChannel("account.pnl", options);
|
|
111
|
+
}
|
|
112
|
+
accountMargin(options = {}) {
|
|
113
|
+
return this.subscriber.subscribeChannel("account.margin", options);
|
|
114
|
+
}
|
|
115
|
+
accountBalance(options = {}) {
|
|
116
|
+
return this.subscriber.subscribeChannel("account.balance", options);
|
|
117
|
+
}
|
|
118
|
+
accountWithdrawals(options = {}) {
|
|
119
|
+
return this.subscriber.subscribeChannel("account.withdrawals", options);
|
|
120
|
+
}
|
|
121
|
+
accountReconciliation(options = {}) {
|
|
122
|
+
return this.subscriber.subscribeChannel("account.reconciliation", options);
|
|
123
|
+
}
|
|
124
|
+
accountAlerts(options = {}) {
|
|
125
|
+
return this.subscriber.subscribeChannel("account.alerts", options);
|
|
126
|
+
}
|
|
127
|
+
accountEarnings(options = {}) {
|
|
128
|
+
return this.subscriber.subscribeChannel("account.earnings", options);
|
|
129
|
+
}
|
|
130
|
+
adminMarkets(options = {}) {
|
|
131
|
+
return this.subscriber.subscribeChannel("admin.markets", options);
|
|
132
|
+
}
|
|
133
|
+
adminBots(options = {}) {
|
|
134
|
+
return this.subscriber.subscribeChannel("admin.bots", options);
|
|
135
|
+
}
|
|
136
|
+
adminContracts(options = {}) {
|
|
137
|
+
return this.subscriber.subscribeChannel("admin.contracts", options);
|
|
138
|
+
}
|
|
139
|
+
adminCommands(options = {}) {
|
|
140
|
+
return this.subscriber.subscribeChannel("admin.commands", options);
|
|
141
|
+
}
|
|
142
|
+
accountAgents(options = {}) {
|
|
143
|
+
return this.subscriber.subscribeChannel("account.agents", options);
|
|
144
|
+
}
|
|
145
|
+
accountDeposits(options = {}) {
|
|
146
|
+
return this.subscriber.subscribeChannel("account.deposits", options);
|
|
147
|
+
}
|
|
148
|
+
marketsPrices(options = {}) {
|
|
149
|
+
return this.subscriber.subscribeChannel("markets.prices", options);
|
|
150
|
+
}
|
|
151
|
+
systemStatus(options = {}) {
|
|
152
|
+
return this.subscriber.subscribeChannel("system.status", options);
|
|
153
|
+
}
|
|
154
|
+
accountPerformance(options = {}) {
|
|
155
|
+
return this.subscriber.subscribeChannel("account.performance", options);
|
|
156
|
+
}
|
|
157
|
+
accountFeeShareOffers(options = {}) {
|
|
158
|
+
return this.subscriber.subscribeChannel("account.fee-share-offers", options);
|
|
159
|
+
}
|
|
160
|
+
accountSquidTransfers(options = {}) {
|
|
161
|
+
return this.subscriber.subscribeChannel("account.squid-transfers", options);
|
|
162
|
+
}
|
|
163
|
+
accountXreserveBridge(options = {}) {
|
|
164
|
+
return this.subscriber.subscribeChannel("account.xreserve-bridge", options);
|
|
165
|
+
}
|
|
166
|
+
accountSettlement(options = {}) {
|
|
167
|
+
return this.subscriber.subscribeChannel("account.settlement", options);
|
|
168
|
+
}
|
|
169
|
+
marketOrderbook(options = {}) {
|
|
170
|
+
return this.subscriber.subscribeChannel("market.orderbook", options);
|
|
171
|
+
}
|
|
172
|
+
}
|