@win-trader/bindings 0.0.3 → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from "buffer";
2
2
  import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions } from "@stellar/stellar-sdk/contract";
3
- import type { u32, u64, i128 } from "@stellar/stellar-sdk/contract";
3
+ import type { u32, u64, i128, Option } from "@stellar/stellar-sdk/contract";
4
4
  export * from "@stellar/stellar-sdk";
5
5
  export * as contract from "@stellar/stellar-sdk/contract";
6
6
  export * as rpc from "@stellar/stellar-sdk/rpc";
@@ -96,12 +96,48 @@ export declare const PositionManagerError: {
96
96
  25: {
97
97
  message: string;
98
98
  };
99
+ /**
100
+ * No entry order exists for the given id.
101
+ */
102
+ 26: {
103
+ message: string;
104
+ };
105
+ /**
106
+ * `execute_entry_order` called before the trigger price was crossed.
107
+ */
108
+ 27: {
109
+ message: string;
110
+ };
111
+ /**
112
+ * `register_referral_code` for a code that is already owned.
113
+ */
114
+ 28: {
115
+ message: string;
116
+ };
117
+ /**
118
+ * A referral code failed the length/format bounds.
119
+ */
120
+ 29: {
121
+ message: string;
122
+ };
123
+ /**
124
+ * `set_referrer` for a code no one has registered.
125
+ */
126
+ 30: {
127
+ message: string;
128
+ };
129
+ /**
130
+ * A trader tried to set their own code as their referrer.
131
+ */
132
+ 31: {
133
+ message: string;
134
+ };
99
135
  };
100
136
  /**
101
137
  * Which collection routed revenue through the split (§13).
102
138
  */
103
139
  export type FeeSource = {
104
- tag: "Opening";
140
+ tag: "Closing";
105
141
  values: void;
106
142
  } | {
107
143
  tag: "Borrow";
@@ -123,9 +159,23 @@ export type CloseReason = {
123
159
  tag: "Order";
124
160
  values: void;
125
161
  };
162
+ /**
163
+ * Why an entry order was removed before filling.
164
+ */
165
+ export type CancelReason = {
166
+ tag: "Owner";
167
+ values: void;
168
+ } | {
169
+ tag: "Expired";
170
+ values: void;
171
+ } | {
172
+ tag: "PullFailed";
173
+ values: void;
174
+ };
126
175
  /**
127
176
  * §5.1 global state: the five non-LP claim totals, the risk counters, and
128
- * the global accrual state (borrow index + receiver-funding flow).
177
+ * the global borrow accrual. The receiver-funding liability total is fed
178
+ * per-market by `funding::accrue` (§8.3).
129
179
  */
130
180
  export interface Ledger {
131
181
  borrow_index: i128;
@@ -141,15 +191,17 @@ export interface Ledger {
141
191
  pending_receiver_funding_total: i128;
142
192
  position_collateral_total: i128;
143
193
  protocol_claimable_total: i128;
144
- receiver_accrual_remainder: i128;
145
194
  /**
146
- * Sum of every market's receiver flow, cash/second at `INDEX_PRECISION`.
195
+ * §11.1 referral rewards accrued but not yet claimed — the aggregate
196
+ * backing the per-referrer `ReferralBalance` map (their sum is this
197
+ * total). Like every claim here it is a label on cash already in the
198
+ * vault, so NAV and the solvency checks net it out automatically.
147
199
  */
148
- receiver_flow_per_second: i128;
200
+ referral_claimable_total: i128;
149
201
  risk_keeper_reserve_total: i128;
150
202
  total_risk_units: i128;
151
203
  }
152
- export type Key = {
204
+ export type StorageKey = {
153
205
  tag: "ConfigManager";
154
206
  values: void;
155
207
  } | {
@@ -188,10 +240,25 @@ export type Key = {
188
240
  } | {
189
241
  tag: "MarketDisabled";
190
242
  values: readonly [string];
243
+ } | {
244
+ tag: "EntryOrder";
245
+ values: readonly [u64];
246
+ } | {
247
+ tag: "NextEntryOrderId";
248
+ values: void;
249
+ } | {
250
+ tag: "ReferralCode";
251
+ values: readonly [string];
252
+ } | {
253
+ tag: "Referrer";
254
+ values: readonly [string];
255
+ } | {
256
+ tag: "ReferralBalance";
257
+ values: readonly [string];
191
258
  };
192
259
  /**
193
260
  * Authoritative per-market state: the side aggregates, the funding indices,
194
- * the current funding flows, and the market configuration.
261
+ * the funding EMA, and the market configuration.
195
262
  *
196
263
  * Soroban limits UDT field names to 30 characters, so where a doc glossary
197
264
  * term is longer the field drops the redundant qualifier and its doc
@@ -201,7 +268,7 @@ export type Key = {
201
268
  export interface Market {
202
269
  config: MarketConfig;
203
270
  /**
204
- * `INDEX_PRECISION`-scaled bps/day payer rate for the current interval.
271
+ * `INDEX_PRECISION`-scaled bps/day payer rate as of the last refresh.
205
272
  */
206
273
  current_payer_rate: i128;
207
274
  current_payer_side: PayerSide;
@@ -213,12 +280,11 @@ export interface Market {
213
280
  */
214
281
  lp_backed_index_long: i128;
215
282
  lp_backed_index_short: i128;
283
+ lp_payer_remainder: i128;
216
284
  /**
217
- * LP-allocated remainder of the payer flow, cash/second at
218
- * `INDEX_PRECISION` (§8.1).
285
+ * Sub-stroop carry of the receiver-liability accrual (§8.3).
219
286
  */
220
- lp_flow_per_second: i128;
221
- lp_payer_remainder: i128;
287
+ pending_remainder: i128;
222
288
  /**
223
289
  * Cumulative payer fee per unit of dominant-side size whose collection
224
290
  * restores cash backing an already-accrued receiver claim (§8.2).
@@ -226,12 +292,6 @@ export interface Market {
226
292
  receiver_backed_index_long: i128;
227
293
  receiver_backed_index_short: i128;
228
294
  /**
229
- * Receiver-allocated share of the payer flow, cash/second at
230
- * `INDEX_PRECISION` (§8.1).
231
- */
232
- receiver_flow_per_second: i128;
233
- receiver_flow_remainder: i128;
234
- /**
235
295
  * Cumulative funding credit per unit of light-side size (§8.2).
236
296
  */
237
297
  receiver_index_long: i128;
@@ -239,6 +299,12 @@ export interface Market {
239
299
  receiver_index_short: i128;
240
300
  receiver_payer_remainder: i128;
241
301
  short: MarketSide;
302
+ /**
303
+ * §8.1 signed EMA of the instantaneous skew: a fraction of one at
304
+ * `INDEX_PRECISION` scale, positive when history says longs dominate.
305
+ * Decays toward the current skew with the global half-life.
306
+ */
307
+ skew_ema: i128;
242
308
  }
243
309
  export interface LpConfig {
244
310
  lp_request_delay: u64;
@@ -299,8 +365,9 @@ export interface LpRequest {
299
365
  status: LpRequestStatus;
300
366
  }
301
367
  /**
302
- * Which side currently pays funding (§8.1: the side with more base
303
- * exposure). `None` when the market is balanced or empty.
368
+ * Which side currently pays funding (§8.1: the side the blended integral
369
+ * skew points at — under the EMA this can be the *lighter* side for a
370
+ * while after the book flips). `None` when the blend is exactly zero.
304
371
  */
305
372
  export type PayerSide = {
306
373
  tag: "None";
@@ -325,6 +392,40 @@ export type RiskState = {
325
392
  tag: "HardCap";
326
393
  values: void;
327
394
  };
395
+ /**
396
+ * A pending limit/stop entry order: the frozen `open_position` arguments
397
+ * plus a trigger condition and an expiry. Placing one only writes this
398
+ * record — no funds move. A keeper's `execute_entry_order` pulls the
399
+ * collateral via the owner's token allowance and opens the position
400
+ * exactly as a market open would.
401
+ */
402
+ export interface EntryOrder {
403
+ acceptable_price: i128;
404
+ collateral: i128;
405
+ execution_budget: i128;
406
+ /**
407
+ * Ledger timestamp after which the order is dead and swept on the next
408
+ * touch (user-configurable max TTL).
409
+ */
410
+ expires_at: u64;
411
+ id: u64;
412
+ is_long: boolean;
413
+ market: string;
414
+ owner: string;
415
+ size: i128;
416
+ stop_loss: i128;
417
+ take_profit: i128;
418
+ /**
419
+ * True → fill when price ≥ trigger (stop/breakout entry); false → fill
420
+ * when price ≤ trigger (limit/dip entry). Inferred at placement from
421
+ * the trigger vs. the current price.
422
+ */
423
+ trigger_above: boolean;
424
+ /**
425
+ * The oracle price at which the order becomes fillable.
426
+ */
427
+ trigger_price: i128;
428
+ }
328
429
  export interface MarketSide {
329
430
  base_exposure: i128;
330
431
  risk_state: RiskState;
@@ -345,22 +446,68 @@ export interface OracleRound {
345
446
  }
346
447
  export interface GlobalConfig {
347
448
  base_borrow_rate_bps_day: i128;
449
+ /**
450
+ * §9.2 borrow-curve exponent, bps: 20_000 = u² (legacy quadratic),
451
+ * 10_000 = linear. Bounded to ≤ 100_000 (e ≤ 10) by validation.
452
+ */
453
+ borrow_exponent_bps: u32;
454
+ /**
455
+ * §8.1 half-life of the funding skew EMA, seconds (global: one memory
456
+ * horizon for every market).
457
+ */
458
+ funding_half_life_seconds: u64;
348
459
  hard_cap_factor_limit_bps: u32;
349
460
  lp_revenue_share_bps: u32;
350
461
  max_active_markets: u32;
351
462
  max_adl_reward: i128;
352
463
  max_insolvent_touch_reward: i128;
353
464
  max_variable_borrow_bps_day: i128;
465
+ /**
466
+ * §11.2 minimum borrow charge per capitalization: an index delta at
467
+ * `INDEX_PRECISION` scale applied to the position's risk units
468
+ * (2e11 = 2 bps of notional at a 10% market risk factor). Zero
469
+ * disables the floor.
470
+ */
471
+ min_borrow_index_delta: i128;
354
472
  min_collateral: i128;
355
473
  min_position_lifetime: u64;
474
+ /**
475
+ * §11.1 share of a closing fee routed to the trader's referrer, carved
476
+ * from the protocol slice (keeper and LP shares are untouched). `0`
477
+ * disables referral accrual globally — a kill switch. Validated so
478
+ * `lp + keeper + referral ≤ BPS`, keeping the protocol remainder ≥ 0.
479
+ */
480
+ referral_fee_share_bps: u32;
356
481
  risk_capacity_limit_bps: u32;
357
482
  risk_keeper_revenue_share_bps: u32;
358
483
  }
359
484
  export interface MarketConfig {
360
485
  adl_pnl_factor_bps: u32;
361
486
  adl_reward_bps: u32;
487
+ /**
488
+ * §11.1 closing-fee tier when the close worsens skew.
489
+ */
490
+ close_fee_high_bps: u32;
491
+ /**
492
+ * §11.1 closing-fee tier when the close improves or preserves skew.
493
+ */
494
+ close_fee_low_bps: u32;
362
495
  hard_cap_pnl_factor_bps: u32;
496
+ /**
497
+ * Margin required to open or add risk (§12.3). Divides max leverage:
498
+ * a position may not be created closer to liquidation than this.
499
+ */
500
+ initial_margin_bps: u32;
501
+ /**
502
+ * §8.1 weight of the instantaneous skew in the funding blend, in bps;
503
+ * the rest is the half-life EMA. `BPS` reproduces pure instant skew.
504
+ */
505
+ instant_weight_bps: u32;
363
506
  liquidation_reward_bps: u32;
507
+ /**
508
+ * Margin below which the position is liquidatable (§12.3). Must not
509
+ * exceed `initial_margin_bps`; the gap is the entry buffer.
510
+ */
364
511
  maintenance_margin_bps: u32;
365
512
  market_risk_factor_bps: u32;
366
513
  max_funding_rate_bps_day: i128;
@@ -368,8 +515,6 @@ export interface MarketConfig {
368
515
  max_long_size_open_interest: i128;
369
516
  max_short_base_exposure: i128;
370
517
  max_short_size_open_interest: i128;
371
- open_fee_high_bps: u32;
372
- open_fee_low_bps: u32;
373
518
  recovery_pnl_factor_bps: u32;
374
519
  warning_pnl_factor_bps: u32;
375
520
  }
@@ -440,6 +585,23 @@ export type LpRequestStatus = {
440
585
  tag: "Expired";
441
586
  values: void;
442
587
  };
588
+ /**
589
+ * The caller-supplied fields of a `place_entry_order` request, bundled so
590
+ * the entry point stays within Soroban's parameter limit. `owner` and
591
+ * `market` are passed alongside; `id` and `trigger_above` are derived at
592
+ * placement.
593
+ */
594
+ export interface EntryOrderParams {
595
+ acceptable_price: i128;
596
+ collateral: i128;
597
+ execution_budget: i128;
598
+ expires_at: u64;
599
+ is_long: boolean;
600
+ size: i128;
601
+ stop_loss: i128;
602
+ take_profit: i128;
603
+ trigger_price: i128;
604
+ }
443
605
  export interface SettlementResult {
444
606
  /**
445
607
  * Shares minted for a deposit or assets paid for a withdrawal.
@@ -626,6 +788,12 @@ export interface Client {
626
788
  get_position: ({ position_id }: {
627
789
  position_id: u64;
628
790
  }, options?: MethodOptions) => Promise<AssembledTransaction<Position>>;
791
+ /**
792
+ * Construct and simulate a get_referrer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
793
+ */
794
+ get_referrer: ({ trader }: {
795
+ trader: string;
796
+ }, options?: MethodOptions) => Promise<AssembledTransaction<Option<string>>>;
629
797
  /**
630
798
  * Construct and simulate a recapitalize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
631
799
  */
@@ -633,6 +801,13 @@ export interface Client {
633
801
  contributor: string;
634
802
  amount: i128;
635
803
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
804
+ /**
805
+ * Construct and simulate a set_referrer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
806
+ */
807
+ set_referrer: ({ trader, code }: {
808
+ trader: string;
809
+ code: string;
810
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
636
811
  /**
637
812
  * Construct and simulate a bump_position transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
638
813
  */
@@ -693,6 +868,12 @@ export interface Client {
693
868
  recipient: string;
694
869
  amount: i128;
695
870
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
871
+ /**
872
+ * Construct and simulate a claim_referral transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
873
+ */
874
+ claim_referral: ({ referrer }: {
875
+ referrer: string;
876
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
696
877
  /**
697
878
  * Construct and simulate a disable_market transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
698
879
  */
@@ -707,6 +888,12 @@ export interface Client {
707
888
  caller: string;
708
889
  market_symbol: string;
709
890
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
891
+ /**
892
+ * Construct and simulate a get_entry_order transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
893
+ */
894
+ get_entry_order: ({ order_id }: {
895
+ order_id: u64;
896
+ }, options?: MethodOptions) => Promise<AssembledTransaction<EntryOrder>>;
710
897
  /**
711
898
  * Construct and simulate a propose_upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
712
899
  */
@@ -714,6 +901,12 @@ export interface Client {
714
901
  caller: string;
715
902
  wasm_hash: Buffer;
716
903
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
904
+ /**
905
+ * Construct and simulate a referral_balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
906
+ */
907
+ referral_balance: ({ referrer }: {
908
+ referrer: string;
909
+ }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
717
910
  /**
718
911
  * Construct and simulate a decrease_position transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
719
912
  */
@@ -732,6 +925,14 @@ export interface Client {
732
925
  collateral_added: i128;
733
926
  acceptable_price: i128;
734
927
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
928
+ /**
929
+ * Construct and simulate a place_entry_order transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
930
+ */
931
+ place_entry_order: ({ owner, market, params }: {
932
+ owner: string;
933
+ market: string;
934
+ params: EntryOrderParams;
935
+ }, options?: MethodOptions) => Promise<AssembledTransaction<u64>>;
735
936
  /**
736
937
  * Construct and simulate a set_global_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
737
938
  */
@@ -747,6 +948,12 @@ export interface Client {
747
948
  market_symbol: string;
748
949
  config: MarketConfig;
749
950
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
951
+ /**
952
+ * Construct and simulate a cancel_entry_order transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
953
+ */
954
+ cancel_entry_order: ({ order_id }: {
955
+ order_id: u64;
956
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
750
957
  /**
751
958
  * Construct and simulate a is_market_disabled transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
752
959
  */
@@ -774,6 +981,13 @@ export interface Client {
774
981
  caller: string;
775
982
  position_id: u64;
776
983
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
984
+ /**
985
+ * Construct and simulate a execute_entry_order transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
986
+ */
987
+ execute_entry_order: ({ caller, order_id }: {
988
+ caller: string;
989
+ order_id: u64;
990
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
777
991
  /**
778
992
  * Construct and simulate a prepare_lp_snapshot transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
779
993
  */
@@ -782,6 +996,12 @@ export interface Client {
782
996
  round: OracleRound;
783
997
  physical: i128;
784
998
  }, options?: MethodOptions) => Promise<AssembledTransaction<AccountingSnapshot>>;
999
+ /**
1000
+ * Construct and simulate a referral_code_owner transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1001
+ */
1002
+ referral_code_owner: ({ code }: {
1003
+ code: string;
1004
+ }, options?: MethodOptions) => Promise<AssembledTransaction<Option<string>>>;
785
1005
  /**
786
1006
  * Construct and simulate a refresh_borrow_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
787
1007
  */
@@ -803,10 +1023,21 @@ export interface Client {
803
1023
  position_id: u64;
804
1024
  amount: i128;
805
1025
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1026
+ /**
1027
+ * Construct and simulate a register_referral_code transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1028
+ */
1029
+ register_referral_code: ({ owner, code }: {
1030
+ owner: string;
1031
+ code: string;
1032
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
806
1033
  /**
807
1034
  * Construct and simulate a protocol_claimable_total transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
808
1035
  */
809
1036
  protocol_claimable_total: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1037
+ /**
1038
+ * Construct and simulate a referral_claimable_total transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1039
+ */
1040
+ referral_claimable_total: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
810
1041
  /**
811
1042
  * Construct and simulate a risk_keeper_reserve_total transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
812
1043
  */
@@ -851,7 +1082,9 @@ export declare class Client extends ContractClient {
851
1082
  set_vault: (json: string) => AssembledTransaction<null>;
852
1083
  get_market: (json: string) => AssembledTransaction<Market>;
853
1084
  get_position: (json: string) => AssembledTransaction<Position>;
1085
+ get_referrer: (json: string) => AssembledTransaction<Option<string>>;
854
1086
  recapitalize: (json: string) => AssembledTransaction<null>;
1087
+ set_referrer: (json: string) => AssembledTransaction<null>;
855
1088
  bump_position: (json: string) => AssembledTransaction<null>;
856
1089
  enable_market: (json: string) => AssembledTransaction<null>;
857
1090
  execute_order: (json: string) => AssembledTransaction<null>;
@@ -861,22 +1094,31 @@ export declare class Client extends ContractClient {
861
1094
  active_markets: (json: string) => AssembledTransaction<string[]>;
862
1095
  cancel_upgrade: (json: string) => AssembledTransaction<null>;
863
1096
  claim_protocol: (json: string) => AssembledTransaction<null>;
1097
+ claim_referral: (json: string) => AssembledTransaction<null>;
864
1098
  disable_market: (json: string) => AssembledTransaction<null>;
865
1099
  update_indices: (json: string) => AssembledTransaction<null>;
1100
+ get_entry_order: (json: string) => AssembledTransaction<EntryOrder>;
866
1101
  propose_upgrade: (json: string) => AssembledTransaction<null>;
1102
+ referral_balance: (json: string) => AssembledTransaction<bigint>;
867
1103
  decrease_position: (json: string) => AssembledTransaction<null>;
868
1104
  increase_position: (json: string) => AssembledTransaction<null>;
1105
+ place_entry_order: (json: string) => AssembledTransaction<bigint>;
869
1106
  set_global_config: (json: string) => AssembledTransaction<null>;
870
1107
  set_market_config: (json: string) => AssembledTransaction<null>;
1108
+ cancel_entry_order: (json: string) => AssembledTransaction<null>;
871
1109
  is_market_disabled: (json: string) => AssembledTransaction<boolean>;
872
1110
  liquidate_position: (json: string) => AssembledTransaction<null>;
873
1111
  accounting_snapshot: (json: string) => AssembledTransaction<AccountingSnapshot>;
874
1112
  deleverage_position: (json: string) => AssembledTransaction<null>;
1113
+ execute_entry_order: (json: string) => AssembledTransaction<null>;
875
1114
  prepare_lp_snapshot: (json: string) => AssembledTransaction<AccountingSnapshot>;
1115
+ referral_code_owner: (json: string) => AssembledTransaction<Option<string>>;
876
1116
  refresh_borrow_rate: (json: string) => AssembledTransaction<null>;
877
1117
  can_create_lp_request: (json: string) => AssembledTransaction<boolean>;
878
1118
  fund_execution_budget: (json: string) => AssembledTransaction<null>;
1119
+ register_referral_code: (json: string) => AssembledTransaction<null>;
879
1120
  protocol_claimable_total: (json: string) => AssembledTransaction<bigint>;
1121
+ referral_claimable_total: (json: string) => AssembledTransaction<bigint>;
880
1122
  risk_keeper_reserve_total: (json: string) => AssembledTransaction<bigint>;
881
1123
  withdraw_execution_budget: (json: string) => AssembledTransaction<null>;
882
1124
  pending_receiver_funding_total: (json: string) => AssembledTransaction<bigint>;