@win-trader/bindings 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.
@@ -0,0 +1,421 @@
1
+ import { Buffer } from "buffer";
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";
4
+ export * from "@stellar/stellar-sdk";
5
+ export * as contract from "@stellar/stellar-sdk/contract";
6
+ export * as rpc from "@stellar/stellar-sdk/rpc";
7
+ export declare const OracleError: {
8
+ 1: {
9
+ message: string;
10
+ };
11
+ 2: {
12
+ message: string;
13
+ };
14
+ 3: {
15
+ message: string;
16
+ };
17
+ 4: {
18
+ message: string;
19
+ };
20
+ /**
21
+ * `upgrade` rejected — no `propose_upgrade` was made before commit.
22
+ */
23
+ 5: {
24
+ message: string;
25
+ };
26
+ /**
27
+ * `upgrade` rejected — timelock has not elapsed yet.
28
+ */
29
+ 6: {
30
+ message: string;
31
+ };
32
+ /**
33
+ * `upgrade` rejected — `new_wasm_hash` does not match the proposed hash.
34
+ */
35
+ 7: {
36
+ message: string;
37
+ };
38
+ };
39
+ export type StorageKey = {
40
+ tag: "Initialized";
41
+ values: void;
42
+ } | {
43
+ tag: "ConfigManager";
44
+ values: void;
45
+ } | {
46
+ tag: "Publisher";
47
+ values: void;
48
+ } | {
49
+ tag: "Price";
50
+ values: readonly [string];
51
+ } | {
52
+ tag: "LastUpdate";
53
+ values: readonly [string];
54
+ } | {
55
+ tag: "Version";
56
+ values: void;
57
+ };
58
+ /**
59
+ * Represents a single trader's open leveraged position.
60
+ */
61
+ export interface Position {
62
+ /**
63
+ * USDC collateral deposited by the trader.
64
+ */
65
+ collateral: i128;
66
+ /**
67
+ * Global borrow accumulator index at position open (for lazy fee calc).
68
+ */
69
+ entry_borrow_index: i128;
70
+ /**
71
+ * Global funding accumulator index at position open (for lazy fee calc).
72
+ */
73
+ entry_funding_index: i128;
74
+ /**
75
+ * Oracle price at the time the position was opened (scaled by 1e7).
76
+ */
77
+ entry_price: i128;
78
+ /**
79
+ * Flat USDC fee escrowed when TP or SL is set. Paid to executor on trigger, refunded on user close / ADL, forfeited to revenue on liquidation.
80
+ */
81
+ execution_fee_escrow: i128;
82
+ /**
83
+ * True for a long position, false for a short.
84
+ */
85
+ is_long: boolean;
86
+ /**
87
+ * Block timestamp when the position was last increased (anti-front-running lock).
88
+ */
89
+ last_increased_time: u64;
90
+ /**
91
+ * Notional size of the position in USDC.
92
+ */
93
+ size: i128;
94
+ /**
95
+ * Stop-loss price (scaled by 1e7). 0 = not set.
96
+ */
97
+ stop_loss: i128;
98
+ /**
99
+ * Take-profit price (scaled by 1e7). 0 = not set.
100
+ */
101
+ take_profit: i128;
102
+ }
103
+ /**
104
+ * Global market state for a single tradeable asset symbol.
105
+ */
106
+ export interface MarketInfo {
107
+ /**
108
+ * Cumulative borrow fee index (grows monotonically with time).
109
+ */
110
+ acc_borrow_index: i128;
111
+ /**
112
+ * Cumulative funding rate index (signed; positive = longs pay shorts).
113
+ */
114
+ acc_funding_index: i128;
115
+ /**
116
+ * Volume-weighted average entry price of all active long positions.
117
+ */
118
+ global_long_avg_price: i128;
119
+ /**
120
+ * Volume-weighted average entry price of all active short positions.
121
+ */
122
+ global_short_avg_price: i128;
123
+ /**
124
+ * Timestamp of the last keeper index update.
125
+ */
126
+ last_index_update: u64;
127
+ /**
128
+ * Total notional size of all open long positions.
129
+ */
130
+ long_open_interest: i128;
131
+ /**
132
+ * Total notional size of all open short positions.
133
+ */
134
+ short_open_interest: i128;
135
+ }
136
+ /**
137
+ * Global safety thresholds for price validation.
138
+ */
139
+ export interface OracleConfig {
140
+ /**
141
+ * How long a cached aggregated price remains valid (in seconds). A
142
+ * `get_price` call within this window of the last fetch returns the
143
+ * cached value without re-querying sources. Must be > 0 and
144
+ * <= `staleness_threshold` (otherwise the cache could outlive a fresh
145
+ * source price and serve stale data).
146
+ */
147
+ cache_duration: u64;
148
+ /**
149
+ * Maximum allowed spread between oracle sources in basis points
150
+ * (e.g., 100 = 1%). Bounded at `shared::constants::MAX_DEVIATION_BPS_CEILING`.
151
+ */
152
+ max_deviation_bps: i128;
153
+ /**
154
+ * Minimum number of source responses that must agree within
155
+ * `max_deviation_bps` for OracleRouter to return a price. Floored at
156
+ * `shared::constants::MIN_REQUIRED_SOURCES_FLOOR`, ceilinged at
157
+ * `shared::constants::MAX_ORACLE_SOURCES`.
158
+ */
159
+ min_required_sources: u32;
160
+ /**
161
+ * Maximum age of an external SEP-40 price feed before it is rejected
162
+ * as stale (in seconds).
163
+ */
164
+ staleness_threshold: u64;
165
+ }
166
+ /**
167
+ * Data required during a WASM migration. Single definition for all contracts.
168
+ */
169
+ export interface MigrationData {
170
+ version: u32;
171
+ }
172
+ /**
173
+ * Pending WASM upgrade — set by `propose_upgrade`, consumed by `upgrade`
174
+ * (cleared atomically on a successful install), or cleared by `cancel_upgrade`.
175
+ * Single shape across every protocol contract; all four contracts store it at
176
+ * the shared `pending_upgrade` Symbol key in their own instance storage (see
177
+ * `interfaces::upgrade::pending_upgrade_key`). `upgrade` refuses to install
178
+ * unless `pending.wasm_hash` matches the supplied hash and `now >= eta`.
179
+ */
180
+ export interface PendingUpgrade {
181
+ eta: u64;
182
+ wasm_hash: Buffer;
183
+ }
184
+ export declare const UpgradeableError: {
185
+ /**
186
+ * When migration is attempted but not allowed due to upgrade state.
187
+ */
188
+ 1100: {
189
+ message: string;
190
+ };
191
+ };
192
+ export declare const MerkleDistributorError: {
193
+ /**
194
+ * The merkle root is not set.
195
+ */
196
+ 1300: {
197
+ message: string;
198
+ };
199
+ /**
200
+ * The provided index was already claimed.
201
+ */
202
+ 1301: {
203
+ message: string;
204
+ };
205
+ /**
206
+ * The proof is invalid.
207
+ */
208
+ 1302: {
209
+ message: string;
210
+ };
211
+ };
212
+ /**
213
+ * Storage keys for the data associated with `MerkleDistributor`
214
+ */
215
+ export type MerkleDistributorStorageKey = {
216
+ tag: "Root";
217
+ values: void;
218
+ } | {
219
+ tag: "Claimed";
220
+ values: readonly [u32];
221
+ };
222
+ /**
223
+ * Rounding direction for division operations
224
+ */
225
+ export type Rounding = {
226
+ tag: "Floor";
227
+ values: void;
228
+ } | {
229
+ tag: "Ceil";
230
+ values: void;
231
+ } | {
232
+ tag: "Truncate";
233
+ values: void;
234
+ };
235
+ export declare const SorobanFixedPointError: {
236
+ /**
237
+ * Arithmetic overflow occurred
238
+ */
239
+ 1500: {
240
+ message: string;
241
+ };
242
+ /**
243
+ * Division by zero
244
+ */
245
+ 1501: {
246
+ message: string;
247
+ };
248
+ };
249
+ export declare const CryptoError: {
250
+ /**
251
+ * The merkle proof length is out of bounds.
252
+ */
253
+ 1400: {
254
+ message: string;
255
+ };
256
+ /**
257
+ * The index of the leaf is out of bounds.
258
+ */
259
+ 1401: {
260
+ message: string;
261
+ };
262
+ /**
263
+ * No data in hasher state.
264
+ */
265
+ 1402: {
266
+ message: string;
267
+ };
268
+ };
269
+ export declare const PausableError: {
270
+ /**
271
+ * The operation failed because the contract is paused.
272
+ */
273
+ 1000: {
274
+ message: string;
275
+ };
276
+ /**
277
+ * The operation failed because the contract is not paused.
278
+ */
279
+ 1001: {
280
+ message: string;
281
+ };
282
+ };
283
+ /**
284
+ * Storage key for the pausable state
285
+ */
286
+ export type PausableStorageKey = {
287
+ tag: "Paused";
288
+ values: void;
289
+ };
290
+ /**
291
+ * Execution-bounty and open-fee parameters charged to traders.
292
+ * `open_fee_bps` and `liquidation_bounty_bps` are in basis points;
293
+ * `tp_sl_execution_fee` is a flat USDC amount at PRECISION scale.
294
+ */
295
+ export interface FeeConfig {
296
+ liquidation_bounty_bps: u32;
297
+ open_fee_bps: u32;
298
+ tp_sl_execution_fee: i128;
299
+ }
300
+ /**
301
+ * Defines how protocol revenue is split between parties.
302
+ * All values are in basis points (bps). Must sum to 10_000.
303
+ */
304
+ export interface FeeSplits {
305
+ dev_bps: u32;
306
+ lp_bps: u32;
307
+ staker_bps: u32;
308
+ }
309
+ /**
310
+ * Global protocol risk and timing parameters.
311
+ */
312
+ export interface ProtocolLimits {
313
+ adl_pnl_bps: u32;
314
+ adl_utilization_bps: u32;
315
+ cooldown_duration: u64;
316
+ funding_cut_bps: u32;
317
+ liquidation_threshold_bps: u32;
318
+ max_utilization_ratio: i128;
319
+ min_collateral: i128;
320
+ min_position_lifetime: u64;
321
+ }
322
+ /**
323
+ * Borrow rate kink curve and funding rate parameters (all in basis points).
324
+ */
325
+ export interface BorrowRateConfig {
326
+ base_borrow_rate_bps: i128;
327
+ base_funding_rate_bps: i128;
328
+ optimal_utilization_bps: i128;
329
+ slope1_bps: i128;
330
+ slope2_bps: i128;
331
+ }
332
+ export interface Client {
333
+ /**
334
+ * Construct and simulate a migrate 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.
335
+ */
336
+ migrate: ({ migration_data, operator }: {
337
+ migration_data: MigrationData;
338
+ operator: string;
339
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
340
+ /**
341
+ * Construct and simulate a 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.
342
+ */
343
+ upgrade: ({ new_wasm_hash, operator }: {
344
+ new_wasm_hash: Buffer;
345
+ operator: string;
346
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
347
+ /**
348
+ * Construct and simulate a decimals 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.
349
+ */
350
+ decimals: (options?: MethodOptions) => Promise<AssembledTransaction<u32>>;
351
+ /**
352
+ * Construct and simulate a get_price 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.
353
+ */
354
+ get_price: ({ symbol }: {
355
+ symbol: string;
356
+ }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
357
+ /**
358
+ * Construct and simulate a set_price 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.
359
+ */
360
+ set_price: ({ caller, symbol, price }: {
361
+ caller: string;
362
+ symbol: string;
363
+ price: i128;
364
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
365
+ /**
366
+ * Construct and simulate a last_update 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.
367
+ */
368
+ last_update: ({ symbol }: {
369
+ symbol: string;
370
+ }, options?: MethodOptions) => Promise<AssembledTransaction<u64>>;
371
+ /**
372
+ * Construct and simulate a set_publisher 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.
373
+ */
374
+ set_publisher: ({ caller, new_publisher }: {
375
+ caller: string;
376
+ new_publisher: string;
377
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
378
+ /**
379
+ * Construct and simulate a cancel_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.
380
+ */
381
+ cancel_upgrade: ({ caller }: {
382
+ caller: string;
383
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
384
+ /**
385
+ * 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.
386
+ */
387
+ propose_upgrade: ({ caller, wasm_hash }: {
388
+ caller: string;
389
+ wasm_hash: Buffer;
390
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
391
+ }
392
+ export declare class Client extends ContractClient {
393
+ readonly options: ContractClientOptions;
394
+ static deploy<T = Client>(
395
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
396
+ { config_manager, publisher }: {
397
+ config_manager: string;
398
+ publisher: string;
399
+ },
400
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
401
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
402
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
403
+ wasmHash: Buffer | string;
404
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
405
+ salt?: Buffer | Uint8Array;
406
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
407
+ format?: "hex" | "base64";
408
+ }): Promise<AssembledTransaction<T>>;
409
+ constructor(options: ContractClientOptions);
410
+ readonly fromJSON: {
411
+ migrate: (json: string) => AssembledTransaction<null>;
412
+ upgrade: (json: string) => AssembledTransaction<null>;
413
+ decimals: (json: string) => AssembledTransaction<number>;
414
+ get_price: (json: string) => AssembledTransaction<bigint>;
415
+ set_price: (json: string) => AssembledTransaction<null>;
416
+ last_update: (json: string) => AssembledTransaction<bigint>;
417
+ set_publisher: (json: string) => AssembledTransaction<null>;
418
+ cancel_upgrade: (json: string) => AssembledTransaction<null>;
419
+ propose_upgrade: (json: string) => AssembledTransaction<null>;
420
+ };
421
+ }
@@ -0,0 +1,140 @@
1
+ import { Buffer } from "buffer";
2
+ import { Client as ContractClient, Spec as ContractSpec, } from "@stellar/stellar-sdk/contract";
3
+ export * from "@stellar/stellar-sdk";
4
+ export * as contract from "@stellar/stellar-sdk/contract";
5
+ export * as rpc from "@stellar/stellar-sdk/rpc";
6
+ if (typeof window !== "undefined") {
7
+ //@ts-ignore Buffer exists
8
+ window.Buffer = window.Buffer || Buffer;
9
+ }
10
+ export const OracleError = {
11
+ 1: { message: "AlreadyInitialized" },
12
+ 2: { message: "NotInitialized" },
13
+ 3: { message: "Unauthorized" },
14
+ 4: { message: "NoPriceSet" },
15
+ /**
16
+ * `upgrade` rejected — no `propose_upgrade` was made before commit.
17
+ */
18
+ 5: { message: "NoPendingUpgrade" },
19
+ /**
20
+ * `upgrade` rejected — timelock has not elapsed yet.
21
+ */
22
+ 6: { message: "UpgradeTimelockNotElapsed" },
23
+ /**
24
+ * `upgrade` rejected — `new_wasm_hash` does not match the proposed hash.
25
+ */
26
+ 7: { message: "UpgradeHashMismatch" }
27
+ };
28
+ export const UpgradeableError = {
29
+ /**
30
+ * When migration is attempted but not allowed due to upgrade state.
31
+ */
32
+ 1100: { message: "MigrationNotAllowed" }
33
+ };
34
+ export const MerkleDistributorError = {
35
+ /**
36
+ * The merkle root is not set.
37
+ */
38
+ 1300: { message: "RootNotSet" },
39
+ /**
40
+ * The provided index was already claimed.
41
+ */
42
+ 1301: { message: "IndexAlreadyClaimed" },
43
+ /**
44
+ * The proof is invalid.
45
+ */
46
+ 1302: { message: "InvalidProof" }
47
+ };
48
+ export const SorobanFixedPointError = {
49
+ /**
50
+ * Arithmetic overflow occurred
51
+ */
52
+ 1500: { message: "Overflow" },
53
+ /**
54
+ * Division by zero
55
+ */
56
+ 1501: { message: "DivisionByZero" }
57
+ };
58
+ export const CryptoError = {
59
+ /**
60
+ * The merkle proof length is out of bounds.
61
+ */
62
+ 1400: { message: "MerkleProofOutOfBounds" },
63
+ /**
64
+ * The index of the leaf is out of bounds.
65
+ */
66
+ 1401: { message: "MerkleIndexOutOfBounds" },
67
+ /**
68
+ * No data in hasher state.
69
+ */
70
+ 1402: { message: "HasherEmptyState" }
71
+ };
72
+ export const PausableError = {
73
+ /**
74
+ * The operation failed because the contract is paused.
75
+ */
76
+ 1000: { message: "EnforcedPause" },
77
+ /**
78
+ * The operation failed because the contract is not paused.
79
+ */
80
+ 1001: { message: "ExpectedPause" }
81
+ };
82
+ export class Client extends ContractClient {
83
+ options;
84
+ static async deploy(
85
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
86
+ { config_manager, publisher },
87
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
88
+ options) {
89
+ return ContractClient.deploy({ config_manager, publisher }, options);
90
+ }
91
+ constructor(options) {
92
+ super(new ContractSpec(["AAAABAAAAAAAAAAA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),
131
+ upgrade: (this.txFromJSON),
132
+ decimals: (this.txFromJSON),
133
+ get_price: (this.txFromJSON),
134
+ set_price: (this.txFromJSON),
135
+ last_update: (this.txFromJSON),
136
+ set_publisher: (this.txFromJSON),
137
+ cancel_upgrade: (this.txFromJSON),
138
+ propose_upgrade: (this.txFromJSON)
139
+ };
140
+ }